changeset 145:02cd5f1224d3

...
author Frank Benoit <benoit@tionex.de>
date Sun, 24 Aug 2008 22:31:00 +0200
parents 16a71f577815
children 75302ef3f92f
files dwtx/jface/text/AbstractReusableInformationControlCreator.d dwtx/jface/text/formatter/FormattingContext.d dwtx/jface/text/source/AnnotationBarHoverManager.d dwtx/jface/text/source/AnnotationMap.d dwtx/jface/text/source/AnnotationModel.d dwtx/jface/text/source/AnnotationPainter.d dwtx/jface/text/source/CompositeRuler.d dwtx/jface/text/source/DefaultAnnotationHover.d dwtx/jface/text/source/ImageUtilities.d dwtx/jface/text/source/OverviewRuler.d dwtx/jface/text/source/SourceViewer.d dwtx/jface/text/source/SourceViewerConfiguration.d dwtx/jface/text/source/VisualAnnotationModel.d dwtx/jface/text/source/projection/ProjectionAnnotation.d dwtx/jface/text/source/projection/ProjectionSupport.d dwtx/jface/text/source/projection/ProjectionViewer.d dwtx/jface/text/templates/DocumentTemplateContext.d dwtx/jface/text/templates/JFaceTextTemplateMessages.d dwtx/jface/text/templates/Template.d dwtx/jface/text/templates/TemplateCompletionProcessor.d dwtx/jface/text/templates/TemplateContext.d dwtx/jface/text/templates/TemplateProposal.d dwtx/jface/text/templates/TemplateTranslator.d dwtx/jface/text/templates/TemplateVariable.d dwtx/jface/text/templates/persistence/TemplatePersistenceData.d dwtx/jface/text/templates/persistence/TemplateReaderWriter.d dwtx/jface/text/templates/persistence/TemplateStore.d
diffstat 27 files changed, 387 insertions(+), 390 deletions(-) [+]
line wrap: on
line diff
--- a/dwtx/jface/text/AbstractReusableInformationControlCreator.d	Sun Aug 24 21:34:15 2008 +0200
+++ b/dwtx/jface/text/AbstractReusableInformationControlCreator.d	Sun Aug 24 22:31:00 2008 +0200
@@ -167,7 +167,7 @@
 
 /**
  * Abstract class for a reusable information control creators.
- * 
+ *
  * @since 3.3
  */
 public abstract class AbstractReusableInformationControlCreator : IInformationControlCreator, IInformationControlCreatorExtension, DisposeListener {
@@ -176,7 +176,7 @@
 
     /**
      * Creates the control.
-     * 
+     *
      * @param parent the parent shell
      * @return the created information control
      */
@@ -191,16 +191,16 @@
             control= doCreateInformationControl(parent);
             control.addDisposeListener(this);
             fInformationControls.put(parent, control);
-        }           
+        }
         return control;
     }
-    
+
     /*
      * @see dwt.events.DisposeListener#widgetDisposed(dwt.events.DisposeEvent)
      */
     public void widgetDisposed(DisposeEvent e) {
         Composite parent= null;
-        if (e.widget instanceof Shell)
+        if (cast(Shell)e.widget )
             parent= (cast(Shell)e.widget).getParent();
         if ( cast(Shell)parent )
             fInformationControls.remove(parent);
--- a/dwtx/jface/text/formatter/FormattingContext.d	Sun Aug 24 21:34:15 2008 +0200
+++ b/dwtx/jface/text/formatter/FormattingContext.d	Sun Aug 24 22:31:00 2008 +0200
@@ -52,8 +52,7 @@
      * @see dwtx.jface.text.formatter.IFormattingContext#getPreferenceKeys()
      */
     public String[] getPreferenceKeys() {
-        return new String[] {
-        };
+        return null;
     }
 
     /*
--- a/dwtx/jface/text/source/AnnotationBarHoverManager.d	Sun Aug 24 21:34:15 2008 +0200
+++ b/dwtx/jface/text/source/AnnotationBarHoverManager.d	Sun Aug 24 22:31:00 2008 +0200
@@ -126,7 +126,7 @@
 
     /**
      * The information control closer for the hover information. Closes the information control as soon as the mouse pointer leaves the subject area, a mouse button is pressed, the user presses a key, or the subject control is resized or moved.
-     * 
+     *
      * @since 3.0
      * @deprecated As of 3.4, no longer used as closer from super class is used
      */
@@ -190,7 +190,7 @@
                 fSubjectControl.getShell().addShellListener(this);
                 fSubjectControl.addControlListener(this);
                 fSubjectControl.addKeyListener(this);
-                
+
                 fDisplay= fSubjectControl.getDisplay();
                 if (!fDisplay.isDisposed() && fHideOnMouseWheel) {
                     fHasWheelFilter= true;
@@ -216,18 +216,18 @@
                 fSubjectControl.removeControlListener(this);
                 fSubjectControl.removeKeyListener(this);
             }
-            
+
             if (fDisplay !is null && !fDisplay.isDisposed() && fHasWheelFilter)
                 fDisplay.removeFilter(DWT.MouseWheel, this);
             fHasWheelFilter= false;
-            
+
             fDisplay= null;
-            
+
         }
 
         /**
          * Stops the information control and if <code>delayRestart</code> is set allows restart only after a certain delay.
-         * 
+         *
          * @param delayRestart <code>true</code> if restart should be delayed
          * @deprecated As of 3.4, replaced by {@link #stop()}. Note that <code>delayRestart</code> was never honored.
          */
@@ -262,7 +262,7 @@
         public void mouseDoubleClick(MouseEvent event) {
             hideInformationControl();
         }
-        
+
         /*
          * @see dwt.widgets.Listener#handleEvent(dwt.widgets.Event)
          * @since 3.2
@@ -364,11 +364,11 @@
     protected bool fAllowMouseExit= false;
     /**
      * Whether we should hide the over on mouse wheel action.
-     * 
+     *
      * @since 3.2
      */
     private bool fHideOnMouseWheel= true;
-    
+
     /**
      * The current annotation hover.
      * @since 3.2
@@ -443,7 +443,7 @@
         }
 
     }
-    
+
     /*
      * @see dwtx.jface.text.AbstractInformationControlManager#showInformationControl(dwt.graphics.Rectangle)
      * @since 3.2
@@ -452,7 +452,7 @@
         super.showInformationControl(subjectArea);
         fCurrentHover= getHover(getHoverEvent());
     }
-    
+
     /*
      * @see dwtx.jface.text.AbstractInformationControlManager#hideInformationControl()
      * @since 3.2
@@ -533,11 +533,11 @@
             Rectangle size= text.getClientArea();
             Rectangle trim= text.computeTrim(0, 0, 0, 0);
             int height= size.height - trim.height;
-            
+
             int lines= JFaceTextUtil.getLineIndex(text, height) - text.getTopIndex();
-            
+
             int bottomLine= topLine + lines;
-            
+
             int rangeBottomLine= getWidgetLineNumber(lineRange.getStartLine() + lineRange.getNumberOfLines() - 1);
             int bottomDelta= Math.max(rangeBottomLine - bottomLine, 0);
 
@@ -808,7 +808,7 @@
      * <p>
      * <strong>Note:</strong> This method is not intended to be referenced or overridden by clients.
      * </p>
-     * 
+     *
      * @return the replaceable information control accessor
      * @since 3.4
      * @noreference This method is not intended to be referenced by clients.
@@ -817,41 +817,44 @@
     public InternalAccessor getInternalAccessor() {
         return new class()  InternalAccessor {
             public IInformationControl getCurrentInformationControl() {
-                return AnnotationBarHoverManager.super.getInternalAccessor().getCurrentInformationControl();
+                return outer.superGetInternalAccessor().getCurrentInformationControl();
             }
-            
+
             public void setInformationControlReplacer(InformationControlReplacer replacer) {
-                AnnotationBarHoverManager.super.getInternalAccessor().setInformationControlReplacer(replacer);
+                outer.superGetInternalAccessor().setInformationControlReplacer(replacer);
             }
-            
+
             public InformationControlReplacer getInformationControlReplacer() {
-                return AnnotationBarHoverManager.super.getInternalAccessor().getInformationControlReplacer();
+                return outer.superGetInternalAccessor().getInformationControlReplacer();
             }
-            
+
             public bool canReplace(IInformationControl control) {
-                return AnnotationBarHoverManager.super.getInternalAccessor().canReplace(control);
+                return outer.superGetInternalAccessor().canReplace(control);
             }
-            
+
             public bool isReplaceInProgress() {
-                return AnnotationBarHoverManager.super.getInternalAccessor().isReplaceInProgress();
+                return outer.superGetInternalAccessor().isReplaceInProgress();
             }
-            
+
             public void replaceInformationControl(bool takeFocus) {
-                AnnotationBarHoverManager.super.getInternalAccessor().replaceInformationControl(takeFocus);
+                outer.superGetInternalAccessor().replaceInformationControl(takeFocus);
             }
 
             public void cropToClosestMonitor(Rectangle bounds) {
-                AnnotationBarHoverManager.super.getInternalAccessor().cropToClosestMonitor(bounds);
+                outer.superGetInternalAccessor().cropToClosestMonitor(bounds);
             }
-            
+
             public void setHoverEnrichMode(EnrichMode mode) {
-                AnnotationBarHoverManager.super.getInternalAccessor().setHoverEnrichMode(mode);
+                outer.superGetInternalAccessor().setHoverEnrichMode(mode);
             }
-            
+
             public bool getAllowMouseExit() {
                 return fAllowMouseExit;
             }
         };
     }
+    private InternalAccessor superGetInternalAccessor() {
+        return super.getInternalAccessor();
+    }
 }
 
--- a/dwtx/jface/text/source/AnnotationMap.d	Sun Aug 24 21:34:15 2008 +0200
+++ b/dwtx/jface/text/source/AnnotationMap.d	Sun Aug 24 22:31:00 2008 +0200
@@ -137,7 +137,7 @@
      */
     public Iterator valuesIterator() {
         synchronized (getLockObject()) {
-            return new ArrayList(fInternalMap.values()).iterator();
+            return (new ArrayList(fInternalMap.values())).iterator();
         }
     }
 
@@ -146,7 +146,7 @@
      */
     public Iterator keySetIterator() {
         synchronized (getLockObject()) {
-            return new ArrayList(fInternalMap.keySet()).iterator();
+            return (new ArrayList(fInternalMap.keySet())).iterator();
         }
     }
 
