/** * Creates an "invisible" line breakpoint. */ IBreakpoint createMagicBreakpoint(String typeName) throws CoreException{ //set a breakpoint on the Thread.sleep(100); line of the nop method of ScrapbookMain fMagicBreakpoint= JDIDebugModel.createLineBreakpoint(ResourcesPlugin.getWorkspace().getRoot(), typeName, 59, -1, -1, 0, false, null); fMagicBreakpoint.setPersisted(false); return fMagicBreakpoint; }
private void createLineBreakpoint(IResource resource, String typeName, int offset, int lineNumber, int charStart, int charEnd, int hitCount, boolean register, Map attributes, IDocument document, boolean bestMatch, IType type, IEditorPart editorPart) throws CoreException { IJavaLineBreakpoint breakpoint = JDIDebugModel.createLineBreakpoint(resource, typeName, lineNumber, charStart, charEnd, hitCount, register, attributes); new BreakpointLocationVerifierJob(document, breakpoint, offset, lineNumber, typeName, type, resource, editorPart).schedule(); }
/** * Create a new breakpoint at the right position. */ private void createNewBreakpoint(int lineNumber, String typeName) throws CoreException { Map newAttributes = new HashMap(10); if (fType != null) { try { IRegion line= fDocument.getLineInformation(lineNumber - 1); int start= line.getOffset(); int end= start + line.getLength() - 1; BreakpointUtils.addJavaBreakpointAttributesWithMemberDetails(newAttributes, fType, start, end); } catch (BadLocationException ble) { JDIDebugUIPlugin.log(ble); } } JDIDebugModel.createLineBreakpoint(fResource, typeName, lineNumber, -1, -1, 0, true, newAttributes); }
/** * Create a new breakpoint at the right position. */ private void createNewBreakpoint(int lineNumber, String typeName) throws CoreException { Map newAttributes = new HashMap(10); if (fType != null) { try { IRegion line= fDocument.getLineInformation(lineNumber - 1); int start= line.getOffset(); int end= start + line.getLength() - 1; BreakpointUtils.addJavaBreakpointAttributesWithMemberDetails(newAttributes, fType, start, end); } catch (BadLocationException ble) { JDIDebugUIPlugin.log(ble); } } JDIDebugModel.createLineBreakpoint(fResource, typeName, lineNumber, -1, -1, 0, true, newAttributes); }
Map attributes = new HashMap(4); BreakpointUtils.addRunToLineAttributes(attributes); breakpoint= JDIDebugModel.createLineBreakpoint(ResourcesPlugin.getWorkspace().getRoot(), typeName[0], lineNumber[0], -1, -1, 1, false, attributes); errorMessage = ActionMessages.RunToLineAdapter_2; if (target instanceof IAdaptable) {
public Change perform(IProgressMonitor pm) throws CoreException { IResource resource = BreakpointUtils.getBreakpointResource(fDestType); Map map = new HashMap(); BreakpointUtils.addJavaBreakpointAttributes(map, fDestType); IJavaLineBreakpoint breakpoint = JDIDebugModel.createLineBreakpoint( resource, fDestType.getFullyQualifiedName(), getLineNumber(), getCharStart(), getCharEnd(), 0, true, map); apply(breakpoint); getOriginalBreakpoint().delete(); return new DeleteBreakpointChange(breakpoint); }
IJavaLineBreakpoint breakpoint = JDIDebugModel.createLineBreakpoint(resource, tname, lnumber, -1, -1, 0, true, attributes); new BreakpointLocationVerifierJob(document, breakpoint, lnumber, bestMatch, tname, type, resource, editor).schedule();