A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse.xdebug.ui / src / net / sourceforge / phpeclipse / xdebug / ui / php / model / PHPLineBreakpointAdapter.java
index e2a5415..0138aee 100644 (file)
@@ -18,26 +18,30 @@ public class PHPLineBreakpointAdapter implements IToggleBreakpointsTarget {
 
        public void toggleLineBreakpoints(IWorkbenchPart part, ISelection selection)
                        throws CoreException {
-               IEditorPart editorPart = (IEditorPart)part;
+               IEditorPart editorPart = (IEditorPart) part;
 
-               IResource resource = (IResource) editorPart.getEditorInput().getAdapter(IResource.class);
+               IResource resource = (IResource) editorPart.getEditorInput()
+                               .getAdapter(IResource.class);
                ITextSelection textSelection = (ITextSelection) selection;
-               int lineNumber = textSelection.getStartLine()+1;
-               IBreakpoint[] breakpoints = DebugPlugin.getDefault().getBreakpointManager().getBreakpoints(IXDebugConstants.ID_PHP_DEBUG_MODEL);
+               int lineNumber = textSelection.getStartLine() + 1;
+               IBreakpoint[] breakpoints = DebugPlugin.getDefault()
+                               .getBreakpointManager().getBreakpoints(
+                                               IXDebugConstants.ID_PHP_DEBUG_MODEL);
                for (int i = 0; i < breakpoints.length; i++) {
                        IBreakpoint breakpoint = breakpoints[i];
                        if (resource.equals(breakpoint.getMarker().getResource())) {
-                               if (((ILineBreakpoint)breakpoint).getLineNumber() == (lineNumber )) {
-                                               // remove
+                               if (((ILineBreakpoint) breakpoint).getLineNumber() == (lineNumber)) {
+                                       // remove
                                        breakpoint.delete();
                                        return;
                                }
                        }
                }
-                       // create line breakpoint (doc line numbers start at 0)
-               XDebugLineBreakpoint lineBreakpoint = new XDebugLineBreakpoint(resource, lineNumber);
-//             DebugPlugin.getDefault().getBreakpointManager().addBreakpoint(lineBreakpoint);
-               
+               // create line breakpoint (doc line numbers start at 0)
+               XDebugLineBreakpoint lineBreakpoint = new XDebugLineBreakpoint(
+                               resource, lineNumber);
+               // DebugPlugin.getDefault().getBreakpointManager().addBreakpoint(lineBreakpoint);
+
        }
 
        public boolean canToggleLineBreakpoints(IWorkbenchPart part,