org.eclipse.xtext.ui.refactoring.impl
Class DefaultReferenceUpdater
java.lang.Object
org.eclipse.xtext.ui.refactoring.impl.AbstractReferenceUpdater
org.eclipse.xtext.ui.refactoring.impl.DefaultReferenceUpdater
- All Implemented Interfaces:
- IReferenceUpdater
- Direct Known Subclasses:
- JvmModelReferenceUpdater
public class DefaultReferenceUpdater
- extends AbstractReferenceUpdater
Creates updates for all references from Xtext based resources to a renamed element using Xtext's serialization API.
- Author:
- Jan Koehnlein - Initial contribution and API
Method Summary |
protected void |
createReferenceUpdate(org.eclipse.emf.ecore.EObject referringElement,
org.eclipse.emf.common.util.URI referringResourceURI,
org.eclipse.emf.ecore.EReference reference,
int indexInList,
org.eclipse.emf.ecore.EObject newTargetElement,
IRefactoringUpdateAcceptor updateAcceptor)
|
protected void |
createReferenceUpdate(IReferenceDescription referenceDescription,
org.eclipse.emf.common.util.URI referringResourceURI,
ElementRenameArguments elementRenameArguments,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
IRefactoringUpdateAcceptor updateAcceptor)
|
protected void |
createReferenceUpdates(ElementRenameArguments elementRenameArguments,
com.google.common.collect.Multimap<org.eclipse.emf.common.util.URI,IReferenceDescription> resource2references,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
IRefactoringUpdateAcceptor updateAcceptor,
org.eclipse.core.runtime.IProgressMonitor monitor)
|
protected void |
createTextChange(ITextRegion referenceTextRegion,
java.lang.String newReferenceText,
org.eclipse.emf.ecore.EObject referringElement,
org.eclipse.emf.ecore.EObject newTargetElement,
org.eclipse.emf.ecore.EReference reference,
org.eclipse.emf.common.util.URI referringResourceURI,
IRefactoringUpdateAcceptor updateAcceptor)
|
protected CrossReference |
getCrossReference(org.eclipse.emf.ecore.EObject referringElement,
int offset)
|
protected CrossReferenceSerializerFacade |
getCrossReferenceSerializerFacade()
|
protected ILocationInFileProvider |
getLocationInFileProvider()
|
protected ITransientValueService |
getTransientValueService()
|
protected void |
processReferringResource(org.eclipse.emf.ecore.resource.Resource referringResource,
java.lang.Iterable<IReferenceDescription> referenceDescriptions,
ElementRenameArguments elementRenameArguments,
IRefactoringUpdateAcceptor updateAcceptor)
Override this method for pre- or post-processing hooks. |
Methods inherited from class org.eclipse.xtext.ui.refactoring.impl.AbstractReferenceUpdater |
createClusteredReferenceUpdates, createReferenceUpdates, createReferenceUpdatesForCluster, getClusterSize, handleCannotLoadReferringElement, handleCannotResolveExistingReference, loadReferringResources, loadTargetResources, resolveReference, resolveReferenceProxies, unloadNonTargetResources |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultReferenceUpdater
public DefaultReferenceUpdater()
createReferenceUpdates
protected void createReferenceUpdates(ElementRenameArguments elementRenameArguments,
com.google.common.collect.Multimap<org.eclipse.emf.common.util.URI,IReferenceDescription> resource2references,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
IRefactoringUpdateAcceptor updateAcceptor,
org.eclipse.core.runtime.IProgressMonitor monitor)
- Specified by:
createReferenceUpdates
in class AbstractReferenceUpdater
processReferringResource
protected void processReferringResource(org.eclipse.emf.ecore.resource.Resource referringResource,
java.lang.Iterable<IReferenceDescription> referenceDescriptions,
ElementRenameArguments elementRenameArguments,
IRefactoringUpdateAcceptor updateAcceptor)
- Override this method for pre- or post-processing hooks.
createReferenceUpdate
protected void createReferenceUpdate(IReferenceDescription referenceDescription,
org.eclipse.emf.common.util.URI referringResourceURI,
ElementRenameArguments elementRenameArguments,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
IRefactoringUpdateAcceptor updateAcceptor)
createReferenceUpdate
protected void createReferenceUpdate(org.eclipse.emf.ecore.EObject referringElement,
org.eclipse.emf.common.util.URI referringResourceURI,
org.eclipse.emf.ecore.EReference reference,
int indexInList,
org.eclipse.emf.ecore.EObject newTargetElement,
IRefactoringUpdateAcceptor updateAcceptor)
createTextChange
protected void createTextChange(ITextRegion referenceTextRegion,
java.lang.String newReferenceText,
org.eclipse.emf.ecore.EObject referringElement,
org.eclipse.emf.ecore.EObject newTargetElement,
org.eclipse.emf.ecore.EReference reference,
org.eclipse.emf.common.util.URI referringResourceURI,
IRefactoringUpdateAcceptor updateAcceptor)
getCrossReference
protected CrossReference getCrossReference(org.eclipse.emf.ecore.EObject referringElement,
int offset)
getLocationInFileProvider
protected ILocationInFileProvider getLocationInFileProvider()
getTransientValueService
protected ITransientValueService getTransientValueService()
getCrossReferenceSerializerFacade
protected CrossReferenceSerializerFacade getCrossReferenceSerializerFacade()