Two questions about Netbeans
I'm m开发者_如何学Cigrating from Eclipse to Netbeans, and two problems are happening:
- I created my own file template, but how can I set a default for the "Created file name" field?
I always name my files as
Class_Name.class.php
and Netbeans doesn't allow me to edit the field to add the ".class". - Sometimes, the mouse cursor change from the default text pointer to arrow pointer and I have to close and re-open Netbeans to go back to normal. Anyone had the same problem?
I'm running a Mac OS X 10.6.5 and Netbeans 6.9.1
Go to Tools|Templates, and in the template manager find the template in question. (Unintuitively) Right-Click on the template and select Properties. You can change the File Name property here, but in NB 6.9.1 it seems a bit quirky to me. For example, I changed the File Name for the PHP Class template from
PHPClass
toPHPCLass.class
. It certainly put the.class
on to the filename, but gave mePHPCLass.class
in the File Name field on the New PHP Class dialog (File|New File...|etc., or any of the number of other ways to get to a new file dialog). I had to deselect the .class part manually to give the file a name that still included the .class. More annoying, however, was that if the value of theFile Name
property contains an extension-looking piece, then the automatic generation of the.php
was surpressed! I had to go back and change theFile Name
property to "PHPClass.class.php" and deal with retaining both the .class and the .php.I tried going a different route, by attempting to add a new extension in Tools|Options|Miscellaneous|Files, but that would not let me create an extension that contained a period.
I have not found a property, yet, that controls the created name directly.
I've never seen that, ever. I'm not on a Mac, so that might be something quirky/localized to the Mac look and feel (try a different one--Napkin is always entertaining for about 90 seconds, :-) until you realize not all controls are accounted for), or maybe (and more scary) a quirk/bug in the native-end of Mac's implementation of Swing components.
精彩评论