org.eclipse.xtext.common.types.ui.refactoring.participant
Class JvmMemberRenameStrategy
java.lang.Object
org.eclipse.xtext.common.types.ui.refactoring.participant.JvmMemberRenameStrategy
- All Implemented Interfaces:
- IRenameStrategy
public class JvmMemberRenameStrategy
- extends java.lang.Object
- implements IRenameStrategy
Renames a JVM element in a TypeResource
and updates all references to it.
- Author:
- Jan Koehnlein - Initial contribution and API
Method Summary |
void |
applyDeclarationChange(java.lang.String newName,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Applies the declaration change to the semantic model in the given resource set. |
void |
createDeclarationUpdates(java.lang.String newName,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
IRefactoringUpdateAcceptor updateAcceptor)
Creates the document updates and reports them to the updateAcceptor |
java.lang.String |
getOriginalName()
|
void |
revertDeclarationChange(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Reverts the declaration change to the semantic model in the given resource set. |
protected JvmMember |
setName(org.eclipse.emf.common.util.URI targetURI,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
java.lang.String newName)
|
org.eclipse.ltk.core.refactoring.RefactoringStatus |
validateNewName(java.lang.String newName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
targetMemberOriginalURI
protected org.eclipse.emf.common.util.URI targetMemberOriginalURI
targetMemberNewURI
protected org.eclipse.emf.common.util.URI targetMemberNewURI
originalName
protected java.lang.String originalName
JvmMemberRenameStrategy
public JvmMemberRenameStrategy(JvmMember targetMember)
applyDeclarationChange
public void applyDeclarationChange(java.lang.String newName,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
- Description copied from interface:
IRenameStrategy
- Applies the declaration change to the semantic model in the given resource set.
- Specified by:
applyDeclarationChange
in interface IRenameStrategy
revertDeclarationChange
public void revertDeclarationChange(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
- Description copied from interface:
IRenameStrategy
- Reverts the declaration change to the semantic model in the given resource set.
- Specified by:
revertDeclarationChange
in interface IRenameStrategy
setName
protected JvmMember setName(org.eclipse.emf.common.util.URI targetURI,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
java.lang.String newName)
createDeclarationUpdates
public void createDeclarationUpdates(java.lang.String newName,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
IRefactoringUpdateAcceptor updateAcceptor)
- Description copied from interface:
IRenameStrategy
- Creates the document updates and reports them to the updateAcceptor
- Specified by:
createDeclarationUpdates
in interface IRenameStrategy
getOriginalName
public java.lang.String getOriginalName()
- Specified by:
getOriginalName
in interface IRenameStrategy
validateNewName
public org.eclipse.ltk.core.refactoring.RefactoringStatus validateNewName(java.lang.String newName)
- Specified by:
validateNewName
in interface IRenameStrategy