|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IParseState
Stores the current lexemes of the current file, as well as the parse results. If all else fails, this is the "most correct" version of the file information. Everything a generic parser needs in order to parse a file.
| Method Summary | |
|---|---|
void |
addChildState(IParseState child)
Add a child parse state to this parse state |
void |
addCommentRegion(IParseNode node)
Adds a comment region (GenericCommentNode) to this parse state |
void |
clearCommentRegions()
Clears the comments regions |
IParseState[] |
getChildren()
Get the child parse states for this parser |
IParseNode[] |
getCommentRegions()
Gets the comment regions currently in this parse state |
int |
getFileIndex()
Get the file index associated with this parse state |
char[] |
getInsertedText()
Get the source code that has been inserted into the source document |
java.lang.String |
getLanguage()
Gets the language mime type for this parse state. |
LexemeList |
getLexemeList()
Retrieve the lexeme list associated with this parse state |
IParseState |
getParent()
Get the parent parse state for this parse state |
IParseNodeFactory |
getParseNodeFactory()
Gets the factory that creates all parse nodes for a given language. |
IParseNode |
getParseResults()
Gets the results of a parse. |
IParseState |
getParseState(java.lang.String language)
Get the child parse state of given language |
long |
getParseTime()
Return the amount of time in milliseconds that elapsed during parsing of the edit represented by this parse state |
int |
getRemoveLength()
Gets the length of the source code that has been deleted, if any. |
IParseState |
getRoot()
Get the top-most IParseState in this tree. |
char[] |
getSource()
Retrieve the full source of the current document |
int |
getStartingOffset()
Get the offset where the source code begins in the source file |
java.util.HashMap |
getUpdatedProperties()
|
void |
onAfterParse()
Called after the full parse happens (after parse, but not before parseComposite). |
void |
onBeforeParse()
Called before the full parse happens (before parse, but not before parseComposite). |
void |
removeChildState(IParseState child)
Remove a child parse state from this parse state |
void |
reset()
Reset all the state information associated with this parse context |
void |
setEditState(java.lang.String source,
java.lang.String insertedSource,
int offset,
int removeLength)
Setup this parse state with the next edit to the source document |
void |
setFileIndex(int index)
Set the file index associate with this parse state |
void |
setParseResults(IParseNode results)
Sets the results of a parse. |
void |
setParseTime(long elapsedMilliseconds)
Set the total number of milliseconds that elapsed for the last parse |
void |
unloadFromEnvironment()
Unloads any additions the parse of this parse state has added to the environment |
void |
updateLexemeList()
Update the lexeme list based on the edits represented by this parse state |
| Method Detail |
|---|
IParseState[] getChildren()
int getFileIndex()
void setFileIndex(int index)
index - The new file index for this parse statechar[] getInsertedText()
LexemeList getLexemeList()
IParseState getParent()
IParseState getParseState(java.lang.String language)
language - the language mime type
long getParseTime()
void setParseTime(long elapsedMilliseconds)
elapsedMilliseconds - The new elapsed timeint getRemoveLength()
IParseState getRoot()
char[] getSource()
int getStartingOffset()
void addChildState(IParseState child)
child - The child parse state to addvoid removeChildState(IParseState child)
child - The child parse state to removevoid reset()
void setEditState(java.lang.String source,
java.lang.String insertedSource,
int offset,
int removeLength)
source - The entire source of the document after this edit has been appliedinsertedSource - The new text inserted into the documentoffset - The offset where this edit occurredremoveLength - The number of characters to remove before inserting the insertedSourcevoid updateLexemeList()
void onBeforeParse()
void onAfterParse()
void addCommentRegion(IParseNode node)
node - GenericCommentNode instanceIParseNode[] getCommentRegions()
void clearCommentRegions()
java.lang.String getLanguage()
IParseNodeFactory getParseNodeFactory()
void setParseResults(IParseNode results)
results - IParseNode getParseResults()
java.util.HashMap getUpdatedProperties()
void unloadFromEnvironment()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||