use of com.intellij.xdebugger.impl.breakpoints.XBreakpointsDialogState 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.impl.breakpoints.XBreakpointsDialogState 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.impl.breakpoints.XBreakpointsDialogState in project intellij-community by JetBrains.
the class BreakpointsDialog method initSelection.
void initSelection(Collection<BreakpointItem> breakpoints) {
XBreakpointsDialogState settings = (getBreakpointManager()).getBreakpointsDialogSettings();
if (settings != null && settings.getTreeState() != null) {
settings.getTreeState().applyTo(myTreeController.getTreeView());
if (myTreeController.getTreeView().getSelectionCount() == 0) {
myTreeController.selectFirstBreakpointItem();
}
} else {
TreeUtil.expandAll(myTreeController.getTreeView());
myTreeController.selectFirstBreakpointItem();
}
selectBreakpoint(myInitialBreakpoint);
}
Aggregations