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 - Provide caret positioning in files created from templates
Summary: Provide caret positioning in files created from templates
Alias: None
Product: editor
Classification: Unclassified
Component: Completion & Templates (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Dusan Balek
Depends on:
Reported: 2007-07-18 18:16 UTC by matthies
Modified: 2016-07-18 19:56 UTC (History)
1 user (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
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.