--- a/dwtx/jface/text/source/AnnotationModel.d	Sun Aug 24 21:34:15 2008 +0200
+++ b/dwtx/jface/text/source/AnnotationModel.d	Sun Aug 24 22:31:00 2008 +0200
@@ -109,26 +109,26 @@
 
     /**
      * Iterator that returns the annotations for a given region.
-     * 
+     *
      * @since 3.4
      * @see AnnotationModel.RegionIterator#RegionIterator(Iterator, IAnnotationModel, int, int, bool, bool)
      */
     private static final class RegionIterator : Iterator {
-        
+
         private final Iterator fParentIterator;
         private final bool fCanEndAfter;
         private final bool fCanStartBefore;
         private final IAnnotationModel fModel;
         private Object fNext;
         private Position fRegion;
-        
+
         /**
          * Iterator that returns all annotations from the parent iterator which
          * have a position in the given model inside the given region.
          * <p>
          * See {@link IAnnotationModelExtension2} for a definition of inside.
          * </p>
-         * 
+         *
          * @param parentIterator iterator containing all annotations
          * @param model the model to use to retrieve positions from for each
          *            annotation
@@ -146,33 +146,33 @@
             fCanStartBefore= canStartBefore;
             fNext= findNext();
         }
-        
+
         /*
          * @see java.util.Iterator#hasNext()
          */
         public bool hasNext() {
             return fNext !is null;
         }
-        
+
         /*
          * @see java.util.Iterator#next()
          */
         public Object next() {
             if (!hasNext())
                 throw new NoSuchElementException();
-            
+
             Object result= fNext;
             fNext= findNext();
             return result;
         }
-        
+
         /*
          * @see java.util.Iterator#remove()
          */
         public void remove() {
             throw new UnsupportedOperationException();
         }
-        
+
         private Object findNext() {
             while (fParentIterator.hasNext()) {
                 Annotation next= cast(Annotation) fParentIterator.next();
@@ -197,20 +197,20 @@
                 return fRegion.includes(start) && fRegion.includes(start + length - 1);
         }
     }
-    
+
     /**
      * An iterator iteration over a Positions and mapping positions to
      * annotations using a provided map if the provided map contains the element.
-     * 
+     *
      * @since 3.4
      */
     private static final class AnnotationsInterator : Iterator {
-        
+
         private Object fNext;
         private final Position[] fPositions;
         private int fIndex;
         private final Map fMap;
-        
+
         /**
          * @param positions positions to iterate over
          * @param map a map to map positions to annotations
@@ -221,14 +221,14 @@
             fMap= map;
             fNext= findNext();
         }
-        
+
         /* (non-Javadoc)
          * @see java.util.Iterator#hasNext()
          */
         public bool hasNext() {
             return fNext !is null;
         }
-        
+
         /* (non-Javadoc)
          * @see java.util.Iterator#next()
          */
@@ -237,14 +237,14 @@
             fNext= findNext();
             return result;
         }
-        
+
         /* (non-Javadoc)
          * @see java.util.Iterator#remove()
          */
         public void remove() {
             throw new UnsupportedOperationException();
         }
-        
+
         private Object findNext() {
             while (fIndex < fPositions.length) {
                 Position position= fPositions[fIndex];
@@ -252,7 +252,7 @@
                 if (fMap.containsKey(position))
                     return fMap.get(position);
             }
-            
+
             return null;
         }
     }
@@ -740,11 +740,7 @@
                 removeAnnotations(deleted, false, false);
                 synchronized (getLockObject()) {
                     if (fModelEvent !is null)
-                        new class()  Thread {
-                            public void run() {
-                                fireModelChanged();
-                            }
-                        }.start();
+                        (new Thread ( &fireModelChanged() )).start();
                 }
             } else
                 removeAnnotations(deleted, fireModelChanged, false);
@@ -760,15 +756,15 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * @since 3.4
      */
     public Iterator getAnnotationIterator(int offset, int length, bool canStartBefore, bool canEndAfter) {
         Iterator regionIterator= getRegionAnnotationIterator(offset, length, canStartBefore, canEndAfter);
-        
+
         if (fAttachments.isEmpty())
             return regionIterator;
-        
+
         List iterators= new ArrayList(fAttachments.size() + 1);
         iterators.add(regionIterator);
         Iterator it= fAttachments.keySet().iterator();
@@ -779,13 +775,13 @@
             else
                 iterators.add(new RegionIterator(attachment.getAnnotationIterator(), attachment, offset, length, canStartBefore, canEndAfter));
         }
-        
+
         return new MetaIterator(iterators.iterator());
     }
-    
+
     /**
      * Returns an iterator as specified in {@link IAnnotationModelExtension2#getAnnotationIterator(int, int, bool, bool)}
-     * 
+     *
      * @param offset region start
      * @param length region length
      * @param canStartBefore position can start before region
@@ -797,10 +793,10 @@
     private Iterator getRegionAnnotationIterator(int offset, int length, bool canStartBefore, bool canEndAfter) {
         if (!( cast(AbstractDocument)fDocument ))
             return new RegionIterator(getAnnotationIterator(true), this, offset, length, canStartBefore, canEndAfter);
-        
+
         AbstractDocument document= cast(AbstractDocument) fDocument;
         cleanup(true);
-        
+
         try {
             Position[] positions= document.getPositions(IDocument.DEFAULT_CATEGORY, offset, length, canStartBefore, canEndAfter);
             return new AnnotationsInterator(positions, fPositions);
--- a/dwtx/jface/text/source/AnnotationPainter.d	Sun Aug 24 21:34:15 2008 +0200
+++ b/dwtx/jface/text/source/AnnotationPainter.d	Sun Aug 24 22:31:00 2008 +0200
@@ -152,7 +152,7 @@
          * decoration drawn in drawing mode. This can usually be accomplished by calling
          * {@linkplain StyledText#redrawRange(int, int, bool) textWidget.redrawRange(offset, length, true)}.</li>
          * </ul>
-         * 
+         *
          * @param annotation the annotation to be drawn
          * @param gc the graphics context, <code>null</code> when in clearing mode
          * @param textWidget the text widget to draw on
@@ -165,7 +165,7 @@
 
     /**
      * Squiggles drawing strategy.
-     * 
+     *
      * @since 3.0
      * @deprecated As of 3.4, replaced by {@link AnnotationPainter.UnderlineStrategy}
      */
@@ -188,7 +188,7 @@
                 right.x= rect.x + rect.width;
 
                 int[] polyline= computePolyline(left, right, textWidget.getBaseline(offset), textWidget.getLineHeight(offset));
-                
+
                 gc.setLineWidth(0); // NOTE: 0 means width is 1 but with optimized performance
                 gc.setLineStyle(DWT.LINE_SOLID);
                 gc.setForeground(color);
@@ -263,26 +263,26 @@
             // do nothing
         }
     }
-    
-    
+
+
     /**
      * A text style painting strategy draws the decoration for an annotation
      * onto the text widget by applying a {@link TextStyle} on a given
      * {@link StyleRange}.
-     * 
+     *
      * @since 3.4
      */
     public interface ITextStyleStrategy {
 
         /**
          * Applies a text style on the given <code>StyleRange</code>.
-         * 
+         *
          * @param styleRange the style range on which to apply the text style
          * @param annotationColor the color of the annotation
          */
         void applyTextStyle(StyleRange styleRange, Color annotationColor);
     }
-    
+
 
     /**
      * @since 3.4
@@ -293,14 +293,14 @@
         }
     }
 
-    
+
     /**
      * Underline text style strategy.
-     * 
+     *
      * @since 3.4
      */
     public static final class UnderlineStrategy : ITextStyleStrategy {
-        
+
         int fUnderlineStyle;
 
         public this(int style) {
@@ -315,27 +315,27 @@
         }
     }
 
-    
+
     /**
      * Box text style strategy.
-     * 
+     *
      * @since 3.4
      */
     public static final class BoxStrategy : ITextStyleStrategy {
-        
+
         int fBorderStyle;
 
         public this(int style) {
             Assert.isLegal(style is DWT.BORDER_DASH || style is DWT.BORDER_DASH || style is DWT.BORDER_SOLID);
             fBorderStyle= style;
         }
-        
+
         public void applyTextStyle(StyleRange styleRange, Color annotationColor) {
             styleRange.borderStyle= fBorderStyle;
             styleRange.borderColor= annotationColor;
         }
     }
-    
+
 
     /**
      * Implementation of <code>IRegion</code> that can be reused
@@ -357,7 +357,7 @@
     /**
      * This strategy is used to mark the <code>null</code> value in the chache
      * maps.
-     * 
+     *
      * @since 3.4
      */
     private static final IDrawingStrategy NULL_STRATEGY= new NullStrategy();
@@ -368,14 +368,14 @@
     private static final Object SQUIGGLES= new Object();
     /**
      * The squiggly painter strategy.
-     * 
+     *
      * @since 3.4
      */
     private static final ITextStyleStrategy HIGHLIGHTING_STRATEGY= new HighlightingStrategy();
 
     /**
      * The highlighting text style strategy id.
-     * 
+     *
      * @since 3.4
      */
     private static final Object HIGHLIGHTING= new Object();
@@ -439,7 +439,7 @@
     private Object fHighlightedDecorationsMapLock= new Object();
     /**
      * Maps an annotation type to its registered color.
-     * 
+     *
      * @see #setAnnotationTypeColor(Object, Color)
      */
     private Map fAnnotationType2Color= new HashMap();
@@ -483,7 +483,7 @@
     private bool fInputDocumentAboutToBeChanged;
     /**
      * Maps annotation types to painting strategy identifiers.
-     * 
+     *
      * @see #addAnnotationType(Object, Object)
      * @since 3.0
      */
@@ -496,7 +496,7 @@
 
     /**
      * Maps painting strategy identifiers to painting strategies.
-     * 
+     *
      * @since 3.0
      */
     private Map fPaintingStrategyId2PaintingStrategy= new HashMap();
@@ -506,7 +506,7 @@
      * @since 3.3
      */
     private ReusableRegion fReusableRegion= new ReusableRegion();
-    
+
     /**
      * Creates a new annotation painter for the given source viewer and with the
      * given annotation access. The painter is not initialized, i.e. no
@@ -603,7 +603,7 @@
 
         int highlightAnnotationRangeStart= Integer.MAX_VALUE;
         int highlightAnnotationRangeEnd= -1;
-        
+
         int drawRangeStart= Integer.MAX_VALUE;
         int drawRangeEnd= -1;
 
@@ -636,9 +636,9 @@
                     Decoration decoration= cast(Decoration)entry.getValue();
                     drawDecoration(decoration, null, annotation, clippingRegion, document);
                 }
-                
+
                 decorationsMap.clear();
-                
+
                 highlightedDecorationsMap.clear();
 
                 e= fModel.getAnnotationIterator();
@@ -667,7 +667,7 @@
                             drawRangeEnd= Math.max(drawRangeEnd, position.offset + position.length);
                         }
                     }
-                    
+
                 }
 
                 // Update existing annotations
@@ -676,7 +676,7 @@
                     Annotation annotation= changedAnnotations[i];
 
                     bool isHighlighting= false;
-                    
+
                     Decoration decoration= cast(Decoration)highlightedDecorationsMap.get(annotation);
 
                     if (decoration !is null) {
@@ -687,7 +687,7 @@
                             highlightedDecorationsMap.remove(annotation);
                     } else {
                         decoration= getDecoration(annotation, decoration);
-                        if (decoration !is null && decoration.fPaintingStrategy instanceof ITextStyleStrategy) {
+                        if (decoration !is null && cast(ITextStyleStrategy)decoration.fPaintingStrategy ) {
                             highlightedDecorationsMap.put(annotation, decoration);
                             isHighlighting= true;
                         }
@@ -718,7 +718,7 @@
                         Decoration oldDecoration= cast(Decoration)decorationsMap.get(annotation);
                         if (oldDecoration !is null) {
                             drawDecoration(oldDecoration, null, annotation, clippingRegion, document);
-                        
+
                         if (decoration !is null)
                             decorationsMap.put(annotation, decoration);
                         else if (oldDecoration !is null)
@@ -735,16 +735,16 @@
                 Annotation annotation= cast(Annotation) e.next();
                 Decoration pp= getDecoration(annotation, null);
                 if (pp !is null) {
-                    if (pp.fPaintingStrategy instanceof IDrawingStrategy) {
+                    if (cast(IDrawingStrategy)pp.fPaintingStrategy ) {
                         decorationsMap.put(annotation, pp);
                         drawRangeStart= Math.min(drawRangeStart, pp.fPosition.offset);
                         drawRangeEnd= Math.max(drawRangeEnd, pp.fPosition.offset + pp.fPosition.length);
-                    } else if (pp.fPaintingStrategy instanceof ITextStyleStrategy) {
+                    } else if (cast(ITextStyleStrategy)pp.fPaintingStrategy ) {
                         highlightedDecorationsMap.put(annotation, pp);
                         highlightAnnotationRangeStart= Math.min(highlightAnnotationRangeStart, pp.fPosition.offset);
                         highlightAnnotationRangeEnd= Math.max(highlightAnnotationRangeEnd, pp.fPosition.offset + pp.fPosition.length);
                     }
-                    
+
                 }
             }
 
@@ -815,7 +815,7 @@
         adaptToDocumentLength(fCurrentHighlightAnnotationRange);
         adaptToDocumentLength(fTotalHighlightAnnotationRange);
     }
-    
+
     /**
      * Updates the remembered decoration ranges.
      *
@@ -826,20 +826,20 @@
      */
     private void updateDrawRanges(int drawRangeStart, int drawRangeEnd, bool isWorldChange) {
         if (drawRangeStart !is Integer.MAX_VALUE) {
-            
+
             int maxRangeStart= drawRangeStart;
             int maxRangeEnd= drawRangeEnd;
-            
+
             if (fTotalDrawRange !is null) {
                 maxRangeStart= Math.min(maxRangeStart, fTotalDrawRange.offset);
                 maxRangeEnd= Math.max(maxRangeEnd, fTotalDrawRange.offset + fTotalDrawRange.length);
             }
-            
+
             if (fTotalDrawRange is null)
                 fTotalDrawRange= new Position(0);
             if (fCurrentDrawRange is null)
                 fCurrentDrawRange= new Position(0);
-            
+
             if (isWorldChange) {
                 fTotalDrawRange.offset= drawRangeStart;
                 fTotalDrawRange.length= drawRangeEnd - drawRangeStart;
@@ -859,7 +859,7 @@
                 fCurrentDrawRange= null;
             }
         }
-        
+
         adaptToDocumentLength(fCurrentDrawRange);
         adaptToDocumentLength(fTotalDrawRange);
     }
