3

Is there any way to manipulate the value of variables in Eclipse templates?

For example, in the following template code:

public class ${file} extends Activity
{
@Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_${enclosing_project});
    }
}
//Change the leading letter of ${enclosing_project} to lower case and remove the .java from ${file}

I would like the file name inserted to be myFile and not myFile.java and I would like the project name inserted to be myProject and not MyProject.

Steve Waring
  • 2,882
  • 2
  • 32
  • 37
  • Found the answer here: http://stackoverflow.com/a/431636/329589 – Radu Sep 08 '13 at 19:15
  • possible duplicate of [Can you define your own template variables in Eclipse](http://stackoverflow.com/questions/431465/can-you-define-your-own-template-variables-in-eclipse) – Daniel Grillo Dec 02 '13 at 17:14

0 Answers0