Mercurial > projects > dwt-addons
comparison dwtx/jface/text/TextViewerHoverManager.d @ 140:26688fec6d23
Following dsss compile errors
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 24 Aug 2008 03:23:46 +0200 |
parents | b6bad70d540a |
children | 75302ef3f92f |
comparison
equal
deleted
inserted
replaced
139:93a6ec48fd28 | 140:26688fec6d23 |
---|---|
299 if (fThread !is null) { | 299 if (fThread !is null) { |
300 setInformation(null, null); | 300 setInformation(null, null); |
301 return; | 301 return; |
302 } | 302 } |
303 | 303 |
304 fThread= new Thread("Text Viewer Hover Presenter") { //$NON-NLS-1$ | 304 void threadrun() { |
305 public void run() { | |
306 // http://bugs.eclipse.org/bugs/show_bug.cgi?id=17693 | 305 // http://bugs.eclipse.org/bugs/show_bug.cgi?id=17693 |
307 bool hasFinished= false; | 306 bool hasFinished= false; |
308 try { | 307 try { |
309 if (fThread !is null) { | 308 if (fThread !is null) { |
310 Object information; | 309 Object information; |
347 if (!hasFinished) | 346 if (!hasFinished) |
348 setInformation(null, null); | 347 setInformation(null, null); |
349 } | 348 } |
350 } | 349 } |
351 } | 350 } |
352 }; | 351 fThread= new Thread( &threadrun ); |
353 | 352 fThread.name = "Text Viewer Hover Presenter"; //$NON-NLS-1$ |
354 fThread.setDaemon(true); | 353 |
354 fThread.isDaemon(true); | |
355 fThread.setPriority(Thread.MIN_PRIORITY); | 355 fThread.setPriority(Thread.MIN_PRIORITY); |
356 synchronized (fMutex) { | 356 synchronized (fMutex) { |
357 fTextViewer.addTextListener(fStopper); | 357 fTextViewer.addTextListener(fStopper); |
358 fThread.start(); | 358 fThread.start(); |
359 } | 359 } |
427 */ | 427 */ |
428 protected void showInformationControl(Rectangle subjectArea) { | 428 protected void showInformationControl(Rectangle subjectArea) { |
429 if (fTextViewer !is null && fTextViewer.requestWidgetToken(this, WIDGET_PRIORITY)) | 429 if (fTextViewer !is null && fTextViewer.requestWidgetToken(this, WIDGET_PRIORITY)) |
430 super.showInformationControl(subjectArea); | 430 super.showInformationControl(subjectArea); |
431 else | 431 else |
432 if cast(DEBUG) | 432 if (DEBUG) |
433 System.out.println("TextViewerHoverManager#showInformationControl(..) did not get widget token"); //$NON-NLS-1$ | 433 System.out_.println("TextViewerHoverManager#showInformationControl(..) did not get widget token"); //$NON-NLS-1$ |
434 } | 434 } |
435 | 435 |
436 /* | 436 /* |
437 * @see dwtx.jface.text.AbstractInformationControlManager#hideInformationControl() | 437 * @see dwtx.jface.text.AbstractInformationControlManager#hideInformationControl() |
438 */ | 438 */ |
443 } finally { | 443 } finally { |
444 if (fTextViewer !is null) | 444 if (fTextViewer !is null) |
445 fTextViewer.releaseWidgetToken(this); | 445 fTextViewer.releaseWidgetToken(this); |
446 } | 446 } |
447 } | 447 } |
448 | 448 |
449 /* | 449 /* |
450 * @see dwtx.jface.text.AbstractInformationControlManager#replaceInformationControl(bool) | 450 * @see dwtx.jface.text.AbstractInformationControlManager#replaceInformationControl(bool) |
451 * @since 3.4 | 451 * @since 3.4 |
452 */ | 452 */ |
453 void replaceInformationControl(bool takeFocus) { | 453 void replaceInformationControl(bool takeFocus) { |
495 * @since 3.0 | 495 * @since 3.0 |
496 */ | 496 */ |
497 public bool setFocus(IWidgetTokenOwner owner) { | 497 public bool setFocus(IWidgetTokenOwner owner) { |
498 if (! hasInformationControlReplacer()) | 498 if (! hasInformationControlReplacer()) |
499 return false; | 499 return false; |
500 | 500 |
501 IInformationControl iControl= getCurrentInformationControl(); | 501 IInformationControl iControl= getCurrentInformationControl(); |
502 if (canReplace(iControl)) { | 502 if (canReplace(iControl)) { |
503 if (cancelReplacingDelay()) | 503 if (cancelReplacingDelay()) |
504 replaceInformationControl(true); | 504 replaceInformationControl(true); |
505 | 505 |
506 return true; | 506 return true; |
507 } | 507 } |
508 | 508 |
509 return false; | 509 return false; |
510 } | 510 } |
511 | 511 |
512 /** | 512 /** |
513 * Returns the currently shown text hover or <code>null</code> if no text | 513 * Returns the currently shown text hover or <code>null</code> if no text |