Community
Participate
Working Groups
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.
this is the correct link: http://stackoverflow.com/questions/3625562/can-i-add-import-when-editing-method-body-code-template-in-eclipse
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!
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.
Moving to JDT/UI for comment