use of com.intellij.xdebugger.impl.DebuggerSupport in project intellij-community by JetBrains.
the class MuteBreakpointAction method update.
@Override
public void update(@NotNull final AnActionEvent e) {
super.update(e);
Project project = e.getData(CommonDataKeys.PROJECT);
if (project != null) {
for (DebuggerSupport support : DebuggerSupport.getDebuggerSupports()) {
DebuggerToggleActionHandler handler = support.getMuteBreakpointsHandler();
if (handler.isEnabled(project, e)) {
e.getPresentation().setEnabled(true);
return;
}
}
}
e.getPresentation().setEnabled(false);
}
use of com.intellij.xdebugger.impl.DebuggerSupport in project intellij-community by JetBrains.
the class BreakpointsFavoriteListProvider method handle.
@Override
public void handle(@NotNull CommonActionsPanel.Buttons type, Project project, @NotNull Set<Object> selectedObjects, JComponent component) {
Rectangle bounds = component.getBounds();
if (component instanceof JTree) {
JTree tree = (JTree) component;
bounds = tree.getRowBounds(tree.getLeadSelectionRow());
bounds.y += bounds.height / 2;
bounds = tree.getVisibleRect().intersection(bounds);
}
Point whereToShow = new Point((int) bounds.getCenterX(), (int) bounds.getCenterY());
switch(type) {
case EDIT:
BreakpointItem breakpointItem = (BreakpointItem) ((AbstractTreeNode) selectedObjects.iterator().next()).getValue();
DebuggerSupport debuggerSupport = XBreakpointUtil.getDebuggerSupport(myProject, breakpointItem);
if (debuggerSupport == null || breakpointItem == null)
return;
debuggerSupport.getEditBreakpointAction().editBreakpoint(myProject, component, whereToShow, breakpointItem);
break;
case REMOVE:
for (Object selectedObject : selectedObjects) {
BreakpointItem removeBreakpointItem = (BreakpointItem) ((AbstractTreeNode) selectedObject).getValue();
removeBreakpointItem.removed(myProject);
}
break;
default:
break;
}
}
Aggregations