public void dispose() { final KeyStroke[] treeStrokes = getRegisteredKeyStrokes(); for (KeyStroke stroke : treeStrokes) { unregisterKeyboardAction(stroke); } myBreakpointManager.removeBreakpointManagerListener(myNodeUpdateListener); }
@Override protected void onNodeStateChanged(final CheckedTreeNode node) { final Object descriptor = node.getUserObject(); final Breakpoint breakpoint; if (descriptor instanceof BreakpointDescriptor) { breakpoint = ((BreakpointDescriptor) descriptor).getBreakpoint(); if (myBreakpointManager.findMasterBreakpoint(breakpoint) != null) { return; } } else { breakpoint = null; } if (breakpoint != null) { myBreakpointManager.setBreakpointEnabled(breakpoint, node.isChecked()); } }
public BreakpointTree(final Project project) { super(new BreakpointTreeCellRenderer(), new CheckedTreeNode(new RootDescriptor())); myRootNode = (CheckedTreeNode) getModel().getRoot(); myDescriptorToNodeMap.put((TreeDescriptor) myRootNode.getUserObject(), myRootNode); myBreakpointManager = DebuggerManagerEx.getInstanceEx(project).getBreakpointManager(); myNodeUpdateListener = new BreakpointManagerListener() { public void breakpointsChanged() { repaint(); } }; myBreakpointManager.addBreakpointManagerListener(myNodeUpdateListener); getEmptyText().setText(XDebuggerBundle.message("debugger.no.breakpoints")); }