| Summary: | Need a CVSLightweightDecorator.isDirty(ResourceMapping) | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Randy Hudson <hudsonr> |
| Component: | CVS | Assignee: | Michael Valenta <Michael.Valenta> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | dirk_baeumer |
| Version: | 3.1 | ||
| Target Milestone: | 3.2 M5 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Randy Hudson
If working sets are being passed to the filters, then maybe this is a bug in the CVS label decorator. Working sets are passed to the filter. Michael, is there anything JDT/UI can do to consider working sets during label decoration. If not is there something Team can do (there will be a plan item to improve working set support in Platform so this would fit into this item). Moving to Team/CVS for comments. I've been working on support for this and hope to get it into 3.2 M1 The fix for bug 3979 makes this possible but there are still some issues as outlined in bug 86493. Marking this a dup of that bug. *** This bug has been marked as a duplicate of 86493 *** > Working sets are passed to the filter.
Maybe they shouldn't be?
Randy, what check does your filter perform to see if the item hs outgoing changes? I'm calling internals from CVS:
if (resource != null && CVSWorkspaceRoot.isSharedWithCVS(resource)
&& CVSLightweightDecorator.isDirty(resource))
return true;
First I check for an instance of IResource, so maybe I'm not getting that far?
Once we get all the decorator stuff worked out, I'll provide a method that allows you to query the dirty state for a ResourceMapping. Thus, you will be able to determine the state for any item that adapts to a resource mapping. I have released support for this to HEAD. The new API exposes the synchronization state of a RepositoryProvider to clients. RepositoryProviders can choose whether to provide the API (which CVS does).
The following code snippet should give you an idea of how to use the API for what you want.
if (resource != null && CVSWorkspaceRoot.isSharedWithCVS(resource)) {
RespositoryProvider provider = RepositoryProvider.getProvider(resource.getProject());
Subscriber subscriber = provider.getSubscriber();
isDirty = subscriber.hasOutgoingChange(asResourceTraversal(resource));
}
The API has changed a bit. hasOutgoingChange has been replaced by a getState that takes a mask. Using a mask of IThreeWayDiff.OUTGOING should give you what you want. |