How can I set the format for the ${date} variable which can be used in Eclipse templates?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Update February 2016: bug 75981 is officially fixed!
See Jmini‘s answer below
Update July 2015, 6 years later:
The bug mentioned below seems fixed in Eclipse 4.x.
Eric Wang comments below:
Original Answer 2009 Eclipse 3.x
Argh! There is a long standing bug just for that: bug 75981
The only alternative would be to modify the class
SimpleTemplateVariableResolver(as described in this thread), from the packageorg.eclipse.jface.text.templates. (You have here an example of such an extension).This thread mentions the sources where you can find the class.
Example: