Code Completion in Eclipse

J

James Yong

Hi,

Is it possible in Ecilpse whereby the code completion feature puts the
arguments together with the method's name. For example, let say I have this
utility method:

public myClass {
public String myMethod(String arg1, String arg2);
}

When I choose myMethod by autocompletion, I want eclipse to put a predefined
code like the following line instead of just the method name:

myMethod("Type a id", "1970").

The reason is to help the programmer to save time in typing the arguments
when using certain utility methods.

Regard,
James Yong
 
J

Jeff Schwab

James said:
Hi,

Is it possible in Ecilpse whereby the code completion feature puts the
arguments together with the method's name. For example, let say I have this
utility method:

public myClass {
public String myMethod(String arg1, String arg2);
}

When I choose myMethod by autocompletion, I want eclipse to put a predefined
code like the following line instead of just the method name:

myMethod("Type a id", "1970").

The reason is to help the programmer to save time in typing the arguments
when using certain utility methods.

The feature you want is the eclipse "template." See the online docs at

http://help.eclipse.org/help31/index.jsp

and search for the sections called "Templates" and "Writing your own
templates."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top