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.
Summary: | Missing tool for define own template variables | ||
---|---|---|---|
Product: | platform | Reporter: | tprochazka <tprochazka> |
Component: | Favorites | Assignee: | Jaroslav Tulach <jtulach> |
Status: | RESOLVED DUPLICATE | ||
Severity: | blocker | CC: | gsporar, jpokorsky, mkleint, mpetras |
Priority: | P4 | Keywords: | REGRESSION |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
tprochazka
2007-06-21 21:55:16 UTC
apisupport/templates is unrelated. Please use the 'ide' component if unsure. AFAIK this is as designed; you can create additional files to include which could define various variables or insert other stuff (see Freemarker docs for syntax). But Jan can clarify. to jglick: sorry, maybe will be better remove "templates" from apisupport component description to jglick: But it require include something to all templates, this is a bit complicated when I need for example modify ${user} variable. The only way how to customize ${user} is to set the system property user.name IMO. I can speak only for the java module where the old templates support for .java files was implemented in previous releases. The old Advanced Options -> Editing -> Java Sources -> String Table was removed since it would be unusable by other templates now. AFAIK Jarda who introduced the new template support has no plan to implement neither code completion nor syntax highlighting for Freemarker templates nor UI for templates attributes. But I can be wrong. *** Issue 100199 has been marked as a duplicate of this issue. *** Imho, the correct way to do this with FreeMarker is to define one file which will be included by all other templates. This file would have content like: # override the user name, if not defined here, it is taken from system # name=Your name etc. but this can be done manually by any user - it is not necessary to handle this in the system - thus lowering priority. One file with variables definition is not problem, but problem is include it with all templates. This too complicated for most of user. Much better would be if this file will be auto-included with Netbeans template system. There needs to be an easy way for users to define these strings, whether it's documenting how to use an external file or having some kind of editor. My use case is USER="Glenn Holmer ©Weyco Group, Inc. 2007". I agree, this is a usability issue. You are going to require uses to modify every template in order to add the user name? *** This issue has been marked as a duplicate of 114625 *** |