| Summary: | [CVS Watch/Edit] Could display other editors when editing a file | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Michael Valenta <Michael.Valenta> | ||||||
| Component: | Team | Assignee: | Platform-VCM-Inbox <platform-vcm-inbox> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | enhancement | ||||||||
| Priority: | P3 | CC: | gregor.kohlwes, rwilms | ||||||
| Version: | 2.1 | Keywords: | helpwanted | ||||||
| Target Milestone: | 2.1 M5 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Michael Valenta
Created attachment 2824 [details]
Implementation of the cvs editors command
The following patches (org.eclipse.team.cvs.core and org.eclipse.team.cvs.ui)
implement the cvs editors command. There is a new popup team menu entry which
opens a new view containing information about the editors of the selected
resource. In case of IProject and IFolder the view will show the editors of the
contained files. This patch will be the base to fix this bug by changing the
EditAction and changing the FileModificationValidator. We will show a dialog
with the editors - if there are any - whenever the user wants to edit a file.
This feature will be configurable on the preference page.
Any comments, feedback or suggestion are welcome.
Your patch looks good and is almost ready to be committed. However, the Eclipse charter describes the licensing and copyright requirements for newly submitted files. Go to the bottom of the following link to read them. http://www.eclipse.org/eclipse/eclipse-charter.html Basically, each new file you submit must have a copyright notice. As for the code itself, it is good enough to commit but I'll mention some things I think could be added to make it better. 1) The ShowEditorsAction should probably be cancellable. Any uncancellable operation could potentially make the user wait for whatever time is specified as the CVS communication time (default is 60 seconds). 2) EditorsDialog is not used and should be removed 3) It's probably not worth having a separate interface for IEditorsInfo. I realize that a similar relationship exists for ILogInfo/LogInfo but I'm not sure if it is all that benefitial. I don't mind if you keep the interface for now but we may remove it if we refactor other listeners. 4) The resource name in the Editors view should show the project name (see next point). 5) I think it would be appropriate for the Show Editors command to be multi- select and allow selections accross projects (as other CVS operations allow). This would require point 4. 6) It would be nice to be able to sort the view by the various columns. As I said, I would submit the patch as is once the copyright notices are added. I mentioned the above in case you feel ambitious (and because we will eventually get bug reports for some of them anyway). I just noticed that the provider of the patch was not in the CC list of the bug. I've added their name in hopes that they will see the response/suggestions I added to the bug report last week. Created attachment 2955 [details]
Editors Patch Version 2
Here is the next version of our patch.
In reference to the above points:
1) The ShowEditorsAction is now cancellable.
2) The EditorsDialog is now used to inform the user
whenever he wants to edit a read-only file or wants to
execute an edit command.
3) IEditorsInfo has been deleted.
4) and 5) A multiselect could be problematic. The editors
command already shows the editors of the children of the
selected resource. If we allow multiselection there
could be an overlap and different projects could be located
in different CVS Servers. It is not impossible to allow
multiselection, but I don't know if it is worth.
6) Next version :-)
Additionally we have added the required copyright notices.
I have released this patch to HEAD. Please verify that the released code matches what you provided. Also, I modified the Watch/Edit prompt preferences test to reflect the new behavior (as I saw it). Please verify that this matches your intention. Finally, thanks for the contribution. I'm sure that any users of watch/edit will appreciate this. |