Application Development 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: 

Outline in ABAP for Eclipse

frankmueller9
Participant

Hello,

I find the signature of ABAP methods very helpful in SE80. I see on one view which parameters will be handled by the method and which type they have while I'm changing the code. In eclipse I always must navigate to the method declaration to see the parameters or use the auto completion. This slows down my way of working especialy when I add local variables with the same type (copy and paste).

I know that there is the outline that shows me all the methods of the class. Is there a way to add the method parameters with the type to the outline tree? So I would have a similar function in eclipse.

I also know that there is the possibility to use a split window for the source code to have the declaration on top, but for me this is not very handy because it takes to much space of my screen and I always must scroll two windows when I'm editing another method.

Best regards

Frank

1 ACCEPTED SOLUTION

DoanManhQuynh
Active Contributor

within the method, you can press Alt + F2 to show that method signature.

There is also a ABAP element info view which you could use to see the signature as you see in se80. first goto method, press Alt + F2 to show its signature, at the end of the pop-up there is a button "@", press it and the signature will shown in that view:

https://help.sap.com/doc/saphelp_nw75/7.5.5/en-US/4e/c704986e391014adc9fffe4e204223/content.htm?no_c...

10 REPLIES 10

Sandra_Rossi
Active Contributor

Cursor on any method and press F2 -> popup shows the signature

Alternative: eventually install the Code Insight plugin (https://blogs.sap.com/2019/01/24/abap-code-insight-plugin-inline-code-information-in-eclipse/)

0 Kudos

Hi Sandra,

thank you very much for your quick anwser. I don't have so much experience with eclipse. The F2 feature seams to work, but I must scroll to the method name. Is there also a way to call it from the outline or somewhere else in the code?

Best regards

Frank

0 Kudos

From the outline, no.

What is the use case of "somewhere else in the code", why would you want to know the signature of a method that you don't see? (I don't need something other than F2... except when the syntax check is KO at a upper level I need to first correct the error before being able to use F2)

0 Kudos

You often must define and fill local variables, that you will pass later in the code as parameters to another method of the class. It would save a lot of time to copy the parameters with the type of the other method and rename them. I know there is the CTRL+1 feature where I can define variables automatically when I pass it to a method. But normally you must fill them before you call the method. Therefore it would be helpful to have the signature in the outline.

I'm often analyzing source code of peers to find a bug (not debugging). In this case it helps me a lot to see on one view the signature of a method for a better understanding of it. When I must scroll in the source code for it then the analyzing takes much more time.

I'm not sure to fully understand. I feel that your methods are long, hence your problem, you have to scroll. If they were short (say 30 lines), would you have the problem? You could tell your team to start refactoring 😉

Another solution is to accept navigating back & forth, not so disturbing I think: click the method name in the breadcrumb, press F2 to see the signature, alt+left to return to the original position.

Last minute: as Quynh Doan Manh said, alt+F2 to see the signature of the method in which your cursor is!

matt
Active Contributor
0 Kudos

If I understand correctly, what you want to do is with something like this

data(activity) = me->what_to_do_today( weather ).

You want to see what the full signature of what_to_do_today is, without navigating to it.

You just put you cursor within the name of the method, and ctrl-space (code completion). Then you see the signature.

0 Kudos

Hi Matthew, no I want to copy the type of weather from the method what_to_do_today during the definition of weather. Because I must fill weather before I can pass it to the method what_to_do_today.

And my question is, if I can somehow copy the signature of what_to_do_today from the outline or the project explorer without opening the source code of what_to_do_today in a new window.

DoanManhQuynh
Active Contributor

within the method, you can press Alt + F2 to show that method signature.

There is also a ABAP element info view which you could use to see the signature as you see in se80. first goto method, press Alt + F2 to show its signature, at the end of the pop-up there is a button "@", press it and the signature will shown in that view:

https://help.sap.com/doc/saphelp_nw75/7.5.5/en-US/4e/c704986e391014adc9fffe4e204223/content.htm?no_c...

0 Kudos

Hi Quynh, this is exactly what I'm looking for. Thank you very much. Is it possible to call this also from the project explorer or the outline?

0 Kudos

Frank Müller

you have to open it to get the signature. from project explorer, double click the class and it will shown on the outline. from outline, whenever you click on a method, the signature will displayed in above view, also the method source in the editor view.