Search in sources :

Example 1 with GroupNode

use of com.intellij.usages.impl.GroupNode in project intellij-community by JetBrains.

the class ShowUsagesTableCellRenderer method appendGroupText.

private void appendGroupText(JTable table, final GroupNode node, JPanel panel, Color fileBgColor, boolean isSelected) {
    UsageGroup group = node == null ? null : node.getGroup();
    if (group == null)
        return;
    GroupNode parentGroup = (GroupNode) node.getParent();
    appendGroupText(table, parentGroup, panel, fileBgColor, isSelected);
    if (node.canNavigateToSource()) {
        SimpleColoredComponent renderer = new SimpleColoredComponent();
        renderer.setIcon(group.getIcon(false));
        SimpleTextAttributes attributes = deriveAttributesWithColor(SimpleTextAttributes.REGULAR_ATTRIBUTES, fileBgColor);
        renderer.append(group.getText(myUsageView), attributes);
        renderer.setBorder(null);
        SpeedSearchUtil.applySpeedSearchHighlighting(table, renderer, false, isSelected);
        panel.add(renderer);
    }
}
Also used : UsageGroup(com.intellij.usages.UsageGroup) SimpleTextAttributes(com.intellij.ui.SimpleTextAttributes) GroupNode(com.intellij.usages.impl.GroupNode) SimpleColoredComponent(com.intellij.ui.SimpleColoredComponent)

Aggregations

SimpleColoredComponent (com.intellij.ui.SimpleColoredComponent)1 SimpleTextAttributes (com.intellij.ui.SimpleTextAttributes)1 UsageGroup (com.intellij.usages.UsageGroup)1 GroupNode (com.intellij.usages.impl.GroupNode)1