use of com.intellij.xdebugger.breakpoints.XBreakpoint in project intellij-community by JetBrains.
the class PyExceptionBreakpointType method addBreakpoint.
@Override
public XBreakpoint<PyExceptionBreakpointProperties> addBreakpoint(final Project project, JComponent parentComponent) {
final PyClassTreeChooserDialog dialog = new PyClassTreeChooserDialog("Select Exception Class", project, GlobalSearchScope.allScope(project), new PyExceptionCachingFilter(), null);
dialog.showDialog();
// on ok
final PyClass pyClass = dialog.getSelected();
if (pyClass != null) {
final String qualifiedName = pyClass.getQualifiedName();
assert qualifiedName != null : "Qualified name of the class shouldn't be null";
return ApplicationManager.getApplication().runWriteAction(new Computable<XBreakpoint<PyExceptionBreakpointProperties>>() {
@Override
public XBreakpoint<PyExceptionBreakpointProperties> compute() {
return XDebuggerManager.getInstance(project).getBreakpointManager().addBreakpoint(PyExceptionBreakpointType.this, new PyExceptionBreakpointProperties(qualifiedName));
}
});
}
return null;
}
Aggregations