public class JShellParserDefinition extends JavaParserDefinition
ParserDefinition.SpaceRequirements
JAVA_FILE
Constructor and Description |
---|
JShellParserDefinition() |
Modifier and Type | Method and Description |
---|---|
PsiElement |
createElement(ASTNode node)
Creates a PSI element for the specified AST node.
|
PsiFile |
createFile(FileViewProvider viewProvider)
Creates a PSI element for the specified virtual file.
|
PsiParser |
createParser(Project project)
Returns the parser for parsing files in the specified project.
|
IFileElementType |
getFileNodeType()
Returns the element type of the node describing a file in the specified language.
|
createDocLexer, createLexer, createLexer, getCommentTokens, getStringLiteralElements, getWhitespaceTokens, spaceExistenceTypeBetweenTokens
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
spaceExistanceTypeBetweenTokens
public PsiFile createFile(FileViewProvider viewProvider)
ParserDefinition
createFile
in interface ParserDefinition
createFile
in class JavaParserDefinition
viewProvider
- virtual file.public IFileElementType getFileNodeType()
ParserDefinition
getFileNodeType
in interface ParserDefinition
getFileNodeType
in class JavaParserDefinition
public PsiElement createElement(ASTNode node)
ParserDefinition
if (node.getElementType == MY_ELEMENT_TYPE) {
return new MyPsiElement(node);
}
createElement
in interface ParserDefinition
createElement
in class JavaParserDefinition
node
- the node for which the PSI element should be returned.public PsiParser createParser(Project project)
ParserDefinition
createParser
in interface ParserDefinition
createParser
in class JavaParserDefinition
project
- the project to which the parser is connected.