Package com.intellij.psi

Examples of com.intellij.psi.PsiExpression


        .withModifier(PsiModifier.FINAL).withModifier(PsiModifier.STATIC).withModifier(PsiModifier.PRIVATE)
        .withNavigationElement(psiAnnotation);

    final String classQualifiedName = psiClass.getQualifiedName();
    final String className = null != classQualifiedName ? classQualifiedName : psiClass.getName();
    PsiExpression initializer = psiElementFactory.createExpressionFromText(String.format(loggerInitializer, className), psiClass);
    loggerField.setInitializer(initializer);

    target.add((Psi) loggerField);
  }
View Full Code Here


        .setModifiers(PsiModifier.FINAL, PsiModifier.STATIC, PsiModifier.PRIVATE)
        .setNavigationElement(psiAnnotation);

    final String classQualifiedName = psiClass.getQualifiedName();
    final String className = null != classQualifiedName ? classQualifiedName : psiClass.getName();
    PsiExpression initializer = psiElementFactory.createExpressionFromText(String.format(loggerInitializer, className), psiClass);
    ((MyLightFieldBuilder) loggerField).setInitializer(initializer);

    target.add((Psi) loggerField);
  }
View Full Code Here

            for (String modifier : myModifiers) {
              modifierList.setModifierProperty(modifier, true);
            }
          }
          if (null != myInitializerText) {
            PsiExpression psiInitializer = psiElementFactory.createExpressionFromText(myInitializerText, psiField);
            psiField.setInitializer(psiInitializer);
          }

          final List<PsiGenerationInfo<PsiField>> generationInfos = GenerateMembersUtil.insertMembersAtOffset(myClass.getContainingFile(), editor.getCaretModel().getOffset(),
              Collections.singletonList(new PsiGenerationInfo<PsiField>(psiField)));
View Full Code Here

        .withModifier(PsiModifier.FINAL).withModifier(PsiModifier.STATIC).withModifier(PsiModifier.PRIVATE)
        .withNavigationElement(psiAnnotation);

    final String classQualifiedName = psiClass.getQualifiedName();
    final String className = null != classQualifiedName ? classQualifiedName : psiClass.getName();
    PsiExpression initializer = psiElementFactory.createExpressionFromText(String.format(loggerInitializer, className), psiClass);
    loggerField.setInitializer(initializer);

    target.add(loggerField);
  }
View Full Code Here

        this.baseClassToCreate = baseClassToCreate;
    }

    @Nullable
    static ClassWicketIdNewComponentItem create(@NotNull PsiCallExpression callExpression) {
        PsiExpression wicketIdExpression = WicketPsiUtil.getWicketIdExpressionFromArguments(callExpression);
        if (wicketIdExpression == null) {
            return null;
        }
        String wicketId = WicketPsiUtil.getWicketIdFromExpression(wicketIdExpression);
        if (wicketId == null) {
View Full Code Here

            for (@Modifier String modifier : myModifiers) {
              modifierList.setModifierProperty(modifier, true);
            }
          }
          if (null != myInitializerText) {
            PsiExpression psiInitializer = psiElementFactory.createExpressionFromText(myInitializerText, psiField);
            psiField.setInitializer(psiInitializer);
          }

          final List<PsiGenerationInfo<PsiField>> generationInfos = GenerateMembersUtil.insertMembersAtOffset(myClass.getContainingFile(), editor.getCaretModel().getOffset(),
              Collections.singletonList(new PsiGenerationInfo<PsiField>(psiField)));
View Full Code Here

            for (String modifier : myModifiers) {
              modifierList.setModifierProperty(modifier, true);
            }
          }
          if (null != myInitializerText) {
            PsiExpression psiInitializer = psiElementFactory.createExpressionFromText(myInitializerText, psiField);
            psiField.setInitializer(psiInitializer);
          }

          final List<PsiGenerationInfo<PsiField>> generationInfos = GenerateMembersUtil.insertMembersAtOffset(myClass.getContainingFile(), editor.getCaretModel().getOffset(),
              Collections.singletonList(new PsiGenerationInfo<PsiField>(psiField)));
View Full Code Here

        .withContainingClass(psiClass)
        .withModifier(PsiModifier.FINAL).withModifier(PsiModifier.STATIC).withModifier(PsiModifier.PRIVATE)
        .withNavigationElement(psiAnnotation);

    final String loggerInitializerParameter = createLoggerInitializeParameter(psiClass, psiAnnotation);
    final PsiExpression initializer = psiElementFactory.createExpressionFromText(String.format(loggerInitializer, loggerInitializerParameter), psiClass);
    loggerField.setInitializer(initializer);
    return loggerField;
  }
View Full Code Here

TOP

Related Classes of com.intellij.psi.PsiExpression

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.