|
From: Christopher W. <caw...@us...> - 2005-03-28 23:22:48
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1173/src/org/rubypeople/rdt/internal/debug/ui/actions Modified Files: ManageBreakpointRulerAction.java Log Message: apply david corbin's patches Index: ManageBreakpointRulerAction.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/actions/ManageBreakpointRulerAction.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ManageBreakpointRulerAction.java 20 Mar 2004 15:38:56 -0000 1.5 --- ManageBreakpointRulerAction.java 28 Mar 2005 23:22:39 -0000 1.6 *************** *** 38,41 **** --- 38,42 ---- */ public class ManageBreakpointRulerAction extends Action implements IUpdate { + private IVerticalRulerInfo fRuler; private ITextEditor fTextEditor; *************** *** 60,64 **** } ! /* (non-Javadoc) * @see org.eclipse.ui.texteditor.IUpdate#update() */ --- 61,67 ---- } ! /* ! * (non-Javadoc) ! * * @see org.eclipse.ui.texteditor.IUpdate#update() */ *************** *** 84,93 **** AbstractMarkerAnnotationModel model = getAnnotationModel(); ! if (model == null) { ! return breakpoints; ! } try { ! IMarker[] markers = getResource().findMarkers("org.rubypeople.rdt.debug.core.RubyBreakpointMarker", // IBreakpoint.BREAKPOINT_MARKER, ! false, IResource.DEPTH_INFINITE); IBreakpointManager breakpointManager = DebugPlugin.getDefault().getBreakpointManager(); --- 87,96 ---- AbstractMarkerAnnotationModel model = getAnnotationModel(); ! if (model == null) { return breakpoints; } try { ! IResource resource = getResource(); ! if (resource == null) return breakpoints; ! IMarker[] markers = resource.findMarkers("org.rubypeople.rdt.debug.core.RubyBreakpointMarker", // IBreakpoint.BREAKPOINT_MARKER, ! false, IResource.DEPTH_INFINITE); IBreakpointManager breakpointManager = DebugPlugin.getDefault().getBreakpointManager(); *************** *** 106,113 **** } ! /** ! * Returns the resource for which to create the marker, ! * or <code>null</code> if there is no applicable resource. ! * * @return the resource for which to create the marker or <code>null</code> */ --- 109,116 ---- } ! /** ! * Returns the resource for which to create the marker, or <code>null</code> ! * if there is no applicable resource. ! * * @return the resource for which to create the marker or <code>null</code> */ *************** *** 115,120 **** IEditorInput input = fTextEditor.getEditorInput(); IResource resource = (IResource) input.getAdapter(IFile.class); ! if (resource == null) ! resource = (IResource) input.getAdapter(IResource.class); return resource; } --- 118,122 ---- IEditorInput input = fTextEditor.getEditorInput(); IResource resource = (IResource) input.getAdapter(IFile.class); ! if (resource == null) resource = (IResource) input.getAdapter(IResource.class); return resource; } *************** *** 122,128 **** /** * Checks whether a position includes the ruler's line of activity. ! * ! * @param position the position to be checked ! * @param document the document the position refers to * @return <code>true</code> if the line is included by the given position */ --- 124,132 ---- /** * Checks whether a position includes the ruler's line of activity. ! * ! * @param position ! * the position to be checked ! * @param document ! * the document the position refers to * @return <code>true</code> if the line is included by the given position */ *************** *** 132,140 **** int markerLine = document.getLineOfOffset(position.getOffset()); int line = fRuler.getLineOfLastMouseButtonActivity(); ! if (line == markerLine) { ! return true; ! } ! } catch (BadLocationException x) { ! } } return false; --- 136,141 ---- int markerLine = document.getLineOfOffset(position.getOffset()); int line = fRuler.getLineOfLastMouseButtonActivity(); ! if (line == markerLine) { return true; } ! } catch (BadLocationException x) {} } return false; *************** *** 143,147 **** /** * Returns this action's vertical ruler info. ! * * @return this action's vertical ruler */ --- 144,148 ---- /** * Returns this action's vertical ruler info. ! * * @return this action's vertical ruler */ *************** *** 152,156 **** /** * Returns this action's editor. ! * * @return this action's editor */ --- 153,157 ---- /** * Returns this action's editor. ! * * @return this action's editor */ *************** *** 160,165 **** /** ! * Returns the <code>AbstractMarkerAnnotationModel</code> of the editor's input. ! * * @return the marker annotation model */ --- 161,167 ---- /** ! * Returns the <code>AbstractMarkerAnnotationModel</code> of the editor's ! * input. ! * * @return the marker annotation model */ *************** *** 167,173 **** IDocumentProvider provider = fTextEditor.getDocumentProvider(); IAnnotationModel model = provider.getAnnotationModel(fTextEditor.getEditorInput()); ! if (model instanceof AbstractMarkerAnnotationModel) { ! return (AbstractMarkerAnnotationModel) model; ! } return null; } --- 169,173 ---- IDocumentProvider provider = fTextEditor.getDocumentProvider(); IAnnotationModel model = provider.getAnnotationModel(fTextEditor.getEditorInput()); ! if (model instanceof AbstractMarkerAnnotationModel) { return (AbstractMarkerAnnotationModel) model; } return null; } *************** *** 175,179 **** /** * Returns the <code>IDocument</code> of the editor's input. ! * * @return the document of the editor's input */ --- 175,179 ---- /** * Returns the <code>IDocument</code> of the editor's input. ! * * @return the document of the editor's input */ *************** *** 203,208 **** DebugPlugin.getDefault().getBreakpointManager().removeBreakpoint(breakpoint, true); return; ! } catch (CoreException e) { ! } } --- 203,207 ---- DebugPlugin.getDefault().getBreakpointManager().removeBreakpoint(breakpoint, true); return; ! } catch (CoreException e) {} } |