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 75929 - Expand code teamplates to include useful substitutions
Summary: Expand code teamplates to include useful substitutions
Status: RESOLVED DUPLICATE of bug 124375
Alias: None
Product: editor
Classification: Unclassified
Component: Completion & Templates (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-04 14:49 UTC by nsydenham
Modified: 2007-12-21 21:03 UTC (History)
1 user (show)

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 nsydenham 2006-05-04 14:49:02 UTC
Code templates currently support ${cursor} for setting the location of the
cursor after inserting a code template. Suggest adding ${class} for name of
current class, ${fqclass} for fully qualified class name and ${method} for name
of current method. This would be of particular use when creating a code template
for logging statements. For eaxmple, the code template
log.entering(\"${class}\", \"${method}\"); would save a lot of typing.
Comment 1 Karthikeyan Rajeswaran 2007-12-21 18:18:17 UTC
As per documentation at
http://www.netbeans.org/source/browse/*checkout*/java/helpset/javahelp/org/netbeans/modules/java/helpset/docs/editing/editor_template_syntax.html?rev=1.2,
this is already provided by the ide.

Is the documentation wrong? (In which case, a doc bug should be filed and issue 124375 closed as not supported).

Or is the feature requested in this issue is already present in the ide? (In which case this bug should be marked fixed).

Comment 2 nsydenham 2007-12-21 21:03:36 UTC
Tried in v6 on Linux with JDK 1.6 and the following code template:

  log.entering("${class}", "${method}");

incorrectly expands to:

  log.entering("class", "method");

in the IDE.

*** This issue has been marked as a duplicate of 124375 ***