Codota Logo
JavaCodeStyleManager.variableNameToPropertyName
Code IndexAdd Codota to your IDE (free)

How to use
variableNameToPropertyName
method
in
com.intellij.psi.codeStyle.JavaCodeStyleManager

Best Java code snippets using com.intellij.psi.codeStyle.JavaCodeStyleManager.variableNameToPropertyName (Showing top 2 results out of 315)

  • Common ways to obtain JavaCodeStyleManager
private void myMethod () {
JavaCodeStyleManager j =
  • Codota IconStyle.JavaCodeStyleManager javaCodeStyleManager;Project project;javaCodeStyleManager.getInstance(project)
  • Smart code suggestions by Codota
}
origin: com.github.adedayo.intellij.sdk/java-psi-api

public static String suggestPropertyName(@NotNull PsiField field, @NotNull String fieldName) {
 JavaCodeStyleManager codeStyleManager = JavaCodeStyleManager.getInstance(field.getProject());
 VariableKind kind = codeStyleManager.getVariableKind(field);
 String name = codeStyleManager.variableNameToPropertyName(fieldName, kind);
 if (!field.hasModifierProperty(PsiModifier.STATIC) && isBoolean(field.getType())) {
  if (name.startsWith(IS_PREFIX) && name.length() > IS_PREFIX.length() && Character.isUpperCase(name.charAt(IS_PREFIX.length()))) {
   name = Introspector.decapitalize(name.substring(IS_PREFIX.length()));
  }
 }
 return name;
}
origin: com.github.adedayo.intellij.sdk/java-psi-api

boolean isStatic = field.hasModifierProperty(PsiModifier.STATIC);
VariableKind kind = codeStyleManager.getVariableKind(field);
String propertyName = codeStyleManager.variableNameToPropertyName(name, kind);
String setName = suggestSetterName(field);
try {
com.intellij.psi.codeStyleJavaCodeStyleManagervariableNameToPropertyName

Javadoc

Generates a stripped-down name (with no code style defined prefixes or suffixes, usable as a property name) from the specified name of a variable of the specified kind.

Popular methods of JavaCodeStyleManager

  • getInstance
  • optimizeImports
    Optimizes imports in the specified Java or JSP file.
  • shortenClassReferences
    Replaces fully-qualified class names in a part of contents of the specified element with non-qualifi
  • propertyNameToVariableName
    Appends code style defined prefixes and/or suffixes for the specified variable kind to the specified
  • getPrefixByVariableKind
  • getVariableKind
    Returns the kind of the specified variable (local, parameter, field, static field or static final fi
  • suggestUniqueVariableName
  • suggestVariableName

Popular in Java

  • Finding current android device location
  • getContentResolver (Context)
  • onRequestPermissionsResult (Fragment)
  • getApplicationContext (Context)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • Reference (javax.naming)
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now