Bug 143713 - custom JFileChooser shown for action Tools->Diff is unintuitive
custom JFileChooser shown for action Tools->Diff is unintuitive
Status: NEW
Product: utilities
Classification: Unclassified
Component: Diff
6.x
All All
: P4 (vote)
: 6.x
Assigned To: Tomas Stupka
diff-issues@utilities
:
: 153911 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-13 08:22 UTC by David Konecny
Modified: 2010-10-07 15:17 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
diff NewClass1 to NewServlet or NewClass?? (21.11 KB, image/png)
2008-08-13 08:24 UTC, David Konecny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Konecny 2008-08-13 08:22:30 UTC
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.
Comment 1 David Konecny 2008-08-13 08:24:01 UTC
Created attachment 67211 [details]
diff NewClass1 to NewServlet or NewClass??
Comment 2 Maros Sandor 2008-08-20 11:38:06 UTC
I have no idea how to make it more intuitive, HIE?
Comment 3 David Konecny 2008-08-25 03:06:11 UTC
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.
Comment 4 jrojcek 2008-08-29 08:21:58 UTC
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.

Comment 5 Maros Sandor 2008-08-29 10:30:51 UTC
*** Issue 145448 has been marked as a duplicate of this issue. ***
Comment 6 Maros Sandor 2008-12-18 11:10:59 UTC
*** Issue 153911 has been marked as a duplicate of this issue. ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo