Steve Waring
Steve Waring

Reputation: 3033

eclipse template variable manipulation

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.

Upvotes: 3

Views: 726

Answers (0)

Related Questions