changeset 134:51e6e63f930e

Regex fix for casts
author Frank Benoit <benoit@tionex.de>
date Sun, 24 Aug 2008 01:46:20 +0200
parents 7d818bd32d63
children 65801ad2b265
files dwtx/jface/internal/text/InformationControlReplacer.d dwtx/jface/internal/text/StickyHoverManager.d dwtx/jface/internal/text/TableOwnerDrawSupport.d dwtx/jface/internal/text/html/BrowserInformationControl.d dwtx/jface/internal/text/html/HTML2TextReader.d dwtx/jface/internal/text/html/HTMLTextPresenter.d dwtx/jface/internal/text/html/SingleCharReader.d dwtx/jface/internal/text/html/SubstitutionTextReader.d dwtx/jface/internal/text/link/contentassist/AdditionalInfoController2.d dwtx/jface/internal/text/link/contentassist/CompletionProposalPopup2.d dwtx/jface/internal/text/link/contentassist/ContentAssistant2.d dwtx/jface/internal/text/link/contentassist/ContextInformationPopup2.d dwtx/jface/internal/text/revisions/ChangeRegion.d dwtx/jface/internal/text/revisions/Colors.d dwtx/jface/internal/text/revisions/Hunk.d dwtx/jface/internal/text/revisions/RevisionPainter.d dwtx/jface/internal/text/revisions/RevisionSelectionProvider.d dwtx/jface/internal/text/source/DiffPainter.d dwtx/jface/text/AbstractDocument.d dwtx/jface/text/AbstractHoverInformationControlManager.d dwtx/jface/text/AbstractInformationControl.d dwtx/jface/text/AbstractInformationControlManager.d dwtx/jface/text/AbstractLineTracker.d dwtx/jface/text/AbstractReusableInformationControlCreator.d dwtx/jface/text/CursorLinePainter.d dwtx/jface/text/DefaultDocumentAdapter.d dwtx/jface/text/DefaultInformationControl.d dwtx/jface/text/DefaultTextHover.d dwtx/jface/text/DefaultUndoManager.d dwtx/jface/text/DocumentCommand.d dwtx/jface/text/DocumentEvent.d dwtx/jface/text/DocumentPartitioningChangedEvent.d dwtx/jface/text/FindReplaceDocumentAdapter.d dwtx/jface/text/GapTextStore.d dwtx/jface/text/IDocument.d dwtx/jface/text/IDocumentPartitioner.d dwtx/jface/text/ITextViewer.d dwtx/jface/text/JFaceTextUtil.d dwtx/jface/text/ListLineTracker.d dwtx/jface/text/PaintManager.d dwtx/jface/text/Position.d dwtx/jface/text/PropagatingFontFieldEditor.d dwtx/jface/text/Region.d dwtx/jface/text/RewriteSessionEditProcessor.d dwtx/jface/text/SequentialRewriteTextStore.d dwtx/jface/text/TextAttribute.d dwtx/jface/text/TextPresentation.d dwtx/jface/text/TextSelection.d dwtx/jface/text/TextUtilities.d dwtx/jface/text/TextViewer.d dwtx/jface/text/TextViewerHoverManager.d dwtx/jface/text/TextViewerUndoManager.d dwtx/jface/text/TreeLineTracker.d dwtx/jface/text/TypedPosition.d dwtx/jface/text/TypedRegion.d dwtx/jface/text/WhitespaceCharacterPainter.d dwtx/jface/text/contentassist/AdditionalInfoController.d dwtx/jface/text/contentassist/CompletionProposalPopup.d dwtx/jface/text/contentassist/ContentAssistSubjectControlAdapter.d dwtx/jface/text/contentassist/ContentAssistant.d dwtx/jface/text/contentassist/ContextInformation.d dwtx/jface/text/contentassist/ContextInformationPopup.d dwtx/jface/text/contentassist/PopupCloser.d dwtx/jface/text/formatter/ContentFormatter.d dwtx/jface/text/formatter/ContextBasedFormattingStrategy.d dwtx/jface/text/formatter/FormattingContext.d dwtx/jface/text/formatter/MultiPassContentFormatter.d dwtx/jface/text/hyperlink/DefaultHyperlinkPresenter.d dwtx/jface/text/hyperlink/HyperlinkManager.d dwtx/jface/text/hyperlink/MultipleHyperlinkPresenter.d dwtx/jface/text/information/InformationPresenter.d dwtx/jface/text/link/LinkedModeManager.d dwtx/jface/text/link/LinkedModeModel.d dwtx/jface/text/link/LinkedModeUI.d dwtx/jface/text/link/LinkedPosition.d dwtx/jface/text/link/LinkedPositionAnnotations.d dwtx/jface/text/link/LinkedPositionGroup.d dwtx/jface/text/link/ProposalPosition.d dwtx/jface/text/link/TabStopIterator.d dwtx/jface/text/presentation/PresentationReconciler.d dwtx/jface/text/projection/ProjectionDocument.d dwtx/jface/text/projection/ProjectionDocumentManager.d dwtx/jface/text/projection/ProjectionMapping.d dwtx/jface/text/projection/ProjectionTextStore.d dwtx/jface/text/projection/SegmentUpdater.d dwtx/jface/text/quickassist/QuickAssistAssistant.d dwtx/jface/text/reconciler/DirtyRegionQueue.d dwtx/jface/text/reconciler/MonoReconciler.d dwtx/jface/text/reconciler/Reconciler.d dwtx/jface/text/revisions/Revision.d dwtx/jface/text/revisions/RevisionInformation.d dwtx/jface/text/rules/DefaultDamagerRepairer.d dwtx/jface/text/rules/DefaultPartitioner.d dwtx/jface/text/rules/EndOfLineRule.d dwtx/jface/text/rules/FastPartitioner.d dwtx/jface/text/rules/MultiLineRule.d dwtx/jface/text/rules/NumberRule.d dwtx/jface/text/rules/RuleBasedPartitionScanner.d dwtx/jface/text/rules/RuleBasedPartitioner.d dwtx/jface/text/rules/SingleLineRule.d dwtx/jface/text/rules/WhitespaceRule.d dwtx/jface/text/rules/WordPatternRule.d dwtx/jface/text/rules/WordRule.d dwtx/jface/text/source/AnnotationBarHoverManager.d dwtx/jface/text/source/AnnotationModel.d dwtx/jface/text/source/AnnotationModelEvent.d dwtx/jface/text/source/AnnotationPainter.d dwtx/jface/text/source/AnnotationRulerColumn.d dwtx/jface/text/source/ChangeRulerColumn.d dwtx/jface/text/source/CompositeRuler.d dwtx/jface/text/source/ContentAssistantFacade.d dwtx/jface/text/source/DefaultAnnotationHover.d dwtx/jface/text/source/LineChangeHover.d dwtx/jface/text/source/LineNumberRulerColumn.d dwtx/jface/text/source/MatchingCharacterPainter.d dwtx/jface/text/source/OverviewRuler.d dwtx/jface/text/source/OverviewRulerHoverManager.d dwtx/jface/text/source/SourceViewer.d dwtx/jface/text/source/VerticalRuler.d dwtx/jface/text/source/VisualAnnotationModel.d dwtx/jface/text/source/projection/ProjectionAnnotationHover.d dwtx/jface/text/source/projection/ProjectionAnnotationModel.d dwtx/jface/text/source/projection/ProjectionRulerColumn.d dwtx/jface/text/source/projection/ProjectionSummary.d dwtx/jface/text/source/projection/ProjectionSupport.d dwtx/jface/text/source/projection/ProjectionViewer.d dwtx/jface/text/source/projection/SourceViewerInformationControl.d dwtx/jface/text/templates/ContextTypeRegistry.d dwtx/jface/text/templates/Template.d dwtx/jface/text/templates/TemplateCompletionProcessor.d dwtx/jface/text/templates/TemplateContext.d dwtx/jface/text/templates/TemplateContextType.d dwtx/jface/text/templates/TemplateProposal.d dwtx/jface/text/templates/TemplateTranslator.d dwtx/jface/text/templates/TemplateVariableType.d dwtx/jface/text/templates/persistence/TemplateReaderWriter.d dwtx/jface/text/templates/persistence/TemplateStore.d dwtx/text/edits/CopySourceEdit.d dwtx/text/edits/CopyTargetEdit.d dwtx/text/edits/MoveSourceEdit.d dwtx/text/edits/MoveTargetEdit.d dwtx/text/edits/MultiTextEdit.d dwtx/text/edits/TextEdit.d dwtx/text/edits/TextEditCopier.d dwtx/text/edits/TextEditGroup.d dwtx/text/edits/TextEditProcessor.d dwtx/text/undo/DocumentUndoManager.d dwtx/text/undo/DocumentUndoManagerRegistry.d
diffstat 148 files changed, 1098 insertions(+), 1098 deletions(-) [+]
line wrap: on
line diff
--- a/dwtx/jface/internal/text/InformationControlReplacer.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/internal/text/InformationControlReplacer.d	Sun Aug 24 01:46:20 2008 +0200
@@ -123,7 +123,7 @@
             return;
         }
         
-        if (DEBUG)
+        if cast(DEBUG)
             System.out.println("InformationControlReplacer: no active replaceable"); //$NON-NLS-1$
     }
 
@@ -139,7 +139,7 @@
         
         Rectangle controlBounds= fContentBounds;
         if (informationControl instanceof IInformationControlExtension3) {
-            IInformationControlExtension3 iControl3= (IInformationControlExtension3) informationControl;
+            IInformationControlExtension3 iControl3= cast(IInformationControlExtension3) informationControl;
             Rectangle trim= iControl3.computeTrim();
             controlBounds= Geometry.add(controlBounds, trim);
             
@@ -160,7 +160,7 @@
         informationControl.setSizeConstraints(size.x, size.y);
         
         if (informationControl instanceof IInformationControlExtension2)
-            ((IInformationControlExtension2) informationControl).setInput(information);
+            (cast(IInformationControlExtension2) informationControl).setInput(information);
         else
             informationControl.setInformation(information.toString());
         
@@ -185,7 +185,7 @@
         if (! isReplacing()) {
             fDelayedInformationSet= true;
         } else if (getCurrentInformationControl2() instanceof IInformationControlExtension2) {
-            ((IInformationControlExtension2) getCurrentInformationControl2()).setInput(input);
+            (cast(IInformationControlExtension2) getCurrentInformationControl2()).setInput(input);
         } else if (getCurrentInformationControl2() !is null) {
             getCurrentInformationControl2().setInformation(input.toString());
         }
--- a/dwtx/jface/internal/text/StickyHoverManager.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/internal/text/StickyHoverManager.d	Sun Aug 24 01:46:20 2008 +0200
@@ -230,7 +230,7 @@
          * @see dwt.events.FocusListener#focusLost(dwt.events.FocusEvent)
          */
         public void focusLost(FocusEvent e) {
-            if (DEBUG) System.out.println("StickyHoverManager.Closer.focusLost(): " + e); //$NON-NLS-1$
+            if cast(DEBUG) System.out.println("StickyHoverManager.Closer.focusLost(): " + e); //$NON-NLS-1$
             Display d= fSubjectControl.getDisplay();
             d.asyncExec(new Runnable() {
                 // Without the asyncExec, mouse clicks to the workbench window are swallowed.
@@ -250,11 +250,11 @@
                 
                 IInformationControl infoControl= getCurrentInformationControl2();
                 if (infoControl !is null && !infoControl.isFocusControl() && infoControl instanceof IInformationControlExtension3) {
-//                  if (DEBUG) System.out.println("StickyHoverManager.Closer.handleEvent(): activeShell= " + fDisplay.getActiveShell()); //$NON-NLS-1$
-                    IInformationControlExtension3 iControl3= (IInformationControlExtension3) infoControl;
+//                  if cast(DEBUG) System.out.println("StickyHoverManager.Closer.handleEvent(): activeShell= " + fDisplay.getActiveShell()); //$NON-NLS-1$
+                    IInformationControlExtension3 iControl3= cast(IInformationControlExtension3) infoControl;
                     Rectangle controlBounds= iControl3.getBounds();
                     if (controlBounds !is null) {
-                        Point mouseLoc= event.display.map((Control) event.widget, null, event.x, event.y);
+                        Point mouseLoc= event.display.map(cast(Control) event.widget, null, event.x, event.y);
                         int margin= getKeepUpMargin();
                         Geometry.expand(controlBounds, margin, margin, margin, margin);
                         if (!controlBounds.contains(mouseLoc)) {
@@ -272,7 +272,7 @@
                 }
                 
             } else if (event.type is DWT.FocusOut) {
-                if (DEBUG) System.out.println("StickyHoverManager.Closer.handleEvent(): focusOut: " + event); //$NON-NLS-1$
+                if cast(DEBUG) System.out.println("StickyHoverManager.Closer.handleEvent(): focusOut: " + event); //$NON-NLS-1$
                 IInformationControl iControl= getCurrentInformationControl2();
                 if (iControl !is null && ! iControl.isFocusControl())
                     hideInformationControl();
@@ -305,7 +305,7 @@
         if (fTextViewer !is null && fTextViewer.requestWidgetToken(this, WIDGET_PRIORITY))
             super.showInformationControl(subjectArea);
         else
-            if (DEBUG)
+            if cast(DEBUG)
                 System.out.println("cancelled StickyHoverManager.showInformationControl(..): did not get widget token (with prio)"); //$NON-NLS-1$
     }
 
@@ -338,7 +338,7 @@
      */
     public bool requestWidgetToken(IWidgetTokenOwner owner) {
         hideInformationControl();
-        if (DEBUG)
+        if cast(DEBUG)
             System.out.println("StickyHoverManager gave up widget token (no prio)"); //$NON-NLS-1$
         return true;
     }
@@ -349,21 +349,21 @@
     public bool requestWidgetToken(IWidgetTokenOwner owner, int priority) {
         if (getCurrentInformationControl2() !is null) {
             if (getCurrentInformationControl2().isFocusControl()) {
-                if (DEBUG)
+                if cast(DEBUG)
                     System.out.println("StickyHoverManager kept widget token (focused)"); //$NON-NLS-1$
                 return false;
             } else if (priority > WIDGET_PRIORITY) {
                 hideInformationControl();
-                if (DEBUG)
+                if cast(DEBUG)
                     System.out.println("StickyHoverManager gave up widget token (prio)"); //$NON-NLS-1$
                 return true;
             } else {
-                if (DEBUG)
+                if cast(DEBUG)
                     System.out.println("StickyHoverManager kept widget token (prio)"); //$NON-NLS-1$
                 return false;
             }
         }
-        if (DEBUG)
+        if cast(DEBUG)
             System.out.println("StickyHoverManager gave up widget token (no iControl)"); //$NON-NLS-1$
         return true;
     }
@@ -374,7 +374,7 @@
     public bool setFocus(IWidgetTokenOwner owner) {
         IInformationControl iControl= getCurrentInformationControl2();
         if (iControl instanceof IInformationControlExtension5) {
-            IInformationControlExtension5 iControl5= (IInformationControlExtension5) iControl;
+            IInformationControlExtension5 iControl5= cast(IInformationControlExtension5) iControl;
             if (iControl5.isVisible()) {
                 iControl.setFocus();
                 return iControl.isFocusControl();
--- a/dwtx/jface/internal/text/TableOwnerDrawSupport.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/internal/text/TableOwnerDrawSupport.d	Sun Aug 24 01:46:20 2008 +0200
@@ -106,7 +106,7 @@
      * @param event the event
      */
     private void performPaint(Event event) {
-        TableItem item= (TableItem) event.item;
+        TableItem item= cast(TableItem) event.item;
         GC gc= event.gc;
         int index= event.index;
         
@@ -145,7 +145,7 @@
             for (int i= 0; i < ranges.length; i++) {
                 StyleRange curr= ranges[i];
                 if (isSelected) {
-                    curr= (StyleRange) curr.clone();
+                    curr= cast(StyleRange) curr.clone();
                     curr.foreground= null;
                     curr.background= null;
                 }
--- a/dwtx/jface/internal/text/html/BrowserInformationControl.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/internal/text/html/BrowserInformationControl.d	Sun Aug 24 01:46:20 2008 +0200
@@ -275,11 +275,11 @@
         Assert.isLegal(input is null || input instanceof String || input instanceof BrowserInformationControlInput);
 
         if (input instanceof String) {
-            setInformation((String)input);
+            setInformation(cast(String)input);
             return;
         }
 
-        fInput= (BrowserInformationControlInput)input;
+        fInput= cast(BrowserInformationControlInput)input;
         
         String content= null;
         if (fInput !is null)
@@ -322,7 +322,7 @@
         
         Object[] listeners= fInputChangeListeners.getListeners();
         for (int i= 0; i < listeners.length; i++)
-            ((IInputChangedListener)listeners[i]).inputChanged(fInput);
+            (cast(IInputChangedListener)listeners[i]).inputChanged(fInput);
     }
 
     /*
@@ -454,7 +454,7 @@
         fTextLayout.setWidth(sizeConstraints is null ? DWT.DEFAULT : sizeConstraints.x - trim.width);
         Iterator iter= presentation.getAllStyleRangeIterator();
         while (iter.hasNext()) {
-            StyleRange sr= (StyleRange)iter.next();
+            StyleRange sr= cast(StyleRange)iter.next();
             if (sr.fontStyle is DWT.BOLD)
                 fTextLayout.setStyle(fBoldStyle, sr.start, sr.start + sr.length - 1);
         }
@@ -502,7 +502,7 @@
         Rectangle trim= super.computeTrim();
         if (isResizable()) {
             bool RTL= (getShell().getStyle() & DWT.RIGHT_TO_LEFT) !is 0;
-            if (RTL) {
+            if cast(RTL) {
                 trim.x-= fgScrollBarSize.x;
             }
             trim.width+= fgScrollBarSize.x;
--- a/dwtx/jface/internal/text/html/HTML2TextReader.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/internal/text/html/HTML2TextReader.d	Sun Aug 24 01:46:20 2008 +0200
@@ -252,13 +252,13 @@
             ch= nextChar();
 
             while (ch !is -1 && ch !is '>') {
-                buf.append(Character.toLowerCase((char) ch));
+                buf.append(Character.toLowerCase(cast(wchar) ch));
                 ch= nextChar();
                 if (ch is '"'){
-                    buf.append(Character.toLowerCase((char) ch));
+                    buf.append(Character.toLowerCase(cast(wchar) ch));
                     ch= nextChar();
                     while (ch !is -1 && ch !is '"'){
-                        buf.append(Character.toLowerCase((char) ch));
+                        buf.append(Character.toLowerCase(cast(wchar) ch));
                         ch= nextChar();
                     }
                 }
@@ -275,7 +275,7 @@
                 break;
             }
             // unfinished comment
-            buf.append((char) ch);
+            buf.append(cast(wchar) ch);
         } while (true);
 
         return html2Text(buf.toString());
@@ -298,7 +298,7 @@
 
 
     private void unread(int ch) throws IOException {
-        ((PushbackReader) getReader()).unread(ch);
+        (cast(PushbackReader) getReader()).unread(ch);
     }
 
     protected String entity2Text(String symbol) {
@@ -310,11 +310,11 @@
                 } else {
                     ch= Integer.parseInt(symbol.substring(1), 10);
                 }
-                return EMPTY_STRING + (char)ch;
+                return EMPTY_STRING + cast(wchar)ch;
             } catch (NumberFormatException e) {
             }
         } else {
-            String str= (String) fgEntityLookup.get(symbol);
+            String str= cast(String) fgEntityLookup.get(symbol);
             if (str !is null) {
                 return str;
             }
@@ -328,8 +328,8 @@
     private String processEntity() throws IOException {
         StringBuffer buf= new StringBuffer();
         int ch= nextChar();
-        while (Character.isLetterOrDigit((char)ch) || ch is '#') {
-            buf.append((char) ch);
+        while (Character.isLetterOrDigit(cast(wchar)ch) || ch is '#') {
+            buf.append(cast(wchar) ch);
             ch= nextChar();
         }
 
@@ -338,7 +338,7 @@
 
         buf.insert(0, '&');
         if (ch !is -1)
-            buf.append((char) ch);
+            buf.append(cast(wchar) ch);
         return buf.toString();
     }
 }
--- a/dwtx/jface/internal/text/html/HTMLTextPresenter.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/internal/text/html/HTMLTextPresenter.d	Sun Aug 24 01:46:20 2008 +0200
@@ -72,7 +72,7 @@
         Iterator e= presentation.getAllStyleRangeIterator();
         while (e.hasNext()) {
 
-            StyleRange range= (StyleRange) e.next();
+            StyleRange range= cast(StyleRange) e.next();
 
             int myStart= range.start;
             int myEnd=   range.start + range.length -1;
@@ -115,7 +115,7 @@
      * @deprecated
      */
     public String updatePresentation(Display display, String hoverInfo, TextPresentation presentation, int maxWidth, int maxHeight) {
-        return updatePresentation((Drawable)display, hoverInfo, presentation, maxWidth, maxHeight);
+        return updatePresentation(cast(Drawable)display, hoverInfo, presentation, maxWidth, maxHeight);
     }
 
     /*
--- a/dwtx/jface/internal/text/html/SingleCharReader.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/internal/text/html/SingleCharReader.d	Sun Aug 24 01:46:20 2008 +0200
@@ -51,7 +51,7 @@
                     return -1;
                 return i - off;
             }
-            cbuf[i]= (char)ch;
+            cbuf[i]= cast(wchar)ch;
         }
         return len;
     }
@@ -72,7 +72,7 @@
         StringBuffer buf= new StringBuffer();
         int ch;
         while ((ch= read()) !is -1) {
-            buf.append((char)ch);
+            buf.append(cast(wchar)ch);
         }
         return buf.toString();
     }
--- a/dwtx/jface/internal/text/html/SubstitutionTextReader.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/internal/text/html/SubstitutionTextReader.d	Sun Aug 24 01:46:20 2008 +0200
@@ -102,10 +102,10 @@
         if (ch is -1) {
             ch= fReader.read();
         }
-        if (fSkipWhiteSpace && Character.isWhitespace((char)ch)) {
+        if (fSkipWhiteSpace && Character.isWhitespace(cast(wchar)ch)) {
             do {
                 ch= fReader.read();
-            } while (Character.isWhitespace((char)ch));
+            } while (Character.isWhitespace(cast(wchar)ch));
             if (ch !is -1) {
                 fCharAfterWhiteSpace= ch;
                 return ' ';
--- a/dwtx/jface/internal/text/link/contentassist/AdditionalInfoController2.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/internal/text/link/contentassist/AdditionalInfoController2.d	Sun Aug 24 01:46:20 2008 +0200
@@ -117,7 +117,7 @@
         super.install(control);
 
         Assert.isTrue(control instanceof Table);
-        fProposalTable= (Table) control;
+        fProposalTable= cast(Table) control;
         fProposalTable.addSelectionListener(fSelectionListener);
         synchronized (fThreadAccess) {
             if (fThread !is null)
@@ -235,12 +235,12 @@
             Object d= item.getData();
 
             if (d instanceof ICompletionProposal) {
-                ICompletionProposal p= (ICompletionProposal) d;
+                ICompletionProposal p= cast(ICompletionProposal) d;
                 information= p.getAdditionalProposalInfo();
             }
 
             if (d instanceof ICompletionProposalExtension3)
-                setCustomInformationControlCreator(((ICompletionProposalExtension3) d).getInformationControlCreator());
+                setCustomInformationControlCreator((cast(ICompletionProposalExtension3) d).getInformationControlCreator());
             else
                 setCustomInformationControlCreator(null);
 
--- a/dwtx/jface/internal/text/link/contentassist/CompletionProposalPopup2.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/internal/text/link/contentassist/CompletionProposalPopup2.d	Sun Aug 24 01:46:20 2008 +0200
@@ -227,7 +227,7 @@
 
                     if (count is 1 && !autoActivated && fContentAssistant.isAutoInserting())
 
-                        insertProposal(fComputedProposals[0], (char) 0, 0, fInvocationOffset);
+                        insertProposal(fComputedProposals[0], cast(wchar) 0, 0, fInvocationOffset);
 
                     else {
 
@@ -368,7 +368,7 @@
         ICompletionProposal p= getSelectedProposal();
         hide();
         if (p !is null)
-            insertProposal(p, (char) 0, stateMask, fViewer.getSelectedRange().x);
+            insertProposal(p, cast(wchar) 0, stateMask, fViewer.getSelectedRange().x);
     }
 
     /**
@@ -392,7 +392,7 @@
             IDocument document= fViewer.getDocument();
 
             if (fViewer instanceof ITextViewerExtension) {
-                ITextViewerExtension extension= (ITextViewerExtension) fViewer;
+                ITextViewerExtension extension= cast(ITextViewerExtension) fViewer;
                 target= extension.getRewriteTarget();
             }
 
@@ -400,15 +400,15 @@
                 target.beginCompoundChange();
 
             if (fViewer instanceof IEditingSupportRegistry) {
-                registry= (IEditingSupportRegistry) fViewer;
+                registry= cast(IEditingSupportRegistry) fViewer;
                 registry.register(fModificationEditingSupport);
             }
 
             if (p instanceof ICompletionProposalExtension2) {
-                ICompletionProposalExtension2 e= (ICompletionProposalExtension2) p;
+                ICompletionProposalExtension2 e= cast(ICompletionProposalExtension2) p;
                 e.apply(fViewer, trigger, stateMask, offset);
             } else if (p instanceof ICompletionProposalExtension) {
-                ICompletionProposalExtension e= (ICompletionProposalExtension) p;
+                ICompletionProposalExtension e= cast(ICompletionProposalExtension) p;
                 e.apply(document, trigger, offset);
             } else {
                 p.apply(document);
@@ -425,7 +425,7 @@
 
                 int position;
                 if (p instanceof ICompletionProposalExtension) {
-                    ICompletionProposalExtension e= (ICompletionProposalExtension) p;
+                    ICompletionProposalExtension e= cast(ICompletionProposalExtension) p;
                     position= e.getContextInformationPosition();
                 } else {
                     if (selection is null)
@@ -469,7 +469,7 @@
         unregister();
 
         if (fViewer instanceof IEditingSupportRegistry) {
-            IEditingSupportRegistry registry= (IEditingSupportRegistry) fViewer;
+            IEditingSupportRegistry registry= cast(IEditingSupportRegistry) fViewer;
             registry.unregister(fFocusEditingSupport);
         }
 
@@ -503,7 +503,7 @@
 
         if (fLastProposal !is null) {
             if (fLastProposal instanceof ICompletionProposalExtension2) {
-                ICompletionProposalExtension2 extension= (ICompletionProposalExtension2) fLastProposal;
+                ICompletionProposalExtension2 extension= cast(ICompletionProposalExtension2) fLastProposal;
                 extension.unselected(fViewer);
             }
 
@@ -534,7 +534,7 @@
 
             ICompletionProposal oldProposal= getSelectedProposal();
             if (oldProposal instanceof ICompletionProposalExtension2)
-                ((ICompletionProposalExtension2) oldProposal).unselected(fViewer);
+                (cast(ICompletionProposalExtension2) oldProposal).unselected(fViewer);
 
             fFilteredProposals= proposals;
 
@@ -560,7 +560,7 @@
                 String displayString;
                 StyleRange[] styleRanges= null;
                 if (fIsColoredLabelsSupportEnabled && p instanceof ICompletionProposalExtension6) {
-                    StyledString styledString= ((ICompletionProposalExtension6)p).getStyledDisplayString();
+                    StyledString styledString= (cast(ICompletionProposalExtension6)p).getStyledDisplayString();
                     displayString= styledString.getString();
                     styleRanges= styledString.getStyleRanges();
                 } else
@@ -590,7 +590,7 @@
         // will cause flicker, though
         fProposalTable.setRedraw(true);
 
-        int width= adjustWidth ? DWT.DEFAULT : ((GridData)fProposalTable.getLayoutData()).widthHint;
+        int width= adjustWidth ? DWT.DEFAULT : (cast(GridData)fProposalTable.getLayoutData()).widthHint;
         Point size= fProposalTable.computeSize(width, DWT.DEFAULT, true);
 
         GridData data= new GridData(GridData.FILL_BOTH);
@@ -628,11 +628,11 @@
     private bool validateProposal(IDocument document, ICompletionProposal p, int offset, DocumentEvent event) {
         // detect selected
         if (p instanceof ICompletionProposalExtension2) {
-            ICompletionProposalExtension2 e= (ICompletionProposalExtension2) p;
+            ICompletionProposalExtension2 e= cast(ICompletionProposalExtension2) p;
             if (e.validate(document, offset, event))
                 return true;
         } else if (p instanceof ICompletionProposalExtension) {
-            ICompletionProposalExtension e= (ICompletionProposalExtension) p;
+            ICompletionProposalExtension e= cast(ICompletionProposalExtension) p;
             if (e.isValidFor(document, offset))
                 return true;
         }
@@ -681,7 +681,7 @@
 
 
             if (fViewer instanceof IEditingSupportRegistry) {
-                IEditingSupportRegistry registry= (IEditingSupportRegistry) fViewer;
+                IEditingSupportRegistry registry= cast(IEditingSupportRegistry) fViewer;
                 registry.register(fFocusEditingSupport);
             }
 
@@ -788,13 +788,13 @@
                 default:
                     ICompletionProposal p= getSelectedProposal();
                 if (p instanceof ICompletionProposalExtension) {
-                    ICompletionProposalExtension t= (ICompletionProposalExtension) p;
+                    ICompletionProposalExtension t= cast(ICompletionProposalExtension) p;
                     char[] triggers= t.getTriggerCharacters();
                     if (contains(triggers, key)) {
                         hide();
                         if (key is ';') {
                             e.doit= true;
-                            insertProposal(p, (char) 0, e.stateMask, fViewer.getSelectedRange().x);
+                            insertProposal(p, cast(wchar) 0, e.stateMask, fViewer.getSelectedRange().x);
                         } else {
                             e.doit= false;
                             insertProposal(p, key, e.stateMask, fViewer.getSelectedRange().x);
@@ -818,11 +818,11 @@
 
         ICompletionProposal oldProposal= getSelectedProposal();
         if (oldProposal instanceof ICompletionProposalExtension2)
-            ((ICompletionProposalExtension2) oldProposal).unselected(fViewer);
+            (cast(ICompletionProposalExtension2) oldProposal).unselected(fViewer);
 
         ICompletionProposal proposal= fFilteredProposals[index];
         if (proposal instanceof ICompletionProposalExtension2)
-            ((ICompletionProposalExtension2) proposal).selected(fViewer, smartToggle);
+            (cast(ICompletionProposalExtension2) proposal).selected(fViewer, smartToggle);
 
         fLastProposal= proposal;
 
@@ -926,13 +926,13 @@
 
             if (proposals[i] instanceof ICompletionProposalExtension2) {
 
-                ICompletionProposalExtension2 p= (ICompletionProposalExtension2) proposals[i];
+                ICompletionProposalExtension2 p= cast(ICompletionProposalExtension2) proposals[i];
                 if (p.validate(document, offset, event))
                     filtered.add(p);
 
             } else if (proposals[i] instanceof ICompletionProposalExtension) {
 
-                ICompletionProposalExtension p= (ICompletionProposalExtension) proposals[i];
+                ICompletionProposalExtension p= cast(ICompletionProposalExtension) proposals[i];
                 if (p.isValidFor(document, offset))
                     filtered.add(p);
 
--- a/dwtx/jface/internal/text/link/contentassist/ContentAssistant2.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/internal/text/link/contentassist/ContentAssistant2.d	Sun Aug 24 01:46:20 2008 +0200
@@ -402,7 +402,7 @@
                     if (fContextType is LAYOUT_CONTEXT_SELECTOR &&
                             Helper2.okToUse(fShells[LAYOUT_CONTEXT_SELECTOR])) {
                         // Restore event notification to the tip popup.
-                        addContentAssistListener((IContentAssistListener2) fPopups[LAYOUT_CONTEXT_SELECTOR], CONTEXT_SELECTOR);
+                        addContentAssistListener(cast(IContentAssistListener2) fPopups[LAYOUT_CONTEXT_SELECTOR], CONTEXT_SELECTOR);
                     }
                     break;
 
@@ -411,7 +411,7 @@
                         if (fProposalPopupOrientation is PROPOSAL_STACKED)
                             layout(LAYOUT_PROPOSAL_SELECTOR, getSelectionOffset());
                         // Restore event notification to the proposal popup.
-                        addContentAssistListener((IContentAssistListener2) fPopups[LAYOUT_PROPOSAL_SELECTOR], PROPOSAL_SELECTOR);
+                        addContentAssistListener(cast(IContentAssistListener2) fPopups[LAYOUT_PROPOSAL_SELECTOR], PROPOSAL_SELECTOR);
                     }
                     fContextType= LAYOUT_CONTEXT_INFO_POPUP;
                     break;
@@ -609,12 +609,12 @@
                     if (fContextType is LAYOUT_CONTEXT_SELECTOR &&
                             Helper2.okToUse(fShells[LAYOUT_CONTEXT_SELECTOR]))
                         // Disable event notification to the tip selector.
-                        removeContentAssistListener((IContentAssistListener2) fPopups[LAYOUT_CONTEXT_SELECTOR], CONTEXT_SELECTOR);
+                        removeContentAssistListener(cast(IContentAssistListener2) fPopups[LAYOUT_CONTEXT_SELECTOR], CONTEXT_SELECTOR);
                     break;
                 case LAYOUT_CONTEXT_SELECTOR:
                     if (Helper2.okToUse(fShells[LAYOUT_PROPOSAL_SELECTOR]))
                         // Disable event notification to the proposal selector.
-                        removeContentAssistListener((IContentAssistListener2) fPopups[LAYOUT_PROPOSAL_SELECTOR], PROPOSAL_SELECTOR);
+                        removeContentAssistListener(cast(IContentAssistListener2) fPopups[LAYOUT_PROPOSAL_SELECTOR], PROPOSAL_SELECTOR);
                     break;
                 case LAYOUT_CONTEXT_INFO_POPUP:
                     break;
@@ -800,7 +800,7 @@
         if (fProcessors is null)
             return null;
 
-        return (IContentAssistProcessor) fProcessors.get(contentType);
+        return cast(IContentAssistProcessor) fProcessors.get(contentType);
     }
 
     /**
@@ -849,7 +849,7 @@
             if (fViewer !is null && fAutoAssistListener is null) {
                 fAutoAssistListener= new AutoAssistListener();
                 if (fViewer instanceof ITextViewerExtension) {
-                    ITextViewerExtension extension= (ITextViewerExtension) fViewer;
+                    ITextViewerExtension extension= cast(ITextViewerExtension) fViewer;
                     extension.appendVerifyKeyListener(fAutoAssistListener);
                 } else {
                     StyledText textWidget= fViewer.getTextWidget();
@@ -861,7 +861,7 @@
         } else if (fAutoAssistListener !is null) {
 
             if (fViewer instanceof ITextViewerExtension) {
-                ITextViewerExtension extension= (ITextViewerExtension) fViewer;
+                ITextViewerExtension extension= cast(ITextViewerExtension) fViewer;
                 extension.removeVerifyKeyListener(fAutoAssistListener);
             } else {
                 StyledText textWidget= fViewer.getTextWidget();
@@ -1125,10 +1125,10 @@
             case CONTEXT_SELECTOR:
             case PROPOSAL_SELECTOR:
                 if (fViewer instanceof IWidgetTokenOwner) {
-                    IWidgetTokenOwner owner= (IWidgetTokenOwner) fViewer;
+                    IWidgetTokenOwner owner= cast(IWidgetTokenOwner) fViewer;
                     return owner.requestWidgetToken(this);
                 } else if (fViewer instanceof IWidgetTokenOwnerExtension)  {
-                    IWidgetTokenOwnerExtension extension= (IWidgetTokenOwnerExtension) fViewer;
+                    IWidgetTokenOwnerExtension extension= cast(IWidgetTokenOwnerExtension) fViewer;
                     return extension.requestWidgetToken(this, WIDGET_PRIORITY);
                 }
         }
@@ -1178,7 +1178,7 @@
             if (Helper2.okToUse(text)) {
 
                 if (fViewer instanceof ITextViewerExtension) {
-                    ITextViewerExtension e= (ITextViewerExtension) fViewer;
+                    ITextViewerExtension e= cast(ITextViewerExtension) fViewer;
                     e.prependVerifyKeyListener(fInternalListener);
                 } else {
                     text.addVerifyKeyListener(fInternalListener);
@@ -1206,7 +1206,7 @@
     private void releaseWidgetToken(int type) {
         if (fListeners[CONTEXT_SELECTOR] is null && fListeners[PROPOSAL_SELECTOR] is null) {
             if (fViewer instanceof IWidgetTokenOwner) {
-                IWidgetTokenOwner owner= (IWidgetTokenOwner) fViewer;
+                IWidgetTokenOwner owner= cast(IWidgetTokenOwner) fViewer;
                 owner.releaseWidgetToken(this);
             }
         }
@@ -1246,7 +1246,7 @@
             if (Helper2.okToUse(text)) {
 
                 if (fViewer instanceof ITextViewerExtension) {
-                    ITextViewerExtension e= (ITextViewerExtension) fViewer;
+                    ITextViewerExtension e= cast(ITextViewerExtension) fViewer;
                     e.removeVerifyKeyListener(fInternalListener);
                 } else {
                     text.removeVerifyKeyListener(fInternalListener);
@@ -1434,7 +1434,7 @@
     IContextInformationPresenter getContextInformationPresenter(ITextViewer textViewer, int offset) {
         IContextInformationValidator validator= getContextInformationValidator(textViewer, offset);
         if (validator instanceof IContextInformationPresenter)
-            return (IContextInformationPresenter) validator;
+            return cast(IContextInformationPresenter) validator;
         return null;
     }
 
@@ -1554,7 +1554,7 @@
     public void fireProposalChosen(ICompletionProposal proposal) {
         List list= new ArrayList(fProposalListeners);
         for (Iterator it= list.iterator(); it.hasNext();) {
-            IProposalListener listener= (IProposalListener) it.next();
+            IProposalListener listener= cast(IProposalListener) it.next();
             listener.proposalChosen(proposal);
         }
 
--- a/dwtx/jface/internal/text/link/contentassist/ContextInformationPopup2.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/internal/text/link/contentassist/ContextInformationPopup2.d	Sun Aug 24 01:46:20 2008 +0200
@@ -184,7 +184,7 @@
         if (validator !is null) {
             ContextFrame current= new ContextFrame();
             current.fInformation= information;
-            current.fBeginOffset= (information instanceof IContextInformationExtension) ? ((IContextInformationExtension) information).getContextInformationPosition() : offset;
+            current.fBeginOffset= (information instanceof IContextInformationExtension) ? (cast(IContextInformationExtension) information).getContextInformationPosition() : offset;
             if (current.fBeginOffset is -1) current.fBeginOffset= offset;
             current.fOffset= offset;
             current.fVisibleOffset= fViewer.getTextWidget().getSelectionRange().x - (offset - current.fBeginOffset);
@@ -306,7 +306,7 @@
             }
 
             if (size > 0) {
-                ContextFrame current= (ContextFrame) fContextFrameStack.peek();
+                ContextFrame current= cast(ContextFrame) fContextFrameStack.peek();
                 internalShowContextFrame(current, false);
             } else {
 
@@ -634,7 +634,7 @@
          */
         fContextInfoPopup.getDisplay().asyncExec(new Runnable() {
 
-            private ContextFrame fFrame= (ContextFrame) fContextFrameStack.peek();
+            private ContextFrame fFrame= cast(ContextFrame) fContextFrameStack.peek();
 
             public void run() {
                 if (Helper2.okToUse(fContextInfoPopup) && fFrame is fContextFrameStack.peek()) {
--- a/dwtx/jface/internal/text/revisions/ChangeRegion.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/internal/text/revisions/ChangeRegion.d	Sun Aug 24 01:46:20 2008 +0200
@@ -96,8 +96,8 @@
         if (fAdjusted.isEmpty())
             return new LineRange(fLines.getStartLine(), 0);
         
-        Range first= (Range) fAdjusted.get(0);
-        Range last= (Range) fAdjusted.get(fAdjusted.size() - 1);
+        Range first= cast(Range) fAdjusted.get(0);
+        Range last= cast(Range) fAdjusted.get(fAdjusted.size() - 1);
         
         return Range.createAbsolute(first.start(), last.end());
     }
@@ -117,7 +117,7 @@
      */
     public void adjustTo(Hunk hunk) {
         for (ListIterator it= fAdjusted.listIterator(); it.hasNext();) {
-            Range range= (Range) it.next();
+            Range range= cast(Range) it.next();
             
             // do we need a split?
             int unchanged= getUnchanged(hunk, range.start());
--- a/dwtx/jface/internal/text/revisions/Colors.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/internal/text/revisions/Colors.d	Sun Aug 24 01:46:20 2008 +0200
@@ -130,9 +130,9 @@
             b= hue2RGB(temp1, temp2, hue - 1f/3f);
         }
 
-        int red = (int)(r * 255 + 0.5);
-        int green = (int)(g * 255 + 0.5);
-        int blue = (int)(b * 255 + 0.5);    
+        int red = cast(int)(r * 255 + 0.5);
+        int green = cast(int)(g * 255 + 0.5);
+        int blue = cast(int)(b * 255 + 0.5);    
         return new RGB(red, green, blue);
     }
 
@@ -168,9 +168,9 @@
 
         float complement= 1f - factor;
         return new RGB(
-                (int) (complement * bg.red + factor * fg.red),
-                (int) (complement * bg.green + factor * fg.green),
-                (int) (complement * bg.blue + factor * fg.blue)
+                cast(int) (complement * bg.red + factor * fg.red),
+                cast(int) (complement * bg.green + factor * fg.green),
+                cast(int) (complement * bg.blue + factor * fg.blue)
         );
     }
 
--- a/dwtx/jface/internal/text/revisions/Hunk.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/internal/text/revisions/Hunk.d	Sun Aug 24 01:46:20 2008 +0200
@@ -87,7 +87,7 @@
         if (obj is this)
             return true;
         if (obj instanceof Hunk) {
-            Hunk other= (Hunk) obj;
+            Hunk other= cast(Hunk) obj;
             return other.line is this.line && other.delta is this.delta && other.changed is this.changed;
         }
         return false;
--- a/dwtx/jface/internal/text/revisions/RevisionPainter.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/internal/text/revisions/RevisionPainter.d	Sun Aug 24 01:46:20 2008 +0200
@@ -172,7 +172,7 @@
                 return;
             List revisions= new ArrayList();
             for (Iterator it= info.getRevisions().iterator(); it.hasNext();) {
-                Revision revision= (Revision) it.next();
+                Revision revision= cast(Revision) it.next();
                 revisions.add(new Long(computeAge(revision)));
             }
             Collections.sort(revisions);
@@ -206,7 +206,7 @@
                 if (index is -1 || size < 2)
                     scale= 0.5f;
                 else
-                    scale= (float) index / (size - 1);
+                    scale= cast(float) index / (size - 1);
             } else {
                 Assert.isTrue(false);
                 return null; // dummy
@@ -259,7 +259,7 @@
          */
         public RGB getColor(Revision revision, bool focus) {
             Map map= focus ? fFocusColors : fColors;
-            RGB color= (RGB) map.get(revision);
+            RGB color= cast(RGB) map.get(revision);
             if (color !is null)
                 return color;
             
@@ -416,7 +416,7 @@
          */
         public bool canReplace(IInformationControlCreator creator) {
             return creator.getClass() is getClass()
-                    && ((HoverInformationControlCreator) creator).fIsFocusable is fIsFocusable;
+                    && (cast(HoverInformationControlCreator) creator).fIsFocusable is fIsFocusable;
         }
     }
 
@@ -657,7 +657,7 @@
             fRevisionInfo= info;
             clearRangeCache();
             updateFocusRange(null);
-            handleRevisionSelected((Revision) null);
+            handleRevisionSelected(cast(Revision) null);
             fColorTool.setInfo(info);
             postRedraw();
             informListeners();
@@ -735,7 +735,7 @@
         // draw change regions
         List/* <RevisionRange> */ranges= getRanges(visibleLines);
         for (Iterator it= ranges.iterator(); it.hasNext();) {
-            RevisionRange region= (RevisionRange) it.next();
+            RevisionRange region= cast(RevisionRange) it.next();
             paintRange(region, gc);
         }
     }
@@ -794,7 +794,7 @@
     public void setModel(IAnnotationModel model) {
         IAnnotationModel diffModel;
         if (model instanceof IAnnotationModelExtension)
-            diffModel= ((IAnnotationModelExtension) model).getAnnotationModel(IChangeRulerColumn.QUICK_DIFF_MODEL_ID);
+            diffModel= (cast(IAnnotationModelExtension) model).getAnnotationModel(IChangeRulerColumn.QUICK_DIFF_MODEL_ID);
         else
             diffModel= model;
 
@@ -821,10 +821,10 @@
         if (differ instanceof ILineDiffer || differ is null) {
             if (fLineDiffer !is differ) {
                 if (fLineDiffer !is null)
-                    ((IAnnotationModel) fLineDiffer).removeAnnotationModelListener(fAnnotationListener);
-                fLineDiffer= (ILineDiffer) differ;
+                    (cast(IAnnotationModel) fLineDiffer).removeAnnotationModelListener(fAnnotationListener);
+                fLineDiffer= cast(ILineDiffer) differ;
                 if (fLineDiffer !is null)
-                    ((IAnnotationModel) fLineDiffer).addAnnotationModelListener(fAnnotationListener);
+                    (cast(IAnnotationModel) fLineDiffer).addAnnotationModelListener(fAnnotationListener);
             }
         }
     }
@@ -836,7 +836,7 @@
         updateFocusLine(-1);
 
         if (fLineDiffer !is null) {
-            ((IAnnotationModel) fLineDiffer).removeAnnotationModelListener(fAnnotationListener);
+            (cast(IAnnotationModel) fLineDiffer).removeAnnotationModelListener(fAnnotationListener);
             fLineDiffer= null;
         }
         
@@ -947,13 +947,13 @@
             return null;
 
         for (Iterator it= ranges.iterator(); it.hasNext();) {
-            RevisionRange range= (RevisionRange) it.next();
+            RevisionRange range= cast(RevisionRange) it.next();
             if (contains(range, line))
                 return range;
         }
 
         // line may be right after the last region
-        RevisionRange lastRegion= (RevisionRange) ranges.get(ranges.size() - 1);
+        RevisionRange lastRegion= cast(RevisionRange) ranges.get(ranges.size() - 1);
         if (line is end(lastRegion))
             return lastRegion;
         return null;
@@ -972,7 +972,7 @@
         int end= end(lines);
         int first= -1, last= -1;
         for (int i= 0; i < ranges.size(); i++) {
-            RevisionRange range= (RevisionRange) ranges.get(i);
+            RevisionRange range= cast(RevisionRange) ranges.get(i);
             int rangeEnd= end(range);
             if (first is -1 && rangeEnd > lines.getStartLine())
                 first= i;
@@ -1053,7 +1053,7 @@
         int widgetStartLine= -1;
         int widgetEndLine= -1;
         if (fViewer instanceof ITextViewerExtension5) {
-            ITextViewerExtension5 extension= (ITextViewerExtension5) fViewer;
+            ITextViewerExtension5 extension= cast(ITextViewerExtension5) fViewer;
             int modelEndLine= end(range);
             for (int modelLine= range.getStartLine(); modelLine < modelEndLine; modelLine++) {
                 int widgetLine= extension.modelLine2WidgetLine(modelLine);
@@ -1118,7 +1118,7 @@
         if (revision !is null) {
             added= new HashMap();
             for (Iterator it= revision.getRegions().iterator(); it.hasNext();) {
-                RevisionRange range= (RevisionRange) it.next();
+                RevisionRange range= cast(RevisionRange) it.next();
                 try {
                     IRegion charRegion= toCharRegion(range);
                     Position position= new Position(charRegion.getOffset(), charRegion.getLength());
@@ -1131,17 +1131,17 @@
         }
 
         if (fAnnotationModel instanceof IAnnotationModelExtension) {
-            IAnnotationModelExtension ext= (IAnnotationModelExtension) fAnnotationModel;
+            IAnnotationModelExtension ext= cast(IAnnotationModelExtension) fAnnotationModel;
             ext.replaceAnnotations((Annotation[]) fAnnotations.toArray(new Annotation[fAnnotations.size()]), added);
         } else {
             for (Iterator it= fAnnotations.iterator(); it.hasNext();) {
-                Annotation annotation= (Annotation) it.next();
+                Annotation annotation= cast(Annotation) it.next();
                 fAnnotationModel.removeAnnotation(annotation);
             }
             if (added !is null) {
                 for (Iterator it= added.entrySet().iterator(); it.hasNext();) {
-                    Entry entry= (Entry) it.next();
-                    fAnnotationModel.addAnnotation((Annotation) entry.getKey(), (Position) entry.getValue());
+                    Entry entry= cast(Entry) it.next();
+                    fAnnotationModel.addAnnotation(cast(Annotation) entry.getKey(), cast(Position) entry.getValue());
                 }
             }
         }
@@ -1193,7 +1193,7 @@
             return;
 
         for (Iterator it= fRevisionInfo.getRevisions().iterator(); it.hasNext();) {
-            Revision revision= (Revision) it.next();
+            Revision revision= cast(Revision) it.next();
             if (id.equals(revision.getId())) {
                 handleRevisionSelected(revision);
                 return;
@@ -1201,7 +1201,7 @@
         }
 
         // clear selection if it does not exist
-        handleRevisionSelected((Revision) null);
+        handleRevisionSelected(cast(Revision) null);
     }
 
     /**
@@ -1230,7 +1230,7 @@
      * @param nextLine the new focus line (-1 for no focus)
      */
     private void onFocusLineChanged(int previousLine, int nextLine) {
-        if (DEBUG)
+        if cast(DEBUG)
             System.out.println("line: " + previousLine + " > " + nextLine); //$NON-NLS-1$ //$NON-NLS-2$
         fFocusLine= nextLine;
         RevisionRange region= getRange(nextLine);
@@ -1254,7 +1254,7 @@
      * @param nextRange the new focus range (<code>null</code> for no focus)
      */
     private void onFocusRangeChanged(RevisionRange previousRange, RevisionRange nextRange) {
-        if (DEBUG)
+        if cast(DEBUG)
             System.out.println("range: " + previousRange + " > " + nextRange); //$NON-NLS-1$ //$NON-NLS-2$
         fFocusRange= nextRange;
         Revision revision= nextRange is null ? null : nextRange.getRevision();
@@ -1273,7 +1273,7 @@
      * @param nextRevision the new focus revision (<code>null</code> for no focus)
      */
     private void onFocusRevisionChanged(Revision previousRevision, Revision nextRevision) {
-        if (DEBUG)
+        if cast(DEBUG)
             System.out.println("revision: " + previousRevision + " > " + nextRevision); //$NON-NLS-1$ //$NON-NLS-2$
         fFocusRevision= nextRevision;
         uninstallWheelHandler();
@@ -1317,7 +1317,7 @@
         List ranges= fFocusRevision.getRegions();
         if (up) {
             for (Iterator it= ranges.iterator(); it.hasNext();) {
-                RevisionRange range= (RevisionRange) it.next();
+                RevisionRange range= cast(RevisionRange) it.next();
                 ILineRange widgetRange= modelLinesToWidgetLines(range);
                 if (contains(range, documentHoverLine)) {
                     nextWidgetRange= last;
@@ -1328,7 +1328,7 @@
             }
         } else {
             for (ListIterator it= ranges.listIterator(ranges.size()); it.hasPrevious();) {
-                RevisionRange range= (RevisionRange) it.previous();
+                RevisionRange range= cast(RevisionRange) it.previous();
                 ILineRange widgetRange= modelLinesToWidgetLines(range);
                 if (contains(range, documentHoverLine)) {
                     nextWidgetRange= last;
@@ -1440,7 +1440,7 @@
      * @return <code>true</code> if the receiver can provide a hover
      */
     public bool hasHover(int activeLine) {
-        return fViewer instanceof ISourceViewer && fHover.getHoverLineRange((ISourceViewer) fViewer, activeLine) !is null;
+        return fViewer instanceof ISourceViewer && fHover.getHoverLineRange(cast(ISourceViewer) fViewer, activeLine) !is null;
     }
 
     /**
@@ -1486,7 +1486,7 @@
                 int revisionWidth= 0;
                 int authorWidth= 0;
                 for (Iterator it= fRevisionInfo.getRevisions().iterator(); it.hasNext();) {
-                    Revision revision= (Revision) it.next();
+                    Revision revision= cast(Revision) it.next();
                     revisionWidth= Math.max(revisionWidth, revision.getId().length());
                     authorWidth= Math.max(authorWidth, revision.getAuthor().length());
                 }
@@ -1564,7 +1564,7 @@
         RevisionEvent event= new RevisionEvent(fRevisionInfo);
         Object[] listeners= fRevisionListeners.getListeners();
         for (int i= 0; i < listeners.length; i++) {
-            IRevisionListener listener= (IRevisionListener) listeners[i];
+            IRevisionListener listener= cast(IRevisionListener) listeners[i];
             listener.revisionInformationChanged(event);
         }
     }
--- a/dwtx/jface/internal/text/revisions/RevisionSelectionProvider.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/internal/text/revisions/RevisionSelectionProvider.d	Sun Aug 24 01:46:20 2008 +0200
@@ -67,7 +67,7 @@
         public void selectionChanged(SelectionChangedEvent event) {
             ISelection selection= event.getSelection();
             if (selection instanceof ITextSelection) {
-                ITextSelection ts= (ITextSelection) selection;
+                ITextSelection ts= cast(ITextSelection) selection;
                 int offset= ts.getOffset();
                 setSelectedRevision(fPainter.getRevision(offset));
             }
@@ -140,13 +140,13 @@
         if (fIgnoreEvents)
             return;
         if (selection instanceof IStructuredSelection) {
-            Object first= ((IStructuredSelection) selection).getFirstElement();
+            Object first= (cast(IStructuredSelection) selection).getFirstElement();
             if (first instanceof Revision)
-                fPainter.handleRevisionSelected((Revision) first);
+                fPainter.handleRevisionSelected(cast(Revision) first);
             else if (first instanceof String)
-                fPainter.handleRevisionSelected((String) first);
+                fPainter.handleRevisionSelected(cast(String) first);
             else if (selection.isEmpty())
-                fPainter.handleRevisionSelected((Revision) null);
+                fPainter.handleRevisionSelected(cast(Revision) null);
         }
     }
 
@@ -161,7 +161,7 @@
         if (fViewer !is null) {
             ISelectionProvider provider= fViewer.getSelectionProvider();
             if (provider instanceof IPostSelectionProvider) {
-                IPostSelectionProvider postProvider= (IPostSelectionProvider) provider;
+                IPostSelectionProvider postProvider= cast(IPostSelectionProvider) provider;
                 fSelectionListener= new PostSelectionListener(postProvider);
             }
         }
@@ -207,7 +207,7 @@
 
             Object[] listeners= fListeners.getListeners();
             for (int i= 0; i < listeners.length; i++)
-                ((ISelectionChangedListener) listeners[i]).selectionChanged(event);
+                (cast(ISelectionChangedListener) listeners[i]).selectionChanged(event);
         } finally {
             fIgnoreEvents= false;
         }
--- a/dwtx/jface/internal/text/source/DiffPainter.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/internal/text/source/DiffPainter.d	Sun Aug 24 01:46:20 2008 +0200
@@ -210,7 +210,7 @@
      */
     private void handleDispose() {
         if (fLineDiffer !is null) {
-            ((IAnnotationModel) fLineDiffer).removeAnnotationModelListener(fAnnotationListener);
+            (cast(IAnnotationModel) fLineDiffer).removeAnnotationModelListener(fAnnotationListener);
             fLineDiffer= null;
         }
     }
@@ -342,7 +342,7 @@
     public void setModel(IAnnotationModel model) {
         IAnnotationModel newModel;
         if (model instanceof IAnnotationModelExtension)
-            newModel= ((IAnnotationModelExtension) model).getAnnotationModel(IChangeRulerColumn.QUICK_DIFF_MODEL_ID);
+            newModel= (cast(IAnnotationModelExtension) model).getAnnotationModel(IChangeRulerColumn.QUICK_DIFF_MODEL_ID);
         else
             newModel= model;
 
@@ -358,10 +358,10 @@
         if (differ instanceof ILineDiffer) {
             if (fLineDiffer !is differ) {
                 if (fLineDiffer !is null)
-                    ((IAnnotationModel) fLineDiffer).removeAnnotationModelListener(fAnnotationListener);
-                fLineDiffer= (ILineDiffer) differ;
+                    (cast(IAnnotationModel) fLineDiffer).removeAnnotationModelListener(fAnnotationListener);
+                fLineDiffer= cast(ILineDiffer) differ;
                 if (fLineDiffer !is null)
-                    ((IAnnotationModel) fLineDiffer).addAnnotationModelListener(fAnnotationListener);
+                    (cast(IAnnotationModel) fLineDiffer).addAnnotationModelListener(fAnnotationListener);
             }
         }
     }
@@ -498,7 +498,7 @@
      * @return the interpolated color
      */
     private static RGB interpolate(RGB fg, RGB bg, double scale) {
-        return new RGB((int) ((1.0 - scale) * fg.red + scale * bg.red), (int) ((1.0 - scale) * fg.green + scale * bg.green), (int) ((1.0 - scale) * fg.blue + scale * bg.blue));
+        return new RGB(cast(int) ((1.0 - scale) * fg.red + scale * bg.red), cast(int) ((1.0 - scale) * fg.green + scale * bg.green), cast(int) ((1.0 - scale) * fg.blue + scale * bg.blue));
     }
 
     /**
@@ -531,7 +531,7 @@
      */
     public bool hasInformation() {
         if (fLineDiffer instanceof ILineDifferExtension2)
-            return !((ILineDifferExtension2) fLineDiffer).isSuspended();
+            return !(cast(ILineDifferExtension2) fLineDiffer).isSuspended();
         return fLineDiffer !is null;
     }
 
--- a/dwtx/jface/text/AbstractDocument.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/AbstractDocument.d	Sun Aug 24 01:46:20 2008 +0200
@@ -501,12 +501,12 @@
         if (category is null)
             throw new BadPositionCategoryException();
 
-        List list= (List) fPositions.get(category);
+        List list= cast(List) fPositions.get(category);
         if (list is null)
             throw new BadPositionCategoryException();
         list.add(computeIndexInPositionList(list, position.offset), position);
         
-        List endPositions= (List) fEndPositions.get(category);
+        List endPositions= cast(List) fEndPositions.get(category);
         if (endPositions is null)
             throw new BadPositionCategoryException();
         endPositions.add(computeIndexInPositionList(endPositions, position.offset + position.length - 1, false), position);
@@ -551,7 +551,7 @@
         if (category is null)
             return false;
 
-        List list= (List) fPositions.get(category);
+        List list= cast(List) fPositions.get(category);
         if (list is null)
             return false;
 
@@ -561,12 +561,12 @@
 
         int index= computeIndexInPositionList(list, offset);
         if (index < size) {
-            Position p= (Position) list.get(index);
+            Position p= cast(Position) list.get(index);
             while (p !is null && p.offset is offset) {
                 if (p.length is length)
                     return true;
                 ++ index;
-                p= (index < size) ? (Position) list.get(index) : null;
+                p= (index < size) ? cast(Position) list.get(index) : null;
             }
         }
 
@@ -623,7 +623,7 @@
 
             mid= (left + right) / 2;
 
-            p= (Position) positions.get(mid);
+            p= cast(Position) positions.get(mid);
             int pOffset= getOffset(orderedByOffset, p);
             if (offset < pOffset) {
                 if (left is mid)
@@ -642,7 +642,7 @@
         }
 
         int pos= left;
-        p= (Position) positions.get(pos);
+        p= cast(Position) positions.get(pos);
         int pPosition= getOffset(orderedByOffset, p);
         if (offset > pPosition) {
             // append to the end
@@ -653,7 +653,7 @@
                 --pos;
                 if (pos < 0)
                     break;
-                p= (Position) positions.get(pos);
+                p= cast(Position) positions.get(pos);
                 pPosition= getOffset(orderedByOffset, p);
             } while (offset is pPosition);
             ++pos;
@@ -681,7 +681,7 @@
         if (0 > offset || offset > getLength())
             throw new BadLocationException();
 
-        List c= (List) fPositions.get(category);
+        List c= cast(List) fPositions.get(category);
         if (c is null)
             throw new BadPositionCategoryException();
 
@@ -700,7 +700,7 @@
         
         Object[] listeners= fDocumentPartitioningListeners.getListeners();
         for (int i= 0; i < listeners.length; i++)
-            ((IDocumentPartitioningListener)listeners[i]).documentPartitioningChanged(this);
+            (cast(IDocumentPartitioningListener)listeners[i]).documentPartitioningChanged(this);
     }
 
     /**
@@ -721,9 +721,9 @@
         
         Object[] listeners= fDocumentPartitioningListeners.getListeners();
         for (int i= 0; i < listeners.length; i++) {
-            IDocumentPartitioningListener l= (IDocumentPartitioningListener)listeners[i];
+            IDocumentPartitioningListener l= cast(IDocumentPartitioningListener)listeners[i];
             if (l instanceof IDocumentPartitioningListenerExtension)
-                ((IDocumentPartitioningListenerExtension) l).documentPartitioningChanged(this, region);
+                (cast(IDocumentPartitioningListenerExtension) l).documentPartitioningChanged(this, region);
             else
                 l.documentPartitioningChanged(this);
         }
@@ -744,12 +744,12 @@
 
         Object[] listeners= fDocumentPartitioningListeners.getListeners();
         for (int i= 0; i < listeners.length; i++) {
-            IDocumentPartitioningListener l= (IDocumentPartitioningListener)listeners[i];
+            IDocumentPartitioningListener l= cast(IDocumentPartitioningListener)listeners[i];
             if (l instanceof IDocumentPartitioningListenerExtension2) {
-                IDocumentPartitioningListenerExtension2 extension2= (IDocumentPartitioningListenerExtension2) l;
+                IDocumentPartitioningListenerExtension2 extension2= cast(IDocumentPartitioningListenerExtension2) l;
                 extension2.documentPartitioningChanged(event);
             } else if (l instanceof IDocumentPartitioningListenerExtension) {
-                IDocumentPartitioningListenerExtension extension= (IDocumentPartitioningListenerExtension) l;
+                IDocumentPartitioningListenerExtension extension= cast(IDocumentPartitioningListenerExtension) l;
                 extension.documentPartitioningChanged(this, event.getCoverage());
             } else {
                 l.documentPartitioningChanged(this);
@@ -772,9 +772,9 @@
         if (fDocumentPartitioners !is null) {
             Iterator e= fDocumentPartitioners.values().iterator();
             while (e.hasNext()) {
-                IDocumentPartitioner p= (IDocumentPartitioner) e.next();
+                IDocumentPartitioner p= cast(IDocumentPartitioner) e.next();
                 if (p instanceof IDocumentPartitionerExtension3) {
-                    IDocumentPartitionerExtension3 extension= (IDocumentPartitionerExtension3) p;
+                    IDocumentPartitionerExtension3 extension= cast(IDocumentPartitionerExtension3) p;
                     if (extension.getActiveRewriteSession() !is null)
                         continue;
                 }
@@ -784,11 +784,11 @@
 
         Object[] listeners= fPrenotifiedDocumentListeners.getListeners();
         for (int i= 0; i < listeners.length; i++)
-            ((IDocumentListener)listeners[i]).documentAboutToBeChanged(event);
+            (cast(IDocumentListener)listeners[i]).documentAboutToBeChanged(event);
         
         listeners= fDocumentListeners.getListeners();
         for (int i= 0; i < listeners.length; i++)
-            ((IDocumentListener)listeners[i]).documentAboutToBeChanged(event);
+            (cast(IDocumentListener)listeners[i]).documentAboutToBeChanged(event);
     }
 
 
@@ -804,17 +804,17 @@
             fDocumentPartitioningChangedEvent= new DocumentPartitioningChangedEvent(this);
             Iterator e= fDocumentPartitioners.keySet().iterator();
             while (e.hasNext()) {
-                String partitioning= (String) e.next();
-                IDocumentPartitioner partitioner= (IDocumentPartitioner) fDocumentPartitioners.get(partitioning);
+                String partitioning= cast(String) e.next();
+                IDocumentPartitioner partitioner= cast(IDocumentPartitioner) fDocumentPartitioners.get(partitioning);
 
                 if (partitioner instanceof IDocumentPartitionerExtension3) {
-                    IDocumentPartitionerExtension3 extension= (IDocumentPartitionerExtension3) partitioner;
+                    IDocumentPartitionerExtension3 extension= cast(IDocumentPartitionerExtension3) partitioner;
                     if (extension.getActiveRewriteSession() !is null)
                         continue;
                 }
 
                 if (partitioner instanceof IDocumentPartitionerExtension) {
-                    IDocumentPartitionerExtension extension= (IDocumentPartitionerExtension) partitioner;
+                    IDocumentPartitionerExtension extension= cast(IDocumentPartitionerExtension) partitioner;
                     IRegion r= extension.documentChanged2(event);
                     if (r !is null)
                         fDocumentPartitioningChangedEvent.setPartitionChange(partitioning, r.getOffset(), r.getLength());
@@ -878,11 +878,11 @@
 
         Object[] listeners= fPrenotifiedDocumentListeners.getListeners();
         for (int i= 0; i < listeners.length; i++)
-            ((IDocumentListener)listeners[i]).documentChanged(event);
+            (cast(IDocumentListener)listeners[i]).documentChanged(event);
 
         listeners= fDocumentListeners.getListeners();
         for (int i= 0; i < listeners.length; i++)
-            ((IDocumentListener)listeners[i]).documentChanged(event);
+            (cast(IDocumentListener)listeners[i]).documentChanged(event);
 
         // IDocumentExtension
         ++ fReentranceCount;
@@ -1105,7 +1105,7 @@
         if (category is null)
             throw new BadPositionCategoryException();
 
-        List c= (List) fPositions.get(category);
+        List c= cast(List) fPositions.get(category);
         if (c is null)
             throw new BadPositionCategoryException();
 
@@ -1121,7 +1121,7 @@
         String[] categories= new String[fPositions.size()];
         Iterator keys= fPositions.keySet().iterator();
         for (int i= 0; i < categories.length; i++)
-            categories[i]= (String) keys.next();
+            categories[i]= cast(String) keys.next();
         return categories;
     }
 
@@ -1178,12 +1178,12 @@
         if (category is null)
             throw new BadPositionCategoryException();
 
-        List c= (List) fPositions.get(category);
+        List c= cast(List) fPositions.get(category);
         if (c is null)
             throw new BadPositionCategoryException();
         removeFromPositionsList(c, position, true);
         
-        List endPositions= (List) fEndPositions.get(category);
+        List endPositions= cast(List) fEndPositions.get(category);
         if (endPositions is null)
             throw new BadPositionCategoryException();
         removeFromPositionsList(endPositions, position, false);
@@ -1361,7 +1361,7 @@
         List list= new ArrayList(fPositionUpdaters);
         Iterator e= list.iterator();
         while (e.hasNext()) {
-            IPositionUpdater u= (IPositionUpdater) e.next();
+            IPositionUpdater u= cast(IPositionUpdater) e.next();
             u.update(event);
         }
     }
@@ -1420,7 +1420,7 @@
 
             Iterator e= changes.iterator();
             while (e.hasNext()) {
-                RegisteredReplace replace= (RegisteredReplace) e.next();
+                RegisteredReplace replace= cast(RegisteredReplace) e.next();
                 replace.fReplace.perform(this, replace.fOwner);
             }
         }
@@ -1531,7 +1531,7 @@
 
         if (partitioner instanceof IDocumentPartitionerExtension2) {
             checkStateOfPartitioner(partitioner, partitioning);
-            return ((IDocumentPartitionerExtension2) partitioner).computePartitioning(offset, length, includeZeroLengthPartitions);
+            return (cast(IDocumentPartitionerExtension2) partitioner).computePartitioning(offset, length, includeZeroLengthPartitions);
         } else if (partitioner !is null) {
             checkStateOfPartitioner(partitioner, partitioning);
             return partitioner.computePartitioning(offset, length);
@@ -1553,7 +1553,7 @@
 
         if (partitioner instanceof IDocumentPartitionerExtension2) {
             checkStateOfPartitioner(partitioner, partitioning);
-            return ((IDocumentPartitionerExtension2) partitioner).getContentType(offset, preferOpenPartitions);
+            return (cast(IDocumentPartitionerExtension2) partitioner).getContentType(offset, preferOpenPartitions);
         } else if (partitioner !is null) {
             checkStateOfPartitioner(partitioner, partitioning);
             return partitioner.getContentType(offset);
@@ -1568,7 +1568,7 @@
      * @since 3.0
      */
     public IDocumentPartitioner getDocumentPartitioner(String partitioning)  {
-        return fDocumentPartitioners !is null ? (IDocumentPartitioner) fDocumentPartitioners.get(partitioning) : null;
+        return fDocumentPartitioners !is null ? cast(IDocumentPartitioner) fDocumentPartitioners.get(partitioning) : null;
     }
 
     /*
@@ -1596,7 +1596,7 @@
 
         if (partitioner instanceof IDocumentPartitionerExtension2) {
             checkStateOfPartitioner(partitioner, partitioning);
-            return ((IDocumentPartitionerExtension2) partitioner).getPartition(offset, preferOpenPartitions);
+            return (cast(IDocumentPartitionerExtension2) partitioner).getPartition(offset, preferOpenPartitions);
         } else if (partitioner !is null) {
             checkStateOfPartitioner(partitioner, partitioning);
             return partitioner.getPartition(offset);
@@ -1658,7 +1658,7 @@
             List list= new ArrayList(fDocumentRewriteSessionListeners);
             Iterator e= list.iterator();
             while (e.hasNext()) {
-                IDocumentRewriteSessionListener l= (IDocumentRewriteSessionListener) e.next();
+                IDocumentRewriteSessionListener l= cast(IDocumentRewriteSessionListener) e.next();
                 l.documentRewriteSessionChanged(event);
             }
         }
@@ -1682,7 +1682,7 @@
 
 
         fDocumentRewriteSession= new DocumentRewriteSession(sessionType);
-        if (DEBUG)
+        if cast(DEBUG)
             System.out.println("AbstractDocument: Starting rewrite session: " + fDocumentRewriteSession); //$NON-NLS-1$
 
         fireRewriteSessionChanged(new DocumentRewriteSessionEvent(this, fDocumentRewriteSession, DocumentRewriteSessionEvent.SESSION_START));
@@ -1691,7 +1691,7 @@
 
         ILineTracker tracker= getTracker();
         if (tracker instanceof ILineTrackerExtension) {
-            ILineTrackerExtension extension= (ILineTrackerExtension) tracker;
+            ILineTrackerExtension extension= cast(ILineTrackerExtension) tracker;
             extension.startRewriteSession(fDocumentRewriteSession);
         }
 
@@ -1715,7 +1715,7 @@
             while (e.hasNext()) {
                 Object partitioner= e.next();
                 if (partitioner instanceof IDocumentPartitionerExtension3) {
-                    IDocumentPartitionerExtension3 extension= (IDocumentPartitionerExtension3) partitioner;
+                    IDocumentPartitionerExtension3 extension= cast(IDocumentPartitionerExtension3) partitioner;
                     extension.startRewriteSession(session);
                 }
             }
@@ -1729,7 +1729,7 @@
     public void stopRewriteSession(DocumentRewriteSession session) {
         if (fDocumentRewriteSession is session) {
 
-            if (DEBUG)
+            if cast(DEBUG)
                 System.out.println("AbstractDocument: Stopping rewrite session: " + session); //$NON-NLS-1$
 
             DocumentRewriteSessionType sessionType= session.getSessionType();
@@ -1738,7 +1738,7 @@
 
             ILineTracker tracker= getTracker();
             if (tracker instanceof ILineTrackerExtension) {
-                ILineTrackerExtension extension= (ILineTrackerExtension) tracker;
+                ILineTrackerExtension extension= cast(ILineTrackerExtension) tracker;
                 extension.stopRewriteSession(session, get());
             }
 
@@ -1760,10 +1760,10 @@
             DocumentPartitioningChangedEvent event= new DocumentPartitioningChangedEvent(this);
             Iterator e= fDocumentPartitioners.keySet().iterator();
             while (e.hasNext()) {
-                String partitioning= (String) e.next();
-                IDocumentPartitioner partitioner= (IDocumentPartitioner) fDocumentPartitioners.get(partitioning);
+                String partitioning= cast(String) e.next();
+                IDocumentPartitioner partitioner= cast(IDocumentPartitioner) fDocumentPartitioners.get(partitioning);
                 if (partitioner instanceof IDocumentPartitionerExtension3) {
-                    IDocumentPartitionerExtension3 extension= (IDocumentPartitionerExtension3) partitioner;
+                    IDocumentPartitionerExtension3 extension= cast(IDocumentPartitionerExtension3) partitioner;
                     extension.stopRewriteSession(session);
                     event.setPartitionChange(partitioning, 0, getLength());
                 }
@@ -1804,12 +1804,12 @@
         if (!(partitioner instanceof IDocumentPartitionerExtension3))
             return;
 
-        IDocumentPartitionerExtension3 extension= (IDocumentPartitionerExtension3) partitioner;
+        IDocumentPartitionerExtension3 extension= cast(IDocumentPartitionerExtension3) partitioner;
         DocumentRewriteSession session= extension.getActiveRewriteSession();
         if (session !is null) {
             extension.stopRewriteSession(session);
 
-            if (DEBUG)
+            if cast(DEBUG)
                 System.out.println("AbstractDocument: Flushing rewrite session for partition type: " + partitioning); //$NON-NLS-1$
 
             DocumentPartitioningChangedEvent event= new DocumentPartitioningChangedEvent(this);
@@ -1850,7 +1850,7 @@
             Position region= new Position(offset, length);
             
             for (Iterator iterator= documentPositions.iterator(); iterator.hasNext();) {
-                Position position= (Position) iterator.next();
+                Position position= cast(Position) iterator.next();
                 if (isWithinRegion(region, position, canStartBefore, canEndAfter)) {
                     list.add(position);
                 }
@@ -1902,7 +1902,7 @@
      * @since 3.4
      */
     private List getStartingPositions(String category, int offset, int length) throws BadPositionCategoryException {
-        List positions= (List) fPositions.get(category);
+        List positions= cast(List) fPositions.get(category);
         if (positions is null)
             throw new BadPositionCategoryException();
         
@@ -1924,7 +1924,7 @@
      * @since 3.4
      */
     private List getEndingPositions(String category, int offset, int length) throws BadPositionCategoryException {
-        List positions= (List) fEndPositions.get(category);
+        List positions= cast(List) fEndPositions.get(category);
         if (positions is null)
             throw new BadPositionCategoryException();
         
--- a/dwtx/jface/text/AbstractHoverInformationControlManager.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/AbstractHoverInformationControlManager.d	Sun Aug 24 01:46:20 2008 +0200
@@ -269,7 +269,7 @@
                 fSubjectControl.addControlListener(this);
                 fSubjectControl.addKeyListener(this);
                 if (fSubjectControl instanceof Scrollable) {
-                    Scrollable scrollable= (Scrollable) fSubjectControl;
+                    Scrollable scrollable= cast(Scrollable) fSubjectControl;
                     ScrollBar vBar= scrollable.getVerticalBar();
                     if (vBar !is null)
                         vBar.addSelectionListener(this);
@@ -304,7 +304,7 @@
 
             fIsActive= false;
 
-            if (DEBUG)
+            if cast(DEBUG)
                 System.out.println("AbstractHoverInformationControlManager.Closer stopped"); //$NON-NLS-1$
 
             if (fSubjectControl !is null && !fSubjectControl.isDisposed()) {
@@ -313,7 +313,7 @@
                 fSubjectControl.removeControlListener(this);
                 fSubjectControl.removeKeyListener(this);
                 if (fSubjectControl instanceof Scrollable) {
-                    Scrollable scrollable= (Scrollable) fSubjectControl;
+                    Scrollable scrollable= cast(Scrollable) fSubjectControl;
                     ScrollBar vBar= scrollable.getVerticalBar();
                     if (vBar !is null)
                         vBar.removeSelectionListener(this);
@@ -429,8 +429,8 @@
                         IInformationControl infoControl= getCurrentInformationControl();
                         // During isReplaceInProgress(), events can come from the replacing information control
                         if (event.widget instanceof Control && infoControl instanceof IInformationControlExtension5) {
-                            Control control= (Control) event.widget;
-                            IInformationControlExtension5 iControl5= (IInformationControlExtension5) infoControl;
+                            Control control= cast(Control) event.widget;
+                            IInformationControlExtension5 iControl5= cast(IInformationControlExtension5) infoControl;
                             if (!(iControl5.containsControl(control)))
                                 hideInformationControl();
                             else if (event.type is DWT.MouseWheel && cancelReplacingDelay())
@@ -448,15 +448,15 @@
                     else if (!isReplaceInProgress()) {
                         IInformationControl infoControl= getCurrentInformationControl();
                         if (event.widget instanceof Control && infoControl instanceof IInformationControlExtension5) {
-                            Control control= (Control) event.widget;
-                            final IInformationControlExtension5 iControl5= (IInformationControlExtension5) infoControl;
+                            Control control= cast(Control) event.widget;
+                            final IInformationControlExtension5 iControl5= cast(IInformationControlExtension5) infoControl;
                             if (!(iControl5.containsControl(control))) {
                                 hideInformationControl();
                             } else if (cancelReplacingDelay()) {
                                 if (event.type is DWT.MouseUp) {
                                     stop(); // avoid that someone else replaces the info control before the async is exec'd
                                     if (infoControl instanceof IDelayedInputChangeProvider) {
-                                        final IDelayedInputChangeProvider delayedICP= (IDelayedInputChangeProvider) infoControl;
+                                        final IDelayedInputChangeProvider delayedICP= cast(IDelayedInputChangeProvider) infoControl;
                                         final IInputChangedListener inputChangeListener= new DelayedInputChangeListener(delayedICP, getInformationControlReplacer());
                                         delayedICP.setDelayedInputChangeListener(inputChangeListener);
                                         // cancel automatic input updating after a small timeout:
@@ -504,12 +504,12 @@
          * @since 3.4
          */
         private void handleMouseMove(Event event) {
-//          if (DEBUG)
+//          if cast(DEBUG)
 //              System.out.println("AbstractHoverInformationControl.Closer.handleMouseMove():" + event); //$NON-NLS-1$
             
             if (!(event.widget instanceof Control))
                 return;
-            Control eventControl= (Control) event.widget;
+            Control eventControl= cast(Control) event.widget;
             
             //transform coordinates to subject control:
             Point mouseLoc= event.display.map(eventControl, fSubjectControl, event.x, event.y);
@@ -527,7 +527,7 @@
                 return;
             }
             
-            IInformationControlExtension3 iControl3= (IInformationControlExtension3) iControl;
+            IInformationControlExtension3 iControl3= cast(IInformationControlExtension3) iControl;
             Rectangle controlBounds= iControl3.getBounds();
             if (controlBounds !is null) {
                 Rectangle tooltipBounds= event.display.map(null, eventControl, controlBounds);
@@ -639,7 +639,7 @@
         public void mouseHover(MouseEvent event) {
             if (fIsComputing || fIsInRestartMode ||
                     (fSubjectControl !is null && !fSubjectControl.isDisposed() && fSubjectControl.getShell() !is fSubjectControl.getShell().getDisplay().getActiveShell())) {
-                if (DEBUG)
+                if cast(DEBUG)
                     System.out.println("AbstractHoverInformationControlManager...mouseHover: @ " + event.x + "/" + event.y + " : hover cancelled: fIsComputing= " + fIsComputing + ", fIsInRestartMode= " + fIsInRestartMode); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
                 return;
             }
@@ -828,17 +828,17 @@
             return true;
         
         IInformationControl iControl= getCurrentInformationControl();
-        if ((iControl instanceof IInformationControlExtension5 && !((IInformationControlExtension5) iControl).isVisible())) {
+        if ((iControl instanceof IInformationControlExtension5 && !(cast(IInformationControlExtension5) iControl).isVisible())) {
             iControl= null;
             if (getInformationControlReplacer() !is null) {
                 iControl= getInformationControlReplacer().getCurrentInformationControl2();
-                if ((iControl instanceof IInformationControlExtension5 && !((IInformationControlExtension5) iControl).isVisible())) {
+                if ((iControl instanceof IInformationControlExtension5 && !(cast(IInformationControlExtension5) iControl).isVisible())) {
                     return false;
                 }
             }
         }
         if (iControl instanceof IInformationControlExtension3) {
-            IInformationControlExtension3 iControl3= (IInformationControlExtension3) iControl;
+            IInformationControlExtension3 iControl3= cast(IInformationControlExtension3) iControl;
             
             Rectangle iControlBounds= subjectControl.getDisplay().map(null, subjectControl, iControl3.getBounds());
             Rectangle totalBounds= Geometry.copy(iControlBounds);
@@ -964,11 +964,11 @@
         if (fReplacingDelayJob !is null && fReplacingDelayJob.getState() !is Job.RUNNING) {
             bool cancelled= fReplacingDelayJob.cancel();
             fReplacingDelayJob= null;
-//          if (DEBUG)
+//          if cast(DEBUG)
 //              System.out.println("AbstractHoverInformationControlManager.cancelReplacingDelay(): cancelled=" + cancelled); //$NON-NLS-1$
             return cancelled;
         }
-//      if (DEBUG)
+//      if cast(DEBUG)
 //          System.out.println("AbstractHoverInformationControlManager.cancelReplacingDelay(): not delayed"); //$NON-NLS-1$
         return true;
     }
@@ -994,7 +994,7 @@
                         if (! fWaitForMouseUp)
                             replaceInformationControl(false);
                     } else {
-//                      if (DEBUG)
+//                      if cast(DEBUG)
 //                          System.out.println("AbstractHoverInformationControlManager.startReplaceInformationControl(): rescheduled"); //$NON-NLS-1$
                         fReplacingDelayJob.schedule(HOVER_AUTO_REPLACING_DELAY);
                     }
@@ -1022,7 +1022,7 @@
         };
         fReplacingDelayJob.setSystem(true);
         fReplacingDelayJob.setPriority(Job.INTERACTIVE);
-//      if (DEBUG)
+//      if cast(DEBUG)
 //          System.out.println("AbstractHoverInformationControlManager.startReplaceInformationControl(): scheduled"); //$NON-NLS-1$
         fReplacingDelayJob.schedule(HOVER_AUTO_REPLACING_DELAY);
     }
--- a/dwtx/jface/text/AbstractInformationControl.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/AbstractInformationControl.d	Sun Aug 24 01:46:20 2008 +0200
@@ -776,7 +776,7 @@
                 public void handleEvent(Event event) {
                     Object[] listeners= fFocusListeners.getListeners();
                     for (int i= 0; i < listeners.length; i++) {
-                        FocusListener focusListener= (FocusListener)listeners[i];
+                        FocusListener focusListener= cast(FocusListener)listeners[i];
                         if (event.type is DWT.Activate) {
                             focusListener.focusGained(new FocusEvent(event));
                         } else {
--- a/dwtx/jface/text/AbstractInformationControlManager.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/AbstractInformationControlManager.d	Sun Aug 24 01:46:20 2008 +0200
@@ -545,7 +545,7 @@
      * @param subjectArea the subject area, or <code>null</code> if none is available
      */
     protected final void setInformation(String information, Rectangle subjectArea) {
-        setInformation((Object)information, subjectArea);
+        setInformation(cast(Object)information, subjectArea);
     }
 
     /**
@@ -618,7 +618,7 @@
     bool canReplace(IInformationControl iControl) {
         return iControl instanceof IInformationControlExtension3
                 && iControl instanceof IInformationControlExtension5
-                && ((IInformationControlExtension5) iControl).getInformationPresenterControlCreator() !is null;
+                && (cast(IInformationControlExtension5) iControl).getInformationPresenterControlCreator() !is null;
     }
     
     /**
@@ -745,7 +745,7 @@
      */
     protected void setCustomInformationControlCreator(IInformationControlCreator informationControlCreator)  {
         if (informationControlCreator !is null && fCustomInformationControlCreator  instanceof IInformationControlCreatorExtension) {
-            IInformationControlCreatorExtension extension= (IInformationControlCreatorExtension) fCustomInformationControlCreator;
+            IInformationControlCreatorExtension extension= cast(IInformationControlCreatorExtension) fCustomInformationControlCreator;
             if (extension.canReplace(informationControlCreator))
                 return;
         }
@@ -861,7 +861,7 @@
 
         if (fSizeConstraints is null) {
             if (informationControl instanceof IInformationControlExtension5) {
-                IInformationControlExtension5 iControl5= (IInformationControlExtension5) informationControl;
+                IInformationControlExtension5 iControl5= cast(IInformationControlExtension5) informationControl;
                 fSizeConstraints= iControl5.computeSizeConstraints(fWidthConstraint, fHeightConstraint);
                 if (fSizeConstraints !is null)
                     return Geometry.copy(fSizeConstraints);
@@ -938,7 +938,7 @@
 
             creator= fCustomInformationControlCreator;
             if (creator instanceof IInformationControlCreatorExtension)  {
-                IInformationControlCreatorExtension extension= (IInformationControlCreatorExtension) creator;
+                IInformationControlCreatorExtension extension= cast(IInformationControlCreatorExtension) creator;
                 if (fInformationControl !is null && extension.canReuse(fInformationControl))
                     return fInformationControl;
             }
@@ -1275,7 +1275,7 @@
     protected void presentInformation() {
         bool hasContents= false;
         if (fInformation instanceof String)
-            hasContents= ((String)fInformation).trim().length() > 0;
+            hasContents= (cast(String)fInformation).trim().length() > 0;
         else
             hasContents= (fInformation !is null);
 
@@ -1294,7 +1294,7 @@
      */
     private void internalShowInformationControl(Rectangle subjectArea, Object information) {
         if (this instanceof InformationControlReplacer) {
-            ((InformationControlReplacer) this).showInformationControl(subjectArea, information);
+            (cast(InformationControlReplacer) this).showInformationControl(subjectArea, information);
             return;
         }
         
@@ -1303,7 +1303,7 @@
 
             Point sizeConstraints= computeSizeConstraints(fSubjectControl, fSubjectArea, informationControl);
             if (informationControl instanceof IInformationControlExtension3) {
-                IInformationControlExtension3 iControl3= (IInformationControlExtension3) informationControl;
+                IInformationControlExtension3 iControl3= cast(IInformationControlExtension3) informationControl;
                 Rectangle trim= iControl3.computeTrim();
                 sizeConstraints.x += trim.width;
                 sizeConstraints.y += trim.height;
@@ -1311,12 +1311,12 @@
             informationControl.setSizeConstraints(sizeConstraints.x, sizeConstraints.y);
 
             if (informationControl instanceof IInformationControlExtension2)
-                ((IInformationControlExtension2)informationControl).setInput(information);
+                (cast(IInformationControlExtension2)informationControl).setInput(information);
             else
                 informationControl.setInformation(information.toString());
 
             if (informationControl instanceof IInformationControlExtension) {
-                IInformationControlExtension extension= (IInformationControlExtension)informationControl;
+                IInformationControlExtension extension= cast(IInformationControlExtension)informationControl;
                 if (!extension.hasContents())
                     return;
             }
@@ -1405,11 +1405,11 @@
      */
     void replaceInformationControl(bool takeFocus) {
         if (fInformationControlReplacer !is null && canReplace(fInformationControl)) {
-            IInformationControlExtension3 iControl3= (IInformationControlExtension3) fInformationControl;
+            IInformationControlExtension3 iControl3= cast(IInformationControlExtension3) fInformationControl;
             Rectangle b= iControl3.getBounds();
             Rectangle t= iControl3.computeTrim();
             Rectangle contentBounds= new Rectangle(b.x - t.x, b.y - t.y, b.width - t.width, b.height - t.height);
-            IInformationControlCreator informationPresenterControlCreator= ((IInformationControlExtension5) fInformationControl).getInformationPresenterControlCreator();
+            IInformationControlCreator informationPresenterControlCreator= (cast(IInformationControlExtension5) fInformationControl).getInformationPresenterControlCreator();
             fInformationControlReplacer.replaceInformationControl(informationPresenterControlCreator, contentBounds, fInformation, fSubjectArea, takeFocus);
         }
         hideInformationControl();
@@ -1468,10 +1468,10 @@
         if (!(fInformationControl instanceof IInformationControlExtension3))
             throw new UnsupportedOperationException();
 
-        bool controlRestoresSize= ((IInformationControlExtension3)fInformationControl).restoresSize();
-        bool controlRestoresLocation= ((IInformationControlExtension3)fInformationControl).restoresLocation();
+        bool controlRestoresSize= (cast(IInformationControlExtension3)fInformationControl).restoresSize();
+        bool controlRestoresLocation= (cast(IInformationControlExtension3)fInformationControl).restoresLocation();
 
-        Rectangle bounds= ((IInformationControlExtension3)fInformationControl).getBounds();
+        Rectangle bounds= (cast(IInformationControlExtension3)fInformationControl).getBounds();
         if (bounds is null)
             return;
 
@@ -1497,8 +1497,8 @@
         if (!(fInformationControl instanceof IInformationControlExtension3))
             throw new UnsupportedOperationException();
 
-        bool controlRestoresSize= ((IInformationControlExtension3)fInformationControl).restoresSize();
-        bool controlRestoresLocation= ((IInformationControlExtension3)fInformationControl).restoresLocation();
+        bool controlRestoresSize= (cast(IInformationControlExtension3)fInformationControl).restoresSize();
+        bool controlRestoresLocation= (cast(IInformationControlExtension3)fInformationControl).restoresLocation();
 
         Rectangle bounds= new Rectangle(-1, -1, -1, -1);
 
--- a/dwtx/jface/text/AbstractLineTracker.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/AbstractLineTracker.d	Sun Aug 24 01:46:20 2008 +0200
@@ -370,7 +370,7 @@
     private void checkImplementation() {
         if (fNeedsConversion) {
             fNeedsConversion= false;
-            fDelegate= new TreeLineTracker((ListLineTracker) fDelegate) {
+            fDelegate= new TreeLineTracker(cast(ListLineTracker) fDelegate) {
                 protected DelimiterInfo nextDelimiterInfo(String text, int offset) {
                     return AbstractLineTracker.this.nextDelimiterInfo(text, offset);
                 }
@@ -433,7 +433,7 @@
      * @since 3.1
      */
     protected final void flushRewriteSession() throws BadLocationException {
-        if (DEBUG)
+        if cast(DEBUG)
             System.out.println("AbstractLineTracker: Flushing rewrite session: " + fActiveRewriteSession); //$NON-NLS-1$
 
         Iterator e= fPendingRequests.iterator();
@@ -442,7 +442,7 @@
         fActiveRewriteSession= null;
 
         while (e.hasNext()) {
-            Request request= (Request) e.next();
+            Request request= cast(Request) e.next();
             if (request.isReplaceRequest())
                 replace(request.offset, request.length, request.text);
             else
--- a/dwtx/jface/text/AbstractReusableInformationControlCreator.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/AbstractReusableInformationControlCreator.d	Sun Aug 24 01:46:20 2008 +0200
@@ -186,7 +186,7 @@
      * @see dwtx.jface.text.IInformationControlCreator#createInformationControl(dwt.widgets.Shell)
      */
     public IInformationControl createInformationControl(Shell parent) {
-        IInformationControl control= (IInformationControl)fInformationControls.get(parent);
+        IInformationControl control= cast(IInformationControl)fInformationControls.get(parent);
         if (control is null) {
             control= doCreateInformationControl(parent);
             control.addDisposeListener(this);
@@ -201,7 +201,7 @@
     public void widgetDisposed(DisposeEvent e) {
         Composite parent= null;
         if (e.widget instanceof Shell)
-            parent= ((Shell)e.widget).getParent();
+            parent= (cast(Shell)e.widget).getParent();
         if (parent instanceof Shell)
             fInformationControls.remove(parent);
     }
--- a/dwtx/jface/text/CursorLinePainter.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/CursorLinePainter.d	Sun Aug 24 01:46:20 2008 +0200
@@ -284,7 +284,7 @@
     private int getModelCaret() {
         int widgetCaret= fViewer.getTextWidget().getCaretOffset();
         if (fViewer instanceof ITextViewerExtension5) {
-            ITextViewerExtension5 extension= (ITextViewerExtension5) fViewer;
+            ITextViewerExtension5 extension= cast(ITextViewerExtension5) fViewer;
             return extension.widgetOffset2ModelOffset(widgetCaret);
         }
         IRegion visible= fViewer.getVisibleRegion();
@@ -305,7 +305,7 @@
         int widgetOffset= 0;
         if (fViewer instanceof ITextViewerExtension5) {
 
-            ITextViewerExtension5 extension= (ITextViewerExtension5) fViewer;
+            ITextViewerExtension5 extension= cast(ITextViewerExtension5) fViewer;
             widgetOffset= extension.modelOffset2WidgetOffset(position.getOffset());
             if (widgetOffset is -1)
                 return;
--- a/dwtx/jface/text/DefaultDocumentAdapter.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/DefaultDocumentAdapter.d	Sun Aug 24 01:46:20 2008 +0200
@@ -276,7 +276,7 @@
      */
     private void repairLineInformation(IDocument document) {
         if (document instanceof IRepairableDocument) {
-            IRepairableDocument repairable= (IRepairableDocument) document;
+            IRepairableDocument repairable= cast(IRepairableDocument) document;
             repairable.repairLineInformation();
         }
     }
@@ -489,7 +489,7 @@
         if (fTextChangeListeners !is null && fTextChangeListeners.size() > 0) {
             Iterator e= new ArrayList(fTextChangeListeners).iterator();
             while (e.hasNext())
-                ((TextChangeListener) e.next()).textChanged(event);
+                (cast(TextChangeListener) e.next()).textChanged(event);
         }
     }
 
@@ -506,7 +506,7 @@
         if (fTextChangeListeners !is null && fTextChangeListeners.size() > 0) {
             Iterator e= new ArrayList(fTextChangeListeners).iterator();
             while (e.hasNext())
-                ((TextChangeListener) e.next()).textSet(event);
+                (cast(TextChangeListener) e.next()).textSet(event);
         }
     }
 
@@ -534,7 +534,7 @@
             if (fTextChangeListeners !is null && fTextChangeListeners.size() > 0) {
                 Iterator e= new ArrayList(fTextChangeListeners).iterator();
                 while (e.hasNext())
-                     ((TextChangeListener) e.next()).textChanging(event);
+                     (cast(TextChangeListener) e.next()).textChanging(event);
             }
 
         } catch (BadLocationException e) {
--- a/dwtx/jface/text/DefaultInformationControl.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/DefaultInformationControl.d	Sun Aug 24 01:46:20 2008 +0200
@@ -348,7 +348,7 @@
      * @param parent the parent shell
      */
     public this(Shell parent) {
-        this(parent, (String)null, null);
+        this(parent, cast(String)null, null);
     }
 
     /**
@@ -359,7 +359,7 @@
      * @param presenter the presenter to be used
      */
     public this(Shell parent, IInformationPresenter presenter) {
-        this(parent, (String)null, presenter);
+        this(parent, cast(String)null, presenter);
     }
 
     /**
@@ -440,7 +440,7 @@
         fText.setForeground(parent.getForeground());
         fText.setBackground(parent.getBackground());
         fText.setFont(JFaceResources.getDialogFont());
-        FillLayout layout= (FillLayout)parent.getLayout();
+        FillLayout layout= cast(FillLayout)parent.getLayout();
         if (fText.getWordWrap()) {
             // indent does not work for wrapping StyledText, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=56342 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=115432 
             layout.marginHeight= INNER_BORDER;
@@ -480,7 +480,7 @@
                 maxHeight= Integer.MAX_VALUE;
             
             if (fPresenter instanceof IInformationPresenterExtension)
-                content= ((IInformationPresenterExtension)fPresenter).updatePresentation(fText, content, fPresentation, maxWidth, maxHeight);
+                content= (cast(IInformationPresenterExtension)fPresenter).updatePresentation(fText, content, fPresentation, maxWidth, maxHeight);
             else
                 content= fPresenter.updatePresentation(getShell().getDisplay(), content, fPresentation, maxWidth, maxHeight);
 
@@ -571,7 +571,7 @@
              * @see dwtx.jface.text.IInformationControlCreator#createInformationControl(dwt.widgets.Shell)
              */
             public IInformationControl createInformationControl(Shell parent) {
-                return new DefaultInformationControl(parent, (ToolBarManager) null, fPresenter);
+                return new DefaultInformationControl(parent, cast(ToolBarManager) null, fPresenter);
             }
         };
     }
--- a/dwtx/jface/text/DefaultTextHover.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/DefaultTextHover.d	Sun Aug 24 01:46:20 2008 +0200
@@ -194,7 +194,7 @@
         
         Iterator e= model.getAnnotationIterator();
         while (e.hasNext()) {
-            Annotation a= (Annotation) e.next();
+            Annotation a= cast(Annotation) e.next();
             if (isIncluded(a)) {
                 Position p= model.getPosition(a);
                 if (p !is null && p.overlapsWith(hoverRegion.getOffset(), hoverRegion.getLength())) {
@@ -228,7 +228,7 @@
     
     private IAnnotationModel getAnnotationModel(ISourceViewer viewer) {
         if (viewer instanceof ISourceViewerExtension2) {
-            ISourceViewerExtension2 extension= (ISourceViewerExtension2) viewer;
+            ISourceViewerExtension2 extension= cast(ISourceViewerExtension2) viewer;
             return extension.getVisualAnnotationModel();
         }
         return viewer.getAnnotationModel();
--- a/dwtx/jface/text/DefaultUndoManager.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/DefaultUndoManager.d	Sun Aug 24 01:46:20 2008 +0200
@@ -289,7 +289,7 @@
             try {
                 IDocument document= fTextViewer.getDocument();
                 if (document instanceof IDocumentExtension4)
-                    ((IDocumentExtension4)document).replace(fStart, fText.length(), fPreservedText, fUndoModificationStamp);
+                    (cast(IDocumentExtension4)document).replace(fStart, fText.length(), fPreservedText, fUndoModificationStamp);
                 else
                     document.replace(fStart, fText.length(), fPreservedText);
             } catch (BadLocationException x) {
@@ -305,7 +305,7 @@
             if (isConnected() && isValid()) {
                 IDocument doc= fTextViewer.getDocument();
                 if (doc instanceof IDocumentExtension4) {
-                    long docStamp= ((IDocumentExtension4)doc).getModificationStamp();
+                    long docStamp= (cast(IDocumentExtension4)doc).getModificationStamp();
                     
                     // Normal case: an undo is valid if its redo will restore document
                     // to its current modification stamp
@@ -361,7 +361,7 @@
             if (isConnected() && isValid()) {
                 IDocument doc= fTextViewer.getDocument();
                 if (doc instanceof IDocumentExtension4) {
-                    long docStamp= ((IDocumentExtension4)doc).getModificationStamp();
+                    long docStamp= (cast(IDocumentExtension4)doc).getModificationStamp();
                     return docStamp is IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP || 
                         docStamp is getUndoModificationStamp();
                 }
@@ -420,7 +420,7 @@
             try {
                 IDocument document= fTextViewer.getDocument();
                 if (document instanceof IDocumentExtension4)
-                    ((IDocumentExtension4)document).replace(fStart, fEnd - fStart, fText, fRedoModificationStamp);
+                    (cast(IDocumentExtension4)document).replace(fStart, fEnd - fStart, fText, fRedoModificationStamp);
                 else
                     fTextViewer.getDocument().replace(fStart, fEnd - fStart, fText);
             } catch (BadLocationException x) {
@@ -617,11 +617,11 @@
                 TextCommand c;
 
                 for (int i= size -1; i > 0;  --i) {
-                    c= (TextCommand) fCommands.get(i);
+                    c= cast(TextCommand) fCommands.get(i);
                     c.undoTextChange();
                 }
 
-                c= (TextCommand) fCommands.get(0);
+                c= cast(TextCommand) fCommands.get(0);
                 c.undo(monitor, uiInfo);
             }
 
@@ -640,11 +640,11 @@
                 TextCommand c;
 
                 for (int i= 0; i < size -1;  ++i) {
-                    c= (TextCommand) fCommands.get(i);
+                    c= cast(TextCommand) fCommands.get(i);
                     c.redoTextChange();
                 }
 
-                c= (TextCommand) fCommands.get(size -1);
+                c= cast(TextCommand) fCommands.get(size -1);
                 c.redo(monitor, uiInfo);
             }
             return Status.OK_STATUS;
@@ -718,7 +718,7 @@
             if (fStart > -1)
                 return super.getUndoModificationStamp();
             else if (fCommands.size() > 0)
-                return ((TextCommand)fCommands.get(0)).getUndoModificationStamp();
+                return (cast(TextCommand)fCommands.get(0)).getUndoModificationStamp();
 
             return fUndoModificationStamp;
         }
@@ -733,7 +733,7 @@
             if (fStart > -1)
                 return super.getRedoModificationStamp();
             else if (fCommands.size() > 0)
-                return ((TextCommand)fCommands.get(fCommands.size()-1)).getRedoModificationStamp();
+                return (cast(TextCommand)fCommands.get(fCommands.size()-1)).getRedoModificationStamp();
 
             return fRedoModificationStamp;
         }
@@ -888,7 +888,7 @@
                             // the document changes associated with this undo or redo.
                             if (event.getOperation() instanceof TextCommand) {
                                 if (fTextViewer instanceof TextViewer)
-                                    ((TextViewer)fTextViewer).ignoreAutoEditStrategies(true);
+                                    (cast(TextViewer)fTextViewer).ignoreAutoEditStrategies(true);
                                 listenToTextChanges(false);
     
                                 // in the undo case only, make sure compounds are closed
@@ -918,7 +918,7 @@
                             listenToTextChanges(true);
                             fOperation= null;
                             if (fTextViewer instanceof TextViewer)
-                                ((TextViewer)fTextViewer).ignoreAutoEditStrategies(false);
+                                (cast(TextViewer)fTextViewer).ignoreAutoEditStrategies(false);
                          }
                     });
                 }
@@ -1459,7 +1459,7 @@
      */
     protected void selectAndReveal(int offset, int length) {
         if (fTextViewer instanceof ITextViewerExtension5) {
-            ITextViewerExtension5 extension= (ITextViewerExtension5) fTextViewer;
+            ITextViewerExtension5 extension= cast(ITextViewerExtension5) fTextViewer;
             extension.exposeModelRange(new Region(offset, length));
         } else if (!fTextViewer.overlapsWithVisibleRegion(offset, length))
             fTextViewer.resetVisibleRegion();
--- a/dwtx/jface/text/DocumentCommand.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/DocumentCommand.d	Sun Aug 24 01:46:20 2008 +0200
@@ -248,7 +248,7 @@
             if (isEqual(object))
                 return 0;
 
-            final Command command= (Command) object;
+            final Command command= cast(Command) object;
 
             // diff middle points if not intersecting
             if (fOffset + fLength <= command.fOffset || command.fOffset + command.fLength <= fOffset) {
@@ -265,7 +265,7 @@
                 return true;
             if (!(object instanceof Command))
                 return false;
-            final Command command= (Command) object;
+            final Command command= cast(Command) object;
             return command.fOffset is fOffset && command.fLength is fLength;
         }
     }
@@ -363,7 +363,7 @@
                 return tempCommand;
             }
 
-            final Command command= (Command) fIterator.next();
+            final Command command= cast(Command) fIterator.next();
             final int compareValue= command.compareTo(fCommand);
 
             if ((compareValue < 0) ^ !fForward) {
@@ -486,11 +486,11 @@
         final int insertionIndex= -(index + 1);
 
         // overlaps to the right?
-        if (insertionIndex !is fCommands.size() && intersects((Command) fCommands.get(insertionIndex), command))
+        if (insertionIndex !is fCommands.size() && intersects(cast(Command) fCommands.get(insertionIndex), command))
             throw new BadLocationException();
 
         // overlaps to the left?
-        if (insertionIndex !is 0 && intersects((Command) fCommands.get(insertionIndex - 1), command))
+        if (insertionIndex !is 0 && intersects(cast(Command) fCommands.get(insertionIndex - 1), command))
             throw new BadLocationException();
 
         fCommands.add(insertionIndex, command);
@@ -571,7 +571,7 @@
 
             final Command originalCommand= new Command(offset, length, text, owner);
             for (final Iterator iterator= new CommandIterator(fCommands, originalCommand, false); iterator.hasNext(); )
-                ((Command) iterator.next()).execute(document);
+                (cast(Command) iterator.next()).execute(document);
 
         } catch (BadLocationException e) {
             // ignore
--- a/dwtx/jface/text/DocumentEvent.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/DocumentEvent.d	Sun Aug 24 01:46:20 2008 +0200
@@ -207,7 +207,7 @@
         Assert.isTrue(offset >= 0);
         Assert.isTrue(length >= 0);
 
-        if (ASSERT_TEXT_NOT_NULL)
+        if cast(ASSERT_TEXT_NOT_NULL)
             Assert.isNotNull(text);
 
         fDocument= doc;
@@ -216,7 +216,7 @@
         fText= text;
 
         if (fDocument instanceof IDocumentExtension4)
-            fModificationStamp= ((IDocumentExtension4)fDocument).getModificationStamp();
+            fModificationStamp= (cast(IDocumentExtension4)fDocument).getModificationStamp();
         else
             fModificationStamp= IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP;
     }
--- a/dwtx/jface/text/DocumentPartitioningChangedEvent.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/DocumentPartitioningChangedEvent.d	Sun Aug 24 01:46:20 2008 +0200
@@ -203,7 +203,7 @@
      * @return the changed region of the given partitioning or <code>null</code>
      */
     public IRegion getChangedRegion(String partitioning) {
-        return (IRegion) fMap.get(partitioning);
+        return cast(IRegion) fMap.get(partitioning);
     }
 
     /**
@@ -253,7 +253,7 @@
         int endOffset= -1;
         Iterator e= fMap.values().iterator();
         while (e.hasNext()) {
-            IRegion r= (IRegion) e.next();
+            IRegion r= cast(IRegion) e.next();
 
             if (offset < 0 || r.getOffset() < offset)
                 offset= r.getOffset();
--- a/dwtx/jface/text/FindReplaceDocumentAdapter.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/FindReplaceDocumentAdapter.d	Sun Aug 24 01:46:20 2008 +0200
@@ -351,7 +351,7 @@
             int length= fFindReplaceMatcher.group().length();
 
             if (fDocument instanceof IRepairableDocumentExtension
-                    && ((IRepairableDocumentExtension)fDocument).isLineInformationRepairNeeded(offset, length, replaceText)) {
+                    && (cast(IRepairableDocumentExtension)fDocument).isLineInformationRepairNeeded(offset, length, replaceText)) {
                 String message= TextMessages.getString("FindReplaceDocumentAdapter.incompatibleLineDelimiter"); //$NON-NLS-1$
                 throw new PatternSyntaxException(message, replaceText, offset);
             }
@@ -630,7 +630,7 @@
             case 'c':
                 if (i + 1 < length) {
                     char ch1= replaceText.charAt(i + 1);
-                    interpretRetainCase(buf, (char)(ch1 ^ 64));
+                    interpretRetainCase(buf, cast(wchar)(ch1 ^ 64));
                     i++;
                 } else {
                     String msg= TextMessages.getFormattedString("FindReplaceDocumentAdapter.illegalControlEscape", "\\c"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -649,7 +649,7 @@
                         String msg= TextMessages.getFormattedString("FindReplaceDocumentAdapter.illegalHexEscape", replaceText.substring(i - 1, i + 3)); //$NON-NLS-1$
                         throw new PatternSyntaxException(msg, replaceText, i);
                     }
-                    interpretRetainCase(buf, (char) parsedInt);
+                    interpretRetainCase(buf, cast(wchar) parsedInt);
                     i+= 2;
                 } else {
                     String msg= TextMessages.getFormattedString("FindReplaceDocumentAdapter.illegalHexEscape", replaceText.substring(i - 1, length)); //$NON-NLS-1$
@@ -668,7 +668,7 @@
                         String msg= TextMessages.getFormattedString("FindReplaceDocumentAdapter.illegalUnicodeEscape", replaceText.substring(i - 1, i + 5)); //$NON-NLS-1$
                         throw new PatternSyntaxException(msg, replaceText, i);
                     }
-                    interpretRetainCase(buf, (char) parsedInt);
+                    interpretRetainCase(buf, cast(wchar) parsedInt);
                     i+= 4;
                 } else {
                     String msg= TextMessages.getFormattedString("FindReplaceDocumentAdapter.illegalUnicodeEscape", replaceText.substring(i - 1, length)); //$NON-NLS-1$
--- a/dwtx/jface/text/GapTextStore.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/GapTextStore.d	Sun Aug 24 01:46:20 2008 +0200
@@ -419,7 +419,7 @@
         // the new content length (without any gap)
         final int newLength= fContent.length - newGapSize;
         // the new array size based on the gap factor
-        int newArraySize= (int) (newLength * fSizeMultiplier);
+        int newArraySize= cast(int) (newLength * fSizeMultiplier);
         newGapSize= newArraySize - newLength;
 
         // bound the gap size within min/max
--- a/dwtx/jface/text/IDocument.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/IDocument.d	Sun Aug 24 01:46:20 2008 +0200
@@ -547,7 +547,7 @@
      * Use {@link IDocumentExtension3#getLegalContentTypes(String)} when the document
      * supports multiple partitionings. In that case this method is equivalent to:
      * <pre>
-     *    IDocumentExtension3 extension= (IDocumentExtension3) document;
+     *    IDocumentExtension3 extension= cast(IDocumentExtension3) document;
      *    return extension.getLegalContentTypes(IDocumentExtension3.DEFAULT_PARTITIONING);
      * </pre>
      *
@@ -563,7 +563,7 @@
      * the document supports multiple partitionings. In that case this method is
      * equivalent to:
      * <pre>
-     *    IDocumentExtension3 extension= (IDocumentExtension3) document;
+     *    IDocumentExtension3 extension= cast(IDocumentExtension3) document;
      *    return extension.getContentType(IDocumentExtension3.DEFAULT_PARTITIONING, offset, false);
      * </pre>
      *
@@ -580,7 +580,7 @@
      * the document supports multiple partitionings. In that case this method is
      * equivalent:
      * <pre>
-     *    IDocumentExtension3 extension= (IDocumentExtension3) document;
+     *    IDocumentExtension3 extension= cast(IDocumentExtension3) document;
      *    return extension.getPartition(IDocumentExtension3.DEFAULT_PARTITIONING, offset, false);
      * </pre>
      *
@@ -598,7 +598,7 @@
      * the document supports multiple partitionings. In that case this method is
      * equivalent:
      * <pre>
-     *    IDocumentExtension3 extension= (IDocumentExtension3) document;
+     *    IDocumentExtension3 extension= cast(IDocumentExtension3) document;
      *    return extension.computePartitioning(IDocumentExtension3.DEFAULT_PARTITIONING, offset, length, false);
      * </pre>
      *
@@ -649,7 +649,7 @@
      * Use {@link IDocumentExtension3#setDocumentPartitioner(String, IDocumentPartitioner)} when
      * the document supports multiple partitionings. In that case this method is equivalent to:
      * <pre>
-     *    IDocumentExtension3 extension= (IDocumentExtension3) document;
+     *    IDocumentExtension3 extension= cast(IDocumentExtension3) document;
      *    extension.setDocumentPartitioner(IDocumentExtension3.DEFAULT_PARTITIONING, partitioner);
      * </pre>
      *
@@ -666,7 +666,7 @@
      * the document supports multiple partitionings. In that case this method is
      * equivalent to:
      * <pre>
-     *    IDocumentExtension3 extension= (IDocumentExtension3) document;
+     *    IDocumentExtension3 extension= cast(IDocumentExtension3) document;
      *    return extension.getDocumentPartitioner(IDocumentExtension3.DEFAULT_PARTITIONING);
      * </pre>
      *
--- a/dwtx/jface/text/IDocumentPartitioner.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/IDocumentPartitioner.d	Sun Aug 24 01:46:20 2008 +0200
@@ -260,7 +260,7 @@
      * zero-length partitions are supported. In that case this method is
      * equivalent:
      * <pre>
-     *    IDocumentPartitionerExtension2 extension= (IDocumentPartitionerExtension2) partitioner;
+     *    IDocumentPartitionerExtension2 extension= cast(IDocumentPartitionerExtension2) partitioner;
      *    return extension.getContentType(offset, false);
      * </pre>
      *
@@ -277,7 +277,7 @@
      * zero-length partitions are supported. In that case this method is
      * equivalent:
      * <pre>
-     *    IDocumentPartitionerExtension2 extension= (IDocumentPartitionerExtension2) partitioner;
+     *    IDocumentPartitionerExtension2 extension= cast(IDocumentPartitionerExtension2) partitioner;
      *    return extension.computePartitioning(offset, length, false);
      * </pre>
      *
@@ -296,7 +296,7 @@
      * zero-length partitions are supported. In that case this method is
      * equivalent:
      * <pre>
-     *    IDocumentPartitionerExtension2 extension= (IDocumentPartitionerExtension2) partitioner;
+     *    IDocumentPartitionerExtension2 extension= cast(IDocumentPartitionerExtension2) partitioner;
      *    return extension.getPartition(offset, false);
      * </pre>
      *
--- a/dwtx/jface/text/ITextViewer.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/ITextViewer.d	Sun Aug 24 01:46:20 2008 +0200
@@ -302,7 +302,7 @@
      * {@link ITextViewerExtension2#removeAutoEditStrategy(IAutoEditStrategy, String)}.
      * It is now equivalent to
      * <pre>
-     *      ITextViewerExtension2 extension= (ITextViewerExtension2) viewer;
+     *      ITextViewerExtension2 extension= cast(ITextViewerExtension2) viewer;
      *      extension.removeAutoEditStrategy(oldStrategy, contentType);
      *      extension.prependAutoEditStrategy(strategy, contentType);
      * </pre>
@@ -322,7 +322,7 @@
      * This method has been replaced by {@link ITextViewerExtension2#setTextHover(ITextHover, String, int)}.
      * It is now equivalent to
      * <pre>
-     *    ITextViewerExtension2 extension= (ITextViewerExtension2) document;
+     *    ITextViewerExtension2 extension= cast(ITextViewerExtension2) document;
      *    extension.setTextHover(textViewerHover, contentType, ITextViewerExtension2#DEFAULT_HOVER_STATE_MASK);
      * </pre>
      *
--- a/dwtx/jface/text/JFaceTextUtil.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/JFaceTextUtil.d	Sun Aug 24 01:46:20 2008 +0200
@@ -336,7 +336,7 @@
     public static int widgetLine2ModelLine(ITextViewer viewer, int widgetLine) {
         int modelLine;
         if (viewer instanceof ITextViewerExtension5) {
-            ITextViewerExtension5 extension= (ITextViewerExtension5) viewer;
+            ITextViewerExtension5 extension= cast(ITextViewerExtension5) viewer;
             modelLine= extension.widgetLine2ModelLine(widgetLine);
         } else {
             try {
@@ -363,7 +363,7 @@
     public static int modelLineToWidgetLine(ITextViewer viewer, final int modelLine) {
         int widgetLine;
         if (viewer instanceof ITextViewerExtension5) {
-            ITextViewerExtension5 extension= (ITextViewerExtension5) viewer;
+            ITextViewerExtension5 extension= cast(ITextViewerExtension5) viewer;
             widgetLine= extension.modelLine2WidgetLine(modelLine);
         } else {
             IRegion region= viewer.getVisibleRegion();
@@ -471,7 +471,7 @@
      */
     private static IRegion modelRange2WidgetRange(IRegion region, ITextViewer textViewer) {
         if (textViewer instanceof ITextViewerExtension5) {
-            ITextViewerExtension5 extension= (ITextViewerExtension5) textViewer;
+            ITextViewerExtension5 extension= cast(ITextViewerExtension5) textViewer;
             return extension.modelRange2WidgetRange(region);
         }
         
--- a/dwtx/jface/text/ListLineTracker.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/ListLineTracker.d	Sun Aug 24 01:46:20 2008 +0200
@@ -210,7 +210,7 @@
 
             mid= (left + right) / 2;
 
-            line= (Line) fLines.get(mid);
+            line= cast(Line) fLines.get(mid);
             if (offset < line.offset) {
                 if (left is mid)
                     right= left;
@@ -226,7 +226,7 @@
             }
         }
 
-        line= (Line) fLines.get(left);
+        line= cast(Line) fLines.get(left);
         if (line.offset > offset)
             --left;
         return left;
@@ -248,7 +248,7 @@
 
         int target= offset + length;
 
-        Line l= (Line) fLines.get(startLine);
+        Line l= cast(Line) fLines.get(startLine);
 
         if (l.delimiter is null)
             return 1;
@@ -274,7 +274,7 @@
         if (lines is 0 || lines is line)
             return 0;
 
-        Line l= (Line) fLines.get(line);
+        Line l= cast(Line) fLines.get(line);
         return l.length;
     }
 
@@ -291,7 +291,7 @@
             if (lastLine < 0)
                 return 0;
 
-            Line l= (Line) fLines.get(lastLine);
+            Line l= cast(Line) fLines.get(lastLine);
             return (l.delimiter !is null ? lastLine + 1 : lastLine);
         }
 
@@ -309,7 +309,7 @@
             int size= fLines.size();
             if (size is 0)
                 return new Region(0, 0);
-            Line l= (Line) fLines.get(size - 1);
+            Line l= cast(Line) fLines.get(size - 1);
             return (l.delimiter !is null ? new Line(fTextLength, 0) : new Line(fTextLength - l.length, l.length));
         }
 
@@ -329,11 +329,11 @@
             return new Line(0, 0);
 
         if (line is lines) {
-            Line l= (Line) fLines.get(line - 1);
+            Line l= cast(Line) fLines.get(line - 1);
             return new Line(l.offset + l.length, 0);
         }
 
-        Line l= (Line) fLines.get(line);
+        Line l= cast(Line) fLines.get(line);
         return (l.delimiter !is null ? new Line(l.offset, l.length - l.delimiter.length()) : l);
     }
 
@@ -350,13 +350,13 @@
             return 0;
 
         if (line is lines) {
-            Line l= (Line) fLines.get(line - 1);
+            Line l= cast(Line) fLines.get(line - 1);
             if (l.delimiter !is null)
                 return l.offset + l.length;
             throw new BadLocationException();
         }
 
-        Line l= (Line) fLines.get(line);
+        Line l= cast(Line) fLines.get(line);
         return l.offset;
     }
 
@@ -369,7 +369,7 @@
         if (lines is 0)
             return 1;
 
-        Line l= (Line) fLines.get(lines - 1);
+        Line l= cast(Line) fLines.get(lines - 1);
         return (l.delimiter !is null ? lines + 1 : lines);
     }
 
@@ -417,7 +417,7 @@
         if (line is lines)
             return null;
 
-        Line l= (Line) fLines.get(line);
+        Line l= cast(Line) fLines.get(line);
         return l.delimiter;
     }
 
@@ -464,7 +464,7 @@
         if (start < text.length()) {
             if (insertPosition + count < fLines.size()) {
                 // there is a line below the current
-                Line l= (Line) fLines.get(insertPosition + count);
+                Line l= cast(Line) fLines.get(insertPosition + count);
                 int delta= text.length() - start;
                 l.offset-= delta;
                 l.length+= delta;
--- a/dwtx/jface/text/PaintManager.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/PaintManager.d	Sun Aug 24 01:46:20 2008 +0200
@@ -406,7 +406,7 @@
         }
 
         for (Iterator e = fPainters.iterator(); e.hasNext();)
-            ((IPainter) e.next()).dispose();
+            (cast(IPainter) e.next()).dispose();
         fPainters.clear();
 
         fTextViewer.removeTextInputListener(this);
@@ -440,7 +440,7 @@
      */
     private void paint(int reason) {
         for (Iterator e = fPainters.iterator(); e.hasNext();)
-            ((IPainter) e.next()).paint(reason);
+            (cast(IPainter) e.next()).paint(reason);
     }
 
     /*
@@ -507,7 +507,7 @@
     public void inputDocumentAboutToBeChanged(IDocument oldInput, IDocument newInput) {
         if (oldInput !is null) {
             for (Iterator e = fPainters.iterator(); e.hasNext();)
-                ((IPainter) e.next()).deactivate(false);
+                (cast(IPainter) e.next()).deactivate(false);
             fManager.uninstall(oldInput);
             removeListeners();
         }
--- a/dwtx/jface/text/Position.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/Position.d	Sun Aug 24 01:46:20 2008 +0200
@@ -246,7 +246,7 @@
      */
     public bool equals(Object other) {
         if (other instanceof Position) {
-            Position rp= (Position) other;
+            Position rp= cast(Position) other;
             return (rp.offset is offset) && (rp.length is length);
         }
         return super.equals(other);
--- a/dwtx/jface/text/PropagatingFontFieldEditor.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/PropagatingFontFieldEditor.d	Sun Aug 24 01:46:20 2008 +0200
@@ -231,7 +231,7 @@
         if (presentsDefaultValue()) {
             Control c= getValueControl(fParent);
             if (c instanceof Label)
-                ((Label) c).setText(fDefaultFontLabel);
+                (cast(Label) c).setText(fDefaultFontLabel);
         }
     }
 
--- a/dwtx/jface/text/Region.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/Region.d	Sun Aug 24 01:46:20 2008 +0200
@@ -197,7 +197,7 @@
      */
     public bool equals(Object o) {
         if (o instanceof IRegion) {
-            IRegion r= (IRegion) o;
+            IRegion r= cast(IRegion) o;
             return r.getOffset() is fOffset && r.getLength() is fLength;
         }
         return false;
--- a/dwtx/jface/text/RewriteSessionEditProcessor.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/RewriteSessionEditProcessor.d	Sun Aug 24 01:46:20 2008 +0200
@@ -230,7 +230,7 @@
         if (!(document instanceof IDocumentExtension4))
             return super.performEdits();
 
-        IDocumentExtension4 extension= (IDocumentExtension4) document;
+        IDocumentExtension4 extension= cast(IDocumentExtension4) document;
         bool isLargeEdit= isLargeEdit(getRoot());
         DocumentRewriteSessionType type= isLargeEdit ? DocumentRewriteSessionType.UNRESTRICTED : DocumentRewriteSessionType.UNRESTRICTED_SMALL;
 
--- a/dwtx/jface/text/SequentialRewriteTextStore.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/SequentialRewriteTextStore.d	Sun Aug 24 01:46:20 2008 +0200
@@ -228,15 +228,15 @@
             fReplaceList.add(new Replace(offset, offset, length, text));
 
         } else {
-            Replace firstReplace= (Replace) fReplaceList.getFirst();
-            Replace lastReplace= (Replace) fReplaceList.getLast();
+            Replace firstReplace= cast(Replace) fReplaceList.getFirst();
+            Replace lastReplace= cast(Replace) fReplaceList.getLast();
 
             // backward
             if (offset + length <= firstReplace.newOffset) {
                 int delta= text.length() - length;
                 if (delta !is 0) {
                     for (Iterator i= fReplaceList.iterator(); i.hasNext(); ) {
-                        Replace replace= (Replace) i.next();
+                        Replace replace= cast(Replace) i.next();
                         replace.newOffset += delta;
                     }
                 }
@@ -248,7 +248,7 @@
                 int delta= getDelta(lastReplace);
                 fReplaceList.add(new Replace(offset - delta, offset, length, text));
 
-            } else if (ASSERT_SEQUENTIALITY) {
+            } else if cast(ASSERT_SEQUENTIALITY) {
                 throw new IllegalArgumentException();
 
             } else {
@@ -275,8 +275,8 @@
             return fSource.get(offset, length);
 
 
-        Replace firstReplace= (Replace) fReplaceList.getFirst();
-        Replace lastReplace= (Replace) fReplaceList.getLast();
+        Replace firstReplace= cast(Replace) fReplaceList.getFirst();
+        Replace lastReplace= cast(Replace) fReplaceList.getLast();
 
         // before
         if (offset + length <= firstReplace.newOffset) {
@@ -287,14 +287,14 @@
             int delta= getDelta(lastReplace);
             return fSource.get(offset - delta, length);
 
-        } else if (ASSERT_SEQUENTIALITY) {
+        } else if cast(ASSERT_SEQUENTIALITY) {
             throw new IllegalArgumentException();
 
         } else {
 
             int delta= 0;
             for (Iterator i= fReplaceList.iterator(); i.hasNext(); ) {
-                Replace replace= (Replace) i.next();
+                Replace replace= cast(Replace) i.next();
 
                 if (offset + length < replace.newOffset) {
                     return fSource.get(offset - delta, length);
@@ -335,8 +335,8 @@
         if (fReplaceList.isEmpty())
             return fSource.get(offset);
 
-        Replace firstReplace= (Replace) fReplaceList.getFirst();
-        Replace lastReplace= (Replace) fReplaceList.getLast();
+        Replace firstReplace= cast(Replace) fReplaceList.getFirst();
+        Replace lastReplace= cast(Replace) fReplaceList.getLast();
 
         // before
         if (offset < firstReplace.newOffset) {
@@ -347,14 +347,14 @@
             int delta= getDelta(lastReplace);
             return fSource.get(offset - delta);
 
-        } else if (ASSERT_SEQUENTIALITY) {
+        } else if cast(ASSERT_SEQUENTIALITY) {
             throw new IllegalArgumentException();
 
         } else {
 
             int delta= 0;
             for (Iterator i= fReplaceList.iterator(); i.hasNext(); ) {
-                Replace replace= (Replace) i.next();
+                Replace replace= cast(Replace) i.next();
 
                 if (offset < replace.newOffset)
                     return fSource.get(offset - delta);
@@ -376,7 +376,7 @@
         if (fReplaceList.isEmpty())
             return fSource.getLength();
 
-        Replace lastReplace= (Replace) fReplaceList.getLast();
+        Replace lastReplace= cast(Replace) fReplaceList.getLast();
         return fSource.getLength() + getDelta(lastReplace);
     }
 
@@ -400,7 +400,7 @@
 
         int delta= 0;
         for (Iterator i= fReplaceList.iterator(); i.hasNext(); ) {
-            Replace replace= (Replace) i.next();
+            Replace replace= cast(Replace) i.next();
 
             int offset= buffer.length() - delta;
             buffer.append(fSource.get(offset, replace.offset - offset));
--- a/dwtx/jface/text/TextAttribute.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/TextAttribute.d	Sun Aug 24 01:46:20 2008 +0200
@@ -255,7 +255,7 @@
 
         if (!(object instanceof TextAttribute))
             return false;
-        TextAttribute a= (TextAttribute)object;
+        TextAttribute a= cast(TextAttribute)object;
         
         return (a.style is style && equals(a.foreground, foreground) && equals(a.background, background) && equals(a.font, font));
     }
--- a/dwtx/jface/text/TextPresentation.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/TextPresentation.d	Sun Aug 24 01:46:20 2008 +0200
@@ -195,7 +195,7 @@
         int i= 0;
         Iterator e= presentation.getAllStyleRangeIterator();
         while (e.hasNext())
-            ranges[i++]= (StyleRange) e.next();
+            ranges[i++]= cast(StyleRange) e.next();
 
         text.setStyleRanges(ranges);
     }
@@ -240,7 +240,7 @@
          */
         public Object next() {
             try {
-                StyleRange r= (StyleRange) fRanges.get(fIndex++);
+                StyleRange r= cast(StyleRange) fRanges.get(fIndex++);
                 return createWindowRelativeRange(fWindow, r);
             } catch (ArrayIndexOutOfBoundsException x) {
                 throw new NoSuchElementException();
@@ -271,7 +271,7 @@
          * @return <code>true</code> if the object should be skipped by the iterator
          */
         protected bool skip(Object o) {
-            StyleRange r= (StyleRange) o;
+            StyleRange r= cast(StyleRange) o;
             return r.similarTo(fDefaultRange);
         }
 
@@ -363,7 +363,7 @@
         StyleRange range= createWindowRelativeRange(fResultWindow, fDefaultRange);
         if (range is null)
             return null;
-        return (StyleRange)range.clone();
+        return cast(StyleRange)range.clone();
 
     }
 
@@ -445,7 +445,7 @@
             int last= getFirstIndexAfterWindow(rangeRegion);
             for (int i= first; i < last && length > 0; i++) {
 
-                StyleRange current= (StyleRange)fRanges.get(i);
+                StyleRange current= cast(StyleRange)fRanges.get(i);
                 int currentStart= current.start;
                 int currentEnd= currentStart + current.length;
 
@@ -459,7 +459,7 @@
 
                 StyleRange currentCopy= null;
                 if (end < currentEnd)
-                    currentCopy= (StyleRange)current.clone();
+                    currentCopy= cast(StyleRange)current.clone();
 
                 if (start < currentStart) {
                     // Apply style to new default range and add it
@@ -485,7 +485,7 @@
 
                     // Apply the style to the rest of the current range and add it
                     if (current.length > 0) {
-                        current= (StyleRange)current.clone();
+                        current= cast(StyleRange)current.clone();
                         i++; last++;
                         fRanges.add(i, current);
                     }
@@ -661,7 +661,7 @@
             int i= -1, j= fRanges.size();
             while (j - i > 1) {
                 int k= (i + j) >> 1;
-                StyleRange r= (StyleRange) fRanges.get(k);
+                StyleRange r= cast(StyleRange) fRanges.get(k);
                 if (r.start + r.length > start)
                     j= k;
                 else
@@ -685,7 +685,7 @@
             int i= -1, j= fRanges.size();
             while (j - i > 1) {
                 int k= (i + j) >> 1;
-                StyleRange r= (StyleRange) fRanges.get(k);
+                StyleRange r= cast(StyleRange) fRanges.get(k);
                 if (r.start < end)
                     i= k;
                 else
@@ -718,7 +718,7 @@
         int end= (rangeEnd > windowEnd ? windowEnd : rangeEnd);
         end -= window.getOffset();
 
-        StyleRange newRange= (StyleRange) range.clone();
+        StyleRange newRange= cast(StyleRange) range.clone();
         newRange.start= start;
         newRange.length= end - start;
         return newRange;
@@ -800,7 +800,7 @@
     public StyleRange getFirstStyleRange() {
         try {
 
-            StyleRange range= (StyleRange) fRanges.get(getFirstIndexInWindow(fResultWindow));
+            StyleRange range= cast(StyleRange) fRanges.get(getFirstIndexInWindow(fResultWindow));
             return createWindowRelativeRange(fResultWindow, range);
 
         } catch (NoSuchElementException x) {
@@ -818,7 +818,7 @@
     public StyleRange getLastStyleRange() {
         try {
 
-            StyleRange range=  (StyleRange) fRanges.get(getFirstIndexAfterWindow(fResultWindow) - 1);
+            StyleRange range=  cast(StyleRange) fRanges.get(getFirstIndexAfterWindow(fResultWindow) - 1);
             return createWindowRelativeRange(fResultWindow, range);
 
         } catch (NoSuchElementException x) {
--- a/dwtx/jface/text/TextSelection.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/TextSelection.d	Sun Aug 24 01:46:20 2008 +0200
@@ -302,7 +302,7 @@
         if (obj is null || getClass() !is obj.getClass())
             return false;
 
-        TextSelection s= (TextSelection) obj;
+        TextSelection s= cast(TextSelection) obj;
         bool sameRange= (s.fOffset is fOffset && s.fLength is fLength);
         if (sameRange) {
 
--- a/dwtx/jface/text/TextUtilities.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/TextUtilities.d	Sun Aug 24 01:46:20 2008 +0200
@@ -333,7 +333,7 @@
             return null;
 
         final Iterator iterator= documentEvents.iterator();
-        final DocumentEvent firstEvent= (DocumentEvent) iterator.next();
+        final DocumentEvent firstEvent= cast(DocumentEvent) iterator.next();
 
         // current merged event
         final IDocument document= unprocessedDocument;
@@ -345,7 +345,7 @@
 
             final int delta= text.length() - length;
 
-            final DocumentEvent event= (DocumentEvent) iterator.next();
+            final DocumentEvent event= cast(DocumentEvent) iterator.next();
             final int eventOffset= event.getOffset();
             final int eventLength= event.getLength();
             final String eventText= event.getText() is null ? "" : event.getText(); //$NON-NLS-1$
@@ -398,7 +398,7 @@
             return null;
 
         final ListIterator iterator= documentEvents.listIterator(documentEvents.size());
-        final DocumentEvent firstEvent= (DocumentEvent) iterator.previous();
+        final DocumentEvent firstEvent= cast(DocumentEvent) iterator.previous();
 
         // current merged event
         final IDocument document= firstEvent.getDocument();
@@ -410,7 +410,7 @@
 
             final int delta= length - textLength;
 
-            final DocumentEvent event= (DocumentEvent) iterator.previous();
+            final DocumentEvent event= cast(DocumentEvent) iterator.previous();
             final int eventOffset= event.getOffset();
             final int eventLength= event.getLength();
             final int eventTextLength= event.getText() is null ? 0 : event.getText().length();
@@ -453,7 +453,7 @@
     public static Map removeDocumentPartitioners(IDocument document) {
         Map partitioners= new HashMap();
         if (document instanceof IDocumentExtension3) {
-            IDocumentExtension3 extension3= (IDocumentExtension3) document;
+            IDocumentExtension3 extension3= cast(IDocumentExtension3) document;
             String[] partitionings= extension3.getPartitionings();
             for (int i= 0; i < partitionings.length; i++) {
                 IDocumentPartitioner partitioner= extension3.getDocumentPartitioner(partitionings[i]);
@@ -484,17 +484,17 @@
      */
     public static void addDocumentPartitioners(IDocument document, Map partitioners) {
         if (document instanceof IDocumentExtension3) {
-            IDocumentExtension3 extension3= (IDocumentExtension3) document;
+            IDocumentExtension3 extension3= cast(IDocumentExtension3) document;
             Iterator e= partitioners.keySet().iterator();
             while (e.hasNext()) {
-                String partitioning= (String) e.next();
-                IDocumentPartitioner partitioner= (IDocumentPartitioner) partitioners.get(partitioning);
+                String partitioning= cast(String) e.next();
+                IDocumentPartitioner partitioner= cast(IDocumentPartitioner) partitioners.get(partitioning);
                 partitioner.connect(document);
                 extension3.setDocumentPartitioner(partitioning, partitioner);
             }
             partitioners.clear();
         } else {
-            IDocumentPartitioner partitioner= (IDocumentPartitioner) partitioners.get(IDocumentExtension3.DEFAULT_PARTITIONING);
+            IDocumentPartitioner partitioner= cast(IDocumentPartitioner) partitioners.get(IDocumentExtension3.DEFAULT_PARTITIONING);
             partitioner.connect(document);
             document.setDocumentPartitioner(partitioner);
         }
@@ -515,7 +515,7 @@
      */
     public static String getContentType(IDocument document, String partitioning, int offset, bool preferOpenPartitions) throws BadLocationException {
         if (document instanceof IDocumentExtension3) {
-            IDocumentExtension3 extension3= (IDocumentExtension3) document;
+            IDocumentExtension3 extension3= cast(IDocumentExtension3) document;
             try {
                 return extension3.getContentType(partitioning, offset, preferOpenPartitions);
             } catch (BadPartitioningException x) {
@@ -542,7 +542,7 @@
      */
     public static ITypedRegion getPartition(IDocument document, String partitioning, int offset, bool preferOpenPartitions) throws BadLocationException {
         if (document instanceof IDocumentExtension3) {
-            IDocumentExtension3 extension3= (IDocumentExtension3) document;
+            IDocumentExtension3 extension3= cast(IDocumentExtension3) document;
             try {
                 return extension3.getPartition(partitioning, offset, preferOpenPartitions);
             } catch (BadPartitioningException x) {
@@ -570,7 +570,7 @@
      */
     public static ITypedRegion[] computePartitioning(IDocument document, String partitioning, int offset, int length, bool includeZeroLengthPartitions) throws BadLocationException {
         if (document instanceof IDocumentExtension3) {
-            IDocumentExtension3 extension3= (IDocumentExtension3) document;
+            IDocumentExtension3 extension3= cast(IDocumentExtension3) document;
             try {
                 return extension3.computePartitioning(partitioning, offset, length, includeZeroLengthPartitions);
             } catch (BadPartitioningException x) {
@@ -591,14 +591,14 @@
      */
     public static String[] computePartitionManagingCategories(IDocument document) {
         if (document instanceof IDocumentExtension3) {
-            IDocumentExtension3 extension3= (IDocumentExtension3) document;
+            IDocumentExtension3 extension3= cast(IDocumentExtension3) document;
             String[] partitionings= extension3.getPartitionings();
             if (partitionings !is null) {
                 Set categories= new HashSet();
                 for (int i= 0; i < partitionings.length; i++) {
                     IDocumentPartitioner p= extension3.getDocumentPartitioner(partitionings[i]);
                     if (p instanceof IDocumentPartitionerExtension2) {
-                        IDocumentPartitionerExtension2 extension2= (IDocumentPartitionerExtension2) p;
+                        IDocumentPartitionerExtension2 extension2= cast(IDocumentPartitionerExtension2) p;
                         String[] c= extension2.getManagingPositionCategories();
                         if (c !is null) {
                             for (int j= 0; j < c.length; j++)
@@ -626,7 +626,7 @@
     public static String getDefaultLineDelimiter(IDocument document) {
 
         if (document instanceof IDocumentExtension4) 
-            return ((IDocumentExtension4)document).getDefaultLineDelimiter();
+            return (cast(IDocumentExtension4)document).getDefaultLineDelimiter();
         
         String lineDelimiter= null;
             
--- a/dwtx/jface/text/TextViewer.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/TextViewer.d	Sun Aug 24 01:46:20 2008 +0200
@@ -299,7 +299,7 @@
                 try {
 
                     if (e instanceof SlaveDocumentEvent) {
-                        SlaveDocumentEvent slave= (SlaveDocumentEvent) e;
+                        SlaveDocumentEvent slave= cast(SlaveDocumentEvent) e;
                         DocumentEvent master= slave.getMasterEvent();
                         if (master !is null)
                             preservedText= master.getDocument().get(master.getOffset(), master.getLength());
@@ -309,7 +309,7 @@
 
                 } catch (BadLocationException x) {
                     preservedText= null;
-                    if (TRACE_ERRORS)
+                    if cast(TRACE_ERRORS)
                         System.out.println(JFaceTextMessages.getString("TextViewer.error.bad_location.WidgetCommand.setEvent")); //$NON-NLS-1$
                 }
             } else
@@ -344,7 +344,7 @@
             if (event.movement !is DWT.MOVEMENT_WORD_END)
                 return;
             
-            if (TRACE_DOUBLE_CLICK) {
+            if cast(TRACE_DOUBLE_CLICK) {
                 System.out.println("\n+++"); //$NON-NLS-1$
                 print(event);
             }
@@ -363,18 +363,18 @@
             if (event.movement !is DWT.MOVEMENT_WORD_START)
                 return;
             
-            if (TRACE_DOUBLE_CLICK) {
+            if cast(TRACE_DOUBLE_CLICK) {
                 System.out.println("\n---"); //$NON-NLS-1$
                 print(event);
             }
             if (fDoubleClickSelection is null) {
-                ITextDoubleClickStrategy s= (ITextDoubleClickStrategy) selectContentTypePlugin(getSelectedRange().x, fDoubleClickStrategies);
+                ITextDoubleClickStrategy s= cast(ITextDoubleClickStrategy) selectContentTypePlugin(getSelectedRange().x, fDoubleClickStrategies);
                 if (s !is null) {
                     StyledText textWidget= getTextWidget();
                     s.doubleClicked(TextViewer.this);
                     fDoubleClickSelection= textWidget.getSelection();
                     event.newOffset= fDoubleClickSelection.x;
-                    if (TRACE_DOUBLE_CLICK)
+                    if cast(TRACE_DOUBLE_CLICK)
                         System.out.println("- setting selection: x= " + fDoubleClickSelection.x + ", y= " + fDoubleClickSelection.y); //$NON-NLS-1$ //$NON-NLS-2$
                 }
             } else {
@@ -614,7 +614,7 @@
                 fReentranceCount++;
                 Iterator iterator= fListeners.iterator();
                 while (iterator.hasNext() && event.doit) {
-                    VerifyKeyListener listener= (VerifyKeyListener) iterator.next();
+                    VerifyKeyListener listener= cast(VerifyKeyListener) iterator.next();
                     listener.verifyKey(event); // we might trigger reentrant calls on GTK
                 }
             } finally {
@@ -631,7 +631,7 @@
             if (!fBatched.isEmpty()) {
                 Iterator e= fBatched.iterator();
                 while (e.hasNext()) {
-                    Batch batch= (Batch) e.next();
+                    Batch batch= cast(Batch) e.next();
                     insertListener(batch.listener, batch.index);
                 }
                 fBatched.clear();
@@ -1126,7 +1126,7 @@
             if (replaceAll) {
 
                 if (document instanceof IDocumentExtension4) {
-                    IDocumentExtension4 extension= (IDocumentExtension4) document;
+                    IDocumentExtension4 extension= cast(IDocumentExtension4) document;
                     fRewriteSession= extension.startRewriteSession(DocumentRewriteSessionType.SEQUENTIAL);
                 } else {
                     TextViewer.this.setRedraw(false);
@@ -1141,7 +1141,7 @@
             } else {
 
                 if (document instanceof IDocumentExtension4) {
-                    IDocumentExtension4 extension= (IDocumentExtension4) document;
+                    IDocumentExtension4 extension= cast(IDocumentExtension4) document;
                     extension.stopRewriteSession(fRewriteSession);
                 } else {
                     TextViewer.this.setRedraw(true);
@@ -1227,7 +1227,7 @@
         public bool equals(Object obj) {
             if (obj is null || obj.getClass() !is getClass())
                 return false;
-            TextHoverKey textHoverKey= (TextHoverKey)obj;
+            TextHoverKey textHoverKey= cast(TextHoverKey)obj;
             return textHoverKey.fContentType.equals(fContentType) && textHoverKey.fStateMask is fStateMask;
         }
 
@@ -2099,7 +2099,7 @@
         if (fAutoIndentStrategies is null)
             fAutoIndentStrategies= new HashMap();
 
-        List autoEditStrategies= (List) fAutoIndentStrategies.get(contentType);
+        List autoEditStrategies= cast(List) fAutoIndentStrategies.get(contentType);
 
         if (strategies is null) {
             if (autoEditStrategies is null)
@@ -2130,7 +2130,7 @@
         if (fAutoIndentStrategies is null)
             fAutoIndentStrategies= new HashMap();
 
-        List autoEditStrategies= (List) fAutoIndentStrategies.get(contentType);
+        List autoEditStrategies= cast(List) fAutoIndentStrategies.get(contentType);
         if (autoEditStrategies is null) {
             autoEditStrategies= new ArrayList();
             fAutoIndentStrategies.put(contentType, autoEditStrategies);
@@ -2147,7 +2147,7 @@
         if (fAutoIndentStrategies is null)
             return;
 
-        List autoEditStrategies= (List) fAutoIndentStrategies.get(contentType);
+        List autoEditStrategies= cast(List) fAutoIndentStrategies.get(contentType);
         if (autoEditStrategies is null)
             return;
 
@@ -2277,7 +2277,7 @@
 
         Iterator iter= new HashSet(fTextHovers.keySet()).iterator();
         while (iter.hasNext()) {
-            TextHoverKey key= (TextHoverKey)iter.next();
+            TextHoverKey key= cast(TextHoverKey)iter.next();
             if (key.fContentType.equals(contentType))
                 fTextHovers.remove(key);
         }
@@ -2317,9 +2317,9 @@
                 key.setStateMask(ITextViewerExtension2.DEFAULT_HOVER_STATE_MASK);
                 textHover= fTextHovers.get(key);
             }
-            return (ITextHover) textHover;
+            return cast(ITextHover) textHover;
         } catch (BadLocationException x) {
-            if (TRACE_ERRORS)
+            if cast(TRACE_ERRORS)
                 System.out.println(JFaceTextMessages.getString("TextViewer.error.bad_location.selectContentTypePlugin")); //$NON-NLS-1$
         }
         return null;
@@ -2390,7 +2390,7 @@
 
                 bool accepted= false;
                 if (fWidgetTokenKeeper instanceof IWidgetTokenKeeperExtension)  {
-                    IWidgetTokenKeeperExtension extension= (IWidgetTokenKeeperExtension) fWidgetTokenKeeper;
+                    IWidgetTokenKeeperExtension extension= cast(IWidgetTokenKeeperExtension) fWidgetTokenKeeper;
                     accepted= extension.requestWidgetToken(this, priority);
                 } else  {
                     accepted= fWidgetTokenKeeper.requestWidgetToken(this);
@@ -2551,7 +2551,7 @@
      */
     public void setSelection(ISelection selection, bool reveal) {
         if (selection instanceof ITextSelection) {
-            ITextSelection s= (ITextSelection) selection;
+            ITextSelection s= cast(ITextSelection) selection;
             setSelectedRange(s.getOffset(), s.getLength());
             if (reveal)
                 revealRange(s.getOffset(), s.getLength());
@@ -2714,7 +2714,7 @@
         if (listeners !is null) {
             listeners= new ArrayList(listeners);
             for (int i= 0; i < listeners.size(); i++) {
-                ISelectionChangedListener l= (ISelectionChangedListener) listeners.get(i);
+                ISelectionChangedListener l= cast(ISelectionChangedListener) listeners.get(i);
                 l.selectionChanged(event);
             }
         }
@@ -2785,11 +2785,11 @@
             textListeners= new ArrayList(textListeners);
             DocumentEvent event= cmd.event;
             if (event instanceof SlaveDocumentEvent)
-                event= ((SlaveDocumentEvent) event).getMasterEvent();
+                event= (cast(SlaveDocumentEvent) event).getMasterEvent();
 
             TextEvent e= new TextEvent(cmd.start, cmd.length, cmd.text, cmd.preservedText, event, redraws());
             for (int i= 0; i < textListeners.size(); i++) {
-                ITextListener l= (ITextListener) textListeners.get(i);
+                ITextListener l= cast(ITextListener) textListeners.get(i);
                 l.textChanged(e);
             }
         }
@@ -2836,7 +2836,7 @@
         List listener= fTextInputListeners;
         if (listener !is null) {
             for (int i= 0; i < listener.size(); i++) {
-                ITextInputListener l= (ITextInputListener) listener.get(i);
+                ITextInputListener l= cast(ITextInputListener) listener.get(i);
                 l.inputDocumentAboutToBeChanged(oldInput, newInput);
             }
         }
@@ -2853,7 +2853,7 @@
         List listener= fTextInputListeners;
         if (listener !is null) {
             for (int i= 0; i < listener.size(); i++) {
-                ITextInputListener l= (ITextInputListener) listener.get(i);
+                ITextInputListener l= cast(ITextInputListener) listener.get(i);
                 l.inputDocumentChanged(oldInput, newInput);
             }
         }
@@ -2882,7 +2882,7 @@
 
         IDocument document= null;
         if (input instanceof IDocument)
-            document= (IDocument) input;
+            document= cast(IDocument) input;
 
         setDocument(document);
     }
@@ -2968,7 +2968,7 @@
      */
     protected bool updateVisibleDocument(IDocument visibleDocument, int visibleRegionOffset, int visibleRegionLength) throws BadLocationException {
         if (visibleDocument instanceof ChildDocument) {
-            ChildDocument childDocument= (ChildDocument) visibleDocument;
+            ChildDocument childDocument= cast(ChildDocument) visibleDocument;
 
             IDocument document= childDocument.getParentDocument();
             int line= document.getLineOfOffset(visibleRegionOffset);
@@ -3080,7 +3080,7 @@
             if (topPixel >= 0 && topPixel !is fLastTopPixel) {
                 if (fViewportListeners !is null) {
                     for (int i= 0; i < fViewportListeners.size(); i++) {
-                        IViewportListener l= (IViewportListener) fViewportListeners.get(i);
+                        IViewportListener l= cast(IViewportListener) fViewportListeners.get(i);
                         l.viewportChanged(topPixel);
                     }
                 }
@@ -3164,7 +3164,7 @@
                 top= getVisibleDocument().getLineOffset(top);
                 return widgetOffset2ModelOffset(top);
             } catch (BadLocationException ex) {
-                if (TRACE_ERRORS)
+                if cast(TRACE_ERRORS)
                     System.out.println(JFaceTextMessages.getString("TextViewer.error.bad_location.getTopIndexStartOffset")); //$NON-NLS-1$
             }
         }
@@ -3189,7 +3189,7 @@
             return Math.min(coverageEndOffset, bottomEndOffset);
 
         } catch (BadLocationException ex) {
-            if (TRACE_ERRORS)
+            if cast(TRACE_ERRORS)
                 System.out.println(JFaceTextMessages.getString("TextViewer.error.bad_location.getBottomIndexEndOffset")); //$NON-NLS-1$
             return getDocument().getLength() - 1;
         }
@@ -3300,7 +3300,7 @@
                     else
                         newOffset= startPixel;
 
-                    float index= ((float)newOffset) / ((float)getAverageCharWidth());
+                    float index= (cast(float)newOffset) / (cast(float)getAverageCharWidth());
 
                     fTextWidget.setHorizontalIndex(Math.round(index));
                 }
@@ -3555,7 +3555,7 @@
 
         IDocument document= getVisibleDocument();
         if (document instanceof ChildDocument) {
-            ChildDocument cdoc= (ChildDocument) document;
+            ChildDocument cdoc= cast(ChildDocument) document;
             return cdoc.getParentDocumentRange().getOffset();
         }
 
@@ -3569,7 +3569,7 @@
 
         IDocument document= getVisibleDocument();
         if (document instanceof ChildDocument) {
-            Position p= ((ChildDocument) document).getParentDocumentRange();
+            Position p= (cast(ChildDocument) document).getParentDocumentRange();
             return new Region(p.getOffset(), p.getLength());
         }
 
@@ -3582,7 +3582,7 @@
     public bool overlapsWithVisibleRegion(int start, int length) {
         IDocument document= getVisibleDocument();
         if (document instanceof ChildDocument) {
-            ChildDocument cdoc= (ChildDocument) document;
+            ChildDocument cdoc= cast(ChildDocument) document;
             return cdoc.getParentDocumentRange().overlapsWith(start, length);
         } else if (document !is null) {
             int size= document.getLength();
@@ -3659,7 +3659,7 @@
         try {
             return selectContentTypePlugin(TextUtilities.getContentType(getDocument(), getDocumentPartitioning(), offset, true), plugins);
         } catch (BadLocationException x) {
-            if (TRACE_ERRORS)
+            if cast(TRACE_ERRORS)
                 System.out.println(JFaceTextMessages.getString("TextViewer.error.bad_location.selectContentTypePlugin")); //$NON-NLS-1$
         }
         return null;
@@ -3698,7 +3698,7 @@
         if (fTabsToSpacesConverter !is null)
             fTabsToSpacesConverter.customizeDocumentCommand(document, command);
 
-        List strategies= (List) selectContentTypePlugin(command.offset, fAutoIndentStrategies);
+        List strategies= cast(List) selectContentTypePlugin(command.offset, fAutoIndentStrategies);
         if (strategies is null)
             return;
 
@@ -3708,14 +3708,14 @@
             break;
 
         case 1:
-            ((IAutoEditStrategy) strategies.iterator().next()).customizeDocumentCommand(document, command);
+            (cast(IAutoEditStrategy) strategies.iterator().next()).customizeDocumentCommand(document, command);
             break;
 
         // make iterator robust against adding/removing strategies from within strategies
         default:
             strategies= new ArrayList(strategies);
             for (final Iterator iterator= strategies.iterator(); iterator.hasNext(); )
-                ((IAutoEditStrategy) iterator.next()).customizeDocumentCommand(document, command);
+                (cast(IAutoEditStrategy) iterator.next()).customizeDocumentCommand(document, command);
 
             break;
         }
@@ -3778,7 +3778,7 @@
                 }
             } catch (BadLocationException x) {
 
-                if (TRACE_ERRORS)
+                if cast(TRACE_ERRORS)
                     System.out.println(JFaceTextMessages.getString("TextViewer.error.bad_location.verifyText")); //$NON-NLS-1$
 
             } finally {
@@ -3934,7 +3934,7 @@
 
         IDocument document= getDocument();
         if (document instanceof IDocumentExtension2) {
-            IDocumentExtension2 extension= (IDocumentExtension2) document;
+            IDocumentExtension2 extension= cast(IDocumentExtension2) document;
             if (ignore)
                 extension.ignorePostNotificationReplaces();
             else
@@ -4077,7 +4077,7 @@
             return (offset > region.getOffset() + region.getLength() ? -1 : startLine + 1);
 
         } catch (BadLocationException x) {
-            if (TRACE_ERRORS)
+            if cast(TRACE_ERRORS)
                 System.out.println(JFaceTextMessages.getString("TextViewer.error.bad_location.getFirstCompleteLineOfRegion")); //$NON-NLS-1$
         }
 
@@ -4157,7 +4157,7 @@
             }
 
             if (d instanceof IDocumentExtension4) {
-                IDocumentExtension4 extension= (IDocumentExtension4) d;
+                IDocumentExtension4 extension= cast(IDocumentExtension4) d;
                 rewriteSession= extension.startRewriteSession(DocumentRewriteSessionType.SEQUENTIAL);
             } else {
                 setRedraw(false);
@@ -4179,7 +4179,7 @@
             }
 
         } catch (BadLocationException x) {
-            if (TRACE_ERRORS)
+            if cast(TRACE_ERRORS)
                 System.out.println(JFaceTextMessages.getString("TextViewer.error.bad_location.shift_1")); //$NON-NLS-1$
 
         } finally {
@@ -4188,7 +4188,7 @@
                 TextUtilities.addDocumentPartitioners(d, partitioners);
             
             if (d instanceof IDocumentExtension4) {
-                IDocumentExtension4 extension= (IDocumentExtension4) d;
+                IDocumentExtension4 extension= cast(IDocumentExtension4) d;
                 extension.stopRewriteSession(rewriteSession);
             } else {
                 stopSequentialRewriteMode();
@@ -4219,7 +4219,7 @@
             }
 
         } catch (BadLocationException x) {
-            if (TRACE_ERRORS)
+            if cast(TRACE_ERRORS)
                 System.out.println("TextViewer.shiftRight: BadLocationException"); //$NON-NLS-1$
         }
     }
@@ -4285,7 +4285,7 @@
             }
 
         } catch (BadLocationException x) {
-            if (TRACE_ERRORS)
+            if cast(TRACE_ERRORS)
                 System.out.println("TextViewer.shiftLeft: BadLocationException"); //$NON-NLS-1$
         }
     }
@@ -4419,7 +4419,7 @@
             }
 
         } catch (BadLocationException x) {
-            if (TRACE_ERRORS)
+            if cast(TRACE_ERRORS)
                 System.out.println(JFaceTextMessages.getString("TextViewer.error.bad_location.findAndSelect")); //$NON-NLS-1$
         }
 
@@ -4497,7 +4497,7 @@
 
 
         } catch (BadLocationException x) {
-            if (TRACE_ERRORS)
+            if cast(TRACE_ERRORS)
                 System.out.println(JFaceTextMessages.getString("TextViewer.error.bad_location.findAndSelect")); //$NON-NLS-1$
         }
 
@@ -4556,7 +4556,7 @@
             ArrayList ranges= new ArrayList(presentation.getDenumerableRanges());
             Iterator e= presentation.getNonDefaultStyleRangeIterator();
             while (e.hasNext()) {
-                range= (StyleRange) e.next();
+                range= cast(StyleRange) e.next();
                 range= modelStyleRange2WidgetStyleRange(range);
                 if (range !is null)
                     ranges.add(range);
@@ -4573,7 +4573,7 @@
             List list= new ArrayList(presentation.getDenumerableRanges());
             Iterator e= presentation.getAllStyleRangeIterator();
             while (e.hasNext()) {
-                range= (StyleRange) e.next();
+                range= cast(StyleRange) e.next();
                 range= modelStyleRange2WidgetStyleRange(range);
                 if (range !is null)
                     list.add(range);
@@ -4598,7 +4598,7 @@
         List list= new ArrayList(presentation.getDenumerableRanges());
         Iterator e= presentation.getAllStyleRangeIterator();
         while (e.hasNext()) {
-            StyleRange range= (StyleRange) e.next();
+            StyleRange range= cast(StyleRange) e.next();
             range= modelStyleRange2WidgetStyleRange(range);
             if (range !is null)
                 list.add(range);
@@ -4621,7 +4621,7 @@
 
         IDocument document= getVisibleDocument();
         if (document instanceof ChildDocument) {
-            Position p= ((ChildDocument) document).getParentDocumentRange();
+            Position p= (cast(ChildDocument) document).getParentDocumentRange();
             return new Region(p.getOffset(), p.getLength());
         }
 
@@ -4647,7 +4647,7 @@
         if (fTextPresentationListeners !is null) {
             ArrayList listeners= new ArrayList(fTextPresentationListeners);
             for (int i= 0, size= listeners.size(); i < size; i++) {
-                ITextPresentationListener listener= (ITextPresentationListener)listeners.get(i);
+                ITextPresentationListener listener= cast(ITextPresentationListener)listeners.get(i);
                 listener.applyTextPresentation(presentation);
             }
         }
@@ -4784,7 +4784,7 @@
      */
     protected void inputChanged(Object newInput, Object oldInput) {
 
-        IDocument oldDocument= (IDocument) oldInput;
+        IDocument oldDocument= cast(IDocument) oldInput;
         if (oldDocument !is null) {
 
             if (fMarkPosition !is null && !fMarkPosition.isDeleted())
@@ -4801,18 +4801,18 @@
         fMarkPosition= null;
 
         if (oldDocument instanceof IDocumentExtension4) {
-            IDocumentExtension4 document= (IDocumentExtension4) oldDocument;
+            IDocumentExtension4 document= cast(IDocumentExtension4) oldDocument;
             document.removeDocumentRewriteSessionListener(fDocumentRewriteSessionListener);
         }
 
         super.inputChanged(newInput, oldInput);
 
         if (newInput instanceof IDocumentExtension4) {
-            IDocumentExtension4 document= (IDocumentExtension4) newInput;
+            IDocumentExtension4 document= cast(IDocumentExtension4) newInput;
             document.addDocumentRewriteSessionListener(fDocumentRewriteSessionListener);
         }
 
-        IDocument newDocument= (IDocument) newInput;
+        IDocument newDocument= cast(IDocument) newInput;
         if (newDocument !is null) {
             newDocument.addPositionCategory(MARK_POSITION_CATEGORY);
             newDocument.addPositionUpdater(fMarkPositionUpdater);
@@ -4846,7 +4846,7 @@
      */
     protected void enabledRedrawing(int topIndex) {
         if (fDocumentAdapter instanceof IDocumentAdapterExtension) {
-            IDocumentAdapterExtension extension= (IDocumentAdapterExtension) fDocumentAdapter;
+            IDocumentAdapterExtension extension= cast(IDocumentAdapterExtension) fDocumentAdapter;
             StyledText textWidget= getTextWidget();
             if (textWidget !is null && !textWidget.isDisposed()) {
                 extension.resumeForwardingDocumentChanges();
@@ -4880,7 +4880,7 @@
             fViewerState= new ViewerState();
 
         if (fDocumentAdapter instanceof IDocumentAdapterExtension) {
-            IDocumentAdapterExtension extension= (IDocumentAdapterExtension) fDocumentAdapter;
+            IDocumentAdapterExtension extension= cast(IDocumentAdapterExtension) fDocumentAdapter;
             extension.stopForwardingDocumentChanges();
         }
 
@@ -4950,7 +4950,7 @@
     protected final void startSequentialRewriteMode(bool normalized) {
         IDocument document= getDocument();
         if (document instanceof IDocumentExtension) {
-            IDocumentExtension extension= (IDocumentExtension) document;
+            IDocumentExtension extension= cast(IDocumentExtension) document;
             extension.startSequentialRewrite(normalized);
         }
     }
@@ -4964,7 +4964,7 @@
     protected final void stopSequentialRewriteMode() {
         IDocument document= getDocument();
         if (document instanceof IDocumentExtension) {
-            IDocumentExtension extension= (IDocumentExtension) document;
+            IDocumentExtension extension= cast(IDocumentExtension) document;
             extension.stopSequentialRewrite();
         }
     }
@@ -5115,11 +5115,11 @@
         try {
             if (modelRange.getLength() < 0) {
                 Region reversed= new Region(modelRange.getOffset() + modelRange.getLength(), -modelRange.getLength());
-                IRegion result= ((IDocumentInformationMappingExtension2) fInformationMapping).toClosestImageRegion(reversed);
+                IRegion result= (cast(IDocumentInformationMappingExtension2) fInformationMapping).toClosestImageRegion(reversed);
                 if (result !is null)
                     return new Region(result.getOffset() + result.getLength(), -result.getLength());
             }
-            return ((IDocumentInformationMappingExtension2) fInformationMapping).toClosestImageRegion(modelRange);
+            return (cast(IDocumentInformationMappingExtension2) fInformationMapping).toClosestImageRegion(modelRange);
 
         } catch (BadLocationException x) {
         }
@@ -5261,7 +5261,7 @@
     protected StyleRange modelStyleRange2WidgetStyleRange(StyleRange range) {
         IRegion region= modelRange2WidgetRange(new Region(range.start, range.length));
         if (region !is null) {
-            StyleRange result= (StyleRange) range.clone();
+            StyleRange result= cast(StyleRange) range.clone();
             result.start= region.getOffset();
             result.length= region.getLength();
             return result;
@@ -5360,7 +5360,7 @@
      */
     public bool moveFocusToWidgetToken() {
         if (fWidgetTokenKeeper instanceof IWidgetTokenKeeperExtension) {
-            IWidgetTokenKeeperExtension extension= (IWidgetTokenKeeperExtension) fWidgetTokenKeeper;
+            IWidgetTokenKeeperExtension extension= cast(IWidgetTokenKeeperExtension) fWidgetTokenKeeper;
             return extension.setFocus(this);
         }
         return false;
@@ -5452,7 +5452,7 @@
         if (fHyperlinkDetectors !is null) {
             for (int i= 0; i < fHyperlinkDetectors.length; i++) {
                 if (fHyperlinkDetectors[i] instanceof IHyperlinkDetectorExtension)
-                    ((IHyperlinkDetectorExtension)fHyperlinkDetectors[i]).dispose();
+                    (cast(IHyperlinkDetectorExtension)fHyperlinkDetectors[i]).dispose();
             }
         }
         
--- a/dwtx/jface/text/TextViewerHoverManager.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/TextViewerHoverManager.d	Sun Aug 24 01:46:20 2008 +0200
@@ -310,7 +310,7 @@
                         Object information;
                         try {
                             if (hover instanceof ITextHoverExtension2)
-                                information= ((ITextHoverExtension2)hover).getHoverInfo2(fTextViewer, region);
+                                information= (cast(ITextHoverExtension2)hover).getHoverInfo2(fTextViewer, region);
                             else
                                 information= hover.getHoverInfo(fTextViewer, region);
                         } catch (ArrayIndexOutOfBoundsException x) {
@@ -323,7 +323,7 @@
                         }
 
                         if (hover instanceof ITextHoverExtension)
-                            setCustomInformationControlCreator(((ITextHoverExtension) hover).getHoverControlCreator());
+                            setCustomInformationControlCreator((cast(ITextHoverExtension) hover).getHoverControlCreator());
                         else
                             setCustomInformationControlCreator(null);
 
@@ -411,7 +411,7 @@
                 widgetOffset--;
 
             if (fTextViewer instanceof ITextViewerExtension5) {
-                ITextViewerExtension5 extension= (ITextViewerExtension5) fTextViewer;
+                ITextViewerExtension5 extension= cast(ITextViewerExtension5) fTextViewer;
                 return extension.widgetOffset2ModelOffset(widgetOffset);
             }
 
@@ -429,7 +429,7 @@
         if (fTextViewer !is null && fTextViewer.requestWidgetToken(this, WIDGET_PRIORITY))
             super.showInformationControl(subjectArea);
         else
-            if (DEBUG)
+            if cast(DEBUG)
                 System.out.println("TextViewerHoverManager#showInformationControl(..) did not get widget token"); //$NON-NLS-1$
     }
 
--- a/dwtx/jface/text/TextViewerUndoManager.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/TextViewerUndoManager.d	Sun Aug 24 01:46:20 2008 +0200
@@ -293,7 +293,7 @@
                 if (event.isCompound()) {
                     ITextViewerExtension extension= null;
                     if (fTextViewer instanceof ITextViewerExtension)
-                        extension= (ITextViewerExtension) fTextViewer;
+                        extension= cast(ITextViewerExtension) fTextViewer;
 
                     if (extension !is null)
                         extension.setRedraw(false);
@@ -301,7 +301,7 @@
                 fTextViewer.getTextWidget().getDisplay().syncExec(new Runnable() {
                     public void run() {
                         if (fTextViewer instanceof TextViewer)
-                            ((TextViewer)fTextViewer).ignoreAutoEditStrategies(true);
+                            (cast(TextViewer)fTextViewer).ignoreAutoEditStrategies(true);
                     }
                 });
                 
@@ -309,13 +309,13 @@
                 fTextViewer.getTextWidget().getDisplay().syncExec(new Runnable() {
                     public void run() {
                         if (fTextViewer instanceof TextViewer)
-                            ((TextViewer)fTextViewer).ignoreAutoEditStrategies(false);
+                            (cast(TextViewer)fTextViewer).ignoreAutoEditStrategies(false);
                     }
                 });
                 if (event.isCompound()) {
                     ITextViewerExtension extension= null;
                     if (fTextViewer instanceof ITextViewerExtension)
-                        extension= (ITextViewerExtension) fTextViewer;
+                        extension= cast(ITextViewerExtension) fTextViewer;
 
                     if (extension !is null)
                         extension.setRedraw(true);
@@ -546,7 +546,7 @@
      */
     private void selectAndReveal(int offset, int length) {
         if (fTextViewer instanceof ITextViewerExtension5) {
-            ITextViewerExtension5 extension= (ITextViewerExtension5) fTextViewer;
+            ITextViewerExtension5 extension= cast(ITextViewerExtension5) fTextViewer;
             extension.exposeModelRange(new Region(offset, length));
         } else if (!fTextViewer.overlapsWithVisibleRegion(offset, length))
             fTextViewer.resetVisibleRegion();
--- a/dwtx/jface/text/TreeLineTracker.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/TreeLineTracker.d	Sun Aug 24 01:46:20 2008 +0200
@@ -322,7 +322,7 @@
         if (n is 0)
             return;
         
-        Line line= (Line) lines.get(0);
+        Line line= cast(Line) lines.get(0);
         String delim= line.delimiter;
         if (delim is null)
             delim= NO_DELIM;
@@ -331,7 +331,7 @@
         Node node= fRoot;
         
         for (int i= 1; i < n; i++) {
-            line= (Line) lines.get(i);
+            line= cast(Line) lines.get(i);
             delim= line.delimiter;
             if (delim is null)
                 delim= NO_DELIM;
@@ -342,7 +342,7 @@
         if (node.delimiter !is NO_DELIM)
             insertAfter(node, 0, NO_DELIM);
         
-        if (ASSERT) checkTree();
+        if cast(ASSERT) checkTree();
     }
 
     /**
@@ -504,9 +504,9 @@
      * @param node the node to rotate around
      */
     private void rotateLeft(Node node) {
-        if (ASSERT) Assert.isNotNull(node);
+        if cast(ASSERT) Assert.isNotNull(node);
         Node child= node.right;
-        if (ASSERT) Assert.isNotNull(child);
+        if cast(ASSERT) Assert.isNotNull(child);
         bool leftChild= node.parent is null || node is node.parent.left;
         
         // restructure
@@ -529,9 +529,9 @@
      * @param node the node to rotate around
      */
     private void rotateRight(Node node) {
-        if (ASSERT) Assert.isNotNull(node);
+        if cast(ASSERT) Assert.isNotNull(node);
         Node child= node.left;
-        if (ASSERT) Assert.isNotNull(child);
+        if cast(ASSERT) Assert.isNotNull(child);
         bool leftChild= node.parent is null || node is node.parent.left;
         
         setChild(node.parent, child, leftChild);
@@ -705,7 +705,7 @@
                 case 0:
                     break;
                 default:
-                    if (ASSERT) 
+                    if cast(ASSERT) 
                         Assert.isTrue(false);
             }
             return;
@@ -723,7 +723,7 @@
             singleLeftRotation(node, parent);
         } else if (node.balance is -1) {
             rightLeftRotation(node, parent);
-        } else if (ASSERT) {
+        } else if cast(ASSERT) {
             Assert.isTrue(false);
         }
     }
@@ -739,7 +739,7 @@
             singleRightRotation(node, parent);
         } else if (node.balance is 1) {
             leftRightRotation(node, parent);
-        } else if (ASSERT) {
+        } else if cast(ASSERT) {
             Assert.isTrue(false);
         }
     }
@@ -748,7 +748,7 @@
      * @see dwtx.jface.text.ILineTracker#replace(int, int, java.lang.String)
      */
     public final void replace(int offset, int length, String text) throws BadLocationException {
-        if (ASSERT) checkTree();
+        if cast(ASSERT) checkTree();
         
         // Inlined nodeByOffset as we need both node and offset
         int remaining= offset;
@@ -773,14 +773,14 @@
             }
         }
         // Inline nodeByOffset end
-        if (ASSERT) Assert.isTrue(first !is null);
+        if cast(ASSERT) Assert.isTrue(first !is null);
         
         Node last;
         if (offset + length < firstNodeOffset + first.length)
             last= first;
         else
             last= nodeByOffset(offset + length);
-        if (ASSERT) Assert.isTrue(last !is null);
+        if cast(ASSERT) Assert.isTrue(last !is null);
         
         int firstLineDelta= firstNodeOffset + first.length - offset;
         if (first is last)
@@ -788,7 +788,7 @@
         else
             replaceFromTo(first, last, text, length, firstLineDelta);
 
-        if (ASSERT) checkTree();
+        if cast(ASSERT) checkTree();
     }
 
     /**
@@ -913,7 +913,7 @@
      * @param delta the character delta to add to the node's length
      */
     private void updateLength(Node node, int delta) {
-        if (ASSERT) Assert.isTrue(node.length  + delta >= 0);
+        if cast(ASSERT) Assert.isTrue(node.length  + delta >= 0);
         
         // update the node itself
         node.length += delta;
@@ -978,8 +978,8 @@
      * @param node the node to delete.
      */
     private void delete(Node node) {
-        if (ASSERT) Assert.isTrue(node !is null);
-        if (ASSERT) Assert.isTrue(node.length is 0);
+        if cast(ASSERT) Assert.isTrue(node !is null);
+        if cast(ASSERT) Assert.isTrue(node.length is 0);
         
         Node parent= node.parent;
         Node toUpdate; // the parent of the node that lost a child
@@ -1018,15 +1018,15 @@
             Node successor= successor(node);
             
             // successor exists (otherwise node would not have right child, case 1)
-            if (ASSERT) Assert.isNotNull(successor);
+            if cast(ASSERT) Assert.isNotNull(successor);
             // successor has no left child (a left child would be the real successor of node)
-            if (ASSERT) Assert.isTrue(successor.left is null);
-            if (ASSERT) Assert.isTrue(successor.line is 0);
+            if cast(ASSERT) Assert.isTrue(successor.left is null);
+            if cast(ASSERT) Assert.isTrue(successor.line is 0);
             // successor is the left child of its parent (otherwise parent would be smaller and
             // hence the real successor)
-            if (ASSERT) Assert.isTrue(successor is successor.parent.left);
+            if cast(ASSERT) Assert.isTrue(successor is successor.parent.left);
             // successor is not a child of node (would have been covered by 2a)
-            if (ASSERT) Assert.isTrue(successor.parent !is node);
+            if cast(ASSERT) Assert.isTrue(successor.parent !is node);
 
             toUpdate= successor.parent;
             lostLeftChild= true;
@@ -1087,7 +1087,7 @@
                 case 0:
                     break; // propagate up
                 default:
-                    if (ASSERT) 
+                    if cast(ASSERT) 
                         Assert.isTrue(false);
             }
             
@@ -1116,7 +1116,7 @@
             parent.balance= 1;
             return true;
         } else {
-            if (ASSERT) Assert.isTrue(false);
+            if cast(ASSERT) Assert.isTrue(false);
             return true;
         }
     }
@@ -1142,7 +1142,7 @@
             parent.balance= -1;
             return true;
         } else {
-            if (ASSERT) Assert.isTrue(false);
+            if cast(ASSERT) Assert.isTrue(false);
             return true;
         }
     }
@@ -1176,7 +1176,7 @@
             child= parent;
             parent= child.parent;
         }
-        if (ASSERT) Assert.isTrue(node.delimiter is NO_DELIM);
+        if cast(ASSERT) Assert.isTrue(node.delimiter is NO_DELIM);
         return null;
     }
 
@@ -1403,7 +1403,7 @@
     public String toString() {
         int depth= computeDepth(fRoot);
         int WIDTH= 30;
-        int leaves= (int) Math.pow(2, depth - 1);
+        int leaves= cast(int) Math.pow(2, depth - 1);
         int width= WIDTH * leaves;
         String empty= "."; //$NON-NLS-1$
         
@@ -1423,7 +1423,7 @@
                 // pad before
                 buf.append(space, 0, spaces);
                 
-                Node node= (Node) it.next();
+                Node node= cast(Node) it.next();
                 String box;
                 // replace the node with its children
                 if (node is null) {
@@ -1463,7 +1463,7 @@
         if (root is null)
             return 0;
         
-        return (byte) (Math.max(computeDepth(root.left), computeDepth(root.right)) + 1);
+        return cast(byte) (Math.max(computeDepth(root.left), computeDepth(root.right)) + 1);
     }
     
     /**
@@ -1497,7 +1497,7 @@
         Assert.isTrue(node.left is null || node.left.parent is node);
         Assert.isTrue(node.right is null || node.right.parent is node);
         
-        return (byte) (Math.max(rightDepth, leftDepth) + 1);
+        return cast(byte) (Math.max(rightDepth, leftDepth) + 1);
     }
     
     /**
--- a/dwtx/jface/text/TypedPosition.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/TypedPosition.d	Sun Aug 24 01:46:20 2008 +0200
@@ -207,7 +207,7 @@
     public bool equals(Object o) {
         if (o instanceof TypedPosition) {
             if (super.equals(o)) {
-                TypedPosition p= (TypedPosition) o;
+                TypedPosition p= cast(TypedPosition) o;
                 return (fType is null && p.getType() is null) || fType.equals(p.getType());
             }
         }
--- a/dwtx/jface/text/TypedRegion.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/TypedRegion.d	Sun Aug 24 01:46:20 2008 +0200
@@ -190,7 +190,7 @@
      */
     public bool equals(Object o) {
         if (o instanceof TypedRegion) {
-            TypedRegion r= (TypedRegion) o;
+            TypedRegion r= cast(TypedRegion) o;
             return super.equals(r) && ((fType is null && r.getType() is null) || fType.equals(r.getType()));
         }
         return false;
--- a/dwtx/jface/text/WhitespaceCharacterPainter.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/WhitespaceCharacterPainter.d	Sun Aug 24 01:46:20 2008 +0200
@@ -447,7 +447,7 @@
      */
     private bool isFoldedLine(int widgetLine) {
         if (fTextViewer instanceof ITextViewerExtension5) {
-            ITextViewerExtension5 extension= (ITextViewerExtension5)fTextViewer;
+            ITextViewerExtension5 extension= cast(ITextViewerExtension5)fTextViewer;
             int modelLine= extension.widgetLine2ModelLine(widgetLine);
             int widgetLine2= extension.modelLine2WidgetLine(modelLine + 1);
             return widgetLine2 is -1;
@@ -490,7 +490,7 @@
      */
     private int getWidgetOffset(int documentOffset) {
         if (fTextViewer instanceof ITextViewerExtension5) {
-            ITextViewerExtension5 extension= (ITextViewerExtension5)fTextViewer;
+            ITextViewerExtension5 extension= cast(ITextViewerExtension5)fTextViewer;
             return extension.modelOffset2WidgetOffset(documentOffset);
         }
         IRegion visible= fTextViewer.getVisibleRegion();
@@ -509,7 +509,7 @@
      */
     private int getDocumentOffset(int widgetOffset) {
         if (fTextViewer instanceof ITextViewerExtension5) {
-            ITextViewerExtension5 extension= (ITextViewerExtension5)fTextViewer;
+            ITextViewerExtension5 extension= cast(ITextViewerExtension5)fTextViewer;
             return extension.widgetOffset2ModelOffset(widgetOffset);
         }
         IRegion visible= fTextViewer.getVisibleRegion();
--- a/dwtx/jface/text/contentassist/AdditionalInfoController.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/contentassist/AdditionalInfoController.d	Sun Aug 24 01:46:20 2008 +0200
@@ -148,7 +148,7 @@
                              */
                             return new Status(IStatus.WARNING, "dwtx.jface.text", IStatus.OK, "", x); //$NON-NLS-1$ //$NON-NLS-2$
                         }
-                        setInfo((ICompletionProposal) proposal, info);
+                        setInfo(cast(ICompletionProposal) proposal, info);
                         return new Status(IStatus.OK, "dwtx.jface.text", IStatus.OK, "", null); //$NON-NLS-1$ //$NON-NLS-2$
                     }
                 };
@@ -357,7 +357,7 @@
         
         ICompletionProposalExtension5 getCurrentProposalEx() {
             Assert.isTrue(fCurrentProposal instanceof ICompletionProposalExtension5);
-            return (ICompletionProposalExtension5) fCurrentProposal;
+            return cast(ICompletionProposalExtension5) fCurrentProposal;
         }
 
         synchronized void setInfo(ICompletionProposal proposal, Object info) {
@@ -487,7 +487,7 @@
         super.install(control.getShell());
 
         Assert.isTrue(control instanceof Table);
-        fProposalTable= (Table) control;
+        fProposalTable= cast(Table) control;
         fProposalTable.addSelectionListener(fSelectionListener);
         getInternalAccessor().getInformationControlReplacer().install(fProposalTable);
         
@@ -535,7 +535,7 @@
 
                 Object d= item.getData();
                 if (d instanceof ICompletionProposal) {
-                    ICompletionProposal p= (ICompletionProposal) d;
+                    ICompletionProposal p= cast(ICompletionProposal) d;
                     fTimer.reset(p);
                 }
             }
@@ -559,7 +559,7 @@
      */
     protected void computeInformation() {
         if (fProposal instanceof ICompletionProposalExtension3)
-            setCustomInformationControlCreator(((ICompletionProposalExtension3) fProposal).getInformationControlCreator());
+            setCustomInformationControlCreator((cast(ICompletionProposalExtension3) fProposal).getInformationControlCreator());
         else
             setCustomInformationControlCreator(null);
 
@@ -600,7 +600,7 @@
         // to the computed constraints. Need to remove them here, to make the outer bounds of the additional
         // info shell fit the bounds of the proposal shell:
         if (fInformationControl instanceof IInformationControlExtension3) {
-            Rectangle shellTrim= ((IInformationControlExtension3) fInformationControl).computeTrim();
+            Rectangle shellTrim= (cast(IInformationControlExtension3) fInformationControl).computeTrim();
             size.x -= shellTrim.width;
             size.y -= shellTrim.height;
         }
--- a/dwtx/jface/text/contentassist/CompletionProposalPopup.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/contentassist/CompletionProposalPopup.d	Sun Aug 24 01:46:20 2008 +0200
@@ -523,7 +523,7 @@
                         return;
                     
                     if (count is 1 && !autoActivated && canAutoInsert(fComputedProposals[0])) {
-                        insertProposal(fComputedProposals[0], (char) 0, 0, fInvocationOffset);
+                        insertProposal(fComputedProposals[0], cast(wchar) 0, 0, fInvocationOffset);
                         hide();
                     } else {
                         createProposalSelector();
@@ -606,7 +606,7 @@
         Control control= fContentAssistSubjectControlAdapter.getControl();
         fProposalShell= new Shell(control.getShell(), DWT.ON_TOP | DWT.RESIZE );
         fProposalShell.setFont(JFaceResources.getDefaultFont());
-        if (USE_VIRTUAL) {
+        if cast(USE_VIRTUAL) {
             fProposalTable= new Table(fProposalShell, DWT.H_SCROLL | DWT.V_SCROLL | DWT.VIRTUAL);
 
             Listener listener= new Listener() {
@@ -647,7 +647,7 @@
             int height= fProposalTable.getItemHeight() * 10;
             // use golden ratio as default aspect ratio
             final double aspectRatio= (1 + Math.sqrt(5)) / 2;
-            int width= (int) (height * aspectRatio);
+            int width= cast(int) (height * aspectRatio);
             Rectangle trim= fProposalTable.computeTrim(0, 0, width, height);
             data.heightHint= trim.height;
             data.widthHint= trim.width;
@@ -846,7 +846,7 @@
      * @since 3.1
      */
     private void handleSetData(Event event) {
-        TableItem item= (TableItem) event.item;
+        TableItem item= cast(TableItem) event.item;
         int index= fProposalTable.indexOf(item);
 
         if (0 <= index && index < fFilteredProposals.length) {
@@ -855,7 +855,7 @@
             String displayString;
             StyleRange[] styleRanges= null;
             if (fIsColoredLabelsSupportEnabled && current instanceof ICompletionProposalExtension6) {
-                StyledString styledString= ((ICompletionProposalExtension6)current).getStyledDisplayString();
+                StyledString styledString= (cast(ICompletionProposalExtension6)current).getStyledDisplayString();
                 displayString= styledString.getString();
                 styleRanges= styledString.getStyleRanges();
             } else
@@ -905,7 +905,7 @@
         ICompletionProposal p= getSelectedProposal();
         hide();
         if (p !is null)
-            insertProposal(p, (char) 0, stateMask, fContentAssistSubjectControlAdapter.getSelectedRange().x);
+            insertProposal(p, cast(wchar) 0, stateMask, fContentAssistSubjectControlAdapter.getSelectedRange().x);
     }
 
     /**
@@ -939,7 +939,7 @@
             IDocument document= fContentAssistSubjectControlAdapter.getDocument();
 
             if (fViewer instanceof ITextViewerExtension) {
-                ITextViewerExtension extension= (ITextViewerExtension) fViewer;
+                ITextViewerExtension extension= cast(ITextViewerExtension) fViewer;
                 target= extension.getRewriteTarget();
             }
 
@@ -947,16 +947,16 @@
                 target.beginCompoundChange();
 
             if (fViewer instanceof IEditingSupportRegistry) {
-                IEditingSupportRegistry registry= (IEditingSupportRegistry) fViewer;
+                IEditingSupportRegistry registry= cast(IEditingSupportRegistry) fViewer;
                 registry.register(helper);
             }
 
 
             if (p instanceof ICompletionProposalExtension2 && fViewer !is null) {
-                ICompletionProposalExtension2 e= (ICompletionProposalExtension2) p;
+                ICompletionProposalExtension2 e= cast(ICompletionProposalExtension2) p;
                 e.apply(fViewer, trigger, stateMask, offset);
             } else if (p instanceof ICompletionProposalExtension) {
-                ICompletionProposalExtension e= (ICompletionProposalExtension) p;
+                ICompletionProposalExtension e= cast(ICompletionProposalExtension) p;
                 e.apply(document, trigger, offset);
             } else {
                 p.apply(document);
@@ -973,7 +973,7 @@
 
                 int contextInformationOffset;
                 if (p instanceof ICompletionProposalExtension) {
-                    ICompletionProposalExtension e= (ICompletionProposalExtension) p;
+                    ICompletionProposalExtension e= cast(ICompletionProposalExtension) p;
                     contextInformationOffset= e.getContextInformationPosition();
                 } else {
                     if (selection is null)
@@ -991,7 +991,7 @@
                 target.endCompoundChange();
 
             if (fViewer instanceof IEditingSupportRegistry) {
-                IEditingSupportRegistry registry= (IEditingSupportRegistry) fViewer;
+                IEditingSupportRegistry registry= cast(IEditingSupportRegistry) fViewer;
                 registry.unregister(helper);
             }
             fInserting= false;
@@ -1037,7 +1037,7 @@
         unregister();
 
         if (fViewer instanceof IEditingSupportRegistry) {
-            IEditingSupportRegistry registry= (IEditingSupportRegistry) fViewer;
+            IEditingSupportRegistry registry= cast(IEditingSupportRegistry) fViewer;
             registry.unregister(fFocusHelper);
         }
 
@@ -1088,7 +1088,7 @@
 
         if (fLastProposal !is null) {
             if (fLastProposal instanceof ICompletionProposalExtension2 && fViewer !is null) {
-                ICompletionProposalExtension2 extension= (ICompletionProposalExtension2) fLastProposal;
+                ICompletionProposalExtension2 extension= cast(ICompletionProposalExtension2) fLastProposal;
                 extension.unselected(fViewer);
             }
             fLastProposal= null;
@@ -1124,7 +1124,7 @@
 
         if (Helper.okToUse(fProposalTable)) {
             if (oldProposal instanceof ICompletionProposalExtension2 && fViewer !is null)
-                ((ICompletionProposalExtension2) oldProposal).unselected(fViewer);
+                (cast(ICompletionProposalExtension2) oldProposal).unselected(fViewer);
             
             if (proposals is null || proposals.length is 0) {
                 fEmptyProposal.fOffset= fFilterOffset;
@@ -1134,7 +1134,7 @@
 
             fFilteredProposals= proposals;
             final int newLen= proposals.length;
-            if (USE_VIRTUAL) {
+            if cast(USE_VIRTUAL) {
                 fProposalTable.setItemCount(newLen);
                 fProposalTable.clearAll();
             } else {
@@ -1208,7 +1208,7 @@
                 };
             }
             if (fViewer instanceof IEditingSupportRegistry) {
-                IEditingSupportRegistry registry= (IEditingSupportRegistry) fViewer;
+                IEditingSupportRegistry registry= cast(IEditingSupportRegistry) fViewer;
                 registry.register(fFocusHelper);
             }
 
@@ -1343,7 +1343,7 @@
             default:
                 ICompletionProposal p= getSelectedProposal();
                 if (p instanceof ICompletionProposalExtension) {
-                    ICompletionProposalExtension t= (ICompletionProposalExtension) p;
+                    ICompletionProposalExtension t= cast(ICompletionProposalExtension) p;
                     char[] triggers= t.getTriggerCharacters();
                     if (contains(triggers, key)) {
                         e.doit= false;
@@ -1368,7 +1368,7 @@
 
         ICompletionProposal oldProposal= getSelectedProposal();
         if (oldProposal instanceof ICompletionProposalExtension2 && fViewer !is null)
-            ((ICompletionProposalExtension2) oldProposal).unselected(fViewer);
+            (cast(ICompletionProposalExtension2) oldProposal).unselected(fViewer);
 
         if (fFilteredProposals is null) {
             fireSelectionEvent(null, smartToggle);
@@ -1377,7 +1377,7 @@
         
         ICompletionProposal proposal= fFilteredProposals[index];
         if (proposal instanceof ICompletionProposalExtension2 && fViewer !is null)
-            ((ICompletionProposalExtension2) proposal).selected(fViewer, smartToggle);
+            (cast(ICompletionProposalExtension2) proposal).selected(fViewer, smartToggle);
         
         fireSelectionEvent(proposal, smartToggle);
 
@@ -1485,13 +1485,13 @@
 
             if (proposals[i] instanceof ICompletionProposalExtension2) {
 
-                ICompletionProposalExtension2 p= (ICompletionProposalExtension2) proposals[i];
+                ICompletionProposalExtension2 p= cast(ICompletionProposalExtension2) proposals[i];
                 if (p.validate(document, offset, event))
                     filtered.add(p);
 
             } else if (proposals[i] instanceof ICompletionProposalExtension) {
 
-                ICompletionProposalExtension p= (ICompletionProposalExtension) proposals[i];
+                ICompletionProposalExtension p= cast(ICompletionProposalExtension) proposals[i];
                 if (p.isValidFor(document, offset))
                     filtered.add(p);
 
@@ -1531,7 +1531,7 @@
     private bool canAutoInsert(ICompletionProposal proposal) {
         if (fContentAssistant.isAutoInserting()) {
             if (proposal instanceof ICompletionProposalExtension4) {
-                ICompletionProposalExtension4 ext= (ICompletionProposalExtension4) proposal;
+                ICompletionProposalExtension4 ext= cast(ICompletionProposalExtension4) proposal;
                 return ext.isAutoInsertable();
             }
             return true; // default behavior before ICompletionProposalExtension4 was introduced
@@ -1576,7 +1576,7 @@
                         return;
                     
                     if (count is 1 && canAutoInsert(fFilteredProposals[0])) {
-                        insertProposal(fFilteredProposals[0], (char) 0, 0, fInvocationOffset);
+                        insertProposal(fFilteredProposals[0], cast(wchar) 0, 0, fInvocationOffset);
                         hide();
                     } else {
                         ensureDocumentListenerInstalled();
@@ -1610,7 +1610,7 @@
         // 0: insert single proposals
         if (fFilteredProposals.length is 1) {
             if (canAutoInsert(fFilteredProposals[0])) {
-                insertProposal(fFilteredProposals[0], (char) 0, 0, fFilterOffset);
+                insertProposal(fFilteredProposals[0], cast(wchar) 0, 0, fFilterOffset);
                 hide();
                 return true;
             }
@@ -1640,8 +1640,8 @@
             if (!(proposal instanceof ICompletionProposalExtension3))
                 return false;
             
-            int start= ((ICompletionProposalExtension3)proposal).getPrefixCompletionStart(fContentAssistSubjectControlAdapter.getDocument(), fFilterOffset);
-            CharSequence insertion= ((ICompletionProposalExtension3)proposal).getPrefixCompletionText(fContentAssistSubjectControlAdapter.getDocument(), fFilterOffset);
+            int start= (cast(ICompletionProposalExtension3)proposal).getPrefixCompletionStart(fContentAssistSubjectControlAdapter.getDocument(), fFilterOffset);
+            CharSequence insertion= (cast(ICompletionProposalExtension3)proposal).getPrefixCompletionText(fContentAssistSubjectControlAdapter.getDocument(), fFilterOffset);
             if (insertion is null)
                 insertion= proposal.getDisplayString();
             try {
@@ -1685,17 +1685,17 @@
         // 2: replace single proposals
 
         if (rightCase.size() is 1) {
-            ICompletionProposal proposal= (ICompletionProposal) rightCase.get(0);
+            ICompletionProposal proposal= cast(ICompletionProposal) rightCase.get(0);
             if (canAutoInsert(proposal) && rightCasePostfix.length() > 0) {
-                insertProposal(proposal, (char) 0, 0, fInvocationOffset);
+                insertProposal(proposal, cast(wchar) 0, 0, fInvocationOffset);
                 hide();
                 return true;
             }
             return false;
         } else if (isWrongCaseMatch && wrongCase.size() is 1) {
-            ICompletionProposal proposal= (ICompletionProposal) wrongCase.get(0);
+            ICompletionProposal proposal= cast(ICompletionProposal) wrongCase.get(0);
             if (canAutoInsert(proposal)) {
-                insertProposal(proposal, (char) 0, 0, fInvocationOffset);
+                insertProposal(proposal, cast(wchar) 0, 0, fInvocationOffset);
                 hide();
             return true;
             }
--- a/dwtx/jface/text/contentassist/ContentAssistSubjectControlAdapter.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/contentassist/ContentAssistSubjectControlAdapter.d	Sun Aug 24 01:46:20 2008 +0200
@@ -207,7 +207,7 @@
         if (fContentAssistSubjectControl !is null) {
             return fContentAssistSubjectControl.prependVerifyKeyListener(verifyKeyListener);
         } else if (fViewer instanceof ITextViewerExtension) {
-            ITextViewerExtension e= (ITextViewerExtension) fViewer;
+            ITextViewerExtension e= cast(ITextViewerExtension) fViewer;
             e.prependVerifyKeyListener(verifyKeyListener);
             return true;
         } else {
@@ -228,7 +228,7 @@
         if (fContentAssistSubjectControl !is null)
             return fContentAssistSubjectControl.appendVerifyKeyListener(verifyKeyListener);
         else if (fViewer instanceof ITextViewerExtension) {
-            ITextViewerExtension extension= (ITextViewerExtension)fViewer;
+            ITextViewerExtension extension= cast(ITextViewerExtension)fViewer;
             extension.appendVerifyKeyListener(verifyKeyListener);
             return true;
         } else {
@@ -248,7 +248,7 @@
         if (fContentAssistSubjectControl !is null) {
             fContentAssistSubjectControl.removeVerifyKeyListener(verifyKeyListener);
         } else if (fViewer instanceof ITextViewerExtension) {
-            ITextViewerExtension extension= (ITextViewerExtension) fViewer;
+            ITextViewerExtension extension= cast(ITextViewerExtension) fViewer;
             extension.removeVerifyKeyListener(verifyKeyListener);
         } else {
             StyledText textWidget= fViewer.getTextWidget();
@@ -394,7 +394,7 @@
     public void installValidator(ContextFrame frame) {
         if (fContentAssistSubjectControl !is null) {
             if (frame.fValidator instanceof ISubjectControlContextInformationValidator)
-                ((ISubjectControlContextInformationValidator)frame.fValidator).install(frame.fInformation, fContentAssistSubjectControl, frame.fOffset);
+                (cast(ISubjectControlContextInformationValidator)frame.fValidator).install(frame.fInformation, fContentAssistSubjectControl, frame.fOffset);
         } else
             frame.fValidator.install(frame.fInformation, fViewer, frame.fOffset);
     }
@@ -407,7 +407,7 @@
     public void installContextInformationPresenter(ContextFrame frame) {
         if (fContentAssistSubjectControl !is null) {
             if (frame.fPresenter instanceof ISubjectControlContextInformationPresenter)
-                ((ISubjectControlContextInformationPresenter)frame.fValidator).install(frame.fInformation, fContentAssistSubjectControl, frame.fBeginOffset);
+                (cast(ISubjectControlContextInformationPresenter)frame.fValidator).install(frame.fInformation, fContentAssistSubjectControl, frame.fBeginOffset);
         } else
             frame.fPresenter.install(frame.fInformation, fViewer, frame.fBeginOffset);
     }
--- a/dwtx/jface/text/contentassist/ContentAssistant.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/contentassist/ContentAssistant.d	Sun Aug 24 01:46:20 2008 +0200
@@ -476,7 +476,7 @@
                     if (fContextType is LAYOUT_CONTEXT_SELECTOR &&
                             Helper.okToUse(fShells[LAYOUT_CONTEXT_SELECTOR])) {
                         // Restore event notification to the tip popup.
-                        addContentAssistListener((IContentAssistListener) fPopups[LAYOUT_CONTEXT_SELECTOR], CONTEXT_SELECTOR);
+                        addContentAssistListener(cast(IContentAssistListener) fPopups[LAYOUT_CONTEXT_SELECTOR], CONTEXT_SELECTOR);
                     }
                     break;
 
@@ -485,7 +485,7 @@
                         if (fProposalPopupOrientation is PROPOSAL_STACKED)
                             layout(LAYOUT_PROPOSAL_SELECTOR, getSelectionOffset());
                         // Restore event notification to the proposal popup.
-                        addContentAssistListener((IContentAssistListener) fPopups[LAYOUT_PROPOSAL_SELECTOR], PROPOSAL_SELECTOR);
+                        addContentAssistListener(cast(IContentAssistListener) fPopups[LAYOUT_PROPOSAL_SELECTOR], PROPOSAL_SELECTOR);
                     }
                     fContextType= LAYOUT_CONTEXT_INFO_POPUP;
                     break;
@@ -541,10 +541,10 @@
                 // There are no other presentations to be concerned with,
                 // so place the proposal selector beneath the cursor line.
                 Shell shell= fShells[LAYOUT_PROPOSAL_SELECTOR];
-                CompletionProposalPopup popup= (CompletionProposalPopup) fPopups[LAYOUT_PROPOSAL_SELECTOR];
+                CompletionProposalPopup popup= cast(CompletionProposalPopup) fPopups[LAYOUT_PROPOSAL_SELECTOR];
                 shell.setBounds(computeBoundsBelowAbove(shell, shell.getSize(), offset, popup));
             } else {
-                CompletionProposalPopup popup= ((CompletionProposalPopup) fPopups[LAYOUT_PROPOSAL_SELECTOR]);
+                CompletionProposalPopup popup= (cast(CompletionProposalPopup) fPopups[LAYOUT_PROPOSAL_SELECTOR]);
                 switch (fProposalPopupOrientation) {
                     case PROPOSAL_REMOVE: {
                         // Remove the tip selector and place the
@@ -771,12 +771,12 @@
                     if (fContextType is LAYOUT_CONTEXT_SELECTOR &&
                             Helper.okToUse(fShells[LAYOUT_CONTEXT_SELECTOR]))
                         // Disable event notification to the tip selector.
-                        removeContentAssistListener((IContentAssistListener) fPopups[LAYOUT_CONTEXT_SELECTOR], CONTEXT_SELECTOR);
+                        removeContentAssistListener(cast(IContentAssistListener) fPopups[LAYOUT_CONTEXT_SELECTOR], CONTEXT_SELECTOR);
                     break;
                 case LAYOUT_CONTEXT_SELECTOR:
                     if (Helper.okToUse(fShells[LAYOUT_PROPOSAL_SELECTOR]))
                         // Disable event notification to the proposal selector.
-                        removeContentAssistListener((IContentAssistListener) fPopups[LAYOUT_PROPOSAL_SELECTOR], PROPOSAL_SELECTOR);
+                        removeContentAssistListener(cast(IContentAssistListener) fPopups[LAYOUT_PROPOSAL_SELECTOR], PROPOSAL_SELECTOR);
                     break;
                 case LAYOUT_CONTEXT_INFO_POPUP:
                     break;
@@ -1080,7 +1080,7 @@
         if (fProcessors is null)
             return null;
 
-        return (IContentAssistProcessor) fProcessors.get(contentType);
+        return cast(IContentAssistProcessor) fProcessors.get(contentType);
     }
 
     /**
@@ -1096,8 +1096,8 @@
         StringBuffer buf= new StringBuffer(5);
         Iterator iter= fProcessors.entrySet().iterator();
         while (iter.hasNext()) {
-            Entry entry= (Entry) iter.next();
-            IContentAssistProcessor processor= (IContentAssistProcessor) entry.getValue();
+            Entry entry= cast(Entry) iter.next();
+            IContentAssistProcessor processor= cast(IContentAssistProcessor) entry.getValue();
             char[] triggers= processor.getCompletionProposalAutoActivationCharacters();
             if (triggers !is null)
                 buf.append(triggers);
@@ -1536,16 +1536,16 @@
             case CONTEXT_SELECTOR:
             case PROPOSAL_SELECTOR:
                 if (fContentAssistSubjectControl instanceof IWidgetTokenOwnerExtension) {
-                    IWidgetTokenOwnerExtension extension= (IWidgetTokenOwnerExtension) fContentAssistSubjectControl;
+                    IWidgetTokenOwnerExtension extension= cast(IWidgetTokenOwnerExtension) fContentAssistSubjectControl;
                     return extension.requestWidgetToken(this, WIDGET_PRIORITY);
                 } else if (fContentAssistSubjectControl instanceof IWidgetTokenOwner) {
-                    IWidgetTokenOwner owner= (IWidgetTokenOwner) fContentAssistSubjectControl;
+                    IWidgetTokenOwner owner= cast(IWidgetTokenOwner) fContentAssistSubjectControl;
                     return owner.requestWidgetToken(this);
                 } else if (fViewer instanceof IWidgetTokenOwnerExtension) {
-                    IWidgetTokenOwnerExtension extension= (IWidgetTokenOwnerExtension) fViewer;
+                    IWidgetTokenOwnerExtension extension= cast(IWidgetTokenOwnerExtension) fViewer;
                     return extension.requestWidgetToken(this, WIDGET_PRIORITY);
                 } else if (fViewer instanceof IWidgetTokenOwner) {
-                    IWidgetTokenOwner owner= (IWidgetTokenOwner) fViewer;
+                    IWidgetTokenOwner owner= cast(IWidgetTokenOwner) fViewer;
                     return owner.requestWidgetToken(this);
                 }
         }
@@ -1626,9 +1626,9 @@
         if (fListeners[CONTEXT_SELECTOR] is null && fListeners[PROPOSAL_SELECTOR] is null) {
             IWidgetTokenOwner owner= null;
             if (fContentAssistSubjectControl instanceof IWidgetTokenOwner)
-                owner= (IWidgetTokenOwner) fContentAssistSubjectControl;
+                owner= cast(IWidgetTokenOwner) fContentAssistSubjectControl;
             else if (fViewer instanceof IWidgetTokenOwner)
-                owner= (IWidgetTokenOwner) fViewer;
+                owner= cast(IWidgetTokenOwner) fViewer;
             if (owner !is null)
                 owner.releaseWidgetToken(this);
         }
@@ -1843,7 +1843,7 @@
 
         IContentAssistProcessor p= getProcessor(contentAssistSubjectControl, offset);
         if (p instanceof ISubjectControlContentAssistProcessor) {
-            result= ((ISubjectControlContentAssistProcessor) p).computeCompletionProposals(contentAssistSubjectControl, offset);
+            result= (cast(ISubjectControlContentAssistProcessor) p).computeCompletionProposals(contentAssistSubjectControl, offset);
             fLastErrorMessage= p.getErrorMessage();
         }
 
@@ -1915,7 +1915,7 @@
 
         IContentAssistProcessor p= getProcessor(contentAssistSubjectControl, offset);
         if (p instanceof ISubjectControlContentAssistProcessor) {
-            result= ((ISubjectControlContentAssistProcessor) p).computeContextInformation(contentAssistSubjectControl, offset);
+            result= (cast(ISubjectControlContentAssistProcessor) p).computeContextInformation(contentAssistSubjectControl, offset);
             fLastErrorMessage= p.getErrorMessage();
         }
 
@@ -1966,7 +1966,7 @@
     IContextInformationPresenter getContextInformationPresenter(ITextViewer viewer, int offset) {
         IContextInformationValidator validator= getContextInformationValidator(viewer, offset);
         if (validator instanceof IContextInformationPresenter)
-            return (IContextInformationPresenter) validator;
+            return cast(IContextInformationPresenter) validator;
         return null;
     }
 
@@ -1982,7 +1982,7 @@
     IContextInformationPresenter getContextInformationPresenter(IContentAssistSubjectControl contentAssistSubjectControl, int offset) {
         IContextInformationValidator validator= getContextInformationValidator(contentAssistSubjectControl, offset);
         if (validator instanceof IContextInformationPresenter)
-            return (IContextInformationPresenter) validator;
+            return cast(IContextInformationPresenter) validator;
         return null;
     }
 
@@ -2247,7 +2247,7 @@
             ContentAssistEvent event= new ContentAssistEvent(this, processor, isAutoActivated);
             Object[] listeners= fCompletionListeners.getListeners();
             for (int i= 0; i < listeners.length; i++) {
-                ICompletionListener listener= (ICompletionListener)listeners[i];
+                ICompletionListener listener= cast(ICompletionListener)listeners[i];
                 listener.assistSessionStarted(event);
             }
         }
@@ -2264,9 +2264,9 @@
             ContentAssistEvent event= new ContentAssistEvent(this, processor);
             Object[] listeners= fCompletionListeners.getListeners();
             for (int i= 0; i < listeners.length; i++) {
-                ICompletionListener listener= (ICompletionListener)listeners[i];
+                ICompletionListener listener= cast(ICompletionListener)listeners[i];
                 if (listener instanceof ICompletionListenerExtension)
-                    ((ICompletionListenerExtension)listener).assistSessionRestarted(event);
+                    (cast(ICompletionListenerExtension)listener).assistSessionRestarted(event);
             }
         }
     }
@@ -2282,7 +2282,7 @@
             ContentAssistEvent event= new ContentAssistEvent(this, processor);
             Object[] listeners= fCompletionListeners.getListeners();
             for (int i= 0; i < listeners.length; i++) {
-                ICompletionListener listener= (ICompletionListener)listeners[i];
+                ICompletionListener listener= cast(ICompletionListener)listeners[i];
                 listener.assistSessionEnded(event);
             }
         }
@@ -2391,7 +2391,7 @@
     void fireSelectionEvent(ICompletionProposal proposal, bool smartToggle) {
         Object[] listeners= fCompletionListeners.getListeners();
         for (int i= 0; i < listeners.length; i++) {
-            ICompletionListener listener= (ICompletionListener)listeners[i];
+            ICompletionListener listener= cast(ICompletionListener)listeners[i];
             listener.selectionChanged(proposal, smartToggle);
         }
     }
@@ -2443,7 +2443,7 @@
         if (fHandlers is null)
             throw new IllegalStateException();
 
-        IHandler handler= (IHandler)fHandlers.get(commandId);
+        IHandler handler= cast(IHandler)fHandlers.get(commandId);
         if (handler !is null)
             return handler;
         
--- a/dwtx/jface/text/contentassist/ContextInformation.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/contentassist/ContextInformation.d	Sun Aug 24 01:46:20 2008 +0200
@@ -98,7 +98,7 @@
      */
     public bool equals(Object object) {
         if (object instanceof IContextInformation) {
-            IContextInformation contextInformation= (IContextInformation) object;
+            IContextInformation contextInformation= cast(IContextInformation) object;
             bool equals= fInformationDisplayString.equalsIgnoreCase(contextInformation.getInformationDisplayString());
             if (fContextDisplayString !is null)
                 equals= equals && fContextDisplayString.equalsIgnoreCase(contextInformation.getContextDisplayString());
--- a/dwtx/jface/text/contentassist/ContextInformationPopup.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/contentassist/ContextInformationPopup.d	Sun Aug 24 01:46:20 2008 +0200
@@ -123,7 +123,7 @@
          */
         public bool equals(Object obj) {
             if (obj instanceof ContextFrame) {
-                ContextFrame frame= (ContextFrame) obj;
+                ContextFrame frame= cast(ContextFrame) obj;
                 return fInformation.equals(frame.fInformation) && fBeginOffset is frame.fBeginOffset;
             }
             return super.equals(obj);
@@ -252,7 +252,7 @@
 
                         // also check all other contexts
                         for (Iterator it= fContextFrameStack.iterator(); it.hasNext(); ) {
-                            ContextFrame stackFrame= (ContextFrame) it.next();
+                            ContextFrame stackFrame= cast(ContextFrame) it.next();
                             if (stackFrame.equals(frame)) {
                                 validateContextInformation();
                                 return;
@@ -329,7 +329,7 @@
         IContextInformationValidator validator= fContentAssistSubjectControlAdapter.getContextInformationValidator(fContentAssistant, offset);
 
         if (validator !is null) {
-            int beginOffset= (information instanceof IContextInformationExtension) ? ((IContextInformationExtension) information).getContextInformationPosition() : offset;
+            int beginOffset= (information instanceof IContextInformationExtension) ? (cast(IContextInformationExtension) information).getContextInformationPosition() : offset;
             if (beginOffset is -1) beginOffset= offset;
             int visibleOffset= fContentAssistSubjectControlAdapter.getWidgetSelectionRange().x - (offset - beginOffset);
             IContextInformationPresenter presenter = fContentAssistSubjectControlAdapter.getContextInformationPresenter(fContentAssistant, offset);
@@ -353,7 +353,7 @@
         if (fContextFrameStack.isEmpty())
             return false;
         // stack not empty
-        ContextFrame top= (ContextFrame) fContextFrameStack.peek();
+        ContextFrame top= cast(ContextFrame) fContextFrameStack.peek();
         return frame.equals(top);
     }
 
@@ -494,12 +494,12 @@
 
             int size= fContextFrameStack.size();
             if (size > 0) {
-                fLastContext= (ContextFrame) fContextFrameStack.pop();
+                fLastContext= cast(ContextFrame) fContextFrameStack.pop();
                 -- size;
             }
 
             if (size > 0) {
-                ContextFrame current= (ContextFrame) fContextFrameStack.peek();
+                ContextFrame current= cast(ContextFrame) fContextFrameStack.peek();
                 internalShowContextFrame(current, false);
             } else {
 
@@ -853,7 +853,7 @@
 
         fContextInfoPopup.getDisplay().asyncExec(new Runnable() {
 
-            private ContextFrame fFrame= (ContextFrame) fContextFrameStack.peek();
+            private ContextFrame fFrame= cast(ContextFrame) fContextFrameStack.peek();
 
             public void run() {
                 // only do this if no other frames have been added in between
@@ -862,7 +862,7 @@
 
                     // iterate all contexts on the stack
                     while (Helper.okToUse(fContextInfoPopup) && !fContextFrameStack.isEmpty()) {
-                        ContextFrame top= (ContextFrame) fContextFrameStack.peek();
+                        ContextFrame top= cast(ContextFrame) fContextFrameStack.peek();
                         if (top.fValidator is null || !top.fValidator.isContextInformationValid(offset)) {
                             hideContextInfoPopup(); // loop variant: reduces the number of contexts on the stack
                         } else if (top.fPresenter !is null && top.fPresenter.updatePresentation(offset, fTextPresentation)) {
--- a/dwtx/jface/text/contentassist/PopupCloser.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/contentassist/PopupCloser.d	Sun Aug 24 01:46:20 2008 +0200
@@ -239,8 +239,8 @@
                     IInformationControl infoControl= fAdditionalInfoController.getCurrentInformationControl2();
                     // During isReplaceInProgress(), events can come from the replacing information control
                     if (event.widget instanceof Control && infoControl instanceof IInformationControlExtension5) {
-                        Control control= (Control) event.widget;
-                        IInformationControlExtension5 iControl5= (IInformationControlExtension5) infoControl;
+                        Control control= cast(Control) event.widget;
+                        IInformationControlExtension5 iControl5= cast(IInformationControlExtension5) infoControl;
                         if (!(iControl5.containsControl(control)))
                             fAdditionalInfoController.hideInformationControl();
                         else if (event.type is DWT.MouseWheel)
@@ -255,13 +255,13 @@
                 if (fAdditionalInfoController is null || fAdditionalInfoController.getInternalAccessor().isReplaceInProgress())
                     break;
                 if (event.widget instanceof Control) {
-                    Control control= (Control) event.widget;
+                    Control control= cast(Control) event.widget;
                     IInformationControl infoControl= fAdditionalInfoController.getCurrentInformationControl2();
                     if (infoControl instanceof IInformationControlExtension5) {
-                        final IInformationControlExtension5 iControl5= (IInformationControlExtension5) infoControl;
+                        final IInformationControlExtension5 iControl5= cast(IInformationControlExtension5) infoControl;
                         if (iControl5.containsControl(control)) {
                             if (infoControl instanceof IDelayedInputChangeProvider) {
-                                final IDelayedInputChangeProvider delayedICP= (IDelayedInputChangeProvider) infoControl;
+                                final IDelayedInputChangeProvider delayedICP= cast(IDelayedInputChangeProvider) infoControl;
                                 final IInputChangedListener inputChangeListener= new DelayedInputChangeListener(delayedICP, fAdditionalInfoController.getInternalAccessor().getInformationControlReplacer());
                                 delayedICP.setDelayedInputChangeListener(inputChangeListener);
                                 // cancel automatic input updating after a small timeout:
@@ -290,8 +290,8 @@
                 if (replacer !is null && fContentAssistant !is null) {
                     IInformationControl iControl= replacer.getCurrentInformationControl2();
                     if (event.widget instanceof Control && iControl instanceof IInformationControlExtension5) {
-                        Control control= (Control) event.widget;
-                        IInformationControlExtension5 iControl5= (IInformationControlExtension5) iControl;
+                        Control control= cast(Control) event.widget;
+                        IInformationControlExtension5 iControl5= cast(IInformationControlExtension5) iControl;
                         if (iControl5.containsControl(control)) {
                             control.getDisplay().asyncExec(new Runnable() {
                                 public void run() {
--- a/dwtx/jface/text/formatter/ContentFormatter.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/formatter/ContentFormatter.d	Sun Aug 24 01:46:20 2008 +0200
@@ -186,7 +186,7 @@
         public int compareTo(Object obj) {
 
             if (obj instanceof PositionReference) {
-                PositionReference r= (PositionReference) obj;
+                PositionReference r= cast(PositionReference) obj;
                 return getCharacterPosition() - r.getCharacterPosition();
             }
 
@@ -378,7 +378,7 @@
         if (fStrategies is null)
             return null;
 
-        return (IFormattingStrategy) fStrategies.get(contentType);
+        return cast(IFormattingStrategy) fStrategies.get(contentType);
     }
 
     /*
@@ -690,7 +690,7 @@
 
         int[] positions= new int[fOverlappingPositionReferences.size()];
         for (int i= 0; i < positions.length; i++) {
-            PositionReference r= (PositionReference) fOverlappingPositionReferences.get(i);
+            PositionReference r= cast(PositionReference) fOverlappingPositionReferences.get(i);
             positions[i]= r.getCharacterPosition() - offset;
         }
 
@@ -706,7 +706,7 @@
     private void removeAffectedPositions(IDocument document) {
         int size= fOverlappingPositionReferences.size();
         for (int i= 0; i < size; i++) {
-            PositionReference r= (PositionReference) fOverlappingPositionReferences.get(i);
+            PositionReference r= cast(PositionReference) fOverlappingPositionReferences.get(i);
             try {
                 document.removePosition(r.getCategory(), r.getPosition());
             } catch (BadPositionCategoryException x) {
@@ -733,7 +733,7 @@
 
         for (int i= 0; i < positions.length; i++) {
 
-            PositionReference r= (PositionReference) fOverlappingPositionReferences.get(i);
+            PositionReference r= cast(PositionReference) fOverlappingPositionReferences.get(i);
 
             if (r.refersToOffset())
                 r.setOffset(offset + positions[i]);
--- a/dwtx/jface/text/formatter/ContextBasedFormattingStrategy.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/formatter/ContextBasedFormattingStrategy.d	Sun Aug 24 01:46:20 2008 +0200
@@ -49,7 +49,7 @@
      * @see dwtx.jface.text.formatter.IFormattingStrategyExtension#format()
      */
     public void format() {
-        fCurrentPreferences= (Map)fPreferences.removeFirst();
+        fCurrentPreferences= cast(Map)fPreferences.removeFirst();
     }
 
     /*
--- a/dwtx/jface/text/formatter/FormattingContext.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/formatter/FormattingContext.d	Sun Aug 24 01:46:20 2008 +0200
@@ -118,7 +118,7 @@
         for (int index= 0; index < preferences.length; index++) {
 
             preference= preferences[index];
-            result= (String)map.get(preference);
+            result= cast(String)map.get(preference);
 
             if (result !is null) {
 
--- a/dwtx/jface/text/formatter/MultiPassContentFormatter.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/formatter/MultiPassContentFormatter.d	Sun Aug 24 01:46:20 2008 +0200
@@ -140,10 +140,10 @@
 
         context.setProperty(FormattingContextProperties.CONTEXT_MEDIUM, medium);
 
-        final Boolean document= (Boolean)context.getProperty(FormattingContextProperties.CONTEXT_DOCUMENT);
+        final Boolean document= cast(Boolean)context.getProperty(FormattingContextProperties.CONTEXT_DOCUMENT);
         if (document is null || !document.booleanValue()) {
 
-            final IRegion region= (IRegion)context.getProperty(FormattingContextProperties.CONTEXT_REGION);
+            final IRegion region= cast(IRegion)context.getProperty(FormattingContextProperties.CONTEXT_REGION);
             if (region !is null) {
                 try {
                     formatMaster(context, medium, region.getOffset(), region.getLength());
@@ -226,7 +226,7 @@
      */
     protected void formatSlave(final IFormattingContext context, final IDocument document, final int offset, final int length, final String type) {
 
-        final IFormattingStrategyExtension strategy= (IFormattingStrategyExtension)fSlaves.get(type);
+        final IFormattingStrategyExtension strategy= cast(IFormattingStrategyExtension)fSlaves.get(type);
         if (strategy !is null) {
 
             context.setProperty(FormattingContextProperties.CONTEXT_PARTITION, new TypedPosition(offset, length, type));
@@ -309,7 +309,7 @@
      */
     public final void setMasterStrategy(final IFormattingStrategy strategy) {
         Assert.isTrue(strategy instanceof IFormattingStrategyExtension);
-        fMaster= (IFormattingStrategyExtension) strategy;
+        fMaster= cast(IFormattingStrategyExtension) strategy;
     }
 
     /**
--- a/dwtx/jface/text/hyperlink/DefaultHyperlinkPresenter.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/hyperlink/DefaultHyperlinkPresenter.d	Sun Aug 24 01:46:20 2008 +0200
@@ -175,7 +175,7 @@
         fTextViewer= textViewer;
         fTextViewer.addTextInputListener(this);
         if (fTextViewer instanceof ITextViewerExtension4)
-            ((ITextViewerExtension4)fTextViewer).addTextPresentationListener(this);
+            (cast(ITextViewerExtension4)fTextViewer).addTextPresentationListener(this);
 
         StyledText text= fTextViewer.getTextWidget();
         if (text !is null && !text.isDisposed()) {
@@ -210,7 +210,7 @@
         }
 
         if (fTextViewer instanceof ITextViewerExtension4)
-            ((ITextViewerExtension4)fTextViewer).removeTextPresentationListener(this);
+            (cast(ITextViewerExtension4)fTextViewer).removeTextPresentationListener(this);
         fTextViewer= null;
 
         if (fPreferenceStore !is null)
@@ -250,7 +250,7 @@
         // Invalidate region is> apply text presentation
         fActiveRegion= region;
         if (fTextViewer instanceof ITextViewerExtension2)
-            ((ITextViewerExtension2)fTextViewer).invalidateTextPresentation(region.getOffset(), region.getLength());
+            (cast(ITextViewerExtension2)fTextViewer).invalidateTextPresentation(region.getOffset(), region.getLength());
         else
             fTextViewer.invalidateTextPresentation();
     }
@@ -289,7 +289,7 @@
 
         // Invalidate is> remove applied text presentation
         if (fTextViewer instanceof ITextViewerExtension2)
-            ((ITextViewerExtension2) fTextViewer).invalidateTextPresentation(offset, length);
+            (cast(ITextViewerExtension2) fTextViewer).invalidateTextPresentation(offset, length);
         else
             fTextViewer.invalidateTextPresentation();
 
--- a/dwtx/jface/text/hyperlink/HyperlinkManager.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/hyperlink/HyperlinkManager.d	Sun Aug 24 01:46:20 2008 +0200
@@ -270,7 +270,7 @@
                     continue;
                 
                 if (detector instanceof IHyperlinkDetectorExtension2) {
-                    int stateMask= ((IHyperlinkDetectorExtension2)detector).getStateMask();
+                    int stateMask= (cast(IHyperlinkDetectorExtension2)detector).getStateMask();
                     if (stateMask !is -1 && stateMask !is fActiveHyperlinkStateMask)
                         continue;
                     else if (stateMask is -1 && fActiveHyperlinkStateMask !is fHyperlinkStateMask)
@@ -300,14 +300,14 @@
             int maxLength= computeLongestHyperlinkLength(allHyperlinks);
             Iterator iter= new ArrayList(allHyperlinks).iterator();
             while (iter.hasNext()) {
-                IHyperlink hyperlink= (IHyperlink)iter.next();
+                IHyperlink hyperlink= cast(IHyperlink)iter.next();
                 if (hyperlink.getHyperlinkRegion().getLength() < maxLength)
                     allHyperlinks.remove(hyperlink);
             }
         }
 
         if (fDetectionStrategy is LONGEST_REGION_FIRST)
-            return new IHyperlink[] {(IHyperlink)allHyperlinks.get(0)};
+            return new IHyperlink[] {cast(IHyperlink)allHyperlinks.get(0)};
 
         return (IHyperlink[])allHyperlinks.toArray(new IHyperlink[allHyperlinks.size()]);
 
@@ -325,7 +325,7 @@
         Iterator iter= hyperlinks.iterator();
         int length= Integer.MIN_VALUE;
         while (iter.hasNext()) {
-            IRegion region= ((IHyperlink)iter.next()).getHyperlinkRegion();
+            IRegion region= (cast(IHyperlink)iter.next()).getHyperlinkRegion();
             if (region.getLength() < length)
                 continue;
             length= region.getLength();
@@ -355,7 +355,7 @@
                 widgetOffset--;
             
             if (fTextViewer instanceof ITextViewerExtension5) {
-                ITextViewerExtension5 extension= (ITextViewerExtension5)fTextViewer;
+                ITextViewerExtension5 extension= cast(ITextViewerExtension5)fTextViewer;
                 return extension.widgetOffset2ModelOffset(widgetOffset);
             }
 
@@ -454,7 +454,7 @@
      */
     public void mouseMove(MouseEvent event) {
         if (fHyperlinkPresenter instanceof IHyperlinkPresenterExtension) {
-            if (!((IHyperlinkPresenterExtension)fHyperlinkPresenter).canHideHyperlinks())
+            if (!(cast(IHyperlinkPresenterExtension)fHyperlinkPresenter).canHideHyperlinks())
                 return;
         }
         
@@ -503,7 +503,7 @@
         synchronized (fHyperlinkDetectors) {
             for (int i= 0; i < fHyperlinkDetectors.length; i++) {
                 if (fHyperlinkDetectors[i] instanceof IHyperlinkDetectorExtension2) {
-                    if (stateMask is ((IHyperlinkDetectorExtension2)fHyperlinkDetectors[i]).getStateMask())
+                    if (stateMask is (cast(IHyperlinkDetectorExtension2)fHyperlinkDetectors[i]).getStateMask())
                         return true;
                 }
             }
@@ -548,7 +548,7 @@
      */
     public void mouseExit(MouseEvent e) {
         if (fHyperlinkPresenter instanceof IHyperlinkPresenterExtension) {
-            if (!((IHyperlinkPresenterExtension)fHyperlinkPresenter).canHideHyperlinks())
+            if (!(cast(IHyperlinkPresenterExtension)fHyperlinkPresenter).canHideHyperlinks())
                 return;
         }
         deactivate();
--- a/dwtx/jface/text/hyperlink/MultipleHyperlinkPresenter.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/hyperlink/MultipleHyperlinkPresenter.d	Sun Aug 24 01:46:20 2008 +0200
@@ -116,7 +116,7 @@
              * @see dwtx.jface.viewers.ColumnLabelProvider#getText(java.lang.Object)
              */
             public String getText(Object element) {
-                IHyperlink link= (IHyperlink)element;
+                IHyperlink link= cast(IHyperlink)element;
                 String text= link.getHyperlinkText();
                 if (text !is null)
                     return text;
@@ -254,9 +254,9 @@
                     if (fTable.equals(e.getSource())) {
                         Object o= fTable.getItem(new Point(e.x, e.y));
                         if (o instanceof TableItem) {
-                            TableItem item= (TableItem) o;
+                            TableItem item= cast(TableItem) o;
                             if (!o.equals(fLastItem)) {
-                                fLastItem= (TableItem) o;
+                                fLastItem= cast(TableItem) o;
                                 fTable.setSelection(new TableItem[] { fLastItem });
                             } else if (e.y < fTable.getItemHeight() / 4) {
                                 // Scroll up
@@ -321,7 +321,7 @@
          */
         private void openSelectedLink() {
             TableItem selection= fTable.getSelection()[0];
-            IHyperlink link= (IHyperlink)selection.getData();
+            IHyperlink link= cast(IHyperlink)selection.getData();
             fManager.hideInformationControl();
             link.open();
         }
@@ -442,7 +442,7 @@
                 if (fControl.isFocusControl())
                     return;
                 
-                Control eventControl= (Control) event.widget;
+                Control eventControl= cast(Control) event.widget;
                 
                 //transform coordinates to subject control:
                 Point mouseLoc= event.display.map(eventControl, fSubjectControl, event.x, event.y);
@@ -450,7 +450,7 @@
                 if (fSubjectArea.contains(mouseLoc))
                     return;
                 
-                if (inKeepUpZone(mouseLoc.x, mouseLoc.y, ((IInformationControlExtension3) fControl).getBounds()))
+                if (inKeepUpZone(mouseLoc.x, mouseLoc.y, (cast(IInformationControlExtension3) fControl).getBounds()))
                     return;
                 
                 hideInformationControl();
@@ -576,10 +576,10 @@
          */
         protected void showInformationControl(Rectangle subjectArea) {
             if (fTextViewer instanceof IWidgetTokenOwnerExtension) {
-                if (((IWidgetTokenOwnerExtension) fTextViewer).requestWidgetToken(this, WIDGET_TOKEN_PRIORITY))
+                if ((cast(IWidgetTokenOwnerExtension) fTextViewer).requestWidgetToken(this, WIDGET_TOKEN_PRIORITY))
                     super.showInformationControl(subjectArea);
             } else if (fTextViewer instanceof IWidgetTokenOwner) {
-                if (((IWidgetTokenOwner) fTextViewer).requestWidgetToken(this))
+                if ((cast(IWidgetTokenOwner) fTextViewer).requestWidgetToken(this))
                     super.showInformationControl(subjectArea);
             } else {
                 super.showInformationControl(subjectArea);
@@ -595,7 +595,7 @@
             super.hideInformationControl();
             
             if (fTextViewer instanceof IWidgetTokenOwner) {
-                ((IWidgetTokenOwner) fTextViewer).releaseWidgetToken(this);
+                (cast(IWidgetTokenOwner) fTextViewer).releaseWidgetToken(this);
             }
             
             fIsControlVisible= false;
@@ -609,7 +609,7 @@
             super.disposeInformationControl();
             
             if (fTextViewer instanceof IWidgetTokenOwner) {
-                ((IWidgetTokenOwner) fTextViewer).releaseWidgetToken(this);
+                (cast(IWidgetTokenOwner) fTextViewer).releaseWidgetToken(this);
             }
             
             fIsControlVisible= false;
--- a/dwtx/jface/text/information/InformationPresenter.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/information/InformationPresenter.d	Sun Aug 24 01:46:20 2008 +0200
@@ -308,7 +308,7 @@
         if (fProviders is null)
             return null;
 
-        return (IInformationProvider) fProviders.get(contentType);
+        return cast(IInformationProvider) fProviders.get(contentType);
     }
 
     /**
@@ -347,7 +347,7 @@
 
         Object info;
         if (provider instanceof IInformationProviderExtension) {
-            IInformationProviderExtension extension= (IInformationProviderExtension) provider;
+            IInformationProviderExtension extension= cast(IInformationProviderExtension) provider;
             info= extension.getInformation2(fTextViewer, subject);
         } else {
             // backward compatibility code
@@ -355,7 +355,7 @@
         }
         
         if (provider instanceof IInformationProviderExtension2)
-            setCustomInformationControlCreator(((IInformationProviderExtension2) provider).getInformationPresenterControlCreator());
+            setCustomInformationControlCreator((cast(IInformationProviderExtension2) provider).getInformationPresenterControlCreator());
         else
             setCustomInformationControlCreator(null);
 
@@ -401,7 +401,7 @@
      */
     private IRegion modelRange2WidgetRange(IRegion region) {
         if (fTextViewer instanceof ITextViewerExtension5) {
-            ITextViewerExtension5 extension= (ITextViewerExtension5) fTextViewer;
+            ITextViewerExtension5 extension= cast(ITextViewerExtension5) fTextViewer;
             return extension.modelRange2WidgetRange(region);
         }
 
@@ -434,11 +434,11 @@
      */
     protected void showInformationControl(Rectangle subjectArea) {
         if (fTextViewer instanceof IWidgetTokenOwnerExtension && fTextViewer instanceof IWidgetTokenOwner) {
-            IWidgetTokenOwnerExtension extension= (IWidgetTokenOwnerExtension) fTextViewer;
+            IWidgetTokenOwnerExtension extension= cast(IWidgetTokenOwnerExtension) fTextViewer;
             if (extension.requestWidgetToken(this, WIDGET_PRIORITY))
                 super.showInformationControl(subjectArea);
         } else if (fTextViewer instanceof IWidgetTokenOwner) {
-            IWidgetTokenOwner owner= (IWidgetTokenOwner) fTextViewer;
+            IWidgetTokenOwner owner= cast(IWidgetTokenOwner) fTextViewer;
             if (owner.requestWidgetToken(this))
                 super.showInformationControl(subjectArea);
 
@@ -454,7 +454,7 @@
             super.hideInformationControl();
         } finally {
             if (fTextViewer instanceof IWidgetTokenOwner) {
-                IWidgetTokenOwner owner= (IWidgetTokenOwner) fTextViewer;
+                IWidgetTokenOwner owner= cast(IWidgetTokenOwner) fTextViewer;
                 owner.releaseWidgetToken(this);
             }
         }
@@ -468,7 +468,7 @@
             super.handleInformationControlDisposed();
         } finally {
             if (fTextViewer instanceof IWidgetTokenOwner) {
-                IWidgetTokenOwner owner= (IWidgetTokenOwner) fTextViewer;
+                IWidgetTokenOwner owner= cast(IWidgetTokenOwner) fTextViewer;
                 owner.releaseWidgetToken(this);
             }
         }
--- a/dwtx/jface/text/link/LinkedModeManager.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/link/LinkedModeManager.d	Sun Aug 24 01:46:20 2008 +0200
@@ -117,14 +117,14 @@
         Set mgrs= new HashSet();
         LinkedModeManager mgr= null;
         for (int i= 0; i < documents.length; i++) {
-            mgr= (LinkedModeManager) fgManagers.get(documents[i]);
+            mgr= cast(LinkedModeManager) fgManagers.get(documents[i]);
             if (mgr !is null)
                 mgrs.add(mgr);
         }
         if (mgrs.size() > 1)
             if (force) {
                 for (Iterator it= mgrs.iterator(); it.hasNext(); ) {
-                    LinkedModeManager m= (LinkedModeManager) it.next();
+                    LinkedModeManager m= cast(LinkedModeManager) it.next();
                     m.closeAllEnvironments();
                 }
             } else {
@@ -146,7 +146,7 @@
      * @param document the document whose <code>LinkedModeManager</code> should be canceled
      */
     public static void cancelManager(IDocument document) {
-        LinkedModeManager mgr= (LinkedModeManager) fgManagers.get(document);
+        LinkedModeManager mgr= cast(LinkedModeManager) fgManagers.get(document);
         if (mgr !is null)
             mgr.closeAllEnvironments();
     }
@@ -166,7 +166,7 @@
             return;
 
         while (!fEnvironments.isEmpty()) {
-            LinkedModeModel env= (LinkedModeModel) fEnvironments.pop();
+            LinkedModeModel env= cast(LinkedModeModel) fEnvironments.pop();
             if (env is model)
                 break;
             env.exit(ILinkedModeListener.NONE);
@@ -179,7 +179,7 @@
 
     private void closeAllEnvironments() {
         while (!fEnvironments.isEmpty()) {
-            LinkedModeModel env= (LinkedModeModel) fEnvironments.pop();
+            LinkedModeModel env= cast(LinkedModeModel) fEnvironments.pop();
             env.exit(ILinkedModeListener.NONE);
         }
 
@@ -188,7 +188,7 @@
 
     private void removeManager() {
         for (Iterator it= fgManagers.keySet().iterator(); it.hasNext();) {
-            IDocument doc= (IDocument) it.next();
+            IDocument doc= cast(IDocument) it.next();
             if (fgManagers.get(doc) is this)
                 it.remove();
         }
@@ -215,7 +215,7 @@
                     return true;
                 }
 
-                LinkedModeModel top= (LinkedModeModel) fEnvironments.peek();
+                LinkedModeModel top= cast(LinkedModeModel) fEnvironments.peek();
                 if (model.canNestInto(top)) {
                     model.addLinkingListener(fListener);
                     fEnvironments.push(model);
@@ -243,6 +243,6 @@
     public LinkedModeModel getTopEnvironment() {
         if (fEnvironments.isEmpty())
             return null;
-        return (LinkedModeModel) fEnvironments.peek();
+        return cast(LinkedModeModel) fEnvironments.peek();
     }
 }
--- a/dwtx/jface/text/link/LinkedModeModel.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/link/LinkedModeModel.d	Sun Aug 24 01:46:20 2008 +0200
@@ -197,7 +197,7 @@
                 return;
 
             for (Iterator it= fGroups.iterator(); it.hasNext(); ) {
-                LinkedPositionGroup group= (LinkedPositionGroup) it.next();
+                LinkedPositionGroup group= cast(LinkedPositionGroup) it.next();
                 if (!group.isLegalEvent(event)) {
                     fExit= true;
                     return;
@@ -224,7 +224,7 @@
             // collect all results
             Map result= null;
             for (Iterator it= fGroups.iterator(); it.hasNext();) {
-                LinkedPositionGroup group= (LinkedPositionGroup) it.next();
+                LinkedPositionGroup group= cast(LinkedPositionGroup) it.next();
 
                 Map map= group.handleEvent(event);
                 if (result !is null && map !is null) {
@@ -239,8 +239,8 @@
             if (result !is null) {
                 // edit all documents
                 for (Iterator it2= result.keySet().iterator(); it2.hasNext(); ) {
-                    IDocument doc= (IDocument) it2.next();
-                    TextEdit edit= (TextEdit) result.get(doc);
+                    IDocument doc= cast(IDocument) it2.next();
+                    TextEdit edit= cast(TextEdit) result.get(doc);
                     Replace replace= new Replace(edit);
 
                     // apply the edition, either as post notification replace
@@ -248,7 +248,7 @@
                     // document
                     if (doc is event.getDocument()) {
                         if (doc instanceof IDocumentExtension) {
-                            ((IDocumentExtension) doc).registerPostNotificationReplace(this, replace);
+                            (cast(IDocumentExtension) doc).registerPostNotificationReplace(this, replace);
                         } else {
                             // ignore - there is no way we can log from JFace text...
                         }
@@ -315,7 +315,7 @@
      */
     private void enforceDisjoint(LinkedPositionGroup group) throws BadLocationException {
         for (Iterator it= fGroups.iterator(); it.hasNext(); ) {
-            LinkedPositionGroup g= (LinkedPositionGroup) it.next();
+            LinkedPositionGroup g= cast(LinkedPositionGroup) it.next();
             g.enforceDisjoint(group);
         }
     }
@@ -333,7 +333,7 @@
         fIsActive= false;
 
         for (Iterator it= fDocuments.iterator(); it.hasNext(); ) {
-            IDocument doc= (IDocument) it.next();
+            IDocument doc= cast(IDocument) it.next();
             try {
                 doc.removePositionCategory(getCategory());
             } catch (BadPositionCategoryException e) {
@@ -350,7 +350,7 @@
         List listeners= new ArrayList(fListeners);
         fListeners.clear();
         for (Iterator it= listeners.iterator(); it.hasNext(); ) {
-            ILinkedModeListener listener= (ILinkedModeListener) it.next();
+            ILinkedModeListener listener= cast(ILinkedModeListener) it.next();
             listener.left(this, flags);
         }
 
@@ -521,7 +521,7 @@
         // register positions
         try {
             for (Iterator it= fGroups.iterator(); it.hasNext(); ) {
-                LinkedPositionGroup group= (LinkedPositionGroup) it.next();
+                LinkedPositionGroup group= cast(LinkedPositionGroup) it.next();
                 group.register(this);
             }
             return true;
@@ -539,7 +539,7 @@
     private void enforceNotEmpty() {
         bool hasPosition= false;
         for (Iterator it= fGroups.iterator(); it.hasNext(); )
-            if (!((LinkedPositionGroup) it.next()).isEmpty()) {
+            if (!(cast(LinkedPositionGroup) it.next()).isEmpty()) {
                 hasPosition= true;
                 break;
             }
@@ -555,7 +555,7 @@
     private IDocument[] getDocuments() {
         Set docs= new HashSet();
         for (Iterator it= fGroups.iterator(); it.hasNext(); ) {
-            LinkedPositionGroup group= (LinkedPositionGroup) it.next();
+            LinkedPositionGroup group= cast(LinkedPositionGroup) it.next();
             docs.addAll(Arrays.asList(group.getDocuments()));
         }
         return (IDocument[]) docs.toArray(new IDocument[docs.size()]);
@@ -571,7 +571,7 @@
      */
     bool canNestInto(LinkedModeModel parent) {
         for (Iterator it= fGroups.iterator(); it.hasNext(); ) {
-            LinkedPositionGroup group= (LinkedPositionGroup) it.next();
+            LinkedPositionGroup group= cast(LinkedPositionGroup) it.next();
             if (!enforceNestability(group, parent)) {
                 fParentPosition= null;
                 return false;
@@ -598,7 +598,7 @@
 
         try {
             for (Iterator it= model.fGroups.iterator(); it.hasNext(); ) {
-                LinkedPositionGroup pg= (LinkedPositionGroup) it.next();
+                LinkedPositionGroup pg= cast(LinkedPositionGroup) it.next();
                 LinkedPosition pos;
                 pos= pg.adopt(group);
                 if (pos !is null && fParentPosition !is null && fParentPosition !is pos)
@@ -684,7 +684,7 @@
     public LinkedPosition findPosition(LinkedPosition toFind) {
         LinkedPosition position= null;
         for (Iterator it= fGroups.iterator(); it.hasNext(); ) {
-            LinkedPositionGroup group= (LinkedPositionGroup) it.next();
+            LinkedPositionGroup group= cast(LinkedPositionGroup) it.next();
             position= group.getPosition(toFind);
             if (position !is null)
                 break;
@@ -723,7 +723,7 @@
     private void suspend() {
         List l= new ArrayList(fListeners);
         for (Iterator it= l.iterator(); it.hasNext(); ) {
-            ILinkedModeListener listener= (ILinkedModeListener) it.next();
+            ILinkedModeListener listener= cast(ILinkedModeListener) it.next();
             listener.suspend(this);
         }
     }
@@ -737,7 +737,7 @@
     private void resume(int flags) {
         List l= new ArrayList(fListeners);
         for (Iterator it= l.iterator(); it.hasNext(); ) {
-            ILinkedModeListener listener= (ILinkedModeListener) it.next();
+            ILinkedModeListener listener= cast(ILinkedModeListener) it.next();
             listener.resume(this, flags);
         }
     }
@@ -753,7 +753,7 @@
      */
     public bool anyPositionContains(int offset) {
         for (Iterator it= fGroups.iterator(); it.hasNext(); ) {
-            LinkedPositionGroup group= (LinkedPositionGroup) it.next();
+            LinkedPositionGroup group= cast(LinkedPositionGroup) it.next();
             if (group.contains(offset))
                 // take the first hit - exclusion is guaranteed by enforcing
                 // disjointness when adding positions
@@ -781,7 +781,7 @@
      */
     public LinkedPositionGroup getGroupForPosition(Position position) {
         for (Iterator it= fGroups.iterator(); it.hasNext(); ) {
-            LinkedPositionGroup group= (LinkedPositionGroup) it.next();
+            LinkedPositionGroup group= cast(LinkedPositionGroup) it.next();
             if (group.contains(position))
                 return group;
         }
--- a/dwtx/jface/text/link/LinkedModeUI.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/link/LinkedModeUI.d	Sun Aug 24 01:46:20 2008 +0200
@@ -348,7 +348,7 @@
                 display.asyncExec(new Runnable() {
                     public void run() {
                         if (fIsActive && viewer instanceof IEditingSupportRegistry) {
-                            IEditingSupport[] helpers= ((IEditingSupportRegistry) viewer).getRegisteredSupports();
+                            IEditingSupport[] helpers= (cast(IEditingSupportRegistry) viewer).getRegisteredSupports();
                             for (int i= 0; i < helpers.length; i++) {
                                 if (helpers[i].ownsFocusShell())
                                     return;
@@ -401,7 +401,7 @@
                 if (!fModel.anyPositionContains(offset)) {
                     ITextViewer viewer= fCurrentTarget.getViewer();
                     if (fFramePosition !is null && viewer instanceof IEditingSupportRegistry) {
-                        IEditingSupport[] helpers= ((IEditingSupportRegistry) viewer).getRegisteredSupports();
+                        IEditingSupport[] helpers= (cast(IEditingSupportRegistry) viewer).getRegisteredSupports();
                         for (int i= 0; i < helpers.length; i++) {
                             if (helpers[i].isOriginator(null, new Region(fFramePosition.getOffset(), fFramePosition.getLength())))
                                 return;
@@ -451,7 +451,7 @@
             // Enter:       accepts all entries and leaves all (possibly stacked) environments, the last sets the caret
             // Esc:         accepts all entries and leaves all (possibly stacked) environments, the caret stays
             // ? what do we do to leave one level of a cycling model that is stacked?
-            // -> This is only the case if the level was set up with forced cycling (CYCLE_ALWAYS), in which case
+            // -> This is only the case if the level was set up with forced cycling cast(CYCLE_ALWAYS), in which case
             // the caller is sure that one does not need by-level exiting.
             switch (event.character) {
                 // [SHIFT-]TAB = hop between edit boxes
@@ -541,9 +541,9 @@
         public void selectionChanged(SelectionChangedEvent event) {
             ISelection selection= event.getSelection();
             if (selection instanceof ITextSelection) {
-                ITextSelection textsel= (ITextSelection) selection;
+                ITextSelection textsel= cast(ITextSelection) selection;
                 if (event.getSelectionProvider() instanceof ITextViewer) {
-                    IDocument doc= ((ITextViewer) event.getSelectionProvider()).getDocument();
+                    IDocument doc= (cast(ITextViewer) event.getSelectionProvider()).getDocument();
                     if (doc !is null) {
                         int offset= textsel.getOffset();
                         int length= textsel.getLength();
@@ -834,7 +834,7 @@
     /** Trigger content assist on choice positions */
     private void triggerContentAssist() {
         if (fFramePosition instanceof ProposalPosition) {
-            ProposalPosition pp= (ProposalPosition) fFramePosition;
+            ProposalPosition pp= cast(ProposalPosition) fFramePosition;
             ICompletionProposal[] choices= pp.getChoices();
             if (choices !is null && choices.length > 0) {
                 fAssistant.setCompletions(choices);
@@ -888,10 +888,10 @@
         if (lpa !is null) {
             ITextViewer viewer= fCurrentTarget.getViewer();
             if (viewer instanceof ISourceViewer) {
-                ISourceViewer sv= (ISourceViewer) viewer;
+                ISourceViewer sv= cast(ISourceViewer) viewer;
                 IAnnotationModel model= sv.getAnnotationModel();
                 if (model instanceof IAnnotationModelExtension) {
-                    IAnnotationModelExtension ext= (IAnnotationModelExtension) model;
+                    IAnnotationModelExtension ext= cast(IAnnotationModelExtension) model;
                     IAnnotationModel ourModel= ext.getAnnotationModel(getUniqueKey());
                     if (ourModel is null) {
                         ext.addAnnotationModel(getUniqueKey(), lpa);
@@ -904,10 +904,10 @@
     private void uninstallAnnotationModel(LinkedModeUITarget target) {
         ITextViewer viewer= target.getViewer();
         if (viewer instanceof ISourceViewer) {
-            ISourceViewer sv= (ISourceViewer) viewer;
+            ISourceViewer sv= cast(ISourceViewer) viewer;
             IAnnotationModel model= sv.getAnnotationModel();
             if (model instanceof IAnnotationModelExtension) {
-                IAnnotationModelExtension ext= (IAnnotationModelExtension) model;
+                IAnnotationModelExtension ext= cast(IAnnotationModelExtension) model;
                 ext.removeAnnotationModel(getUniqueKey());
             }
         }
@@ -942,7 +942,7 @@
     private void select() {
         ITextViewer viewer= fCurrentTarget.getViewer();
         if (viewer instanceof ITextViewerExtension5) {
-            ITextViewerExtension5 extension5= (ITextViewerExtension5) viewer;
+            ITextViewerExtension5 extension5= cast(ITextViewerExtension5) viewer;
             extension5.exposeModelRange(new Region(fFramePosition.offset, fFramePosition.length));
         } else if (!viewer.overlapsWithVisibleRegion(fFramePosition.offset, fFramePosition.length)) {
             viewer.resetVisibleRegion();
@@ -966,13 +966,13 @@
 
         if (fCurrentTarget.fKeyListener is null) {
             fCurrentTarget.fKeyListener= new KeyListener();
-            ((ITextViewerExtension) viewer).prependVerifyKeyListener(fCurrentTarget.fKeyListener);
+            (cast(ITextViewerExtension) viewer).prependVerifyKeyListener(fCurrentTarget.fKeyListener);
         } else
             fCurrentTarget.fKeyListener.setEnabled(true);
 
         registerAutoEditVetoer(viewer);
 
-        ((IPostSelectionProvider) viewer).addPostSelectionChangedListener(fSelectionListener);
+        (cast(IPostSelectionProvider) viewer).addPostSelectionChangedListener(fSelectionListener);
 
         createAnnotationModel();
 
@@ -1029,7 +1029,7 @@
         try {
             String[] contentTypes= getContentTypes(viewer.getDocument());
             if (viewer instanceof ITextViewerExtension2) {
-                ITextViewerExtension2 vExtension= ((ITextViewerExtension2) viewer);
+                ITextViewerExtension2 vExtension= (cast(ITextViewerExtension2) viewer);
                 for (int i= 0; i < contentTypes.length; i++) {
                     vExtension.prependAutoEditStrategy(fAutoEditVetoer, contentTypes[i]);
                 }
@@ -1046,7 +1046,7 @@
         try {
             String[] contentTypes= getContentTypes(viewer.getDocument());
             if (viewer instanceof ITextViewerExtension2) {
-                ITextViewerExtension2 vExtension= ((ITextViewerExtension2) viewer);
+                ITextViewerExtension2 vExtension= (cast(ITextViewerExtension2) viewer);
                 for (int i= 0; i < contentTypes.length; i++) {
                     vExtension.removeAutoEditStrategy(fAutoEditVetoer, contentTypes[i]);
                 }
@@ -1068,7 +1068,7 @@
      */
     private String[] getContentTypes(IDocument document) throws BadPartitioningException {
         if (document instanceof IDocumentExtension3) {
-            IDocumentExtension3 ext= (IDocumentExtension3) document;
+            IDocumentExtension3 ext= cast(IDocumentExtension3) document;
             String[] partitionings= ext.getPartitionings();
             Set contentTypes= new HashSet(20);
             for (int i= 0; i < partitionings.length; i++) {
@@ -1130,7 +1130,7 @@
         if (fCurrentTarget.fKeyListener !is null)
             fCurrentTarget.fKeyListener.setEnabled(false);
 
-        ((IPostSelectionProvider) viewer).removePostSelectionChangedListener(fSelectionListener);
+        (cast(IPostSelectionProvider) viewer).removePostSelectionChangedListener(fSelectionListener);
 
         redraw();
     }
@@ -1154,7 +1154,7 @@
             LinkedModeUITarget target= fTargets[i];
             ITextViewer viewer= target.getViewer();
             if (target.fKeyListener !is null) {
-                ((ITextViewerExtension) viewer).removeVerifyKeyListener(target.fKeyListener);
+                (cast(ITextViewerExtension) viewer).removeVerifyKeyListener(target.fKeyListener);
                 target.fKeyListener= null;
             }
 
@@ -1191,7 +1191,7 @@
                     fExitPosition.getDocument().removePosition(fExitPosition);
 
                 for (Iterator iter = docs.iterator(); iter.hasNext(); ) {
-                    IDocument doc= (IDocument) iter.next();
+                    IDocument doc= cast(IDocument) iter.next();
                     doc.removePositionUpdater(fPositionUpdater);
                     bool uninstallCat= false;
                     String[] cats= doc.getPositionCategories();
@@ -1223,7 +1223,7 @@
 
     private void endCompoundChange() {
         if (fHasOpenCompoundChange) {
-            ITextViewerExtension extension= (ITextViewerExtension) fCurrentTarget.getViewer();
+            ITextViewerExtension extension= cast(ITextViewerExtension) fCurrentTarget.getViewer();
             IRewriteTarget target= extension.getRewriteTarget();
             target.endCompoundChange();
             fHasOpenCompoundChange= false;
@@ -1232,7 +1232,7 @@
 
     private void beginCompoundChange() {
         if (!fHasOpenCompoundChange) {
-            ITextViewerExtension extension= (ITextViewerExtension) fCurrentTarget.getViewer();
+            ITextViewerExtension extension= cast(ITextViewerExtension) fCurrentTarget.getViewer();
             IRewriteTarget target= extension.getRewriteTarget();
             target.beginCompoundChange();
             fHasOpenCompoundChange= true;
--- a/dwtx/jface/text/link/LinkedPosition.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/link/LinkedPosition.d	Sun Aug 24 01:46:20 2008 +0200
@@ -85,7 +85,7 @@
      */
     public bool equals(Object other) {
         if (other instanceof LinkedPosition) {
-            LinkedPosition p= (LinkedPosition) other;
+            LinkedPosition p= cast(LinkedPosition) other;
             return p.offset is offset && p.length is length && p.fDocument is fDocument;
         }
         return false;
--- a/dwtx/jface/text/link/LinkedPositionAnnotations.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/link/LinkedPositionAnnotations.d	Sun Aug 24 01:46:20 2008 +0200
@@ -122,7 +122,7 @@
         Map toAdd= new HashMap();
         if (positions !is null) {
             for (Iterator iter= positions.iterator(); iter.hasNext();) {
-                Position p= (Position) iter.next();
+                Position p= cast(Position) iter.next();
                 if (fGroupAnnotations.containsKey(p)) {
                     toRemove.remove(fGroupAnnotations.get(p));
                 } else {
@@ -156,7 +156,7 @@
         Map toAdd= new HashMap();
         if (positions !is null) {
             for (Iterator iter= positions.iterator(); iter.hasNext();) {
-                Position p= (Position) iter.next();
+                Position p= cast(Position) iter.next();
                 if (fTargetAnnotations.containsKey(p)) {
                     toRemove.remove(fTargetAnnotations.get(p));
                 } else {
@@ -242,7 +242,7 @@
      */
     private void prune(List list) {
         for (Iterator iter= list.iterator(); iter.hasNext();) {
-            LinkedPosition pos= (LinkedPosition) iter.next();
+            LinkedPosition pos= cast(LinkedPosition) iter.next();
             if (!pos.getDocument().equals(fDocument))
                 iter.remove();
         }
--- a/dwtx/jface/text/link/LinkedPositionGroup.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/link/LinkedPositionGroup.d	Sun Aug 24 01:46:20 2008 +0200
@@ -138,7 +138,7 @@
      */
     private void enforceEqualContent(LinkedPosition position) throws BadLocationException {
         if (fPositions.size() > 0) {
-            LinkedPosition groupPosition= (LinkedPosition) fPositions.get(0);
+            LinkedPosition groupPosition= cast(LinkedPosition) fPositions.get(0);
             String groupContent= groupPosition.getContent();
             String positionContent= position.getContent();
             if (!groupContent.equals(positionContent))
@@ -156,7 +156,7 @@
      */
     private void enforceDisjoint(LinkedPosition position) throws BadLocationException {
         for (Iterator it= fPositions.iterator(); it.hasNext(); ) {
-            LinkedPosition p= (LinkedPosition) it.next();
+            LinkedPosition p= cast(LinkedPosition) it.next();
             if (p.overlapsWith(position))
                 throw new BadLocationException();
         }
@@ -171,7 +171,7 @@
     void enforceDisjoint(LinkedPositionGroup group) throws BadLocationException {
         Assert.isNotNull(group);
         for (Iterator it= group.fPositions.iterator(); it.hasNext(); ) {
-            LinkedPosition p= (LinkedPosition) it.next();
+            LinkedPosition p= cast(LinkedPosition) it.next();
             enforceDisjoint(p);
         }
     }
@@ -189,7 +189,7 @@
         fLastRegion= null;
 
         for (Iterator it= fPositions.iterator(); it.hasNext(); ) {
-            LinkedPosition pos= (LinkedPosition) it.next();
+            LinkedPosition pos= cast(LinkedPosition) it.next();
             if (overlapsOrTouches(pos, event)) {
                 if (fLastPosition !is null) {
                     fLastPosition= null;
@@ -253,11 +253,11 @@
                 text= ""; //$NON-NLS-1$
 
             for (Iterator it= fPositions.iterator(); it.hasNext(); ) {
-                LinkedPosition p= (LinkedPosition) it.next();
+                LinkedPosition p= cast(LinkedPosition) it.next();
                 if (p is fLastPosition || p.isDeleted())
                     continue; // don't re-update the origin of the change
 
-                List edits= (List) map.get(p.getDocument());
+                List edits= cast(List) map.get(p.getDocument());
                 if (edits is null) {
                     edits= new ArrayList();
                     map.put(p.getDocument(), edits);
@@ -268,9 +268,9 @@
 
             try {
                 for (Iterator it= map.keySet().iterator(); it.hasNext();) {
-                    IDocument d= (IDocument) it.next();
+                    IDocument d= cast(IDocument) it.next();
                     TextEdit edit= new MultiTextEdit(0, d.getLength());
-                    edit.addChildren((TextEdit[]) ((List) map.get(d)).toArray(new TextEdit[0]));
+                    edit.addChildren((TextEdit[]) (cast(List) map.get(d)).toArray(new TextEdit[0]));
                     map.put(d, edit);
                 }
 
@@ -298,7 +298,7 @@
         fIsSealed= true;
 
         if (fHasCustomIteration is false && fPositions.size() > 0) {
-            ((LinkedPosition) fPositions.get(0)).setSequenceNumber(0);
+            (cast(LinkedPosition) fPositions.get(0)).setSequenceNumber(0);
         }
     }
 
@@ -306,7 +306,7 @@
         IDocument[] docs= new IDocument[fPositions.size()];
         int i= 0;
         for (Iterator it= fPositions.iterator(); it.hasNext(); i++) {
-            LinkedPosition pos= (LinkedPosition) it.next();
+            LinkedPosition pos= cast(LinkedPosition) it.next();
             docs[i]= pos.getDocument();
         }
         return docs;
@@ -314,7 +314,7 @@
 
     void register(LinkedModeModel model) throws BadLocationException {
         for (Iterator it= fPositions.iterator(); it.hasNext(); ) {
-            LinkedPosition pos= (LinkedPosition) it.next();
+            LinkedPosition pos= cast(LinkedPosition) it.next();
             model.register(pos);
         }
     }
@@ -332,10 +332,10 @@
     LinkedPosition adopt(LinkedPositionGroup group) throws BadLocationException {
         LinkedPosition found= null;
         for (Iterator it= group.fPositions.iterator(); it.hasNext(); ) {
-            LinkedPosition pos= (LinkedPosition) it.next();
+            LinkedPosition pos= cast(LinkedPosition) it.next();
             LinkedPosition localFound= null;
             for (Iterator it2= fPositions.iterator(); it2.hasNext(); ) {
-                LinkedPosition myPos= (LinkedPosition) it2.next();
+                LinkedPosition myPos= cast(LinkedPosition) it2.next();
                 if (myPos.includes(pos)) {
                     if (found is null)
                         found= myPos;
@@ -360,7 +360,7 @@
      */
     LinkedPosition getPosition(LinkedPosition toFind) {
         for (Iterator it= fPositions.iterator(); it.hasNext(); ) {
-            LinkedPosition p= (LinkedPosition) it.next();
+            LinkedPosition p= cast(LinkedPosition) it.next();
             if (p.includes(toFind))
                 return p;
         }
@@ -376,7 +376,7 @@
      */
     bool contains(int offset) {
         for (Iterator it= fPositions.iterator(); it.hasNext(); ) {
-            LinkedPosition pos= (LinkedPosition) it.next();
+            LinkedPosition pos= cast(LinkedPosition) it.next();
             if (pos.includes(offset)) {
                 return true;
             }
@@ -423,7 +423,7 @@
      */
     bool contains(Position position) {
         for (Iterator it= fPositions.iterator(); it.hasNext(); ) {
-            LinkedPosition p= (LinkedPosition) it.next();
+            LinkedPosition p= cast(LinkedPosition) it.next();
             if (position.equals(p))
                 return true;
         }
--- a/dwtx/jface/text/link/ProposalPosition.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/link/ProposalPosition.d	Sun Aug 24 01:46:20 2008 +0200
@@ -90,7 +90,7 @@
     public bool equals(Object o) {
         if (o instanceof ProposalPosition) {
             if (super.equals(o)) {
-                return Arrays.equals(fProposals, ((ProposalPosition)o).fProposals);
+                return Arrays.equals(fProposals, (cast(ProposalPosition)o).fProposals);
             }
         }
         return false;
--- a/dwtx/jface/text/link/TabStopIterator.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/link/TabStopIterator.d	Sun Aug 24 01:46:20 2008 +0200
@@ -59,8 +59,8 @@
          * of <code>LinkedPosition</code>.</p>
          */
         public int compare(Object o1, Object o2) {
-            LinkedPosition p1= (LinkedPosition)o1;
-            LinkedPosition p2= (LinkedPosition)o2;
+            LinkedPosition p1= cast(LinkedPosition)o1;
+            LinkedPosition p2= cast(LinkedPosition)o2;
             int i= p1.getSequenceNumber() - p2.getSequenceNumber();
             if (i !is 0)
                 return i;
@@ -127,7 +127,7 @@
         // find the position that follows closest to the current position
         LinkedPosition found= null;
         for (Iterator it= fList.iterator(); it.hasNext(); ) {
-            LinkedPosition p= (LinkedPosition) it.next();
+            LinkedPosition p= cast(LinkedPosition) it.next();
             if (p.offset > current.offset)
                 if (found is null || found.offset > p.offset)
                     found= p;
@@ -177,7 +177,7 @@
         // find the position that follows closest to the current position
         LinkedPosition found= null;
         for (Iterator it= fList.iterator(); it.hasNext(); ) {
-            LinkedPosition p= (LinkedPosition) it.next();
+            LinkedPosition p= cast(LinkedPosition) it.next();
             if (p.offset < current.offset)
                 if (found is null || found.offset < p.offset)
                     found= p;
@@ -193,13 +193,13 @@
     LinkedPosition next(LinkedPosition current) {
         if (!hasNext(current))
             throw new NoSuchElementException();
-        return (LinkedPosition) fList.get(fIndex= getNextIndex(current));
+        return cast(LinkedPosition) fList.get(fIndex= getNextIndex(current));
     }
 
     LinkedPosition previous(LinkedPosition current) {
         if (!hasPrevious(current))
             throw new NoSuchElementException();
-        return (LinkedPosition) fList.get(fIndex= getPreviousIndex(current));
+        return cast(LinkedPosition) fList.get(fIndex= getPreviousIndex(current));
     }
 
     void setCycling(bool mode) {
--- a/dwtx/jface/text/presentation/PresentationReconciler.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/presentation/PresentationReconciler.d	Sun Aug 24 01:46:20 2008 +0200
@@ -249,7 +249,7 @@
             int length= text is null ? 0 : text.length();
 
             if (fViewer instanceof ITextViewerExtension5) {
-                ITextViewerExtension5 extension= (ITextViewerExtension5) fViewer;
+                ITextViewerExtension5 extension= cast(ITextViewerExtension5) fViewer;
                 return extension.widgetRange2ModelRange(new Region(e.getOffset(), length));
             }
 
@@ -388,7 +388,7 @@
         if (fDamagers is null)
             return null;
 
-        return (IPresentationDamager) fDamagers.get(contentType);
+        return cast(IPresentationDamager) fDamagers.get(contentType);
     }
 
     /*
@@ -399,7 +399,7 @@
         if (fRepairers is null)
             return null;
 
-        return (IPresentationRepairer) fRepairers.get(contentType);
+        return cast(IPresentationRepairer) fRepairers.get(contentType);
     }
 
     /**
@@ -411,7 +411,7 @@
         if (fDamagers !is null) {
             Iterator e= fDamagers.values().iterator();
             while (e.hasNext()) {
-                IPresentationDamager damager= (IPresentationDamager) e.next();
+                IPresentationDamager damager= cast(IPresentationDamager) e.next();
                 damager.setDocument(document);
             }
         }
@@ -426,7 +426,7 @@
         if (fRepairers !is null) {
             Iterator e= fRepairers.values().iterator();
             while (e.hasNext()) {
-                IPresentationRepairer repairer= (IPresentationRepairer) e.next();
+                IPresentationRepairer repairer= cast(IPresentationRepairer) e.next();
                 repairer.setDocument(document);
             }
         }
--- a/dwtx/jface/text/projection/ProjectionDocument.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/projection/ProjectionDocument.d	Sun Aug 24 01:46:20 2008 +0200
@@ -129,7 +129,7 @@
 
         fMasterDocument= masterDocument;
         if (fMasterDocument instanceof IDocumentExtension)
-            fMasterDocumentExtension= (IDocumentExtension) fMasterDocument;
+            fMasterDocumentExtension= cast(IDocumentExtension) fMasterDocument;
 
         fSegmentsCategory= SEGMENTS_CATEGORY;
         fFragmentsCategory= FRAGMENTS_CATEGORY_PREFIX + hashCode();
@@ -249,7 +249,7 @@
             int offset= 0;
             Position[] fragments= getFragments();
             for (int i= 0; i < fragments.length; i++) {
-                Fragment fragment= (Fragment) fragments[i];
+                Fragment fragment= cast(Fragment) fragments[i];
                 Segment segment= new Segment(offset, fragment.getLength());
                 segment.fragment= fragment;
                 addPosition(fSegmentsCategory, segment);
@@ -277,7 +277,7 @@
         int offset= 0;
         if (index > 0) {
             Position[] segments= getSegments();
-            Segment segment= (Segment) segments[index - 1];
+            Segment segment= cast(Segment) segments[index - 1];
             offset= segment.getOffset() + segment.getLength();
         }
 
@@ -311,7 +311,7 @@
             Fragment right= null;
 
             if (index < fragments.length) {
-                Fragment fragment= (Fragment) fragments[index];
+                Fragment fragment= cast(Fragment) fragments[index];
                 if (offsetInMaster is fragment.offset)
                     if (fragment.length is 0) // the fragment does not overlap - it is a zero-length fragment at the same offset
                         left= fragment;
@@ -322,7 +322,7 @@
             }
 
             if (0 < index && index <= fragments.length) {
-                Fragment fragment= (Fragment) fragments[index - 1];
+                Fragment fragment= cast(Fragment) fragments[index - 1];
                 if (fragment.includes(offsetInMaster))
                     throw new IllegalArgumentException("overlaps with existing fragment"); //$NON-NLS-1$
                 if (fragment.getOffset() + fragment.getLength() is offsetInMaster)
@@ -331,7 +331,7 @@
 
             int offsetInSlave= 0;
             if (index > 0) {
-                Fragment fragment= (Fragment) fragments[index - 1];
+                Fragment fragment= cast(Fragment) fragments[index - 1];
                 Segment segment= fragment.segment;
                 offsetInSlave= segment.getOffset() + segment.getLength();
             }
@@ -385,7 +385,7 @@
     private Fragment findFragment(int offsetInMaster, int lengthInMaster) {
         Position[] fragments= getFragments();
         for (int i= 0; i < fragments.length; i++) {
-            Fragment f= (Fragment) fragments[i];
+            Fragment f= cast(Fragment) fragments[i];
             if (f.getOffset() <= offsetInMaster && offsetInMaster + lengthInMaster <= f.getOffset() + f.getLength())
                 return f;
         }
@@ -808,7 +808,7 @@
 
     private int computeAnchor(DocumentEvent event) {
         if (event instanceof ProjectionDocumentEvent) {
-            ProjectionDocumentEvent slave= (ProjectionDocumentEvent) event;
+            ProjectionDocumentEvent slave= cast(ProjectionDocumentEvent) event;
             Object changeType= slave.getChangeType();
             if (ProjectionDocumentEvent.CONTENT_CHANGE is changeType) {
                 DocumentEvent master= slave.getMasterEvent();
@@ -825,7 +825,7 @@
         bool changed= false;
         Position[] segments= getSegments();
         for (int i= 0; i < segments.length; i++) {
-            Segment segment= (Segment) segments[i];
+            Segment segment= cast(Segment) segments[i];
             if (segment.isDeleted() || segment.getLength() is 0) {
                 try {
                     removePosition(fSegmentsCategory, segment);
@@ -835,7 +835,7 @@
                     internalError();
                 }
             } else if (i < segments.length - 1) {
-                Segment next= (Segment) segments[i + 1];
+                Segment next= cast(Segment) segments[i + 1];
                 if (next.isDeleted() || next.getLength() is 0)
                     continue;
                 Fragment fragment= segment.fragment;
@@ -899,7 +899,7 @@
 
             Position[] fragments= getFragments();
             for (int i= 0; i < fragments.length; i++) {
-                Fragment fragment= (Fragment) fragments[i];
+                Fragment fragment= cast(Fragment) fragments[i];
                 fMasterDocument.removePosition(fFragmentsCategory, fragment);
                 removePosition(fSegmentsCategory, fragment.segment);
             }
--- a/dwtx/jface/text/projection/ProjectionDocumentManager.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/projection/ProjectionDocumentManager.d	Sun Aug 24 01:46:20 2008 +0200
@@ -73,7 +73,7 @@
      * @param projection the projection document
      */
     private void add(IDocument master, ProjectionDocument projection) {
-        List list= (List) fProjectionRegistry.get(master);
+        List list= cast(List) fProjectionRegistry.get(master);
         if (list is null) {
             list= new ArrayList(1);
             fProjectionRegistry.put(master, list);
@@ -88,7 +88,7 @@
      * @param projection the projection document
      */
     private void remove(IDocument master, ProjectionDocument projection) {
-        List list= (List) fProjectionRegistry.get(master);
+        List list= cast(List) fProjectionRegistry.get(master);
         if (list !is null) {
             list.remove(projection);
             if (list.size() is 0)
@@ -114,7 +114,7 @@
      * @return an iterator for all registered projection documents or <code>null</code>
      */
     private Iterator getProjectionsIterator(IDocument master) {
-        List list= (List) fProjectionRegistry.get(master);
+        List list= cast(List) fProjectionRegistry.get(master);
         if (list !is null)
             return list.iterator();
         return null;
@@ -133,7 +133,7 @@
             return;
 
         while (e.hasNext()) {
-            ProjectionDocument document= (ProjectionDocument) e.next();
+            ProjectionDocument document= cast(ProjectionDocument) e.next();
             if (about)
                 document.masterDocumentAboutToBeChanged(masterEvent);
             else
@@ -160,7 +160,7 @@
      */
     public IDocumentInformationMapping createMasterSlaveMapping(IDocument slave) {
         if (slave instanceof ProjectionDocument) {
-            ProjectionDocument projectionDocument= (ProjectionDocument) slave;
+            ProjectionDocument projectionDocument= cast(ProjectionDocument) slave;
             return projectionDocument.getDocumentInformationMapping();
         }
         return null;
@@ -192,7 +192,7 @@
      */
     public void freeSlaveDocument(IDocument slave) {
         if (slave instanceof ProjectionDocument) {
-            ProjectionDocument projectionDocument= (ProjectionDocument) slave;
+            ProjectionDocument projectionDocument= cast(ProjectionDocument) slave;
             IDocument master= projectionDocument.getMasterDocument();
             remove(master, projectionDocument);
             projectionDocument.dispose();
@@ -206,7 +206,7 @@
      */
     public IDocument getMasterDocument(IDocument slave) {
         if (slave instanceof ProjectionDocument)
-            return ((ProjectionDocument) slave).getMasterDocument();
+            return (cast(ProjectionDocument) slave).getMasterDocument();
         return null;
     }
 
@@ -222,14 +222,14 @@
      */
     public void setAutoExpandMode(IDocument slave, bool autoExpanding) {
         if (slave instanceof ProjectionDocument)
-            ((ProjectionDocument) slave).setAutoExpandMode(autoExpanding);
+            (cast(ProjectionDocument) slave).setAutoExpandMode(autoExpanding);
     }
 
     /*
      * @see dwtx.jface.text.ISlaveDocumentManagerExtension#getSlaveDocuments(dwtx.jface.text.IDocument)
      */
     public IDocument[] getSlaveDocuments(IDocument master) {
-        List list= (List) fProjectionRegistry.get(master);
+        List list= cast(List) fProjectionRegistry.get(master);
         if (list !is null) {
             IDocument[] result= new IDocument[list.size()];
             list.toArray(result);
--- a/dwtx/jface/text/projection/ProjectionMapping.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/projection/ProjectionMapping.d	Sun Aug 24 01:46:20 2008 +0200
@@ -155,7 +155,7 @@
         }
 
         Position[] segments= getSegments();
-        return (Segment) segments[index];
+        return cast(Segment) segments[index];
     }
 
     /**
@@ -218,13 +218,13 @@
         Position[] fragments= getFragments();
         if (index is -1) {
             if (fragments.length > 0) {
-                Fragment last= (Fragment) fragments[fragments.length - 1];
+                Fragment last= cast(Fragment) fragments[fragments.length - 1];
                 if (exclusiveEnd(last) is offset)
                     return last;
             }
             return null;
         }
-        return (Fragment) fragments[index];
+        return cast(Fragment) fragments[index];
     }
 
     /**
@@ -260,7 +260,7 @@
                     // after last
                     Position last= allFragments[allFragments.length - 1];
                     if (originRegion.getOffset() >= exclusiveEnd(last))
-                        return new Region(exclusiveEnd(((Fragment) last).segment), 0);
+                        return new Region(exclusiveEnd((cast(Fragment) last).segment), 0);
                 }
                 return new Region(0, 0);
             }
@@ -320,7 +320,7 @@
         if (!takeClosestImage && startFragmentIdx > endFragmentIdx || endFragmentIdx is -1)
             return null;
 
-        Fragment[] result= {(Fragment) fragments[startFragmentIdx], (Fragment) fragments[endFragmentIdx]};
+        Fragment[] result= {cast(Fragment) fragments[startFragmentIdx], cast(Fragment) fragments[endFragmentIdx]};
         return result;
     }
 
@@ -517,9 +517,9 @@
             int index= fMasterDocument.computeIndexInCategory(fFragmentsCategory, originLineRegion.getOffset());
 
             if (0 < index && index < fragments.length) {
-                Fragment left= (Fragment) fragments[index - 1];
+                Fragment left= cast(Fragment) fragments[index - 1];
                 int leftDistance= originLineRegion.getOffset() - (exclusiveEnd(left));
-                Fragment right= (Fragment) fragments[index];
+                Fragment right= cast(Fragment) fragments[index];
                 int rightDistance= right.getOffset() - (exclusiveEnd(originLineRegion));
 
                 if (leftDistance <= rightDistance)
@@ -528,10 +528,10 @@
                     originLine= fMasterDocument.getLineOfOffset(right.getOffset());
 
             } else if (index is 0) {
-                Fragment right= (Fragment) fragments[index];
+                Fragment right= cast(Fragment) fragments[index];
                 originLine= fMasterDocument.getLineOfOffset(right.getOffset());
             } else if (index is fragments.length) {
-                Fragment left= (Fragment) fragments[index - 1];
+                Fragment left= cast(Fragment) fragments[index - 1];
                 originLine= fMasterDocument.getLineOfOffset(exclusiveEnd(left));
             }
 
@@ -560,12 +560,12 @@
         IRegion[] result= new IRegion[resultLength];
 
         // first
-        result[0]= createOriginStartRegion((Segment) segments[firstIndex], imageRegion.getOffset() - segments[firstIndex].getOffset());
+        result[0]= createOriginStartRegion(cast(Segment) segments[firstIndex], imageRegion.getOffset() - segments[firstIndex].getOffset());
         // middles
         for (int i= 1; i < resultLength - 1; i++)
-            result[i]= createOriginRegion((Segment) segments[firstIndex + i]);
+            result[i]= createOriginRegion(cast(Segment) segments[firstIndex + i]);
         // last
-        Segment last= (Segment) segments[lastIndex];
+        Segment last= cast(Segment) segments[lastIndex];
         int segmentEndOffset= exclusiveEnd(last);
         IRegion lastRegion= createOriginEndRegion(last, segmentEndOffset - endOffset);
         if (resultLength > 1) {
@@ -617,12 +617,12 @@
         IRegion[] result= new IRegion[resultLength];
 
         // first
-        result[0]= createImageStartRegion((Fragment) fragments[firstIndex], offset - fragments[firstIndex].getOffset());
+        result[0]= createImageStartRegion(cast(Fragment) fragments[firstIndex], offset - fragments[firstIndex].getOffset());
         // middles
         for (int i= 1; i < resultLength - 1; i++)
-            result[i]= createImageRegion((Fragment) fragments[firstIndex + i]);
+            result[i]= createImageRegion(cast(Fragment) fragments[firstIndex + i]);
         // last
-        Fragment last= (Fragment) fragments[lastIndex];
+        Fragment last= cast(Fragment) fragments[lastIndex];
         int fragmentEndOffset= exclusiveEnd(last);
         IRegion lastRegion= createImageEndRegion(last, fragmentEndOffset - endOffset);
         if (resultLength > 1) {
@@ -664,12 +664,12 @@
         IRegion[] result= new IRegion[resultLength];
 
         // first
-        result[0]= createOriginStartRegion((Fragment) fragments[firstIndex], originOffset - fragments[firstIndex].getOffset());
+        result[0]= createOriginStartRegion(cast(Fragment) fragments[firstIndex], originOffset - fragments[firstIndex].getOffset());
         // middles
         for (int i= 1; i < resultLength - 1; i++)
-            result[i]= createOriginRegion((Fragment) fragments[firstIndex + i]);
+            result[i]= createOriginRegion(cast(Fragment) fragments[firstIndex + i]);
         // last
-        Fragment last= (Fragment) fragments[lastIndex];
+        Fragment last= cast(Fragment) fragments[lastIndex];
         int fragmentEndOffset= exclusiveEnd(last);
         IRegion lastRegion= createOriginEndRegion(last, fragmentEndOffset - endOffset);
         if (resultLength > 1) {
--- a/dwtx/jface/text/projection/ProjectionTextStore.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/projection/ProjectionTextStore.d	Sun Aug 24 01:46:20 2008 +0200
@@ -150,7 +150,7 @@
         }
 
         // unreachable
-        return (char) 0;
+        return cast(wchar) 0;
     }
 
     /*
--- a/dwtx/jface/text/projection/SegmentUpdater.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/projection/SegmentUpdater.d	Sun Aug 24 01:46:20 2008 +0200
@@ -65,7 +65,7 @@
     public void update(DocumentEvent event) {
 
         Assert.isTrue(event instanceof ProjectionDocumentEvent);
-        fIsProjectionChange= ((ProjectionDocumentEvent) event).getChangeType() is ProjectionDocumentEvent.PROJECTION_CHANGE;
+        fIsProjectionChange= (cast(ProjectionDocumentEvent) event).getChangeType() is ProjectionDocumentEvent.PROJECTION_CHANGE;
 
         try {
 
@@ -82,7 +82,7 @@
                 Assert.isTrue(fPosition instanceof Segment);
 
                 if (i < category.length - 1)
-                    fNextSegment= (Segment) category[i + 1];
+                    fNextSegment= cast(Segment) category[i + 1];
                 else
                     fNextSegment= null;
 
@@ -104,7 +104,7 @@
      */
     protected void adaptToInsert() {
 
-        Segment segment= (Segment) fPosition;
+        Segment segment= cast(Segment) fPosition;
         int myStart= segment.offset;
         int myEnd= segment.offset + segment.length - (segment.isMarkedForStretch || fNextSegment is null || isAffectingReplace() ? 0 : 1);
         myEnd= Math.max(myStart, myEnd);
--- a/dwtx/jface/text/quickassist/QuickAssistAssistant.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/quickassist/QuickAssistAssistant.d	Sun Aug 24 01:46:20 2008 +0200
@@ -82,7 +82,7 @@
             if (!(viewer instanceof ISourceViewer))
                 return null;
             
-            return fQuickAssistProcessor.computeQuickAssistProposals(new TextInvocationContext((ISourceViewer)viewer, offset, -1));
+            return fQuickAssistProcessor.computeQuickAssistProposals(new TextInvocationContext(cast(ISourceViewer)viewer, offset, -1));
         }
 
         /*
--- a/dwtx/jface/text/reconciler/DirtyRegionQueue.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/reconciler/DirtyRegionQueue.d	Sun Aug 24 01:46:20 2008 +0200
@@ -88,7 +88,7 @@
      */
     private DirtyRegion getLastDirtyRegion() {
         int size= fDirtyRegions.size();
-        return (size is 0 ? null : (DirtyRegion) fDirtyRegions.get(size - 1));
+        return (size is 0 ? null : cast(DirtyRegion) fDirtyRegions.get(size - 1));
     }
 
     /**
@@ -115,7 +115,7 @@
     public DirtyRegion removeNextDirtyRegion() {
         if (fDirtyRegions.size() is 0)
             return null;
-        DirtyRegion dr= (DirtyRegion) fDirtyRegions.get(0);
+        DirtyRegion dr= cast(DirtyRegion) fDirtyRegions.get(0);
         fDirtyRegions.remove(0);
         return dr;
     }
--- a/dwtx/jface/text/reconciler/MonoReconciler.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/reconciler/MonoReconciler.d	Sun Aug 24 01:46:20 2008 +0200
@@ -67,7 +67,7 @@
         Assert.isNotNull(strategy);
         fStrategy= strategy;
         if (fStrategy instanceof IReconcilingStrategyExtension) {
-            IReconcilingStrategyExtension extension= (IReconcilingStrategyExtension)fStrategy;
+            IReconcilingStrategyExtension extension= cast(IReconcilingStrategyExtension)fStrategy;
             extension.setProgressMonitor(getProgressMonitor());
         }
 
@@ -109,7 +109,7 @@
     public void setProgressMonitor(IProgressMonitor monitor) {
         super.setProgressMonitor(monitor);
         if (fStrategy instanceof IReconcilingStrategyExtension) {
-            IReconcilingStrategyExtension extension= (IReconcilingStrategyExtension) fStrategy;
+            IReconcilingStrategyExtension extension= cast(IReconcilingStrategyExtension) fStrategy;
             extension.setProgressMonitor(monitor);
         }
     }
@@ -119,7 +119,7 @@
      */
     protected void initialProcess() {
         if (fStrategy instanceof IReconcilingStrategyExtension) {
-            IReconcilingStrategyExtension extension= (IReconcilingStrategyExtension) fStrategy;
+            IReconcilingStrategyExtension extension= cast(IReconcilingStrategyExtension) fStrategy;
             extension.initialReconcile();
         }
     }
--- a/dwtx/jface/text/reconciler/Reconciler.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/reconciler/Reconciler.d	Sun Aug 24 01:46:20 2008 +0200
@@ -119,7 +119,7 @@
         else {
             fStrategies.put(contentType, strategy);
             if (strategy instanceof IReconcilingStrategyExtension && getProgressMonitor() !is null) {
-                IReconcilingStrategyExtension extension= (IReconcilingStrategyExtension) strategy;
+                IReconcilingStrategyExtension extension= cast(IReconcilingStrategyExtension) strategy;
                 extension.setProgressMonitor(getProgressMonitor());
             }
         }
@@ -135,7 +135,7 @@
         if (fStrategies is null)
             return null;
 
-        return (IReconcilingStrategy) fStrategies.get(contentType);
+        return cast(IReconcilingStrategy) fStrategies.get(contentType);
     }
 
     /**
@@ -177,7 +177,7 @@
         if (fStrategies !is null) {
             Iterator e= fStrategies.values().iterator();
             while (e.hasNext()) {
-                IReconcilingStrategy strategy= (IReconcilingStrategy) e.next();
+                IReconcilingStrategy strategy= cast(IReconcilingStrategy) e.next();
                 strategy.setDocument(document);
             }
         }
@@ -193,9 +193,9 @@
         if (fStrategies !is null) {
             Iterator e= fStrategies.values().iterator();
             while (e.hasNext()) {
-                IReconcilingStrategy strategy= (IReconcilingStrategy) e.next();
+                IReconcilingStrategy strategy= cast(IReconcilingStrategy) e.next();
                 if (strategy instanceof IReconcilingStrategyExtension) {
-                    IReconcilingStrategyExtension extension= (IReconcilingStrategyExtension) strategy;
+                    IReconcilingStrategyExtension extension= cast(IReconcilingStrategyExtension) strategy;
                     extension.setProgressMonitor(monitor);
                 }
             }
@@ -216,7 +216,7 @@
             contentTypes.add(contentType);
             IReconcilingStrategy s= getReconcilingStrategy(contentType);
             if (s instanceof IReconcilingStrategyExtension) {
-                IReconcilingStrategyExtension e= (IReconcilingStrategyExtension) s;
+                IReconcilingStrategyExtension e= cast(IReconcilingStrategyExtension) s;
                 e.initialReconcile();
             }
         }
--- a/dwtx/jface/text/revisions/Revision.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/revisions/Revision.d	Sun Aug 24 01:46:20 2008 +0200
@@ -81,9 +81,9 @@
         if (fRanges is null) {
             List ranges= new ArrayList(fChangeRegions.size());
             for (Iterator it= fChangeRegions.iterator(); it.hasNext();) {
-                ChangeRegion region= (ChangeRegion) it.next();
+                ChangeRegion region= cast(ChangeRegion) it.next();
                 for (Iterator inner= region.getAdjustedRanges().iterator(); inner.hasNext();) {
-                    ILineRange range= (ILineRange) inner.next();
+                    ILineRange range= cast(ILineRange) inner.next();
                     ranges.add(new RevisionRange(this, range));
                 }
             }
@@ -102,7 +102,7 @@
     final void applyDiff(Hunk[] hunks) {
         fRanges= null; // mark for recomputation
         for (Iterator regions= fChangeRegions.iterator(); regions.hasNext();) {
-            ChangeRegion region= (ChangeRegion) regions.next();
+            ChangeRegion region= cast(ChangeRegion) regions.next();
             region.clearDiff();
             for (int i= 0; i < hunks.length; i++) {
                 Hunk hunk= hunks[i];
--- a/dwtx/jface/text/revisions/RevisionInformation.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/revisions/RevisionInformation.d	Sun Aug 24 01:46:20 2008 +0200
@@ -109,15 +109,15 @@
         if (fRanges is null) {
             List ranges= new ArrayList(fRevisions.size() * 2); // wild size guess
             for (Iterator it= fRevisions.iterator(); it.hasNext();) {
-                Revision revision= (Revision) it.next();
+                Revision revision= cast(Revision) it.next();
                 ranges.addAll(revision.getRegions());
             }
 
             // sort by start line
             Collections.sort(ranges, new Comparator() {
                 public int compare(Object o1, Object o2) {
-                    RevisionRange r1= (RevisionRange) o1;
-                    RevisionRange r2= (RevisionRange) o2;
+                    RevisionRange r1= cast(RevisionRange) o1;
+                    RevisionRange r2= cast(RevisionRange) o2;
 
                     return r1.getStartLine() - r2.getStartLine();
                 }
@@ -138,7 +138,7 @@
     public void applyDiff(Hunk[] hunks) {
         fRanges= null; // mark for recomputation
         for (Iterator revisions= getRevisions().iterator(); revisions.hasNext();)
-            ((Revision) revisions.next()).applyDiff(hunks);
+            (cast(Revision) revisions.next()).applyDiff(hunks);
     }
 
     /*
--- a/dwtx/jface/text/rules/DefaultDamagerRepairer.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/rules/DefaultDamagerRepairer.d	Sun Aug 24 01:46:20 2008 +0200
@@ -231,7 +231,7 @@
     protected TextAttribute getTokenTextAttribute(IToken token) {
         Object data= token.getData();
         if (data instanceof TextAttribute)
-            return (TextAttribute) data;
+            return cast(TextAttribute) data;
         return fDefaultTextAttribute;
     }
 
--- a/dwtx/jface/text/rules/DefaultPartitioner.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/rules/DefaultPartitioner.d	Sun Aug 24 01:46:20 2008 +0200
@@ -312,7 +312,7 @@
 
             int first= d.computeIndexInCategory(fPositionCategory, reparseStart);
             if (first > 0)  {
-                TypedPosition partition= (TypedPosition) category[first - 1];
+                TypedPosition partition= cast(TypedPosition) category[first - 1];
                 if (partition.includes(reparseStart)) {
                     partitionStart= partition.getOffset();
                     contentType= partition.getType();
@@ -361,7 +361,7 @@
 
                 // remove all affected positions
                 while (first < category.length) {
-                    TypedPosition p= (TypedPosition) category[first];
+                    TypedPosition p= cast(TypedPosition) category[first];
                     if (lastScannedPosition >= p.offset + p.length ||
                             (p.overlapsWith(start, length) &&
                                 (!d.containsPosition(fPositionCategory, start, length) ||
@@ -405,7 +405,7 @@
 
             TypedPosition p;
             while (first < category.length) {
-                p= (TypedPosition) category[first++];
+                p= cast(TypedPosition) category[first++];
                 d.removePosition(fPositionCategory, p);
                 rememberRegion(p.offset, p.length);
             }
@@ -441,13 +441,13 @@
 
             if (index < category.length) {
                 if (offset is category[index].offset)
-                    return (TypedPosition) category[index];
+                    return cast(TypedPosition) category[index];
             }
 
             if (index > 0)
                 index--;
 
-            return (TypedPosition) category[index];
+            return cast(TypedPosition) category[index];
 
         } catch (BadPositionCategoryException x) {
         } catch (BadLocationException x) {
@@ -487,7 +487,7 @@
 
             if (index < category.length) {
 
-                TypedPosition next= (TypedPosition) category[index];
+                TypedPosition next= cast(TypedPosition) category[index];
 
                 if (offset is next.offset)
                     return new TypedRegion(next.getOffset(), next.getLength(), next.getType());
@@ -495,7 +495,7 @@
                 if (index is 0)
                     return new TypedRegion(0, next.offset, IDocument.DEFAULT_CONTENT_TYPE);
 
-                TypedPosition previous= (TypedPosition) category[index - 1];
+                TypedPosition previous= cast(TypedPosition) category[index - 1];
                 if (previous.includes(offset))
                     return new TypedRegion(previous.getOffset(), previous.getLength(), previous.getType());
 
@@ -503,7 +503,7 @@
                 return new TypedRegion(endOffset, next.getOffset() - endOffset, IDocument.DEFAULT_CONTENT_TYPE);
             }
 
-            TypedPosition previous= (TypedPosition) category[category.length - 1];
+            TypedPosition previous= cast(TypedPosition) category[category.length - 1];
             if (previous.includes(offset))
                 return new TypedRegion(previous.getOffset(), previous.getLength(), previous.getType());
 
@@ -559,7 +559,7 @@
     protected String getTokenContentType(IToken token) {
         Object data= token.getData();
         if (data instanceof String)
-            return (String) data;
+            return cast(String) data;
         return null;
     }
 
@@ -614,7 +614,7 @@
             int endIndex= getFirstIndexStartingAfterOffset(category, endOffset);
             for (int i= startIndex; i < endIndex; i++) {
 
-                current= (TypedPosition) category[i];
+                current= cast(TypedPosition) category[i];
 
                 gapOffset= (previous !is null) ? previous.getOffset() + previous.getLength() : 0;
                 gap.setOffset(gapOffset);
--- a/dwtx/jface/text/rules/EndOfLineRule.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/rules/EndOfLineRule.d	Sun Aug 24 01:46:20 2008 +0200
@@ -57,7 +57,7 @@
      * @param token the token to be returned on success
      */
     public this(String startSequence, IToken token) {
-        this(startSequence, token, (char) 0);
+        this(startSequence, token, cast(wchar) 0);
     }
 
     /**
--- a/dwtx/jface/text/rules/FastPartitioner.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/rules/FastPartitioner.d	Sun Aug 24 01:46:20 2008 +0200
@@ -333,7 +333,7 @@
 
             int first= fDocument.computeIndexInCategory(fPositionCategory, reparseStart);
             if (first > 0)  {
-                TypedPosition partition= (TypedPosition) category[first - 1];
+                TypedPosition partition= cast(TypedPosition) category[first - 1];
                 if (partition.includes(reparseStart)) {
                     partitionStart= partition.getOffset();
                     contentType= partition.getType();
@@ -384,7 +384,7 @@
 
                 // remove all affected positions
                 while (first < category.length) {
-                    TypedPosition p= (TypedPosition) category[first];
+                    TypedPosition p= cast(TypedPosition) category[first];
                     if (lastScannedPosition >= p.offset + p.length ||
                             (p.overlapsWith(start, length) &&
                                 (!fDocument.containsPosition(fPositionCategory, start, length) ||
@@ -423,7 +423,7 @@
             category= getPositions();
             TypedPosition p;
             while (first < category.length) {
-                p= (TypedPosition) category[first++];
+                p= cast(TypedPosition) category[first++];
                 fDocument.removePosition(fPositionCategory, p);
                 rememberRegion(p.offset, p.length);
             }
@@ -462,13 +462,13 @@
 
             if (index < category.length) {
                 if (offset is category[index].offset)
-                    return (TypedPosition) category[index];
+                    return cast(TypedPosition) category[index];
             }
 
             if (index > 0)
                 index--;
 
-            return (TypedPosition) category[index];
+            return cast(TypedPosition) category[index];
 
         } catch (BadPositionCategoryException x) {
         } catch (BadLocationException x) {
@@ -514,7 +514,7 @@
 
             if (index < category.length) {
 
-                TypedPosition next= (TypedPosition) category[index];
+                TypedPosition next= cast(TypedPosition) category[index];
 
                 if (offset is next.offset)
                     return new TypedRegion(next.getOffset(), next.getLength(), next.getType());
@@ -522,7 +522,7 @@
                 if (index is 0)
                     return new TypedRegion(0, next.offset, IDocument.DEFAULT_CONTENT_TYPE);
 
-                TypedPosition previous= (TypedPosition) category[index - 1];
+                TypedPosition previous= cast(TypedPosition) category[index - 1];
                 if (previous.includes(offset))
                     return new TypedRegion(previous.getOffset(), previous.getLength(), previous.getType());
 
@@ -530,7 +530,7 @@
                 return new TypedRegion(endOffset, next.getOffset() - endOffset, IDocument.DEFAULT_CONTENT_TYPE);
             }
 
-            TypedPosition previous= (TypedPosition) category[category.length - 1];
+            TypedPosition previous= cast(TypedPosition) category[category.length - 1];
             if (previous.includes(offset))
                 return new TypedRegion(previous.getOffset(), previous.getLength(), previous.getType());
 
@@ -595,7 +595,7 @@
     protected String getTokenContentType(IToken token) {
         Object data= token.getData();
         if (data instanceof String)
-            return (String) data;
+            return cast(String) data;
         return null;
     }
 
@@ -656,7 +656,7 @@
             int endIndex= getFirstIndexStartingAfterOffset(category, endOffset);
             for (int i= startIndex; i < endIndex; i++) {
 
-                current= (TypedPosition) category[i];
+                current= cast(TypedPosition) category[i];
 
                 gapOffset= (previous !is null) ? previous.getOffset() + previous.getLength() : 0;
                 gap.setOffset(gapOffset);
@@ -824,7 +824,7 @@
     protected final Position[] getPositions() throws BadPositionCategoryException {
         if (fCachedPositions is null) {
             fCachedPositions= fDocument.getPositions(fPositionCategory);
-        } else if (CHECK_CACHE_CONSISTENCY) {
+        } else if cast(CHECK_CACHE_CONSISTENCY) {
             Position[] positions= fDocument.getPositions(fPositionCategory);
             int len= Math.min(positions.length, fCachedPositions.length);
             for (int i= 0; i < len; i++) {
--- a/dwtx/jface/text/rules/MultiLineRule.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/rules/MultiLineRule.d	Sun Aug 24 01:46:20 2008 +0200
@@ -57,7 +57,7 @@
      * @param token the token to be returned on success
      */
     public this(String startSequence, String endSequence, IToken token) {
-        this(startSequence, endSequence, token, (char) 0);
+        this(startSequence, endSequence, token, cast(wchar) 0);
     }
 
     /**
--- a/dwtx/jface/text/rules/NumberRule.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/rules/NumberRule.d	Sun Aug 24 01:46:20 2008 +0200
@@ -86,11 +86,11 @@
      */
     public IToken evaluate(ICharacterScanner scanner) {
         int c= scanner.read();
-        if (Character.isDigit((char)c)) {
+        if (Character.isDigit(cast(wchar)c)) {
             if (fColumn is UNDEFINED || (fColumn is scanner.getColumn() - 1)) {
                 do {
                     c= scanner.read();
-                } while (Character.isDigit((char) c));
+                } while (Character.isDigit(cast(wchar) c));
                 scanner.unread();
                 return fToken;
             }
--- a/dwtx/jface/text/rules/RuleBasedPartitionScanner.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/rules/RuleBasedPartitionScanner.d	Sun Aug 24 01:46:20 2008 +0200
@@ -119,7 +119,7 @@
         IToken token;
 
         for (int i= 0; i < fRules.length; i++) {
-            rule= (IPredicateRule) fRules[i];
+            rule= cast(IPredicateRule) fRules[i];
             token= rule.getSuccessToken();
             if (fContentType.equals(token.getData())) {
                 token= rule.evaluate(this, resume);
--- a/dwtx/jface/text/rules/RuleBasedPartitioner.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/rules/RuleBasedPartitioner.d	Sun Aug 24 01:46:20 2008 +0200
@@ -333,7 +333,7 @@
 
                 // remove all affected positions
                 while (first < category.length) {
-                    TypedPosition p= (TypedPosition) category[first];
+                    TypedPosition p= cast(TypedPosition) category[first];
                     if (lastScannedPosition >= p.offset + p.length ||
                             (p.overlapsWith(start, length) &&
                                 (!d.containsPosition(fPositionCategory, start, length) ||
@@ -372,7 +372,7 @@
 
             TypedPosition p;
             while (first < category.length) {
-                p= (TypedPosition) category[first++];
+                p= cast(TypedPosition) category[first++];
                 d.removePosition(fPositionCategory, p);
                 rememberRegion(p.offset, p.length);
             }
@@ -408,13 +408,13 @@
 
             if (index < category.length) {
                 if (offset is category[index].offset)
-                    return (TypedPosition) category[index];
+                    return cast(TypedPosition) category[index];
             }
 
             if (index > 0)
                 index--;
 
-            return (TypedPosition) category[index];
+            return cast(TypedPosition) category[index];
 
         } catch (BadPositionCategoryException x) {
         } catch (BadLocationException x) {
@@ -452,7 +452,7 @@
 
             if (index < category.length) {
 
-                TypedPosition next= (TypedPosition) category[index];
+                TypedPosition next= cast(TypedPosition) category[index];
 
                 if (offset is next.offset)
                     return new TypedRegion(next.getOffset(), next.getLength(), next.getType());
@@ -460,7 +460,7 @@
                 if (index is 0)
                     return new TypedRegion(0, next.offset, IDocument.DEFAULT_CONTENT_TYPE);
 
-                TypedPosition previous= (TypedPosition) category[index - 1];
+                TypedPosition previous= cast(TypedPosition) category[index - 1];
                 if (previous.includes(offset))
                     return new TypedRegion(previous.getOffset(), previous.getLength(), previous.getType());
 
@@ -468,7 +468,7 @@
                 return new TypedRegion(endOffset, next.getOffset() - endOffset, IDocument.DEFAULT_CONTENT_TYPE);
             }
 
-            TypedPosition previous= (TypedPosition) category[category.length - 1];
+            TypedPosition previous= cast(TypedPosition) category[category.length - 1];
             if (previous.includes(offset))
                 return new TypedRegion(previous.getOffset(), previous.getLength(), previous.getType());
 
@@ -524,7 +524,7 @@
     protected String getTokenContentType(IToken token) {
         Object data= token.getData();
         if (data instanceof String)
-            return (String) data;
+            return cast(String) data;
         return null;
     }
 
@@ -576,7 +576,7 @@
 
             for (int i= 0; i < category.length; i++) {
 
-                current= (TypedPosition) category[i];
+                current= cast(TypedPosition) category[i];
 
                 gapOffset= (previous !is null) ? previous.getOffset() + previous.getLength() : 0;
                 gap= new Position(gapOffset, current.getOffset() - gapOffset);
--- a/dwtx/jface/text/rules/SingleLineRule.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/rules/SingleLineRule.d	Sun Aug 24 01:46:20 2008 +0200
@@ -59,7 +59,7 @@
      * @param token the token to be returned on success
      */
     public this(String startSequence, String endSequence, IToken token) {
-        this(startSequence, endSequence, token, (char) 0);
+        this(startSequence, endSequence, token, cast(wchar) 0);
     }
 
     /**
--- a/dwtx/jface/text/rules/WhitespaceRule.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/rules/WhitespaceRule.d	Sun Aug 24 01:46:20 2008 +0200
@@ -74,10 +74,10 @@
      */
     public IToken evaluate(ICharacterScanner scanner) {
         int c= scanner.read();
-        if (fDetector.isWhitespace((char) c)) {
+        if (fDetector.isWhitespace(cast(wchar) c)) {
             do {
                 c= scanner.read();
-            } while (fDetector.isWhitespace((char) c));
+            } while (fDetector.isWhitespace(cast(wchar) c));
             scanner.unread();
             return Token.WHITESPACE;
         }
--- a/dwtx/jface/text/rules/WordPatternRule.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/rules/WordPatternRule.d	Sun Aug 24 01:46:20 2008 +0200
@@ -69,7 +69,7 @@
      * @param token the token to be returned on success
      */
     public this(IWordDetector detector, String startSequence, String endSequence, IToken token) {
-        this(detector, startSequence, endSequence, token, (char)0);
+        this(detector, startSequence, endSequence, token, cast(wchar)0);
     }
 
     /**
@@ -103,8 +103,8 @@
     protected bool endSequenceDetected(ICharacterScanner scanner) {
         fBuffer.setLength(0);
         int c= scanner.read();
-        while (fDetector.isWordPart((char) c)) {
-            fBuffer.append((char) c);
+        while (fDetector.isWordPart(cast(wchar) c)) {
+            fBuffer.append(cast(wchar) c);
             c= scanner.read();
         }
         scanner.unread();
--- a/dwtx/jface/text/rules/WordRule.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/rules/WordRule.d	Sun Aug 24 01:46:20 2008 +0200
@@ -159,30 +159,30 @@
      */
     public IToken evaluate(ICharacterScanner scanner) {
         int c= scanner.read();
-        if (c !is ICharacterScanner.EOF && fDetector.isWordStart((char) c)) {
+        if (c !is ICharacterScanner.EOF && fDetector.isWordStart(cast(wchar) c)) {
             if (fColumn is UNDEFINED || (fColumn is scanner.getColumn() - 1)) {
 
                 fBuffer.setLength(0);
                 do {
-                    fBuffer.append((char) c);
+                    fBuffer.append(cast(wchar) c);
                     c= scanner.read();
-                } while (c !is ICharacterScanner.EOF && fDetector.isWordPart((char) c));
+                } while (c !is ICharacterScanner.EOF && fDetector.isWordPart(cast(wchar) c));
                 scanner.unread();
 
                 String buffer= fBuffer.toString();
-                IToken token= (IToken)fWords.get(buffer);
+                IToken token= cast(IToken)fWords.get(buffer);
                 
                 if(fIgnoreCase) {
                     Iterator iter= fWords.keySet().iterator();
                     while (iter.hasNext()) {
-                        String key= (String)iter.next();
+                        String key= cast(String)iter.next();
                         if(buffer.equalsIgnoreCase(key)) {
-                            token= (IToken)fWords.get(key);
+                            token= cast(IToken)fWords.get(key);
                             break;
                         }
                     }
                 } else
-                    token= (IToken)fWords.get(buffer);
+                    token= cast(IToken)fWords.get(buffer);
                 
                 if (token !is null)
                     return token;
--- a/dwtx/jface/text/source/AnnotationBarHoverManager.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/source/AnnotationBarHoverManager.d	Sun Aug 24 01:46:20 2008 +0200
@@ -428,7 +428,7 @@
         int line= getHoverLine(event);
 
         if (hover instanceof IAnnotationHoverExtension) {
-            IAnnotationHoverExtension extension= (IAnnotationHoverExtension) hover;
+            IAnnotationHoverExtension extension= cast(IAnnotationHoverExtension) hover;
             ILineRange range= extension.getHoverLineRange(fSourceViewer, line);
             setCustomInformationControlCreator(extension.getHoverControlCreator());
             range= adaptLineRange(range, line);
@@ -493,7 +493,7 @@
     private ILineRange adaptLineRangeToFolding(ILineRange lineRange, int line) {
 
         if (fSourceViewer instanceof ITextViewerExtension5) {
-            ITextViewerExtension5 extension= (ITextViewerExtension5) fSourceViewer;
+            ITextViewerExtension5 extension= cast(ITextViewerExtension5) fSourceViewer;
 
             try {
                 IRegion region= convertToRegion(lineRange);
@@ -643,12 +643,12 @@
             return fAnnotationHover;
 
         if (fVerticalRulerInfo instanceof CompositeRuler) {
-            CompositeRuler comp= (CompositeRuler) fVerticalRulerInfo;
+            CompositeRuler comp= cast(CompositeRuler) fVerticalRulerInfo;
             for (Iterator it= comp.getDecoratorIterator(); it.hasNext();) {
                 Object o= it.next();
                 if (o instanceof IVerticalRulerInfoExtension && o instanceof IVerticalRulerInfo) {
-                    if (((IVerticalRulerInfo) o).getControl() is event.getSource()) {
-                        IAnnotationHover hover= ((IVerticalRulerInfoExtension) o).getHover();
+                    if ((cast(IVerticalRulerInfo) o).getControl() is event.getSource()) {
+                        IAnnotationHover hover= (cast(IVerticalRulerInfoExtension) o).getHover();
                         if (hover !is null)
                             return hover;
                     }
@@ -678,7 +678,7 @@
      */
     private int getWidgetLineNumber(int line) throws BadLocationException {
         if (fSourceViewer instanceof ITextViewerExtension5) {
-            ITextViewerExtension5 extension= (ITextViewerExtension5) fSourceViewer;
+            ITextViewerExtension5 extension= cast(ITextViewerExtension5) fSourceViewer;
             return extension.modelLine2WidgetLine(line);
         }
 
@@ -767,12 +767,12 @@
 
         bool allowMouseExit= false;
         if (hover instanceof IAnnotationHoverExtension) {
-            IAnnotationHoverExtension extension= (IAnnotationHoverExtension) hover;
+            IAnnotationHoverExtension extension= cast(IAnnotationHoverExtension) hover;
             allowMouseExit= extension.canHandleMouseCursor();
         }
         bool hideOnMouseWheel= true;
         if (hover instanceof IAnnotationHoverExtension2) {
-            IAnnotationHoverExtension2 extension= (IAnnotationHoverExtension2) hover;
+            IAnnotationHoverExtension2 extension= cast(IAnnotationHoverExtension2) hover;
             hideOnMouseWheel= !extension.canHandleMouseWheel();
         }
         fHideOnMouseWheel= hideOnMouseWheel;
--- a/dwtx/jface/text/source/AnnotationModel.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/source/AnnotationModel.d	Sun Aug 24 01:46:20 2008 +0200
@@ -175,7 +175,7 @@
         
         private Object findNext() {
             while (fParentIterator.hasNext()) {
-                Annotation next= (Annotation) fParentIterator.next();
+                Annotation next= cast(Annotation) fParentIterator.next();
                 Position position= fModel.getPosition(next);
                 if (position !is null) {
                     int offset= position.getOffset();
@@ -274,7 +274,7 @@
 
         public this(Iterator iterator) {
             fSuperIterator= iterator;
-            fCurrent= (Iterator) fSuperIterator.next(); // there is at least one.
+            fCurrent= cast(Iterator) fSuperIterator.next(); // there is at least one.
         }
 
         public void remove() {
@@ -289,7 +289,7 @@
                 fCurrentElement= fCurrent.next();
                 return true;
             } else if (fSuperIterator.hasNext()) {
-                fCurrent= (Iterator) fSuperIterator.next();
+                fCurrent= cast(Iterator) fSuperIterator.next();
                 return hasNext();
             } else
                 return false;
@@ -396,7 +396,7 @@
      * @since 3.0
      */
     protected IAnnotationMap getAnnotationMap() {
-        return (IAnnotationMap) fAnnotations;
+        return cast(IAnnotationMap) fAnnotations;
     }
 
     /*
@@ -478,8 +478,8 @@
             Iterator iter= annotationsToAdd.entrySet().iterator();
             while (iter.hasNext()) {
                 Map.Entry mapEntry= (Map.Entry) iter.next();
-                Annotation annotation= (Annotation) mapEntry.getKey();
-                Position position= (Position) mapEntry.getValue();
+                Annotation annotation= cast(Annotation) mapEntry.getKey();
+                Position position= cast(Position) mapEntry.getValue();
                 addAnnotation(annotation, position, false);
             }
         }
@@ -521,7 +521,7 @@
         if (!fAnnotationModelListeners.contains(listener)) {
             fAnnotationModelListeners.add(listener);
             if (listener instanceof IAnnotationModelListenerExtension) {
-                IAnnotationModelListenerExtension extension= (IAnnotationModelListenerExtension) listener;
+                IAnnotationModelListenerExtension extension= cast(IAnnotationModelListenerExtension) listener;
                 AnnotationModelEvent event= createAnnotationModelEvent();
                 event.markSealed();
                 extension.modelChanged(event);
@@ -568,7 +568,7 @@
             Iterator e= getAnnotationMap().valuesIterator();
             while (e.hasNext())
                 try {
-                    addPosition(fDocument, (Position) e.next());
+                    addPosition(fDocument, cast(Position) e.next());
                 } catch (BadLocationException x) {
                     // ignore invalid position
                 }
@@ -581,7 +581,7 @@
         }
 
         for (Iterator it= fAttachments.keySet().iterator(); it.hasNext();) {
-            IAnnotationModel model= (IAnnotationModel) fAttachments.get(it.next());
+            IAnnotationModel model= cast(IAnnotationModel) fAttachments.get(it.next());
             model.connect(document);
         }
     }
@@ -608,7 +608,7 @@
         Assert.isTrue(fDocument is document);
 
         for (Iterator it= fAttachments.keySet().iterator(); it.hasNext();) {
-            IAnnotationModel model= (IAnnotationModel) fAttachments.get(it.next());
+            IAnnotationModel model= cast(IAnnotationModel) fAttachments.get(it.next());
             model.disconnect(document);
         }
 
@@ -621,7 +621,7 @@
             if (fDocument !is null) {
                 Iterator e= getAnnotationMap().valuesIterator();
                 while (e.hasNext()) {
-                    Position p= (Position) e.next();
+                    Position p= cast(Position) e.next();
                     removePosition(fDocument, p);
                 }
                 fDocument= null;
@@ -675,9 +675,9 @@
         ArrayList v= new ArrayList(fAnnotationModelListeners);
         Iterator e= v.iterator();
         while (e.hasNext()) {
-            IAnnotationModelListener l= (IAnnotationModelListener) e.next();
+            IAnnotationModelListener l= cast(IAnnotationModelListener) e.next();
             if (l instanceof IAnnotationModelListenerExtension)
-                ((IAnnotationModelListenerExtension) l).modelChanged(event);
+                (cast(IAnnotationModelListenerExtension) l).modelChanged(event);
             else if (l !is null)
                 l.modelChanged(this);
         }
@@ -697,7 +697,7 @@
         if (annotations.size() > 0) {
             Iterator e= annotations.iterator();
             while (e.hasNext())
-                removeAnnotation((Annotation) e.next(), false);
+                removeAnnotation(cast(Annotation) e.next(), false);
 
             if (fireModelChanged)
                 fireModelChanged();
@@ -730,8 +730,8 @@
             ArrayList deleted= new ArrayList();
             Iterator e= getAnnotationMap().keySetIterator();
             while (e.hasNext()) {
-                Annotation a= (Annotation) e.next();
-                Position p= (Position) fAnnotations.get(a);
+                Annotation a= cast(Annotation) e.next();
+                Position p= cast(Position) fAnnotations.get(a);
                 if (p is null || p.isDeleted())
                     deleted.add(a);
             }
@@ -773,9 +773,9 @@
         iterators.add(regionIterator);
         Iterator it= fAttachments.keySet().iterator();
         while (it.hasNext()) {
-            IAnnotationModel attachment= (IAnnotationModel) fAttachments.get(it.next());
+            IAnnotationModel attachment= cast(IAnnotationModel) fAttachments.get(it.next());
             if (attachment instanceof IAnnotationModelExtension2)
-                iterators.add(((IAnnotationModelExtension2) attachment).getAnnotationIterator(offset, length, canStartBefore, canEndAfter));
+                iterators.add((cast(IAnnotationModelExtension2) attachment).getAnnotationIterator(offset, length, canStartBefore, canEndAfter));
             else
                 iterators.add(new RegionIterator(attachment.getAnnotationIterator(), attachment, offset, length, canStartBefore, canEndAfter));
         }
@@ -798,7 +798,7 @@
         if (!(fDocument instanceof AbstractDocument))
             return new RegionIterator(getAnnotationIterator(true), this, offset, length, canStartBefore, canEndAfter);
         
-        AbstractDocument document= (AbstractDocument) fDocument;
+        AbstractDocument document= cast(AbstractDocument) fDocument;
         cleanup(true);
         
         try {
@@ -831,7 +831,7 @@
         iterators.add(iter);
         Iterator it= fAttachments.keySet().iterator();
         while (it.hasNext())
-            iterators.add(((IAnnotationModel) fAttachments.get(it.next())).getAnnotationIterator());
+            iterators.add((cast(IAnnotationModel) fAttachments.get(it.next())).getAnnotationIterator());
 
         return new MetaIterator(iterators.iterator());
     }
@@ -855,13 +855,13 @@
      * @see dwtx.jface.text.source.IAnnotationModel#getPosition(dwtx.jface.text.source.Annotation)
      */
     public Position getPosition(Annotation annotation) {
-        Position position= (Position) fAnnotations.get(annotation);
+        Position position= cast(Position) fAnnotations.get(annotation);
         if (position !is null)
             return position;
 
         Iterator it= fAttachments.values().iterator();
         while (position is null && it.hasNext())
-            position= ((IAnnotationModel) it.next()).getPosition(annotation);
+            position= (cast(IAnnotationModel) it.next()).getPosition(annotation);
         return position;
     }
 
@@ -884,8 +884,8 @@
         if (fDocument !is null) {
             Iterator e= getAnnotationMap().keySetIterator();
             while (e.hasNext()) {
-                Annotation a= (Annotation) e.next();
-                Position p= (Position) fAnnotations.get(a);
+                Annotation a= cast(Annotation) e.next();
+                Position p= cast(Position) fAnnotations.get(a);
                 removePosition(fDocument, p);
 //              p.delete();
                 synchronized (getLockObject()) {
@@ -919,7 +919,7 @@
         if (fAnnotations.containsKey(annotation)) {
 
             Position p= null;
-            p= (Position) fAnnotations.get(annotation);
+            p= cast(Position) fAnnotations.get(annotation);
             if (fDocument !is null) {
                 removePosition(fDocument, p);
 //              p.delete();
@@ -964,7 +964,7 @@
         if (position is null) {
             removeAnnotation(annotation, fireModelChanged);
         } else {
-            Position p= (Position) fAnnotations.get(annotation);
+            Position p= cast(Position) fAnnotations.get(annotation);
             if (p !is null) {
 
                 if (position.getOffset() !is p.getOffset() || position.getLength() !is p.getLength()) {
@@ -1040,7 +1040,7 @@
      * @since 3.0
      */
     public IAnnotationModel getAnnotationModel(Object key) {
-        return (IAnnotationModel) fAttachments.get(key);
+        return cast(IAnnotationModel) fAttachments.get(key);
     }
 
     /*
@@ -1048,7 +1048,7 @@
      * @since 3.0
      */
     public IAnnotationModel removeAnnotationModel(Object key) {
-        IAnnotationModel ret= (IAnnotationModel) fAttachments.remove(key);
+        IAnnotationModel ret= cast(IAnnotationModel) fAttachments.remove(key);
         if (ret !is null) {
             for (int i= 0; i < fOpenConnections; i++)
                 ret.disconnect(fDocument);
--- a/dwtx/jface/text/source/AnnotationModelEvent.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/source/AnnotationModelEvent.d	Sun Aug 24 01:46:20 2008 +0200
@@ -232,7 +232,7 @@
      * @since 3.0
      */
     public Position getPositionOfRemovedAnnotation(Annotation annotation) {
-        return (Position) fRemovedAnnotations.get(annotation);
+        return cast(Position) fRemovedAnnotations.get(annotation);
     }
 
     /**
@@ -305,7 +305,7 @@
      */
     public bool isValid() {
         if (fModificationStamp !is null && fAnnotationModel instanceof IAnnotationModelExtension) {
-            IAnnotationModelExtension extension= (IAnnotationModelExtension) fAnnotationModel;
+            IAnnotationModelExtension extension= cast(IAnnotationModelExtension) fAnnotationModel;
             return fModificationStamp is extension.getModificationStamp();
         }
         return true;
@@ -319,7 +319,7 @@
      */
     public void markSealed() {
         if (fAnnotationModel instanceof IAnnotationModelExtension) {
-            IAnnotationModelExtension extension= (IAnnotationModelExtension) fAnnotationModel;
+            IAnnotationModelExtension extension= cast(IAnnotationModelExtension) fAnnotationModel;
             fModificationStamp= extension.getModificationStamp();
         }
     }
--- a/dwtx/jface/text/source/AnnotationPainter.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/source/AnnotationPainter.d	Sun Aug 24 01:46:20 2008 +0200
@@ -632,8 +632,8 @@
                 Iterator iter= decorationsMap.entrySet().iterator();
                 while (iter.hasNext()) {
                     Map.Entry entry= (Map.Entry)iter.next();
-                    Annotation annotation= (Annotation)entry.getKey();
-                    Decoration decoration= (Decoration)entry.getValue();
+                    Annotation annotation= cast(Annotation)entry.getKey();
+                    Decoration decoration= cast(Decoration)entry.getValue();
                     drawDecoration(decoration, null, annotation, clippingRegion, document);
                 }
                 
@@ -650,7 +650,7 @@
                 Annotation[] removedAnnotations= event.getRemovedAnnotations();
                 for (int i=0, length= removedAnnotations.length; i < length; i++) {
                     Annotation annotation= removedAnnotations[i];
-                    Decoration decoration= (Decoration)highlightedDecorationsMap.remove(annotation);
+                    Decoration decoration= cast(Decoration)highlightedDecorationsMap.remove(annotation);
                     if (decoration !is null) {
                         Position position= decoration.fPosition;
                         if (position !is null) {
@@ -658,7 +658,7 @@
                             highlightAnnotationRangeEnd= Math.max(highlightAnnotationRangeEnd, position.offset + position.length);
                         }
                     }
-                    decoration= (Decoration)decorationsMap.remove(annotation);
+                    decoration= cast(Decoration)decorationsMap.remove(annotation);
                     if (decoration !is null) {
                         drawDecoration(decoration, null, annotation, clippingRegion, document);
                         Position position= decoration.fPosition;
@@ -677,7 +677,7 @@
 
                     bool isHighlighting= false;
                     
-                    Decoration decoration= (Decoration)highlightedDecorationsMap.get(annotation);
+                    Decoration decoration= cast(Decoration)highlightedDecorationsMap.get(annotation);
 
                     if (decoration !is null) {
                         isHighlighting= true;
@@ -715,7 +715,7 @@
                     }
 
                     if (usesDrawingStrategy) {
-                        Decoration oldDecoration= (Decoration)decorationsMap.get(annotation);
+                        Decoration oldDecoration= cast(Decoration)decorationsMap.get(annotation);
                         if (oldDecoration !is null) {
                             drawDecoration(oldDecoration, null, annotation, clippingRegion, document);
                         
@@ -732,7 +732,7 @@
 
             // Add new annotations
             while (e.hasNext()) {
-                Annotation annotation= (Annotation) e.next();
+                Annotation annotation= cast(Annotation) e.next();
                 Decoration pp= getDecoration(annotation, null);
                 if (pp !is null) {
                     if (pp.fPaintingStrategy instanceof IDrawingStrategy) {
@@ -913,7 +913,7 @@
         decoration.fPosition= position;
         decoration.fColor= color;
         if (fAnnotationAccess instanceof IAnnotationAccessExtension) {
-            IAnnotationAccessExtension extension= (IAnnotationAccessExtension) fAnnotationAccess;
+            IAnnotationAccessExtension extension= cast(IAnnotationAccessExtension) fAnnotationAccess;
             decoration.fLayer= extension.getLayer(annotation);
         } else {
             decoration.fLayer= IAnnotationAccessExtension.DEFAULT_LAYER;
@@ -943,7 +943,7 @@
         }
 
         if (fAnnotationAccess instanceof IAnnotationAccessExtension) {
-            IAnnotationAccessExtension ext = (IAnnotationAccessExtension) fAnnotationAccess;
+            IAnnotationAccessExtension ext = cast(IAnnotationAccessExtension) fAnnotationAccess;
             Object[] sts = ext.getSupertypes(type);
             for (int i= 0; i < sts.length; i++) {
                 strategy= fPaintingStrategyId2PaintingStrategy.get(fAnnotationType2PaintingStrategyId.get(sts[i]));
@@ -967,22 +967,22 @@
      * @since 3.0
      */
     private Color getColor(final Object annotationType) {
-        Color color= (Color)fCachedAnnotationType2Color.get(annotationType);
+        Color color= cast(Color)fCachedAnnotationType2Color.get(annotationType);
         if (color !is null)
             return color;
 
-        color= (Color)fAnnotationType2Color.get(annotationType);
+        color= cast(Color)fAnnotationType2Color.get(annotationType);
         if (color !is null) {
             fCachedAnnotationType2Color.put(annotationType, color);
             return color;
         }
 
         if (fAnnotationAccess instanceof IAnnotationAccessExtension) {
-            IAnnotationAccessExtension extension= (IAnnotationAccessExtension) fAnnotationAccess;
+            IAnnotationAccessExtension extension= cast(IAnnotationAccessExtension) fAnnotationAccess;
             Object[] superTypes= extension.getSupertypes(annotationType);
             if (superTypes !is null) {
                 for (int i= 0; i < superTypes.length; i++) {
-                    color= (Color)fAnnotationType2Color.get(superTypes[i]);
+                    color= cast(Color)fAnnotationType2Color.get(superTypes[i]);
                     if (color !is null) {
                         fCachedAnnotationType2Color.put(annotationType, color);
                         return color;
@@ -1021,10 +1021,10 @@
             return;
 
         if (fSourceViewer instanceof ITextViewerExtension2) {
-            if (DEBUG)
+            if cast(DEBUG)
                 System.out.println("AP: invalidating offset: " + r.getOffset() + ", length= " + r.getLength()); //$NON-NLS-1$ //$NON-NLS-2$
 
-            ((ITextViewerExtension2)fSourceViewer).invalidateTextPresentation(r.getOffset(), r.getLength());
+            (cast(ITextViewerExtension2)fSourceViewer).invalidateTextPresentation(r.getOffset(), r.getLength());
 
         } else {
             fSourceViewer.invalidateTextPresentation();
@@ -1047,7 +1047,7 @@
 
         IRegion region= tp.getExtent();
 
-        if (DEBUG)
+        if cast(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++) {
@@ -1055,11 +1055,11 @@
             for (Iterator iter= decorations.iterator(); iter.hasNext();) {
                 Map.Entry entry= (Map.Entry)iter.next();
 
-                Annotation a= (Annotation)entry.getKey();
+                Annotation a= cast(Annotation)entry.getKey();
                 if (a.isMarkedDeleted())
                     continue;
 
-                Decoration pp = (Decoration)entry.getValue();
+                Decoration pp = cast(Decoration)entry.getValue();
 
                 maxLayer= Math.max(maxLayer, pp.fLayer + 1); // dynamically update layer maximum
                 if (pp.fLayer !is layer) // wrong layer: skip annotation
@@ -1067,7 +1067,7 @@
 
                 Position p= pp.fPosition;
                 if (fSourceViewer instanceof ITextViewerExtension5) {
-                    ITextViewerExtension5 extension3= (ITextViewerExtension5) fSourceViewer;
+                    ITextViewerExtension5 extension3= cast(ITextViewerExtension5) fSourceViewer;
                     if (null is extension3.modelRange2WidgetRange(new Region(p.getOffset(), p.getLength())))
                         continue;
                 } else if (!fSourceViewer.overlapsWithVisibleRegion(p.offset, p.length)) {
@@ -1081,7 +1081,7 @@
                     int end= Math.min(regionEnd, pEnd);
                     int length= Math.max(end - start, 0);
                     StyleRange styleRange= new StyleRange(start, length, null, null);
-                    ((ITextStyleStrategy)pp.fPaintingStrategy).applyTextStyle(styleRange, pp.fColor);
+                    (cast(ITextStyleStrategy)pp.fPaintingStrategy).applyTextStyle(styleRange, pp.fColor);
                     tp.mergeStyleRange(styleRange);
                 }
             }
@@ -1092,7 +1092,7 @@
      * @see dwtx.jface.text.source.IAnnotationModelListener#modelChanged(dwtx.jface.text.source.IAnnotationModel)
      */
     public synchronized void modelChanged(final IAnnotationModel model) {
-        if (DEBUG)
+        if cast(DEBUG)
             System.err.println("AP: OLD API of AnnotationModelListener called"); //$NON-NLS-1$
 
         modelChanged(new AnnotationModelEvent(model));
@@ -1435,23 +1435,23 @@
         for (Iterator e = decorations.iterator(); e.hasNext();) {
             Map.Entry entry= (Map.Entry)e.next();
             
-            Annotation a= (Annotation)entry.getKey();
-            Decoration pp = (Decoration)entry.getValue();
+            Annotation a= cast(Annotation)entry.getKey();
+            Decoration pp = cast(Decoration)entry.getValue();
             // prune any annotation that is not drawable or does not need drawing
             if (!(a.isMarkedDeleted() || skip(a) || !pp.fPosition.overlapsWith(vOffset, vLength))) {
                 // ensure sized appropriately
                 for (int i= toBeDrawn.size(); i <= pp.fLayer; i++)
                     toBeDrawn.add(new LinkedList());
-                ((List) toBeDrawn.get(pp.fLayer)).add(entry);
+                (cast(List) toBeDrawn.get(pp.fLayer)).add(entry);
             }
         }
         IDocument document= fSourceViewer.getDocument();
         for (Iterator it= toBeDrawn.iterator(); it.hasNext();) {
-            List layer= (List) it.next();
+            List layer= cast(List) it.next();
             for (Iterator e = layer.iterator(); e.hasNext();) {
                 Map.Entry entry= (Map.Entry)e.next();
-                Annotation a= (Annotation)entry.getKey();
-                Decoration pp = (Decoration)entry.getValue();
+                Annotation a= cast(Annotation)entry.getKey();
+                Decoration pp = cast(Decoration)entry.getValue();
                 drawDecoration(pp, gc, a, clippingRegion, document);
             }
         }
@@ -1464,7 +1464,7 @@
         if (!(pp.fPaintingStrategy instanceof IDrawingStrategy))
             return;
 
-        IDrawingStrategy drawingStrategy= (IDrawingStrategy)pp.fPaintingStrategy;
+        IDrawingStrategy drawingStrategy= cast(IDrawingStrategy)pp.fPaintingStrategy;
 
         int clippingOffset= clippingRegion.getOffset();
         int clippingLength= clippingRegion.getLength();
@@ -1589,7 +1589,7 @@
             return null;
 
         if (fSourceViewer instanceof ITextViewerExtension5) {
-            ITextViewerExtension5 extension= (ITextViewerExtension5) fSourceViewer;
+            ITextViewerExtension5 extension= cast(ITextViewerExtension5) fSourceViewer;
             return extension.modelRange2WidgetRange(fReusableRegion);
         }
 
@@ -1619,7 +1619,7 @@
             return null;
 
         if (fSourceViewer instanceof ITextViewerExtension5) {
-            ITextViewerExtension5 extension= (ITextViewerExtension5) fSourceViewer;
+            ITextViewerExtension5 extension= cast(ITextViewerExtension5) fSourceViewer;
             return extension.widgetRange2ModelRange(new Region(offset, length));
         }
         
--- a/dwtx/jface/text/source/AnnotationRulerColumn.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/source/AnnotationRulerColumn.d	Sun Aug 24 01:46:20 2008 +0200
@@ -189,8 +189,8 @@
          * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
          */
         public int compare(Object o1, Object o2) {
-            Position p1= ((Tuple) o1).position;
-            Position p2= ((Tuple) o2).position;
+            Position p1= (cast(Tuple) o1).position;
+            Position p2= (cast(Tuple) o2).position;
             return p1.getOffset() - p2.getOffset();
         }
     }
@@ -288,7 +288,7 @@
     public this(int width, IAnnotationAccess annotationAccess) {
         fWidth= width;
         if (annotationAccess instanceof IAnnotationAccessExtension)
-            fAnnotationAccessExtension= (IAnnotationAccessExtension) annotationAccess;
+            fAnnotationAccessExtension= cast(IAnnotationAccessExtension) annotationAccess;
     }
 
     /**
@@ -479,7 +479,7 @@
 
         IAnnotationModel model= fModel;
         if (fModel instanceof IAnnotationModelExtension)
-            model= ((IAnnotationModelExtension)fModel).getAnnotationModel(SourceViewer.MODEL_ANNOTATION_MODEL);
+            model= (cast(IAnnotationModelExtension)fModel).getAnnotationModel(SourceViewer.MODEL_ANNOTATION_MODEL);
 
         if (model is null)
             return false;
@@ -500,12 +500,12 @@
 
         Iterator e;
         if (fModel instanceof IAnnotationModelExtension2)
-            e= ((IAnnotationModelExtension2)fModel).getAnnotationIterator(lineStart, lineLength + 1, true, true);
+            e= (cast(IAnnotationModelExtension2)fModel).getAnnotationIterator(lineStart, lineLength + 1, true, true);
         else
             e= model.getAnnotationIterator();
 
         while (e.hasNext()) {
-            Annotation a= (Annotation) e.next();
+            Annotation a= cast(Annotation) e.next();
 
             if (a.isMarkedDeleted())
                 continue;
@@ -677,12 +677,12 @@
         for (int layer= 0; layer < maxLayer; layer++) {
             Iterator iter;
             if (fModel instanceof IAnnotationModelExtension2)
-                iter= ((IAnnotationModelExtension2)fModel).getAnnotationIterator(topLeft, viewPort + 1, true, true);
+                iter= (cast(IAnnotationModelExtension2)fModel).getAnnotationIterator(topLeft, viewPort + 1, true, true);
             else
                 iter= fModel.getAnnotationIterator();
 
             while (iter.hasNext()) {
-                Annotation annotation= (Annotation) iter.next();
+                Annotation annotation= cast(Annotation) iter.next();
 
                 int lay= IAnnotationAccessExtension.DEFAULT_LAYER;
                 if (fAnnotationAccessExtension !is null)
@@ -751,7 +751,7 @@
         if (fModel is null || fCachedTextViewer is null)
             return;
 
-        ITextViewerExtension5 extension= (ITextViewerExtension5) fCachedTextViewer;
+        ITextViewerExtension5 extension= cast(ITextViewerExtension5) fCachedTextViewer;
 
         fScrollPos= fCachedTextWidget.getTopPixel();
         Point dimension= fCanvas.getSize();
@@ -767,12 +767,12 @@
         fCachedAnnotations.clear();
         Iterator iter;
         if (fModel instanceof IAnnotationModelExtension2)
-            iter= ((IAnnotationModelExtension2)fModel).getAnnotationIterator(vOffset, vLength + 1, true, true);
+            iter= (cast(IAnnotationModelExtension2)fModel).getAnnotationIterator(vOffset, vLength + 1, true, true);
         else
             iter= fModel.getAnnotationIterator();
 
         while (iter.hasNext()) {
-            Annotation annotation= (Annotation) iter.next();
+            Annotation annotation= cast(Annotation) iter.next();
 
             if (skip(annotation))
                 continue;
@@ -798,7 +798,7 @@
 
         for (int layer= minLayer; layer <= maxLayer; layer++) {
             for (int i= 0, n= fCachedAnnotations.size(); i < n; i++) {
-                Tuple tuple= (Tuple) fCachedAnnotations.get(i);
+                Tuple tuple= cast(Tuple) fCachedAnnotations.get(i);
                 Annotation annotation= tuple.annotation;
                 Position position= tuple.position;
 
@@ -958,7 +958,7 @@
      */
     private bool skip(Annotation annotation) {
         Object annotationType= annotation.getType();
-        Boolean allowed= (Boolean) fAllowedAnnotationTypes.get(annotationType);
+        Boolean allowed= cast(Boolean) fAllowedAnnotationTypes.get(annotationType);
         if (allowed !is null)
             return !allowed.booleanValue();
 
--- a/dwtx/jface/text/source/ChangeRulerColumn.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/source/ChangeRulerColumn.d	Sun Aug 24 01:46:20 2008 +0200
@@ -569,7 +569,7 @@
         IRegion coverage;
         
         if (fCachedTextViewer instanceof ITextViewerExtension5) {
-            ITextViewerExtension5 extension= (ITextViewerExtension5) fCachedTextViewer;
+            ITextViewerExtension5 extension= cast(ITextViewerExtension5) fCachedTextViewer;
             
             // ITextViewer.getTopIndex returns the fully visible line, but we want the partially
             // visible one
--- a/dwtx/jface/text/source/CompositeRuler.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/source/CompositeRuler.d	Sun Aug 24 01:46:20 2008 +0200
@@ -172,7 +172,7 @@
             int x= 0;
             Iterator e= fDecorators.iterator();
             while (e.hasNext()) {
-                IVerticalRulerColumn column= (IVerticalRulerColumn) e.next();
+                IVerticalRulerColumn column= cast(IVerticalRulerColumn) e.next();
                 int columnWidth= column.getWidth();
                 column.getControl().setBounds(x, 0, columnWidth, rulerHeight);
                 x += (columnWidth + fGap);
@@ -241,43 +241,43 @@
          */
         private void addListener(Class clazz, Control control, EventListener listener) {
             if (ControlListener.class.equals(clazz)) {
-                control. addControlListener((ControlListener) listener);
+                control. addControlListener(cast(ControlListener) listener);
                 return;
             }
             if (FocusListener.class.equals(clazz)) {
-                control. addFocusListener((FocusListener) listener);
+                control. addFocusListener(cast(FocusListener) listener);
                 return;
             }
             if (HelpListener.class.equals(clazz)) {
-                control. addHelpListener((HelpListener) listener);
+                control. addHelpListener(cast(HelpListener) listener);
                 return;
             }
             if (KeyListener.class.equals(clazz)) {
-                control. addKeyListener((KeyListener) listener);
+                control. addKeyListener(cast(KeyListener) listener);
                 return;
             }
             if (MouseListener.class.equals(clazz)) {
-                control. addMouseListener((MouseListener) listener);
+                control. addMouseListener(cast(MouseListener) listener);
                 return;
             }
             if (MouseMoveListener.class.equals(clazz)) {
-                control. addMouseMoveListener((MouseMoveListener) listener);
+                control. addMouseMoveListener(cast(MouseMoveListener) listener);
                 return;
             }
             if (MouseTrackListener.class.equals(clazz)) {
-                control. addMouseTrackListener((MouseTrackListener) listener);
+                control. addMouseTrackListener(cast(MouseTrackListener) listener);
                 return;
             }
             if (PaintListener.class.equals(clazz)) {
-                control. addPaintListener((PaintListener) listener);
+                control. addPaintListener(cast(PaintListener) listener);
                 return;
             }
             if (TraverseListener.class.equals(clazz)) {
-                control. addTraverseListener((TraverseListener) listener);
+                control. addTraverseListener(cast(TraverseListener) listener);
                 return;
             }
             if (DisposeListener.class.equals(clazz)) {
-                control. addDisposeListener((DisposeListener) listener);
+                control. addDisposeListener(cast(DisposeListener) listener);
                 return;
             }
         }
@@ -292,43 +292,43 @@
          */
         private void removeListener(Class clazz, Control control, EventListener listener) {
             if (ControlListener.class.equals(clazz)) {
-                control. removeControlListener((ControlListener) listener);
+                control. removeControlListener(cast(ControlListener) listener);
                 return;
             }
             if (FocusListener.class.equals(clazz)) {
-                control. removeFocusListener((FocusListener) listener);
+                control. removeFocusListener(cast(FocusListener) listener);
                 return;
             }
             if (HelpListener.class.equals(clazz)) {
-                control. removeHelpListener((HelpListener) listener);
+                control. removeHelpListener(cast(HelpListener) listener);
                 return;
             }
             if (KeyListener.class.equals(clazz)) {
-                control. removeKeyListener((KeyListener) listener);
+                control. removeKeyListener(cast(KeyListener) listener);
                 return;
             }
             if (MouseListener.class.equals(clazz)) {
-                control. removeMouseListener((MouseListener) listener);
+                control. removeMouseListener(cast(MouseListener) listener);
                 return;
             }
             if (MouseMoveListener.class.equals(clazz)) {
-                control. removeMouseMoveListener((MouseMoveListener) listener);
+                control. removeMouseMoveListener(cast(MouseMoveListener) listener);
                 return;
             }
             if (MouseTrackListener.class.equals(clazz)) {
-                control. removeMouseTrackListener((MouseTrackListener) listener);
+                control. removeMouseTrackListener(cast(MouseTrackListener) listener);
                 return;
             }
             if (PaintListener.class.equals(clazz)) {
-                control. removePaintListener((PaintListener) listener);
+                control. removePaintListener(cast(PaintListener) listener);
                 return;
             }
             if (TraverseListener.class.equals(clazz)) {
-                control. removeTraverseListener((TraverseListener) listener);
+                control. removeTraverseListener(cast(TraverseListener) listener);
                 return;
             }
             if (DisposeListener.class.equals(clazz)) {
-                control. removeDisposeListener((DisposeListener) listener);
+                control. removeDisposeListener(cast(DisposeListener) listener);
                 return;
             }
         }
@@ -363,7 +363,7 @@
         private void removeListener(Class clazz, EventListener listener) {
             int length= fCachedListeners.size();
             for (int i= 0; i < length; i++) {
-                ListenerInfo info= (ListenerInfo) fCachedListeners.get(i);
+                ListenerInfo info= cast(ListenerInfo) fCachedListeners.get(i);
                 if (listener is info.fListener && clazz.equals(info.fClass)) {
                     fCachedListeners.remove(i);
                     break;
@@ -386,7 +386,7 @@
             if (child !is null && !child.isDisposed()) {
                 int length= fCachedListeners.size();
                 for (int i= 0; i < length; i++) {
-                    ListenerInfo info= (ListenerInfo) fCachedListeners.get(i);
+                    ListenerInfo info= cast(ListenerInfo) fCachedListeners.get(i);
                     addListener(info.fClass, child, info.fListener);
                 }
                 child.addListener(DWT.MenuDetect, fMenuDetectListener);
@@ -402,7 +402,7 @@
             if (child !is null && !child.isDisposed()) {
                 int length= fCachedListeners.size();
                 for (int i= 0; i < length; i++) {
-                    ListenerInfo info= (ListenerInfo) fCachedListeners.get(i);
+                    ListenerInfo info= cast(ListenerInfo) fCachedListeners.get(i);
                     removeListener(info.fClass, child, info.fListener);
                 }
                 child.removeListener(DWT.MenuDetect, fMenuDetectListener);
@@ -635,7 +635,7 @@
      * @param index the index
      */
     public void removeDecorator(int index) {
-        IVerticalRulerColumn rulerColumn= (IVerticalRulerColumn) fDecorators.get(index);
+        IVerticalRulerColumn rulerColumn= cast(IVerticalRulerColumn) fDecorators.get(index);
         removeDecorator(rulerColumn);
     }
 
@@ -666,12 +666,12 @@
         Control parent= fTextViewer.getTextWidget();
 
         if (fTextViewer instanceof ITextViewerExtension) {
-            ITextViewerExtension extension= (ITextViewerExtension) fTextViewer;
+            ITextViewerExtension extension= cast(ITextViewerExtension) fTextViewer;
             parent= extension.getControl();
         }
 
         if (parent instanceof Composite && !parent.isDisposed())
-            ((Composite) parent).layout(true);
+            (cast(Composite) parent).layout(true);
     }
 
     /*
@@ -693,7 +693,7 @@
 
         Iterator iter= fDecorators.iterator();
         while (iter.hasNext()) {
-            IVerticalRulerColumn column= (IVerticalRulerColumn) iter.next();
+            IVerticalRulerColumn column= cast(IVerticalRulerColumn) iter.next();
             column.createControl(this, fComposite);
             fComposite.childAdded(column.getControl());
         }
@@ -710,7 +710,7 @@
 
         Iterator e= fDecorators.iterator();
         while (e.hasNext()) {
-            IVerticalRulerColumn column= (IVerticalRulerColumn) e.next();
+            IVerticalRulerColumn column= cast(IVerticalRulerColumn) e.next();
             column.setModel(model);
         }
     }
@@ -746,7 +746,7 @@
     public void immediateUpdate() {
         Iterator e= fDecorators.iterator();
         while (e.hasNext()) {
-            IVerticalRulerColumn column= (IVerticalRulerColumn) e.next();
+            IVerticalRulerColumn column= cast(IVerticalRulerColumn) e.next();
             column.redraw();
         }
     }
@@ -757,7 +757,7 @@
     public void setFont(Font font) {
         Iterator e= fDecorators.iterator();
         while (e.hasNext()) {
-            IVerticalRulerColumn column= (IVerticalRulerColumn) e.next();
+            IVerticalRulerColumn column= cast(IVerticalRulerColumn) e.next();
             column.setFont(font);
         }
     }
@@ -769,7 +769,7 @@
         int width= 0;
         Iterator e= fDecorators.iterator();
         while (e.hasNext()) {
-            IVerticalRulerColumn column= (IVerticalRulerColumn) e.next();
+            IVerticalRulerColumn column= cast(IVerticalRulerColumn) e.next();
             width += (column.getWidth() + fGap);
         }
         return Math.max(0, width - fGap);
@@ -817,7 +817,7 @@
     protected final static int widgetLine2ModelLine(ITextViewer viewer, int widgetLine) {
 
         if (viewer instanceof ITextViewerExtension5) {
-            ITextViewerExtension5 extension= (ITextViewerExtension5) viewer;
+            ITextViewerExtension5 extension= cast(ITextViewerExtension5) viewer;
             return extension.widgetLine2ModelLine(widgetLine);
         }
 
@@ -895,7 +895,7 @@
     public void fireAnnotationSelected(VerticalRulerEvent event) {
         // forward to listeners
         for (Iterator it= fAnnotationListeners.iterator(); it.hasNext();) {
-            IVerticalRulerListener listener= (IVerticalRulerListener) it.next();
+            IVerticalRulerListener listener= cast(IVerticalRulerListener) it.next();
             listener.annotationSelected(event);
         }
     }
@@ -911,7 +911,7 @@
     public void fireAnnotationDefaultSelected(VerticalRulerEvent event) {
         // forward to listeners
         for (Iterator it= fAnnotationListeners.iterator(); it.hasNext();) {
-            IVerticalRulerListener listener= (IVerticalRulerListener) it.next();
+            IVerticalRulerListener listener= cast(IVerticalRulerListener) it.next();
             listener.annotationDefaultSelected(event);
         }
     }
@@ -928,7 +928,7 @@
     public void fireAnnotationContextMenuAboutToShow(VerticalRulerEvent event, Menu menu) {
         // forward to listeners
         for (Iterator it= fAnnotationListeners.iterator(); it.hasNext();) {
-            IVerticalRulerListener listener= (IVerticalRulerListener) it.next();
+            IVerticalRulerListener listener= cast(IVerticalRulerListener) it.next();
             listener.annotationContextMenuAboutToShow(event, menu);
         }
     }
--- a/dwtx/jface/text/source/ContentAssistantFacade.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/source/ContentAssistantFacade.d	Sun Aug 24 01:46:20 2008 +0200
@@ -126,7 +126,7 @@
     public IHandler getHandler(String commandId) {
         if (fContentAssistant is null)
             throw new IllegalStateException();
-        return ((IContentAssistantExtension4)fContentAssistant).getHandler(commandId);
+        return (cast(IContentAssistantExtension4)fContentAssistant).getHandler(commandId);
     }
 
     /**
@@ -140,7 +140,7 @@
     public void addCompletionListener(ICompletionListener listener) {
         if (fContentAssistant is null)
             throw new IllegalStateException();
-        ((IContentAssistantExtension2)fContentAssistant).addCompletionListener(listener);
+        (cast(IContentAssistantExtension2)fContentAssistant).addCompletionListener(listener);
     }
 
     /**
@@ -151,7 +151,7 @@
      *             uninstalled
      */
     public void removeCompletionListener(ICompletionListener listener) {
-        ((IContentAssistantExtension2)fContentAssistant).removeCompletionListener(listener);
+        (cast(IContentAssistantExtension2)fContentAssistant).removeCompletionListener(listener);
     }
 
 }
--- a/dwtx/jface/text/source/DefaultAnnotationHover.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/source/DefaultAnnotationHover.d	Sun Aug 24 01:46:20 2008 +0200
@@ -133,7 +133,7 @@
             if (javaAnnotations.size() is 1) {
                 
                 // optimization
-                Annotation annotation= (Annotation) javaAnnotations.get(0);
+                Annotation annotation= cast(Annotation) javaAnnotations.get(0);
                 String message= annotation.getText();
                 if (message !is null && message.trim().length() > 0)
                     return formatSingleMessage(message);
@@ -144,14 +144,14 @@
                 
                 Iterator e= javaAnnotations.iterator();
                 while (e.hasNext()) {
-                    Annotation annotation= (Annotation) e.next();
+                    Annotation annotation= cast(Annotation) e.next();
                     String message= annotation.getText();
                     if (message !is null && message.trim().length() > 0)
                         messages.add(message.trim());
                 }
                 
                 if (messages.size() is 1)
-                    return formatSingleMessage((String)messages.get(0));
+                    return formatSingleMessage(cast(String)messages.get(0));
                 
                 if (messages.size() > 1)
                     return formatMultipleMessages(messages);
@@ -206,7 +206,7 @@
         Iterator e= messages.iterator();
         while (e.hasNext()) {
             buffer.append('\n');
-            String listItemText= (String) e.next();
+            String listItemText= cast(String) e.next();
             buffer.append(JFaceTextMessages.getFormattedString("DefaultAnnotationHover.listItem", new String[] { listItemText })); //$NON-NLS-1$
         }
         return buffer.toString();
@@ -224,7 +224,7 @@
     
     private IAnnotationModel getAnnotationModel(ISourceViewer viewer) {
         if (viewer instanceof ISourceViewerExtension2) {
-            ISourceViewerExtension2 extension= (ISourceViewerExtension2) viewer;
+            ISourceViewerExtension2 extension= cast(ISourceViewerExtension2) viewer;
             return extension.getVisualAnnotationModel();
         }
         return viewer.getAnnotationModel();
@@ -237,7 +237,7 @@
                 return true;
             
             if (value instanceof List) {
-                List messages= (List)value;
+                List messages= cast(List)value;
                 if  (messages.contains(message))
                     return true;
 
@@ -272,7 +272,7 @@
         Iterator iterator= model.getAnnotationIterator();
         
         while (iterator.hasNext()) {
-            Annotation annotation= (Annotation) iterator.next();
+            Annotation annotation= cast(Annotation) iterator.next();
             
             Position position= model.getPosition(annotation);
             if (position is null)
@@ -282,10 +282,10 @@
                 continue;
             
             if (annotation instanceof AnnotationBag) {
-                AnnotationBag bag= (AnnotationBag) annotation;
+                AnnotationBag bag= cast(AnnotationBag) annotation;
                 Iterator e= bag.iterator();
                 while (e.hasNext()) {
-                    annotation= (Annotation) e.next();
+                    annotation= cast(Annotation) e.next();
                     position= model.getPosition(annotation);
                     if (position !is null && includeAnnotation(annotation, position, messagesAtPosition))
                         javaAnnotations.add(annotation);
--- a/dwtx/jface/text/source/LineChangeHover.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/source/LineChangeHover.d	Sun Aug 24 01:46:20 2008 +0200
@@ -185,7 +185,7 @@
         String text= ""; //$NON-NLS-1$
         int added= 0;
         for (Iterator it= diffInfos.iterator(); it.hasNext();) {
-            ILineDiffInfo info= (ILineDiffInfo)it.next();
+            ILineDiffInfo info= cast(ILineDiffInfo)it.next();
             String[] original= info.getOriginalText();
             int type= info.getChangeType();
             int i= 0;
@@ -240,14 +240,14 @@
             return null;
 
         if (model instanceof IAnnotationModelExtension) {
-            IAnnotationModel diffModel= ((IAnnotationModelExtension)model).getAnnotationModel(IChangeRulerColumn.QUICK_DIFF_MODEL_ID);
+            IAnnotationModel diffModel= (cast(IAnnotationModelExtension)model).getAnnotationModel(IChangeRulerColumn.QUICK_DIFF_MODEL_ID);
             if (diffModel !is null)
                 model= diffModel;
         }
         if (model instanceof ILineDiffer) {
-            if (model instanceof ILineDifferExtension2 && ((ILineDifferExtension2)model).isSuspended())
+            if (model instanceof ILineDifferExtension2 && (cast(ILineDifferExtension2)model).isSuspended())
                 return null;
-            return (ILineDiffer)model;
+            return cast(ILineDiffer)model;
         }
         return null;
     }
@@ -388,7 +388,7 @@
     public IInformationControlCreator getInformationPresenterControlCreator() {
         return new IInformationControlCreator() {
             public IInformationControl createInformationControl(Shell parent) {
-                return new DefaultInformationControl(parent, (ToolBarManager)null, null);
+                return new DefaultInformationControl(parent, cast(ToolBarManager)null, null);
             }
         };
     }
--- a/dwtx/jface/text/source/LineNumberRulerColumn.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/source/LineNumberRulerColumn.d	Sun Aug 24 01:46:20 2008 +0200
@@ -235,7 +235,7 @@
                 int lineNumber= fParentRuler.getLineOfLastMouseButtonActivity();
                 if (expandExistingSelection && fCachedTextViewer instanceof ITextViewerExtension5
                         && fCachedTextViewer.getTextWidget() !is null) {
-                    ITextViewerExtension5 extension5= ((ITextViewerExtension5)fCachedTextViewer);
+                    ITextViewerExtension5 extension5= (cast(ITextViewerExtension5)fCachedTextViewer);
                     // Find model curosr position
                     int widgetCaret= fCachedTextViewer.getTextWidget().getCaretOffset();
                     int modelCaret= extension5.widgetOffset2ModelOffset(widgetCaret);
@@ -300,7 +300,7 @@
 
                         // Convert to model offset
                         if (fCachedTextViewer instanceof ITextViewerExtension5) {
-                            ITextViewerExtension5 extension= (ITextViewerExtension5)fCachedTextViewer;
+                            ITextViewerExtension5 extension= cast(ITextViewerExtension5)fCachedTextViewer;
                             offset= extension.widgetOffset2ModelOffset(widgetOffset);
                         } else
                             offset= widgetOffset + fCachedTextViewer.getVisibleRegion().getOffset();
@@ -311,7 +311,7 @@
                         // Convert to widget offset
                         int lineEndWidgetOffset;
                         if (fCachedTextViewer instanceof ITextViewerExtension5) {
-                            ITextViewerExtension5 extension= (ITextViewerExtension5)fCachedTextViewer;
+                            ITextViewerExtension5 extension= cast(ITextViewerExtension5)fCachedTextViewer;
                             lineEndWidgetOffset= extension.modelOffset2WidgetOffset(lineEndOffset);
                         } else
                             lineEndWidgetOffset= lineEndOffset - fCachedTextViewer.getVisibleRegion().getOffset();
@@ -597,10 +597,10 @@
 
         fRelayoutRequired= false;
         if (fCachedTextViewer instanceof ITextViewerExtension) {
-            ITextViewerExtension extension= (ITextViewerExtension) fCachedTextViewer;
+            ITextViewerExtension extension= cast(ITextViewerExtension) fCachedTextViewer;
             Control control= extension.getControl();
             if (control instanceof Composite && !control.isDisposed()) {
-                Composite composite= (Composite) control;
+                Composite composite= cast(Composite) control;
                 composite.layout(true);
             }
         }
--- a/dwtx/jface/text/source/MatchingCharacterPainter.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/source/MatchingCharacterPainter.d	Sun Aug 24 01:46:20 2008 +0200
@@ -200,7 +200,7 @@
             return;
 
         if (fSourceViewer instanceof ITextViewerExtension5) {
-            ITextViewerExtension5 extension= (ITextViewerExtension5) fSourceViewer;
+            ITextViewerExtension5 extension= cast(ITextViewerExtension5) fSourceViewer;
             IRegion widgetRange= extension.modelRange2WidgetRange(new Region(offset, length));
             if (widgetRange is null)
                 return;
--- a/dwtx/jface/text/source/OverviewRuler.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/source/OverviewRuler.d	Sun Aug 24 01:46:20 2008 +0200
@@ -246,7 +246,7 @@
             bool ignr= (fStyle & IGNORE_BAGS) !is 0;
 
             while (fIterator.hasNext()) {
-                Annotation next= (Annotation) fIterator.next();
+                Annotation next= cast(Annotation) fIterator.next();
 
                 if (next.isMarkedDeleted())
                     continue;
@@ -267,7 +267,7 @@
 
         private bool isSubtype(Object annotationType) {
             if (fAnnotationAccess instanceof  IAnnotationAccessExtension) {
-                IAnnotationAccessExtension extension= (IAnnotationAccessExtension) fAnnotationAccess;
+                IAnnotationAccessExtension extension= cast(IAnnotationAccessExtension) fAnnotationAccess;
                 return extension.isSubtype(annotationType, fType);
             }
             return fType.equals(annotationType);
@@ -693,7 +693,7 @@
 
                 for (int i= 0; e.hasNext(); i++) {
 
-                    Annotation a= (Annotation) e.next();
+                    Annotation a= cast(Annotation) e.next();
                     Position p= fModel.getPosition(a);
 
                     if (p is null || !p.overlapsWith(visible.getOffset(), visible.getLength()))
@@ -704,7 +704,7 @@
                     int annotationLength= annotationEnd - annotationOffset;
 
                     try {
-                        if (ANNOTATION_HEIGHT_SCALABLE) {
+                        if cast(ANNOTATION_HEIGHT_SCALABLE) {
                             int numbersOfLines= document.getNumberOfLines(annotationOffset, annotationLength);
                             // don't count empty trailing lines
                             IRegion lastLine= document.getLineInformationOfOffset(annotationOffset + annotationLength);
@@ -747,7 +747,7 @@
         if (fModel !is null) {
             Iterator iter= fModel.getAnnotationIterator();
             while (iter.hasNext()) {
-                Annotation annotation= (Annotation) iter.next();
+                Annotation annotation= cast(Annotation) iter.next();
 
                 if (annotation.isMarkedDeleted())
                     continue;
@@ -771,7 +771,7 @@
         Rectangle r= new Rectangle(0, 0, 0, 0);
         int yy, hh= ANNOTATION_HEIGHT;
 
-        ITextViewerExtension5 extension= (ITextViewerExtension5) fTextViewer;
+        ITextViewerExtension5 extension= cast(ITextViewerExtension5) fTextViewer;
         IDocument document= fTextViewer.getDocument();
         StyledText textWidget= fTextViewer.getTextWidget();
 
@@ -796,7 +796,7 @@
 
                 for (int i= 0; e.hasNext(); i++) {
 
-                    Annotation a= (Annotation) e.next();
+                    Annotation a= cast(Annotation) e.next();
                     Position p= fModel.getPosition(a);
 
                     if (p is null)
@@ -807,7 +807,7 @@
                         continue;
 
                     try {
-                        if (ANNOTATION_HEIGHT_SCALABLE) {
+                        if cast(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());
@@ -909,7 +909,7 @@
         lines[1]= (pixel1 * maxLines) / rulerLength;
 
         if (fTextViewer instanceof ITextViewerExtension5) {
-            ITextViewerExtension5 extension= (ITextViewerExtension5) fTextViewer;
+            ITextViewerExtension5 extension= cast(ITextViewerExtension5) fTextViewer;
             lines[0]= extension.widgetLine2ModelLine(lines[0]);
             lines[1]= extension.widgetLine2ModelLine(lines[1]);
         } else {
@@ -952,7 +952,7 @@
 
                 Iterator e= new FilterIterator(annotationType, FilterIterator.PERSISTENT | FilterIterator.TEMPORARY);
                 while (e.hasNext() && found is null) {
-                    Annotation a= (Annotation) e.next();
+                    Annotation a= cast(Annotation) e.next();
                     if (a.isMarkedDeleted())
                         continue;
 
@@ -1074,7 +1074,7 @@
         if (layer >= 0) {
             int i= 0;
             int size= fLayersSortedByLayer.size();
-            while (i < size && layer >= ((Integer)fLayersSortedByLayer.get(i)).intValue())
+            while (i < size && layer >= (cast(Integer)fLayersSortedByLayer.get(i)).intValue())
                 i++;
             Integer layerObj= new Integer(layer);
             fLayersSortedByLayer.add(i, layerObj);
@@ -1126,7 +1126,7 @@
      * @since 3.0
      */
     private bool contains(Object annotationType, Map allowed, Set configured) {
-        Boolean cached= (Boolean) allowed.get(annotationType);
+        Boolean cached= cast(Boolean) allowed.get(annotationType);
         if (cached !is null)
             return cached.booleanValue();
 
@@ -1148,7 +1148,7 @@
      */
     private bool isCovered(Object annotationType, Set configured) {
         if (fAnnotationAccess instanceof IAnnotationAccessExtension) {
-            IAnnotationAccessExtension extension= (IAnnotationAccessExtension) fAnnotationAccess;
+            IAnnotationAccessExtension extension= cast(IAnnotationAccessExtension) fAnnotationAccess;
             Iterator e= configured.iterator();
             while (e.hasNext()) {
                 if (extension.isSubtype(annotationType,e.next()))
@@ -1170,9 +1170,9 @@
      */
     private static RGB interpolate(RGB fg, RGB bg, double scale) {
         return new RGB(
-            (int) ((1.0-scale) * fg.red + scale * bg.red),
-            (int) ((1.0-scale) * fg.green + scale * bg.green),
-            (int) ((1.0-scale) * fg.blue + scale * bg.blue)
+            cast(int) ((1.0-scale) * fg.red + scale * bg.red),
+            cast(int) ((1.0-scale) * fg.green + scale * bg.green),
+            cast(int) ((1.0-scale) * fg.blue + scale * bg.blue)
         );
     }
 
@@ -1231,16 +1231,16 @@
      * @since 3.0
      */
     private Color findColor(Object annotationType) {
-        Color color= (Color) fAnnotationTypes2Colors.get(annotationType);
+        Color color= cast(Color) fAnnotationTypes2Colors.get(annotationType);
         if (color !is null)
             return color;
 
         if (fAnnotationAccess instanceof IAnnotationAccessExtension) {
-            IAnnotationAccessExtension extension= (IAnnotationAccessExtension) fAnnotationAccess;
+            IAnnotationAccessExtension extension= cast(IAnnotationAccessExtension) fAnnotationAccess;
             Object[] superTypes= extension.getSupertypes(annotationType);
             if (superTypes !is null) {
                 for (int i= 0; i < superTypes.length; i++) {
-                    color= (Color) fAnnotationTypes2Colors.get(superTypes[i]);
+                    color= cast(Color) fAnnotationTypes2Colors.get(superTypes[i]);
                     if (color !is null)
                         return color;
                 }
@@ -1407,10 +1407,10 @@
 
             Iterator e= new FilterIterator(annotationType, FilterIterator.PERSISTENT | FilterIterator.TEMPORARY | FilterIterator.IGNORE_BAGS, fCachedAnnotations.iterator());
             while (e.hasNext()) {
-                Annotation annotation= (Annotation)e.next();
+                Annotation annotation= cast(Annotation)e.next();
                 if (annotation !is null) {
                     if (annotationTypeLabel is null)
-                        annotationTypeLabel= ((IAnnotationAccessExtension)fAnnotationAccess).getTypeLabel(annotation);
+                        annotationTypeLabel= (cast(IAnnotationAccessExtension)fAnnotationAccess).getTypeLabel(annotation);
                     count++;
                 }
             }
--- a/dwtx/jface/text/source/OverviewRulerHoverManager.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/source/OverviewRulerHoverManager.d	Sun Aug 24 01:46:20 2008 +0200
@@ -124,7 +124,7 @@
         
         IInformationControlCreator controlCreator= null;
         if (hover instanceof IAnnotationHoverExtension)
-            controlCreator= ((IAnnotationHoverExtension)hover).getHoverControlCreator();
+            controlCreator= (cast(IAnnotationHoverExtension)hover).getHoverControlCreator();
         setCustomInformationControlCreator(controlCreator);
         
         setInformation(hover.getHoverInfo(getSourceViewer(), line), computeArea(location.y));
@@ -138,7 +138,7 @@
      */
     private Rectangle computeArea(int y) {
         // This is OK (see constructor)
-        IOverviewRuler overviewRuler= (IOverviewRuler) getVerticalRulerInfo();
+        IOverviewRuler overviewRuler= cast(IOverviewRuler) getVerticalRulerInfo();
 
         int hover_height= overviewRuler.getAnnotationHeight();
         int hover_width= getVerticalRulerInfo().getControl().getSize().x;
--- a/dwtx/jface/text/source/SourceViewer.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/source/SourceViewer.d	Sun Aug 24 01:46:20 2008 +0200
@@ -571,7 +571,7 @@
     protected IAnnotationModel createVisualAnnotationModel(IAnnotationModel annotationModel) {
         IAnnotationModelExtension model= new AnnotationModel();
         model.addAnnotationModel(MODEL_ANNOTATION_MODEL, annotationModel);
-        return (IAnnotationModel) model;
+        return cast(IAnnotationModel) model;
     }
 
     /**
@@ -585,7 +585,7 @@
                 fVisualAnnotationModel.disconnect(getDocument());
         
             if ( fVisualAnnotationModel instanceof IAnnotationModelExtension)
-                ((IAnnotationModelExtension)fVisualAnnotationModel).removeAnnotationModel(MODEL_ANNOTATION_MODEL);
+                (cast(IAnnotationModelExtension)fVisualAnnotationModel).removeAnnotationModel(MODEL_ANNOTATION_MODEL);
             
             fVisualAnnotationModel= null;
         }
@@ -619,7 +619,7 @@
      */
     public IAnnotationModel getAnnotationModel() {
         if (fVisualAnnotationModel instanceof IAnnotationModelExtension) {
-            IAnnotationModelExtension extension= (IAnnotationModelExtension) fVisualAnnotationModel;
+            IAnnotationModelExtension extension= cast(IAnnotationModelExtension) fVisualAnnotationModel;
             return extension.getAnnotationModel(MODEL_ANNOTATION_MODEL);
         }
         return null;
@@ -826,7 +826,7 @@
         if (!fSelections.isEmpty()) {
 
             final IDocument document= getDocument();
-            final Position position= (Position) fSelections.pop();
+            final Position position= cast(Position) fSelections.pop();
 
             try {
                 document.removePosition(fSelectionCategory, position);
@@ -891,7 +891,7 @@
                     DocumentRewriteSession rewriteSession= null;
 
                     if (document instanceof IDocumentExtension4) {
-                        IDocumentExtension4 extension= (IDocumentExtension4) document;
+                        IDocumentExtension4 extension= cast(IDocumentExtension4) document;
                         DocumentRewriteSessionType type= selection.y is 0 || selection.y > 1000 ? DocumentRewriteSessionType.SEQUENTIAL : DocumentRewriteSessionType.UNRESTRICTED_SMALL;
                         rewriteSession= extension.startRewriteSession(type);
                     } else {
@@ -906,7 +906,7 @@
                         try {
 
                             if (fContentFormatter instanceof IContentFormatterExtension) {
-                                final IContentFormatterExtension extension= (IContentFormatterExtension) fContentFormatter;
+                                final IContentFormatterExtension extension= cast(IContentFormatterExtension) fContentFormatter;
                                 context= createFormattingContext();
                                 if (selection.y is 0) {
                                     context.setProperty(FormattingContextProperties.CONTEXT_DOCUMENT, Boolean.TRUE);
@@ -939,7 +939,7 @@
                     } finally {
 
                         if (document instanceof IDocumentExtension4) {
-                            IDocumentExtension4 extension= (IDocumentExtension4) document;
+                            IDocumentExtension4 extension= cast(IDocumentExtension4) document;
                             extension.stopRewriteSession(rewriteSession);
                         } else {
                             target.endCompoundChange();
@@ -967,12 +967,12 @@
     protected void updateSlaveDocuments(IDocument masterDocument) {
         ISlaveDocumentManager manager= getSlaveDocumentManager();
         if (manager instanceof ISlaveDocumentManagerExtension) {
-            ISlaveDocumentManagerExtension extension= (ISlaveDocumentManagerExtension) manager;
+            ISlaveDocumentManagerExtension extension= cast(ISlaveDocumentManagerExtension) manager;
             IDocument[] slaves= extension.getSlaveDocuments(masterDocument);
             if (slaves !is null) {
                 for (int i= 0; i < slaves.length; i++) {
                     if (slaves[i] instanceof ChildDocument) {
-                        ChildDocument child= (ChildDocument) slaves[i];
+                        ChildDocument child= cast(ChildDocument) slaves[i];
                         Position p= child.getParentDocumentRange();
                         try {
 
@@ -1048,7 +1048,7 @@
         }
 
         if (fRangeIndicator !is null && fVisualAnnotationModel instanceof IAnnotationModelExtension) {
-            IAnnotationModelExtension extension= (IAnnotationModelExtension) fVisualAnnotationModel;
+            IAnnotationModelExtension extension= cast(IAnnotationModelExtension) fVisualAnnotationModel;
             extension.modifyAnnotationPosition(fRangeIndicator, new Position(start, length));
         }
     }
@@ -1103,7 +1103,7 @@
             return true;
         
         if (fVerticalRuler instanceof CompositeRuler) {
-            Iterator iter= ((CompositeRuler)fVerticalRuler).getDecoratorIterator();
+            Iterator iter= (cast(CompositeRuler)fVerticalRuler).getDecoratorIterator();
             return iter.hasNext() && iter.next() instanceof AnnotationRulerColumn && !iter.hasNext();
         }
         return false;
--- a/dwtx/jface/text/source/VerticalRuler.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/source/VerticalRuler.d	Sun Aug 24 01:46:20 2008 +0200
@@ -343,7 +343,7 @@
 
         IAnnotationAccessExtension annotationAccessExtension= null;
         if (fAnnotationAccess instanceof IAnnotationAccessExtension)
-            annotationAccessExtension= (IAnnotationAccessExtension) fAnnotationAccess;
+            annotationAccessExtension= cast(IAnnotationAccessExtension) fAnnotationAccess;
 
         StyledText styledText= fTextViewer.getTextWidget();
         IDocument doc= fTextViewer.getDocument();
@@ -372,13 +372,13 @@
             Iterator iter= fModel.getAnnotationIterator();
             while (iter.hasNext()) {
                 IAnnotationPresentation annotationPresentation= null;
-                Annotation annotation= (Annotation) iter.next();
+                Annotation annotation= cast(Annotation) iter.next();
 
                 int lay= IAnnotationAccessExtension.DEFAULT_LAYER;
                 if (annotationAccessExtension !is null)
                     lay= annotationAccessExtension.getLayer(annotation);
                 else if (annotation instanceof IAnnotationPresentation) {
-                    annotationPresentation= (IAnnotationPresentation)annotation;
+                    annotationPresentation= cast(IAnnotationPresentation)annotation;
                     lay= annotationPresentation.getLayer();
                 }
                 maxLayer= Math.max(maxLayer, lay+1);    // dynamically update layer maximum
@@ -443,9 +443,9 @@
 
         IAnnotationAccessExtension annotationAccessExtension= null;
         if (fAnnotationAccess instanceof IAnnotationAccessExtension)
-            annotationAccessExtension= (IAnnotationAccessExtension) fAnnotationAccess;
+            annotationAccessExtension= cast(IAnnotationAccessExtension) fAnnotationAccess;
 
-        ITextViewerExtension5 extension= (ITextViewerExtension5) fTextViewer;
+        ITextViewerExtension5 extension= cast(ITextViewerExtension5) fTextViewer;
         StyledText textWidget= fTextViewer.getTextWidget();
 
         fScrollPos= textWidget.getTopPixel();
@@ -459,13 +459,13 @@
             Iterator iter= fModel.getAnnotationIterator();
             while (iter.hasNext()) {
                 IAnnotationPresentation annotationPresentation= null;
-                Annotation annotation= (Annotation) iter.next();
+                Annotation annotation= cast(Annotation) iter.next();
 
                 int lay= IAnnotationAccessExtension.DEFAULT_LAYER;
                 if (annotationAccessExtension !is null)
                     lay= annotationAccessExtension.getLayer(annotation);
                 else if (annotation instanceof IAnnotationPresentation) {
-                    annotationPresentation= (IAnnotationPresentation)annotation;
+                    annotationPresentation= cast(IAnnotationPresentation)annotation;
                     lay= annotationPresentation.getLayer();
                 }
                 maxLayer= Math.max(maxLayer, lay+1);    // dynamically update layer maximum
@@ -607,7 +607,7 @@
     protected final static int widgetLine2ModelLine(ITextViewer viewer, int widgetLine) {
 
         if (viewer instanceof ITextViewerExtension5) {
-            ITextViewerExtension5 extension= (ITextViewerExtension5) viewer;
+            ITextViewerExtension5 extension= cast(ITextViewerExtension5) viewer;
             return extension.widgetLine2ModelLine(widgetLine);
         }
 
--- a/dwtx/jface/text/source/VisualAnnotationModel.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/source/VisualAnnotationModel.d	Sun Aug 24 01:46:20 2008 +0200
@@ -176,7 +176,7 @@
      */
     public Position getPosition(Annotation annotation) {
 
-        Position p= (Position) getAnnotationMap().get(annotation);
+        Position p= cast(Position) getAnnotationMap().get(annotation);
         if (p !is null)
             return p;
 
@@ -193,7 +193,7 @@
         if (model is fModel) {
             Iterator iter= new ArrayList(fAnnotationModelListeners).iterator();
             while (iter.hasNext()) {
-                IAnnotationModelListener l= (IAnnotationModelListener)iter.next();
+                IAnnotationModelListener l= cast(IAnnotationModelListener)iter.next();
                 l.modelChanged(this);
             }
         }
--- a/dwtx/jface/text/source/projection/ProjectionAnnotationHover.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/source/projection/ProjectionAnnotationHover.d	Sun Aug 24 01:46:20 2008 +0200
@@ -92,7 +92,7 @@
             try {
                 int captionOffset;
                 if (position instanceof IProjectionPosition)
-                    captionOffset= ((IProjectionPosition) position).computeCaptionOffset(document);
+                    captionOffset= (cast(IProjectionPosition) position).computeCaptionOffset(document);
                 else
                     captionOffset= 0;
                 int startLine= document.getLineOfOffset(position.getOffset() + captionOffset);
@@ -107,10 +107,10 @@
 
         IAnnotationModel model= null;
         if (viewer instanceof ISourceViewerExtension2) {
-            ISourceViewerExtension2 viewerExtension= (ISourceViewerExtension2) viewer;
+            ISourceViewerExtension2 viewerExtension= cast(ISourceViewerExtension2) viewer;
             IAnnotationModel visual= viewerExtension.getVisualAnnotationModel();
             if (visual instanceof IAnnotationModelExtension) {
-                IAnnotationModelExtension modelExtension= (IAnnotationModelExtension) visual;
+                IAnnotationModelExtension modelExtension= cast(IAnnotationModelExtension) visual;
                 model= modelExtension.getAnnotationModel(ProjectionSupport.PROJECTION);
             }
         }
@@ -120,7 +120,7 @@
                 IDocument document= viewer.getDocument();
                 Iterator e= model.getAnnotationIterator();
                 while (e.hasNext()) {
-                    ProjectionAnnotation annotation= (ProjectionAnnotation) e.next();
+                    ProjectionAnnotation annotation= cast(ProjectionAnnotation) e.next();
                     if (!annotation.isCollapsed())
                         continue;
 
--- a/dwtx/jface/text/source/projection/ProjectionAnnotationModel.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/source/projection/ProjectionAnnotationModel.d	Sun Aug 24 01:46:20 2008 +0200
@@ -62,7 +62,7 @@
      */
     public void collapse(Annotation annotation) {
         if (annotation instanceof ProjectionAnnotation) {
-            ProjectionAnnotation projection= (ProjectionAnnotation) annotation;
+            ProjectionAnnotation projection= cast(ProjectionAnnotation) annotation;
             if (!projection.isCollapsed()) {
                 projection.markCollapsed();
                 modifyAnnotation(projection, true);
@@ -78,7 +78,7 @@
      */
     public void expand(Annotation annotation) {
         if (annotation instanceof ProjectionAnnotation) {
-            ProjectionAnnotation projection= (ProjectionAnnotation) annotation;
+            ProjectionAnnotation projection= cast(ProjectionAnnotation) annotation;
             if (projection.isCollapsed()) {
                 projection.markExpanded();
                 modifyAnnotation(projection, true);
@@ -94,7 +94,7 @@
      */
     public void toggleExpansionState(Annotation annotation) {
         if (annotation instanceof ProjectionAnnotation) {
-            ProjectionAnnotation projection= (ProjectionAnnotation) annotation;
+            ProjectionAnnotation projection= cast(ProjectionAnnotation) annotation;
 
             if (projection.isCollapsed())
                 projection.markExpanded();
@@ -131,7 +131,7 @@
 
         Iterator iterator= getAnnotationIterator();
         while (iterator.hasNext()) {
-            ProjectionAnnotation annotation= (ProjectionAnnotation) iterator.next();
+            ProjectionAnnotation annotation= cast(ProjectionAnnotation) iterator.next();
             if (!annotation.isCollapsed()) {
                 Position position= getPosition(annotation);
                 if (position !is null && position.overlapsWith(offset, length) /* || is a delete at the boundary */ ) {
@@ -164,7 +164,7 @@
 
         Iterator iterator= getAnnotationIterator();
         while (iterator.hasNext()) {
-            ProjectionAnnotation annotation= (ProjectionAnnotation) iterator.next();
+            ProjectionAnnotation annotation= cast(ProjectionAnnotation) iterator.next();
             if (annotation.isCollapsed()) {
                 Position position= getPosition(annotation);
                 if (position !is null && position.overlapsWith(offset, length) /* || is a delete at the boundary */ ) {
--- a/dwtx/jface/text/source/projection/ProjectionRulerColumn.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/source/projection/ProjectionRulerColumn.d	Sun Aug 24 01:46:20 2008 +0200
@@ -85,7 +85,7 @@
         clearCurrentAnnotation();
         ProjectionAnnotation annotation= findAnnotation(line, true);
         if (annotation !is null) {
-            ProjectionAnnotationModel model= (ProjectionAnnotationModel) getModel();
+            ProjectionAnnotationModel model= cast(ProjectionAnnotationModel) getModel();
             model.toggleExpansionState(annotation);
         }
     }
@@ -112,7 +112,7 @@
             while (e.hasNext()) {
                 Object next= e.next();
                 if (next instanceof ProjectionAnnotation) {
-                    ProjectionAnnotation annotation= (ProjectionAnnotation) next;
+                    ProjectionAnnotation annotation= cast(ProjectionAnnotation) next;
                     Position p= model.getPosition(annotation);
                     if (p is null)
                         continue;
@@ -155,7 +155,7 @@
                     if (annotation.isCollapsed()) {
                         int captionOffset;
                         if (position instanceof IProjectionPosition)
-                            captionOffset= ((IProjectionPosition) position).computeCaptionOffset(document);
+                            captionOffset= (cast(IProjectionPosition) position).computeCaptionOffset(document);
                         else
                             captionOffset= 0;
 
@@ -227,7 +227,7 @@
      */
     public void setModel(IAnnotationModel model) {
         if (model instanceof IAnnotationModelExtension) {
-            IAnnotationModelExtension extension= (IAnnotationModelExtension) model;
+            IAnnotationModelExtension extension= cast(IAnnotationModelExtension) model;
             model= extension.getAnnotationModel(ProjectionSupport.PROJECTION);
         }
         super.setModel(model);
--- a/dwtx/jface/text/source/projection/ProjectionSummary.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/source/projection/ProjectionSummary.d	Sun Aug 24 01:46:20 2008 +0200
@@ -175,9 +175,9 @@
 
             IDocument document= fProjectionViewer.getDocument();
             if (document instanceof ISynchronizable && fAnnotationModel instanceof ISynchronizable) {
-                ISynchronizable sync= (ISynchronizable) fAnnotationModel;
+                ISynchronizable sync= cast(ISynchronizable) fAnnotationModel;
                 previousLockObject= sync.getLockObject();
-                sync.setLockObject(((ISynchronizable) document).getLockObject());
+                sync.setLockObject((cast(ISynchronizable) document).getLockObject());
             }
 
 
@@ -191,7 +191,7 @@
         } finally {
 
             if (fAnnotationModel instanceof ISynchronizable) {
-                ISynchronizable sync= (ISynchronizable) fAnnotationModel;
+                ISynchronizable sync= cast(ISynchronizable) fAnnotationModel;
                 sync.setLockObject(previousLockObject);
             }
             fAnnotationModel= null;
@@ -208,13 +208,13 @@
         List bags= null;
 
         if (fAnnotationModel instanceof IAnnotationModelExtension) {
-            extension= (IAnnotationModelExtension) fAnnotationModel;
+            extension= cast(IAnnotationModelExtension) fAnnotationModel;
             bags= new ArrayList();
         }
 
         Iterator e= fAnnotationModel.getAnnotationIterator();
         while (e.hasNext()) {
-            Annotation annotation= (Annotation) e.next();
+            Annotation annotation= cast(Annotation) e.next();
             if (annotation instanceof AnnotationBag) {
                 if (bags is null)
                     fAnnotationModel.removeAnnotation(annotation);
@@ -243,7 +243,7 @@
 
         Iterator e= model.getAnnotationIterator();
         while (e.hasNext()) {
-            ProjectionAnnotation projection= (ProjectionAnnotation) e.next();
+            ProjectionAnnotation projection= cast(ProjectionAnnotation) e.next();
             if (projection.isCollapsed()) {
                 Position position= model.getPosition(projection);
                 if (position !is null) {
@@ -262,14 +262,14 @@
 
         if (additions.size() > 0) {
             if (fAnnotationModel instanceof IAnnotationModelExtension) {
-                IAnnotationModelExtension extension= (IAnnotationModelExtension) fAnnotationModel;
+                IAnnotationModelExtension extension= cast(IAnnotationModelExtension) fAnnotationModel;
                 if (!isCanceled(monitor))
                     extension.replaceAnnotations(null, additions);
             } else {
                 Iterator e1= additions.keySet().iterator();
                 while (e1.hasNext()) {
-                    AnnotationBag bag= (AnnotationBag) e1.next();
-                    Position position= (Position) additions.get(bag);
+                    AnnotationBag bag= cast(AnnotationBag) e1.next();
+                    Position position= cast(Position) additions.get(bag);
                     if (isCanceled(monitor))
                         return;
                     fAnnotationModel.addAnnotation(bag, position);
@@ -288,7 +288,7 @@
                 size= fConfiguredAnnotationTypes.size();
                 map= new HashMap();
                 for (int i= 0; i < size; i++) {
-                    String type= (String) fConfiguredAnnotationTypes.get(i);
+                    String type= cast(String) fConfiguredAnnotationTypes.get(i);
                     map.put(type, new AnnotationBag(type));
                 }
             }
@@ -302,7 +302,7 @@
             return;
         Iterator e= model.getAnnotationIterator();
         while (e.hasNext()) {
-            Annotation annotation= (Annotation) e.next();
+            Annotation annotation= cast(Annotation) e.next();
             AnnotationBag bag= findBagForType(map, annotation.getType());
             if (bag !is null) {
                 Position position= model.getPosition(annotation);
@@ -312,19 +312,19 @@
         }
 
         for (int i= 0; i < size; i++) {
-            AnnotationBag bag= (AnnotationBag) map.get(fConfiguredAnnotationTypes.get(i));
+            AnnotationBag bag= cast(AnnotationBag) map.get(fConfiguredAnnotationTypes.get(i));
             if (!bag.isEmpty())
                 additions.put(bag, new Position(summaryAnchor.getOffset(), summaryAnchor.getLength()));
         }
     }
 
     private AnnotationBag findBagForType(Map bagMap, String annotationType) {
-        AnnotationBag bag= (AnnotationBag) bagMap.get(annotationType);
+        AnnotationBag bag= cast(AnnotationBag) bagMap.get(annotationType);
         if (bag is null && fAnnotationAccess instanceof IAnnotationAccessExtension) {
-            IAnnotationAccessExtension extension= (IAnnotationAccessExtension) fAnnotationAccess;
+            IAnnotationAccessExtension extension= cast(IAnnotationAccessExtension) fAnnotationAccess;
             Object[] superTypes= extension.getSupertypes(annotationType);
             for (int i= 0; i < superTypes.length && bag is null; i++) {
-                bag= (AnnotationBag) bagMap.get(superTypes[i]);
+                bag= cast(AnnotationBag) bagMap.get(superTypes[i]);
             }
         }
         return bag;
--- a/dwtx/jface/text/source/projection/ProjectionSupport.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/source/projection/ProjectionSupport.d	Sun Aug 24 01:46:20 2008 +0200
@@ -80,7 +80,7 @@
          */
         protected IAnnotationModel findAnnotationModel(ISourceViewer sourceViewer) {
             if (sourceViewer instanceof ProjectionViewer) {
-                ProjectionViewer projectionViewer= (ProjectionViewer) sourceViewer;
+                ProjectionViewer projectionViewer= cast(ProjectionViewer) sourceViewer;
                 return projectionViewer.getProjectionAnnotationModel();
             }
             return null;
@@ -91,7 +91,7 @@
          */
         protected bool skip(Annotation annotation) {
             if (annotation instanceof ProjectionAnnotation)
-                return !((ProjectionAnnotation) annotation).isCollapsed();
+                return !(cast(ProjectionAnnotation) annotation).isCollapsed();
 
             return super.skip(annotation);
         }
@@ -103,7 +103,7 @@
          */
         public void draw(Annotation annotation, GC gc, StyledText textWidget, int offset, int length, Color color) {
             if (annotation instanceof ProjectionAnnotation) {
-                ProjectionAnnotation projectionAnnotation= (ProjectionAnnotation) annotation;
+                ProjectionAnnotation projectionAnnotation= cast(ProjectionAnnotation) annotation;
                 if (projectionAnnotation.isCollapsed()) {
 
                     if (gc !is null) {
@@ -350,7 +350,7 @@
         if (fSummarizableTypes !is null) {
             int size= fSummarizableTypes.size();
             for (int i= 0; i < size; i++)
-                summary.addAnnotationType((String) fSummarizableTypes.get(i));
+                summary.addAnnotationType(cast(String) fSummarizableTypes.get(i));
         }
         return summary;
     }
@@ -374,7 +374,7 @@
     public Object getAdapter(ISourceViewer viewer, Class required) {
         if (ProjectionAnnotationModel.class.equals(required)) {
             if (viewer instanceof ProjectionViewer) {
-                ProjectionViewer projectionViewer= (ProjectionViewer) viewer;
+                ProjectionViewer projectionViewer= cast(ProjectionViewer) viewer;
                 return projectionViewer.getProjectionAnnotationModel();
             }
         }
--- a/dwtx/jface/text/source/projection/ProjectionViewer.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/source/projection/ProjectionViewer.d	Sun Aug 24 01:46:20 2008 +0200
@@ -276,7 +276,7 @@
                 ProjectionCommand command;
                 Iterator e= fList.iterator();
                 while (e.hasNext()) {
-                    command= (ProjectionCommand) e.next();
+                    command= cast(ProjectionCommand) e.next();
                     fExpectedExecutionCosts += command.computeExpectedCosts();
                     if (fExpectedExecutionCosts > max_costs)
                         break;
@@ -344,7 +344,7 @@
      */
     private void addProjectionAnnotationModel(IAnnotationModel model) {
         if (model instanceof IAnnotationModelExtension) {
-            IAnnotationModelExtension extension= (IAnnotationModelExtension) model;
+            IAnnotationModelExtension extension= cast(IAnnotationModelExtension) model;
             extension.addAnnotationModel(ProjectionSupport.PROJECTION, fProjectionAnnotationModel);
             model.addAnnotationModelListener(fAnnotationModelListener);
         }
@@ -359,7 +359,7 @@
     private IAnnotationModel removeProjectionAnnotationModel(IAnnotationModel model) {
         if (model instanceof IAnnotationModelExtension) {
             model.removeAnnotationModelListener(fAnnotationModelListener);
-            IAnnotationModelExtension extension= (IAnnotationModelExtension) model;
+            IAnnotationModelExtension extension= cast(IAnnotationModelExtension) model;
             return extension.removeAnnotationModel(ProjectionSupport.PROJECTION);
         }
         return null;
@@ -403,8 +403,8 @@
     public ProjectionAnnotationModel getProjectionAnnotationModel() {
         IAnnotationModel model= getVisualAnnotationModel();
         if (model instanceof IAnnotationModelExtension) {
-            IAnnotationModelExtension extension= (IAnnotationModelExtension) model;
-            return (ProjectionAnnotationModel) extension.getAnnotationModel(ProjectionSupport.PROJECTION);
+            IAnnotationModelExtension extension= cast(IAnnotationModelExtension) model;
+            return cast(ProjectionAnnotationModel) extension.getAnnotationModel(ProjectionSupport.PROJECTION);
         }
         return null;
     }
@@ -421,7 +421,7 @@
      */
     protected bool updateSlaveDocument(IDocument slaveDocument, int modelRangeOffset, int modelRangeLength) throws BadLocationException {
         if (slaveDocument instanceof ProjectionDocument) {
-            ProjectionDocument projection= (ProjectionDocument) slaveDocument;
+            ProjectionDocument projection= cast(ProjectionDocument) slaveDocument;
 
             int offset= modelRangeOffset;
             int length= modelRangeLength;
@@ -490,7 +490,7 @@
         if (fProjectionListeners !is null) {
             Iterator e= new ArrayList(fProjectionListeners).iterator();
             while (e.hasNext()) {
-                IProjectionListener l= (IProjectionListener) e.next();
+                IProjectionListener l= cast(IProjectionListener) e.next();
                 l.projectionEnabled();
             }
         }
@@ -504,7 +504,7 @@
         if (fProjectionListeners !is null) {
             Iterator e= new ArrayList(fProjectionListeners).iterator();
             while (e.hasNext()) {
-                IProjectionListener l= (IProjectionListener) e.next();
+                IProjectionListener l= cast(IProjectionListener) e.next();
                 l.projectionDisabled();
             }
         }
@@ -558,7 +558,7 @@
             Annotation bestMatch= null;
             Point selection= getSelectedRange();
             for (Iterator e= fProjectionAnnotationModel.getAnnotationIterator(); e.hasNext();) {
-                ProjectionAnnotation annotation= (ProjectionAnnotation) e.next();
+                ProjectionAnnotation annotation= cast(ProjectionAnnotation) e.next();
                 if (annotation.isCollapsed()) {
                     Position position= fProjectionAnnotationModel.getPosition(annotation);
                     // take the first most fine grained match
@@ -587,7 +587,7 @@
             Annotation bestMatch= null;
             Point selection= getSelectedRange();
             for (Iterator e= fProjectionAnnotationModel.getAnnotationIterator(); e.hasNext();) {
-                ProjectionAnnotation annotation= (ProjectionAnnotation) e.next();
+                ProjectionAnnotation annotation= cast(ProjectionAnnotation) e.next();
                 if (!annotation.isCollapsed()) {
                     Position position= fProjectionAnnotationModel.getPosition(annotation);
                     // take the first most fine grained match
@@ -806,12 +806,12 @@
 
         IDocument visibleDocument= getVisibleDocument();
         if (visibleDocument instanceof ProjectionDocument)
-            projection= (ProjectionDocument) visibleDocument;
+            projection= cast(ProjectionDocument) visibleDocument;
         else {
             IDocument master= getDocument();
             IDocument slave= createSlaveDocument(getDocument());
             if (slave instanceof ProjectionDocument) {
-                projection= (ProjectionDocument) slave;
+                projection= cast(ProjectionDocument) slave;
                 addMasterDocumentRange(projection, 0, master.getLength());
                 replaceVisibleDocument(projection);
             }
@@ -844,7 +844,7 @@
     private void expand(int offset, int length, bool fireRedraw) throws BadLocationException {
         IDocument slave= getVisibleDocument();
         if (slave instanceof ProjectionDocument) {
-            ProjectionDocument projection= (ProjectionDocument) slave;
+            ProjectionDocument projection= cast(ProjectionDocument) slave;
 
             // expand
             addMasterDocumentRange(projection, offset, length);
@@ -914,7 +914,7 @@
                                         synchronized (fLock) {
                                             if (fPendingRequests.size() is 0)
                                                 return;
-                                            ame= (AnnotationModelEvent) fPendingRequests.remove(0);
+                                            ame= cast(AnnotationModelEvent) fPendingRequests.remove(0);
                                         }
                                         catchupWithProjectionAnnotationModel(ame);
                                     }
@@ -947,7 +947,7 @@
      */
     private bool isVisibleMasterDocumentSameAsDocument() {
         IDocument visibleDocument= getVisibleDocument();
-        return (visibleDocument instanceof ProjectionDocument) && ((ProjectionDocument)visibleDocument).getMasterDocument() is getDocument();
+        return (visibleDocument instanceof ProjectionDocument) && (cast(ProjectionDocument)visibleDocument).getMasterDocument() is getDocument();
     }
 
     /**
@@ -1024,7 +1024,7 @@
         ProjectionCommand command;
         Iterator e= commandQueue.iterator();
         while (e.hasNext()) {
-            command= (ProjectionCommand) e.next();
+            command= cast(ProjectionCommand) e.next();
             switch (command.fType) {
                 case ProjectionCommand.ADD:
                     addMasterDocumentRange(command.fProjection, command.fOffset, command.fLength);
@@ -1052,7 +1052,7 @@
         List annotations= new ArrayList(5);
         Iterator e= fProjectionAnnotationModel.getAnnotationIterator();
         while (e.hasNext()) {
-            ProjectionAnnotation annotation= (ProjectionAnnotation) e.next();
+            ProjectionAnnotation annotation= cast(ProjectionAnnotation) e.next();
             if (annotation.isCollapsed()) {
                 Position position= fProjectionAnnotationModel.getPosition(annotation);
                 if (position is null) {
@@ -1086,7 +1086,7 @@
      */
     private void processDeletions(AnnotationModelEvent event, Annotation[] removedAnnotations, bool fireRedraw) throws BadLocationException {
         for (int i= 0; i < removedAnnotations.length; i++) {
-            ProjectionAnnotation annotation= (ProjectionAnnotation) removedAnnotations[i];
+            ProjectionAnnotation annotation= cast(ProjectionAnnotation) removedAnnotations[i];
             if (annotation.isCollapsed()) {
                 Position expanded= event.getPositionOfRemovedAnnotation(annotation);
                 expand(expanded.getOffset(), expanded.getLength(), fireRedraw);
@@ -1135,7 +1135,7 @@
                 return null;
 
             if (position instanceof IProjectionPosition) {
-                IProjectionPosition projPosition= (IProjectionPosition) position;
+                IProjectionPosition projPosition= cast(IProjectionPosition) position;
                 return projPosition.computeProjectionRegions(document);
             }
 
@@ -1169,7 +1169,7 @@
 
             int captionOffset= position.getOffset();
             if (position instanceof IProjectionPosition)
-                captionOffset+= ((IProjectionPosition) position).computeCaptionOffset(document);
+                captionOffset+= (cast(IProjectionPosition) position).computeCaptionOffset(document);
 
             IRegion lineInfo= document.getLineInformationOfOffset(captionOffset);
             return new Position(lineInfo.getOffset() + lineInfo.getLength(), 0);
@@ -1180,7 +1180,7 @@
 
     private void processChanges(Annotation[] annotations, bool fireRedraw, List coverage) throws BadLocationException {
         for (int i= 0; i < annotations.length; i++) {
-            ProjectionAnnotation annotation= (ProjectionAnnotation) annotations[i];
+            ProjectionAnnotation annotation= cast(ProjectionAnnotation) annotations[i];
             Position position= fProjectionAnnotationModel.getPosition(annotation);
 
             if (position is null)
@@ -1203,7 +1203,7 @@
     private bool covers(List coverage, Position position) {
         Iterator e= coverage.iterator();
         while (e.hasNext()) {
-            Position p= (Position) e.next();
+            Position p= cast(Position) e.next();
             if (p.getOffset() <= position.getOffset() && position.getOffset() + position.getLength() <= p.getOffset() + p.getLength())
                 return true;
         }
@@ -1226,7 +1226,7 @@
             if (master !is null) {
                 IDocument slave= manager.createSlaveDocument(master);
                 if (slave instanceof ProjectionDocument) {
-                    projection= (ProjectionDocument) slave;
+                    projection= cast(ProjectionDocument) slave;
                     addMasterDocumentRange(projection, 0, master.getLength());
                 }
             }
@@ -1235,7 +1235,7 @@
         if (projection !is null) {
             Iterator e= fProjectionAnnotationModel.getAnnotationIterator();
             while (e.hasNext()) {
-                ProjectionAnnotation annotation= (ProjectionAnnotation) e.next();
+                ProjectionAnnotation annotation= cast(ProjectionAnnotation) e.next();
                 if (annotation.isCollapsed()) {
                     Position position= fProjectionAnnotationModel.getPosition(annotation);
                     if (position !is null) {
@@ -1271,7 +1271,7 @@
     public void addVerticalRulerColumn(IVerticalRulerColumn column) {
         IVerticalRuler ruler= getVerticalRuler();
         if (ruler instanceof CompositeRuler) {
-            CompositeRuler compositeRuler= (CompositeRuler) ruler;
+            CompositeRuler compositeRuler= cast(CompositeRuler) ruler;
             compositeRuler.addDecorator(99, column);
         }
     }
@@ -1284,7 +1284,7 @@
     public void removeVerticalRulerColumn(IVerticalRulerColumn column) {
         IVerticalRuler ruler= getVerticalRuler();
         if (ruler instanceof CompositeRuler) {
-            CompositeRuler compositeRuler= (CompositeRuler) ruler;
+            CompositeRuler compositeRuler= cast(CompositeRuler) ruler;
             compositeRuler.removeDecorator(column);
         }
     }
@@ -1314,7 +1314,7 @@
             // expand the immediate effected collapsed regions
             Iterator iterator= fProjectionAnnotationModel.getAnnotationIterator();
             while (iterator.hasNext()) {
-                ProjectionAnnotation annotation= (ProjectionAnnotation)iterator.next();
+                ProjectionAnnotation annotation= cast(ProjectionAnnotation)iterator.next();
                 if (annotation.isCollapsed() && willAutoExpand(fProjectionAnnotationModel.getPosition(annotation), offset, length))
                     expand.add(annotation);
             }
@@ -1322,7 +1322,7 @@
             if (!expand.isEmpty()) {
                 Iterator e= expand.iterator();
                 while (e.hasNext())
-                    fProjectionAnnotationModel.expand((Annotation)e.next());
+                    fProjectionAnnotationModel.expand(cast(Annotation)e.next());
             }
         }
         super.setRangeIndication(offset, length, moveCursor);
@@ -1354,7 +1354,7 @@
      */
     protected void handleVisibleDocumentChanged(DocumentEvent event) {
         if (fHandleProjectionChanges && event instanceof ProjectionDocumentEvent && isProjectionMode()) {
-            ProjectionDocumentEvent e= (ProjectionDocumentEvent) event;
+            ProjectionDocumentEvent e= cast(ProjectionDocumentEvent) event;
 
             DocumentEvent master= e.getMasterEvent();
             if (master !is null)
@@ -1406,7 +1406,7 @@
             return new IRegion[] { new Region(modelRange.getOffset(), modelRange.getLength()) };
 
         if (fInformationMapping instanceof IDocumentInformationMappingExtension) {
-            IDocumentInformationMappingExtension extension= (IDocumentInformationMappingExtension) fInformationMapping;
+            IDocumentInformationMappingExtension extension= cast(IDocumentInformationMappingExtension) fInformationMapping;
             try {
                 return extension.getExactCoverage(modelRange);
             } catch (BadLocationException x) {
@@ -1712,7 +1712,7 @@
     private Position[] computeOverlappingAnnotationPositions(IRegion modelSelection) {
         List positions= new ArrayList();
         for (Iterator e= fProjectionAnnotationModel.getAnnotationIterator(); e.hasNext();) {
-            ProjectionAnnotation annotation= (ProjectionAnnotation) e.next();
+            ProjectionAnnotation annotation= cast(ProjectionAnnotation) e.next();
             Position position= fProjectionAnnotationModel.getPosition(annotation);
             if (position !is null && position.overlapsWith(modelSelection.getOffset(), modelSelection.getLength()) && modelRange2WidgetRange(position) !is null)
                 positions.add(position);
--- a/dwtx/jface/text/source/projection/SourceViewerInformationControl.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/source/projection/SourceViewerInformationControl.d	Sun Aug 24 01:46:20 2008 +0200
@@ -190,7 +190,7 @@
      */
     public void setInput(Object input) {
         if (input instanceof String)
-            setInformation((String)input);
+            setInformation(cast(String)input);
         else
             setInformation(null);
     }
@@ -244,7 +244,7 @@
     public void setSize(int width, int height) {
 
         if (fStatusField !is null) {
-            GridData gd= (GridData)fViewer.getTextWidget().getLayoutData();
+            GridData gd= cast(GridData)fViewer.getTextWidget().getLayoutData();
             Point statusSize= fStatusField.computeSize(DWT.DEFAULT, DWT.DEFAULT, true);
             Point separatorSize= fSeparator.computeSize(DWT.DEFAULT, DWT.DEFAULT, true);
             gd.heightHint= height - statusSize.y - separatorSize.y;
--- a/dwtx/jface/text/templates/ContextTypeRegistry.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/templates/ContextTypeRegistry.d	Sun Aug 24 01:46:20 2008 +0200
@@ -70,7 +70,7 @@
      * @return the context type if <code>name</code> is valid, <code>null</code> otherwise
      */
     public TemplateContextType getContextType(String id) {
-        return (TemplateContextType) fContextTypes.get(id);
+        return cast(TemplateContextType) fContextTypes.get(id);
     }
 
     /**
--- a/dwtx/jface/text/templates/Template.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/templates/Template.d	Sun Aug 24 01:46:20 2008 +0200
@@ -215,7 +215,7 @@
         if (!(o instanceof Template))
             return false;
 
-        Template t= (Template) o;
+        Template t= cast(Template) o;
         if (t is this)
             return true;
 
--- a/dwtx/jface/text/templates/TemplateCompletionProcessor.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/templates/TemplateCompletionProcessor.d	Sun Aug 24 01:46:20 2008 +0200
@@ -63,7 +63,7 @@
 
     private static final class ProposalComparator : Comparator {
         public int compare(Object o1, Object o2) {
-            return ((TemplateProposal) o2).getRelevance() - ((TemplateProposal) o1).getRelevance();
+            return (cast(TemplateProposal) o2).getRelevance() - (cast(TemplateProposal) o1).getRelevance();
         }
     }
 
@@ -75,7 +75,7 @@
      */
     public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
 
-        ITextSelection selection= (ITextSelection) viewer.getSelectionProvider().getSelection();
+        ITextSelection selection= cast(ITextSelection) viewer.getSelectionProvider().getSelection();
 
         // adjust offset to end of normalized selection
         if (selection.getOffset() is offset)
@@ -100,7 +100,7 @@
                 continue;
             }
             if (template.matches(prefix, context.getContextType().getId()))
-                matches.add(createProposal(template, context, (IRegion) region, getRelevance(template, prefix)));
+                matches.add(createProposal(template, context, cast(IRegion) region, getRelevance(template, prefix)));
         }
 
         Collections.sort(matches, fgProposalComparator);
@@ -125,7 +125,7 @@
      * @since 3.1
      */
     protected ICompletionProposal createProposal(Template template, TemplateContext context, Region region, int relevance) {
-        return createProposal(template, context, (IRegion) region, relevance);
+        return createProposal(template, context, cast(IRegion) region, relevance);
     }
 
     /**
--- a/dwtx/jface/text/templates/TemplateContext.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/templates/TemplateContext.d	Sun Aug 24 01:46:20 2008 +0200
@@ -111,7 +111,7 @@
      * @return returns the value of the variable, <code>null</code> if the variable was not defined
      */
     public String getVariable(String name) {
-        return (String) fVariables.get(name);
+        return cast(String) fVariables.get(name);
     }
 
     /**
--- a/dwtx/jface/text/templates/TemplateContextType.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/templates/TemplateContextType.d	Sun Aug 24 01:46:20 2008 +0200
@@ -207,7 +207,7 @@
      * @return a resolver for the given type, or <code>null</code> if none is registered
      */
     protected TemplateVariableResolver getResolver(String type) {
-        return (TemplateVariableResolver) fResolvers.get(type);
+        return cast(TemplateVariableResolver) fResolvers.get(type);
     }
 
     /**
@@ -289,7 +289,7 @@
      */
     public void resolve(TemplateVariable variable, TemplateContext context) {
         String type= variable.getType();
-        TemplateVariableResolver resolver= (TemplateVariableResolver) fResolvers.get(type);
+        TemplateVariableResolver resolver= cast(TemplateVariableResolver) fResolvers.get(type);
         if (resolver is null)
             resolver= new TemplateVariableResolver(type, ""); //$NON-NLS-1$
         resolver.resolve(variable, context);
@@ -314,7 +314,7 @@
 
             int[] offsets= new int[variable.getOffsets().length];
             for (int j= 0; j !is offsets.length; j++)
-                offsets[j]= ((TextEdit) iterator.next()).getOffset();
+                offsets[j]= (cast(TextEdit) iterator.next()).getOffset();
 
             variable.setOffsets(offsets);
         }
--- a/dwtx/jface/text/templates/TemplateProposal.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/templates/TemplateProposal.d	Sun Aug 24 01:46:20 2008 +0200
@@ -315,7 +315,7 @@
     protected final int getReplaceOffset() {
         int start;
         if (fContext instanceof DocumentTemplateContext) {
-            DocumentTemplateContext docContext = (DocumentTemplateContext)fContext;
+            DocumentTemplateContext docContext = cast(DocumentTemplateContext)fContext;
             start= docContext.getStart();
         } else {
             start= fRegion.getOffset();
@@ -334,7 +334,7 @@
     protected final int getReplaceEndOffset() {
         int end;
         if (fContext instanceof DocumentTemplateContext) {
-            DocumentTemplateContext docContext = (DocumentTemplateContext)fContext;
+            DocumentTemplateContext docContext = cast(DocumentTemplateContext)fContext;
             end= docContext.getEnd();
         } else {
             end= fRegion.getOffset() + fRegion.getLength();
--- a/dwtx/jface/text/templates/TemplateTranslator.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/templates/TemplateTranslator.d	Sun Aug 24 01:46:20 2008 +0200
@@ -258,7 +258,7 @@
      * @since 3.3
      */
     private void updateOrCreateVariable(Map variables, String name, TemplateVariableType type, int offset) throws TemplateException {
-        VariableDescription varDesc= (VariableDescription) variables.get(name);
+        VariableDescription varDesc= cast(VariableDescription) variables.get(name);
         if (varDesc is null) {
             varDesc= new VariableDescription(name, type);
             variables.put(name, varDesc);
@@ -279,12 +279,12 @@
         TemplateVariable[] result= new TemplateVariable[variables.size()];
         int idx= 0;
         for (Iterator it= variables.values().iterator(); it.hasNext(); idx++) {
-            VariableDescription desc= (VariableDescription) it.next();
+            VariableDescription desc= cast(VariableDescription) it.next();
             TemplateVariableType type= desc.fType is null ? new TemplateVariableType(desc.fName) : desc.fType;
             int[] offsets= new int[desc.fOffsets.size()];
             int i= 0;
             for (Iterator intIt= desc.fOffsets.iterator(); intIt.hasNext(); i++) {
-                Integer offset= (Integer) intIt.next();
+                Integer offset= cast(Integer) intIt.next();
                 offsets[i]= offset.intValue();
             }
             fCurrentType= type;
--- a/dwtx/jface/text/templates/TemplateVariableType.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/templates/TemplateVariableType.d	Sun Aug 24 01:46:20 2008 +0200
@@ -90,7 +90,7 @@
      */
     public bool equals(Object obj) {
         if (obj instanceof TemplateVariableType) {
-            TemplateVariableType other= (TemplateVariableType) obj;
+            TemplateVariableType other= cast(TemplateVariableType) obj;
             return other.fName.equals(fName) && other.fParams.equals(fParams);
         }
         return false;
--- a/dwtx/jface/text/templates/persistence/TemplateReaderWriter.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/templates/persistence/TemplateReaderWriter.d	Sun Aug 24 01:46:20 2008 +0200
@@ -217,7 +217,7 @@
         } catch (SAXException e) {
             Throwable t= e.getCause();
             if (t instanceof IOException)
-                throw (IOException) t;
+                throw cast(IOException) t;
             else if (t !is null)
                 throw new IOException(t.getMessage());
             else
@@ -331,7 +331,7 @@
             Assert.isTrue(false);
         } catch (TransformerException e) {
             if (e.getException() instanceof IOException)
-                throw (IOException) e.getException();
+                throw cast(IOException) e.getException();
             Assert.isTrue(false);
         }
     }
--- a/dwtx/jface/text/templates/persistence/TemplateStore.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/jface/text/templates/persistence/TemplateStore.d	Sun Aug 24 01:46:20 2008 +0200
@@ -192,7 +192,7 @@
             // check if the added template is not a duplicate id
             String id= data.getId();
             for (Iterator it= fTemplates.iterator(); it.hasNext();) {
-                TemplatePersistenceData d2= (TemplatePersistenceData) it.next();
+                TemplatePersistenceData d2= cast(TemplatePersistenceData) it.next();
                 if (d2.getId() !is null && d2.getId().equals(id))
                     return;
             }
@@ -208,7 +208,7 @@
     public void save() throws IOException {
         ArrayList custom= new ArrayList();
         for (Iterator it= fTemplates.iterator(); it.hasNext();) {
-            TemplatePersistenceData data= (TemplatePersistenceData) it.next();
+            TemplatePersistenceData data= cast(TemplatePersistenceData) it.next();
             if (data.isCustom() && !(data.isUserAdded() && data.isDeleted())) // don't save deleted user-added templates
                 custom.add(data);
         }
@@ -221,7 +221,7 @@
         try {
             fPreferenceStore.setValue(fKey, output.toString());
             if (fPreferenceStore instanceof IPersistentPreferenceStore)
-                ((IPersistentPreferenceStore)fPreferenceStore).save();
+                (cast(IPersistentPreferenceStore)fPreferenceStore).save();
         } finally {
             fIgnorePreferenceStoreChanges= false;
         }
@@ -241,7 +241,7 @@
             fTemplates.add(data);
         } else {
             for (Iterator it= fTemplates.iterator(); it.hasNext();) {
-                TemplatePersistenceData d2= (TemplatePersistenceData) it.next();
+                TemplatePersistenceData d2= cast(TemplatePersistenceData) it.next();
                 if (d2.getId() !is null && d2.getId().equals(data.getId())) {
                     d2.setTemplate(data.getTemplate());
                     d2.setDeleted(data.isDeleted());
@@ -275,7 +275,7 @@
      */
     public void restoreDeleted() {
         for (Iterator it= fTemplates.iterator(); it.hasNext();) {
-            TemplatePersistenceData data= (TemplatePersistenceData) it.next();
+            TemplatePersistenceData data= cast(TemplatePersistenceData) it.next();
             if (data.isDeleted())
                 data.setDeleted(false);
         }
@@ -317,7 +317,7 @@
     public Template[] getTemplates(String contextTypeId) {
         List templates= new ArrayList();
         for (Iterator it= fTemplates.iterator(); it.hasNext();) {
-            TemplatePersistenceData data= (TemplatePersistenceData) it.next();
+            TemplatePersistenceData data= cast(TemplatePersistenceData) it.next();
             if (data.isEnabled() && !data.isDeleted() && (contextTypeId is null || contextTypeId.equals(data.getTemplate().getContextTypeId())))
                 templates.add(data.getTemplate());
         }
@@ -346,7 +346,7 @@
         Assert.isNotNull(name);
 
         for (Iterator it= fTemplates.iterator(); it.hasNext();) {
-            TemplatePersistenceData data= (TemplatePersistenceData) it.next();
+            TemplatePersistenceData data= cast(TemplatePersistenceData) it.next();
             Template template= data.getTemplate();
             if (data.isEnabled() && !data.isDeleted()
                     && (contextTypeId is null || contextTypeId.equals(template.getContextTypeId()))
@@ -381,7 +381,7 @@
     public TemplatePersistenceData[] getTemplateData(bool includeDeleted) {
         List datas= new ArrayList();
         for (Iterator it= fTemplates.iterator(); it.hasNext();) {
-            TemplatePersistenceData data= (TemplatePersistenceData) it.next();
+            TemplatePersistenceData data= cast(TemplatePersistenceData) it.next();
             if (includeDeleted || !data.isDeleted())
                 datas.add(data);
         }
@@ -400,7 +400,7 @@
     public TemplatePersistenceData getTemplateData(String id) {
         Assert.isNotNull(id);
         for (Iterator it= fTemplates.iterator(); it.hasNext();) {
-            TemplatePersistenceData data= (TemplatePersistenceData) it.next();
+            TemplatePersistenceData data= cast(TemplatePersistenceData) it.next();
             if (id.equals(data.getId()))
                 return data;
         }
--- a/dwtx/text/edits/CopySourceEdit.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/text/edits/CopySourceEdit.d	Sun Aug 24 01:46:20 2008 +0200
@@ -89,7 +89,7 @@
             fCurrentParent= copy;
         }
         public void postVisit(TextEdit edit) {
-            fCurrentParent= (TextEdit)fParents.remove(fParents.size() - 1);
+            fCurrentParent= cast(TextEdit)fParents.remove(fParents.size() - 1);
         }
         public bool visitNode(TextEdit edit) {
             manageCopy(edit.doCopy());
@@ -227,8 +227,8 @@
      */
     protected void postProcessCopy(TextEditCopier copier) {
         if (fTarget !is null) {
-            CopySourceEdit source= (CopySourceEdit)copier.getCopy(this);
-            CopyTargetEdit target= (CopyTargetEdit)copier.getCopy(fTarget);
+            CopySourceEdit source= cast(CopySourceEdit)copier.getCopy(this);
+            CopyTargetEdit target= cast(CopyTargetEdit)copier.getCopy(fTarget);
             if (source !is null && target !is null)
                 source.setTargetEdit(target);
         }
@@ -249,7 +249,7 @@
                     sourceEdits.add(null);
                 sourceEdits.add(list);
             } else {
-                List list= (List)sourceEdits.get(result);
+                List list= cast(List)sourceEdits.get(result);
                 if (list is null) {
                     list= new ArrayList();
                     sourceEdits.add(result, list);
--- a/dwtx/text/edits/CopyTargetEdit.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/text/edits/CopyTargetEdit.d	Sun Aug 24 01:46:20 2008 +0200
@@ -134,8 +134,8 @@
      */
     protected void postProcessCopy(TextEditCopier copier) {
         if (fSource !is null) {
-            CopyTargetEdit target= (CopyTargetEdit)copier.getCopy(this);
-            CopySourceEdit source= (CopySourceEdit)copier.getCopy(fSource);
+            CopyTargetEdit target= cast(CopyTargetEdit)copier.getCopy(this);
+            CopySourceEdit source= cast(CopySourceEdit)copier.getCopy(fSource);
             if (target !is null && source !is null)
                 target.setSourceEdit(source);
         }
--- a/dwtx/text/edits/MoveSourceEdit.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/text/edits/MoveSourceEdit.d	Sun Aug 24 01:46:20 2008 +0200
@@ -184,8 +184,8 @@
      */
     protected void postProcessCopy(TextEditCopier copier) {
         if (fTarget !is null) {
-            MoveSourceEdit source= (MoveSourceEdit)copier.getCopy(this);
-            MoveTargetEdit target= (MoveTargetEdit)copier.getCopy(fTarget);
+            MoveSourceEdit source= cast(MoveSourceEdit)copier.getCopy(this);
+            MoveTargetEdit target= cast(MoveTargetEdit)copier.getCopy(fTarget);
             if (source !is null && target !is null)
                 source.setTargetEdit(target);
         }
@@ -218,7 +218,7 @@
                     sourceEdits.add(null);
                 sourceEdits.add(list);
             } else {
-                List list= (List)sourceEdits.get(result);
+                List list= cast(List)sourceEdits.get(result);
                 if (list is null) {
                     list= new ArrayList();
                     sourceEdits.add(result, list);
@@ -357,7 +357,7 @@
 
     private void insertEdits(TextEdit root, List edits) {
         while(edits.size() > 0) {
-            ReplaceEdit edit= (ReplaceEdit)edits.remove(0);
+            ReplaceEdit edit= cast(ReplaceEdit)edits.remove(0);
             insert(root, edit, edits);
         }
     }
@@ -438,8 +438,8 @@
 
     private static void restorePositions(Map editMap) {
         for (Iterator iter= editMap.keySet().iterator(); iter.hasNext();) {
-            TextEdit marker= (TextEdit)iter.next();
-            TextEdit edit= (TextEdit)editMap.get(marker);
+            TextEdit marker= cast(TextEdit)iter.next();
+            TextEdit edit= cast(TextEdit)editMap.get(marker);
             if (marker.isDeleted()) {
                 edit.markAsDeleted();
             } else {
--- a/dwtx/text/edits/MoveTargetEdit.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/text/edits/MoveTargetEdit.d	Sun Aug 24 01:46:20 2008 +0200
@@ -134,8 +134,8 @@
      */
     protected void postProcessCopy(TextEditCopier copier) {
         if (fSource !is null) {
-            MoveTargetEdit target= (MoveTargetEdit)copier.getCopy(this);
-            MoveSourceEdit source= (MoveSourceEdit)copier.getCopy(fSource);
+            MoveTargetEdit target= cast(MoveTargetEdit)copier.getCopy(this);
+            MoveSourceEdit source= cast(MoveSourceEdit)copier.getCopy(fSource);
             if (target !is null && source !is null)
                 target.setSourceEdit(source);
         }
--- a/dwtx/text/edits/MultiTextEdit.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/text/edits/MultiTextEdit.d	Sun Aug 24 01:46:20 2008 +0200
@@ -132,7 +132,7 @@
         if (children is null || children.size() is 0)
             return 0;
         // the children are already sorted
-        return ((TextEdit)children.get(0)).getOffset();
+        return (cast(TextEdit)children.get(0)).getOffset();
     }
 
     /**
@@ -146,8 +146,8 @@
         if (children is null || children.size() is 0)
             return 0;
         // the children are already sorted
-        TextEdit first= (TextEdit)children.get(0);
-        TextEdit last= (TextEdit)children.get(children.size() - 1);
+        TextEdit first= cast(TextEdit)children.get(0);
+        TextEdit last= cast(TextEdit)children.get(children.size() - 1);
         return last.getOffset() - first.getOffset() + last.getLength();
     }
 
--- a/dwtx/text/edits/TextEdit.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/text/edits/TextEdit.d	Sun Aug 24 01:46:20 2008 +0200
@@ -126,8 +126,8 @@
 
     private static class InsertionComparator : Comparator {
         public int compare(Object o1, Object o2) throws MalformedTreeException {
-            TextEdit edit1= (TextEdit)o1;
-            TextEdit edit2= (TextEdit)o2;
+            TextEdit edit1= cast(TextEdit)o1;
+            TextEdit edit2= cast(TextEdit)o2;
 
             int offset1= edit1.getOffset();
             int length1= edit1.getLength();
@@ -390,7 +390,7 @@
     public final TextEdit removeChild(int index) {
         if (fChildren is null)
             throw new IndexOutOfBoundsException("Index: " + index + " Size: 0");  //$NON-NLS-1$//$NON-NLS-2$
-        TextEdit result= (TextEdit)fChildren.remove(index);
+        TextEdit result= cast(TextEdit)fChildren.remove(index);
         result.internalSetParent(null);
         if (fChildren.isEmpty())
             fChildren= null;
@@ -430,7 +430,7 @@
         int size= fChildren.size();
         TextEdit[] result= new TextEdit[size];
         for (int i= 0; i < size; i++) {
-            result[i]= (TextEdit)fChildren.get(i);
+            result[i]= cast(TextEdit)fChildren.get(i);
             result[i].internalSetParent(null);
         }
         fChildren= null;
@@ -591,7 +591,7 @@
         internalToString(buffer, indent);
         if (fChildren !is null) {
             for (Iterator iterator= fChildren.iterator(); iterator.hasNext();) {
-                TextEdit child= (TextEdit) iterator.next();
+                TextEdit child= cast(TextEdit) iterator.next();
                 buffer.append('\n');
                 child.toStringWithChildren(buffer, indent + 1);
             }
@@ -702,7 +702,7 @@
             return;
         Iterator iterator= fChildren.iterator();
         while (iterator.hasNext()) {
-            TextEdit curr= (TextEdit) iterator.next();
+            TextEdit curr= cast(TextEdit) iterator.next();
             curr.accept(visitor);
         }
     }
@@ -813,7 +813,7 @@
         if (size is 0)
             return 0;
         int lastIndex= size - 1;
-        TextEdit last= (TextEdit)fChildren.get(lastIndex);
+        TextEdit last= cast(TextEdit)fChildren.get(lastIndex);
         if (last.getExclusiveEnd() <= edit.getOffset())
             return size;
         try {
@@ -890,7 +890,7 @@
         int result= 0;
         if (fChildren !is null) {
             for (int i= fChildren.size() - 1; i >= 0; i--) {
-                TextEdit child= (TextEdit)fChildren.get(i);
+                TextEdit child= cast(TextEdit)fChildren.get(i);
                 result= Math.max(result, child.traverseConsistencyCheck(processor, document, sourceEdits));
             }
         }
@@ -913,7 +913,7 @@
         int delta= 0;
         if (fChildren !is null) {
             for (int i= fChildren.size() - 1; i >= 0; i--) {
-                TextEdit child= (TextEdit)fChildren.get(i);
+                TextEdit child= cast(TextEdit)fChildren.get(i);
                 delta+= child.traverseDocumentUpdating(processor, document);
                 childDocumentUpdated();
             }
@@ -949,7 +949,7 @@
         if (fChildren !is null) {
             bool childDelete= delete || deleteChildren();
             for (Iterator iter= fChildren.iterator(); iter.hasNext();) {
-                TextEdit child= (TextEdit)iter.next();
+                TextEdit child= cast(TextEdit)iter.next();
                 accumulatedDelta= child.traverseRegionUpdating(processor, document, accumulatedDelta, childDelete);
                 childRegionUpdated();
             }
@@ -985,7 +985,7 @@
         adjustOffset(delta);
         if (fChildren !is null) {
             for (Iterator iter= fChildren.iterator(); iter.hasNext();) {
-                ((TextEdit)iter.next()).internalMoveTree(delta);
+                (cast(TextEdit)iter.next()).internalMoveTree(delta);
             }
         }
     }
@@ -994,7 +994,7 @@
         markAsDeleted();
         if (fChildren !is null) {
             for (Iterator iter= fChildren.iterator(); iter.hasNext();) {
-                TextEdit child= (TextEdit)iter.next();
+                TextEdit child= cast(TextEdit)iter.next();
                 child.deleteTree();
             }
         }
--- a/dwtx/text/edits/TextEditCopier.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/text/edits/TextEditCopier.d	Sun Aug 24 01:46:20 2008 +0200
@@ -83,7 +83,7 @@
         TextEdit result= doCopy(fEdit);
         if (result !is null) {
             for (Iterator iter= fCopies.keySet().iterator(); iter.hasNext();) {
-                TextEdit edit= (TextEdit)iter.next();
+                TextEdit edit= cast(TextEdit)iter.next();
                 edit.postProcessCopy(this);
             }
         }
@@ -100,7 +100,7 @@
      */
     public TextEdit getCopy(TextEdit original) {
         Assert.isNotNull(original);
-        return (TextEdit)fCopies.get(original);
+        return cast(TextEdit)fCopies.get(original);
     }
 
     //---- helper methods --------------------------------------------
@@ -111,7 +111,7 @@
         if (children !is null) {
             List newChildren= new ArrayList(children.size());
             for (Iterator iter= children.iterator(); iter.hasNext();) {
-                TextEdit childCopy= doCopy((TextEdit)iter.next());
+                TextEdit childCopy= doCopy(cast(TextEdit)iter.next());
                 childCopy.internalSetParent(result);
                 newChildren.add(childCopy);
             }
--- a/dwtx/text/edits/TextEditGroup.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/text/edits/TextEditGroup.d	Sun Aug 24 01:46:20 2008 +0200
@@ -182,7 +182,7 @@
         if (size is 0) {
             return null;
         } else if (size is 1) {
-            return ((TextEdit)fEdits.get(0)).getRegion();
+            return (cast(TextEdit)fEdits.get(0)).getRegion();
         } else {
             return TextEdit.getCoverage((TextEdit[])fEdits.toArray(new TextEdit[fEdits.size()]));
         }
--- a/dwtx/text/edits/TextEditProcessor.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/text/edits/TextEditProcessor.d	Sun Aug 24 01:46:20 2008 +0200
@@ -91,7 +91,7 @@
         fDocument= document;
         fRoot= root;
         if (fRoot instanceof MultiTextEdit)
-            ((MultiTextEdit)fRoot).defineRegion(0);
+            (cast(MultiTextEdit)fRoot).defineRegion(0);
         fStyle= style;
         if (secondary) {
             fChecked= true;
@@ -223,10 +223,10 @@
 
     private void computeSources() {
         for (Iterator iter= fSourceEdits.iterator(); iter.hasNext();) {
-            List list= (List)iter.next();
+            List list= cast(List)iter.next();
             if (list !is null) {
                 for (Iterator edits= list.iterator(); edits.hasNext();) {
-                    TextEdit edit= (TextEdit)edits.next();
+                    TextEdit edit= cast(TextEdit)edits.next();
                     edit.traverseSourceComputation(this, fDocument);
                 }
             }
--- a/dwtx/text/undo/DocumentUndoManager.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/text/undo/DocumentUndoManager.d	Sun Aug 24 01:46:20 2008 +0200
@@ -150,7 +150,7 @@
         protected void undoTextChange() {
             try {
                 if (fDocumentUndoManager.fDocument instanceof IDocumentExtension4)
-                    ((IDocumentExtension4) fDocumentUndoManager.fDocument).replace(fStart, fText
+                    (cast(IDocumentExtension4) fDocumentUndoManager.fDocument).replace(fStart, fText
                             .length(), fPreservedText, fUndoModificationStamp);
                 else
                     fDocumentUndoManager.fDocument.replace(fStart, fText.length(),
@@ -165,7 +165,7 @@
         public bool canUndo() {
             if (isValid()) {
                 if (fDocumentUndoManager.fDocument instanceof IDocumentExtension4) {
-                    long docStamp= ((IDocumentExtension4) fDocumentUndoManager.fDocument)
+                    long docStamp= (cast(IDocumentExtension4) fDocumentUndoManager.fDocument)
                             .getModificationStamp();
 
                     // Normal case: an undo is valid if its redo will restore
@@ -235,7 +235,7 @@
         public bool canRedo() {
             if (isValid()) {
                 if (fDocumentUndoManager.fDocument instanceof IDocumentExtension4) {
-                    long docStamp= ((IDocumentExtension4) fDocumentUndoManager.fDocument)
+                    long docStamp= (cast(IDocumentExtension4) fDocumentUndoManager.fDocument)
                             .getModificationStamp();
                     return docStamp is IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP
                             || docStamp is getUndoModificationStamp();
@@ -284,7 +284,7 @@
         protected void redoTextChange() {
             try {
                 if (fDocumentUndoManager.fDocument instanceof IDocumentExtension4)
-                    ((IDocumentExtension4) fDocumentUndoManager.fDocument).replace(fStart, fEnd - fStart, fText, fRedoModificationStamp);
+                    (cast(IDocumentExtension4) fDocumentUndoManager.fDocument).replace(fStart, fEnd - fStart, fText, fRedoModificationStamp);
                 else
                     fDocumentUndoManager.fDocument.replace(fStart, fEnd - fStart, fText);
             } catch (BadLocationException x) {
@@ -471,11 +471,11 @@
             if (size > 0) {
                 UndoableTextChange c;
 
-                c= (UndoableTextChange) fChanges.get(0);
+                c= cast(UndoableTextChange) fChanges.get(0);
                 fDocumentUndoManager.fireDocumentUndo(c.fStart, c.fPreservedText, c.fText, uiInfo, DocumentUndoEvent.ABOUT_TO_UNDO, true);
 
                 for (int i= size - 1; i >= 0; --i) {
-                    c= (UndoableTextChange) fChanges.get(i);
+                    c= cast(UndoableTextChange) fChanges.get(i);
                     c.undoTextChange();
                 }
                 fDocumentUndoManager.resetProcessChangeState();
@@ -494,11 +494,11 @@
             if (size > 0) {
 
                 UndoableTextChange c;
-                c= (UndoableTextChange) fChanges.get(size - 1);
+                c= cast(UndoableTextChange) fChanges.get(size - 1);
                 fDocumentUndoManager.fireDocumentUndo(c.fStart, c.fText, c.fPreservedText, uiInfo, DocumentUndoEvent.ABOUT_TO_REDO, true);
 
                 for (int i= 0; i <= size - 1; ++i) {
-                    c= (UndoableTextChange) fChanges.get(i);
+                    c= cast(UndoableTextChange) fChanges.get(i);
                     c.redoTextChange();
                 }
                 fDocumentUndoManager.resetProcessChangeState();
@@ -566,7 +566,7 @@
             if (fStart > -1)
                 return super.getUndoModificationStamp();
             else if (fChanges.size() > 0)
-                return ((UndoableTextChange) fChanges.get(0))
+                return (cast(UndoableTextChange) fChanges.get(0))
                         .getUndoModificationStamp();
 
             return fUndoModificationStamp;
@@ -579,7 +579,7 @@
             if (fStart > -1)
                 return super.getRedoModificationStamp();
             else if (fChanges.size() > 0)
-                return ((UndoableTextChange) fChanges.get(fChanges.size() - 1))
+                return (cast(UndoableTextChange) fChanges.get(fChanges.size() - 1))
                         .getRedoModificationStamp();
 
             return fRedoModificationStamp;
@@ -936,7 +936,7 @@
         DocumentUndoEvent event= new DocumentUndoEvent(fDocument, offset, text, preservedText, eventType, source);
         Object[] listeners= fDocumentUndoListeners.getListeners();
         for (int i= 0; i < listeners.length; i++) {
-            ((IDocumentUndoListener)listeners[i]).documentUndoNotification(event);
+            (cast(IDocumentUndoListener)listeners[i]).documentUndoNotification(event);
         }
     }
 
@@ -1260,14 +1260,14 @@
             // First replace the undo context
             IUndoableOperation op= operations[i];
             if (op instanceof IContextReplacingOperation) {
-                ((IContextReplacingOperation)op).replaceContext(oldUndoContext, getUndoContext());
+                (cast(IContextReplacingOperation)op).replaceContext(oldUndoContext, getUndoContext());
             } else {
                 op.addContext(getUndoContext());
                 op.removeContext(oldUndoContext);
             }
             // Now update the manager that owns the text edit.
             if (op instanceof UndoableTextChange) {
-                ((UndoableTextChange)op).fDocumentUndoManager= this;
+                (cast(UndoableTextChange)op).fDocumentUndoManager= this;
             }
         }
 
@@ -1284,9 +1284,9 @@
         cmd.fStart= cmd.fEnd= 0;
         cmd.fText= cmd.fPreservedText= ""; //$NON-NLS-1$
         if (fDocument instanceof IDocumentExtension4) {
-            cmd.fRedoModificationStamp= ((IDocumentExtension4)fDocument).getModificationStamp();
+            cmd.fRedoModificationStamp= (cast(IDocumentExtension4)fDocument).getModificationStamp();
             if (op !is null)
-                cmd.fUndoModificationStamp= ((UndoableTextChange)op).fRedoModificationStamp;
+                cmd.fUndoModificationStamp= (cast(UndoableTextChange)op).fRedoModificationStamp;
         }
         addToOperationHistory(cmd);
     }
--- a/dwtx/text/undo/DocumentUndoManagerRegistry.d	Sun Aug 24 01:29:22 2008 +0200
+++ b/dwtx/text/undo/DocumentUndoManagerRegistry.d	Sun Aug 24 01:46:20 2008 +0200
@@ -72,7 +72,7 @@
      */
     public static synchronized void connect(IDocument document) {
         Assert.isNotNull(document);
-        Record record= (Record)fgFactory.get(document);
+        Record record= cast(Record)fgFactory.get(document);
         if (record is null) {
             record= new Record(document);
             fgFactory.put(document, record);
@@ -87,7 +87,7 @@
      */
     public static synchronized void disconnect(IDocument document) {
         Assert.isNotNull(document);
-        Record record= (Record)fgFactory.get(document);
+        Record record= cast(Record)fgFactory.get(document);
         record.count--;
         if (record.count is 0)
             fgFactory.remove(document);
@@ -109,7 +109,7 @@
      */
     public static synchronized IDocumentUndoManager getDocumentUndoManager(IDocument document) {
         Assert.isNotNull(document);
-        Record record= (Record)fgFactory.get(document);
+        Record record= cast(Record)fgFactory.get(document);
         if (record is null)
             return null;
         return record.undoManager;