| java.lang.Object org.netbeans.editor.Syntax org.netbeans.editor.ext.MultiSyntax
All known Subclasses: org.netbeans.editor.ext.java.JavaDocSyntax,
MultiSyntax | public class MultiSyntax extends Syntax (Code) | | Composition of several syntaxes together. There are several different
situations in which this class can be used efficiently: 1) Syntax that wants
to use some other syntax internally for recognizing one or more tokens.
Example is java analyzer that would like to use html-syntax for detail
parsing block comments.
2) Master syntax that will manage two or more slave syntaxes. Example is the
master syntax managing java-syntax and html-syntax. The result would be the
same like in the previous example but it's more independent.
3) Master syntax that handles switching of the two or more other syntaxes.
Only one slave syntax is active at one time.
4) An aribitrary combination and nesting of the previous examples.
author: Miloslav Metelka version: 1.00 |
Inner Class :public static class MultiStateInfo extends BaseStateInfo | |
Inner Class :static class SyntaxInfo | |
Method Summary | |
public int | compareState(StateInfo stateInfo) Compare state of this analyzer to given state info. | public StateInfo | createStateInfo() | public void | load(StateInfo stateInfo, char buffer, int offset, int len, boolean lastBuffer, int stopPosition) | public void | loadInitState() | protected void | registerSyntax(Syntax slaveSyntax) Register a particular slave syntax. | public void | storeState(StateInfo stateInfo) Store state of this analyzer into given mark state. |
compareState | public int compareState(StateInfo stateInfo)(Code) | | Compare state of this analyzer to given state info. The basic
implementation does the following: 1. state info of the main syntax is
compared 2. if the result is EQUAL_STATE then go through all the
registered slave syntaxes: a) get the info
|
createStateInfo | public StateInfo createStateInfo()(Code) | | |
load | public void load(StateInfo stateInfo, char buffer, int offset, int len, boolean lastBuffer, int stopPosition)(Code) | | |
loadInitState | public void loadInitState()(Code) | | |
registerSyntax | protected void registerSyntax(Syntax slaveSyntax)(Code) | | Register a particular slave syntax.
|
storeState | public void storeState(StateInfo stateInfo)(Code) | | Store state of this analyzer into given mark state.
|
|
|