コード例 #1
0
  private void collectGroupingRules() {
    for (BreakpointPanelProvider provider : myBreakpointsPanelProviders) {
      provider.createBreakpointsGroupingRules(myRulesAvailable);
    }

    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));
      }
    }
  }
コード例 #2
0
 @Override
 public int compare(XBreakpointGroupingRule o1, XBreakpointGroupingRule o2) {
   final int res = o2.getPriority() - o1.getPriority();
   return res != 0 ? res : (o1.getId().compareTo(o2.getId()));
 }
コード例 #3
0
 public ToggleBreakpointGroupingRuleEnabledAction(XBreakpointGroupingRule rule) {
   super(rule.getPresentableName(), rule.getIcon());
   myRule = rule;
   getTemplatePresentation().setText(rule.getPresentableName());
 }