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 141990 - Code Templates predefined variables don't work
Summary: Code Templates predefined variables don't work
Status: REOPENED
Alias: None
Product: editor
Classification: Unclassified
Component: Completion & Templates (show other bugs)
Version: 8.2
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-29 07:08 UTC by avp
Modified: 2016-09-02 15:41 UTC (History)
0 users

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 avp 2008-07-29 07:08:09 UTC
In http://wiki.netbeans.org/FaqTemplateVariables we have list of predefined variables  but no one var form this list
don't work in latest build in "Code templates". 
I know that this list is for Option->Templates but in IDE exists and other templates Tools->Options->Editor->Code
Templates and I think for this Templates this vars must work too. 
If am wrong in my suggestions then this issue must be ENH, please change it if you know answer.
Comment 1 Peter Pis 2008-07-30 07:48:33 UTC
Reassigning to editor.
Comment 2 Vitezslav Stejskal 2008-08-01 12:43:42 UTC
The file templates variables don't work in code templates. They have never been meant to do so. I personally think there
is a little use for these variables in code templates.
Comment 3 avp 2008-08-01 12:51:35 UTC
If they don't work with code templates then maybe must do. Examples:
- create documentation for class members - add username, date
- create TODO detailed description - username, date
- use some code rules (create some description for loops, if/else construction) - username, date
Comment 4 Vitezslav Stejskal 2008-08-01 13:43:59 UTC
Well, as I said I don't think this is much useful, but if you insist. Also:

> - create documentation for class members - add username, date

The @author javadoc tag is already generated for top level classes. By convention it should not be used anywhere else.
There is no javadoc tag that is supposed to specify a date, there is @since but it should contain a version number.
Comment 5 tamh 2012-09-14 15:34:31 UTC
Any news on the progress of this enhancement?
I'm supporting this one too because it is very useful for small documentation comments in team oriented projects.
Something on the line of:

// [${user}] ${date.date.toString('yyyymmdd')} ${cursor}

would be really useful when someone changes someone else's project and wants to leave a comment there. jm2c to be fairly honest.
Comment 6 eithel 2014-09-18 08:21:13 UTC
I'm interest too!

If you develop on drupal framework, your module name (which is same of filename) are repeated in every function (hook) of the module. So instead of repeating filename every time i have to write a function, a simple ${name} variable would be very useful
Comment 7 Martin Balin 2016-07-07 07:27:49 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 8 dalton1130 2016-09-02 15:41:39 UTC
I agree that this would be a nice enhancement