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.
[ BUILD # : 200409220845 ] [ JDK VERSION : J2SE 1.5.0 ] 1. Start with empty userdir 2. Press Ctrl+3 (Favourites window) 3. Press Shift+F10 4. Press Add To Favourites 5. In the dialog There is not way to step into the folder. If you press enter it adds the selected folder to the favourites need an ability to look into the folder
Changing comp+subcomp
Well, I really fear that this is the default behavior (not sayng that correct one) of JFileChooser which permits to select directories. You have to double-click the folder. Thus a JDK bug.
x
What L&F? On GTK L&F it is known bug of JFileChooser.
From Summary I thought you cannot select and add folder to Favorites but in description you say you cannot enter folder in JFileChooser using Enter. These are 2 different problems. First is problem on GTK L&F as I said. Second problem is default behavior of JFileChooser as Petr mentioned above.
I don't use GTK L&F. I use ocean. I don't think this bug relates to JFileChooser bug either because for example in File Open dialog I can look into folders without a problem. IMO Enter keypress is overridden by the add button. That's why I cannot step into the folders. And with the keyboard there is no other way to achieve this.
Probably you did not read my comment carefully enough. So again: JFileChooser has 3 possible modes set using method setFileSelectionMode: FILES_ONLY (default) DIRECTORIES_ONLY FILES_AND_DIRECTORIES If FILES_ONLY is used Enter enters directory. If the other 2 are used (ie. directory can be selected) Enter selects folder marked in list view ie. it is like press approve button. It means it does NOT enter directory. It is behaviour of JFileChooser depending on selected chooser mode. Is it clear enough now? As JFileChooser is able to add both files and folders to Favorites it is set to FILES_AND_DIRECTORIES selection mode.
Yes it's clear now. Can we workaround the issue somehow? For example make the selection mode FILES_ONLY and add the button "add current dir" or something that will add the directory we are in. I just want to use the IDE only with keyboard. But if it's not possible mouse double click is not a problem in this particular case.
To solve this we would have to hack current JFileChooser and use it everywhere or use our own file chooser. I will pass this issue to HIE to evaluate and decide what to do. The best way would be to file or vote (it it exists) for it in Swing/JDK.
Jano please check this. It is accessibility problem with JFileChooser with DIR chooser mode. Enter works as approval and not as enter dir as in FILES chooser mode. Thanks.
*** Issue 49733 has been marked as a duplicate of this issue. ***
Applicable to any file chooser in the IDE that asks for folders, I guess.
Data editors use hacked JFileChooser created by org.netbeans.beaninfo.editors.FileEditor.createHackedFileChooser() to fix this issue in wizards in NB 3.3.1. (Not part of API - see issue #18270.)
*** Issue 50594 has been marked as a duplicate of this issue. ***
We have a special directory chooser we're using for Open Project dialog. The same directory chooser would fix this issue.
Yes, in 6.0 we have our own tree-based directory chooser UI which allows to drill down the folders using right arrow or tree expand click or by directory name completion in text field.
Dafe in Favorites it shoudld be possible to select *BOTH* files and folders so we still use JFileChooser. If we use our custom directory chooser we cannot add file to favorites so this is not solved yet. AFAIK Swing improved behavior. I will check again with last JDK update.
Aha, sorry, we don't use our custom UI for "files and folders" mode...
BTW Quick Filechooser (on dev AU) does not suffer from this issue.
moving opened issues from TM <= 6.1 to TM=Dev
On Metal L&F Ctrl-Enter enters directory. On GTK L&F IDE uses Metal UI for JFileChooser. I just tested GTK JFileChooser ie. GTK UI and Ctrl-Enter works there as expected. Question to Jano: Is it not time now to stop using Metal UI for JFileChooser on GTK L&F? (I have no idea why Ctrl-Enter does not work on GTK L&F for Metal UI JFileChooser.)
Fixed for GTK L&F JFileChooser. I added Ctrl-ENTER into JFileChooser input map. 5e7207ea1d7c
Question if we should use GTK UI for JFileChooser on GTK L&F is still valid.
I'm not really sure why the IDE shows the file chooser in Metal if the whole IDE runs with GTK L&F. Using the GTK L&F is the right thing to do from UI perspective. Maybe there was some bug with the GTK file chooser, so we switched it to Metal?
Yes GTK UI of JFileChooser was not good in JDK 5. For JDK 6u1 and newer (we use GTK L&F as deafult for them) it should be ok. So I will set GTK UI for JFileChooser in IDE and wait for feedback. I filed issue #138648.
Integrated into 'main-golden', available in NB_Trunk_Production #295 build Changeset: http://hg.netbeans.org/main/rev/5e7207ea1d7c User: Marek Slama <mslama@netbeans.org> Log: #49998: Add Ctrl-ENTER to input map of JFileChooser on GTK L&F.