use of com.intellij.xdebugger.impl.breakpoints.ui.BreakpointItem in project intellij-community by JetBrains.
the class XBreakpointUtil method getDebuggerSupport.
@Nullable
public static DebuggerSupport getDebuggerSupport(Project project, BreakpointItem breakpointItem) {
DebuggerSupport[] debuggerSupports = DebuggerSupport.getDebuggerSupports();
List<BreakpointItem> items = new ArrayList<>();
for (DebuggerSupport support : debuggerSupports) {
support.getBreakpointPanelProvider().provideBreakpointItems(project, items);
if (items.contains(breakpointItem)) {
return support;
}
items.clear();
}
return null;
}
use of com.intellij.xdebugger.impl.breakpoints.ui.BreakpointItem in project intellij-community by JetBrains.
the class BreakpointsFavoriteListProvider method customizeRenderer.
@Override
public void customizeRenderer(ColoredTreeCellRenderer renderer, JTree tree, @NotNull Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
renderer.clear();
renderer.setIcon(AllIcons.Debugger.Db_set_breakpoint);
if (value instanceof BreakpointItem) {
BreakpointItem breakpointItem = (BreakpointItem) value;
breakpointItem.setupGenericRenderer(renderer, true);
} else if (value instanceof XBreakpointGroup) {
renderer.append(((XBreakpointGroup) value).getName());
renderer.setIcon(((XBreakpointGroup) value).getIcon(expanded));
} else if (value instanceof XBreakpointGroupingRule) {
renderer.append(((XBreakpointGroupingRule) value).getPresentableName());
} else {
renderer.append(String.valueOf(value));
}
}
use of com.intellij.xdebugger.impl.breakpoints.ui.BreakpointItem in project intellij-community by JetBrains.
the class BreakpointsFavoriteListProvider method updateChildren.
private void updateChildren() {
if (myProject.isDisposed())
return;
myChildren.clear();
List<BreakpointItem> items = new ArrayList<>();
for (final BreakpointPanelProvider provider : myBreakpointPanelProviders) {
provider.provideBreakpointItems(myProject, items);
}
getEnabledGroupingRules(myRulesEnabled);
myTreeController.setGroupingRules(myRulesEnabled);
myTreeController.rebuildTree(items);
CheckedTreeNode root = myTreeController.getRoot();
for (int i = 0; i < root.getChildCount(); i++) {
TreeNode child = root.getChildAt(i);
if (child instanceof DefaultMutableTreeNode) {
replicate((DefaultMutableTreeNode) child, myNode, myChildren);
}
}
myFavoritesManager.fireListeners(getListName(myProject));
}
use of com.intellij.xdebugger.impl.breakpoints.ui.BreakpointItem in project intellij-community by JetBrains.
the class BreakpointItemsTreeController method removeSelectedBreakpoints.
public void removeSelectedBreakpoints(Project project) {
final TreePath[] paths = myTreeView.getSelectionPaths();
if (paths == null)
return;
final List<BreakpointItem> breakpoints = getSelectedBreakpoints(true);
for (TreePath path : paths) {
final Object node = path.getLastPathComponent();
if (node instanceof BreakpointItemNode) {
final BreakpointItem item = ((BreakpointItemNode) node).getBreakpointItem();
if (!item.allowedToRemove()) {
TreeUtil.unselect(myTreeView, (DefaultMutableTreeNode) node);
breakpoints.remove(item);
}
}
}
if (breakpoints.isEmpty())
return;
TreeUtil.removeSelected(myTreeView);
for (BreakpointItem breakpoint : breakpoints) {
breakpoint.removed(project);
}
}
use of com.intellij.xdebugger.impl.breakpoints.ui.BreakpointItem in project intellij-community by JetBrains.
the class BreakpointsCheckboxTree method convertValueToText.
public String convertValueToText(Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
if (value instanceof BreakpointItemNode) {
final BreakpointItem breakpointItem = ((BreakpointItemNode) value).getBreakpointItem();
final String displayText = breakpointItem != null ? breakpointItem.getDisplayText() : null;
if (!StringUtil.isEmptyOrSpaces(displayText)) {
return displayText;
}
}
return super.convertValueToText(value, selected, expanded, leaf, row, hasFocus);
}
Aggregations