Search in sources :

Example 1 with PsiPackageAccessibilityStatementStubImpl

use of com.intellij.psi.impl.java.stubs.impl.PsiPackageAccessibilityStatementStubImpl in project intellij-community by JetBrains.

the class JavaPackageAccessibilityStatementElementType method createStub.

@Override
public PsiPackageAccessibilityStatementStub createStub(LighterAST tree, LighterASTNode node, StubElement parentStub) {
    String refText = null;
    List<String> to = ContainerUtil.newSmartList();
    for (LighterASTNode child : tree.getChildren(node)) {
        IElementType type = child.getTokenType();
        if (type == JavaElementType.JAVA_CODE_REFERENCE)
            refText = JavaSourceUtil.getReferenceText(tree, child);
        else if (type == JavaElementType.MODULE_REFERENCE)
            to.add(JavaSourceUtil.getReferenceText(tree, child));
    }
    return new PsiPackageAccessibilityStatementStubImpl(parentStub, this, refText, to);
}
Also used : IElementType(com.intellij.psi.tree.IElementType) LighterASTNode(com.intellij.lang.LighterASTNode) PsiPackageAccessibilityStatementStubImpl(com.intellij.psi.impl.java.stubs.impl.PsiPackageAccessibilityStatementStubImpl)

Aggregations

LighterASTNode (com.intellij.lang.LighterASTNode)1 PsiPackageAccessibilityStatementStubImpl (com.intellij.psi.impl.java.stubs.impl.PsiPackageAccessibilityStatementStubImpl)1 IElementType (com.intellij.psi.tree.IElementType)1