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.
[ JDK VERSION : 1.6.* ] License templates are not being recognised if they are renamed from the templates section: 1. Got a Maven project where the license is specified as follows: <properties> <netbeans.hint.license>gpl3</netbeans.hint.license> </properties> 2. I add a license file called license-abc.txt into the license template group 3. From the template manager I select the license file and rename it to license-gpl3.txt 4. When I created Java files I get an error text in the top of the file: Error reading included file Templates/J2EE/EJB30/../../Licenses/license-gpl3.txt Looking into USERDIR/config/Templates/Licenses the file was not renamed from license-abc.txt to license-gpl3.txt, even though that is what is appearing in the template manager.
*** Issue 161878 has been marked as a duplicate of this issue. ***
It's intentional behavior. Rename of template means just changing a display name of template instead of renaming a primary file, since fix of issue 152973.
Thanks for clearing that up. However, I don't think it makes sense at all to rename templates without the templates actually being renamed. What's the purpose of renaming the display name of a template?
*** Bug 183647 has been marked as a duplicate of this bug. ***
Comment #2 says that the license template retaining its original name is intended behavior. Fine, but there's still a bug, even if you don't like the proposed solution. The bug is that if you want to configure a custom license to be included in your file templates, you have to know the license template's file name, not its display name, and there's no way to know the file name via the template manager. The only way to find the file name is to peek into ~/.netbeans/6.8/config/Templates/Licenses/ . Furthermore, that name will typically be misleading: when you create a new template by copying an existing one, the new file name will be the original file name with a couple of extra characters appended. For example, you could end up with the BSD license in a file named license-gpl30_1.txt.
*** Bug 178346 has been marked as a duplicate of this bug. ***
*** Bug 188170 has been marked as a duplicate of this bug. ***
Must be fixed.
After discussion with Jiri, it looks like it's necessary to distinguish rename of file name and rename of the display name. The display name is the string under which the template is displayed in the New File dialog, therefore it has sense to rename that display name. The file creation process operates with the file name, therefore it has a sense to be able to rename that as well.
Fixed by changeset: 179342:c50b3b53f3db Both file name and display name can be renamed. File name can be renamed only when it's not defined by a module layer (not used by any module).
Integrated into 'main-golden', will be available in build *201010130000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/c50b3b53f3db User: mentlicher@netbeans.org Log: #163534 Allow to transparently rename the template display name and file name. The template file name can be renamed only if the template is not defined by a module layer.
*** Bug 195241 has been marked as a duplicate of this bug. ***