|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Constants used to communicate Catalog Deltas.
For those familiar with IResourceChangeEvent and IResourceDelta from eclipse development there is one important addition. The constant REPLACE indicates a reaname, or substiution, you will need to replace any references you have to the oldObject with the newObject.
For "bit mask" style interation please use: EnumSet.of(Kind.ADDED, Kind.REPLACED)
Nested Class Summary | |
static class |
ResolveDelta.Kind
Kind of Delta, used to indicate change. |
Field Summary | |
static java.util.List |
NO_CHILDREN
List indicating no children are present |
Method Summary | |
void |
accept(ResolveDeltaVisitor visitor)
Accepts the given visitor. |
java.util.List |
getChildren()
Resource deltas for all added, removed, changed, or replaced. |
java.util.List |
getChildren(java.util.Set kindMask)
Finds and returns the delta information for a given resource. |
ResolveDelta.Kind |
getKind()
Returns the kind of this delta. |
Resolve |
getNewResolve()
For replacement ( REPLACE ), this handle describes the resource in the "after"
state. |
Resolve |
getResolve()
Returns a handle for the affected handle. |
Field Detail |
public static final java.util.List NO_CHILDREN
Method Detail |
public ResolveDelta.Kind getKind()
Normally, one of ADDED
, REMOVED
, CHANGED
or
REPLACED
.
This set is still open, during shutdown we may throw a few more kinds around. Eclipse makes use of PHANTOM, and NON_PHANTOM not sure we care
Kind.ADDED
,
Kind.REMOVED
,
Kind.CHANGED
,
Kind.REPLACED
public void accept(ResolveDeltaVisitor visitor) throws java.io.IOException
The only kinds of resource delta that our visited are ADDED, REMOVED, CHANGED and REPLACED.
This is a convenience method, equivalent to accepts( visitor, IService.NONE )
visitor
-
CoreException
java.io.IOException
public java.util.List getChildren()
This is a short cut for:
finally List list = new ArrayList();
accept( IServiceDeltaVisitor() {
public boolean visit(IResolveDelta delta) {
switch (delta.getKind()) {
case IDelta.ADDED :
case IDelta.REMOVED :
case IDelta.CHANGED :
case IDelta.REPLACED :
list.add( delta );
default: // ignore
}
return true;
}
});
return list.toArray();
public java.util.List getChildren(java.util.Set kindMask)
public Resolve getResolve()
For additions (ADDED
), this handle describes the newly-added resolve; i.e.,
the one in the "after" state.
For changes (CHANGED
), this handle also describes the resource in the
"after" state.
For removals (REMOVED
), this handle describes the resource in the "before"
state. Even though this handle not normally exist in the current workspace, the type of
resource that was removed can be determined from the handle.
For removals (REPLACE
), this handle describes the resource in the "before"
state. The new handle can be determined with getNewResolve().
public Resolve getNewResolve()
REPLACE
), this handle describes the resource in the "after"
state. The old handle can be determined with getResolve().
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |