Class StorageTraversal
java.lang.Object
org.eclipse.emf.compare.ide.utils.StorageTraversal
- All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable,IDiagnosable
@Beta public class StorageTraversal extends java.lang.Object implements org.eclipse.core.runtime.IAdaptable, IDiagnosable
A Resource Traversal is no more than a set of resources used by the synchronization model to determine
which resources to load as part of a given logical model.
-
Constructor Summary
Constructors Constructor Description StorageTraversal(java.util.Set<? extends org.eclipse.core.resources.IStorage> storages)Creates our traversal given its set of resources.StorageTraversal(java.util.Set<? extends org.eclipse.core.resources.IStorage> storages, Diagnostic diagnostic)Creates our traversal given its set of resources. -
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.ObjectgetAdapter(java.lang.Class adapter)DiagnosticgetDiagnostic()Returns the diagnostic of the storages of this traversal.java.util.Set<? extends org.eclipse.core.resources.IStorage>getStorages()Returns a mutable copy of the set of resources that are part of this traversal.inthashCode()voidremoveStorage(org.eclipse.core.resources.IStorage storage)Removes the given storage from this traversal.voidsetDiagnostic(Diagnostic diagnostic)Set the diagnostic to be associated with this scope.
-
Constructor Details
-
StorageTraversal
public StorageTraversal(java.util.Set<? extends org.eclipse.core.resources.IStorage> storages)Creates our traversal given its set of resources.- Parameters:
storages- The set of resources that are part of this traversal.
-
StorageTraversal
public StorageTraversal(java.util.Set<? extends org.eclipse.core.resources.IStorage> storages, Diagnostic diagnostic)Creates our traversal given its set of resources.- Parameters:
storages- The set of resources that are part of this traversal.diagnostic- diagnostic of the errors that may occur during loading of the storages.
-
-
Method Details
-
getStorages
public java.util.Set<? extends org.eclipse.core.resources.IStorage> getStorages()Returns a mutable copy of the set of resources that are part of this traversal.- Returns:
- A mutable copy of the set of resources that are part of this traversal.
-
removeStorage
public void removeStorage(org.eclipse.core.resources.IStorage storage)Removes the given storage from this traversal.- Parameters:
storage- The storage to be removed.- Since:
- 3.1
-
getDiagnostic
Returns the diagnostic of the storages of this traversal.- Specified by:
getDiagnosticin interfaceIDiagnosable- Returns:
- the diagnostic
-
setDiagnostic
Set the diagnostic to be associated with this scope.- Specified by:
setDiagnosticin interfaceIDiagnosable- Parameters:
diagnostic- the diagnostic- See Also:
IDiagnosable.setDiagnostic(org.eclipse.emf.common.util.Diagnostic)
-
getAdapter
public java.lang.Object getAdapter(java.lang.Class adapter)- Specified by:
getAdapterin interfaceorg.eclipse.core.runtime.IAdaptable- See Also:
IAdaptable.getAdapter(java.lang.Class)
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-