Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

AdT QuickFix - CreateMethod - take parameters from code?

joachimrees1
Active Contributor
3,745

Shouldn't the "create method" quick fix take the parameters from the coding?!

It seems not to:

My understanding - which might be wrong - is, that I write down the method call (with parameters), quick-fix to create that method i just 'described'/used and then go ahead an fill it with coding.

7 REPLIES 7
Read only

joachimrees1
Active Contributor
0 Likes
3,489

Might be something wrong with my backend - when trying to create that method, I get a dump OBJECTS_OBJREF_NOT_ASSIGNED in CL_RFAC_METHOD_INSERTER=======CP

Read only

Florian
SAP Champion
SAP Champion
3,489

You might ask me tomorrow 😉

Read only

UweFetzer_se38
Active Contributor
3,489

You can use either CALL METHOD (please don't) or the functional style with brackets. Here you are using brackets with CALL METHOD. You should get a syntax error.

Read only

3,489

Once the method is created, it ("using brackets with CALL METHOD") seems fine syntax wise:

But I do get and appreciate what you are getting me towards!

(I'm trying to refactor legacy coding while also trying to get back into AdT, while also trying to utilize it's refactoring features.

I guess that might be to much in combination - I'll probably try the AdT features on a playground report, without the burden of legacy code... )

Btw. Version are:

Eclipse 2019-09
AdT 3.4.4

Read only

joachimrees1
Active Contributor
3,489

OK, I can narrow it down to this:

When using "create method" quick fix to create a new method to an interface, the parameters are not taken from the code:

Read only

3,487

For reference, this is how it works on a method of a class:

(and how I also would suspect it for a method of an interface?!)

Read only

foessleitner
SAP Champion
SAP Champion
3,487

You are right, it does not work yet. - But you can first create (by Quick Fix) the method in the class, and then you can refactor that method and "pull" (also by Quick Fix) it to the interface: