Refactory: removed unnecessary local variables and imports.
[phpeclipse.git] / net.sourceforge.phpeclipse.debug.ui / src / net / sourceforge / phpdt / internal / debug / ui / actions / ToggleBreakpointAdapter.java
index 7725750..26ea209 100644 (file)
@@ -30,7 +30,7 @@ import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget;
-import org.eclipse.jface.text.IDocument;
+//import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.ITextSelection;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
@@ -39,7 +39,7 @@ import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IFileEditorInput;
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.texteditor.IEditorStatusLine;
-import org.eclipse.ui.texteditor.ITextEditor;
+//import org.eclipse.ui.texteditor.ITextEditor;
 
 /**
  * Toggles a line breakpoint in a Java editor.
@@ -100,8 +100,8 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTarget {
                        ITextSelection textSelection = (ITextSelection) selection;
                        // IType type = getType(textSelection);
                        IEditorInput editorInput = editorPart.getEditorInput();
-                       IDocument document = ((ITextEditor) editorPart)
-                                       .getDocumentProvider().getDocument(editorInput);
+//                     IDocument document = ((ITextEditor) editorPart)
+//                                     .getDocumentProvider().getDocument(editorInput);
                        int lineNumber = textSelection.getStartLine() + 1;
                        int offset = textSelection.getOffset();
                        try {
@@ -152,7 +152,7 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTarget {
                                // breakpoint, true );
                                //
                                PHPLineBreakpoint existingBreakpoint = PHPDebugModel
-                                               .lineBreakpointExists(lineNumber); // typeName,
+                                               .lineBreakpointExists(resource, lineNumber); // typeName,
                                                                                                                        // lineNumber);
                                if (existingBreakpoint != null) {
                                        DebugPlugin.getDefault().getBreakpointManager()
@@ -436,7 +436,7 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTarget {
        public static String resolveMethodSignature(IType type,
                        String methodSignature) throws JavaModelException {
                String[] parameterTypes = Signature.getParameterTypes(methodSignature);
-               int length = length = parameterTypes.length;
+               int length = parameterTypes.length;
                String[] resolvedParameterTypes = new String[length];
 
                for (int i = 0; i < length; i++) {