This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 72248 - Open dialog does not navigate into directories
Summary: Open dialog does not navigate into directories
Status: RESOLVED WORKSFORME
Alias: None
Product: utilities
Classification: Unclassified
Component: Open File (show other bugs)
Version: 5.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Marian Petras
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-04 00:02 UTC by pfarrell
Modified: 2007-09-12 21:32 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
binary patch for release50 - for testing purposes (5.14 KB, application/octet-stream)
2006-08-16 09:01 UTC, Marian Petras
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pfarrell 2006-02-04 00:02:38 UTC
I've just started using 5.0 after using many prior versions.
The file open dialog in many cases can't properly navigate into a directory.
It seems to find files and directories fine, but when the
file of interest is in a lower part of the directory tree,
clicking on the directory (or double clicking) does not open it.

If it helps, this is a Mandriva 2006 distro,
Linux m64.pfarrell.com 2.6.12-12mdk #1 Fri Sep 9 18:15:22 CEST 2005 i686 AMD
Athlon(tm) 64 Processor 3200+ unknown GNU/Linux
Comment 1 Marian Petras 2006-07-07 16:52:39 UTC
Thank you for the report.

I do not fully understand what do you mean with "file in a lower part of the
directory tree". Do you mean that the file is near or at the end of the list of
files/directories?

I have tried to reproduce the reported behaviour but everything worked well. I
have tried NetBeans 5.5 beta which is slightly newer than NetBeans 5.0 but there
should be no difference in behaviour of the file open dialog. I tested it with
two versions of JDK 1.5.0_07 - one for 32-bit machines and one for 64-bit AMD
machines. It seemed to work well in both cases.

Which version of JDK you use for running NetBeans? Do you use the default look
and feel? If you start NetBeans from a console (terminal), do you see any
exceptions reported in the console when you encounter the broken behaviour?
Comment 2 pfarrell 2006-07-07 17:02:09 UTC
I mean that the file open dialog box doesn't properly navigate the directory tree.
If you have a structure like in ~/sandbox/fooproject/src/com/pfarrell/foo
and you open a dialog box while in ~/sandbox/fooproject
you see the src directory, but clicking in it to drive into it, so you can
click to com to get to pfarrell to get to foo is very unreliable. It works only
a few times.

This is 5.0 released, not 5.5

JDK is jdk1.5.0_06
All defaults for look and feel, etc.
No exceptions or tracebacks when started from a shell.

Thanks
Comment 3 Marian Petras 2006-08-15 15:40:34 UTC
I found that there some JDK bug related to the open file dialog was fixed in JDK
1.5.0_07. Could you please try to reproduce this bug with the last version of
JDK 1.5.x (currently JDK 1.5.0_08)? If you still can reproduce it, do you know
of anyone else encountering the same issue?
Comment 4 Marian Petras 2006-08-15 15:46:09 UTC
It would be perfect if you also tried to reproduce it with a recent build of JDK
1.6.0.
Comment 5 pfarrell 2006-08-15 22:17:39 UTC
JDK 1.6.0 is still beta, right?
I'm willing to give it a shot. Probably take a couple of days, cause I use
Netbeans and Java to earn a living.
Comment 6 Marian Petras 2006-08-16 08:44:12 UTC
The latest builds of JDK 1.6.0 are in RC (release candidate) quality and I
consider them pretty good, anyway I understand you do not want to undertake the
risk.

JDK's are bundled with demos. One of them is a FileChooserDemo. It is located in
directory .../jdk1.5.0_06/demo/jfc/FileChooserDemo. To run it, go to that
directory (in the terminal/console) and run the following:

    java -jar FileChooserDemo.jar

When the main window of the demo app appears, press the "Show FileChooser"
button at the bottom of the window so that a file chooser appears. In the file
chooser, try to navigate to the directories that you cannot navigate to in
NetBeans. Do you see the same issues? Or does it work?
Comment 7 Marian Petras 2006-08-16 08:49:40 UTC
This issue might be related to the use of
FileUtil.preventFileChooserSymlinkTraversal(...) which should have solved issue
#46014.
Comment 8 Marian Petras 2006-08-16 09:01:23 UTC
Created attachment 32981 [details]
binary patch for release50 - for testing purposes
Comment 9 Marian Petras 2006-08-16 09:18:41 UTC
I have prepare a binary patch for NB 5.0. It provides a modified class
OpenFileAction - it is modified such that it does not use the suspicious method
FileUtil.preventFileChooserSymlinkTraversal(...).

To apply the patch, put the attached file to subdirectory

    ide6/modules/patches/org-netbeans-modules-utilities

of your NetBeans 5.0 installation directory. (Most probably the "patches"
subdirectory does not exist so you will have to create it.) Then (re)start
NetBeans and try whether the file chooser works better. Thanks.
Comment 10 Marian Petras 2007-09-12 21:32:58 UTC
This issue is marked INCOMPLETE and without any response from the reporter for more than a year and nobody else has
reported a similar issue since then, so I mark it as WORKSFORME.

Feel free to reopen this bug report if you still experience the described issue.