Changeset 3464


Ignore:
Timestamp:
Mar 6, 2008, 5:10:23 PM (13 years ago)
Author:
yura
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.editor/src/org/refal/plus/rfpdt/editor/ToggleBreakpointAdapter.java

    r3463 r3464  
    22
    33import java.util.HashMap;
    4 import java.util.Map;
    54
    65import org.eclipse.core.resources.IFile;
     
    2322public class ToggleBreakpointAdapter implements IToggleBreakpointsTargetExtension {
    2423    public boolean canToggleBreakpoints (IWorkbenchPart part, ISelection selection) {
    25         return false;
     24        return true;
    2625    }
    2726
    2827    public void toggleBreakpoints (IWorkbenchPart part, ISelection selection) throws CoreException {
    29         throw new UnsupportedOperationException();
     28        toggleLineBreakpoints(part, selection);
    3029    }
    3130
     
    4342
    4443    public void toggleLineBreakpoints (final IWorkbenchPart part, final ISelection selection) throws CoreException {
    45 
    4644        Job job = new Job("Toggle Line Breakpoint") { //$NON-NLS-1$
    4745            protected IStatus run (IProgressMonitor monitor) {
     
    6361                            return Status.OK_STATUS;
    6462                        }
    65                         Map attributes = new HashMap(10);
    66                         IJavaLineBreakpoint javaLineBreakpoint = JDIDebugModel.createLineBreakpoint(resource, className, lnumber, -1, -1, 0, true,
    67                                 attributes);
     63                        IJavaLineBreakpoint javaLineBreakpoint = JDIDebugModel.createLineBreakpoint(resource,
     64                                className, lnumber, -1, -1, 0, true, new HashMap<Object, Object>(10));
    6865                        DebugPlugin.getDefault().getBreakpointManager().addBreakpoint(javaLineBreakpoint);
    6966                    } catch (CoreException ce) {
     
    8784
    8885    protected ITextEditor getTextEditor (IWorkbenchPart part) {
    89         if (part instanceof ITextEditor) {
     86        if (part instanceof ITextEditor)
    9087            return (ITextEditor) part;
    91         }
    9288        return (ITextEditor) part.getAdapter(ITextEditor.class);
    9389    }
Note: See TracChangeset for help on using the changeset viewer.