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 17075 - Macros in templates don't work for non-Java templates
Summary: Macros in templates don't work for non-Java templates
Status: RESOLVED DUPLICATE of bug 3812
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-29 02:40 UTC by Laurie Harper
Modified: 2002-11-30 17:52 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laurie Harper 2001-10-29 02:40:29 UTC
Template macros are only expanded in files generated from templates that have a
'.java' extension.  Other types of template (JSP, text file, etc) don't get
macro expansion applied.
Comment 1 _ ttran 2001-10-29 08:03:23 UTC
Yarda, please help me.  Who is responsible for this part of code?
Comment 2 Jaroslav Tulach 2001-10-29 09:05:42 UTC
There is a support for macros in openide, but just support, still
module writers has to provide a mapping (keyword -> value) which
openide cannot.

So this is a task for all module writers. Use FileEntry.Format or
util.MapFormat directly.

I am assigning this to text module, after fix, reassign it to JSP,
etc. Laurie, better approach would probably be to create additional
enhancements for each module that does not have this functionality and
make this issue depend on them.


Comment 3 Jan Chalupa 2001-11-27 17:03:37 UTC
Target milestone -> 3.3.1.
Comment 4 Jesse Glick 2001-11-27 20:01:01 UTC
Yarda, the problem is that then every module would need to have a
system option or similar giving custom macro vars such as USER and so
on, and a user would have to find and modify each of these. That would
be unacceptable UI.

We should find a way to share macro values. Some like __PACKAGE_NAME__
in .java only make sense for a particular file type of course, but
user-customizable ones at least should be sharable, and it would at
least be convenient for modules to have a central place where more
neutral non-customizables ones like __NAME__ would be defined, though
this is less important. openidex? Some other way?

I think Ian and I had this discussion long ago, but it was never
resolved. May need thread on nbdev.
Comment 5 Marek Grummich 2002-07-22 11:39:19 UTC
Set target milestone to TBD
Comment 6 Jesse Glick 2002-11-30 17:52:04 UTC
Already filed in openide.

*** This issue has been marked as a duplicate of 3812 ***