org.eclipse.emf.workspace.util
Interface WorkspaceSynchronizer.Delegate
-
Enclosing class:
-
WorkspaceSynchronizer
-
public static interface WorkspaceSynchronizer.Delegate
Call-back interface for an object to which a
WorkspaceSynchronizer
delegates the algorithms for handling different kinds of resource
changes.
Every call-back is invoked asynchronously in a read-only transaction on
the synchronizer's editing domain. Any model changes that the
receiver wishes to make must be scheduled asynchronously, although
workspace changes are permitted as the calling thread has the
workspace lock. The call-backs are not actually required to handle the
resource change; they can defer to the default behaviour.
Method Summary
|
void
|
dispose
()
Disposes me. |
boolean
|
handleResourceChanged
(
Resource resource)
Optionally handles a change to the physical workspace resource
behind the specified EMF resource. |
boolean
|
handleResourceDeleted
(
Resource resource)
Optionally handles the deletion of the physical workspace resource
behind the specified EMF resource. |
boolean
|
handleResourceMoved
(
Resource resource,
URI newURI)
Optionally handles the move of the physical workspace resource
behind the specified EMF resource. |
handleResourceDeleted
boolean handleResourceDeleted(
Resource resource)
- Optionally handles the deletion of the physical workspace resource
behind the specified EMF resource.
-
-
Parameters:
-
resource
- a resource whose storage has been deleted
-
Returns:
-
true
if I handled the resource deletion;
false
to defer to the workspace synchronizer's
default algorithm
handleResourceMoved
boolean handleResourceMoved(
Resource resource,
URI newURI)
- Optionally handles the move of the physical workspace resource
behind the specified EMF resource. Both in-place renames of a
resource and relocations of a resource to another container are
considered as moves.
-
-
Parameters:
-
resource
- a resource whose storage has been moved -
newURI
- the new URI of the moved resource
-
Returns:
-
true
if I handled the resource deletion;
false
to defer to the workspace synchronizer's
default algorithm
handleResourceChanged
boolean handleResourceChanged(
Resource resource)
- Optionally handles a change to the physical workspace resource
behind the specified EMF resource.
-
-
Parameters:
-
resource
- a resource whose storage has been changed
-
Returns:
-
true
if I handled the resource change;
false
to defer to the workspace synchronizer's
default algorithm
dispose
void dispose()
- Disposes me. This is called by the synchronizer when it is disposed.
-