Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 346309 - [templates] ${enclosing_method_arguments} grabs selection/caret
Summary: [templates] ${enclosing_method_arguments} grabs selection/caret
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
: 39970 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-05-18 13:29 EDT by Tom Dignan CLA
Modified: 2019-11-21 11:32 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Dignan CLA 2011-05-18 13:29:17 EDT
Build Identifier: M20110210-1200 

When creating a macro in Java->Editor->Templates and following the ${enclosing_method_arguments} variable with the ${cursor} variable, the cursor is positioned after ${enclosing_method_arguments} rather than where the ${cursor} variable is.

Reproducible: Always

Steps to Reproduce:
1. Window->Preferences->Java->Editor->Templates->New
Name: loge
Desc: <blank>
Pattern:
if (DEBUG) Log.e(TAG, "${enclosing_method}(${enclosing_method_arguments}): ${cursor}");
2. Save and apply the changes
3. Inside a method, type loge<ctrl + space>. You will find that the cursor is not positioned after the colon where it should be. Tried removing the parens around the second variable, but no effect.
Comment 1 Dani Megert CLA 2011-05-19 05:58:15 EDT
*** Bug 39970 has been marked as a duplicate of this bug. ***
Comment 2 Eclipse Genie CLA 2019-11-21 11:32:24 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.