Package de.plushnikov.intellij.lombok.psi

Examples of de.plushnikov.intellij.lombok.psi.LombokLightFieldBuilder


    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)
        .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


    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)
        .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

TOP

Related Classes of de.plushnikov.intellij.lombok.psi.LombokLightFieldBuilder

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.