Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 210454 - Patch for: Code Templates: add 'currClassName'/'currClassFullName'/'currPackage' variables
Patch for: Code Templates: add 'currClassName'/'currClassFullName'/'currPacka...
Product: editor
Classification: Unclassified
Component: Completion & Templates
PC Windows 7
: P3 with 1 vote (vote)
: 8.0.1
Assigned To: Dusan Balek
: 183633 (view as bug list)
Depends on:
Blocks: 148947
  Show dependency treegraph
Reported: 2012-03-30 15:39 UTC by 280Z28
Modified: 2015-03-26 22:26 UTC (History)
1 user (show)

See Also:

Implementation (4.24 KB, patch)
2012-03-30 15:39 UTC, 280Z28
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description 280Z28 2012-03-30 15:39:01 UTC
Created attachment 117562 [details]

The currPackage and currClassFullName hints would be similar to the currClassName hint, and could be used like the following:

I'm particularly interested in using this for modifying the default "logr" template by adding a usage comment:

// -D${fullClassVar editable="false" currClassFullName}.level=FINE
private static final ${loggerType type="java.util.logging.Logger" default="Logger" editable="false"} LOGGER = ${loggerType}.getLogger(${classVar editable="false" currClassName default="getClass()"}.class.getName());

The currPackage hint is not used here, but in the process of implementing the currClassFullName hint it was trivial to include as well.
Comment 1 Dusan Balek 2013-06-20 15:56:42 UTC
Unfortunately NB 7.4 is already feature frozen. Marking as an enhancement for
the next release.
Comment 2 markiewb 2014-07-09 21:54:16 UTC
@Dusan: Please review the patch. The original author (Samuel Harwell - NB - 280Z28) signed the OCA.
Comment 3 Dusan Balek 2014-07-22 11:50:01 UTC
Slightly modified patch applied. Thanks for your contribution.
Comment 4 Quality Engineering 2014-07-30 02:33:55 UTC
Integrated into 'main-silver', will be available in build *201407300001* on (upload may still be in progress)

User: Dusan Balek <>
Log: Issue #210454: Patch for: Code Templates: add 'currClassName'/'currClassFullName'/'currPackage' variables - applied.
Comment 5 markiewb 2015-03-26 22:26:18 UTC
*** Bug 183633 has been marked as a duplicate of this bug. ***

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo