Class EMFStoreDirtyDecoratorCachedTree
- java.lang.Object
-
- org.eclipse.emf.ecp.common.spi.cachetree.AbstractCachedTree<java.lang.Integer>
-
- org.eclipse.emf.ecp.emfstore.internal.ui.decorator.EMFStoreDirtyDecoratorCachedTree
-
public final class EMFStoreDirtyDecoratorCachedTree extends AbstractCachedTree<java.lang.Integer>
Cached tree implementation for dirty decorators of model elements managed by EMFStore.- Author:
- emueller
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
EMFStoreDirtyDecoratorCachedTree.CachedDirtyStateTreeNode
Cached tree node that stores the dirty state of a model element managed by EMFStore.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<org.eclipse.emf.ecore.EObject>
addOperation(org.eclipse.emf.ecore.EObject eObject)
Call to indicate that anEObject
was added.CachedTreeNode<java.lang.Integer>
createdCachedTreeNode(java.lang.Integer t)
Creates a cached tree node.java.lang.Integer
getDefaultValue()
Returns the default value for a cached node.
The root value will be initialized with this value, toostatic EMFStoreDirtyDecoratorCachedTree
getInstance(ECPProject project)
StaticEMFStoreDirtyDecoratorCachedTree
singleton.int
getOwnValue(org.eclipse.emf.ecore.EObject eObject)
Gets the own cached value of the given object.java.util.Set<org.eclipse.emf.ecore.EObject>
removeOperation(org.eclipse.emf.ecore.EObject eObject)
Call to indicate that anEObject
was removed.static void
removeProject(ECPProject project)
Removes an ECPProject from the Cache.java.util.Set<org.eclipse.emf.ecore.EObject>
setOperationCount(org.eclipse.emf.ecore.EObject eObject, int count)
Sets the operation count for the given object.-
Methods inherited from class org.eclipse.emf.ecp.common.spi.cachetree.AbstractCachedTree
clear, getCachedValue, getNodes, getRootValue, remove, update, updateNodeObject, updateParentNode
-
-
-
-
Method Detail
-
removeProject
public static void removeProject(ECPProject project)
Removes an ECPProject from the Cache.- Parameters:
project
- the project
-
getInstance
public static EMFStoreDirtyDecoratorCachedTree getInstance(ECPProject project)
StaticEMFStoreDirtyDecoratorCachedTree
singleton.- Parameters:
project
- theECPProject
to initialize this CashedTree on- Returns:
- Static instance of the
EMFStoreDirtyDecoratorCachedTree
-
getDefaultValue
public java.lang.Integer getDefaultValue()
Returns the default value for a cached node.
The root value will be initialized with this value, too- Specified by:
getDefaultValue
in classAbstractCachedTree<java.lang.Integer>
- Returns:
- the default value for a cached tree node
-
createdCachedTreeNode
public CachedTreeNode<java.lang.Integer> createdCachedTreeNode(java.lang.Integer t)
Creates a cached tree node.- Specified by:
createdCachedTreeNode
in classAbstractCachedTree<java.lang.Integer>
- Parameters:
t
- the value stored by the cached tree node- Returns:
- the created node
-
addOperation
public java.util.Set<org.eclipse.emf.ecore.EObject> addOperation(org.eclipse.emf.ecore.EObject eObject)
Call to indicate that anEObject
was added.- Parameters:
eObject
- the newEObject
- Returns:
- the
Set
ofEObject
affected by this change
-
removeOperation
public java.util.Set<org.eclipse.emf.ecore.EObject> removeOperation(org.eclipse.emf.ecore.EObject eObject)
Call to indicate that anEObject
was removed.- Parameters:
eObject
- the removedEObject
- Returns:
- the
Set
ofEObject
affected by this change
-
setOperationCount
public java.util.Set<org.eclipse.emf.ecore.EObject> setOperationCount(org.eclipse.emf.ecore.EObject eObject, int count)
Sets the operation count for the given object.- Parameters:
eObject
- the eobjectcount
- the new count- Returns:
- the set of affected elements
-
getOwnValue
public int getOwnValue(org.eclipse.emf.ecore.EObject eObject)
Gets the own cached value of the given object.- Parameters:
eObject
- the e object- Returns:
- the own cached value
-
-