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 173235 - Template File Renaming
Summary: Template File Renaming
Status: RESOLVED INCOMPLETE
Alias: None
Product: platform
Classification: Unclassified
Component: Templates (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-29 09:29 UTC by qbeukes
Modified: 2009-09-30 09:42 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description qbeukes 2009-09-29 09:29:35 UTC
I wanted to create a new license for use in a new project.

It would have been a minor customization of the Apache 2.0 license, so I opened the templates editor, selected the
apache20 license and pressed the Duplicate button.

Then I renamed it to "license_openejb.txt".

I tried to use the license but whenever I created a new file it would just show the "can't find file" error instead of
the license contents.

I browsed the netbeans configuration directory, and noticed that there wasn't an license_openejb.txt file, but instead
one called license_apache20.txt. 

I went back to the templates dialog, and duplicated the new license. It was now also called license_openejb.txt (there
was 2). The file was called license_apache20_1.txt. Duplicate again, and again, and again, they're all called
license_openejb.txt in Netbeans, but the files are all called license_apache20_XXX.txt.

The problem is either that the filenames are incorrect, or that netbeans is using the wrong method of referencing the
files. 

I would say that the files should be called whatever they are called in the IDE, becasue you might just want to access
the file in a different way, say through a template? Or through API by it's filename?

A workaround it to make the license, edit it, and once you're happy with it goto your home directory under
"netbeans/{VERSION}/config/Templates/Licenses/" and rename the newly created file to the name you want it to be, ie.
license_{YOURNAME}.txt. Then you can successfully reference the license files from the projects under the nane {YOURNAME}.
Comment 1 Jiri Rechtacek 2009-09-30 09:42:55 UTC
Please, could you note with release of IDE are you using? Thanks