Examples of PsiManager


Examples of com.intellij.psi.PsiManager

  }

  protected void processIntern(@NotNull PsiField psiField, @NotNull PsiAnnotation psiAnnotation, @NotNull List<? super PsiElement> target) {
    final PsiClass psiClass = psiField.getContainingClass();
    final Project project = psiField.getProject();
    final PsiManager manager = psiField.getContainingFile().getManager();

    final Collection<Pair<PsiMethod, PsiSubstitutor>> includesMethods = new HashSet<Pair<PsiMethod, PsiSubstitutor>>();

    final Collection<PsiType> types = collectDelegateTypes(psiAnnotation, psiField);
    addMethodsOfTypes(types, includesMethods);
View Full Code Here

Examples of com.intellij.psi.PsiManager

public class LombokLightParameter11Impl extends LightParameter {
  private final LightIdentifier myNameIdentifier;

  public LombokLightParameter11Impl(@NotNull String name, @NotNull PsiType type, PsiElement declarationScope, Language language) {
    super(name, type, declarationScope, language);
    PsiManager manager = declarationScope.getManager();
    myNameIdentifier = new LightIdentifier(manager, name);
    ReflectionUtil.setFinalFieldPerReflection(LightVariableBuilder.class, this, LightModifierList.class,
        new LombokLightModifierList11Impl(manager, language));
  }
View Full Code Here

Examples of com.intellij.psi.PsiManager

  }

  protected <Psi extends PsiElement> void processIntern(@NotNull PsiField psiField, @NotNull PsiAnnotation psiAnnotation, @NotNull List<Psi> target) {
    final PsiClass psiClass = psiField.getContainingClass();
    final Project project = psiField.getProject();
    final PsiManager manager = psiField.getContainingFile().getManager();

    final Collection<Pair<PsiMethod, PsiSubstitutor>> includesMethods = new HashSet<Pair<PsiMethod, PsiSubstitutor>>();

    final Collection<PsiType> types = collectDelegateTypes(psiAnnotation, psiField);
    addMethodsOfTypes(types, includesMethods);
View Full Code Here

Examples of com.intellij.psi.PsiManager

    return result;
  }

  protected void processIntern(@NotNull PsiClass psiClass, @NotNull PsiAnnotation psiAnnotation, @NotNull List<? super PsiElement> target) {
    Project project = psiClass.getProject();
    PsiManager manager = psiClass.getContainingFile().getManager();

    final PsiElementFactory psiElementFactory = JavaPsiFacade.getElementFactory(project);
    PsiType psiLoggerType = psiElementFactory.createTypeFromText(loggerType, psiClass);
    LombokLightFieldBuilder loggerField = LombokPsiElementFactory.getInstance().createLightField(manager, loggerName, psiLoggerType)
        .withContainingClass(psiClass)
View Full Code Here

Examples of com.intellij.psi.PsiManager

    if (!hasMethodByName(classMethods, EQUALS_METHOD_NAME, HASH_CODE_METHOD_NAME)) {
      boolean shouldGenerateCanEqual = shouldGenerateCanEqual(psiClass);

      if (!shouldGenerateCanEqual || !hasMethodByName(classMethods, CAN_EQUAL_METHOD_NAME)) {
        Project project = psiClass.getProject();
        PsiManager manager = psiClass.getContainingFile().getManager();
        PsiElementFactory elementFactory = JavaPsiFacade.getInstance(project).getElementFactory();

        PsiMethod equalsMethod = createEqualsMethod(psiClass, elementFactory);
        target.add((Psi) prepareMethod(manager, equalsMethod, psiClass, psiAnnotation));
View Full Code Here

Examples of com.intellij.psi.PsiManager

    if (null == superClass && psiClass.hasModifierProperty(PsiModifier.FINAL)) {
      result = false;
    }
    if (null != superClass && psiClass.hasModifierProperty(PsiModifier.FINAL)) {
      final Project project = psiClass.getProject();
      final PsiManager manager = psiClass.getContainingFile().getManager();
      final PsiClassType javaLangObject = PsiType.getJavaLangObject(manager, GlobalSearchScope.projectScope(project));

      result = !superClass.equals(javaLangObject.resolve());
    }
    return result;
View Full Code Here

Examples of com.intellij.psi.PsiManager

    final String methodVisibity = LombokProcessorUtil.getMethodVisibity(psiAnnotation);
    if (null != methodVisibity) {
      Project project = psiField.getProject();
      PsiClass psiClass = psiField.getContainingClass();
      PsiManager manager = psiField.getContainingFile().getManager();
      PsiElementFactory elementFactory = JavaPsiFacade.getInstance(project).getElementFactory();

      final Collection<String> methodNames = TransformationsUtil.toAllSetterNames(psiField.getName(), PsiType.BOOLEAN.equals(psiField.getType()));
      if (!hasMethodByName(classMethods, methodNames)) {
        PsiMethod setterMethod = createSetterMethod(psiField, methodVisibity, psiClass, manager, elementFactory);
View Full Code Here

Examples of com.intellij.psi.PsiManager

    super(CLASS_NAME, PsiMethod.class);
  }

  public <Psi extends PsiElement> void process(@NotNull PsiClass psiClass, @NotNull PsiMethod[] classMethods, @NotNull PsiAnnotation psiAnnotation, @NotNull List<Psi> target) {
    Project project = psiClass.getProject();
    PsiManager manager = psiClass.getContainingFile().getManager();
    PsiElementFactory elementFactory = JavaPsiFacade.getInstance(project).getElementFactory();

    final String visibility = LombokProcessorUtil.getAccessVisibity(psiAnnotation);
    if (null != visibility) {
      Collection<PsiField> allNotInitializedNotStaticFields = getAllNotInitializedAndNotStaticFields(psiClass);
View Full Code Here

Examples of com.intellij.psi.PsiManager

public class LombokLightParameter11Impl extends LightParameter {
  private final LightIdentifier myNameIdentifier;

  public LombokLightParameter11Impl(@NotNull String name, @NotNull PsiType type, PsiElement declarationScope, Language language) {
    super(name, type, declarationScope, language);
    PsiManager manager = declarationScope.getManager();
    myNameIdentifier = new LightIdentifier(manager, name);
    ReflectionUtil.setFinalFieldPerReflection(LightVariableBuilder.class, this, "myModifierList",
        new LombokLightModifierList11Impl(manager, language));
  }
View Full Code Here

Examples of com.intellij.psi.PsiManager

    if (null == psiClass) {
      return;
    }

    final Project project = psiField.getProject();
    final PsiManager manager = psiField.getContainingFile().getManager();

    final PsiType psiType = psiField.getType();
    if (psiType instanceof PsiClassType) {
      final PsiClassType objectType = PsiType.getJavaLangObject(manager, GlobalSearchScope.allScope(project));
      final PsiClass objectClass = objectType.resolve();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.