com.intellij.psi.tree
Class IChameleonElementType

java.lang.Object
  extended by com.intellij.psi.tree.IElementType
      extended by 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.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.intellij.psi.tree.IElementType
IElementType.Predicate
 
Field Summary
 
Fields inherited from class com.intellij.psi.tree.IElementType
EMPTY_ARRAY, TRUE
 
Constructor Summary
IChameleonElementType(java.lang.String debugName)
           
IChameleonElementType(java.lang.String debugName, Language language)
           
IChameleonElementType(java.lang.String debugName, Language language, boolean register)
           
 
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 com.intellij.psi.tree.IElementType
enumerate, find, getIndex, getLanguage, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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)
Method Detail

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