use of com.intellij.xdebugger.breakpoints.ui.XBreakpointGroup 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.breakpoints.ui.XBreakpointGroup in project intellij-community by JetBrains.
the class BreakpointsTreeCellRenderer method customizeRenderer.
private static void customizeRenderer(Project project, Object value, boolean selected, boolean expanded, ColoredTreeCellRenderer renderer) {
if (value instanceof BreakpointItemNode) {
BreakpointItemNode node = (BreakpointItemNode) value;
BreakpointItem breakpoint = node.getBreakpointItem();
breakpoint.setupRenderer(renderer, project, selected);
} else if (value instanceof BreakpointsGroupNode) {
XBreakpointGroup group = ((BreakpointsGroupNode) value).getGroup();
renderer.setIcon(group.getIcon(expanded));
if (group instanceof XBreakpointCustomGroup && ((XBreakpointCustomGroup) group).isDefault()) {
renderer.append(group.getName(), SIMPLE_CELL_ATTRIBUTES_BOLD);
} else {
renderer.append(group.getName(), SimpleTextAttributes.SIMPLE_CELL_ATTRIBUTES);
}
}
}
use of com.intellij.xdebugger.breakpoints.ui.XBreakpointGroup in project intellij-community by JetBrains.
the class BreakpointItemsTreeController method getOrCreateGroupNode.
private static BreakpointsGroupNode getOrCreateGroupNode(CheckedTreeNode parent, final XBreakpointGroup group, final int level) {
Enumeration children = parent.children();
while (children.hasMoreElements()) {
Object element = children.nextElement();
if (element instanceof BreakpointsGroupNode) {
XBreakpointGroup groupFound = ((BreakpointsGroupNode) element).getGroup();
if (groupFound.equals(group)) {
return (BreakpointsGroupNode) element;
}
}
}
BreakpointsGroupNode groupNode = new BreakpointsGroupNode<>(group, level);
parent.add(groupNode);
return groupNode;
}
Aggregations