Bug 333313 - [code templates] Add template variable resolvers to code templates
Summary: [code templates] Add template variable resolvers to code templates
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL: http://stackoverflow.com/questions/36...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-29 14:58 EST by ohad shai CLA
Modified: 2011-01-07 02:44 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 ohad shai CLA 2010-12-29 14:58:43 EST
Build Identifier: 20100917-0705

to be able to add import when create a template for method body.
details and example can be found here: add import when editing method body code template in eclipse.

Reproducible: Always

Steps to Reproduce:
1. create a new method using the automatic tools
2.
3.
Comment 2 Ayushman Jain CLA 2011-01-06 06:48:49 EST
Can you please give more context to what you're trying to do? In steps to reproduce, please specify exact steps, menu options, etc that you're trying to exercise and also where you're trying to specify the template. Thanks!
Comment 3 ohad shai CLA 2011-01-06 15:08:09 EST
To reproduce:
in windows preferences, in the menu of Java-Code style-code template.
in method body currently I write this:
//TODO oshai implement
throw new very.long.packname.UnimplementedException();

I want to be able to write this:
${:import(very.long.packname.UnimplementedException)}
//TODO oshai implement
throw new very.long.packname.UnimplementedException();

then when I create a method with the automatic tools, import is added also.
Similar thing is possible in Java Editor template menu.
this will make my code more clear.
Comment 4 Ayushman Jain CLA 2011-01-07 00:39:53 EST
Moving to JDT/UI for comment