Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 74785

Summary: Add decorator for CVS Repositories view to show if project is in workspace
Product: [Eclipse Project] Platform Reporter: Eugene Kuleshov <ekuleshov>
Component: CVSAssignee: platform-cvs-inbox <platform-cvs-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P5 Keywords: helpwanted
Version: 3.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Eugene Kuleshov CLA 2004-09-23 11:37:15 EDT
Working with a huge workspace it is difficult to track down if project already
in workspace. Because it could be closed or not included into the active workset
it is not verbose for the user.

It would be good to have visual marker in tree nodes on CVS Repositories view
for modules that are already exist in the worspace.
Comment 1 Eugene Kuleshov CLA 2005-02-16 12:46:52 EST
Any news on this issue? Should it be changed to 3.1?

Maybe you can give some pointers to code where to add this functionality, so it
will be easier to contribute a patch.
Comment 2 Michael Valenta CLA 2005-02-16 13:06:51 EST
There is no plan to address this in 3.1. 

The Repo view code is in the RepositoriesView class and it's superclass 
RemoteViewPart. It uses the WorkbenchLabelProvider as the label (and image) 
provider. This would have to be wrapped to use the decoration mechanism 
(DecoratingLabelProvider) or changed to a subclass of WorkbenchLabelProvider. 
In either case, performance is a concern since you would need to link remote 
folders to their local projects. This will either require a complete scan of 
the workspace for each remote folder (which is unacceptable) or a cache of the 
mappings that can be efficiently queried. Such a cache would need to be 
updated when projects are added and deleted and when projects are shared with 
CVS or disconnected.
Comment 3 Eugene Kuleshov CLA 2005-02-16 13:21:39 EST
Can it be done other way around? E.g., add some metadata into remote folder
object upon its creation, so it won't need to query workspace or cache. However
it still will have to listen for workspace updates.

To start with, can you give me a hint how to listen to such workspace updates:
add/remove/open/close/share/disconnect project?

Thank you in advance.
Comment 4 Michael Valenta CLA 2005-02-16 13:36:01 EST
Yes, that is possible. The problem is that there isn't really a model for the 
repository view. What I mean by that is when you expand a repository, you see 
the remote folders. If you close the view the remote folders are lost. If you 
reopen the view and expand again, the foldes are refetched. Expanding a branch 
will, yet again, fetch the remote folders.

So, you could mark the remote folders but you would still need to look for 
matching workspace projects when the folder was fetched and now you have the 
added problem that you cannot find the remote folders on a project or sharing 
chane since their is no explicit model (although you could dig them out of the 
tree viewer). I don't mean to sound negative but the repository view is just 
not in a the kind of shape that makes features like this easy to implement. If 
we had an cached model of the repository folders, that would simplify things. 
Comment 5 Michael Valenta CLA 2006-06-14 16:00:17 EDT
We do not plan on addressing this item.