Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 210454 - Patch for: Code Templates: add 'currClassName'/'currClassFullName'/'currPackage' variables
Patch for: Code Templates: add 'currClassName'/'currClassFullName'/'currPacka...
Status: RESOLVED FIXED
Product: editor
Classification: Unclassified
Component: Completion & Templates
-S1S-
PC Windows 7
: P3 with 1 vote (vote)
: 8.0.1
Assigned To: Dusan Balek
issues@editor
netfix801
: PATCH_AVAILABLE
: 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:
Issue Type: ENHANCEMENT
:


Attachments
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]
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.
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.
http://www.oracle.com/technetwork/community/oca-486395.html
Comment 3 Dusan Balek 2014-07-22 11:50:01 UTC
Slightly modified patch applied. Thanks for your contribution.

http://hg.netbeans.org/jet-main/rev/aaa5c188539c
Comment 4 Quality Engineering 2014-07-30 02:33:55 UTC
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.
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