public class EditorRules extends Object implements XJTreeDelegate
| Modifier and Type | Class and Description |
|---|---|
class |
EditorRules.RuleMoveDownAction |
class |
EditorRules.RuleMoveUpAction |
static class |
EditorRules.RulesTableRenderer |
static class |
EditorRules.RuleTree |
class |
EditorRules.RuleTreeMouseListener |
class |
EditorRules.RuleTreeSelectionListener |
static class |
EditorRules.RuleTreeUserObject |
| Modifier and Type | Field and Description |
|---|---|
static Color |
HIGHLIGHTED_COLOR |
protected boolean |
programmaticallySelectingRule |
protected XJTree |
rulesTree |
protected List<String> |
rulesTreeExpandedNodes |
protected DefaultTreeModel |
rulesTreeModel |
protected DefaultMutableTreeNode |
rulesTreeRootNode |
protected EditorRules.RuleTreeUserObject |
selectedObject |
protected boolean |
selectNextRule |
protected boolean |
sort |
protected GrammarWindow |
window |
| Constructor and Description |
|---|
EditorRules(GrammarWindow window) |
protected GrammarWindow window
protected boolean programmaticallySelectingRule
protected boolean selectNextRule
protected XJTree rulesTree
protected DefaultMutableTreeNode rulesTreeRootNode
protected DefaultTreeModel rulesTreeModel
protected EditorRules.RuleTreeUserObject selectedObject
protected boolean sort
public static final Color HIGHLIGHTED_COLOR
public EditorRules(GrammarWindow window)
public void close()
public JScrollPane getComponent()
public void setKeyBindings(ATEKeyBindings keyBindings)
public GrammarEngine getGrammarEngine()
public boolean isSorted()
public void setSorted(boolean flag)
public void toggleSorting()
public void ignoreSelectedRules(boolean flag)
public void findTokensToIgnore(boolean reset)
public static void findTokensToIgnore(List<ElementRule> rules, boolean reset)
public boolean getFirstSelectedRuleIgnoredFlag()
public void refreshRules()
public ElementGroup getSelectedGroup()
public ElementGroup findOpenGroupClosestToLocation(int location)
public ElementGroup findClosingGroupForGroup(ElementGroup group)
public List<ElementRule> getRules()
public List<ElementRule> getSortedRules()
public List<ElementRule> getSortedRules(List<ElementRule> rules)
public List<ElementRule> getSelectedRules()
public ElementRule getLastRule()
public ElementRule getLastParserRule()
public ElementRule getLastLexerRule()
public List<ElementReference> getReferencesInRule(ElementRule rule)
public ElementRule getEnclosingRuleAtPosition(int pos)
public ElementRule selectRuleInTreeAtPosition(int pos)
public ElementRule selectRuleNameInTree(String name)
public ElementRule getRuleAtIndex(int index)
public boolean isRuleAtIndex(int index)
public void selectNextRule()
public void selectRuleInTree(ElementRule rule)
public void goToRule(ElementRule rule)
public void rebuildTree()
public void rememberSelectedTreeItem()
public void restoreSelectedTreeItem()
public void saveExpandedNodes()
public void restoreExpandedNodes()
public DefaultMutableTreeNode findNodeWithGroupName(String groupName)
public DefaultMutableTreeNode findNodeWithRuleName(String ruleName)
protected void buildTree(DefaultMutableTreeNode parentNode, List<ElementRule> rules, int from, int to)
public void parserDidParse()
public boolean moveRule(ElementRule sourceRule, ElementRule targetRule, boolean dropAbove)
public void selectRuleFromUserAction()
public Cursor xjTreeDragSourceDefaultCursor(XJTree tree)
xjTreeDragSourceDefaultCursor in interface XJTreeDelegatepublic int xjTreeDragAndDropConstants(XJTree tree)
xjTreeDragAndDropConstants in interface XJTreeDelegatepublic boolean xjTreeDrop(XJTree tree, Object sourceObject, Object targetObject, int dropLocation)
xjTreeDrop in interface XJTreeDelegateCopyright © 2013. All rights reserved.