use of com.intellij.application.options.codeStyle.arrangement.match.ArrangementMatchingRulesControl in project intellij-community by JetBrains.
the class EditArrangementRuleAction method update.
@Override
public void update(AnActionEvent e) {
ArrangementMatchingRulesControl control = getRulesControl(e);
e.getPresentation().setEnabled(control != null && control.getSelectedModelRows().size() == 1);
}
use of com.intellij.application.options.codeStyle.arrangement.match.ArrangementMatchingRulesControl in project intellij-community by JetBrains.
the class RemoveArrangementRuleAction method update.
@Override
public void update(AnActionEvent e) {
ArrangementMatchingRulesControl control = getRulesControl(e);
e.getPresentation().setEnabled(control != null && !control.getSelectedModelRows().isEmpty() && control.getEditingRow() == -1);
}
use of com.intellij.application.options.codeStyle.arrangement.match.ArrangementMatchingRulesControl in project intellij-community by JetBrains.
the class AddArrangementRuleAction method update.
@Override
public void update(AnActionEvent e) {
ArrangementMatchingRulesControl control = getRulesControl(e);
e.getPresentation().setEnabled(control != null);
}
use of com.intellij.application.options.codeStyle.arrangement.match.ArrangementMatchingRulesControl in project intellij-community by JetBrains.
the class EditArrangementRuleAction method actionPerformed.
@Override
public void actionPerformed(AnActionEvent e) {
ArrangementMatchingRulesControl control = getRulesControl(e);
if (control == null) {
return;
}
TIntArrayList rows = control.getSelectedModelRows();
if (rows.size() != 1) {
return;
}
final int row = rows.get(0);
control.showEditor(row);
scrollRowToVisible(control, row);
}
Aggregations