org.eclipse.xtext.xbase.ui.jvmmodel.refactoring
Class AbstractJvmModelRenameStrategy

java.lang.Object
  extended by org.eclipse.xtext.ui.refactoring.impl.AbstractRenameStrategy
      extended by org.eclipse.xtext.ui.refactoring.impl.DefaultRenameStrategy
          extended by org.eclipse.xtext.xbase.ui.jvmmodel.refactoring.AbstractJvmModelRenameStrategy
All Implemented Interfaces:
IRenameStrategy
Direct Known Subclasses:
PureXbaseRenameStrategy, Xtend2RenameStrategy

public abstract class AbstractJvmModelRenameStrategy
extends DefaultRenameStrategy

Author:
Jan Koehnlein - Initial contribution and API

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.xtext.ui.refactoring.impl.DefaultRenameStrategy
DefaultRenameStrategy.Provider
 
Field Summary
 
Fields inherited from class org.eclipse.xtext.ui.refactoring.impl.DefaultRenameStrategy
nameRuleName, originalNameRegion, valueConverterService
 
Constructor Summary
protected AbstractJvmModelRenameStrategy(org.eclipse.emf.ecore.EObject targetElement, org.eclipse.emf.ecore.EAttribute nameAttribute, ITextRegion originalNameRegion, java.lang.String nameRuleName, IValueConverterService valueConverterService, IJvmModelAssociations xtend2jvmAssociations)
           
protected AbstractJvmModelRenameStrategy(org.eclipse.emf.ecore.EObject targetElement, ILocationInFileProvider locationInFileProvider, IJvmModelAssociations jvmModelAssociations)
          Deprecated. exists for backwards compatibility reasons only and will be removed in Xtext 2.1
 
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  IJvmModelAssociations getJvmModelAssociations()
           
 void revertDeclarationChange(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
          Reverts the declaration change to the semantic model in the given resource set.
protected abstract  void setInferredJvmElementName(java.lang.String name, org.eclipse.emf.ecore.EObject renamedSourceElement)
           
protected  void setInferredJvmElementName(java.lang.String newName, org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
           
 
Methods inherited from class org.eclipse.xtext.ui.refactoring.impl.DefaultRenameStrategy
createDeclarationUpdates, getDeclarationTextEdit, getNameAsText, getNameAsValue, getOriginalName
 
Methods inherited from class org.eclipse.xtext.ui.refactoring.impl.AbstractRenameStrategy
getNameAttribute, getTargetElementNewURI, getTargetElementOriginalURI, setName, validateNewName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractJvmModelRenameStrategy

protected AbstractJvmModelRenameStrategy(org.eclipse.emf.ecore.EObject targetElement,
                                         org.eclipse.emf.ecore.EAttribute nameAttribute,
                                         ITextRegion originalNameRegion,
                                         java.lang.String nameRuleName,
                                         IValueConverterService valueConverterService,
                                         IJvmModelAssociations xtend2jvmAssociations)

AbstractJvmModelRenameStrategy

@Deprecated
protected AbstractJvmModelRenameStrategy(org.eclipse.emf.ecore.EObject targetElement,
                                                    ILocationInFileProvider locationInFileProvider,
                                                    IJvmModelAssociations jvmModelAssociations)
Deprecated. exists for backwards compatibility reasons only and will be removed in Xtext 2.1

Method Detail

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
Overrides:
applyDeclarationChange in class DefaultRenameStrategy

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
Overrides:
revertDeclarationChange in class AbstractRenameStrategy

setInferredJvmElementName

protected void setInferredJvmElementName(java.lang.String newName,
                                         org.eclipse.emf.ecore.resource.ResourceSet resourceSet)

setInferredJvmElementName

protected abstract void setInferredJvmElementName(java.lang.String name,
                                                  org.eclipse.emf.ecore.EObject renamedSourceElement)

getJvmModelAssociations

protected IJvmModelAssociations getJvmModelAssociations()