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.
Steps to reproduce: - add remote solaris host using local user account (tester) - call Add New Tool Collection - press "Browse" in "Add New Tool Collection" dialog, it shows content of /export/home/tester - in File Chooser dialog press "Up One Level" button, File Chooser navigates one level up (/export/home) - press "Up One Level" button once again Result: Nothing happens. The button does not work either if I return back to /export/home/tester
Escalated to P2 as file chooser is unusable without this button as I cannot navigate to the root directory to add any tool collection from e.g. /shared/dp/...
"Up One Level" button works for me. But I can't go in opposite direction: clicking or pressing Enter on any directory has no effect.
Hey, I've just upgraded my JDK from 1.6.0.13 to 1.6.0.20 and the problem is gone. Alexander, what is your JDK version? Does upgrading help?
1.6.0.16
I've found the reason for the problem I saw with JDK 1.6.0.13. javax.swing.plaf.basic.BasicFileChooserUI.changeDirectory(File dir) looks like: private void changeDirectory(File dir) { JFileChooser fc = getFileChooser(); // Traverse shortcuts on Windows if (dir != null) { try { ShellFolder shellFolder = ShellFolder.getShellFolder(dir); // code skipped } catch (FileNotFoundException ex) { return; } } fc.setCurrentDirectory(dir); // code skipped } Here ShellFolder.getShellFolder(dir) throws an exception, so the directory is not changed. Here dir is our RemoteFileObjectBasedFile. In JDK 1.6.0.16 and 1.6.0.20 the BasicFileChooserUI.changeDirectory(File dir) is slightly different: private void changeDirectory(File dir) { JFileChooser fc = getFileChooser(); // Traverse shortcuts on Windows if (dir != null && FilePane.usesShellFolder(fc)) { try { ShellFolder shellFolder = ShellFolder.getShellFolder(dir); // code skipped } catch (FileNotFoundException ex) { return; } } fc.setCurrentDirectory(dir); // code skipped } Here we don't get into if block, ShellFolder.getShellFolder(dir) is not called, and changing directory succeeds. I'll look into ShellFolder.getShellFolder() to see if we can make it work without throwing an exception to make remote file chooser useful for older JDK users as well. However this problem must be different from the problem you saw, because you have JDK 1.6.0.16 which works for me. So I still can not reproduce your problem.
About my previous comment #5: - typo: "RemoteFileObjectBasedFile" should be "FileObjectBasedFile" - the JDK problem is known: http://bugs.sun.com/view_bug.do?bug_id=6698013. Looks like we can't work it around. It is fixed in JDK 1.6.0.14.
I can reproduce the problem if I press "Add..." and then "Browse" buttons in Tools->Options->C/C++->Build Tools. But if I press "..." button next to any compiler, the file chooser works correctly.
Created attachment 99206 [details] Patch for o.n.swing.dirchooser.DirectoryChooserUI I've tracked the problem down to o.n.swing.dirchooser.DirectoryChooserUI. It unconditionally uses getShellFolderForFile() with our remote file and fails. The problem is similar to the mentioned BasicFileChooserUI JDK problem. Fix is also similar.
Please review my fix and integrate if you agree. This bug makes remote directory chooser in CND unusable.
Starting showstopper process.
Changeset: 3b27e2474127 Author: Dafe Simonek <dsimonek@netbeans.org> Date: 2010-05-20 16:21 Message: #186302: use getShellFolderForFile() only when useShellFolder is true Issue #186302 - "Up One Level" button in remote file chooser works only once
Stando could you please review the fix in order to be able to transplant to release69 branch? Thank you.
fix reviewed, seems to be ok
Verified in rc1 build.