public ExceptionBreakpointChange(IJavaExceptionBreakpoint breakpoint) throws CoreException { super(breakpoint); fExclusionFilters = breakpoint.getExclusionFilters(); fInclusionFilters = breakpoint.getInclusionFilters(); fCaught = breakpoint.isCaught(); fUncaught = breakpoint.isUncaught(); fChecked = breakpoint.isChecked(); }
protected void apply(IJavaExceptionBreakpoint breakpoint) throws CoreException { super.apply(breakpoint); breakpoint.setExclusionFilters(fExclusionFilters); breakpoint.setInclusionFilters(fInclusionFilters); breakpoint.setCaught(fCaught); breakpoint.setUncaught(fUncaught); }
/** * @see BreakpointToggleAction#doAction(IJavaBreakpoint) */ public void doAction(IJavaBreakpoint breakpoint) throws CoreException { //will only be called after isEnabledFor so cast is safe IJavaExceptionBreakpoint exception= (IJavaExceptionBreakpoint)breakpoint; exception.setUncaught(!exception.isUncaught()); }
/** * @see BreakpointToggleAction#doAction(IJavaBreakpoint) */ public void doAction(IJavaBreakpoint breakpoint) throws CoreException { //will only be called after isEnabledFor so cast is safe IJavaExceptionBreakpoint exception= (IJavaExceptionBreakpoint)breakpoint; exception.setCaught(!exception.isCaught()); }
/** * @see org.eclipse.jdt.internal.debug.ui.propertypages.JavaBreakpointPage#doStore() */ protected void doStore() throws CoreException { super.doStore(); IJavaExceptionBreakpoint breakpoint= (IJavaExceptionBreakpoint) getBreakpoint(); boolean caught= fCaughtButton.getSelection(); if (caught != breakpoint.isCaught()) { breakpoint.setCaught(caught); } boolean uncaught= fUncaughtButton.getSelection(); if (uncaught != breakpoint.isUncaught()) { breakpoint.setUncaught(uncaught); } // TODO remove cast once the API freeze is over and the method has been added to IJavaExceptionBreakpoint boolean suspend = fSuspendOnSubclasses.getSelection(); if(suspend != ((JavaExceptionBreakpoint)breakpoint).isSuspendOnSubclasses()) { ((JavaExceptionBreakpoint)breakpoint).setSuspendOnSubclasses(suspend); } }
protected void populateFilters() { String[] iFilters = null; String[] eFilters = null; try { iFilters = fBreakpoint.getInclusionFilters(); eFilters = fBreakpoint.getExclusionFilters(); } catch (CoreException ce) { JDIDebugUIPlugin.log(ce); iFilters = new String[] { }; eFilters = new String[] { }; } fFilters = new ArrayList(); populateFilters(iFilters, true); populateFilters(eFilters, false); }
protected void doStore() { Object[] filters = fFilterContentProvider.getElements(null); List inclusionFilters = new ArrayList(filters.length); List exclusionFilters = new ArrayList(filters.length); for (int i = 0; i < filters.length; i++) { Filter filter = (Filter) filters[i]; String name = filter.getName(); if (name.equals(DEFAULT_PACKAGE)) { name = ""; //$NON-NLS-1$ } if (filter.isChecked()) { inclusionFilters.add(name); } else { exclusionFilters.add(name); } } try { fBreakpoint.setInclusionFilters((String[]) inclusionFilters.toArray(new String[inclusionFilters.size()])); fBreakpoint.setExclusionFilters((String[]) exclusionFilters.toArray(new String[exclusionFilters.size()])); } catch (CoreException ce) { JDIDebugUIPlugin.log(ce); } }
if (breakpoint instanceof IJavaExceptionBreakpoint) { IJavaExceptionBreakpoint exBreakpoint= (IJavaExceptionBreakpoint)breakpoint; String[] current= exBreakpoint.getExclusionFilters(); String[] newFilters= new String[current.length+1]; System.arraycopy(current, 0, newFilters, 0, current.length); newFilters[current.length]= newFilter; exBreakpoint.setExclusionFilters(newFilters); action.setEnabled(false);
fCaughtButton= createCheckButton(parent, PropertyPageMessages.JavaExceptionBreakpointPage_0); try { fCaughtButton.setSelection(breakpoint.isCaught()); } catch (CoreException e) { JDIDebugPlugin.log(e); fUncaughtButton= createCheckButton(parent, PropertyPageMessages.JavaExceptionBreakpointPage_1); try { fUncaughtButton.setSelection(breakpoint.isUncaught()); } catch (CoreException e) { JDIDebugPlugin.log(e);
if (breakpoint == getSuspendOnCompilationErrorBreakpoint()) { IJavaExceptionBreakpoint exception = (IJavaExceptionBreakpoint) breakpoint; if (exception.getExceptionTypeName().equals("java.lang.Error")) { //$NON-NLS-1$
/** * @see BreakpointToggleAction#getToggleState(IJavaBreakpoint) */ protected boolean getToggleState(IJavaBreakpoint breakpoint) throws CoreException { //will only be called after isEnabledFor so cast is safe IJavaExceptionBreakpoint exception= (IJavaExceptionBreakpoint)breakpoint; return exception.isCaught(); }
/** * @see BreakpointToggleAction#getToggleState(IJavaBreakpoint) */ protected boolean getToggleState(IJavaBreakpoint breakpoint) throws CoreException { //will only be called after isEnabledFor so cast is safe IJavaExceptionBreakpoint exception= (IJavaExceptionBreakpoint)breakpoint; return exception.isUncaught(); }
/** * @see org.eclipse.debug.ui.console.IConsoleHyperlink#linkActivated() */ public void linkActivated() { try { // check for an existing breakpoint IBreakpoint[] breakpoints = DebugPlugin.getDefault() .getBreakpointManager().getBreakpoints( JDIDebugModel.getPluginIdentifier()); for (int i = 0; i < breakpoints.length; i++) { IBreakpoint breakpoint = breakpoints[i]; if (breakpoint instanceof IJavaExceptionBreakpoint) { IJavaExceptionBreakpoint exceptionBreakpoint = (IJavaExceptionBreakpoint) breakpoint; if (fExceptionName .equals(exceptionBreakpoint.getTypeName())) { showProperties(exceptionBreakpoint); return; } } } // create a new exception breakpoint startSourceSearch(fExceptionName, -1); } catch (CoreException e) { JDIDebugUIPlugin.statusDialog(e.getStatus()); return; } }
protected Image getExceptionBreakpointImage(IJavaExceptionBreakpoint exception) throws CoreException { int flags= computeBreakpointAdornmentFlags(exception); JDIImageDescriptor descriptor= null; if ((flags & JDIImageDescriptor.ENABLED) == 0) { descriptor= new JDIImageDescriptor(getImageDescriptor(JavaDebugImages.IMG_OBJS_EXCEPTION_DISABLED), flags); } else if (exception.isChecked()) { descriptor= new JDIImageDescriptor(getImageDescriptor(JavaDebugImages.IMG_OBJS_EXCEPTION), flags); } else { descriptor= new JDIImageDescriptor(getImageDescriptor(JavaDebugImages.IMG_OBJS_ERROR), flags); } return getDebugImageRegistry().get(descriptor); }
String exName = ((IJavaExceptionBreakpoint)breakpoint).getExceptionTypeName(); if (exName == null) { exName = typeName;
protected String getExceptionBreakpointText(IJavaExceptionBreakpoint breakpoint) throws CoreException { StringBuffer buffer = new StringBuffer(); String typeName = breakpoint.getTypeName(); buffer.append(getQualifiedName(typeName)); appendHitCount(breakpoint, buffer); if (breakpoint.getExclusionFilters().length > 0 || breakpoint.getInclusionFilters().length > 0) { buffer.append(DebugUIMessages.JDIModelPresentation___scoped__1); boolean c= breakpoint.isCaught(); boolean u= breakpoint.isUncaught(); if (c && u) { state= DebugUIMessages.JDIModelPresentation_caught_and_uncaught_60;
IJavaObject lastException = ((JavaExceptionBreakpoint)exception).getLastException(); if (lastException != null) { IExpression exp = new JavaInspectExpression(exception.getExceptionTypeName(), lastException); Tree tree = (Tree) ((IDebugView)part).getViewer().getControl(); TreeItem[] selection2 = tree.getSelection();
if (eBreakpoint.isCaught()) { flags |= JDIImageDescriptor.CAUGHT; if (eBreakpoint.isUncaught()) { flags |= JDIImageDescriptor.UNCAUGHT; if (eBreakpoint.getExclusionFilters().length > 0 || eBreakpoint.getInclusionFilters().length > 0) { flags |= JDIImageDescriptor.SCOPED;