ADT / Eclipse plugin source code
I’ve created a plugin to ADT, that runs a few proprietry function modules on a back end system. These function modules perform security specific code scans. Obviously, you can’t actually run this back end without that software being installed, however, I think it could be useful to see how I’ve achieved certain functionality.
The plugin is launched from the run context menu of an ABAP editor view, or the context view of that ABAP object. Having determined the ABAP object name and type (Class, program etc.) is, a function module is run on the backend that performs the scan, and returns the results to the plugin.
The results are displayed in an e4 view, the basic view, in a tableview form. There is a context menu to display the same information in a tree view – the call stack.
Double clicking on the name of an object opens that object in another editor view, position at the place referred to by the scanner.
There are preference to control the depth of the scan, columns to display, views to show by default, what to scan, and what checks to perform during the scan. These are available in the standard window->preferences menu path in Eclipse.
The code repository is here:
In summary, the code shows you
- How to determine what the editor is showing
- How to navigate given the name and type of an ABAP object (Class, program etc.) – this needs a function module in the backend which determines the URI you can then use in ADT to open that object. The key code for this was provided for my by Thomas Alexander Ritter, so thanks go to him 😀. I’ve included the code that I use (well, the important bits) in the repository.
- How to add a context menu to a view
- A way of managing multiple views
- How to use your own preference repository
- How to create a download site for use with Install New Software.
I hope that this will be of use to current and future ADT plugin developers.
Many thanks to all those who helped me with this over the last two years.