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

...
author Frank Benoit <benoit@tionex.de>
date Wed, 27 Aug 2008 01:57:58 +0200
parents f70d9508c95c
children
line wrap: on
line diff
--- a/dwtx/jface/text/source/VerticalRuler.d	Tue Aug 26 02:46:34 2008 +0200
+++ b/dwtx/jface/text/source/VerticalRuler.d	Wed Aug 27 01:57:58 2008 +0200
@@ -164,7 +164,7 @@
     /** The line of the last mouse button activity */
     private int fLastMouseButtonActivityLine= -1;
     /** The internal listener */
-    private InternalListener fInternalListener= new InternalListener();
+    private InternalListener fInternalListener;
     /** The width of this vertical ruler */
     private int fWidth;
     /**
@@ -191,6 +191,9 @@
      * @since 3.0
      */
     public this(int width, IAnnotationAccess annotationAcccess) {
+
+        fInternalListener= new InternalListener();
+
         fWidth= width;
         fAnnotationAccess= annotationAcccess;
     }
@@ -412,10 +415,10 @@
 
                     r.x= 0;
                     r.y= JFaceTextUtil.computeLineHeight(styledText, 0, startLine, startLine)  - fScrollPos;
-                    
+
                     r.width= d.x;
                     int lines= endLine - startLine;
-                    
+
                     r.height= JFaceTextUtil.computeLineHeight(styledText, startLine, endLine + 1, (lines+1));
 
                     if (r.y < d.y && annotationAccessExtension !is null)  // annotation within visible area
@@ -490,10 +493,10 @@
 
                 r.x= 0;
                 r.y= JFaceTextUtil.computeLineHeight(textWidget, 0, startLine, startLine)  - fScrollPos;
-                
+
                 r.width= dimension.x;
                 int lines= endLine - startLine;
-                
+
                 r.height= JFaceTextUtil.computeLineHeight(textWidget, startLine, endLine + 1, lines+1);
 
                 if (r.y < dimension.y && annotationAccessExtension !is null)  // annotation within visible area
@@ -586,13 +589,13 @@
 
         StyledText text= fTextViewer.getTextWidget();
         int line= text.getLineIndex(y_coordinate);
-        
+
         if (line is text.getLineCount() - 1) {
             // check whether y_coordinate exceeds last line
             if (y_coordinate > text.getLinePixel(line + 1))
                 return -1;
         }
-        
+
         return widgetLine2ModelLine(fTextViewer, line);
     }