use of com.intellij.psi.impl.java.stubs.impl.PsiNameValuePairStubImpl in project intellij-community by JetBrains.
the class JavaNameValuePairType method createStub.
@Override
public PsiNameValuePairStub createStub(LighterAST tree, LighterASTNode node, StubElement parentStub) {
String name = null;
String value = null;
List<LighterASTNode> children = tree.getChildren(node);
for (LighterASTNode child : children) {
if (child.getTokenType() == JavaTokenType.IDENTIFIER) {
name = RecordUtil.intern(tree.getCharTable(), child);
} else if (ElementType.ANNOTATION_MEMBER_VALUE_BIT_SET.contains(child.getTokenType())) {
value = LightTreeUtil.toFilteredString(tree, child, null);
}
}
return new PsiNameValuePairStubImpl(parentStub, name, value);
}
Aggregations