Remove unnecessary explicit cast.
authorincastrix <incastrix>
Sat, 13 Sep 2008 18:57:56 +0000 (18:57 +0000)
committerincastrix <incastrix>
Sat, 13 Sep 2008 18:57:56 +0000 (18:57 +0000)
net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/model/XDebugThread.java

index 505b5a6..fa29d34 100644 (file)
@@ -10,7 +10,6 @@ import java.net.MalformedURLException;
 import java.net.URL;
 
 import net.sourceforge.phpeclipse.xdebug.core.PHPDebugUtils;
-//import net.sourceforge.phpeclipse.xdebug.core.xdebug.ResponseListener.DebugResponse;
 import net.sourceforge.phpeclipse.xdebug.core.xdebug.ResponseListener.XDebugResponse;
 
 import org.eclipse.debug.core.DebugEvent;
@@ -30,7 +29,7 @@ import org.w3c.dom.NodeList;
  * Window - Preferences - Java - Code Style - Code Templates
  */
 public class XDebugThread extends XDebugElement implements IThread, IDebugEventSetListener {
-       private IStackFrame[]  fStackFrames;
+       private XDebugStackFrame[]  fStackFrames;
        
        private IBreakpoint[] fBreakpoints;
        
@@ -57,7 +56,7 @@ public class XDebugThread extends XDebugElement implements IThread, IDebugEventS
        }
        
        public IStackFrame[] getStackFrames() throws DebugException {
-               IStackFrame[] newStackFrames = null;
+               XDebugStackFrame[] newStackFrames = null;
                
                if (isSuspended()) {    
                        if (fStepCount > fCurrentStepCount) {
@@ -67,7 +66,7 @@ public class XDebugThread extends XDebugElement implements IThread, IDebugEventS
                                newStackFrames = _getStackFrames(dr);
 
                                for (int i = 0; i < newStackFrames.length; i++) {
-                                       ((XDebugStackFrame)newStackFrames[i]).getVariables();
+                                       newStackFrames[i].getVariables();
                                }
                                
                                if (fStackFrames != null) {
@@ -75,10 +74,11 @@ public class XDebugThread extends XDebugElement implements IThread, IDebugEventS
                                                int delta = newStackFrames.length - fStackFrames.length + 1;
                                                
                                                for (int i = fStackFrames.length - 1; i >= 0; i--) {
-                                                       if (((XDebugStackFrame) fStackFrames[i]).equals(((XDebugStackFrame) newStackFrames[newStackFrames.length  - delta]))) {
+                                                       if (fStackFrames[i].equals(newStackFrames[newStackFrames.length - delta])) {
                                                                int b = 2; b++;
                                                                //((XDebugStackFrame) newStackFrames[newStackFrames.length - delta]).evaluateChange((XDebugStackFrame) fStackFrames[i]);                                                                
-                                                       } else if (((XDebugStackFrame) fStackFrames[i]).isSameStackFrame(newStackFrames[newStackFrames.length  - delta])) {
+                                                       } else if (fStackFrames[i].isSameStackFrame(newStackFrames[newStackFrames.length - delta])) {
+                                                               int b = 2; b++;
                                                                //((XDebugStackFrame) newStackFrames[newStackFrames.length - delta]).evaluateChange((XDebugStackFrame) fStackFrames[i]);                                                                
                                                        }
                                                        
@@ -98,14 +98,14 @@ public class XDebugThread extends XDebugElement implements IThread, IDebugEventS
                }
        }
        
-       private IStackFrame[] _getStackFrames(XDebugResponse lastResponse) {
+       private XDebugStackFrame[] _getStackFrames(XDebugResponse lastResponse) {
                //IStackFrame[] newStackFrames = null;
 
        if (lastResponse.isError())
-               return new IStackFrame[0];
+               return new XDebugStackFrame[0];
        Node response = lastResponse.getParentNode();
        NodeList frames = response.getChildNodes();
-       IStackFrame[] theFrames = new IStackFrame[frames.getLength()];
+       XDebugStackFrame[] theFrames = new XDebugStackFrame[frames.getLength()];
        for (int i = 0; i < frames.getLength(); i++) {
                Node stackNode = frames.item(i);
                XDebugStackFrame frame = new XDebugStackFrame(this/*fThread*/, i);