owenmelbz
owenmelbz

Reputation: 6574

Eclipse automatic create new functions/methods

At work we're currently using an IDE called PHPEdit, however we're looking to move to another primary IDE, we've been looking at Aptana Studio 3 based off eclipse.

A very nice feature of PHPedit was you could create new methods by clicking a little tool tip under new methods.

For example you could type

$data = $this->model->getData();

and if the function getData() didn't exist you could click the word "getData" and get a little option to create the method, then it would automatically create it in the relevant model and if you passed any params through it like $var, $var, then it would auto set them up as well.

I was wondering if such feature is available or if anybody knows of one as I'm not overly sure what to be searching for in any documentation as I don't know what this is actually called.

Many thanks!

Upvotes: 4

Views: 1222

Answers (2)

Yogesh
Yogesh

Reputation: 311

Eclipse already does that. I just typed following code in my open editor.

Intent intent = new Intent()
// some code to init intent   
String data = getData(intent);

And of course it cried that getData() does not exist. When hovered with mouse, it gives options to create getData(Intent). And when I choose to create this method, it gives following:

protected String getData(Intent intent) {
    // TODO Auto-generated method stub
    return null;
}

Upvotes: 0

Aditya
Aditya

Reputation: 2246

AFAIK eclipse PDT does not have exactly what you want.

You can have a look at Linux programming editors and meybe even checkout Jetbrains

While you are at it, have a look at this question

Upvotes: 2

Related Questions