public class AutomaticVariableRenamerFactory extends java.lang.Object implements AutomaticRenamerFactory
EP_NAME| Constructor and Description |
|---|
AutomaticVariableRenamerFactory() |
| Modifier and Type | Method and Description |
|---|---|
AutomaticRenamer |
createRenamer(PsiElement element,
java.lang.String newName,
java.util.Collection<UsageInfo> usages)
Creates an automatic renamer for the given rename operation.
|
java.lang.String |
getOptionName()
Returns the title of the checkbox shown in the rename dialog which enables or disables this renamer factory,
or null if the renamer factory does not require showing a checkbox in the rename dialog.
|
boolean |
isApplicable(PsiElement element)
Checks if this factory can provide additional elements to be renamed for the given element being renamed.
|
boolean |
isEnabled()
Returns true if this renamer factory is enabled (and the checkbox representing its state should be checked.)
Normally, the implementation of this method needs to load the persisted state of the checkbox.
|
void |
setEnabled(boolean enabled)
Persists the state of the checkbox which enables or disables the renamer factory.
|
public boolean isApplicable(PsiElement element)
AutomaticRenamerFactoryisApplicable in interface AutomaticRenamerFactoryelement - the element being renamed.public java.lang.String getOptionName()
AutomaticRenamerFactorygetOptionName in interface AutomaticRenamerFactorypublic boolean isEnabled()
AutomaticRenamerFactoryisEnabled in interface AutomaticRenamerFactorypublic void setEnabled(boolean enabled)
AutomaticRenamerFactorysetEnabled in interface AutomaticRenamerFactoryenabled - true if the checkbox is checked, false otherwise.public AutomaticRenamer createRenamer(PsiElement element, java.lang.String newName, java.util.Collection<UsageInfo> usages)
AutomaticRenamerFactorycreateRenamer in interface AutomaticRenamerFactoryelement - the primary element being renamed.newName - the new name of the elementusages - the list of usages of the primary element.