It's first time I opened it and it took me couple of minutes to realize what's happening. I have three Java files in a
package and two of them are opened in editor. Starting Diff action showed custom file chooser where my three Java files
are list at the left and two at the right (see screenshot). Most of diff programs usually let you choose two files to
diff so I thought that's the case here as well and browsed to a file in JFileChooser and then tried to select *second*
file in "Files open in Editor". But doing so just updates filechooser to that file. After a while I noticed dialog's
title which made it clear. Still the UI is wrong I think. Regular diff dialog like:
File A: [____file in editor_] [Browse]
File B: [___________________] [Browse]
would be much simpler and more intuitive. Or if you wanna keep list of currently opened files in editor:
Diff file <file in editor> to:
( ) [___________________] [Browse]
(*) [list box with files opened in editor]
In any case dialog at the moment shows selected item in both left and right list which makes it hard to guess what I
will be diffing to. See attached screenshot.Thanks.
Created attachment 67211 [details]
diff NewClass1 to NewServlet or NewClass??
I have no idea how to make it more intuitive, HIE?
In terms of feature matrix or coverage this could be an "enhancement"; in terms of UI quality or usability this is
defect. You cannot customize JFileChooser by adding an unrelated file selection concept to it. Purpose of filechooser
accessory is to provide an extra information on a selected file - eg. preview of a selected image; question whether
selected project folder should be opened with subprojects; decision how the selected file should be referenced; etc.
I also think this is a defect. I would suggest to call this action "Diff Two Files...", so that it's not confused with the versioning "Diff" action.
I would suggest to use UI similar to David's:
Diff Two Files - title
File A: |_MyJavaFile.java___________________v_| [ Browse... ]
File B: |___________________________________v_| [ Browse... ]
[[ Diff ]] [ Cancel ]
Where both fields are editable combo boxes. The popup of each combo could offer our best guess which files the user wants to diff, e.g. files open in
editor, some recent files, or something similar.
*** Issue 145448 has been marked as a duplicate of this issue. ***
*** Issue 153911 has been marked as a duplicate of this issue. ***