示例#1
0
 @Nullable
 public static PsiElement setName(@NotNull DLanguageFuncDeclaration o, @NotNull String newName) {
   PsiElement e = DElementFactory.createDLanguageFuncDeclarationFromText(o.getProject(), newName);
   if (e == null) return null;
   o.replace(e);
   return o;
 }
示例#2
0
 // ------------- Function Definition ------------------ //
 @NotNull
 public static String getName(@NotNull DLanguageFuncDeclaration o) {
   DLanguageFuncDeclarationStub stub = o.getStub();
   if (stub != null) return StringUtil.notNullize(stub.getName());
   return o.getIdentifier().getText();
 }
示例#3
0
 @Nullable
 public static PsiElement getNameIdentifier(@NotNull DLanguageFuncDeclaration o) {
   ASTNode keyNode = o.getNode();
   return keyNode != null ? keyNode.getPsi() : null;
 }
 @Override
 public DLanguageFuncDeclarationStub createStub(
     @NotNull DLanguageFuncDeclaration psi, StubElement parentStub) {
   return new DLanguageFuncDeclarationStub(parentStub, this, psi.getName());
 }