Changeset 148:b3dec671d1f7
- Timestamp:
- 08/24/08 16:40:25
(5 months ago)
- Author:
- Frank Benoit <benoit@tionex.de>
- branch:
- default
- Message:
...
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r147 |
r148 |
|
| 211 | 211 | */ |
|---|
| 212 | 212 | abstract public class AbstractHoverInformationControlManager : AbstractInformationControlManager { |
|---|
| 213 | | |
|---|
| | 213 | |
|---|
| 214 | 214 | /** |
|---|
| 215 | 215 | * The information control closer for the hover information. Closes the information control as |
|---|
| … | … | |
| 218 | 218 | */ |
|---|
| 219 | 219 | class Closer : IInformationControlCloser, MouseListener, MouseMoveListener, ControlListener, KeyListener, SelectionListener, Listener { |
|---|
| 220 | | |
|---|
| | 220 | |
|---|
| 221 | 221 | /** The closer's subject control */ |
|---|
| 222 | 222 | private Control fSubjectControl; |
|---|
| … | … | |
| 278 | 278 | hBar.addSelectionListener(this); |
|---|
| 279 | 279 | } |
|---|
| 280 | | |
|---|
| | 280 | |
|---|
| 281 | 281 | fDisplay= fSubjectControl.getDisplay(); |
|---|
| 282 | 282 | if (!fDisplay.isDisposed()) { |
|---|
| 283 | 283 | fDisplay.addFilter(DWT.Activate, this); |
|---|
| 284 | 284 | fDisplay.addFilter(DWT.MouseWheel, this); |
|---|
| 285 | | |
|---|
| | 285 | |
|---|
| 286 | 286 | fDisplay.addFilter(DWT.FocusOut, this); |
|---|
| 287 | | |
|---|
| | 287 | |
|---|
| 288 | 288 | fDisplay.addFilter(DWT.MouseDown, this); |
|---|
| 289 | 289 | fDisplay.addFilter(DWT.MouseUp, this); |
|---|
| 290 | | |
|---|
| | 290 | |
|---|
| 291 | 291 | fDisplay.addFilter(DWT.MouseMove, this); |
|---|
| 292 | 292 | fDisplay.addFilter(DWT.MouseEnter, this); |
|---|
| … | … | |
| 305 | 305 | fIsActive= false; |
|---|
| 306 | 306 | |
|---|
| 307 | | if cast(DEBUG) |
|---|
| | 307 | if (DEBUG) |
|---|
| 308 | 308 | System.out_.println("AbstractHoverInformationControlManager.Closer stopped"); //$NON-NLS-1$ |
|---|
| 309 | 309 | |
|---|
| … | … | |
| 327 | 327 | fDisplay.removeFilter(DWT.Activate, this); |
|---|
| 328 | 328 | fDisplay.removeFilter(DWT.MouseWheel, this); |
|---|
| 329 | | |
|---|
| | 329 | |
|---|
| 330 | 330 | fDisplay.removeFilter(DWT.FocusOut, this); |
|---|
| 331 | | |
|---|
| | 331 | |
|---|
| 332 | 332 | fDisplay.removeFilter(DWT.MouseDown, this); |
|---|
| 333 | 333 | fDisplay.removeFilter(DWT.MouseUp, this); |
|---|
| 334 | | |
|---|
| | 334 | |
|---|
| 335 | 335 | fDisplay.removeFilter(DWT.MouseMove, this); |
|---|
| 336 | 336 | fDisplay.removeFilter(DWT.MouseEnter, this); |
|---|
| … | … | |
| 409 | 409 | hideInformationControl(); |
|---|
| 410 | 410 | } |
|---|
| 411 | | |
|---|
| | 411 | |
|---|
| 412 | 412 | /* |
|---|
| 413 | 413 | * @see dwt.events.SelectionListener#widgetDefaultSelected(dwt.events.SelectionEvent) |
|---|
| … | … | |
| 415 | 415 | public void widgetDefaultSelected(SelectionEvent e) { |
|---|
| 416 | 416 | } |
|---|
| 417 | | |
|---|
| | 417 | |
|---|
| 418 | 418 | /* |
|---|
| 419 | 419 | * @see dwt.widgets.Listener#handleEvent(dwt.widgets.Event) |
|---|
| … | … | |
| 441 | 441 | } |
|---|
| 442 | 442 | break; |
|---|
| 443 | | |
|---|
| | 443 | |
|---|
| 444 | 444 | case DWT.MouseUp: |
|---|
| 445 | 445 | case DWT.MouseDown: |
|---|
| … | … | |
| 467 | 467 | }); |
|---|
| 468 | 468 | } |
|---|
| 469 | | |
|---|
| | 469 | |
|---|
| 470 | 470 | // XXX: workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=212392 : |
|---|
| 471 | 471 | control.getShell().getDisplay().asyncExec(new class() Runnable { |
|---|
| … | … | |
| 489 | 489 | hideInformationControl(); |
|---|
| 490 | 490 | break; |
|---|
| 491 | | |
|---|
| | 491 | |
|---|
| 492 | 492 | case DWT.MouseMove: |
|---|
| 493 | 493 | case DWT.MouseEnter: |
|---|
| … | … | |
| 500 | 500 | /** |
|---|
| 501 | 501 | * Handle mouse movement events. |
|---|
| 502 | | * |
|---|
| | 502 | * |
|---|
| 503 | 503 | * @param event the event |
|---|
| 504 | 504 | * @since 3.4 |
|---|
| 505 | 505 | */ |
|---|
| 506 | 506 | private void handleMouseMove(Event event) { |
|---|
| 507 | | // if cast(DEBUG) |
|---|
| | 507 | // if (DEBUG) |
|---|
| 508 | 508 | // System.out_.println("AbstractHoverInformationControl.Closer.handleMouseMove():" + event); //$NON-NLS-1$ |
|---|
| 509 | | |
|---|
| | 509 | |
|---|
| 510 | 510 | if (!(event.widget instanceof Control)) |
|---|
| 511 | 511 | return; |
|---|
| 512 | 512 | Control eventControl= cast(Control) event.widget; |
|---|
| 513 | | |
|---|
| | 513 | |
|---|
| 514 | 514 | //transform coordinates to subject control: |
|---|
| 515 | 515 | Point mouseLoc= event.display.map(eventControl, fSubjectControl, event.x, event.y); |
|---|
| 516 | | |
|---|
| | 516 | |
|---|
| 517 | 517 | if (fSubjectArea.contains(mouseLoc)) |
|---|
| 518 | 518 | return; |
|---|
| 519 | | |
|---|
| | 519 | |
|---|
| 520 | 520 | IInformationControl iControl= getCurrentInformationControl(); |
|---|
| 521 | 521 | if (!hasInformationControlReplacer() || !canMoveIntoInformationControl(iControl)) { |
|---|
| … | … | |
| 527 | 527 | return; |
|---|
| 528 | 528 | } |
|---|
| 529 | | |
|---|
| | 529 | |
|---|
| 530 | 530 | IInformationControlExtension3 iControl3= cast(IInformationControlExtension3) iControl; |
|---|
| 531 | 531 | Rectangle controlBounds= iControl3.getBounds(); |
|---|
| … | … | |
| 640 | 640 | if (fIsComputing || fIsInRestartMode || |
|---|
| 641 | 641 | (fSubjectControl !is null && !fSubjectControl.isDisposed() && fSubjectControl.getShell() !is fSubjectControl.getShell().getDisplay().getActiveShell())) { |
|---|
| 642 | | if cast(DEBUG) |
|---|
| | 642 | if (DEBUG) |
|---|
| 643 | 643 | System.out_.println("AbstractHoverInformationControlManager...mouseHover: @ " + event.x + "/" + event.y + " : hover cancelled: fIsComputing= " + fIsComputing + ", fIsInRestartMode= " + fIsInRestartMode); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ |
|---|
| 644 | 644 | return; |
|---|
| 645 | 645 | } |
|---|
| 646 | | |
|---|
| | 646 | |
|---|
| 647 | 647 | fIsInRestartMode= true; |
|---|
| 648 | 648 | fIsComputing= true; |
|---|
| … | … | |
| 674 | 674 | if (fIsComputing) |
|---|
| 675 | 675 | return; |
|---|
| 676 | | |
|---|
| | 676 | |
|---|
| 677 | 677 | fIsInRestartMode= false; |
|---|
| 678 | 678 | if (fSubjectControl !is null && !fSubjectControl.isDisposed()) { |
|---|
| … | … | |
| 780 | 780 | * The thread that delays replacing of the hover information control. |
|---|
| 781 | 781 | * To be accessed in the UI thread only! |
|---|
| 782 | | * |
|---|
| | 782 | * |
|---|
| 783 | 783 | * @since 3.4 |
|---|
| 784 | 784 | */ |
|---|
| 785 | 785 | private Job fReplacingDelayJob; |
|---|
| 786 | | |
|---|
| | 786 | |
|---|
| 787 | 787 | /** |
|---|
| 788 | 788 | * The {@link ITextViewerExtension8.EnrichMode}, may be <code>null</code>. |
|---|
| … | … | |
| 790 | 790 | */ |
|---|
| 791 | 791 | private EnrichMode fEnrichMode; |
|---|
| 792 | | |
|---|
| | 792 | |
|---|
| 793 | 793 | /** |
|---|
| 794 | 794 | * Indicates whether we have received a MouseDown event and are waiting for a MouseUp |
|---|
| … | … | |
| 797 | 797 | */ |
|---|
| 798 | 798 | private bool fWaitForMouseUp= false; |
|---|
| 799 | | |
|---|
| | 799 | |
|---|
| 800 | 800 | /** |
|---|
| 801 | 801 | * Creates a new hover information control manager using the given information control creator. |
|---|
| … | … | |
| 813 | 813 | * Tests whether a given mouse location is within the keep-up zone. |
|---|
| 814 | 814 | * The hover should not be hidden as long as the mouse stays inside this zone. |
|---|
| 815 | | * |
|---|
| | 815 | * |
|---|
| 816 | 816 | * @param x the x coordinate, relative to the <em>subject control</em> |
|---|
| 817 | 817 | * @param y the y coordinate, relative to the <em>subject control</em> |
|---|
| … | … | |
| 820 | 820 | * @param blowUp If <code>true</code>, then calculate for the closer, i.e. blow up the keepUp area. |
|---|
| 821 | 821 | * If <code>false</code>, then use tight bounds for hover detection. |
|---|
| 822 | | * |
|---|
| | 822 | * |
|---|
| 823 | 823 | * @return <code>true</code> iff the mouse event occurred in the keep-up zone |
|---|
| 824 | 824 | * @since 3.4 |
|---|
| … | … | |
| 827 | 827 | if (subjectArea.contains(x, y)) |
|---|
| 828 | 828 | return true; |
|---|
| 829 | | |
|---|
| | 829 | |
|---|
| 830 | 830 | IInformationControl iControl= getCurrentInformationControl(); |
|---|
| 831 | 831 | if (( cast(IInformationControlExtension5)iControl && !(cast(IInformationControlExtension5) iControl).isVisible())) { |
|---|
| … | … | |
| 840 | 840 | if ( cast(IInformationControlExtension3)iControl ) { |
|---|
| 841 | 841 | IInformationControlExtension3 iControl3= cast(IInformationControlExtension3) iControl; |
|---|
| 842 | | |
|---|
| | 842 | |
|---|
| 843 | 843 | Rectangle iControlBounds= subjectControl.getDisplay().map(null, subjectControl, iControl3.getBounds()); |
|---|
| 844 | 844 | Rectangle totalBounds= Geometry.copy(iControlBounds); |
|---|
| … | … | |
| 849 | 849 | Geometry.expand(totalBounds, margin, margin, margin, margin); |
|---|
| 850 | 850 | } |
|---|
| 851 | | |
|---|
| | 851 | |
|---|
| 852 | 852 | if (!blowUp) { |
|---|
| 853 | 853 | if (iControlBounds.contains(x, y)) |
|---|
| 854 | 854 | return true; |
|---|
| 855 | | |
|---|
| | 855 | |
|---|
| 856 | 856 | if (subjectArea.y + subjectArea.height < iControlBounds.y) { |
|---|
| 857 | 857 | // special case for hover events: subjectArea totally above iControl: |
|---|
| … | … | |
| 872 | 872 | } |
|---|
| 873 | 873 | return false; |
|---|
| 874 | | |
|---|
| | 874 | |
|---|
| 875 | 875 | } else if (iControlBounds.x + iControlBounds.width < subjectArea.x) { |
|---|
| 876 | 876 | // special case for hover events (e.g. in overview ruler): iControl totally left of subjectArea |
|---|
| … | … | |
| 888 | 888 | } |
|---|
| 889 | 889 | return false; |
|---|
| 890 | | |
|---|
| | 890 | |
|---|
| 891 | 891 | } else if (subjectArea.x + subjectArea.width < iControlBounds.x) { |
|---|
| 892 | 892 | // special case for hover events (e.g. in annotation ruler): subjectArea totally left of iControl |
|---|
| … | … | |
| 906 | 906 | } |
|---|
| 907 | 907 | } |
|---|
| 908 | | |
|---|
| | 908 | |
|---|
| 909 | 909 | // FIXME: should maybe use convex hull, not bounding box |
|---|
| 910 | 910 | totalBounds.add(subjectArea); |
|---|
| … | … | |
| 914 | 914 | return false; |
|---|
| 915 | 915 | } |
|---|
| 916 | | |
|---|
| | 916 | |
|---|
| 917 | 917 | /** |
|---|
| 918 | 918 | * Tests whether the given information control allows the mouse to be moved |
|---|
| 919 | 919 | * into it. |
|---|
| 920 | | * |
|---|
| | 920 | * |
|---|
| 921 | 921 | * @param iControl information control or <code>null</code> if none |
|---|
| 922 | 922 | * @return <code>true</code> if information control allows mouse move into |
|---|
| … | … | |
| 926 | 926 | return fEnrichMode !is null && canReplace(iControl); |
|---|
| 927 | 927 | } |
|---|
| 928 | | |
|---|
| | 928 | |
|---|
| 929 | 929 | /* |
|---|
| 930 | 930 | * @see dwtx.jface.text.AbstractInformationControlManager#hideInformationControl() |
|---|
| … | … | |
| 939 | 939 | * control replacer has been set with |
|---|
| 940 | 940 | * {@link #setInformationControlReplacer(InformationControlReplacer)} . |
|---|
| 941 | | * |
|---|
| | 941 | * |
|---|
| 942 | 942 | * @param mode the enrich mode |
|---|
| 943 | 943 | * @since 3.4 |
|---|
| … | … | |
| 947 | 947 | fEnrichMode= mode; |
|---|
| 948 | 948 | } |
|---|
| 949 | | |
|---|
| | 949 | |
|---|
| 950 | 950 | /* |
|---|
| 951 | 951 | * @see dwtx.jface.text.AbstractInformationControlManager#replaceInformationControl(bool) |
|---|
| … | … | |
| 955 | 955 | super.replaceInformationControl(takeFocus); |
|---|
| 956 | 956 | } |
|---|
| 957 | | |
|---|
| | 957 | |
|---|
| 958 | 958 | /** |
|---|
| 959 | 959 | * Cancels the replacing delay job. |
|---|
| … | … | |
| 965 | 965 | bool cancelled= fReplacingDelayJob.cancel(); |
|---|
| 966 | 966 | fReplacingDelayJob= null; |
|---|
| 967 | | // if cast(DEBUG) |
|---|
| | 967 | // if (DEBUG) |
|---|
| 968 | 968 | // System.out_.println("AbstractHoverInformationControlManager.cancelReplacingDelay(): cancelled=" + cancelled); //$NON-NLS-1$ |
|---|
| 969 | 969 | return cancelled; |
|---|
| 970 | 970 | } |
|---|
| 971 | | // if cast(DEBUG) |
|---|
| | 971 | // if (DEBUG) |
|---|
| 972 | 972 | // System.out_.println("AbstractHoverInformationControlManager.cancelReplacingDelay(): not delayed"); //$NON-NLS-1$ |
|---|
| 973 | 973 | return true; |
|---|
| 974 | 974 | } |
|---|
| 975 | | |
|---|
| | 975 | |
|---|
| 976 | 976 | /** |
|---|
| 977 | 977 | * Starts replacing the information control, considering the current |
|---|
| … | … | |
| 979 | 979 | * If set to {@link ITextViewerExtension8.EnrichMode#AFTER_DELAY}, this |
|---|
| 980 | 980 | * method cancels previous requests and restarts the delay timer. |
|---|
| 981 | | * |
|---|
| | 981 | * |
|---|
| 982 | 982 | * @param display the display to be used for the call to |
|---|
| 983 | 983 | * {@link #replaceInformationControl(bool)} in the UI thread |
|---|
| … | … | |
| 986 | 986 | if (fEnrichMode is EnrichMode.ON_CLICK) |
|---|
| 987 | 987 | return; |
|---|
| 988 | | |
|---|
| | 988 | |
|---|
| 989 | 989 | if (fReplacingDelayJob !is null) { |
|---|
| 990 | 990 | if (fReplacingDelayJob.getState() !is Job.RUNNING) { |
|---|
| … | … | |
| 995 | 995 | replaceInformationControl(false); |
|---|
| 996 | 996 | } else { |
|---|
| 997 | | // if cast(DEBUG) |
|---|
| | 997 | // if (DEBUG) |
|---|
| 998 | 998 | // System.out_.println("AbstractHoverInformationControlManager.startReplaceInformationControl(): rescheduled"); //$NON-NLS-1$ |
|---|
| 999 | 999 | fReplacingDelayJob.schedule(HOVER_AUTO_REPLACING_DELAY); |
|---|
| … | … | |
| 1003 | 1003 | return; |
|---|
| 1004 | 1004 | } |
|---|
| 1005 | | |
|---|
| | 1005 | |
|---|
| 1006 | 1006 | fReplacingDelayJob= new Job("AbstractHoverInformationControlManager Replace Delayer") { //$NON-NLS-1$ |
|---|
| 1007 | 1007 | public IStatus run(final IProgressMonitor monitor) { |
|---|
| … | … | |
| 1023 | 1023 | fReplacingDelayJob.setSystem(true); |
|---|
| 1024 | 1024 | fReplacingDelayJob.setPriority(Job.INTERACTIVE); |
|---|
| 1025 | | // if cast(DEBUG) |
|---|
| | 1025 | // if (DEBUG) |
|---|
| 1026 | 1026 | // System.out_.println("AbstractHoverInformationControlManager.startReplaceInformationControl(): scheduled"); //$NON-NLS-1$ |
|---|
| 1027 | 1027 | fReplacingDelayJob.schedule(HOVER_AUTO_REPLACING_DELAY); |
|---|
| … | … | |
| 1108 | 1108 | return fHoverEventStateMask; |
|---|
| 1109 | 1109 | } |
|---|
| 1110 | | |
|---|
| | 1110 | |
|---|
| 1111 | 1111 | /** |
|---|
| 1112 | 1112 | * Returns an adapter that gives access to internal methods. |
|---|
| 1113 | 1113 | * <p> |
|---|
| 1114 | 1114 | * <strong>Note:</strong> This method is not intended to be referenced or overridden by clients.</p> |
|---|
| 1115 | | * |
|---|
| | 1115 | * |
|---|
| 1116 | 1116 | * @return the replaceable information control accessor |
|---|
| 1117 | 1117 | * @since 3.4 |
|---|
| r133 |
r148 |
|
| 123 | 123 | if (binding is null) |
|---|
| 124 | 124 | return new String[0]; |
|---|
| 125 | | return new String[] { binding }; |
|---|
| | 125 | return [ binding ]; |
|---|
| 126 | 126 | } |
|---|
| 127 | 127 | |
|---|
| r147 |
r148 |
|
| 45 | 45 | class TextTemplateMessages { |
|---|
| 46 | 46 | |
|---|
| 47 | | private static const String RESOURCE_BUNDLE= TextTemplateMessages.class.getName(); |
|---|
| 48 | | private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE); |
|---|
| | 47 | // private static const String RESOURCE_BUNDLE= TextTemplateMessages.class.getName(); |
|---|
| | 48 | private static ResourceBundle fgResourceBundle;//= ResourceBundle.getBundle(RESOURCE_BUNDLE); |
|---|
| | 49 | |
|---|
| | 50 | static this() { |
|---|
| | 51 | fgResourceBundle = ResourceBundle.getBundle( |
|---|
| | 52 | getImportData!("dwtx.jface.text.templates.TextTemplateMessages.properties")); |
|---|
| | 53 | } |
|---|
| 49 | 54 | |
|---|
| 50 | 55 | private this() { |
|---|
| … | … | |
| 55 | 60 | return fgResourceBundle.getString(key); |
|---|
| 56 | 61 | } catch (MissingResourceException e) { |
|---|
| 57 | | return '!' + key + '!'; |
|---|
| | 62 | return '!' ~ key ~ '!'; |
|---|
| 58 | 63 | } |
|---|
| 59 | 64 | } |
|---|
| 60 | 65 | |
|---|
| 61 | | public static String getFormattedString(String key, Object arg) { |
|---|
| 62 | | return MessageFormat.format(getString(key), new Object[] { arg }); |
|---|
| 63 | | } |
|---|
| 64 | | |
|---|
| 65 | | |
|---|
| 66 | | public static String getFormattedString(String key, Object[] args) { |
|---|
| | 66 | public static String getFormattedString(String key, Object[] args... ) { |
|---|
| 67 | 67 | return MessageFormat.format(getString(key), args); |
|---|
| 68 | 68 | } |
|---|
| r147 |
r148 |
|
| 30 | 30 | class TemplatePersistenceMessages { |
|---|
| 31 | 31 | |
|---|
| 32 | | private static const String RESOURCE_BUNDLE= TemplatePersistenceMessages.class.getName(); |
|---|
| 33 | | private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE); |
|---|
| | 32 | // private static const String RESOURCE_BUNDLE= TemplatePersistenceMessages.class.getName(); |
|---|
| | 33 | private static ResourceBundle fgResourceBundle;//= ResourceBundle.getBundle(RESOURCE_BUNDLE); |
|---|
| | 34 | |
|---|
| | 35 | static this() { |
|---|
| | 36 | fgResourceBundle = ResourceBundle.getBundle( |
|---|
| | 37 | getImportData!("dwtx.jface.text.templates.persistence.TemplatePersistenceMessages.properties")); |
|---|
| | 38 | } |
|---|
| 34 | 39 | |
|---|
| 35 | 40 | private this() { |
|---|
| … | … | |
| 40 | 45 | return fgResourceBundle.getString(key); |
|---|
| 41 | 46 | } catch (MissingResourceException e) { |
|---|
| 42 | | return '!' + key + '!'; |
|---|
| | 47 | return '!' ~ key ~ '!'; |
|---|
| 43 | 48 | } |
|---|
| 44 | 49 | } |
|---|
| 45 | 50 | |
|---|
| 46 | | public static String getFormattedString(String key, Object arg) { |
|---|
| 47 | | return MessageFormat.format(getString(key), new Object[] { arg }); |
|---|
| 48 | | } |
|---|
| 49 | | |
|---|
| 50 | | public static String getFormattedString(String key, Object[] args) { |
|---|
| | 51 | public static String getFormattedString(String key, Object[] args...) { |
|---|
| 51 | 52 | return MessageFormat.format(getString(key), args); |
|---|
| 52 | 53 | } |
|---|
| r145 |
r148 |
|
| 331 | 331 | Assert.isTrue(false); |
|---|
| 332 | 332 | } catch (TransformerException e) { |
|---|
| 333 | | if (e.getException() instanceof IOException) |
|---|
| | 333 | if (cast(IOException)e.getException() ) |
|---|
| 334 | 334 | throw cast(IOException) e.getException(); |
|---|
| 335 | 335 | Assert.isTrue(false); |
|---|
| r146 |
r148 |
|
| 62 | 62 | * Set to <code>true</code> if property change events should be ignored (e.g. during writing |
|---|
| 63 | 63 | * to the preference store). |
|---|
| 64 | | * |
|---|
| | 64 | * |
|---|
| 65 | 65 | * @since 3.2 |
|---|
| 66 | 66 | */ |
|---|
| … | … | |
| 68 | 68 | /** |
|---|
| 69 | 69 | * The property listener, if any is registered, <code>null</code> otherwise. |
|---|
| 70 | | * |
|---|
| | 70 | * |
|---|
| 71 | 71 | * @since 3.2 |
|---|
| 72 | 72 | */ |
|---|
| … | … | |
| 116 | 116 | loadCustomTemplates(); |
|---|
| 117 | 117 | } |
|---|
| 118 | | |
|---|
| | 118 | |
|---|
| 119 | 119 | /** |
|---|
| 120 | 120 | * Starts listening for property changes on the preference store. If the configured preference |
|---|
| … | … | |
| 122 | 122 | * {@link #stopListeningForPreferenceChanges()} to remove any listener and stop the |
|---|
| 123 | 123 | * auto-updating behavior. |
|---|
| 124 | | * |
|---|
| | 124 | * |
|---|
| 125 | 125 | * @since 3.2 |
|---|
| 126 | 126 | */ |
|---|
| … | … | |
| 144 | 144 | fPreferenceStore.addPropertyChangeListener(fPropertyListener); |
|---|
| 145 | 145 | } |
|---|
| 146 | | |
|---|
| 147 | | } |
|---|
| 148 | | |
|---|
| | 146 | |
|---|
| | 147 | } |
|---|
| | 148 | |
|---|
| 149 | 149 | /** |
|---|
| 150 | 150 | * Stops the auto-updating behavior started by calling |
|---|
| 151 | 151 | * {@link #startListeningForPreferenceChanges()}. |
|---|
| 152 | | * |
|---|
| | 152 | * |
|---|
| 153 | 153 | * @since 3.2 |
|---|
| 154 | 154 | */ |
|---|
| … | … | |
| 159 | 159 | } |
|---|
| 160 | 160 | } |
|---|
| 161 | | |
|---|
| | 161 | |
|---|
| 162 | 162 | /** |
|---|
| 163 | 163 | * Handles an {@link IOException} thrown during reloading the preferences due to a preference |
|---|
| 164 | 164 | * store update. The default is to write to stderr. |
|---|
| 165 | | * |
|---|
| | 165 | * |
|---|
| 166 | 166 | * @param x the exception |
|---|
| 167 | 167 | * @since 3.2 |
|---|
| … | … | |
| 264 | 264 | * @param data the template to remove |
|---|
| 265 | 265 | */ |
|---|
| 266 | | public void delete(TemplatePersistenceData data) { |
|---|
| | 266 | public void delete_(TemplatePersistenceData data) { |
|---|
| 267 | 267 | if (data.isUserAdded()) |
|---|
| 268 | 268 | fTemplates.remove(data); |
|---|