public class DefaultRenameStrategy extends AbstractRenameStrategy
EAttribute name.IRenameStrategy.Provider| Modifier and Type | Field and Description |
|---|---|
protected String |
nameRuleName |
protected ITextRegion |
originalNameRegion |
| Constructor and Description |
|---|
DefaultRenameStrategy() |
| Modifier and Type | Method and Description |
|---|---|
void |
applyDeclarationChange(String newName,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Applies the declaration change to the semantic model in the given resource set.
|
void |
createDeclarationUpdates(String newName,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
IRefactoringUpdateAcceptor updateAcceptor)
Creates the document updates and reports them to the updateAcceptor
|
protected org.eclipse.text.edits.TextEdit |
getDeclarationTextEdit(String newName) |
protected String |
getNameAsText(String nameAsValue) |
protected String |
getNameAsText(String nameAsValue,
String nameRuleName) |
protected String |
getNameAsValue(String nameAsText) |
protected String |
getNameAsValue(String nameAsText,
String nameRuleName) |
protected String |
getNameRuleName(org.eclipse.emf.ecore.EObject targetElement,
org.eclipse.emf.ecore.EAttribute nameAttribute) |
String |
getOriginalName() |
protected ITextRegion |
getOriginalNameRegion(org.eclipse.emf.ecore.EObject targetElement,
org.eclipse.emf.ecore.EAttribute nameAttribute) |
boolean |
initialize(org.eclipse.emf.ecore.EObject targetElement,
IRenameElementContext context) |
org.eclipse.ltk.core.refactoring.RefactoringStatus |
validateNewName(String newName) |
getNameAttribute, getNameAttribute, getTargetElementNewURI, getTargetElementOriginalURI, revertDeclarationChange, setNameprotected ITextRegion originalNameRegion
protected String nameRuleName
public boolean initialize(org.eclipse.emf.ecore.EObject targetElement,
IRenameElementContext context)
initialize in interface DefaultRenameStrategyProvider.IInitializableinitialize in class AbstractRenameStrategypublic org.eclipse.ltk.core.refactoring.RefactoringStatus validateNewName(String newName)
validateNewName in interface IRenameStrategyvalidateNewName in class AbstractRenameStrategyprotected ITextRegion getOriginalNameRegion(org.eclipse.emf.ecore.EObject targetElement, org.eclipse.emf.ecore.EAttribute nameAttribute)
protected String getNameRuleName(org.eclipse.emf.ecore.EObject targetElement, org.eclipse.emf.ecore.EAttribute nameAttribute)
public void createDeclarationUpdates(String newName, org.eclipse.emf.ecore.resource.ResourceSet resourceSet, IRefactoringUpdateAcceptor updateAcceptor)
IRenameStrategyprotected org.eclipse.text.edits.TextEdit getDeclarationTextEdit(String newName)
public String getOriginalName()
getOriginalName in interface IRenameStrategygetOriginalName in class AbstractRenameStrategypublic void applyDeclarationChange(String newName, org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
IRenameStrategyapplyDeclarationChange in interface IRenameStrategyapplyDeclarationChange in class AbstractRenameStrategyCopyright © 2016. All Rights Reserved.