Class ModelResourceListener
java.lang.Object
org.eclipse.emf.compare.ide.ui.internal.logical.resolver.ModelResourceListener
- All Implemented Interfaces:
EventListener
,org.eclipse.core.resources.IResourceChangeListener
,org.eclipse.core.resources.IResourceDeltaVisitor
public class ModelResourceListener
extends Object
implements org.eclipse.core.resources.IResourceChangeListener, org.eclipse.core.resources.IResourceDeltaVisitor
This will listen to workspace changes and react to all changes on "model" resources as determined by
ThreadedModelResolver#MODEL_CONTENT_TYPES
.- See Also:
-
ThreadedModelResolver#hasModelType(IFile)
-
Field Summary
Modifier and TypeFieldDescriptionKeeps track of the URIs that need to be reparsed when next we need the dependencies graph .protected final ReentrantLock
Prevents concurrent access to the two internal sets.Tracks the files that have been removed.Fields inherited from interface org.eclipse.core.resources.IResourceChangeListener
PROPERTY_EVENT_MASK
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the set of all changed URIs since we last updated the dependencies graph, and clears it for subsequent calls.Retrieves the set of all removed URIs since we last updated the dependencies graph, and clears it for subsequent calls.void
resourceChanged
(org.eclipse.core.resources.IResourceChangeEvent event) boolean
visit
(org.eclipse.core.resources.IResourceDelta delta)
-
Field Details
-
changedURIs
Keeps track of the URIs that need to be reparsed when next we need the dependencies graph . -
removedURIs
Tracks the files that have been removed. -
internalLock
Prevents concurrent access to the two internal sets.
-
-
Constructor Details
-
ModelResourceListener
public ModelResourceListener()Initializes this listener.
-
-
Method Details
-
resourceChanged
public void resourceChanged(org.eclipse.core.resources.IResourceChangeEvent event) - Specified by:
resourceChanged
in interfaceorg.eclipse.core.resources.IResourceChangeListener
-
popChangedURIs
Retrieves the set of all changed URIs since we last updated the dependencies graph, and clears it for subsequent calls.- Returns:
- The set of all changed URIs since we last updated the dependencies graph.
-
popRemovedURIs
Retrieves the set of all removed URIs since we last updated the dependencies graph, and clears it for subsequent calls.- Returns:
- The set of all removed URIs since we last updated the dependencies graph.
-
visit
public boolean visit(org.eclipse.core.resources.IResourceDelta delta) throws org.eclipse.core.runtime.CoreException - Specified by:
visit
in interfaceorg.eclipse.core.resources.IResourceDeltaVisitor
- Throws:
org.eclipse.core.runtime.CoreException
- See Also:
-
IResourceDeltaVisitor.visit(org.eclipse.core.resources.IResourceDelta)
-