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 71861 - On Mac OS X export patch dialog doesn't allow to specify destination file
Summary: On Mac OS X export patch dialog doesn't allow to specify destination file
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: CVS (show other bugs)
Version: 5.x
Hardware: Macintosh All
: P4 blocker (vote)
Assignee: issues@versioncontrol
: 74222 85284 (view as bug list)
Depends on:
Reported: 2006-01-25 16:04 UTC by nicfagn
Modified: 2007-01-09 12:25 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

Snapshot of the export patch dialog (62.14 KB, image/png)
2006-01-25 16:06 UTC, nicfagn

Note You need to log in before you can comment on or make changes to this bug.
Description nicfagn 2006-01-25 16:04:27 UTC
With Netbeans 5.0 RC2 on Mac OS X, when you choose 'Export "filename" Diff Patch...' from CVS menu you 
get a file chooser that doesn't have a field for writing the name for the patch file. 
The export button is initially disabled and the only way to enable it is to select a Mac OS X application or 
an already existing patch file.

As a workaround you can export a patch file selecting an existing application, e.g., and 
pressing export. The patch is correctly generated into a file named

This problem is NOT present when you run Netbeans 5.0 RC2 on Windows2000.
Comment 1 nicfagn 2006-01-25 16:06:12 UTC
Created attachment 28594 [details]
Snapshot of the export patch dialog
Comment 2 _ pkuzel 2006-01-25 16:35:55 UTC
On Mac there is bug in their JFileChooser. It's workaroundable but primary
should be fixed by Apple engineers. Report to Apple please.
Comment 3 nicfagn 2006-01-26 07:01:02 UTC
I don't think this a bug of Apple JFileChooser, simply when the filechooser is created in method 
performCvsAction of class ExportDiffAction it seems to be missing the following instruction:

chooser.setDialogType( JFileChooser.SAVE_DIALOG );

If you don't specify that, the dialog is left of type OPEN_DIALOG, and albeit working on some platforms, 
it's not the correct way to proceed.

Comment 4 _ pkuzel 2006-01-26 12:37:28 UTC
From setDialogType() Javadoc:

Sets the type of this dialog. Use OPEN_DIALOG when you want to bring up a file
chooser that the user can use to open a file. Likewise, use SAVE_DIALOG for
letting the user choose a file for saving. Use CUSTOM_DIALOG when you want to
use the file chooser in a context other than "Open" or "Save". For instance, you
might want to bring up a file chooser that allows the user to choose a file to
execute. Note that you normally would not need to set the JFileChooser to use
CUSTOM_DIALOG  since a call to setApproveButtonText does this for you. The
default dialog type is JFileChooser.OPEN_DIALOG.

The export code calls to setApproveButtonText(), so dialog type is custom. My
feeling was that type changed just button label.
Comment 5 _ pkuzel 2006-01-26 12:45:45 UTC
Checking in;
new revision: 1.32; previous revision: 1.31

Mac users could you verify in last daily build, please?
Comment 6 nicfagn 2006-01-27 20:27:13 UTC
Verified on daily build 200601261900 of Netbeans 5.1, on Mac OS X 10.4.4 and Java 1.5.0_06-57, and 
now it works, thanks.
Comment 7 _ pkuzel 2006-01-30 10:55:11 UTC
OK, thanks for the suggestion.
Comment 8 Peter Pis 2006-03-31 07:49:32 UTC
*** Issue 74222 has been marked as a duplicate of this issue. ***
Comment 9 Maros Sandor 2007-01-09 12:25:46 UTC
*** Issue 85284 has been marked as a duplicate of this issue. ***