Bug 220953

Summary: [templates] Add a new template variable to camel case another variable
Product: [Eclipse Project] Platform Reporter: G. Ralph Kuntz, MD <grk>
Component: TextAssignee: Platform-Text-Inbox <platform-text-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P5 CC: chewbizz, daniel_megert, h.klene, hello, martinae
Version: 3.4Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description G. Ralph Kuntz, MD CLA 2008-02-29 10:35:38 EST
I have started using the Java templates (Java->Editor->Templates) a lot recently.

In my application, I use a special type of setter method for data accessor objects that mark the object as dirty if the new value is different than the old.

I have written a template to create this setter, but I cannot get it to camel case the name of the field. A special variable, maybe "${id:camel(var)}" would work. I could then type in (or paste) the var in the parameter list and have the template generate setVar using "set${id:camel(var)}".
Comment 1 Dani Megert CLA 2008-03-10 06:44:52 EDT
Note that you can write your own resolver using the org.eclipse.ui.editors extension point.
Comment 2 Holger Klene CLA 2012-07-08 18:46:44 EDT
duplicate of bug 12756
Comment 3 Dani Megert CLA 2012-07-16 08:55:26 EDT

*** This bug has been marked as a duplicate of bug 12756 ***