protected IStatus run(IProgressMonitor monitor) { try { JDIDebugModel.createExceptionBreakpoint(resource, type.getFullyQualifiedName(), caught, uncaught, isChecked(type), true, map); return Status.OK_STATUS; } catch (CoreException e) { return e.getStatus(); } }
protected IStatus run(IProgressMonitor monitor) { MultiStatus status = new MultiStatus(JDIDebugUIPlugin.getUniqueIdentifier(), IJavaDebugUIConstants.INTERNAL_ERROR, DebugUIMessages.JavaDebugOptionsManager_1, null); // compilation error breakpoint try { IJavaExceptionBreakpoint bp = JDIDebugModel.createExceptionBreakpoint(ResourcesPlugin.getWorkspace().getRoot(),"java.lang.Error", true, true, false, false, null); //$NON-NLS-1$ bp.setPersisted(false); setSuspendOnCompilationErrorsBreakpoint(bp); } catch (CoreException e) { status.add(e.getStatus()); } // uncaught exception breakpoint try { IJavaExceptionBreakpoint bp = JDIDebugModel.createExceptionBreakpoint(ResourcesPlugin.getWorkspace().getRoot(),"java.lang.Throwable", false, true, false, false, null); //$NON-NLS-1$ ((JavaExceptionBreakpoint)bp).setSuspendOnSubclasses(true); bp.setPersisted(false); setSuspendOnUncaughtExceptionBreakpoint(bp); } catch (CoreException e) { status.add(e.getStatus()); } if (status.getChildren().length == 0) { return Status.OK_STATUS; } return status; } }
protected void processSearchResult(Object source, String typeName, int lineNumber) { try { IResource res = ResourcesPlugin.getWorkspace().getRoot(); IType type = null; if (source instanceof ICompilationUnit) { type = ((ICompilationUnit) source).findPrimaryType(); } else if (source instanceof IClassFile) { type = ((IClassFile) source).getType(); } else if (source instanceof IType) { type = (IType) source; } if (type != null) { res = BreakpointUtils.getBreakpointResource(type); } Map map = new HashMap(); map.put(JavaBreakpointPage.ATTR_DELETE_ON_CANCEL, JavaBreakpointPage.ATTR_DELETE_ON_CANCEL); IJavaExceptionBreakpoint breakpoint = JDIDebugModel .createExceptionBreakpoint(res, fExceptionName, true, true, AddExceptionAction.isChecked(type), false, map); showProperties(breakpoint); } catch (CoreException e) { JDIDebugUIPlugin.statusDialog(e.getStatus()); } }
public Change perform(IProgressMonitor pm) throws CoreException { Map map = new HashMap(); BreakpointUtils.addJavaBreakpointAttributes(map, fDestType); IResource resource = BreakpointUtils.getBreakpointResource(fDestType); IJavaExceptionBreakpoint breakpoint = JDIDebugModel.createExceptionBreakpoint( resource, fDestType.getFullyQualifiedName(), isCaught(), isUncaught(), isChecked(), true, map); apply(breakpoint); getOriginalBreakpoint().delete(); return new DeleteBreakpointChange(breakpoint); }