Bug 224562 - Provide more flexible way to compare files
Summary: Provide more flexible way to compare files
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Compare (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 enhancement with 3 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform-Compare-Inbox CLA
QA Contact: Tomasz Zarna CLA
URL:
Whiteboard:
Keywords: bugday, helpwanted, usability
: 39126 198701 (view as bug list)
Depends on: 240298 241088 241643 243744 73923 198701 239959 241077 241539 241649 244623
Blocks: 264498
  Show dependency tree
 
Reported: 2008-03-28 06:56 EDT by Tomasz Zarna CLA
Modified: 2019-02-21 11:07 EST (History)
7 users (show)

See Also:


Attachments
Initial patch. Just a dialog window divided into sections. (5.63 KB, patch)
2008-07-02 08:55 EDT, Aleksandra Wozniak CLA
no flags Details | Diff
Initial patch once again. This time complete. (7.23 KB, patch)
2008-07-02 09:01 EDT, Aleksandra Wozniak CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Zarna CLA 2008-03-28 06:56:42 EDT
We have couple of bugs related to this usability issue already. Just to name some of them:
* bug 73923 - files outside the workspace
* bug 39126 - files opened in editors

Initially, I thought about adding a dialog here, but having a dynamic menu entry (as suggested in bug 198701) is an option too.
Comment 1 Aleksandra Wozniak CLA 2008-07-02 08:55:31 EDT
Created attachment 106306 [details]
Initial patch. Just a dialog window divided into sections.

Initial patch.
Comment 2 Aleksandra Wozniak CLA 2008-07-02 09:01:33 EDT
Created attachment 106307 [details]
Initial patch once again. This time complete.
Comment 3 Tomasz Zarna CLA 2008-07-08 06:26:49 EDT
Thank for the first patch Ola, finally I've got something I can comment on. Here are my comments, in no special order.
* Move the action and dialog class to org.eclipse.compare.internal package, we are not planning it to be API, aren't we? At least for now. 
* Missing title
* The dialog should be resizable
* Add copyrights to the newly created classes [1], I would put "Aleksandra Wozniak and others" there
* Externalize string literals from the dialog's class, ie place them in a .properties file
* I don't know if "Compare With > Other Resource" is the best name for the action, but I'm sure it needs an ellipsis, as the action takes further input before running 
* OK button should be disabled when field for left or right "panel" is empty/incorrect
* Consider using TitleAreaDialog where you can inform the user about a problem, or think about different way of saying that something went wrong when selecting a resource
* It would be great if each of the "file" fields have its history
* Does populating the dialog with an initial selection sounds rational to you? ie if I opened the dialog on a file, that file could be used for the "left file"
* I guess that an option for clearing selected file/resource on a dialog sounds reasonable, setting a different selection is not always an option (like for the ancestor pane)
* I've been also thinking about hiding/collapsing the "ancestor pane" area by default ie making it expandable (to see what I mean take a look at "Preferences>Java>Compiler>Building" pref page or "Team>Apply Patch" dialog). What do you think?

Feel free to split the above comments into separate bugs.

I haven't taken a closer look at the code yet, will add some more comments then.

[1] http://www.eclipse.org/legal/copyrightandlicensenotice.php
Comment 4 Aleksandra Wozniak CLA 2008-07-09 12:01:42 EDT
Some of the modifications suggested above are already done (check the latest attachment to bug 239959). 

> * I don't know if "Compare With > Other Resource" is the best name for the
> action, but I'm sure it needs an ellipsis, as the action takes further input
> before running 

That's just an initial name. I didn't have an idea for better one so far. 

> * It would be great if each of the "file" fields have its history

Will be added soon.

> * I guess that an option for clearing selected file/resource on a dialog sounds
> reasonable, setting a different selection is not always an option (like for the
> ancestor pane)

I added a "Clear" button for each panel/section and also a "Clear all" button in the main button bar of the dialog. I don't know though if the last one is necessary.

> * I've been also thinking about hiding/collapsing the "ancestor pane" area by
> default ie making it expandable (to see what I mean take a look at
> "Preferences>Java>Compiler>Building" pref page or "Team>Apply Patch" dialog).
> What do you think?

Thanks for the point. I thought such a thing is possible only in the eclipse forms. 
Comment 5 Tomasz Zarna CLA 2008-07-10 06:56:12 EDT
I've released part of the patch to branch "bug_20080710_CompreWithDialog", see bug 239959, comment 4.
Comment 6 Tomasz Zarna CLA 2009-04-09 11:26:54 EDT
Since there are still blocking bugs opened there is no chance to have this completely fixed and released during 3.5. Nevertheless, we will consider this bug to be addressed during 3.6 (it's on our draft dev plan for 3.6, http://wiki.eclipse.org/Workspace3.6).
Comment 7 Lars Vogel CLA 2018-06-29 06:50:01 EDT
*** Bug 39126 has been marked as a duplicate of this bug. ***
Comment 8 Lars Vogel CLA 2018-06-29 06:51:16 EDT
*** Bug 198701 has been marked as a duplicate of this bug. ***
Comment 9 Witold Kaczurba CLA 2019-02-21 09:48:30 EST
Hi.
I am missing details of this bug. But I agree that there should be an easier way of comparing files that are already opened in the editor. It takes too long to find relevant stuff on large-scale projects. #SO post:

https://stackoverflow.com/questions/54806136/is-there-a-way-of-comparing-two-open-files-without-using-package-explorer-projec?noredirect=1#comment96394104_54806136

Cheers,