Eclipse automatically creates new functions / methods

At work, we are currently using an IDE called PHPEdit, however we are striving to move to another primary IDE, we are looking at Aptana Studio 3, based on eclipse.

A very nice feature of PHPedit was that you could create new methods by clicking a little help on the new methods.

For example, you can enter

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

and if the getData () function does not exist, you can click on the word "getData" and get a small option to create a method, then it will automatically create it in the corresponding model and if you pass it any parameters like $ var, $ var, then he will automatically install them.

I was wondering if such a feature is available or if anyone knows about it, since I'm not too sure what to look for in any documentation, since I don't know what it really is called.

Thank you very much!

+4
source share
2 answers

AFAIK eclipse PDT does not have exactly what you want.

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

While you are on it, look at this question.

+2
source

Eclipse is already doing this. I just typed the following code in my open editor.

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

And of course, he cried out that getData () does not exist. When it is getData(Intent) mouse, it makes it possible to create getData(Intent) . And when I decided to create this method, it gives the following:

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

Source: https://habr.com/ru/post/1469349/


All Articles