Mercurial > projects > dwt-addons
diff dwtx/jface/text/source/OverviewRuler.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/source/OverviewRuler.d Tue Aug 26 02:46:34 2008 +0200 +++ b/dwtx/jface/text/source/OverviewRuler.d Wed Aug 27 01:57:58 2008 +0200 @@ -368,7 +368,7 @@ /** The buffer for double buffering */ private Image fBuffer; /** The internal listener */ - private InternalListener fInternalListener= new InternalListener(); + private InternalListener fInternalListener; /** The width of this vertical ruler */ private int fWidth; /** The hit detection cursor */ @@ -387,14 +387,14 @@ * The list of annotation types to be shown in this ruler. * @since 3.0 */ - private Set fConfiguredAnnotationTypes= new HashSet(); + private Set fConfiguredAnnotationTypes; /** * The list of annotation types to be shown in the header of this ruler. * @since 3.0 */ - private Set fConfiguredHeaderAnnotationTypes= new HashSet(); + private Set fConfiguredHeaderAnnotationTypes; /** The mapping between annotation types and colors */ - private Map fAnnotationTypes2Colors= new HashMap(); + private Map fAnnotationTypes2Colors; /** The color manager */ private ISharedTextColors fSharedTextColors; /** @@ -402,38 +402,38 @@ * * @since 3.0 */ - private List fAnnotationsSortedByLayer= new ArrayList(); + private List fAnnotationsSortedByLayer; /** * All available layers sorted by layer. * This list may contain duplicates. * @since 3.0 */ - private List fLayersSortedByLayer= new ArrayList(); + private List fLayersSortedByLayer; /** * Map of allowed annotation types. * An allowed annotation type maps to <code>true</code>, a disallowed * to <code>false</code>. * @since 3.0 */ - private Map fAllowedAnnotationTypes= new HashMap(); + private Map fAllowedAnnotationTypes; /** * Map of allowed header annotation types. * An allowed annotation type maps to <code>true</code>, a disallowed * to <code>false</code>. * @since 3.0 */ - private Map fAllowedHeaderAnnotationTypes= new HashMap(); + private Map fAllowedHeaderAnnotationTypes; /** * The cached annotations. * @since 3.0 */ - private List fCachedAnnotations= new ArrayList(); + private List fCachedAnnotations; /** * Redraw runnable lock * @since 3.3 */ - private Object fRunnableLock= new Object(); + private Object fRunnableLock; /** * Redraw runnable state * @since 3.3 @@ -443,15 +443,7 @@ * Redraw runnable * @since 3.3 */ - private Runnable fRunnable= new class() Runnable { - public void run() { - synchronized (fRunnableLock) { - fIsRunnablePosted= false; - } - redraw(); - updateHeader(); - } - }; + private Runnable fRunnable; /** * Tells whether temporary annotations are drawn with * a separate color. This color will be computed by @@ -488,6 +480,25 @@ * @since 3.4 */ public this(IAnnotationAccess annotationAccess, int width, ISharedTextColors sharedColors, bool discolorTemporaryAnnotation) { + // DWT instance init + fInternalListener= new InternalListener(); + fConfiguredAnnotationTypes= new HashSet(); + fConfiguredHeaderAnnotationTypes= new HashSet(); + fAnnotationTypes2Colors= new HashMap(); + fAnnotationsSortedByLayer= new ArrayList(); + fLayersSortedByLayer= new ArrayList(); + fAllowedAnnotationTypes= new HashMap(); + fAllowedHeaderAnnotationTypes= new HashMap(); + fCachedAnnotations= new ArrayList(); + fRunnableLock= new Object(); + fRunnable= dgRunnable( { + synchronized (fRunnableLock) { + fIsRunnablePosted= false; + } + redraw(); + updateHeader(); + }); + fAnnotationAccess= annotationAccess; fWidth= width; fSharedTextColors= sharedColors;