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 225953

Summary: Custom dialogs created by FileChooserBuilder should remember current directory
Product: platform Reporter: crimes
Component: FilesystemsAssignee: Jaroslav Havlin <jhavlin>
Status: RESOLVED FIXED    
Severity: normal Keywords: NETFIX, PATCH_AVAILABLE
Priority: P3    
Version: 7.4   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: Proposed patch

Description crimes 2013-02-10 15:15:07 UTC
Created attachment 131208 [details]
Proposed patch

JFileChoosers created using FileChooserBuilder.createFileChooser() only remember the current directory when the dialog is created using showOpenDialog(...) or showSaveDialog(...), but not when it is created using showDialog(...).  This is a problem as the last method is the only way to create a dialog with custom approve button text (and probably other custom configuration as well).

The reason is that file choosers created by FileChooserBuilder only override the showOpenDialog(...) and showSaveDialog(...) methods to remember the current directory.  I can't see any obvious reason not to override showDialog(...) - which is in fact called by the other two methods - instead/as well (see the attached patch).
Comment 1 Jaroslav Tulach 2013-07-18 08:49:44 UTC
OK, good patch. I don't see you in the list of approved contributors.
https://netbeans.org/about/legal/approved-contributors.html?print=yes
can you please sign OCA and reopen this bug.
Comment 2 crimes 2013-07-29 21:10:07 UTC
OCA signed, sent & accepted.
Comment 3 Jaroslav Havlin 2013-08-15 13:50:47 UTC
(In reply to crimes from comment #2)
> OCA signed, sent & accepted.
Thank you.
Comment 4 Jaroslav Havlin 2013-09-04 07:55:01 UTC
Integrated as http://hg.netbeans.org/core-main/rev/7d340b0be11a
Thank you very much for providing the patch.