How to Extend RDi

"How to Extend RDi"

If you wish to extend RDi yourself you can find some useful links below.



For Rational Developer for i API information, visit:

For Eclipse RSE information (which Rational Developer for i itself extends),  visit the RSE Developer Guide at:

For accessing EVENTF information in order to integrate custom build tooling.

To extend LPEX, (In Lpex, hit Esc to get to the command line and then type in ? and hit Enter)

To access Code Coverage data see:

Install Complementary Products from IBM

If you are developer for another platform such as Z or AIX or Linux, there are complementary products that will integrate with RDi.  A complete list can be found here after click on the link under Shell Sharing.

One free offering from IBM that well benefit any SQL developers is the IBM Data Studio.

Click here for more info on how to install and use this.

Use someone else's extensions

Below is a table where any product or plugin that extends RDi can make themselves known.

Jon Paris has written an article on this subject.





Free/For Sale


Spooled File Subsystem,

Message File Editor,

Binding Directory Editor,

LPEX Task Tags, ...

Task Force IT-Consulting GmbH,

Thomas Raddatz and others

Open Source
TN5250J IDE embedded 5250 Emulator

Task Force IT-Consulting GmbH,

Kenneth J. Pouncey and others

Open Source
iSVN IBM i Version Control with Subversion Task Force IT-Consulting GmbH Open Source
CMOne Change Management System for IBM i, Windows, Unix and Linux Task Force IT-Consulting GmbH Commercial
PTC Implementer Application Lifecycle Management system for IBM i PTC Commercial

Application understanding,documentation and Analysis Suite PKS Software GmbH Commercial
RSE Extensions Spooled file output; view and respond to IBM i messages; graphical source compare and merge editors for IBM i code; edit data areas; display data queues SoftLanding Systems - a Division of UNICOM Global Open Source
TURNOVER Change Management, Project Management, Issue Tracking SoftLanding Systems - a Division of UNICOM Global Commercial

RPGUnit tests from within RDi.

This plug-in uses a fork of the RPGUnit framework from, because the original RPGUnit project seems to be dead.

Thomas Raddatz Open Source

Surveyor/400 has a plugin for IBM RDi that allows you to quickly query and edit database files, download and upload data, run SQL, convert DDS to DDL and many more database tools.  HelpSystems Commercial
RPG Toolbox

Need to convert legacy RPG to free form? The RPG Toolbox from Linoma Software has a plugin for RDi that allows converting RPG fixed-form to the latest totally free form syntax. It also allows indenting nested logic in free form RPG. The RPG Toolbox can additionally clean out unused code in your RPG source including unused work fields, unused subroutines, KLISTS, etc. to make your source easier to maintain and quicker to compile and execute. HelpSystems Commerical

SmartPad4i for RDi

Use RPG or COBOL to Develop Web & Mobile Applications Directly Within the Rational Developer for i (RDi) Environment



Pathfinder / Hawkeye Plugin for the Hawkeye Cross Reference tool for IBM i Pathfinder / Hawkeye Commercial
ABSTRACT Developer Productivity tool for the IBM i. Simplify IBM i application development with powerful cross-referencing tools. Abstract works with the IBM (RDi) to build a where-used cross reference of system objects and procedures that allows you to track object and field usage, as well as perform file analysis and other reference tasks. HelpSystems Commercial

How to write a basic plugin that creates a menu action

RDi is written on top of Eclipse which is designed from the bottom up to be extensible.

To extend RDi, you write a plugin that contributes your piece of functionality of top of RDi.  These plugins are typically written in Java in RDi itself.

Basic Eclipse Plugin Development

One of the most recent books that uses the latest Eclipse 4.x mechanisms is Eclipse 4 Plug-in Development by Example Alex.Blewitt 2013.

If you are unfamiliar with Java, this will assume some rudimentary understanding, but it is fairly gentle.

Basically there is one method that puts up a message that looks like

public Object execute(ExecutionEvent event) throws ExecutionException {
IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
"RDi is the greatest!");
return null;

Basically this is equivalent to an RPG procedure definition called execute.  This procedure (called method in Java), takes in an event and returns an Object.  In this particular case we ignore both the parameter and the return value.  The only thing of interest is that this method is called when the button and menu item you create are selected.  What it does is pop up  a message dialog with the given string.

Please read the first chapter now.  You don't have to finish all of the debugging exercises (but a lot of them would help you even with ILE RPG debugging as well).

How to write a plugin that add an Action to the Remote Systems Explorer

This tutorial is intended to provide a simple step by step guide to create a plugin the adds a menu item.

This tutorial was written with Rational Developer for i 9.6 which is based on Eclipse 4.6 and uses the Java 8 JDK that is shipped with RDi.

Let's start by creating a simply plugin that contributes a menu item that brings up a dialog.

Let create Java Plugin project that will contribute this menu item.

You will notice that a lot of dot-delimited names.  The convention in Java and Eclipse is to use Reverse Domain Name Notation.  So in this example I am assuming you company name is "MyCompany".  Feel free to substitute in your own company name.

