Java 类com.intellij.psi.impl.java.stubs.impl.PsiNameValuePairStubImpl 实例源码

项目:intellij-ce-playground    文件:JavaNameValuePairType.java   
@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 (child.getTokenType() == JavaElementType.LITERAL_EXPRESSION) {
      value = RecordUtil.intern(tree.getCharTable(), tree.getChildren(child).get(0));
      value = StringUtil.unquoteString(value);
    }
  }
  return new PsiNameValuePairStubImpl(parentStub, StringRef.fromString(name), StringRef.fromString(value));
}
项目:tools-idea    文件:JavaNameValuePairType.java   
@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 (child.getTokenType() == JavaElementType.LITERAL_EXPRESSION) {
      value = RecordUtil.intern(tree.getCharTable(), tree.getChildren(child).get(0));
      value = StringUtil.stripQuotesAroundValue(value);
    }
  }
  return new PsiNameValuePairStubImpl(parentStub, StringRef.fromString(name), StringRef.fromString(value));
}
项目:consulo-java    文件:JavaNameValuePairType.java   
@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 (child.getTokenType() == JavaElementType.LITERAL_EXPRESSION) {
      value = RecordUtil.intern(tree.getCharTable(), tree.getChildren(child).get(0));
      value = StringUtil.stripQuotesAroundValue(value);
    }
  }
  return new PsiNameValuePairStubImpl(parentStub, StringRef.fromString(name), StringRef.fromString(value));
}
项目:intellij-ce-playground    文件:JavaNameValuePairType.java   
@NotNull
@Override
public PsiNameValuePairStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
  StringRef name = dataStream.readName();
  return new PsiNameValuePairStubImpl(parentStub, name, dataStream.readName());
}
项目:tools-idea    文件:JavaNameValuePairType.java   
@NotNull
@Override
public PsiNameValuePairStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
  StringRef name = dataStream.readName();
  return new PsiNameValuePairStubImpl(parentStub, name, dataStream.readName());
}
项目:consulo-java    文件:JavaNameValuePairType.java   
@NotNull
@Override
public PsiNameValuePairStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
  StringRef name = dataStream.readName();
  return new PsiNameValuePairStubImpl(parentStub, name, dataStream.readName());
}