com.intellij.psi.tree
Class IChameleonElementType
java.lang.Object
com.intellij.psi.tree.IElementType
com.intellij.psi.tree.IChameleonElementType
- Direct Known Subclasses:
- IFileElementType
public class IChameleonElementType
- extends IElementType
A token type which represents a fragment of text (possibly in a different language)
which is not parsed during the current lexer or parser pass and can be parsed later when
its contents is requested.
|
Method Summary |
boolean |
isParsable(java.lang.CharSequence buffer,
Project project)
Checks if the specified character sequence can be parsed as a valid content of the
chameleon node. |
ASTNode |
parseContents(ASTNode chameleon)
Parses the contents of the specified chameleon node and returns the AST tree
representing the parsed contents. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
IChameleonElementType
public IChameleonElementType(@NonNls
java.lang.String debugName)
IChameleonElementType
public IChameleonElementType(@NonNls
java.lang.String debugName,
Language language)
IChameleonElementType
public IChameleonElementType(@NonNls
java.lang.String debugName,
Language language,
boolean register)
parseContents
public ASTNode parseContents(ASTNode chameleon)
- Parses the contents of the specified chameleon node and returns the AST tree
representing the parsed contents.
- Parameters:
chameleon - the node to parse.
- Returns:
- the parsed contents of the node.
isParsable
public boolean isParsable(java.lang.CharSequence buffer,
Project project)
- Checks if the specified character sequence can be parsed as a valid content of the
chameleon node.
- Parameters:
buffer - the content to parse.project - the project containing the content.
- Returns:
- true if the content is valid, false if not