How can I trigger Code Inspector checks with ADT in Eclipse
I often get the following question from ABAP developers:
How can I trigger the code inspector checks for ABAP development objects in the new eclipse environment?
You know in the ABAP workbench you do this in the SE80 via the context menu on the development object, e.g. on classes:
After choosing this menu you get the results of the code inspector checks displayed in the code inspector tool.
Why is this not available in ABAP in Eclipse?
The reason is that we bundled all relevant code quality tools for ABAP together in the so-called ABAP test cockpit.
This have already been rolled-out last year for AS ABAP 7.02 and AS ABAP 7.03 release. You can check the details in this blog:
http://scn.sap.com/docs/DOC-31773
In ABAP in Eclipse we only provide this option for code quality checks. But this check includes the code inspector checks and the execution of the Unit tests.
You do this via the context menu on the project explorer by choosing menu item Run As –> ABAP Test Cockpit:
The code inspector check is triggered in the ABAP backend in a asynchronous way and the results are displayed in the eclipse problem view. More information you also find in my previous blog about the test cockpit: http://scn.sap.com/docs/DOC-41224
The code inspector supports the concept of check variants in the backend. With a check variant you can define which quality checks are executed within a code inspection. In ABAP in Eclipse the default variant is used when triggering the check. But you can override this behavior by specifying the variant in the eclipse project settings(–> Right-Click on the ABAP project name in the project explorer and choose Properties). In the properties screen you can define the variant name that you wan to use:
The next ABAP test cockpit run is then executed with this code inspector variant.
Have fun and Kind Regards,
Thomas.
Hi Thomas,
are there any plans to enable viewing the results of central ATC check runs in ABAP in eclipse also?
This is the one feature I'm currently missing from the ATC integration.
Christian
Hi Christian,
in the 'Feed Reader' view, you can select your ABAP project, request 'Add feed query...' and configure your personalized queries for 'ATC Findings'.
Does this comply with your needs?
Regards, Rainer
Hi Rainer,
this is exactly what I was looking for.
Thanks,
Christian
Would be a great thing if I could create a ABAP Test Cockpit configuration with a check variant. Like the option "Check -> ABAP Test Cockpit (ATC) with..." in the ABAP Workbench on a development object. So I could process different check variants for different objects.
Is it planned to integrate something like this? Changing each time the check variant in the project settings is a little bit uncomfortable.
Hi Armin,
yes, absolutely. Currently you can set this variant only via the properties tab of the project.
Regards,
Thomas.
Hey Thomas,
"How can I trigger the code inspector checks for ABAP development objects in the new eclipse environment?"
That's exactly the question I just had, great that your blog gives exactly the answer I need!
Best
Joachim
Hi Thomas,
what about the extended checks? For example they show if I have unused variables and also other information that is not shown in the ABAP Test Cockpit.
Regards
Robert
Yes, I would also like to know if Extended Check is also included in ATC in Eclipse. And is there a way I can trigger only Extended Check without rest of the ATC checks?
Thanks,
Ravi