diff dwtx/jface/text/TextViewerHoverManager.d @ 161:f8d52b926852

...
author Frank Benoit <benoit@tionex.de>
date Wed, 27 Aug 2008 14:49:30 +0200
parents 7926b636c282
children 1a5b8f8129df
line wrap: on
line diff
--- a/dwtx/jface/text/TextViewerHoverManager.d	Wed Aug 27 02:07:22 2008 +0200
+++ b/dwtx/jface/text/TextViewerHoverManager.d	Wed Aug 27 14:49:30 2008 +0200
@@ -227,11 +227,13 @@
     public this(TextViewer textViewer, IInformationControlCreator creator) {
         super(creator);
         fTextViewer= textViewer;
-        fStopper= new class()  ITextListener {
+        fStopper= new class() ITextListener {
             public void textChanged(TextEvent event) {
                 synchronized (fMutex) {
                     if (fThread !is null) {
-                        fThread.interrupt();
+implMissing(__FILE__,__LINE__);
+// DWT FIXME: how to handle Thread.interrupt?
+//                         fThread.interrupt();
                         fThread= null;
                     }
                 }
@@ -264,37 +266,37 @@
     protected void computeInformation() {
 
         if (!fProcessMouseHoverEvent) {
-            setInformation(null, null);
+            setInformation(cast(Object)null, null);
             return;
         }
 
         Point location= getHoverEventLocation();
         int offset= computeOffsetAtLocation(location.x, location.y);
         if (offset is -1) {
-            setInformation(null, null);
+            setInformation(cast(Object)null, null);
             return;
         }
 
-        final ITextHover hover= fTextViewer.getTextHover(offset, getHoverEventStateMask());
+        final ITextHover hover= fTextViewer.getTextHover_package(offset, getHoverEventStateMask());
         if (hover is null) {
-            setInformation(null, null);
+            setInformation(cast(Object)null, null);
             return;
         }
 
         final IRegion region= hover.getHoverRegion(fTextViewer, offset);
         if (region is null) {
-            setInformation(null, null);
+            setInformation(cast(Object)null, null);
             return;
         }
 
         final Rectangle area= JFaceTextUtil.computeArea(region, fTextViewer);
         if (area is null || area.isEmpty()) {
-            setInformation(null, null);
+            setInformation(cast(Object)null, null);
             return;
         }
 
         if (fThread !is null) {
-            setInformation(null, null);
+            setInformation(cast(Object)null, null);
             return;
         }
 
@@ -308,7 +310,7 @@
                             if ( cast(ITextHoverExtension2)hover )
                                 information= (cast(ITextHoverExtension2)hover).getHoverInfo2(fTextViewer, region);
                             else
-                                information= hover.getHoverInfo(fTextViewer, region);
+                                information= stringcast(hover.getHoverInfo(fTextViewer, region));
                         } catch (ArrayIndexOutOfBoundsException x) {
                             /*
                              * This code runs in a separate thread which can
@@ -327,7 +329,7 @@
                         if (information !is null)
                             fTextHover= hover;
                     } else {
-                        setInformation(null, null);
+                        setInformation(cast(Object)null, null);
                     }
                     hasFinished= true;
                 } catch (RuntimeException ex) {
@@ -341,7 +343,7 @@
                         fThread= null;
                         // https://bugs.eclipse.org/bugs/show_bug.cgi?id=44756
                         if (!hasFinished)
-                            setInformation(null, null);
+                            setInformation(cast(Object)null, null);
                     }
                 }
             }