1. Create a new Plug-in Project

From the File menu select New->Other...->Plug-in Project

(or you could just hit Ctrl + N)

2. Fill in base Java project properties on the first page of the wizard

The name of the project will end up being the name of the plugin you are creating.  It is by convention in  Reverse Domain Name Notation.

Press Next to go the next page

3. Fill in plug-in project properties on the second page of the wizard

The Version will only become necessary if down the road, someone wants to explicitly depend of a specific version or version range of your plugin.  The Name and Vendor will appear when listing the plugins in Eclipse.  The Activator is use when instantiating the plugin and to access some of the associated resources.  It is not important in this example.

Press Next to go to the template page

4. Fill in the Template page of the wizard

Select Hello World, Command to get the ability to create menu and toolbar actions.

Simply press the Finish button now.

5. Launch a Runtime copy of Eclipse that has your Plug-in loaded

Select Run>Run Configurations ...

The defaults are acceptable, but you specify a name that is meaningful to you.

Now you should see the new menu item and toolbar item and Ctrl-6 action key

6. Understand what you have generated


command - with id

command handler associates id with Java class

menu associates with command id

toolbar item associates with command id

Java method invoked to handle command

IBM Code Coverage

Interpreting Code Coverage Results

The API to read code coverage information that is generated either through RDi or through the new CODECOV command.

Go into your RDi installation directory, you will find the plugin. Inside you will find the ccapiext.jar which will contain the latest API that RDi is using. You can use this as your latest API . It should improve which each release, although I expect it is pretty stable by now. The ccapiext.jar is the API that IBM is making available to external people such as yourself. You can find JavaDoc for this from the IDz documentation for now:

IBM Data Studio shell sharing with RDi


The IBM Data Studio client is a no-charge offering that provides an integrated development environment for instance and database administration, routine and SQL application development, and query tuning that can be installed with other IBM software products so that they can share a common environment. IBM Data Studio is based on Eclipse and uses and can share the same IBM package group as Rational Developer for i.


Regarding IBM Data Studio, it is a separate product from RDi but it is free. You can download it from Select the 'Full Data Studio product images ' link. After logging in with your IBM id, you will be able to download IBM Data Studio client Install for Windows (1.9GB). Once downloaded, unzip it and then run the install. During the install, one of the panels lets you to select either a new package group or to use an existing package group. If you select to use an existing package group, you will be able to select the one that has RDi in it. This is what you want to do. Once installed in the same package group, when you start the product you will have the IBM i and the Data tooling together.


This tutorial shows you how to connect to DB2 for i and also shows how to create a stored procedure on IBM i.  Note that in Data Studio - IBM i Libraries are called Schemas.

This tuturial assumes a LUW database but illustrates writing and running SQL scripts:

API - How to access search results from an EVENTF

The code that handles search results is found in the plugin:
in the package:
The class SearchFiltersEventsFileParser is a thin subclass of SearchEventsFileParser that handles the fact that you may duplicate records in your search result because you can search multiple connectsion and RSE filters and therefore can have duplicate files.
So the class of interest is SearchEventsFileParser the constructor takes that IFile of the downloaded eventf and the result set to populate.
Here is the code to download the given EVENTF member and parse it into the result set.


SearchResultInputElement resultSet =
new SearchResultInputElement(searchString); // searchString is just used in messages
       boolean mixedConnection = false // is only true if a search crosses multiple filters
* Retrieve events file.
private void parse(
   IQSYSMember member,
   IProgressMonitor monitor,
   IBMiConnection connection) throws Exception
  QSYSEditableRemoteSourceFileMember editableMember = new QSYSEditableRemoteSourceFileMember(member);, true);
  IFile file = editableMember.getLocalResource();
  // ignore the events file, because we never will edit it. 
  QSYSTempFileListener.getListener().addIgnoreFile(file); //SE24082
  if (parser == null)
    parser = new SearchFilterEventsFileParser(
    if (mixedConnection)
catch (Exception e)

    // your error handling

    throw e;

Once you have parsed, simply iterate over the result set 

API - How to Access errors from an EVENTF

If you want to populate the error list UI you want to use:


This class parses the event file from the local IFile and then loads the ErrorList and creates the IMarkers for each error.

If you want to iterate over the errors yourself without any UI then use:


The parser method takes a sequential file reader and calls, String, String)

    public abstract void createMarker(
      QSYSEventsFileErrorInformationRecord record, String fileLocation, 
      String isReadOnly) throws Exception;

for each error (or search result found)
Using this, you  can implement IMarkerCreator and build your own UI.
To get the ISequentialFileReader

    if (!_useDefaultEncoding)
    reader = new LineNumberReader(new InputStreamReader(new FileInputStream(newFile.getLocation().makeAbsolute().toOSString()), "UTF8"));
    reader = new LineNumberReader(new InputStreamReader(new FileInputStream(newFile.getLocation().makeAbsolute().toOSString())));
    ISequentialFileReader sequentialReader = new SequentialLineReader(reader);