Bug 24116 - [templates] Nested Templates
Summary: [templates] Nested Templates
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 2.0.1   Edit
Hardware: All All
: P5 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-26 04:43 EDT by Channing Walton CLA
Modified: 2012-10-25 16:46 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Channing Walton CLA 2002-09-26 04:43:12 EDT
Brace yourselves...

I would like to be able to nest templates by specifying that a template A 
should be embedded in the ${cursor} position of template B.

For example, a method to print out the contents of an array could be defined 
thus:

template(public_method, template(for, stdout))

when invoked, working from the inside out, the stdout template is used - there 
is only one.
Then, the user would be prompted for which 'for' template to use (there are 3), 
and insert the stdout template into the ${cursor} position of the chosen 'for' 
template. 
Then, the 'for' template would be inserted into the ${cursor} position of the 
public_method template.

The cursor would be placed in the ${cursor} position of the stdout template 
since this is the only place with a cursor position left.

The only thing to be careful of is cycles.

Channing
Comment 1 Kai-Uwe Maetzel CLA 2003-02-24 05:21:46 EST
Unassign due to staff changes.
Comment 2 John P. A. Verhaeg CLA 2005-09-07 08:56:08 EDT
This enhancement has been in this state for over a year and a half.  Is anyone
working on this?
Comment 3 Dani Megert CLA 2005-09-07 09:18:12 EDT
No, but we will gladly review and accept good quality contributions.
Comment 4 Dani Megert CLA 2007-06-22 09:59:34 EDT
Get rid of deprecated state.