Class ResourceRelocationContext
- java.lang.Object
-
- org.eclipse.xtext.ide.refactoring.ResourceRelocationContext
-
public class ResourceRelocationContext extends java.lang.Object- Since:
- 2.13
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classResourceRelocationContext.ChangeType
-
Constructor Summary
Constructors Constructor Description ResourceRelocationContext(ResourceRelocationContext.ChangeType changeType, java.util.List<ResourceRelocationChange> changes, RefactoringIssueAcceptor issueAcceptor, IChangeSerializer changeSerializer, org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddModification(ResourceRelocationChange change, IChangeSerializer.IModification<org.eclipse.emf.ecore.resource.Resource> modification)Loads and watches the respective resource, applies the relocation change and calls the givenmodificationwith the renamed/moved/copied resource.java.util.List<ResourceRelocationChange>getChanges()IChangeSerializergetChangeSerializer()ResourceRelocationContext.ChangeTypegetChangeType()RefactoringIssueAcceptorgetIssueAcceptor()org.eclipse.emf.ecore.resource.ResourceSetgetResourceSet()protected org.eclipse.emf.ecore.resource.ResourceloadAndWatchResource(ResourceRelocationChange change)Loads and watches the respective resource and applies the relocation change.
-
-
-
Constructor Detail
-
ResourceRelocationContext
public ResourceRelocationContext(ResourceRelocationContext.ChangeType changeType, java.util.List<ResourceRelocationChange> changes, RefactoringIssueAcceptor issueAcceptor, IChangeSerializer changeSerializer, org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
-
-
Method Detail
-
addModification
public void addModification(ResourceRelocationChange change, IChangeSerializer.IModification<org.eclipse.emf.ecore.resource.Resource> modification)
Loads and watches the respective resource, applies the relocation change and calls the givenmodificationwith the renamed/moved/copied resource.- Parameters:
change- the change to executemodification- the side-effect the rename/move/copy operation should have.
-
loadAndWatchResource
protected org.eclipse.emf.ecore.resource.Resource loadAndWatchResource(ResourceRelocationChange change)
Loads and watches the respective resource and applies the relocation change. Clients may usually rather calladdModification(org.eclipse.xtext.ide.refactoring.ResourceRelocationChange, org.eclipse.xtext.ide.serializer.IChangeSerializer.IModification<org.eclipse.emf.ecore.resource.Resource>)to register their side-effects.- Parameters:
change- the change to execute
-
getChangeType
public ResourceRelocationContext.ChangeType getChangeType()
-
getChanges
public java.util.List<ResourceRelocationChange> getChanges()
-
getIssueAcceptor
public RefactoringIssueAcceptor getIssueAcceptor()
-
getChangeSerializer
public IChangeSerializer getChangeSerializer()
-
getResourceSet
public org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
-
-