当前位置: 首页>>代码示例>>Java>>正文


Java StringRef.fromString方法代码示例

本文整理汇总了Java中com.intellij.util.io.StringRef.fromString方法的典型用法代码示例。如果您正苦于以下问题:Java StringRef.fromString方法的具体用法?Java StringRef.fromString怎么用?Java StringRef.fromString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.util.io.StringRef的用法示例。


在下文中一共展示了StringRef.fromString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createStub

import com.intellij.util.io.StringRef; //导入方法依赖的package包/类
@Override
public GrMethodStub createStub(@NotNull GrMethod psi, StubElement parentStub) {

  Set<String> namedParameters = psi.getNamedParameters().keySet();
  return new GrMethodStub(parentStub, StringRef.fromString(psi.getName()), GrStubUtils.getAnnotationNames(psi),
                          ArrayUtil.toStringArray(namedParameters), this,
                          GrStubUtils.getTypeText(psi.getReturnTypeElementGroovy()),
                          GrMethodStub.buildFlags(psi));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:GrMethodElementType.java

示例2: createStub

import com.intellij.util.io.StringRef; //导入方法依赖的package包/类
@Override
public GrFieldStub createStub(@NotNull GrField psi, StubElement parentStub) {
  String[] annNames = GrStubUtils.getAnnotationNames(psi);

  Set<String> namedParameters = Collections.emptySet();
  if (psi instanceof GrFieldImpl){
    namedParameters = psi.getNamedParameters().keySet();
  }

  return new GrFieldStub(parentStub, StringRef.fromString(psi.getName()), annNames, namedParameters.toArray(new String[namedParameters.size()]),
                         GroovyElementTypes.FIELD, GrFieldStub.buildFlags(psi),
                         GrStubUtils.getTypeText(psi.getTypeElementGroovy()));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:GrFieldElementType.java

示例3: PsiClassReferenceListStubImpl

import com.intellij.util.io.StringRef; //导入方法依赖的package包/类
public PsiClassReferenceListStubImpl(final JavaClassReferenceListElementType type, final StubElement parent, final String[] names, final PsiReferenceList.Role role) {
  super(parent, type);
  myNames = StringRef.createArray(names.length);
  for (int i = 0; i < names.length; i++) {
    myNames[i] = StringRef.fromString(names[i]);
  }
  myRole = role;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:PsiClassReferenceListStubImpl.java

示例4: GrFileStub

import com.intellij.util.io.StringRef; //导入方法依赖的package包/类
public GrFileStub(GroovyFile file) {
  super(file);
  myName = StringRef.fromString(file.getViewProvider().getVirtualFile().getNameWithoutExtension());
  isScript = file.isScript();
  final GrPackageDefinition definition = file.getPackageDefinition();
  if (definition != null) {
    myAnnotations = GrStubUtils.getAnnotationNames(definition);
  } else {
    myAnnotations = ArrayUtil.EMPTY_STRING_ARRAY;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:GrFileStub.java

示例5: GrTypeDefinitionStub

import com.intellij.util.io.StringRef; //导入方法依赖的package包/类
public GrTypeDefinitionStub(StubElement parent,
                                final String name,
                                final String[] supers,
                                @NotNull IStubElementType elementType,
                                final String qualifiedName,
                                String[] annotations,
                                byte flags) {
  super(parent, elementType);
  myAnnotations = annotations;
  myName = StringRef.fromString(name);
  mySuperClasses = supers;
  myQualifiedName = StringRef.fromString(qualifiedName);
  myFlags = flags;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:GrTypeDefinitionStub.java

示例6: createStub

import com.intellij.util.io.StringRef; //导入方法依赖的package包/类
public PyFunctionStub createStub(@NotNull final PyFunction psi, final StubElement parentStub) {
  PyFunctionImpl function = (PyFunctionImpl)psi;
  String message = function.extractDeprecationMessage();
  final PyStringLiteralExpression docStringExpression = function.getDocStringExpression();
  return new PyFunctionStubImpl(psi.getName(), PyPsiUtils.strValue(docStringExpression),
                                message == null ? null : StringRef.fromString(message), function.isAsync(), parentStub,
                                getStubElementType());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:PyFunctionElementType.java

示例7: PyFileStubImpl

import com.intellij.util.io.StringRef; //导入方法依赖的package包/类
public PyFileStubImpl(final PyFile file) {
  super(file);
  final PyFileImpl fileImpl = (PyFileImpl)file;
  myFutureFeatures = new BitSet(FUTURE_FEATURE_SET_SIZE);
  myDunderAll = fileImpl.calculateDunderAll();
  for (FutureFeature fuf : FutureFeature.ALL) {
    myFutureFeatures.set(fuf.ordinal(), fileImpl.calculateImportFromFuture(fuf));
  }
  String message = fileImpl.extractDeprecationMessage();
  myDeprecationMessage = message == null ? null : StringRef.fromString(message);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:PyFileStubImpl.java

示例8: LuaFileStub

import com.intellij.util.io.StringRef; //导入方法依赖的package包/类
public LuaFileStub(LuaPsiFile file) {
    super(file);
    myName = StringRef.fromString(file.getName());
    log.debug("FROM PSI: "+getName());
}
 
开发者ID:internetisalie,项目名称:lua-for-idea,代码行数:6,代码来源:LuaFileStub.java

示例9: createStub

import com.intellij.util.io.StringRef; //导入方法依赖的package包/类
@Override
public PsiTypeParameterStub createStub(final LighterAST tree, final LighterASTNode node, final StubElement parentStub) {
  final LighterASTNode id = LightTreeUtil.requiredChildOfType(tree, node, JavaTokenType.IDENTIFIER);
  final String name = RecordUtil.intern(tree.getCharTable(), id);
  return new PsiTypeParameterStubImpl(parentStub, StringRef.fromString(name));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:JavaTypeParameterElementType.java

示例10: PsiJavaFileStubImpl

import com.intellij.util.io.StringRef; //导入方法依赖的package包/类
public PsiJavaFileStubImpl(String packageName, boolean compiled) {
  this(null, StringRef.fromString(packageName), compiled);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:PsiJavaFileStubImpl.java

示例11: createStub

import com.intellij.util.io.StringRef; //导入方法依赖的package包/类
@Override
public GrFieldStub createStub(@NotNull GrEnumConstant psi, StubElement parentStub) {
  String[] annNames = GrStubUtils.getAnnotationNames(psi);
  return new GrFieldStub(parentStub, StringRef.fromString(psi.getName()), annNames, ArrayUtil.EMPTY_STRING_ARRAY, GroovyElementTypes.ENUM_CONSTANT, GrFieldStub.buildFlags(psi), null);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:GrEnumConstantElementType.java

示例12: setSourceFileName

import com.intellij.util.io.StringRef; //导入方法依赖的package包/类
public void setSourceFileName(final String sourceFileName) {
  mySourceFileName = StringRef.fromString(sourceFileName);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:PsiClassStubImpl.java

示例13: PsiParameterStubImpl

import com.intellij.util.io.StringRef; //导入方法依赖的package包/类
public PsiParameterStubImpl(StubElement parent, @NotNull String name, @NotNull TypeInfo type, boolean isEllipsis) {
  this(parent, StringRef.fromString(name), type, isEllipsis);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:PsiParameterStubImpl.java

示例14: setName

import com.intellij.util.io.StringRef; //导入方法依赖的package包/类
public void setName(String name) {
  myName = StringRef.fromString(name);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:PsiParameterStubImpl.java

示例15: PsiImportStatementStubImpl

import com.intellij.util.io.StringRef; //导入方法依赖的package包/类
public PsiImportStatementStubImpl(final StubElement parent, final String text, final byte flags) {
  this(parent, StringRef.fromString(text), flags);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:PsiImportStatementStubImpl.java


注:本文中的com.intellij.util.io.StringRef.fromString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。