|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
How to make template with licenseDear all, I have problem to create the license text in java templates
in NetBeans ver 6.5. In the template editor I get the following source
text: <#assign licenseFirst =
"/*"> <#assign licensePrefix =
" * "> <#assign licenseLast =
" */"> <#include "../Licenses/license-${project.license}.txt"> <#if package?? &&
package != ""> package ${package}; </#if> /** * * @author ${user} */ public class ${name} { } How should I modify the command: <#include "../Licenses/license-${project.license}.txt"> And where should I create the text file? If I put
there an absolute pathname or a relative path it dosn’t work properly. Thanx for help Vaclav Trojan |
|
|
Re: How to make template with licenseHi Vaclav, there's a few steps you need to undertake
Setup the License Text 1. Create a new text file with form "license-TYPE.txt" where TYPE is the license type you wish to refer to. 2. Go to Tools > Templates 3. Click add and browse to your license file. Alter your project license 1. Go to the "Files" tab. 2. Navigate to "nbproject" and open "project.properties". 3. Add a new line containing the following text (replacing TYPE with your license type): project.license=TYPE Now, your license will be used with templates that refer to it. Hope this helps, -Brett 2009/5/13 Trojan Václav <Vaclav.Trojan@...>
|
|
|
Re: How to make template with licenseDear Brett,
thank you for resepone. However, I tried exactly
what you recommended and I received response of NetBeans:
Error reading included file
Templates/Classes/../Licenses/license-TYPE.txt
Have you an idea awhat is my mistake?
Yours
Vaclav
|
|
|
Re: How to make template with licenseHi Vaclav, what's the name you used to replace TYPE? It needs to appear in the project properties file instead of TYPE, also is your license file-name in the form of license-TYPE.txt?
Just a test, try setting your project.license in the project properties to one of the existing templates (like apache20). -Brett 2009/5/13 Vaclav Trojan <trojan.vaclav@...>
|
| Free embeddable forum powered by Nabble | Forum Help |