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 110191

Summary: Provide caret positioning in files created from templates
Product: editor Reporter: matthies <matthies>
Component: Completion & TemplatesAssignee: Dusan Balek <dbalek>
Status: REOPENED ---    
Severity: blocker CC: mattchaput
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description matthies 2007-07-18 18:16:05 UTC
Provide the possibility to specify in a text file template where the caret/selection should be positioned when the file 
is opened in the editor after being created via File -> New. E.g. something like "${caret}" 
and/or "${begin_selection}"/"${end_selection}".

Note that Code Templates (Tool -> Options -> Editor -> Code Templates) already provide this with "${cursor}".

I suspect this may require some magic to make it work with FreeMarker, but after having used this feature extensively 
with other editors I'm really missing it here.
Comment 1 Peter Pis 2007-08-10 09:15:48 UTC
Reassigning to "editor" ...
Comment 2 mattchaput 2010-02-05 12:04:16 UTC
Bump? This is really a desirable feature, and apparently it's a regression, judging by tutorials available on the web.
Comment 3 Martin Balin 2016-07-07 07:32:08 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 4 matthies 2016-07-18 19:56:17 UTC
Still relevant in current dev build.