| Summary: | (PatchAttached)[Decorations] Add variable for CVS repository label to CVS text decorations. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Eugene Kuleshov <ekuleshov> | ||||
| Component: | CVS | Assignee: | platform-cvs-inbox <platform-cvs-inbox> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | Keywords: | helpwanted | ||||
| Version: | 3.1 | ||||||
| Target Milestone: | 3.2 M1 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 2000 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Eugene Kuleshov
Good idea. (In reply to comment #1) > Good idea. Michael, can you give me some hints to classes API, so maybe I can put a patch together to make it to 3.1. Does it sound realistic? 3.1 ships in a few weeks so there is absolutly no hope of this making it into 3.1. On the plus side, if you provide a patch it will be one of the first for 3.2 and it will give people incentive to start using 3.2;-). The classes you want to look at are CVSDecoratorConfiguration and CVSDecoratorPreferencesPage. (In reply to comment #3) > 3.1 ships in a few weeks so there is absolutly no hope of this making it into > 3.1. On the plus side, if you provide a patch it will be one of the first for > 3.2 and it will give people incentive to start using 3.2;-). > > The classes you want to look at are CVSDecoratorConfiguration and > CVSDecoratorPreferencesPage. Thanks Michael. I'll take a look. Created attachment 22666 [details]
Patch implementing this functionality
Thanks, I'll have a look once 3.1. is out the door. (In reply to comment #6) > Thanks, I'll have a look once 3.1. is out the door. Heh. Patch was so simple to implement, that I thought it had a chance for 3.1... Sorry, only critical defects are considered at this point. I have released the patch. However, I found one flaw. If the label of a repository is changed, the label decoration for the project is not updated (in case you're looking for something else to do;-) I already noticed that when I was porting this patch for Subclipse and for some reason I thought that it is not an issue in CVS plugin. Anyway, I'd appreciate any suggestions/pointers where to look for this. By the way, it would be a good idea to see default label somewhere. Now if you are using custom label, the default one is gone. I probably should open an issue/submit separate patch for this. The whole idea behind having the label was so the user wouldn't need to see the long location string. You can still get all the information from the properties box. As for the update, the problem is that there is no change event that triggers a redecoration. The simpliest thing is to add the follwoign code to the label change: CVSUIPlugin.broadcastPropertyChange(new PropertyChangeEvent(this, CVSUIPlugin.P_DECORATORS_CHANGED, null, null)); It's not ideal though as all the decorators will be refreshed. ANother options would be to touch all the projects that are mapped to that repository (IProject#touch). (In reply to comment #11) > The whole idea behind having the label was so the user wouldn't need to see > the long location string. You can still get all the information from the > properties box. Right, but from time to time users may need to copy all repository parameters (basically cvs url) and default label is a good way of doing this. > As for the update, the problem is that there is no change event that triggers > a redecoration. The simpliest thing is to add the follwoign code to the label > change: > > CVSUIPlugin.broadcastPropertyChange(new PropertyChangeEvent(this, > CVSUIPlugin.P_DECORATORS_CHANGED, null, null)); > > It's not ideal though as all the decorators will be refreshed. ANother options > would be to touch all the projects that are mapped to that repository > (IProject#touch). I can look at the touch option. I guess just iterate trough projects, somehow find sharing info and decide if it needs touch. From other hand label change not expected to be very often action, so maybe broadcast is not as bad... Verified in I20050808-2000. |