Search in sources :

Example 1 with PsiBuilderImpl

use of com.intellij.lang.impl.PsiBuilderImpl in project intellij-community by JetBrains.

the class PsiBuilderTest method createBuilder.

private static PsiBuilderImpl createBuilder(final String text, ASTNode originalTree) {
    final Language lang = StdFileTypes.JAVA.getLanguage();
    final ParserDefinition parserDefinition = LanguageParserDefinitions.INSTANCE.forLanguage(lang);
    assertNotNull(parserDefinition);
    PsiFile psiFile = createFile("x.java", text);
    return new PsiBuilderImpl(getProject(), psiFile, parserDefinition, JavaParserDefinition.createLexer(LanguageLevel.JDK_1_5), SharedImplUtil.findCharTableByTree(psiFile.getNode()), text, originalTree, null);
}
Also used : JavaParserDefinition(com.intellij.lang.java.JavaParserDefinition) PsiBuilderImpl(com.intellij.lang.impl.PsiBuilderImpl) PsiFile(com.intellij.psi.PsiFile)

Aggregations

PsiBuilderImpl (com.intellij.lang.impl.PsiBuilderImpl)1 JavaParserDefinition (com.intellij.lang.java.JavaParserDefinition)1 PsiFile (com.intellij.psi.PsiFile)1