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.
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. Netbeans.app, and pressing export. The patch is correctly generated into a file named Netbeans.app.patch. This problem is NOT present when you run Netbeans 5.0 RC2 on Windows2000.
Created attachment 28594 [details] Snapshot of the export patch dialog
On Mac there is bug in their JFileChooser. It's workaroundable but primary should be fixed by Apple engineers. Report to Apple please.
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.
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.
Checking in ExportDiffAction.java; /shared/data/ccvs/repository/javacvs/cvsmodule/src/org/netbeans/modules/versioning/system/cvss/ui/actions/diff/ExportDiffAction.java,v <-- ExportDiffAction.java new revision: 1.32; previous revision: 1.31 Mac users could you verify in last daily build, please?
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.
OK, thanks for the suggestion.
*** Issue 74222 has been marked as a duplicate of this issue. ***
*** Issue 85284 has been marked as a duplicate of this issue. ***