diff dwtx/jface/text/contentassist/ContextInformationPopup.d @ 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
line wrap: on
line diff
--- 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)) {