Examples of variableNameToPropertyName()


Examples of com.intellij.psi.codeStyle.CodeStyleManager.variableNameToPropertyName()

    PsiElementFactory factory = field.getManager().getElementFactory();

    String name = field.getName();
    boolean isStatic = field.hasModifierProperty(PsiModifier.STATIC);
    VariableKind kind = codeStyleManager.getVariableKind(field);
    String propertyName = codeStyleManager.variableNameToPropertyName(name, kind);
    String setName = suggestSetterName(project, field);
    try {
      PsiMethod setMethod = factory.createMethod(setName, PsiType.VOID);
      String parameterName = codeStyleManager.propertyNameToVariableName(propertyName, VariableKind.PARAMETER);
      PsiParameter param = factory.createParameter(parameterName, field.getType());
View Full Code Here

Examples of com.intellij.psi.codeStyle.CodeStyleManager.variableNameToPropertyName()

  }

  public static String suggestPropertyName(Project project, PsiField field) {
    CodeStyleManager codeStyleManager = CodeStyleManager.getInstance(project);
    VariableKind kind = codeStyleManager.getVariableKind(field);
    return codeStyleManager.variableNameToPropertyName(field.getName(), kind);
  }

  public static String suggestGetterName(Project project, PsiField field) {
    String propertyName = suggestPropertyName(project, field);
    return suggestGetterName(propertyName, field.getType());
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.