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: | Patch for: Code Templates: add 'currClassName'/'currClassFullName'/'currPackage' variables | ||
---|---|---|---|
Product: | editor | Reporter: | 280Z28 |
Component: | Completion & Templates | Assignee: | Dusan Balek <dbalek> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | pfabier |
Priority: | P3 | Keywords: | PATCH_AVAILABLE |
Version: | -S1S- | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 148947 | ||
Attachments: | Implementation |
Unfortunately NB 7.4 is already feature frozen. Marking as an enhancement for the next release. @Dusan: Please review the patch. The original author (Samuel Harwell - NB - 280Z28) signed the OCA. http://www.oracle.com/technetwork/community/oca-486395.html Slightly modified patch applied. Thanks for your contribution. http://hg.netbeans.org/jet-main/rev/aaa5c188539c Integrated into 'main-silver', will be available in build *201407300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/aaa5c188539c User: Dusan Balek <dbalek@netbeans.org> Log: Issue #210454: Patch for: Code Templates: add 'currClassName'/'currClassFullName'/'currPackage' variables - applied. *** Bug 183633 has been marked as a duplicate of this bug. *** |
Created attachment 117562 [details] Implementation 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.