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

Bug 388033

Summary: Compare: able to compare any two folders
Product: [ECD] Orion Reporter: libing wang <libingw>
Component: ClientAssignee: libing wang <libingw>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ken_walker, simon_kaegi
Version: 0.5   
Target Milestone: 1.0 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description libing wang CLA 2012-08-24 17:26:48 EDT
We need to support comparing any two folders.
The current compare any two resources feature is almost useless because you have to select two files. In real world, developers always wants to compare two folders  and it should list up all the files modified. From that they click on any list item and it bring them to the compare page.
Comment 1 libing wang CLA 2012-08-24 17:29:44 EDT
released first draft here 
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=1519e3609918129525d2a2cc1983358d396daaa3.

Still in progress so the compare action is not enabled on selecting two folders.
Comment 2 libing wang CLA 2012-08-28 17:27:17 EDT
pushed second draft in http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=85a178db87cc6d138aa71d1a72bc19a427fb9e4b.

Everything is there except that the selection model does not work well on the explorer.
I think it is because the flat model I am using is not returning a proper model id. Should be fixed quickly.
Comment 3 libing wang CLA 2012-08-28 17:34:11 EDT
The action is enabled now. Work flow:
1. Select two folders. The first selected is treated as the "New" and second one as "Base".
2. Actions-> Compare to each other
3. A new page called compare-tree is opened.
4. All the changes are listed up in the page.
5. For modified files, you can click on the link of the first column to open the side by side compare page. The links on second and third columns are to open the file in both locations.

6.For added and removed files, the first column is to open the file in the editor.
Comment 4 libing wang CLA 2012-08-29 10:39:39 EDT
Did some tests. Worked fine. Still something missing here:
1.Sorted result by either name or folder.
2.Incremental rendering of the result. For now, maybe I can try to use explorer.createTree multiple times but I do not think it is the best way. We need a generic incremental rendering mechanism.
3.Confirmed that the model.getId has to be implemented in order to allow the selection model dictionary work properly.
Comment 5 libing wang CLA 2012-08-29 17:56:16 EDT
fixed with http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=850d09a69cbc308f1e373d2864b130ae6aafdaf8.

As mention in last comments, now you can:
1. Use selection model and navigation grids to open compare editor or folder.
2. Choose options to sort the result by name or folder location.
3. See incremental rendering while the comparing and fetching files are on the way.