Examples of shortenClassReferences()


Examples of com.intellij.psi.codeStyle.JavaCodeStyleManager.shortenClassReferences()

            modifierList.addBefore( newMixinsAnnotation, modifierList.getFirstChild() );
        }

        // Shorten all class references if possible
        JavaCodeStyleManager codeStyleManager = JavaCodeStyleManager.getInstance( project );
        codeStyleManager.shortenClassReferences( newMixinsAnnotation );

        return newMixinsAnnotation;
    }

    @NotNull
View Full Code Here

Examples of com.intellij.psi.codeStyle.JavaCodeStyleManager.shortenClassReferences()

            modifierList.addBefore( newConcernsAnnotation, modifierList.getFirstChild() );
        }

        // Shorten all class references if possible
        JavaCodeStyleManager codeStyleManager = JavaCodeStyleManager.getInstance( project );
        codeStyleManager.shortenClassReferences( newConcernsAnnotation );

        return newConcernsAnnotation;
    }

    @NotNull
View Full Code Here

Examples of com.intellij.psi.codeStyle.JavaCodeStyleManager.shortenClassReferences()

      final PsiElementFactory elementFactory = JavaPsiFacade.getInstance(project).getElementFactory();
      PsiMethod actionMethod = elementFactory.createMethodFromText("public java.lang.String " + methodName + "() throws java.lang.Exception { return \"success\"; }",
                                                                   actionClass);

      final JavaCodeStyleManager javaCodeStyleManager = JavaCodeStyleManager.getInstance(project);
      actionMethod = (PsiMethod) javaCodeStyleManager.shortenClassReferences(actionMethod);
      final CodeStyleManager codestylemanager = CodeStyleManager.getInstance(project);
      actionMethod = (PsiMethod) codestylemanager.reformat(actionMethod);

      final PsiMethod element = (PsiMethod) actionClass.add(actionMethod);
View Full Code Here

Examples of com.intellij.psi.codeStyle.JavaCodeStyleManager.shortenClassReferences()

                             @NotNull Class<? extends Annotation> annotationClass) {
    final PsiAnnotation presentAnnotation = PsiAnnotationUtil.findAnnotation(targetElement, annotationClass);

    final Project project = targetElement.getProject();
    final JavaCodeStyleManager javaCodeStyleManager = JavaCodeStyleManager.getInstance(project);
    javaCodeStyleManager.shortenClassReferences(newPsiAnnotation);

    if (null == presentAnnotation) {
      PsiModifierList modifierList = targetElement.getModifierList();
      if (null != modifierList) {
        modifierList.addAfter(newPsiAnnotation, null);
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.