| Help with template creation [message #901342] |
Fri, 10 August 2012 19:35  |
Ray Holguin Messages: 3 Registered: August 2012 |
Junior Member |
|
|
So if I declare a private member such as
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??
|
|
|
| Re: Help with template creation [message #901409 is a reply to message #901342] |
Sat, 11 August 2012 18:37   |
Vlad Gheorghe Messages: 72 Registered: May 2011 |
Member |
|
|
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
[Updated on: Sun, 12 August 2012 04:47] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01570 seconds