I have this code:
myVariable
which I want to change into
trace(‘myVariable: ‘ + myVariable);
using a direct hotkey like alt – f12 to do it. I.e not using ctrl – space and arrow buttons.
is it possible in eclipse?
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.
I don’t know if it’s possible to bind hotkeys for templates. One way for somewhat similar behavior could be using proper template name and ‘insert automatically’..
That is, you would write trcc (for example) and Eclipse would automatically expand it to a template trace(‘${name}: ‘ + ${name}); (and you would end up editing the name). The drawback is that you should choose such a name that you won’t use it otherwise in the code. (So if you would end up writing trcc for other things, you should choose another name)
Regarding to the templates, one blog entry on them. (Note the ${enclosing_type} and ${enclosing_method} if you’re not familiar with them already)