| Summary: | Add decorator for CVS Repositories view to show if project is in workspace | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Eugene Kuleshov <ekuleshov> |
| Component: | CVS | Assignee: | 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
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. 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. 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. 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. We do not plan on addressing this item. |