diff dwtx/jface/text/source/MatchingCharacterPainter.d @ 162:1a5b8f8129df

...
author Frank Benoit <benoit@tionex.de>
date Mon, 08 Sep 2008 00:51:37 +0200
parents b6bad70d540a
children
line wrap: on
line diff
--- a/dwtx/jface/text/source/MatchingCharacterPainter.d	Wed Aug 27 14:49:30 2008 +0200
+++ b/dwtx/jface/text/source/MatchingCharacterPainter.d	Mon Sep 08 00:51:37 2008 +0200
@@ -120,7 +120,7 @@
     /** The strategy for finding matching characters */
     private ICharacterPairMatcher fMatcher;
     /** The position tracking the matching characters */
-    private Position fPairPosition= new Position(0, 0);
+    private Position fPairPosition;
     /** The anchor indicating whether the character is left or right of the caret */
     private int fAnchor;
 
@@ -135,6 +135,7 @@
      * @param matcher
      */
     public this(ISourceViewer sourceViewer, ICharacterPairMatcher matcher) {
+        fPairPosition= new Position(0, 0);
         fSourceViewer= sourceViewer;
         fMatcher= matcher;
         fTextWidget= sourceViewer.getTextWidget();
@@ -244,7 +245,7 @@
         if (gc !is null) {
 
             gc.setForeground(fColor);
-            
+
             Rectangle bounds;
             if (length > 0)
                 bounds= fTextWidget.getTextBounds(offset, offset + length - 1);
@@ -252,7 +253,7 @@
                 Point loc= fTextWidget.getLocationAtOffset(offset);
                 bounds= new Rectangle(loc.x, loc.y, 1, fTextWidget.getLineHeight(offset));
             }
-            
+
             // draw box around line segment
             gc.drawRectangle(bounds.x, bounds.y, bounds.width - 1, bounds.height - 1);
 
@@ -308,7 +309,7 @@
                 // remove old highlighting
                 handleDrawRequest(null);
                 // update position
-                fPairPosition.isDeleted= false;
+                fPairPosition.isDeleted_= false;
                 fPairPosition.offset= pair.getOffset();
                 fPairPosition.length= pair.getLength();
                 fAnchor= fMatcher.getAnchor();
@@ -320,7 +321,7 @@
 
             fIsActive= true;
 
-            fPairPosition.isDeleted= false;
+            fPairPosition.isDeleted_= false;
             fPairPosition.offset= pair.getOffset();
             fPairPosition.length= pair.getLength();
             fAnchor= fMatcher.getAnchor();