diff dwtx/jface/text/AbstractLineTracker.d @ 159:7926b636c282

...
author Frank Benoit <benoit@tionex.de>
date Wed, 27 Aug 2008 01:57:58 +0200
parents f70d9508c95c
children 1a5b8f8129df
line wrap: on
line diff
--- a/dwtx/jface/text/AbstractLineTracker.d	Tue Aug 26 02:46:34 2008 +0200
+++ b/dwtx/jface/text/AbstractLineTracker.d	Wed Aug 27 01:57:58 2008 +0200
@@ -159,6 +159,17 @@
 import dwtx.dwtxhelper.Collection;
 
 
+    /**
+     * Combines the information of the occurrence of a line delimiter. <code>delimiterIndex</code>
+     * is the index where a line delimiter starts, whereas <code>delimiterLength</code>,
+     * indicates the length of the delimiter.
+     */
+    protected class DelimiterInfo {
+        public int delimiterIndex;
+        public int delimiterLength;
+        public String delimiter;
+    }
+    alias DelimiterInfo AbstractLineTracker_DelimiterInfo;
 
 /**
  * Abstract implementation of <code>ILineTracker</code>. It lets the definition of line
@@ -186,17 +197,6 @@
     private static const bool DEBUG= false;
 
     /**
-     * Combines the information of the occurrence of a line delimiter. <code>delimiterIndex</code>
-     * is the index where a line delimiter starts, whereas <code>delimiterLength</code>,
-     * indicates the length of the delimiter.
-     */
-    protected static class DelimiterInfo {
-        public int delimiterIndex;
-        public int delimiterLength;
-        public String delimiter;
-    }
-
-    /**
      * Representation of replace and set requests.
      *
      * @since 3.1
@@ -240,15 +240,18 @@
      *
      * @since 3.2
      */
-    private ILineTracker fDelegate= new class()  ListLineTracker {
-        public String[] getLegalLineDelimiters() {
-            return this.outer.getLegalLineDelimiters();
-        }
+    private ILineTracker fDelegate;
+    private void fDelegate_init() {
+        fDelegate = new class() ListLineTracker {
+            public String[] getLegalLineDelimiters() {
+                return this.outer.getLegalLineDelimiters();
+            }
 
-        protected DelimiterInfo nextDelimiterInfo(String text, int offset) {
-            return this.outer.nextDelimiterInfo(text, offset);
-        }
-    };
+            protected DelimiterInfo nextDelimiterInfo(String text, int offset) {
+                return this.outer.nextDelimiterInfo(text, offset);
+            }
+        };
+    }
     /**
      * Whether the delegate needs conversion when the line structure is modified.
      */
@@ -258,6 +261,7 @@
      * Creates a new line tracker.
      */
     protected this() {
+        fDelegate_init();
     }
 
     /*