@@ -906,7 +906,7 @@
         Position position= fModel.getPosition(annotation);
         if (position is null || position.isDeleted())
             return null;
-        
+
         if (decoration is null)
             decoration= new Decoration();
 
@@ -918,15 +918,15 @@
         } else {
             decoration.fLayer= IAnnotationAccessExtension.DEFAULT_LAYER;
         }
-        
+
         decoration.fPaintingStrategy= paintingStrategy;
-        
+
         return decoration;
     }
 
     /**
      * Returns the painting strategy for the given annotation.
-     * 
+     *
      * @param type the annotation type
      * @return the annotation painter
      * @since 3.0
@@ -1021,7 +1021,7 @@
             return;
 
         if ( cast(ITextViewerExtension2)fSourceViewer ) {
-            if cast(DEBUG)
+            if (DEBUG)
                 System.out_.println("AP: invalidating offset: " + r.getOffset() + ", length= " + r.getLength()); //$NON-NLS-1$ //$NON-NLS-2$
 
             (cast(ITextViewerExtension2)fSourceViewer).invalidateTextPresentation(r.getOffset(), r.getLength());
@@ -1047,7 +1047,7 @@
 
         IRegion region= tp.getExtent();
 
-        if cast(DEBUG)
+        if (DEBUG)
             System.out_.println("AP: applying text presentation offset: " + region.getOffset() + ", length= " + region.getLength()); //$NON-NLS-1$ //$NON-NLS-2$
 
         for (int layer= 0, maxLayer= 1; layer < maxLayer; layer++) {
@@ -1092,7 +1092,7 @@
      * @see dwtx.jface.text.source.IAnnotationModelListener#modelChanged(dwtx.jface.text.source.IAnnotationModel)
      */
     public synchronized void modelChanged(final IAnnotationModel model) {
-        if cast(DEBUG)
+        if (DEBUG)
             System.err.println("AP: OLD API of AnnotationModelListener called"); //$NON-NLS-1$
 
         modelChanged(new AnnotationModelEvent(model));
@@ -1128,7 +1128,7 @@
         } else {
             if (DEBUG && event !is null && event.isWorldChange()) {
                 System.out_.println("AP: WORLD CHANGED, stack trace follows:"); //$NON-NLS-1$
-                new Throwable().printStackTrace(System.out);
+                ExceptionPrintStackTrace( new Exception(""), Stdout );
             }
 
             // XXX: posting here is a problem for annotations that are being
@@ -1202,7 +1202,7 @@
             };
             fSourceViewer.addTextInputListener(fTextInputListener);
         }
-        
+
     }
 
     /**
@@ -1232,7 +1232,7 @@
      * The given id can be referenced when adding annotation types, see
      * {@link #addAnnotationType(Object, Object)}.
      * </p>
-     * 
+     *
      * @param id the identifier under which the strategy can be referenced, not <code>null</code>
      * @param strategy the new strategy
      * @since 3.4
@@ -1329,12 +1329,12 @@
             fCachedAnnotationType2PaintingStrategy.clear();
             fCachedAnnotationType2PaintingStrategy= null;
         }
-        
+
         if (fAnnotationType2PaintingStrategyId !is null) {
             fAnnotationType2PaintingStrategyId.clear();
             fAnnotationType2PaintingStrategyId= null;
         }
-        
+
         fTextWidget= null;
         fSourceViewer= null;
         fAnnotationAccess= null;
@@ -1414,10 +1414,10 @@
         IRegion clippingRegion= computeClippingRegion(event, false);
         if (clippingRegion is null)
             return;
-        
+
         int vOffset= clippingRegion.getOffset();
         int vLength= clippingRegion.getLength();
-        
+
         final GC gc= event !is null ? event.gc : null;
 
         // Clone decorations
@@ -1434,7 +1434,7 @@
         ArrayList toBeDrawn= new ArrayList(10);
         for (Iterator e = decorations.iterator(); e.hasNext();) {
             Map.Entry entry= (Map.Entry)e.next();
-            
+
             Annotation a= cast(Annotation)entry.getKey();
             Decoration pp = cast(Decoration)entry.getValue();
             // prune any annotation that is not drawable or does not need drawing
@@ -1456,12 +1456,12 @@
             }
         }
     }
-    
+
     private void drawDecoration(Decoration pp, GC gc, Annotation annotation, IRegion clippingRegion, IDocument document) {
         if (clippingRegion is null)
             return;
 
-        if (!(pp.fPaintingStrategy instanceof IDrawingStrategy))
+        if (!(cast(IDrawingStrategy)pp.fPaintingStrategy ))
             return;
 
         IDrawingStrategy drawingStrategy= cast(IDrawingStrategy)pp.fPaintingStrategy;
@@ -1494,12 +1494,12 @@
         } catch (BadLocationException x) {
         }
     }
-    
+
     /**
      * Computes the model (document) region that is covered by the paint event's clipping region. If
      * <code>event</code> is <code>null</code>, the model range covered by the visible editor
      * area (viewport) is returned.
-     * 
+     *
      * @param event the paint event or <code>null</code> to use the entire viewport
      * @param isClearing tells whether the clipping is need for clearing an annotation
      * @return the model region comprised by either the paint event's clipping region or the
@@ -1508,21 +1508,21 @@
      */
     private IRegion computeClippingRegion(PaintEvent event, bool isClearing) {
         if (event is null) {
-            
+
             if (!isClearing && fCurrentDrawRange !is null)
                 return new Region(fCurrentDrawRange.offset, fCurrentDrawRange.length);
-            
+
             // trigger a repaint of the entire viewport
             int vOffset= getInclusiveTopIndexStartOffset();
             if (vOffset is -1)
                 return null;
-            
+
             // http://bugs.eclipse.org/bugs/show_bug.cgi?id=17147
             int vLength= getExclusiveBottomIndexEndOffset() - vOffset;
-            
+
             return new Region(vOffset, vLength);
         }
-        
+
         int widgetOffset;
         try {
             int widgetClippingStartOffset= fTextWidget.getOffsetAtLocation(new Point(0, event.y));
@@ -1536,7 +1536,7 @@
                 widgetOffset= 0;
             }
         }
-        
+
         int widgetEndOffset;
         try {
             int widgetClippingEndOffset= fTextWidget.getOffsetAtLocation(new Point(0, event.y + event.height));
@@ -1555,9 +1555,9 @@
                 widgetEndOffset= fTextWidget.getCharCount();
             }
         }
-        
+
         IRegion clippingRegion= getModelRange(widgetOffset, widgetEndOffset - widgetOffset);
-        
+
         return clippingRegion;
     }
 
