Search in sources :

Example 1 with XBreakpointGroup

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));
    }
}
Also used : BreakpointItem(com.intellij.xdebugger.impl.breakpoints.ui.BreakpointItem) XBreakpointGroupingRule(com.intellij.xdebugger.breakpoints.ui.XBreakpointGroupingRule) XBreakpointGroup(com.intellij.xdebugger.breakpoints.ui.XBreakpointGroup)

Example 2 with XBreakpointGroup

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);
        }
    }
}
Also used : XBreakpointCustomGroup(com.intellij.xdebugger.impl.breakpoints.ui.grouping.XBreakpointCustomGroup) BreakpointItem(com.intellij.xdebugger.impl.breakpoints.ui.BreakpointItem) XBreakpointGroup(com.intellij.xdebugger.breakpoints.ui.XBreakpointGroup)

Example 3 with XBreakpointGroup

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;
}
Also used : XBreakpointGroup(com.intellij.xdebugger.breakpoints.ui.XBreakpointGroup)

Aggregations

XBreakpointGroup (com.intellij.xdebugger.breakpoints.ui.XBreakpointGroup)3 BreakpointItem (com.intellij.xdebugger.impl.breakpoints.ui.BreakpointItem)2 XBreakpointGroupingRule (com.intellij.xdebugger.breakpoints.ui.XBreakpointGroupingRule)1 XBreakpointCustomGroup (com.intellij.xdebugger.impl.breakpoints.ui.grouping.XBreakpointCustomGroup)1