Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 160042 - Patch for: Code Templates: add "Java method name" variable
Patch for: Code Templates: add "Java method name" variable
Product: editor
Classification: Unclassified
Component: Completion & Templates
All All
: P3 (vote)
: 8.0.1
Assigned To: Dusan Balek
Depends on:
Blocks: 148947
  Show dependency treegraph
Reported: 2009-03-10 20:40 UTC by fommil
Modified: 2014-05-17 04:33 UTC (History)
0 users

See Also:

Proposed patch (2.79 KB, patch)
2013-11-28 21:19 UTC, markiewb
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description fommil 2009-03-10 20:40:09 UTC
This is an RFE for the ability to access the current method name in the Java Code Template system. It would enable templates such as

throw new UnsupportedOperationException("TODO: implement METHODNAME");
Comment 1 Dusan Balek 2013-06-20 15:58:30 UTC
Unfortunately NB 7.4 is already feature frozen. Marking as an enhancement for
the next release.
Comment 2 markiewb 2013-11-28 21:19:09 UTC
Created attachment 142701 [details]
Proposed patch

@Dusan: I like to propose a patch to solve the issue. A new pattern "currMethodName" is introduced. Please review and commit

The code template from the original requester can now be expressed via

${no-indent} throw new UnsupportedOperationException("TODO: implement ${methodName currMethodName editable="false"}()");
Comment 3 Dusan Balek 2014-05-16 08:14:19 UTC
Patch applied. Thank you for your contribution.
Comment 4 Quality Engineering 2014-05-17 04:33:06 UTC
Integrated into 'main-silver', will be available in build *201405170001* on (upload may still be in progress)

User: Dusan Balek <>
Log: Issue #160042 - Patch for: Code Templates: add "Java method name" variable - applied.

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