org.eclipse.xtext.ui.refactoring.impl
Class AbstractRenameStrategy
java.lang.Object
org.eclipse.xtext.ui.refactoring.impl.AbstractRenameStrategy
- All Implemented Interfaces:
- IRenameStrategy
- Direct Known Subclasses:
- DefaultRenameStrategy, EmfResourceRenameStrategy
public abstract class AbstractRenameStrategy
- extends java.lang.Object
- implements IRenameStrategy
- Author:
- Jan Koehnlein - Initial contribution and API
Constructor Summary |
protected |
AbstractRenameStrategy(org.eclipse.emf.ecore.EObject targetElement)
Deprecated. this constructor is only present for backwards compatibility reasons and will be removed in Xtext 2.1 |
protected |
AbstractRenameStrategy(org.eclipse.emf.ecore.EObject targetElement,
org.eclipse.emf.ecore.EAttribute nameAttribute)
|
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. |
protected org.eclipse.emf.ecore.EAttribute |
getNameAttribute()
|
java.lang.String |
getOriginalName()
|
protected org.eclipse.emf.common.util.URI |
getTargetElementNewURI()
|
protected org.eclipse.emf.common.util.URI |
getTargetElementOriginalURI()
|
void |
revertDeclarationChange(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Reverts the declaration change to the semantic model in the given resource set. |
protected org.eclipse.emf.ecore.EObject |
setName(org.eclipse.emf.common.util.URI targetElementURI,
java.lang.String newName,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
|
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 |
AbstractRenameStrategy
protected AbstractRenameStrategy(org.eclipse.emf.ecore.EObject targetElement,
org.eclipse.emf.ecore.EAttribute nameAttribute)
AbstractRenameStrategy
@Deprecated
protected AbstractRenameStrategy(org.eclipse.emf.ecore.EObject targetElement)
- Deprecated. this constructor is only present for backwards compatibility reasons and will be removed in Xtext 2.1
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
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 org.eclipse.emf.ecore.EObject setName(org.eclipse.emf.common.util.URI targetElementURI,
java.lang.String newName,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
getTargetElementOriginalURI
protected org.eclipse.emf.common.util.URI getTargetElementOriginalURI()
getTargetElementNewURI
protected org.eclipse.emf.common.util.URI getTargetElementNewURI()
getNameAttribute
protected org.eclipse.emf.ecore.EAttribute getNameAttribute()