@@ -1576,7 +1576,7 @@
     /**
      * Returns the widget region that corresponds to the
      * given offset and length in the viewer's document.
-     * 
+     *
      * @param modelOffset the model offset
      * @param modelLength the model length
      * @return the corresponding widget region
@@ -1622,11 +1622,11 @@
             ITextViewerExtension5 extension= cast(ITextViewerExtension5) fSourceViewer;
             return extension.widgetRange2ModelRange(new Region(offset, length));
         }
-        
+
         IRegion region= fSourceViewer.getVisibleRegion();
         return new Region(region.getOffset() + offset, length);
     }
-    
+
     /**
      * Checks whether the intersection of the given text ranges
      * is empty or not.
--- a/dwtx/jface/text/source/CompositeRuler.d	Sun Aug 24 21:34:15 2008 +0200
+++ b/dwtx/jface/text/source/CompositeRuler.d	Sun Aug 24 22:31:00 2008 +0200
@@ -240,43 +240,43 @@
          * @param listener the listener to be added
          */
         private void addListener(Class clazz, Control control, EventListener listener) {
-            if (ControlListener.class.equals(clazz)) {
+            if (ControlListener.classinfo.opEquals(clazz)) {
                 control. addControlListener(cast(ControlListener) listener);
                 return;
             }
-            if (FocusListener.class.equals(clazz)) {
+            if (FocusListener.classinfo.opEquals(clazz)) {
                 control. addFocusListener(cast(FocusListener) listener);
                 return;
             }
-            if (HelpListener.class.equals(clazz)) {
+            if (HelpListener.classinfo.opEquals(clazz)) {
                 control. addHelpListener(cast(HelpListener) listener);
                 return;
             }
-            if (KeyListener.class.equals(clazz)) {
+            if (KeyListener.classinfo.opEquals(clazz)) {
                 control. addKeyListener(cast(KeyListener) listener);
                 return;
             }
-            if (MouseListener.class.equals(clazz)) {
+            if (MouseListener.classinfo.opEquals(clazz)) {
                 control. addMouseListener(cast(MouseListener) listener);
                 return;
             }
-            if (MouseMoveListener.class.equals(clazz)) {
+            if (MouseMoveListener.classinfo.opEquals(clazz)) {
                 control. addMouseMoveListener(cast(MouseMoveListener) listener);
                 return;
             }
-            if (MouseTrackListener.class.equals(clazz)) {
+            if (MouseTrackListener.classinfo.opEquals(clazz)) {
                 control. addMouseTrackListener(cast(MouseTrackListener) listener);
                 return;
             }
-            if (PaintListener.class.equals(clazz)) {
+            if (PaintListener.classinfo.opEquals(clazz)) {
                 control. addPaintListener(cast(PaintListener) listener);
                 return;
             }
-            if (TraverseListener.class.equals(clazz)) {
+            if (TraverseListener.classinfo.opEquals(clazz)) {
                 control. addTraverseListener(cast(TraverseListener) listener);
                 return;
             }
-            if (DisposeListener.class.equals(clazz)) {
+            if (DisposeListener.classinfo.opEquals(clazz)) {
                 control. addDisposeListener(cast(DisposeListener) listener);
                 return;
             }
@@ -291,43 +291,43 @@
          * @param listener the listener to be removed
          */
         private void removeListener(Class clazz, Control control, EventListener listener) {
-            if (ControlListener.class.equals(clazz)) {
+            if (ControlListener.classinfo.opEquals(clazz)) {
                 control. removeControlListener(cast(ControlListener) listener);
                 return;
             }
-            if (FocusListener.class.equals(clazz)) {
+            if (FocusListener.classinfo.opEquals(clazz)) {
                 control. removeFocusListener(cast(FocusListener) listener);
                 return;
             }
-            if (HelpListener.class.equals(clazz)) {
+            if (HelpListener.classinfo.opEquals(clazz)) {
                 control. removeHelpListener(cast(HelpListener) listener);
                 return;
             }
-            if (KeyListener.class.equals(clazz)) {
+            if (KeyListener.classinfo.opEquals(clazz)) {
                 control. removeKeyListener(cast(KeyListener) listener);
                 return;
             }
-            if (MouseListener.class.equals(clazz)) {
+            if (MouseListener.classinfo.opEquals(clazz)) {
                 control. removeMouseListener(cast(MouseListener) listener);
                 return;
             }
-            if (MouseMoveListener.class.equals(clazz)) {
+            if (MouseMoveListener.classinfo.opEquals(clazz)) {
                 control. removeMouseMoveListener(cast(MouseMoveListener) listener);
                 return;
             }
-            if (MouseTrackListener.class.equals(clazz)) {
+            if (MouseTrackListener.classinfo.opEquals(clazz)) {
                 control. removeMouseTrackListener(cast(MouseTrackListener) listener);
                 return;
             }
-            if (PaintListener.class.equals(clazz)) {
+            if (PaintListener.classinfo.opEquals(clazz)) {
                 control. removePaintListener(cast(PaintListener) listener);
                 return;
             }
-            if (TraverseListener.class.equals(clazz)) {
+            if (TraverseListener.classinfo.opEquals(clazz)) {
                 control. removeTraverseListener(cast(TraverseListener) listener);
                 return;
             }
-            if (DisposeListener.class.equals(clazz)) {
+            if (DisposeListener.classinfo.opEquals(clazz)) {
                 control. removeDisposeListener(cast(DisposeListener) listener);
                 return;
             }
@@ -413,7 +413,7 @@
          * @see Control#removeControlListener(ControlListener)
          */
         public void removeControlListener(ControlListener listener) {
-            removeListener(ControlListener.class, listener);
+            removeListener(ControlListener.classinfo, listener);
             super.removeControlListener(listener);
         }
 
@@ -421,7 +421,7 @@
          * @see Control#removeFocusListener(FocusListener)
          */
         public void removeFocusListener(FocusListener listener) {
-            removeListener(FocusListener.class, listener);
+            removeListener(FocusListener.classinfo, listener);
             super.removeFocusListener(listener);
         }
 
@@ -429,7 +429,7 @@
          * @see Control#removeHelpListener(HelpListener)
          */
         public void removeHelpListener(HelpListener listener) {
-            removeListener(HelpListener.class, listener);
+            removeListener(HelpListener.classinfo, listener);
             super.removeHelpListener(listener);
         }
 
@@ -437,7 +437,7 @@
          * @see Control#removeKeyListener(KeyListener)
          */
         public void removeKeyListener(KeyListener listener) {
-            removeListener(KeyListener.class, listener);
+            removeListener(KeyListener.classinfo, listener);
             super.removeKeyListener(listener);
         }
 
@@ -445,7 +445,7 @@
          * @see Control#removeMouseListener(MouseListener)
          */
         public void removeMouseListener(MouseListener listener) {
-            removeListener(MouseListener.class, listener);
+            removeListener(MouseListener.classinfo, listener);
             super.removeMouseListener(listener);
         }
 
@@ -453,7 +453,7 @@
          * @see Control#removeMouseMoveListener(MouseMoveListener)
          */
         public void removeMouseMoveListener(MouseMoveListener listener) {
-            removeListener(MouseMoveListener.class, listener);
+            removeListener(MouseMoveListener.classinfo, listener);
             super.removeMouseMoveListener(listener);
         }
 
@@ -461,7 +461,7 @@
          * @see Control#removeMouseTrackListener(MouseTrackListener)
          */
         public void removeMouseTrackListener(MouseTrackListener listener) {
-            removeListener(MouseTrackListener.class, listener);
+            removeListener(MouseTrackListener.classinfo, listener);
             super.removeMouseTrackListener(listener);
         }
 
@@ -469,7 +469,7 @@
          * @see Control#removePaintListener(PaintListener)
          */
         public void removePaintListener(PaintListener listener) {
-            removeListener(PaintListener.class, listener);
+            removeListener(PaintListener.classinfo, listener);
             super.removePaintListener(listener);
         }
 
@@ -477,7 +477,7 @@
          * @see Control#removeTraverseListener(TraverseListener)
          */
         public void removeTraverseListener(TraverseListener listener) {
-            removeListener(TraverseListener.class, listener);
+            removeListener(TraverseListener.classinfo, listener);
             super.removeTraverseListener(listener);
         }
 
@@ -485,7 +485,7 @@
          * @see Widget#removeDisposeListener(DisposeListener)
          */
         public void removeDisposeListener(DisposeListener listener) {
-            removeListener(DisposeListener.class, listener);
+            removeListener(DisposeListener.classinfo, listener);
             super.removeDisposeListener(listener);
         }
 
@@ -494,7 +494,7 @@
          */
         public void addControlListener(ControlListener listener) {
             super.addControlListener(listener);
-            addListener(ControlListener.class, listener);
+            addListener(ControlListener.classinfo, listener);
         }
 
         /*
@@ -502,7 +502,7 @@
          */
         public void addFocusListener(FocusListener listener) {
             super.addFocusListener(listener);
-            addListener(FocusListener.class, listener);
+            addListener(FocusListener.classinfo, listener);
         }
 
         /*
@@ -510,7 +510,7 @@
          */
         public void addHelpListener(HelpListener listener) {
             super.addHelpListener(listener);
-            addListener(HelpListener.class, listener);
+            addListener(HelpListener.classinfo, listener);
         }
 
         /*
@@ -518,7 +518,7 @@
          */
         public void addKeyListener(KeyListener listener) {
             super.addKeyListener(listener);
-            addListener(KeyListener.class, listener);
+            addListener(KeyListener.classinfo, listener);
         }
 
         /*
@@ -526,7 +526,7 @@
          */
         public void addMouseListener(MouseListener listener) {
             super.addMouseListener(listener);
-            addListener(MouseListener.class, listener);
+            addListener(MouseListener.classinfo, listener);
         }
 
         /*
@@ -534,7 +534,7 @@
          */
         public void addMouseMoveListener(MouseMoveListener listener) {
             super.addMouseMoveListener(listener);
-            addListener(MouseMoveListener.class, listener);
+            addListener(MouseMoveListener.classinfo, listener);
         }
 
         /*
@@ -542,7 +542,7 @@
          */
         public void addMouseTrackListener(MouseTrackListener listener) {
             super.addMouseTrackListener(listener);
-            addListener(MouseTrackListener.class, listener);
+            addListener(MouseTrackListener.classinfo, listener);
         }
 
         /*
@@ -550,7 +550,7 @@
          */
         public void addPaintListener(PaintListener listener) {
             super.addPaintListener(listener);
-            addListener(PaintListener.class, listener);
+            addListener(PaintListener.classinfo, listener);
         }
 
         /*
@@ -558,7 +558,7 @@
          */
         public void addTraverseListener(TraverseListener listener) {
             super.addTraverseListener(listener);
-            addListener(TraverseListener.class, listener);
+            addListener(TraverseListener.classinfo, listener);
         }
 
         /*
@@ -566,7 +566,7 @@
          */
         public void addDisposeListener(DisposeListener listener) {
             super.addDisposeListener(listener);
-            addListener(DisposeListener.class, listener);
+            addListener(DisposeListener.classinfo, listener);
         }
     }
 
@@ -737,10 +737,10 @@
             }
         }
     }
-    
+
     /**
      * Immediately redraws the entire ruler (without asynchronous posting).
-     * 
+     *
      * @since 3.2
      */
     public void immediateUpdate() {
@@ -795,13 +795,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);
     }
 
--- a/dwtx/jface/text/source/DefaultAnnotationHover.d	Sun Aug 24 21:34:15 2008 +0200
+++ b/dwtx/jface/text/source/DefaultAnnotationHover.d	Sun Aug 24 22:31:00 2008 +0200
@@ -90,23 +90,23 @@
 
 /**
  * Standard implementation of {@link dwtx.jface.text.source.IAnnotationHover}.
- * 
+ *
  * @since 3.2
  */
 public class DefaultAnnotationHover : IAnnotationHover {
-    
-    
+
+
     /**
      * Tells whether the line number should be shown when no annotation is found
      * under the cursor.
-     * 
+     *
      * @since 3.4
      */
     private bool fShowLineNumber;
 
     /**
      * Creates a new default annotation hover.
-     * 
+     *
      * @since 3.4
      */
     public this() {
@@ -115,33 +115,33 @@
 
     /**
      * Creates a new default annotation hover.
-     * 
+     *
      * @param showLineNumber <code>true</code> if the line number should be shown when no annotation is found
      * @since 3.4
      */
     public this(bool showLineNumber) {
         fShowLineNumber= showLineNumber;
     }
-    
+
     /*
      * @see dwtx.jface.text.source.IAnnotationHover#getHoverInfo(dwtx.jface.text.source.ISourceViewer, int)
      */
     public String getHoverInfo(ISourceViewer sourceViewer, int lineNumber) {
         List javaAnnotations= getAnnotationsForLine(sourceViewer, lineNumber);
         if (javaAnnotations !is null) {
-            
+
             if (javaAnnotations.size() is 1) {
-                
+
                 // optimization
                 Annotation annotation= cast(Annotation) javaAnnotations.get(0);
                 String message= annotation.getText();
                 if (message !is null && message.trim().length() > 0)
                     return formatSingleMessage(message);
-                
+
             } else {
-                
+
                 List messages= new ArrayList();
-                
+
                 Iterator e= javaAnnotations.iterator();
                 while (e.hasNext()) {
                     Annotation annotation= cast(Annotation) e.next();
@@ -149,69 +149,69 @@
                     if (message !is null && message.trim().length() > 0)
                         messages.add(message.trim());
                 }
-                
+
                 if (messages.size() is 1)
                     return formatSingleMessage(cast(String)messages.get(0));
-                
+
                 if (messages.size() > 1)
                     return formatMultipleMessages(messages);
             }
         }
 
         if (fShowLineNumber && lineNumber > -1)
-            return JFaceTextMessages.getFormattedString("DefaultAnnotationHover.lineNumber", new String[] { Integer.toString(lineNumber + 1) }); //$NON-NLS-1$
+            return JFaceTextMessages.getFormattedString("DefaultAnnotationHover.lineNumber", Integer.toString(lineNumber + 1) ); //$NON-NLS-1$
 
         return null;
     }
-    
+
     /**
      * Tells whether the annotation should be included in
      * the computation.
-     * 
+     *
      * @param annotation the annotation to test
      * @return <code>true</code> if the annotation is included in the computation
      */
     protected bool isIncluded(Annotation annotation) {
         return true;
     }
-    
+
     /**
      * Hook method to format the given single message.
      * <p>
      * Subclasses can change this to create a different
      * format like HTML.
      * </p>
-     * 
+     *
      * @param message the message to format
      * @return the formatted message
      */
     protected String formatSingleMessage(String message) {
         return message;
     }
-    
+
     /**
      * Hook method to formats the given messages.
      * <p>
      * Subclasses can change this to create a different
      * format like HTML.
      * </p>
-     * 
+     *
      * @param messages the messages to format
      * @return the formatted message
      */
     protected String formatMultipleMessages(List messages) {
         StringBuffer buffer= new StringBuffer();
         buffer.append(JFaceTextMessages.getString("DefaultAnnotationHover.multipleMarkers")); //$NON-NLS-1$
-        
+
         Iterator e= messages.iterator();
         while (e.hasNext()) {
             buffer.append('\n');
             String listItemText= cast(String) e.next();
-            buffer.append(JFaceTextMessages.getFormattedString("DefaultAnnotationHover.listItem", new String[] { listItemText })); //$NON-NLS-1$
+            buffer.append(JFaceTextMessages.getFormattedString("DefaultAnnotationHover.listItem", listItemText )); //$NON-NLS-1$
         }
         return buffer.toString();
     }
-    
+
     private bool isRulerLine(Position position, IDocument document, int line) {
         if (position.getOffset() > -1 && position.getLength() > -1) {
             try {
@@ -221,7 +221,7 @@
         }
         return false;
     }
-    
+
     private IAnnotationModel getAnnotationModel(ISourceViewer viewer) {
         if ( cast(ISourceViewerExtension2)viewer ) {
             ISourceViewerExtension2 extension= cast(ISourceViewerExtension2) viewer;
@@ -229,13 +229,13 @@
         }
         return viewer.getAnnotationModel();
     }
-    
+
     private bool isDuplicateAnnotation(Map messagesAtPosition, Position position, String message) {
         if (messagesAtPosition.containsKey(position)) {
             Object value= messagesAtPosition.get(position);
             if (message.equals(value))
                 return true;
-            
+
             if ( cast(List)value ) {
                 List messages= cast(List)value;
                 if  (messages.contains(message))
@@ -252,35 +252,35 @@
             messagesAtPosition.put(position, message);
         return false;
     }
-    
+
     private bool includeAnnotation(Annotation annotation, Position position, HashMap messagesAtPosition) {
         if (!isIncluded(annotation))
             return false;
-        
+
         String text= annotation.getText();
         return (text !is null && !isDuplicateAnnotation(messagesAtPosition, position, text));
     }
-    
+
     private List getAnnotationsForLine(ISourceViewer viewer, int line) {
         IAnnotationModel model= getAnnotationModel(viewer);
         if (model is null)
             return null;
-        
+
         IDocument document= viewer.getDocument();
         List javaAnnotations= new ArrayList();
         HashMap messagesAtPosition= new HashMap();
         Iterator iterator= model.getAnnotationIterator();
-        
+
         while (iterator.hasNext()) {
             Annotation annotation= cast(Annotation) iterator.next();
-            
+
             Position position= model.getPosition(annotation);
             if (position is null)
                 continue;
-            
+
             if (!isRulerLine(position, document, line))
                 continue;
-            
+
             if ( cast(AnnotationBag)annotation ) {
                 AnnotationBag bag= cast(AnnotationBag) annotation;
                 Iterator e= bag.iterator();
@@ -292,11 +292,11 @@
                 }
                 continue;
             }
-            
+
             if (includeAnnotation(annotation, position, messagesAtPosition))
                 javaAnnotations.add(annotation);
         }
-        
+
         return javaAnnotations;
     }
 }
--- a/dwtx/jface/text/source/ImageUtilities.d	Sun Aug 24 21:34:15 2008 +0200
+++ b/dwtx/jface/text/source/ImageUtilities.d	Sun Aug 24 22:31:00 2008 +0200
@@ -153,7 +153,7 @@
      * @param r the clipping rectangle
      * @param align the alignment of the image to be drawn
      */
-    public static void drawImage(Image image, GC gc, Canvas canvas, Rectangle r, int align) {
-        drawImage(image, gc, canvas, r, align, DWT.CENTER);
+    public static void drawImage(Image image, GC gc, Canvas canvas, Rectangle r, int align_) {
+        drawImage(image, gc, canvas, r, align_, DWT.CENTER);
     }
 }
--- a/dwtx/jface/text/source/OverviewRuler.d	Sun Aug 24 21:34:15 2008 +0200
+++ b/dwtx/jface/text/source/OverviewRuler.d	Sun Aug 24 22:31:00 2008 +0200
@@ -159,12 +159,12 @@
         public void modelChanged(AnnotationModelEvent event) {
             if (!event.isValid())
                 return;
-            
+
             if (event.isWorldChange()) {
                 update();
                 return;
             }
-            
+
             Annotation[] annotations= event.getAddedAnnotations();
             int length= annotations.length;
             for (int i= 0; i < length; i++) {
@@ -173,7 +173,7 @@
                     return;
                 }
             }
-            
+
             annotations= event.getRemovedAnnotations();
             length= annotations.length;
             for (int i= 0; i < length; i++) {
@@ -182,7 +182,7 @@
                     return;
                 }
             }
-            
+
             annotations= event.getChangedAnnotations();
             length= annotations.length;
             for (int i= 0; i < length; i++) {
@@ -191,7 +191,7 @@
                     return;
                 }
             }
-            
+
         }
     }
 
@@ -428,7 +428,7 @@
      * @since 3.0
      */
     private List fCachedAnnotations= new ArrayList();
-    
+
     /**
      * Redraw runnable lock
      * @since 3.3
@@ -456,7 +456,7 @@
      * Tells whether temporary annotations are drawn with
      * a separate color. This color will be computed by
      * discoloring the original annotation color.
-     * 
+     *
      * @since 3.4
      */
     private bool fIsTemporaryAnnotationDiscolored;
@@ -480,7 +480,7 @@
     /**
      * Constructs a overview ruler of the given width using the given annotation
      * access and the given color manager.
-     * 
+     *
      * @param annotationAccess the annotation access
      * @param width the width of the vertical ruler
      * @param sharedColors the color manager
@@ -643,7 +643,7 @@
             gc.fillRectangle(0, 0, size.x, size.y);
 
             cacheAnnotations();
-            
+
             if ( cast(ITextViewerExtension5)fTextViewer )
                 doPaint1(gc);
             else
@@ -674,7 +674,7 @@
 
         Point size= fCanvas.getSize();
         int writable= JFaceTextUtil.computeLineHeight(textWidget, 0, maxLines, maxLines);
-        
+
         if (size.y > writable)
             size.y= Math.max(writable - fHeader.getSize().y, 0);
 
@@ -684,7 +684,7 @@
             if (skip(annotationType))
                 continue;
 
-            int[] style= new int[] { FilterIterator.PERSISTENT, FilterIterator.TEMPORARY };
+            int[] style= [ FilterIterator.PERSISTENT, FilterIterator.TEMPORARY ];
             for (int t=0; t < style.length; t++) {
 
                 Iterator e= new FilterIterator(annotationType, style[t], fCachedAnnotations.iterator());
@@ -704,7 +704,7 @@
                     int annotationLength= annotationEnd - annotationOffset;
 
                     try {
-                        if cast(ANNOTATION_HEIGHT_SCALABLE) {
+                        if (ANNOTATION_HEIGHT_SCALABLE) {
                             int numbersOfLines= document.getNumberOfLines(annotationOffset, annotationLength);
                             // don't count empty trailing lines
                             IRegion lastLine= document.getLineInformationOfOffset(annotationOffset + annotationLength);
@@ -787,7 +787,7 @@
             if (skip(annotationType))
                 continue;
 
-            int[] style= new int[] { FilterIterator.PERSISTENT, FilterIterator.TEMPORARY };
+            int[] style= [ FilterIterator.PERSISTENT, FilterIterator.TEMPORARY ];
             for (int t=0; t < style.length; t++) {
 
                 Iterator e= new FilterIterator(annotationType, style[t], fCachedAnnotations.iterator());
@@ -807,7 +807,7 @@
                         continue;
 
                     try {
-                        if cast(ANNOTATION_HEIGHT_SCALABLE) {
+                        if (ANNOTATION_HEIGHT_SCALABLE) {
                             int numbersOfLines= document.getNumberOfLines(p.getOffset(), p.getLength());
                             // don't count empty trailing lines
                             IRegion lastLine= document.getLineInformationOfOffset(p.getOffset() + p.getLength());
@@ -897,7 +897,7 @@
             rulerLength= Math.max(writable - fHeader.getSize().y, 0);
 
         if (y_coordinate >= writable || y_coordinate >= rulerLength)
-            return new int[] {-1, -1};
+            return [-1, -1];
 
         int[] lines= new int[2];
 
@@ -1346,7 +1346,7 @@
     private void updateHeader() {
         if (fHeader is null || fHeader.isDisposed())
             return;
-        
+
         fHeader.setToolTipText(null);
 
         Object colorType= null;
@@ -1354,7 +1354,7 @@
             Object annotationType= fAnnotationsSortedByLayer.get(i);
             if (skipInHeader(annotationType) || skip(annotationType))
                 continue;
-            
+
             Iterator e= new FilterIterator(annotationType, FilterIterator.PERSISTENT | FilterIterator.TEMPORARY | FilterIterator.IGNORE_BAGS, fCachedAnnotations.iterator());
             while (e.hasNext()) {
                 if (e.next() !is null) {
@@ -1378,18 +1378,18 @@
             }
             fHeaderPainter.setColor(color);
         }
-        
+
         fHeader.redraw();
 
     }
-    
+
     /**
      * Updates the header tool tip text of this ruler.
      */
     private void updateHeaderToolTipText() {
         if (fHeader is null || fHeader.isDisposed())
             return;
-        
+
         if (fHeader.getToolTipText() !is null)
             return;
 
@@ -1418,10 +1418,10 @@
             if (annotationTypeLabel !is null) {
                 if (overview.length() > 0)
                     overview += "\n"; //$NON-NLS-1$
-                overview += JFaceTextMessages.getFormattedString("OverviewRulerHeader.toolTipTextEntry", new Object[] {annotationTypeLabel, new Integer(count)}); //$NON-NLS-1$
+                overview += JFaceTextMessages.getFormattedString("OverviewRulerHeader.toolTipTextEntry", annotationTypeLabel, new Integer(count) ); //$NON-NLS-1$
             }
         }
-        
+
         if (overview.length() > 0)
             fHeader.setToolTipText(overview);
     }
--- a/dwtx/jface/text/source/SourceViewer.d	Sun Aug 24 21:34:15 2008 +0200
+++ b/dwtx/jface/text/source/SourceViewer.d	Sun Aug 24 22:31:00 2008 +0200
@@ -518,7 +518,7 @@
             fOverviewRulerHoveringController.getInternalAccessor().setInformationControlReplacer(new StickyHoverManager(this));
         }
     }
-    
+
     /*
      * @see dwtx.jface.text.TextViewer#setHoverEnrichMode(dwtx.jface.text.ITextViewerExtension8.EnrichMode)
      * @since 3.4
@@ -576,17 +576,17 @@
 
     /**
      * Disposes the visual annotation model.
-     * 
+     *
      * @since 3.1
      */
     protected void disposeVisualAnnotationModel() {
         if (fVisualAnnotationModel !is null) {
             if (getDocument() !is null)
                 fVisualAnnotationModel.disconnect(getDocument());
-        
+
             if ( cast(IAnnotationModelExtension)fVisualAnnotationModel )
                 (cast(IAnnotationModelExtension)fVisualAnnotationModel).removeAnnotationModel(MODEL_ANNOTATION_MODEL);
-            
+
             fVisualAnnotationModel= null;
         }
     }
@@ -635,7 +635,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * @since 3.4
      */
     public final ContentAssistantFacade getContentAssistantFacade() {
@@ -752,7 +752,7 @@
 
         if (operation is CONTENTASSIST_CONTEXT_INFORMATION)
             return fContentAssistant !is null && fContentAssistantInstalled && isEditable();
-        
+
         if (operation is QUICK_ASSIST)
             return fQuickAssistAssistant !is null && fQuickAssistAssistantInstalled && isEditable();
 
@@ -971,8 +971,7 @@
             IDocument[] slaves= extension.getSlaveDocuments(masterDocument);
             if (slaves !is null) {
                 for (int i= 0; i < slaves.length; i++) {
-                    if (slaves[i] instanceof ChildDocument) {
-                        ChildDocument child= cast(ChildDocument) slaves[i];
+                    if ( auto child = cast(ChildDocument)slaves[i] ) {
                         Position p= child.getParentDocumentRange();
                         try {
 
@@ -1013,10 +1012,10 @@
                 break;
             }
             case QUICK_ASSIST: {
-                
+
                 if (fQuickAssistAssistant is null)
                     return;
-                
+
                 if (enable) {
                     if (!fQuickAssistAssistantInstalled) {
                         fQuickAssistAssistant.install(this);
@@ -1094,17 +1093,17 @@
 
     /**
      * Tells whether the vertical ruler only acts as annotation ruler.
-     * 
+     *
      * @return <code>true</code> if the vertical ruler only show annotations
      * @since 3.3
      */
     private bool isVerticalRulerOnlyShowingAnnotations() {
         if ( cast(VerticalRuler)fVerticalRuler )
             return true;
-        
+
         if ( cast(CompositeRuler)fVerticalRuler ) {
             Iterator iter= (cast(CompositeRuler)fVerticalRuler).getDecoratorIterator();
-            return iter.hasNext() && iter.next() instanceof AnnotationRulerColumn && !iter.hasNext();
+            return iter.hasNext() && cast(AnnotationRulerColumn)iter.next() && !iter.hasNext();
         }
         return false;
     }
@@ -1137,7 +1136,7 @@
             }
         }
     }
-    
+
     /*
      * @see dwtx.jface.text.source.ISourceViewer#getCurrentAnnotationHover()
      * @since 3.2
--- a/dwtx/jface/text/source/SourceViewerConfiguration.d	Sun Aug 24 21:34:15 2008 +0200
+++ b/dwtx/jface/text/source/SourceViewerConfiguration.d	Sun Aug 24 22:31:00 2008 +0200
@@ -243,7 +243,7 @@
      * @since 3.1
      */
     public IAutoEditStrategy[] getAutoEditStrategies(ISourceViewer sourceViewer, String contentType) {
-        return new IAutoEditStrategy[] { getAutoIndentStrategy(sourceViewer, contentType) };
+        return [ getAutoIndentStrategy(sourceViewer, contentType) ];
     }
 
     /**
@@ -286,13 +286,13 @@
      * @return the prefixes or <code>null</code> if the prefix operation should not be supported
      */
     public String[] getIndentPrefixes(ISourceViewer sourceViewer, String contentType) {
-        return new String[] { "\t", "    ", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+        return [ "\t", "    ", "" ]; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
     }
-    
+
     /**
      * Computes and returns the indent prefixes for tab indentation
      * which is represented as <code>tabSizeInSpaces</code>.
-     * 
+     *
      * @param tabWidth the display tab width
      * @return the indent prefixes
      * @see #getIndentPrefixes(ISourceViewer, String)
@@ -426,7 +426,7 @@
      * @return the configured content types for the given viewer
      */
     public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
-        return new String[] { IDocument.DEFAULT_CONTENT_TYPE };
+        return [ IDocument.DEFAULT_CONTENT_TYPE ];
     }
 
     /**
@@ -456,7 +456,7 @@
         if (sourceViewer is null)
             return null;
 
-        return new IHyperlinkDetector[] { new URLHyperlinkDetector() };
+        return [ new URLHyperlinkDetector() ];
     }
 
     /**
--- a/dwtx/jface/text/source/VisualAnnotationModel.d	Sun Aug 24 21:34:15 2008 +0200
+++ b/dwtx/jface/text/source/VisualAnnotationModel.d	Sun Aug 24 22:31:00 2008 +0200
@@ -191,7 +191,7 @@
      */
     public void modelChanged(IAnnotationModel model) {
         if (model is fModel) {
-            Iterator iter= new ArrayList(fAnnotationModelListeners).iterator();
+            Iterator iter= (new ArrayList(fAnnotationModelListeners)).iterator();
             while (iter.hasNext()) {
                 IAnnotationModelListener l= cast(IAnnotationModelListener)iter.next();
                 l.modelChanged(this);
--- a/dwtx/jface/text/source/projection/ProjectionAnnotation.d	Sun Aug 24 21:34:15 2008 +0200
+++ b/dwtx/jface/text/source/projection/ProjectionAnnotation.d	Sun Aug 24 22:31:00 2008 +0200
@@ -115,11 +115,11 @@
 
     private void drawRangeIndication(GC gc, Canvas canvas, Rectangle r) {
         final int MARGIN= 3;
-        
+
         /* cap the height - at least on GTK, large numbers are converted to
          * negatives at some point */
         int height= Math.min(r.y + r.height - MARGIN, canvas.getSize().y);
-        
+
         gc.setForeground(canvas.getDisplay().getSystemColor(COLOR));
         gc.setLineWidth(0); // NOTE: 0 means width is 1 but with optimized performance
         gc.drawLine(r.x + 4, r.y + 12, r.x + 4, height);
@@ -137,7 +137,7 @@
                 FontMetrics fontMetrics= gc.getFontMetrics();
                 int delta= (fontMetrics.getHeight() - image.getBounds().height)/2;
                 rectangle.y += delta;
-                rectangle.height -= delta; 
+                rectangle.height -= delta;
                 drawRangeIndication(gc, canvas, rectangle);
             }
         }
@@ -158,9 +158,9 @@
     private void initializeImages(Display display) {
         if (fgCollapsedImage is null) {
 
-            ImageDescriptor descriptor= ImageDescriptor.createFromFile(ProjectionAnnotation.class, "images/collapsed.gif"); //$NON-NLS-1$
+            ImageDescriptor descriptor= ImageDescriptor.createFromFile( getImportData!("images/collapsed.gif")); //$NON-NLS-1$
             fgCollapsedImage= descriptor.createImage(display);
-            descriptor= ImageDescriptor.createFromFile(ProjectionAnnotation.class, "images/expanded.gif"); //$NON-NLS-1$
+            descriptor= ImageDescriptor.createFromFile( getImportData!( "images/expanded.gif")); //$NON-NLS-1$
             fgExpandedImage= descriptor.createImage(display);
 
             display.disposeExec(new DisplayDisposeRunnable());
--- a/dwtx/jface/text/source/projection/ProjectionSupport.d	Sun Aug 24 21:34:15 2008 +0200
+++ b/dwtx/jface/text/source/projection/ProjectionSupport.d	Sun Aug 24 22:31:00 2008 +0200
@@ -243,7 +243,7 @@
     public void setHoverControlCreator(IInformationControlCreator creator) {
         fInformationControlCreator= creator;
     }
-    
+
     /**
      * Sets the information presenter control creator that is used for the annotation
      * hovers that are shown in the projection viewer's projection ruler column.
@@ -372,7 +372,7 @@
      *
      */
     public Object getAdapter(ISourceViewer viewer, Class required) {
-        if (ProjectionAnnotationModel.class.equals(required)) {
+        if (ProjectionAnnotationModel.classinfo ==/*eq*/ required) {
             if ( cast(ProjectionViewer)viewer ) {
                 ProjectionViewer projectionViewer= cast(ProjectionViewer) viewer;
                 return projectionViewer.getProjectionAnnotationModel();
--- a/dwtx/jface/text/source/projection/ProjectionViewer.d	Sun Aug 24 21:34:15 2008 +0200
+++ b/dwtx/jface/text/source/projection/ProjectionViewer.d	Sun Aug 24 22:31:00 2008 +0200
@@ -99,7 +99,7 @@
     public static final int EXPAND_ALL= BASE + 4;
     /**
      * Operation constant for the collapse all operation.
-     * 
+     *
      * @since 3.2
      */
     public static final int COLLAPSE_ALL= BASE + 5;
@@ -488,7 +488,7 @@
      */
     protected void fireProjectionEnabled() {
         if (fProjectionListeners !is null) {
-            Iterator e= new ArrayList(fProjectionListeners).iterator();
+            Iterator e= (new ArrayList(fProjectionListeners)).iterator();
             while (e.hasNext()) {
                 IProjectionListener l= cast(IProjectionListener) e.next();
                 l.projectionEnabled();
@@ -502,7 +502,7 @@
      */
     protected void fireProjectionDisabled() {
         if (fProjectionListeners !is null) {
-            Iterator e= new ArrayList(fProjectionListeners).iterator();
+            Iterator e= (new ArrayList(fProjectionListeners)).iterator();
             while (e.hasNext()) {
                 IProjectionListener l= cast(IProjectionListener) e.next();
                 l.projectionDisabled();
@@ -678,11 +678,11 @@
             }
         }
     }
-    
+
     /**
      * Returns the first line offset &lt;= <code>offset</code>. If <code>testLastLine</code>
      * is <code>true</code> and the offset is on last line then <code>offset</code> is returned.
-     * 
+     *
      * @param document the document
      * @param offset the master document offset
      * @param testLastLine <code>true</code> if the test for the last line should be performed
@@ -693,10 +693,10 @@
     private int toLineStart(IDocument document, int offset, bool testLastLine)  {
         if (document is null)
             return offset;
-        
+
         if (testLastLine && offset >= document.getLineInformationOfOffset(document.getLength() - 1).getOffset())
             return offset;
-        
+
         return document.getLineInformationOfOffset(offset).getOffset();
     }
 
@@ -834,7 +834,7 @@
     /**
      * Makes the given range visible again while not changing the folding state of any contained
      * ranges. If requested, a redraw request is issued.
-     * 
+     *
      * @param offset the offset of the range to be expanded
      * @param length the length of the range to be expanded
      * @param fireRedraw <code>true</code> if a redraw request should be issued,
@@ -936,11 +936,11 @@
             }
         }
     }
-    
+
     /**
      * Tests whether the visible document's master document
      * is identical to this viewer's document.
-     * 
+     *
      * @return <code>true</code> if the visible document's master is
      *          identical to this viewer's document
      * @since 3.1
@@ -959,7 +959,7 @@
      * @exception BadLocationException in case the annotation model event is no longer in synchronization with the document
      */
     private void catchupWithProjectionAnnotationModel(AnnotationModelEvent event)  {
-        
+
         if (event is null || !isVisibleMasterDocumentSameAsDocument()) {
 
             fPendingAnnotationWorldChange= false;
@@ -979,24 +979,24 @@
                 reinitializeProjection();
             }
         } else {
-            
+
             Annotation[] addedAnnotations= event.getAddedAnnotations();
             Annotation[] changedAnnotation= event.getChangedAnnotations();
             Annotation[] removedAnnotations= event.getRemovedAnnotations();
-            
+
             fCommandQueue= new ProjectionCommandQueue();
-            
+
             bool isRedrawing= redraws();
             int topIndex= isRedrawing ? getTopIndex() : -1;
-            
+
             processDeletions(event, removedAnnotations, true);
             List coverage= new ArrayList();
             processChanges(addedAnnotations, true, coverage);
             processChanges(changedAnnotation, true, coverage);
-            
+
             ProjectionCommandQueue commandQueue= fCommandQueue;
             fCommandQueue= null;
-            
+
             if (commandQueue.passedRedrawCostsThreshold()) {
                 setRedraw(false);
                 try {
@@ -1106,7 +1106,7 @@
             IDocument document= getDocument();
             if (document is null)
                 return null;
-            
+
             int line= document.getLineOfOffset(position.getOffset());
             int offset= document.getLineOffset(line + 1);
 
@@ -1144,7 +1144,7 @@
 
             int length= position.getLength() - (offset - position.getOffset());
             if (length > 0)
-                return new IRegion[] {new Region(offset, length)};
+                return [new Region(offset, length)];
 
             return null;
         } catch (BadLocationException x) {
@@ -1403,7 +1403,7 @@
      */
     public IRegion[] getCoveredModelRanges(IRegion modelRange) {
         if (fInformationMapping is null)
-            return new IRegion[] { new Region(modelRange.getOffset(), modelRange.getLength()) };
+            return [ new Region(modelRange.getOffset(), modelRange.getLength()) ];
 
         if ( cast(IDocumentInformationMappingExtension)fInformationMapping ) {
             IDocumentInformationMappingExtension extension= cast(IDocumentInformationMappingExtension) fInformationMapping;
@@ -1451,7 +1451,7 @@
                     selection= getSelectedRange();
                     if (exposeModelRange(new Region(selection.x, selection.y)))
                         return;
-                    
+
                     if (selection.y is 0)
                         copyMarkedRegion(true);
                     else
@@ -1509,7 +1509,7 @@
                 if (redraws())
                     collapseAll();
                 break;
-                
+
             case COLLAPSE:
                 if (redraws()) {
                     collapse();
@@ -1563,13 +1563,13 @@
     /*
      * @see dwtx.jface.text.TextViewer#copyMarkedRegion(bool)
      */
-    protected void copyMarkedRegion(bool delete) {
+    protected void copyMarkedRegion(bool delete_) {
         IRegion markedRegion= getMarkedRegion();
         if (markedRegion !is null)
-            copyToClipboard(markedRegion.getOffset(), markedRegion.getLength(), delete, getTextWidget());
+            copyToClipboard(markedRegion.getOffset(), markedRegion.getLength(), delete_, getTextWidget());
     }
 
-    private void copyToClipboard(int offset, int length, bool delete, StyledText textWidget) {
+    private void copyToClipboard(int offset, int length, bool delete_, StyledText textWidget) {
 
         String copyText= null;
 
@@ -1593,8 +1593,8 @@
             Clipboard clipboard= new Clipboard(textWidget.getDisplay());
 
             try {
-                Transfer[] dataTypes= new Transfer[] { TextTransfer.getInstance() };
-                Object[] data= new Object[] { copyText };
+                Transfer[] dataTypes= [ TextTransfer.getInstance() ];
+                Object[] data= [ stringcast(copyText) ];
                 try {
                     clipboard.setContents(data, dataTypes);
                 } catch (DWTError e) {
@@ -1613,7 +1613,7 @@
             }
         }
 
-        if (delete) {
+        if (delete_) {
             try {
                 deleteTextRange(offset, length, textWidget);
             } catch (BadLocationException x) {
--- a/dwtx/jface/text/templates/DocumentTemplateContext.d	Sun Aug 24 21:34:15 2008 +0200
+++ b/dwtx/jface/text/templates/DocumentTemplateContext.d	Sun Aug 24 22:31:00 2008 +0200
@@ -192,19 +192,19 @@
     /*
      * @see dwtx.jface.text.templates.TemplateContext#canEvaluate(dwtx.jface.text.templates.Template)
      */
-    public bool canEvaluate(Template template) {
+    public bool canEvaluate(Template template_) {
         return true;
     }
 
     /*
      * @see dwtx.jface.text.templates.TemplateContext#evaluate(dwtx.jface.text.templates.Template)
      */
-    public TemplateBuffer evaluate(Template template)  {
-        if (!canEvaluate(template))
+    public TemplateBuffer evaluate(Template template_)  {
+        if (!canEvaluate(template_))
             return null;
 
         TemplateTranslator translator= new TemplateTranslator();
-        TemplateBuffer buffer= translator.translate(template);
+        TemplateBuffer buffer= translator.translate(template_);
 
         getContextType().resolve(buffer, this);
 
--- a/dwtx/jface/text/templates/JFaceTextTemplateMessages.d	Sun Aug 24 21:34:15 2008 +0200
+++ b/dwtx/jface/text/templates/JFaceTextTemplateMessages.d	Sun Aug 24 22:31:00 2008 +0200
@@ -44,8 +44,13 @@
  */
 class JFaceTextTemplateMessages {
 
-    private static final String RESOURCE_BUNDLE= JFaceTextTemplateMessages.class.getName();
-    private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
+//     private static final String RESOURCE_BUNDLE= JFaceTextTemplateMessages.class.getName();
+    private static ResourceBundle fgResourceBundle;//= ResourceBundle.getBundle(RESOURCE_BUNDLE);
+
+    static this() {
+        fgResourceBundle = ResourceBundle.getBundle(
+            getImportData!("dwtx.jface.text.templates.JFaceTextTemplateMessages.properties"));
+    }
 
     private this() {
     }
@@ -54,16 +59,11 @@
         try {
             return fgResourceBundle.getString(key);
         } catch (MissingResourceException e) {
-            return '!' + key + '!';
+            return '!' ~ key ~ '!';
         }
     }
 
-    public static String getFormattedString(String key, Object arg) {
-        return MessageFormat.format(getString(key), new Object[] { arg });
-    }
-
-
-    public static String getFormattedString(String key, Object[] args) {
+    public static String getFormattedString(String key, Object[] args... ) {
         return MessageFormat.format(getString(key), args);
     }
 }
--- a/dwtx/jface/text/templates/Template.d	Sun Aug 24 21:34:15 2008 +0200
+++ b/dwtx/jface/text/templates/Template.d	Sun Aug 24 22:31:00 2008 +0200
@@ -73,8 +73,8 @@
      *
      * @param template the template to copy
      */
-    public this(Template template) {
-        this(template.getName(), template.getDescription(), template.getContextTypeId(), template.getPattern(), template.isAutoInsertable());
+    public this(Template template_) {
+        this(template_.getName(), template_.getDescription(), template_.getContextTypeId(), template_.getPattern(), template_.isAutoInsertable());
     }
 
     /**
--- a/dwtx/jface/text/templates/TemplateCompletionProcessor.d	Sun Aug 24 21:34:15 2008 +0200
+++ b/dwtx/jface/text/templates/TemplateCompletionProcessor.d	Sun Aug 24 22:31:00 2008 +0200
@@ -93,14 +93,14 @@
 
         List matches= new ArrayList();
         for (int i= 0; i < templates.length; i++) {
-            Template template= templates[i];
+            Template template_= templates[i];
             try {
-                context.getContextType().validate(template.getPattern());
+                context.getContextType().validate(template_.getPattern());
             } catch (TemplateException e) {
                 continue;
             }
-            if (template.matches(prefix, context.getContextType().getId()))
-                matches.add(createProposal(template, context, cast(IRegion) region, getRelevance(template, prefix)));
+            if (template_.matches(prefix, context.getContextType().getId()))
+                matches.add(createProposal(template_, context, cast(IRegion) region, getRelevance(template_, prefix)));
         }
 
         Collections.sort(matches, fgProposalComparator);
@@ -124,8 +124,8 @@
      * @deprecated use the version specifying <code>IRegion</code> as third parameter
      * @since 3.1
      */
-    protected ICompletionProposal createProposal(Template template, TemplateContext context, Region region, int relevance) {
-        return createProposal(template, context, cast(IRegion) region, relevance);
+    protected ICompletionProposal createProposal(Template template_, TemplateContext context, Region region, int relevance) {
+        return createProposal(template_, context, cast(IRegion) region, relevance);
     }
 
     /**
@@ -143,8 +143,8 @@
      * @return a new <code>ICompletionProposal</code> for
      *         <code>template</code>
      */
-    protected ICompletionProposal createProposal(Template template, TemplateContext context, IRegion region, int relevance) {
-        return new TemplateProposal(template, context, region, getImage(template), relevance);
+    protected ICompletionProposal createProposal(Template template_, TemplateContext context, IRegion region, int relevance) {
+        return new TemplateProposal(template_, context, region, getImage(template_), relevance);
     }
 
     /**
@@ -193,8 +193,8 @@
      * @return the relevance of <code>template</code>
      * @see #extractPrefix(ITextViewer, int)
      */
-    protected int getRelevance(Template template, String prefix) {
-        if (template.getName().startsWith(prefix))
+    protected int getRelevance(Template template_, String prefix) {
+        if (template_.getName().startsWith(prefix))
             return 90;
         return 0;
     }
@@ -235,7 +235,7 @@
      * @param template the template for which an image should be returned
      * @return the image for <code>template</code>
      */
-    protected abstract Image getImage(Template template);
+    protected abstract Image getImage(Template template_);
 
     /*
      * @see dwtx.jface.text.contentassist.IContentAssistProcessor#computeContextInformation(dwtx.jface.text.ITextViewer, int)
--- a/dwtx/jface/text/templates/TemplateContext.d	Sun Aug 24 21:34:15 2008 +0200
+++ b/dwtx/jface/text/templates/TemplateContext.d	Sun Aug 24 22:31:00 2008 +0200
@@ -126,7 +126,7 @@
      * @throws BadLocationException if evaluation fails due to concurrently changed documents etc.
      * @throws TemplateException if the template specification is not valid
      */
-    public abstract TemplateBuffer evaluate(Template template);
+    public abstract TemplateBuffer evaluate(Template template_);
 
     /**
      * Tests if the specified template can be evaluated in this context.
@@ -137,6 +137,6 @@
      * @return <code>true</code> if <code>template</code> can be evaluated
      *         in this context, <code>false</code> otherwise
      */
-    public abstract bool canEvaluate(Template template);
+    public abstract bool canEvaluate(Template template_);
 
 }
--- a/dwtx/jface/text/templates/TemplateProposal.d	Sun Aug 24 21:34:15 2008 +0200
+++ b/dwtx/jface/text/templates/TemplateProposal.d	Sun Aug 24 22:31:00 2008 +0200
@@ -90,8 +90,8 @@
      * @param region    the region this proposal is applied to
      * @param image     the icon of the proposal.
      */
-    public this(Template template, TemplateContext context, IRegion region, Image image) {
-        this(template, context, region, image, 0);
+    public this(Template template_, TemplateContext context, IRegion region, Image image) {
+        this(template_, context, region, image, 0);
     }
 
     /**
@@ -103,12 +103,12 @@
      * @param region    the region this proposal is applied to
      * @param relevance the relevance of the proposal
      */
-    public this(Template template, TemplateContext context, IRegion region, Image image, int relevance) {
-        Assert.isNotNull(template);
+    public this(Template template_, TemplateContext context, IRegion region, Image image, int relevance) {
+        Assert.isNotNull(template_);
         Assert.isNotNull(context);
         Assert.isNotNull(region);
 
-        fTemplate= template;
+        fTemplate= template_;
         fContext= context;
         fImage= image;
         fRegion= region;
@@ -216,7 +216,7 @@
                         document.addPosition(getCategory(), pos);
                         proposals[j]= new PositionBasedCompletionProposal(values[j], pos, length);
                     }
-                    
+
                     if (proposals.length > 1)
                         first= new ProposalPosition(document, offsets[0] + start, length, proposals);
                     else
@@ -374,7 +374,7 @@
      */
     public String getDisplayString() {
         if (fDisplayString is null) {
-            String[] arguments= new String[] { fTemplate.getName(), fTemplate.getDescription() };
+            String[] arguments= [ fTemplate.getName(), fTemplate.getDescription() ];
             fDisplayString= JFaceTextTemplateMessages.getFormattedString("TemplateProposal.displayString", arguments); //$NON-NLS-1$
         }
         return fDisplayString;
--- a/dwtx/jface/text/templates/TemplateTranslator.d	Sun Aug 24 21:34:15 2008 +0200
+++ b/dwtx/jface/text/templates/TemplateTranslator.d	Sun Aug 24 22:31:00 2008 +0200
@@ -155,8 +155,8 @@
      * @see #getErrorMessage()
      * @throws TemplateException if translation failed
      */
-    public TemplateBuffer translate(Template template)  {
-        return parse(template.getPattern());
+    public TemplateBuffer translate(Template template_)  {
+        return parse(template_.getPattern());
     }
 
     /**
--- a/dwtx/jface/text/templates/TemplateVariable.d	Sun Aug 24 21:34:15 2008 +0200
+++ b/dwtx/jface/text/templates/TemplateVariable.d	Sun Aug 24 22:31:00 2008 +0200
@@ -49,7 +49,7 @@
  * <p>
  * Clients may instantiate and extend this class.
  * </p>
- * 
+ *
  * @see TemplateVariableResolver
  * @see TemplateBuffer
  * @since 3.0
@@ -83,7 +83,7 @@
      * @param offsets the array of offsets of the variable
      */
     public this(String type, String defaultValue, int[] offsets) {
-        this(type, new String[] { defaultValue }, offsets);
+        this(type, [ defaultValue ], offsets);
     }
 
     /**
@@ -95,7 +95,7 @@
      * @param offsets the array of offsets of the variable
      */
     public this(String type, String name, String defaultValue, int[] offsets) {
-        this(type, name, new String[] { defaultValue }, offsets);
+        this(type, name, [ defaultValue ], offsets);
     }
 
     /**
@@ -108,9 +108,9 @@
      * @since 3.3
      */
     public this(TemplateVariableType type, String name, String defaultValue, int[] offsets) {
-        this(type, name, new String[] { defaultValue }, offsets);
+        this(type, name, [ defaultValue ], offsets);
     }
-    
+
     /**
      * Creates a template variable with multiple possible values. The type is
      * used as the name of the template.
@@ -134,7 +134,7 @@
     public this(String type, String name, String[] values, int[] offsets) {
         this(new TemplateVariableType(type), name, values, offsets);
     }
-    
+
     /**
      * Creates a template variable with multiple possible values.
      *
@@ -174,7 +174,7 @@
     public TemplateVariableType getVariableType() {
         return fType;
     }
-    
+
     /**
      * Returns the name of the variable.
      *
@@ -197,7 +197,7 @@
     /**
      * Returns the possible values for this variable. The returned array is owned by this variable
      * and must not be modified. The array is not empty.
-     * 
+     *
      * @return the possible values for this variable
      */
     public String[] getValues() {
@@ -212,12 +212,12 @@
     public int getLength() {
         return getDefaultValue().length();
     }
-    
+
     /**
      * Returns the initial length of the variable. The initial length is the lenght as it occurred
      * in the template pattern and is used when resolving a template to update the pattern with the
      * resolved values of the variable.
-     * 
+     *
      * @return the initial length of the variable
      * @since 3.3
      */
@@ -247,17 +247,17 @@
     /**
      * Resolves the variable to a single value. This is a shortcut for
      * <code>setValues(new String[] { value })</code>.
-     * 
+     *
      * @param value the new default value
      */
     public final void setValue(String value) {
-        setValues(new String[] { value });
+        setValues([ value ]);
     }
 
     /**
      * Resolves the variable to several possible values for this variable, with the first being the
      * default value.
-     * 
+     *
      * @param values a non-empty array of values
      */
     public void setValues(String[] values) {
@@ -285,10 +285,10 @@
     public bool isUnambiguous() {
         return fIsUnambiguous;
     }
-    
+
     /**
      * Sets the <em>resolved</em> flag of the variable.
-     * 
+     *
      * @param resolved the new <em>resolved</em> state
      * @since 3.3
      */
@@ -299,7 +299,7 @@
     /**
      * Returns <code>true</code> if the variable has been resolved, <code>false</code>
      * otherwise.
-     * 
+     *
      * @return <code>true</code> if the variable has been resolved, <code>false</code> otherwise
      * @since 3.3
      */
--- a/dwtx/jface/text/templates/persistence/TemplatePersistenceData.d	Sun Aug 24 21:34:15 2008 +0200
+++ b/dwtx/jface/text/templates/persistence/TemplatePersistenceData.d	Sun Aug 24 22:31:00 2008 +0200
@@ -53,8 +53,8 @@
      * @param template the template which is stored by the new instance
      * @param enabled whether the template is enabled
      */
-    public this(Template template, bool enabled) {
-        this(template, enabled, null);
+    public this(Template template_, bool enabled) {
+        this(template_, enabled, null);
     }
 
     /**
@@ -67,10 +67,10 @@
      * @param id the id of the template, or <code>null</code> if a user-added
      *        instance should be created
      */
-    public this(Template template, bool enabled, String id) {
-        Assert.isNotNull(template);
-        fOriginalTemplate= template;
-        fCustomTemplate= template;
+    public this(Template template_, bool enabled, String id) {
+        Assert.isNotNull(template_);
+        fOriginalTemplate= template_;
+        fCustomTemplate= template_;
         fOriginalIsEnabled= enabled;
         fCustomIsEnabled= enabled;
         fId= id;
@@ -119,8 +119,8 @@
      *
      * @param template the new template
      */
-    public void setTemplate(Template template) {
-        fCustomTemplate= template;
+    public void setTemplate(Template template_) {
+        fCustomTemplate= template_;
     }
 
     /**
--- a/dwtx/jface/text/templates/persistence/TemplateReaderWriter.d	Sun Aug 24 21:34:15 2008 +0200
+++ b/dwtx/jface/text/templates/persistence/TemplateReaderWriter.d	Sun Aug 24 22:31:00 2008 +0200
@@ -65,18 +65,18 @@
  */
 public class TemplateReaderWriter {
 
-    private static final String TEMPLATE_ROOT = "templates"; //$NON-NLS-1$
-    private static final String TEMPLATE_ELEMENT = "template"; //$NON-NLS-1$
-    private static final String NAME_ATTRIBUTE= "name"; //$NON-NLS-1$
-    private static final String ID_ATTRIBUTE= "id"; //$NON-NLS-1$
-    private static final String DESCRIPTION_ATTRIBUTE= "description"; //$NON-NLS-1$
-    private static final String CONTEXT_ATTRIBUTE= "context"; //$NON-NLS-1$
-    private static final String ENABLED_ATTRIBUTE= "enabled"; //$NON-NLS-1$
-    private static final String DELETED_ATTRIBUTE= "deleted"; //$NON-NLS-1$
+    private static const String TEMPLATE_ROOT = "templates"; //$NON-NLS-1$
+    private static const String TEMPLATE_ELEMENT = "template"; //$NON-NLS-1$
+    private static const String NAME_ATTRIBUTE= "name"; //$NON-NLS-1$
+    private static const String ID_ATTRIBUTE= "id"; //$NON-NLS-1$
+    private static const String DESCRIPTION_ATTRIBUTE= "description"; //$NON-NLS-1$
+    private static const String CONTEXT_ATTRIBUTE= "context"; //$NON-NLS-1$
+    private static const String ENABLED_ATTRIBUTE= "enabled"; //$NON-NLS-1$
+    private static const String DELETED_ATTRIBUTE= "deleted"; //$NON-NLS-1$
     /**
      * @since 3.1
      */
-    private static final String AUTO_INSERTABLE_ATTRIBUTE= "autoinsert"; //$NON-NLS-1$
+    private static const String AUTO_INSERTABLE_ATTRIBUTE= "autoinsert"; //$NON-NLS-1$
 
     /**
      * Create a new instance.
@@ -200,8 +200,8 @@
                 String pattern= buffer.toString();
                 pattern= translateString(pattern, bundle);
 
-                Template template= new Template(name, description, context, pattern, autoInsertable);
-                TemplatePersistenceData data= new TemplatePersistenceData(template, enabled, id);
+                Template template_= new Template(name, description, context, pattern, autoInsertable);
+                TemplatePersistenceData data= new TemplatePersistenceData(template_, enabled, id);
                 data.setDeleted(deleted);
 
                 templates.add(data);
@@ -267,7 +267,7 @@
 
             for (int i= 0; i < templates.length; i++) {
                 TemplatePersistenceData data= templates[i];
-                Template template= data.getTemplate();
+                Template template_= data.getTemplate();
 
                 Node node= document.createElement(TEMPLATE_ELEMENT);
                 root.appendChild(node);
@@ -281,21 +281,21 @@
                     attributes.setNamedItem(idAttr);
                 }
 
-                if (template !is null) {
+                if (template_ !is null) {
                     Attr name= document.createAttribute(NAME_ATTRIBUTE);
-                    name.setValue(template.getName());
+                    name.setValue(template_.getName());
                     attributes.setNamedItem(name);
                 }
 
-                if (template !is null) {
+                if (template_ !is null) {
                     Attr description= document.createAttribute(DESCRIPTION_ATTRIBUTE);
-                    description.setValue(template.getDescription());
+                    description.setValue(template_.getDescription());
                     attributes.setNamedItem(description);
                 }
 
-                if (template !is null) {
+                if (template_ !is null) {
                     Attr context= document.createAttribute(CONTEXT_ATTRIBUTE);
-                    context.setValue(template.getContextTypeId());
+                    context.setValue(template_.getContextTypeId());
                     attributes.setNamedItem(context);
                 }
 
@@ -307,14 +307,14 @@
                 deleted.setValue(data.isDeleted() ? Boolean.toString(true) : Boolean.toString(false));
                 attributes.setNamedItem(deleted);
 
-                if (template !is null) {
+                if (template_ !is null) {
                     Attr autoInsertable= document.createAttribute(AUTO_INSERTABLE_ATTRIBUTE);
-                    autoInsertable.setValue(template.isAutoInsertable() ? Boolean.toString(true) : Boolean.toString(false));
+                    autoInsertable.setValue(template_.isAutoInsertable() ? Boolean.toString(true) : Boolean.toString(false));
                     attributes.setNamedItem(autoInsertable);
                 }
 
-                if (template !is null) {
-                    Text pattern= document.createTextNode(template.getPattern());
+                if (template_ !is null) {
+                    Text pattern= document.createTextNode(template_.getPattern());
                     node.appendChild(pattern);
                 }
             }
--- a/dwtx/jface/text/templates/persistence/TemplateStore.d	Sun Aug 24 21:34:15 2008 +0200
+++ b/dwtx/jface/text/templates/persistence/TemplateStore.d	Sun Aug 24 22:31:00 2008 +0200
@@ -347,11 +347,11 @@
 
         for (Iterator it= fTemplates.iterator(); it.hasNext();) {
             TemplatePersistenceData data= cast(TemplatePersistenceData) it.next();
-            Template template= data.getTemplate();
+            Template template_= data.getTemplate();
             if (data.isEnabled() && !data.isDeleted()
-                    && (contextTypeId is null || contextTypeId.equals(template.getContextTypeId()))
-                    && name.equals(template.getName()))
-                return template;
+                    && (contextTypeId is null || contextTypeId.equals(template_.getContextTypeId()))
+                    && name.equals(template_.getName()))
+                return template_;
         }
 
         return null;
@@ -431,12 +431,12 @@
      *         type registry is specified, <code>false</code> if validation
      *         fails
      */
-    private bool validateTemplate(Template template) {
-        String contextTypeId= template.getContextTypeId();
+    private bool validateTemplate(Template template_) {
+        String contextTypeId= template_.getContextTypeId();
         if (contextExists(contextTypeId)) {
             if (fRegistry !is null)
                 try {
-                    fRegistry.getContextType(contextTypeId).validate(template.getPattern());
+                    fRegistry.getContextType(contextTypeId).validate(template_.getPattern());
                 } catch (TemplateException e) {
                     return false;
                 }