ABAP Code Insight Plugin – Inline code information in Eclipse
Beginning with the Eclipse version Photon there is a new feature available to show inline information within the source code. I used this new feature to start developing an Open source plugin as addon for ABAP in Eclipse.
The plugin shows mainly two types of information within the code:
Showing information about ABAP code as inline text
For each method as first information the number of referencing ABAP objects are shown. Additionally to the overall number of references also the number of references from test classes are shown if this option is activated in the preferences.
The second part shows the method header information in the following form:
- Accessor (public, protected, private),
- Returning Parameter between the two 
- Importing, Exporting or Changing parameters between the squared brackets
But maybe its easier to see the plugin in action
The plugin is still in development but can already be downloaded over the Eclipse marketplace and the source code is available on GitHub. The only prerequisite is to use the Eclipse version Photon, 2018-09 or 2018-12 and of course ABAP in Eclipse has to be installed as the plugin reuses some ADT features.
Have fun while trying it out and let me know your experiences and impressions.
excellent, thank you very much.
So, I wanted to try it. But when I opened eclipse up there were ADT updates to install. So I did that... and restart failed.
So, I did a clean install. Added your plug in, and once I'd realised that it's triggered by save/activate, I had to say:
I like it.
It would have helped if your animated screenshot had been a bit bigger.
The installation (and update) of the plugin is currently not very smooth, I am not sure if it is because of the new Eclipse functionality or because I have still an error in the plugin configuration, but I am sure I will find this out.
The ADT update is triggered because I had only one of the newest ADT version available when developing and testing with Photon and higher - but nevertheless it should not be a drawback to be on the latest version of ADT 🙂
At the end I am happy that it runs at your environment and you are satisfied.
Well, I got it working on one of them.
On my other installation, it’s installed (and that went smoothly), but nothing happens when I save or activate a class. I've configured as your example. I'm on Photon Release (4.8.0), latest ADT and Darkest Dark theme.
Hmm. Starting Eclipse one time from the command line I think you did already.
I haven't tried the plugin with the darkest dark theme, will check this.
I tried the combination Photon 3.8.0, latests ADT and Darkest Theme on my computer and it works.
One bug I found is that setting the default preferences is not done properly but that should not prevent the plugin from starting up.
Are your running it on a Windows machine or on another operation system?
I've got Class headers, Class bodies, Method bodies, Show signature on method bodies and Refresh code insight... boxes checked in my preferences.
In the Class-relevant Local Types section of my class, I've got two DEFINITION DEFERRED classes, and they have above them, respectively:
2 references (1 test)
Which is correct. So the plugin is there, I just don't see any activity on other sections of the class!
I think I could reproduce or error. It seems if you first update Photon and then 2018-09 or 2018-12, the second installation interfers into the first installation after the clean install. I have not yet any explanation for that.
I made an updated version just know (0.2.1.0 - regarding some other issues). if you install this first on 2018-09, start it again with eclipse.exe -clean from the command line and then on your Photon installation followed onces again by a restart with clean everything should work perfectly … if I analized it right.
And now I created a new class. On save, the comments appeared... and on activation, they disappeared!
Could you please try again with the version published today. There I fixed some issues with code changes in more than one class or text editor part. Maybe this issue and the issue above is related to this.
Another possible reason is that I am currently parsing the class file and do not work with the outline yet. Therefore some combinations could possible be skipped. (for example there are still some combinations with (customer) namespaces which I am currently not aware of and do not work.
I wondered if it might be a namespace thing. The class I mentioned above, where it worked briefly, was a Z, but I do most of my work in a /…/ namespace.
Anyway, I've tried again, and again with eclipse -clean. No joy so far. 🙁
Yes thats a point. Classes of customer development namespaces have not been supported yet.
Version 0.2.1.3 (just released) processes also these objects.
I'll give it a go.
All else fails, I'll have a look at your code. 😉
one of the things I 'really' missed in AiE were the interface parameters of a method. That one is now solved. I have one request though: would it be possible to add a carriage return after each parameter?
Now all parameters are separated by a semi colon. But after a relatively small number of parameters, they 'run' of the screen and there's now way to scroll all the way to the right
Thanks for the plugin.
Perhaps the separator could be configurable?
You are right the one line is not ideal, not enough space and scrolling is not supported.
But currently I think that only one line is supported - I tried it out at least for one version - maybe the newer one will support more than one line.
Another thing is that I think about shortening the method signature at least for long methods (for example to omit the parameter definition or at least omit the namespace. That would mean for your above example:
1 reference | public  (it_to:IT_ORDIM_D_INT CHA:ct_to_success:CL_ANYCLASS)
1 reference | public  (it_to CHA:ct_to_success)
Not sure know whats the best path to go ... I think while using it some time, good ideas will arise. If you have another good idea let me know,
I have installed the plugin with eclipse 2019-03 version 4.11 and restarted it several times with -clean
checked the preferences but nothing is shown in the code.
Also checked above comments with save but also nothing is shown.
I got no errors during installation. Do I miss something in activating this great plugin ?
Do you have more than one Eclipse installation running on your computer? - There seems to be an issue if there is installed more than one installation.
Beside that there is nothing special to be done.
Do you use it for standard ABAP classes, Function modules or other ABAP objects?
I also try to install the latest eclipse version on a laptop with the code insight but also not working as it supposed to be. On my pc I am also updating to the latest version but still cant get it going
I check abap classes from sap and own classes programms and functions.
what else needs to be done or can I check?
Maybe starting eclipse one time with -clean over the command line helps. This has at least to be done for some reason when updating from one to another version of the plugin.
Does the Plugin still work at all? Does it work with Eclipse 2021-12 and SAP 1909? I can't get it running. Even with -clean and only a single Eclipse on the PC (as extracted ZIP file)
Hi, I do not know If the plugin works with the latest version. As I am currently not involved in an ABAP project I have not checked it with the newest Eclipse version yet.
No there is only 1 eclipse installed
I have checked it with Z* classes but also with standard SAP classes.
With functions I also don't see anything added.
I just updated my eclipse to latest version, and it was very hard to keep to do it successfully. During trouble shooting process i had to remove the plugin. when i try to install it now i get the following information:
problem occured in eclipse
Saw a blog post for this and other plugins I already had, thought of trying this one out, installation was ok but then nothing happens.
I'm on Windows 11, Eclipse 2022-03, ADT 4.23.0 and the backend I'm running against is the 7.52SP04 demo. I've already tried restarting with "clean" option but it is still a no-show. Tried with both a local custom object (project $ZABAP2XLSX / class ZCL_EXCEL_WORKSHEET / method BIND_ALV) and a standard one (class CL_ABAP_TYPEDESCR / method DESCRIBE_BY_DATA). There is only one installation of Eclipse, it's a new system.
Has anyone had any luck recently with this plugin and modern Eclipse / ADT ?
I love the features mentioned. But the installation doesn't work in my system. I tried with Clean start and still error persists:
Cannot complete the install because one or more required items could not be found.
Software currently installed: ABAP Continuous Integration 0.5.5.2 (com.abapci.feature.feature.group 0.5.5.2)
Missing requirement: com.abapci.plugin 0.5.5.2 requires 'osgi.bundle; org.junit.platform.commons 0.0.0' but it could not be found
Cannot satisfy dependency:
From: ABAP Continuous Integration 0.5.5.2 (com.abapci.feature.feature.group 0.5.5.2)
To: org.eclipse.equinox.p2.iu; com.abapci.plugin [0.5.5.2,0.5.5.2]