Mercurial > projects > dwt-addons
comparison dwtx/jface/text/AbstractHoverInformationControlManager.d @ 156:a9566845f1cb
...
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 25 Aug 2008 19:03:46 +0200 |
parents | 5cf141e43417 |
children | 7926b636c282 |
comparison
equal
deleted
inserted
replaced
155:8442b6b2da2d | 156:a9566845f1cb |
---|---|
186 import dwtx.core.runtime.Status; | 186 import dwtx.core.runtime.Status; |
187 import dwtx.core.runtime.jobs.Job; | 187 import dwtx.core.runtime.jobs.Job; |
188 import dwtx.jface.internal.text.DelayedInputChangeListener; | 188 import dwtx.jface.internal.text.DelayedInputChangeListener; |
189 import dwtx.jface.internal.text.InformationControlReplacer; | 189 import dwtx.jface.internal.text.InformationControlReplacer; |
190 import dwtx.jface.internal.text.InternalAccessor; | 190 import dwtx.jface.internal.text.InternalAccessor; |
191 import dwtx.jface.text.ITextViewerExtension8.EnrichMode; | 191 import dwtx.jface.text.ITextViewerExtension8; |
192 import dwtx.jface.text.source.AnnotationBarHoverManager; | 192 import dwtx.jface.text.source.AnnotationBarHoverManager; |
193 import dwtx.jface.util.Geometry; | 193 import dwtx.jface.util.Geometry; |
194 | 194 |
195 | 195 |
196 /** | 196 /** |
980 * method cancels previous requests and restarts the delay timer. | 980 * method cancels previous requests and restarts the delay timer. |
981 * | 981 * |
982 * @param display the display to be used for the call to | 982 * @param display the display to be used for the call to |
983 * {@link #replaceInformationControl(bool)} in the UI thread | 983 * {@link #replaceInformationControl(bool)} in the UI thread |
984 */ | 984 */ |
985 private void startReplaceInformationControl(final Display display) { | 985 private void startReplaceInformationControl(Display display) { |
986 if (fEnrichMode is EnrichMode.ON_CLICK) | 986 if (fEnrichMode is EnrichMode.ON_CLICK) |
987 return; | 987 return; |
988 | 988 |
989 if (fReplacingDelayJob !is null) { | 989 if (fReplacingDelayJob !is null) { |
990 if (fReplacingDelayJob.getState() !is Job.RUNNING) { | 990 if (fReplacingDelayJob.getState() !is Job.RUNNING) { |
1001 } | 1001 } |
1002 } | 1002 } |
1003 return; | 1003 return; |
1004 } | 1004 } |
1005 | 1005 |
1006 fReplacingDelayJob= new class("AbstractHoverInformationControlManager Replace Delayer") Job { //$NON-NLS-1$ | 1006 fReplacingDelayJob= new class("AbstractHoverInformationControlManager Replace Delayer", display) Job { //$NON-NLS-1$ |
1007 this( String str ){ | 1007 Display display_; |
1008 this( String str, Display b){ | |
1008 super(str); | 1009 super(str); |
1010 display_=b; | |
1009 } | 1011 } |
1010 public IStatus run(IProgressMonitor monitor) { | 1012 public IStatus run(IProgressMonitor monitor) { |
1011 if (monitor.isCanceled() || display.isDisposed()) { | 1013 if (monitor.isCanceled() || display_.isDisposed()) { |
1012 return Status.CANCEL_STATUS; | 1014 return Status.CANCEL_STATUS; |
1013 } | 1015 } |
1014 display.syncExec(dgRunnable( (IProgressMonitor monitor_) { | 1016 display_.syncExec(dgRunnable( (IProgressMonitor monitor_) { |
1015 fReplacingDelayJob= null; | 1017 fReplacingDelayJob= null; |
1016 if (monitor_.isCanceled()) | 1018 if (monitor_.isCanceled()) |
1017 return; | 1019 return; |
1018 if (! fWaitForMouseUp) | 1020 if (! fWaitForMouseUp) |
1019 replaceInformationControl(false); | 1021 replaceInformationControl(false); |