use of com.intellij.xdebugger.breakpoints.ui.XBreakpointGroupingRule in project intellij-community by JetBrains.
the class BreakpointsDialog method collectGroupingRules.
private void collectGroupingRules() {
for (BreakpointPanelProvider provider : myBreakpointsPanelProviders) {
provider.createBreakpointsGroupingRules(myRulesAvailable);
}
myRulesAvailable.sort(XBreakpointGroupingRule.PRIORITY_COMPARATOR);
myRulesEnabled.clear();
XBreakpointsDialogState settings = (getBreakpointManager()).getBreakpointsDialogSettings();
for (XBreakpointGroupingRule rule : myRulesAvailable) {
if (rule.isAlwaysEnabled() || (settings != null && settings.getSelectedGroupingRules().contains(rule.getId()))) {
myRulesEnabled.add(rule);
}
}
for (XBreakpointGroupingRule rule : myRulesAvailable) {
if (!rule.isAlwaysEnabled()) {
myToggleRuleActions.add(new ToggleBreakpointGroupingRuleEnabledAction(rule));
}
}
}
use of com.intellij.xdebugger.breakpoints.ui.XBreakpointGroupingRule 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.XBreakpointGroupingRule in project intellij-community by JetBrains.
the class BreakpointsDialog method saveBreakpointsDialogState.
private void saveBreakpointsDialogState() {
final XBreakpointsDialogState dialogState = new XBreakpointsDialogState();
saveTreeState(dialogState);
final List<XBreakpointGroupingRule> rulesEnabled = ContainerUtil.filter(myRulesEnabled, rule -> !rule.isAlwaysEnabled());
dialogState.setSelectedGroupingRules(new HashSet<>(ContainerUtil.map(rulesEnabled, rule -> rule.getId())));
getBreakpointManager().setBreakpointsDialogSettings(dialogState);
}
use of com.intellij.xdebugger.breakpoints.ui.XBreakpointGroupingRule in project intellij-community by JetBrains.
the class BreakpointsFavoriteListProvider method getEnabledGroupingRules.
private void getEnabledGroupingRules(Collection<XBreakpointGroupingRule> rules) {
rules.clear();
XBreakpointsDialogState settings = ((XBreakpointManagerImpl) XDebuggerManager.getInstance(myProject).getBreakpointManager()).getBreakpointsDialogSettings();
for (XBreakpointGroupingRule rule : myRulesAvailable) {
if (rule.isAlwaysEnabled() || (settings != null && settings.getSelectedGroupingRules().contains(rule.getId()))) {
rules.add(rule);
}
}
}
Aggregations