One specific issue I ran into was using $ {word_selection} in the Eclipse PDT template.
I recently tried using some code templates with Eclipse PDT 2.1 to speed up some common tasks. We use many getters / setters, so I wrote the following pattern.
function get${word_selection}() {
return $$this->getData('${word_selection}');
}
function set${word_selection}($$${word_selection}) {
$$this->setData('${word_selection}', $$${word_selection});
}
I called the template “getet”, and the only way I know to use Code Assist is to enter: “getet”, then press the help keys with the code (I have it set to Esc, but I think that the default was Ctrl + Space). The problem is that this actually does not allow me to select the word that $ {word_selection} will use.
How can I enter the name of my template, press a key combination and select one word at a time?
I also want to know what patterns people have set up and any other tips on using patterns for programming speed.
source
share