Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 248333 - [Watch/Edit] Team Show Editors grid is not sortable
Summary: [Watch/Edit] Team Show Editors grid is not sortable
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: CVS (show other bugs)
Version: 3.4   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.5 M3   Edit
Assignee: Tomasz Zarna CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-23 15:36 EDT by Brian Mauter CLA
Modified: 2009-06-02 05:02 EDT (History)
0 users

See Also:


Attachments
patch file to add sorting to Team Editors grid (7.55 KB, patch)
2008-09-23 15:36 EDT, Brian Mauter CLA
tomasz.zarna: iplog+
Details | Diff
Patch v02 (6.70 KB, patch)
2008-09-30 11:34 EDT, Tomasz Zarna CLA
no flags Details | Diff
mylyn/context/zip (113.54 KB, application/octet-stream)
2008-09-30 11:34 EDT, Tomasz Zarna CLA
no flags Details
Patch v03 (6.75 KB, patch)
2008-10-01 04:31 EDT, Tomasz Zarna CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Mauter CLA 2008-09-23 15:36:47 EDT
Created attachment 113285 [details]
patch file to add sorting to Team Editors grid

Build ID: I20080617-2000

Steps To Reproduce:
1. On a CVS project that is using the editors file, right click the project and choose Team -> Show Editors.
2. Look at the resulting CVS Editors view.  The columns are not sortable.  You cannot click on the column headers like every other grid and you can't right-click to change sort options either.

More information:
When you have 100 people working on the same project, it's nice to know who's editing a file.  It's also nice to know what files I've marked as being an editor.  The company I work for uses this as a crude mechanism to enforce one-editor-at-a-time behavior.

When I looked at the code for this view, I found that it simply did not have anything in it to support sorting.  I decided to add it myself.  Hopefully I can attach it to this bug.  If not please email me and I'll be very happy to supply a patch file.
Comment 1 Tomasz Zarna CLA 2008-09-30 11:34:11 EDT
Created attachment 113881 [details]
Patch v02

Thanks for the patch Brain, I did have a look at it and I made some changes. Could you check if it still works as expected? If yes I will apply it asap.
Comment 2 Tomasz Zarna CLA 2008-09-30 11:34:16 EDT
Created attachment 113882 [details]
mylyn/context/zip
Comment 3 Brian Mauter CLA 2008-09-30 12:38:03 EDT
(In reply to comment #1)
> Created an attachment (id=113881) [details]
> Patch v02
> 
> Thanks for the patch Brain, I did have a look at it and I made some changes.
> Could you check if it still works as expected? If yes I will apply it asap.
> 

I like the way you implemented it much better.  However, it seems that dates do not sort at all now.  I'm trying to find out why now.
Comment 4 Brian Mauter CLA 2008-09-30 12:45:50 EDT
Local files not yet checked into CVS have a null user name, date and computer name.  At the top of your extractDate(String) method, add a null check on dateString:
if ( dateString == null ) return -1;
Comment 5 Tomasz Zarna CLA 2008-10-01 04:31:28 EDT
Created attachment 113963 [details]
Patch v03

Sorry, I don't use Watch/Edit on daily basis, so I don't know all the cases. However, from what I see you cannot even run Show Editors action on an unshared file (not yet checked in). I added the check anyway, just to be on the safe side. Thanks for testing, let me know if there is anything else to add. If you're fine with the fix as it is, I will release immediately.
Comment 6 Brian Mauter CLA 2008-10-01 11:33:37 EDT
(In reply to comment #5)
> Created an attachment (id=113963) [details]
> Patch v03
> 
> Sorry, I don't use Watch/Edit on daily basis, so I don't know all the cases.
> However, from what I see you cannot even run Show Editors action on an unshared
> file (not yet checked in). I added the check anyway, just to be on the safe
> side. Thanks for testing, let me know if there is anything else to add. If
> you're fine with the fix as it is, I will release immediately.
> 

You can run Show Editors on a project.  A project can have files not yet added to CVS.  With the null check in place, I'm very happy with the fix.  THANKS!
Comment 7 Tomasz Zarna CLA 2008-10-02 05:24:13 EDT
Latest patch released to HEAD. Thanks Brian!