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

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

Best Java code snippets using com.intellij.psi.codeStyle.JavaCodeStyleManager.suggestUniqueVariableName (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

/**
 * Suggests a unique name for the variable used at the specified location.
 *
 * @param baseNameInfo the base name info for the variable.
 * @param place        the location where the variable will be used.
 * @param lookForward  if true, the existing variables are searched in both directions; if false - only backward
 * @return the generated unique name
 */
@NotNull
public SuggestedNameInfo suggestUniqueVariableName(@NotNull SuggestedNameInfo baseNameInfo,
                              PsiElement place,
                              boolean lookForward) {
 return suggestUniqueVariableName(baseNameInfo, place, false, lookForward);
}
origin: com.github.adedayo.intellij.sdk/java-psi-api

try {
 final Project project = operand.getProject();
 final String uniqueVariableName = JavaCodeStyleManager.getInstance(project).suggestUniqueVariableName("l", parent, false);
 final PsiDeclarationStatement declarationStatement =
  (PsiDeclarationStatement)JavaPsiFacade.getElementFactory(project).createStatementFromText(
com.intellij.psi.codeStyleJavaCodeStyleManagersuggestUniqueVariableName

Javadoc

Suggests a unique name for the variable used at the specified location.

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
  • suggestVariableName
  • variableNameToPropertyName
    Generates a stripped-down name (with no code style defined prefixes or suffixes, usable as a propert

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