Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsHelp with template creation
https://www.eclipse.org/forums/index.php/mv/msg/369333/901342/#msg_901342
private MyObject test;
I want to create a template that will generate code in the following format
public MyObject retrieveAllMyObjects() {
return test.findAll();
}
I have been messing around with the templates but I can't even figure out how to activate the templates. when I do the Ctrl+Space i just get no template proposals message
public ${return_type} retrieveAll${field}s() {
}
Obviously this is just a starting point, i was just trying to see if i could get eclipse to generate this and then I would go from there, but no such luck. My template doesn't show up anywhere. The context im using is "Java Type Members" what am I doing wrong??]]>Ray Holguin2012-08-10T23:35:54-00:00Re: Help with template creation
https://www.eclipse.org/forums/index.php/mv/msg/369333/901409/#msg_901409
Hi,
Reading through the variables specification, I think this one is more close :
public ${t:elemType(x)} retrieveAll${x:field}s() {
}
Also, the categories that content assist provides are configured in Java > Editor > Content Assist > Advanced.
However, I could not get this working either (new the template is not listed in the proposal list)
Cheers,
Vlad
]]>Vlad Gheorghe2012-08-11T22:37:33-00:00Re: Help with template creation
https://www.eclipse.org/forums/index.php/mv/msg/369333/901549/#msg_901549
> So if I declare a private member such as
>
>
> private MyObject test;
>
> I want to create a template that will generate code in the following
> format
>
> public MyObject retrieveAllMyObjects() {
> return test.findAll();
> }
> I have been messing around with the templates but I can't even figure
> out how to activate the templates. when I do the Ctrl+Space i just get
> no template proposals message
You need to type at least one character to get templates proposals.
Dani
>
> public ${return_type} retrieveAll${field}s() {
>
> }
>
> Obviously this is just a starting point, i was just trying to see if i
> could get eclipse to generate this and then I would go from there, but
> no such luck. My template doesn't show up anywhere. The context im
> using is "Java Type Members" what am I doing wrong??]]>Dani Megert2012-08-13T10:42:34-00:00Re: Help with template creation
https://www.eclipse.org/forums/index.php/mv/msg/369333/901606/#msg_901606
Ray Holguin2012-08-13T16:11:52-00:00Re: Help with template creation
https://www.eclipse.org/forums/index.php/mv/msg/369333/901610/#msg_901610
Ray Holguin2012-08-13T16:20:47-00:00Re: Help with template creation
https://www.eclipse.org/forums/index.php/mv/msg/369333/901971/#msg_901971
Thanks
Vlad]]>Vlad Gheorghe2012-08-15T11:17:55-00:00