diff dwtx/jface/text/reconciler/AbstractReconciler.d @ 158:25f1f92fa3df

...
author Frank Benoit <benoit@tionex.de>
date Tue, 26 Aug 2008 02:46:34 +0200
parents 7d818bd32d63
children 1a5b8f8129df
line wrap: on
line diff
--- a/dwtx/jface/text/reconciler/AbstractReconciler.d	Mon Aug 25 19:06:44 2008 +0200
+++ b/dwtx/jface/text/reconciler/AbstractReconciler.d	Tue Aug 26 02:46:34 2008 +0200
@@ -27,7 +27,7 @@
 
 
 import dwt.dwthelper.utils;
-
+import tango.core.Thread;
 
 import dwtx.core.runtime.Assert;
 import dwtx.core.runtime.IProgressMonitor;
@@ -68,7 +68,8 @@
     /**
      * Background thread for the reconciling activity.
      */
-    class BackgroundThread : Thread {
+    class BackgroundThread {
+        Thread thread;
 
         /** Has the reconciler been canceled. */
         private bool fCanceled= false;
@@ -86,9 +87,14 @@
          * @param name the thread's name
          */
         public this(String name) {
-            super(name);
-            setPriority(Thread.MIN_PRIORITY);
-            setDaemon(true);
+            thread = new Thread( &run );
+            thread.name = name;
+            thread.priority = Thread.MIN_PRIORITY;
+            thread.isDaemon(true);
+        }
+
+        public void start(){
+            thread.start();
         }
 
         /**
@@ -398,7 +404,7 @@
     public void setIsIncrementalReconciler(bool isIncremental) {
         fIsIncrementalReconciler= isIncremental;
     }
-    
+
     /**
      * Tells the reconciler whether it is allowed to change the document
      * inside its reconciler thread.
@@ -527,11 +533,11 @@
             if (e.getLength() is 0 && e.getText() !is null) {
                 // Insert
                 fDirtyRegionQueue.addDirtyRegion(new DirtyRegion(e.getOffset(), e.getText().length(), DirtyRegion.INSERT, e.getText()));
-    
+
             } else if (e.getText() is null || e.getText().length() is 0) {
                 // Remove
                 fDirtyRegionQueue.addDirtyRegion(new DirtyRegion(e.getOffset(), e.getLength(), DirtyRegion.REMOVE, null));
-    
+
             } else {
                 // Replace (Remove + Insert)
                 fDirtyRegionQueue.addDirtyRegion(new DirtyRegion(e.getOffset(), e.getLength(), DirtyRegion.REMOVE, null));
@@ -572,7 +578,7 @@
 
             if (fThread.isActive())
                 fProgressMonitor.setCanceled(true);
-            
+
             if (fIsIncrementalReconciler) {
                 DocumentEvent e= new DocumentEvent(fDocument, 0, fDocument.getLength(), fDocument.get());
                 createDirtyRegion(e);
@@ -609,11 +615,11 @@
      */
     protected void reconcilerReset() {
     }
-    
+
     /**
      * Tells whether the code is running in this reconciler's
      * background thread.
-     * 
+     *
      * @return <code>true</code> if running in this reconciler's background thread
      * @since 3.4
      */