java.lang.Object
org.eclipse.jface.viewers.LabelProvider
com.port80.eclipse.editors.util.DefaultOutlineContentProvider
com.port80.eclipse.antlr.editors.AntlrModel
- All Implemented Interfaces:
- com.port80.eclipse.antlr.parser.IANTLRParserHandler, org.eclipse.jface.viewers.IBaseLabelProvider, org.eclipse.jface.viewers.IContentProvider, org.eclipse.jface.viewers.ILabelProvider, com.port80.eclipse.editors.util.IOutlineContentProvider, org.eclipse.jface.viewers.IStructuredContentProvider, org.eclipse.jface.viewers.ITreeContentProvider
- public class AntlrModel
- extends com.port80.eclipse.editors.util.DefaultOutlineContentProvider
- implements com.port80.eclipse.antlr.parser.IANTLRParserHandler
An ANTLR grammar file data model for AntlrOutlinePage.
| Fields inherited from class org.eclipse.jface.viewers.LabelProvider |
|
|
Method Summary |
void |
abortGrammar()
|
private void |
addKeywordRef(java.lang.String name,
com.port80.eclipse.editors.util.OutlineObject a)
|
private void |
addReference(java.lang.String name,
com.port80.eclipse.editors.util.OutlineObject a)
|
void |
beginAlt(boolean doAST_)
|
void |
beginChildList()
|
void |
beginExceptionGroup()
|
void |
beginExceptionSpec(antlr.Token label)
|
void |
beginSubRule(antlr.Token label,
antlr.Token start,
boolean not)
|
void |
beginTree(antlr.Token tok)
|
void |
defineRuleName(antlr.Token r,
java.lang.String access,
boolean ruleAST,
java.lang.String docComment)
|
void |
defineToken(antlr.Token tokname,
antlr.Token tokliteral)
|
void |
endAlt()
|
void |
endChildList()
|
void |
endExceptionGroup()
|
void |
endExceptionSpec()
|
void |
endGrammar()
|
void |
endOptions()
|
void |
endRule(java.lang.String r)
|
void |
endSubRule()
|
void |
endTree()
|
void |
error(java.lang.String msg,
java.lang.String filename,
int line,
int column)
|
private int |
findOffset(antlr.Token t)
|
int |
getErrors()
|
org.eclipse.swt.graphics.Image |
getImage(java.lang.Object a)
The LabelProvider implementation of this
ILabelProvider method returns null. |
java.util.List |
getKeywordRef(java.lang.String name)
|
java.util.Map |
getKeywordRefTable()
|
com.port80.eclipse.editors.util.OutlineObject |
getMethod(java.lang.String name)
|
java.lang.String |
getNode(java.lang.String name)
|
java.util.List |
getReference(java.lang.String name)
|
java.util.Map |
getRefTable()
|
com.port80.eclipse.editors.util.OutlineObject |
getRule(java.lang.String name)
|
java.util.Map |
getRuleTable()
|
java.util.List |
getTextOrderList()
|
com.port80.eclipse.editors.util.OutlineObject |
getToken(java.lang.String name)
|
java.util.Map |
getTokenTable()
|
int |
getWarnings()
|
void |
hasError()
|
void |
noASTSubRule()
|
void |
oneOrMoreSubRule()
|
void |
optionalSubRule()
|
void |
refAction(antlr.Token action)
|
void |
refArgAction(antlr.Token action)
|
void |
refCharLiteral(antlr.Token lit,
antlr.Token label,
boolean inverted,
int autoGenType,
boolean lastInRule)
|
void |
refCharRange(antlr.Token t1,
antlr.Token t2,
antlr.Token label,
int autoGenType,
boolean lastInRule)
|
void |
refElementOption(antlr.Token option,
antlr.Token value)
|
void |
refExceptionHandler(antlr.Token exTypeAndName,
antlr.Token action)
|
void |
refHeaderAction(antlr.Token name,
antlr.Token act)
|
void |
refInitAction(antlr.Token action)
|
void |
refKeyword(antlr.Token t)
|
void |
refMemberAction(antlr.Token act)
|
void |
refPreambleAction(antlr.Token act)
|
void |
refReturnAction(antlr.Token returnAction)
|
void |
refRule(antlr.Token idAssign,
antlr.Token r,
antlr.Token label,
antlr.Token arg,
int autoGenType)
|
void |
refSemPred(antlr.Token pred)
|
void |
refStringLiteral(antlr.Token lit,
antlr.Token label,
int autoGenType,
boolean lastInRule)
|
void |
refToken(antlr.Token assignId,
antlr.Token t,
antlr.Token label,
antlr.Token args,
boolean inverted,
int autoGenType,
boolean lastInRule)
|
void |
refTokenRange(antlr.Token t1,
antlr.Token t2,
antlr.Token label,
int autoGenType,
boolean lastInRule)
|
void |
refTokensSpecElementOption(antlr.Token tok,
antlr.Token option,
antlr.Token value)
|
void |
refTreeSpecifier(antlr.Token treeSpec)
|
void |
refWildcard(antlr.Token t,
antlr.Token label,
int autoGenType)
|
void |
setArgOfRuleRef(antlr.Token argaction)
|
void |
setCharVocabulary(antlr.collections.impl.BitSet b)
|
void |
setFileOption(antlr.Token key,
antlr.Token value,
java.lang.String filename)
|
void |
setGrammarOption(antlr.Token key,
antlr.Token value)
|
void |
setRuleOption(antlr.Token key,
antlr.Token value)
|
void |
setSubruleOption(antlr.Token key,
antlr.Token value)
|
void |
setUserExceptions(java.lang.String thr)
|
void |
startLexer(java.lang.String file,
antlr.Token name,
java.lang.String superClass,
java.lang.String doc)
|
void |
startParser(java.lang.String file,
antlr.Token name,
java.lang.String superClass,
java.lang.String doc)
|
void |
startTreeWalker(java.lang.String file,
antlr.Token name,
java.lang.String superClass,
java.lang.String doc)
|
void |
synPred()
|
void |
warning(java.lang.String msg,
java.lang.String filename,
int line,
int column)
|
void |
zeroOrMoreSubRule()
|
| Methods inherited from class com.port80.eclipse.editors.util.DefaultOutlineContentProvider |
dispose, findElement, findElement, getChildren, getElements, getEmpty, getParent, getRoot, getText, hasChildren, initExpandTree, inputChanged, setInput |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAME
private static final java.lang.String NAME
- See Also:
- Constant Field Values
ROOT
public static final int ROOT
- See Also:
- Constant Field Values
LEXER
public static final int LEXER
- See Also:
- Constant Field Values
PARSER
public static final int PARSER
- See Also:
- Constant Field Values
TREE_PARSER
public static final int TREE_PARSER
- See Also:
- Constant Field Values
TOKEN
public static final int TOKEN
- See Also:
- Constant Field Values
RULE
public static final int RULE
- See Also:
- Constant Field Values
TOKEN_REF
public static final int TOKEN_REF
- See Also:
- Constant Field Values
RULE_REF
public static final int RULE_REF
- See Also:
- Constant Field Values
KEYWORD_REF
public static final int KEYWORD_REF
- See Also:
- Constant Field Values
KIND_NAMES
public static final java.lang.String[] KIND_NAMES
ICONS
protected static final org.eclipse.swt.graphics.Image[] ICONS
- Icons for the item (without any java decoration).
ICON_ERROR
protected static org.eclipse.swt.graphics.Image ICON_ERROR
ERROR
protected static final int ERROR
- Status code.
- See Also:
- Constant Field Values
fTokenTable
private java.util.Map fTokenTable
fRuleTable
private java.util.Map fRuleTable
fNodeTable
private java.util.Map fNodeTable
fKeywordRefTable
private java.util.Map fKeywordRefTable
fRefTable
private java.util.Map fRefTable
fTextOrderList
private java.util.List fTextOrderList
fStack
private java.util.Stack fStack
fFolder
private com.port80.eclipse.editors.util.OutlineFolder fFolder
fEditor
private org.eclipse.ui.texteditor.ITextEditor fEditor
fViewer
private org.eclipse.jface.text.source.ISourceViewer fViewer
fDocument
private org.eclipse.jface.text.IDocument fDocument
fTabWidth
private int fTabWidth
fErrors
private int fErrors
fWarnings
private int fWarnings
AntlrModel
public AntlrModel()
AntlrModel
public AntlrModel(AntlrEditorConfiguration cf,
org.eclipse.jface.text.source.ISourceViewer viewer)
getImage
public org.eclipse.swt.graphics.Image getImage(java.lang.Object a)
- Description copied from class:
org.eclipse.jface.viewers.LabelProvider
- The
LabelProvider implementation of this
ILabelProvider method returns null. Subclasses may
override.
- Specified by:
getImage in interface org.eclipse.jface.viewers.ILabelProvider
getTextOrderList
public java.util.List getTextOrderList()
findOffset
private int findOffset(antlr.Token t)
addReference
private void addReference(java.lang.String name,
com.port80.eclipse.editors.util.OutlineObject a)
addKeywordRef
private void addKeywordRef(java.lang.String name,
com.port80.eclipse.editors.util.OutlineObject a)
getErrors
public int getErrors()
- Specified by:
getErrors in interface com.port80.eclipse.antlr.parser.IANTLRParserHandler
getWarnings
public int getWarnings()
getToken
public com.port80.eclipse.editors.util.OutlineObject getToken(java.lang.String name)
getRule
public com.port80.eclipse.editors.util.OutlineObject getRule(java.lang.String name)
getMethod
public com.port80.eclipse.editors.util.OutlineObject getMethod(java.lang.String name)
getNode
public java.lang.String getNode(java.lang.String name)
getKeywordRef
public java.util.List getKeywordRef(java.lang.String name)
getReference
public java.util.List getReference(java.lang.String name)
getRefTable
public java.util.Map getRefTable()
getTokenTable
public java.util.Map getTokenTable()
getRuleTable
public java.util.Map getRuleTable()
getKeywordRefTable
public java.util.Map getKeywordRefTable()
error
public void error(java.lang.String msg,
java.lang.String filename,
int line,
int column)
- Specified by:
error in interface com.port80.eclipse.antlr.parser.IANTLRParserHandler
warning
public void warning(java.lang.String msg,
java.lang.String filename,
int line,
int column)
- Specified by:
warning in interface com.port80.eclipse.antlr.parser.IANTLRParserHandler
abortGrammar
public void abortGrammar()
beginAlt
public void beginAlt(boolean doAST_)
beginChildList
public void beginChildList()
beginExceptionGroup
public void beginExceptionGroup()
beginExceptionSpec
public void beginExceptionSpec(antlr.Token label)
beginSubRule
public void beginSubRule(antlr.Token label,
antlr.Token start,
boolean not)
beginTree
public void beginTree(antlr.Token tok)
throws antlr.SemanticException
defineRuleName
public void defineRuleName(antlr.Token r,
java.lang.String access,
boolean ruleAST,
java.lang.String docComment)
throws antlr.SemanticException
defineToken
public void defineToken(antlr.Token tokname,
antlr.Token tokliteral)
endAlt
public void endAlt()
endChildList
public void endChildList()
endExceptionGroup
public void endExceptionGroup()
endExceptionSpec
public void endExceptionSpec()
endGrammar
public void endGrammar()
endOptions
public void endOptions()
endRule
public void endRule(java.lang.String r)
endSubRule
public void endSubRule()
endTree
public void endTree()
hasError
public void hasError()
noASTSubRule
public void noASTSubRule()
oneOrMoreSubRule
public void oneOrMoreSubRule()
optionalSubRule
public void optionalSubRule()
refAction
public void refAction(antlr.Token action)
refArgAction
public void refArgAction(antlr.Token action)
setUserExceptions
public void setUserExceptions(java.lang.String thr)
refCharLiteral
public void refCharLiteral(antlr.Token lit,
antlr.Token label,
boolean inverted,
int autoGenType,
boolean lastInRule)
refCharRange
public void refCharRange(antlr.Token t1,
antlr.Token t2,
antlr.Token label,
int autoGenType,
boolean lastInRule)
refElementOption
public void refElementOption(antlr.Token option,
antlr.Token value)
refTokensSpecElementOption
public void refTokensSpecElementOption(antlr.Token tok,
antlr.Token option,
antlr.Token value)
refExceptionHandler
public void refExceptionHandler(antlr.Token exTypeAndName,
antlr.Token action)
refHeaderAction
public void refHeaderAction(antlr.Token name,
antlr.Token act)
refInitAction
public void refInitAction(antlr.Token action)
refMemberAction
public void refMemberAction(antlr.Token act)
refPreambleAction
public void refPreambleAction(antlr.Token act)
refReturnAction
public void refReturnAction(antlr.Token returnAction)
refRule
public void refRule(antlr.Token idAssign,
antlr.Token r,
antlr.Token label,
antlr.Token arg,
int autoGenType)
refSemPred
public void refSemPred(antlr.Token pred)
refStringLiteral
public void refStringLiteral(antlr.Token lit,
antlr.Token label,
int autoGenType,
boolean lastInRule)
refToken
public void refToken(antlr.Token assignId,
antlr.Token t,
antlr.Token label,
antlr.Token args,
boolean inverted,
int autoGenType,
boolean lastInRule)
refTokenRange
public void refTokenRange(antlr.Token t1,
antlr.Token t2,
antlr.Token label,
int autoGenType,
boolean lastInRule)
refTreeSpecifier
public void refTreeSpecifier(antlr.Token treeSpec)
refWildcard
public void refWildcard(antlr.Token t,
antlr.Token label,
int autoGenType)
refKeyword
public void refKeyword(antlr.Token t)
- Specified by:
refKeyword in interface com.port80.eclipse.antlr.parser.IANTLRParserHandler
setArgOfRuleRef
public void setArgOfRuleRef(antlr.Token argaction)
setCharVocabulary
public void setCharVocabulary(antlr.collections.impl.BitSet b)
setFileOption
public void setFileOption(antlr.Token key,
antlr.Token value,
java.lang.String filename)
setGrammarOption
public void setGrammarOption(antlr.Token key,
antlr.Token value)
setRuleOption
public void setRuleOption(antlr.Token key,
antlr.Token value)
setSubruleOption
public void setSubruleOption(antlr.Token key,
antlr.Token value)
startLexer
public void startLexer(java.lang.String file,
antlr.Token name,
java.lang.String superClass,
java.lang.String doc)
startParser
public void startParser(java.lang.String file,
antlr.Token name,
java.lang.String superClass,
java.lang.String doc)
startTreeWalker
public void startTreeWalker(java.lang.String file,
antlr.Token name,
java.lang.String superClass,
java.lang.String doc)
synPred
public void synPred()
zeroOrMoreSubRule
public void zeroOrMoreSubRule()