return !(selectedRules == null || selectedRules.isEmpty()) && (selectedRules.get(0)).ignored;
}
public class RuleMoveUpAction extends AbstractAction {
public void actionPerformed(ActionEvent event) {
ElementRule sourceRule = getEnclosingRuleAtPosition(window.getCaretPosition());
int previousRuleIndex = getGrammarEngine().getRules().indexOf(sourceRule)-1;
if(previousRuleIndex>=0) {
ElementRule targetRule = getGrammarEngine().getRuleAtIndex(previousRuleIndex);
moveRule(sourceRule, targetRule, true);
}
}