public class AutomaticInheritorRenamerFactory extends java.lang.Object implements AutomaticRenamerFactory
EP_NAME
Constructor and Description |
---|
AutomaticInheritorRenamerFactory() |
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)
AutomaticRenamerFactory
isApplicable
in interface AutomaticRenamerFactory
element
- the element being renamed.public java.lang.String getOptionName()
AutomaticRenamerFactory
getOptionName
in interface AutomaticRenamerFactory
public boolean isEnabled()
AutomaticRenamerFactory
isEnabled
in interface AutomaticRenamerFactory
public void setEnabled(boolean enabled)
AutomaticRenamerFactory
setEnabled
in interface AutomaticRenamerFactory
enabled
- true if the checkbox is checked, false otherwise.public AutomaticRenamer createRenamer(PsiElement element, java.lang.String newName, java.util.Collection<UsageInfo> usages)
AutomaticRenamerFactory
createRenamer
in interface AutomaticRenamerFactory
element
- the primary element being renamed.newName
- the new name of the elementusages
- the list of usages of the primary element.