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 183633

Summary: Live Template - Add Class (or FileName) template
Product: editor Reporter: pfabier
Component: Completion & TemplatesAssignee: Dusan Balek <dbalek>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
URL: http://wiki.netbeans.org/RubyCodeTemplates
Issue Type: ENHANCEMENT Exception Reporter:

Description pfabier 2010-04-07 09:49:41 UTC
Hi,

Currently, we have live templates like "${param_name array}" allowing us to substitute an array variable in the live template.
We can't substitute the current filename we're editing, nor the class name.

Also, this is possible with Ruby through ${class} or ${file}.
=> http://wiki.netbeans.org/RubyCodeTemplates

I suggest to add these live templates to the Java Editor, or even to all Editors when possible (${file} for example).

Example purpose : Create a "logger" live template like this:
-- logger
private static final Logger LOGGER = Logger.getLogger(${param_name class}.getName());
Comment 1 markiewb 2015-03-26 22:26:18 UTC
Duplicate of 210454.

*** This bug has been marked as a duplicate of bug 210454 ***