org.eclipse.xtext.ui.refactoring.impl
Class EmfResourceReferenceUpdater

java.lang.Object
  extended by org.eclipse.xtext.ui.refactoring.impl.AbstractReferenceUpdater
      extended by org.eclipse.xtext.ui.refactoring.impl.EmfResourceReferenceUpdater
All Implemented Interfaces:
IReferenceUpdater

public class EmfResourceReferenceUpdater
extends AbstractReferenceUpdater

A generic reference updater for EMF resources referring to Xtext elements. Uses the resources default serialization mechanism to update resources. This only works if the resource does not have errors. For Xtext-based languages it is far more error tolerant to use a DefaultReferenceUpdater that only serializes the sections of the document that contain the cross-references.

Author:
Jan Koehnlein - Initial contribution and API, Holger Schill

Constructor Summary
EmfResourceReferenceUpdater()
           
 
Method Summary
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)
           
 
Methods inherited from class org.eclipse.xtext.ui.refactoring.impl.AbstractReferenceUpdater
createReferenceUpdates, loadReferringResources, loadTargetResource, resolveReference, resolveReferenceProxies
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmfResourceReferenceUpdater

public EmfResourceReferenceUpdater()
Method Detail

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