本文整理汇总了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));
}
示例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()));
}
示例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;
}
示例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;
}
}
示例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;
}
示例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());
}
示例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);
}
示例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());
}
示例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));
}
示例10: PsiJavaFileStubImpl
import com.intellij.util.io.StringRef; //导入方法依赖的package包/类
public PsiJavaFileStubImpl(String packageName, boolean compiled) {
this(null, StringRef.fromString(packageName), compiled);
}
示例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);
}
示例12: setSourceFileName
import com.intellij.util.io.StringRef; //导入方法依赖的package包/类
public void setSourceFileName(final String sourceFileName) {
mySourceFileName = StringRef.fromString(sourceFileName);
}
示例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);
}
示例14: setName
import com.intellij.util.io.StringRef; //导入方法依赖的package包/类
public void setName(String name) {
myName = StringRef.fromString(name);
}
示例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);
}