diff dwtx/jface/internal/text/link/contentassist/ContentAssistant2.d @ 158:25f1f92fa3df

...
author Frank Benoit <benoit@tionex.de>
date Tue, 26 Aug 2008 02:46:34 +0200
parents f70d9508c95c
children 1a5b8f8129df
line wrap: on
line diff
--- a/dwtx/jface/internal/text/link/contentassist/ContentAssistant2.d	Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/internal/text/link/contentassist/ContentAssistant2.d	Tue Aug 26 02:46:34 2008 +0200
@@ -22,14 +22,9 @@
 import dwtx.jface.internal.text.link.contentassist.IContentAssistListener2; // packageimport
 import dwtx.jface.internal.text.link.contentassist.AdditionalInfoController2; // packageimport
 
-
 import dwt.dwthelper.utils;
-
 import dwtx.dwtxhelper.Collection;
-
-
-
-
+import tango.core.Thread;
 
 import dwt.DWT;
 import dwt.DWTError;
@@ -248,7 +243,8 @@
 
         protected void start(int showStyle) {
             fShowStyle= showStyle;
-            fThread= new Thread(this, ContentAssistMessages.getString("ContentAssistant.assist_delay_timer_name")); //$NON-NLS-1$
+            fThread= new Thread(&run);
+            fThread.name = ContentAssistMessages.getString("ContentAssistant.assist_delay_timer_name"); //$NON-NLS-1$
             fThread.start();
         }
 
@@ -326,7 +322,7 @@
                 start(showStyle);
         }
 
-        protected void showAssist(final int showStyle) {
+        protected void showAssist(int showStyle) {
             Control control= fViewer.getTextWidget();
             Display d= control.getDisplay();
             if (d !is null) {
@@ -636,7 +632,7 @@
          * @see VerifyKeyListener#verifyKey(dwt.events.VerifyEvent)
          */
         public void verifyKey(VerifyEvent e) {
-            IContentAssistListener2[] listeners= (IContentAssistListener2[]) fListeners.clone();
+            IContentAssistListener2[] listeners= arraycast!(IContentAssistListener2)( fListeners.clone());
             for (int i= 0; i < listeners.length; i++) {
                 if (listeners[i] !is null) {
                     if (!listeners[i].verifyKey(e) || !e.doit)
@@ -652,7 +648,7 @@
 
             installKeyListener();
 
-            IContentAssistListener2[] listeners= (IContentAssistListener2[])fListeners.clone();
+            IContentAssistListener2[] listeners= arraycast!(IContentAssistListener2)(fListeners.clone());
             for (int i= 0; i < listeners.length; i++) {
                 if (listeners[i] !is null) {
                     listeners[i].processEvent(event);
@@ -710,13 +706,13 @@
     private String[] fProposalStrings;
     private ICompletionProposal[] fProposals;
     private const List fProposalListeners= new ArrayList();
-    
+
     /**
      * Tells whether colored label support is enabled.
      * @since 3.4
      */
     private bool fIsColoredLabelsSupportEnabled= false;
-    
+
 
     /**
      * Creates a new content assistant. The content assistant is not automatically activated,
@@ -1573,10 +1569,10 @@
     public void addProposalListener(IProposalListener listener) {
         fProposalListeners.add(listener);
     }
-    
+
     /**
      * Tells whether the support for colored labels is enabled.
-     * 
+     *
      * @return <code>true</code> if the support for colored labels is enabled, <code>false</code> otherwise
      * @since 3.4
      */
@@ -1588,7 +1584,7 @@
      * Enables the support for colored labels in the proposal popup.
      * <p>Completion proposals can implement {@link ICompletionProposalExtension6}
      * to provide colored proposal labels.</p>
-     * 
+     *
      * @param isEnabled if <code>true</code> the support for colored labels is enabled in the proposal popup
      * @since 3.4
      */