Each version of RDI is just a big collection of plugins.
The easiest way to make sure a plugin is compatible with another version of RDI is to just point Eclipse at that version of RDI and run the tool.
If you don't have the prior version installed, then you may not have access to the correct versions of each plugin.
If your plugin is not dependent on any other plugins, then this may be an issue.

In your case you are probably connecting to an Lpex extension point?

I do know that the version of Lpex changed a lot between 9.1 and 9.5.

If you have the version of RDI installed it makes it easier because you can just point your plugin at that target environment.
In your project add a Target Definition. Open it, then under "Locations" click "Add". Add an "Installation" and point it to your RDI install folder.
This should allow your plugin to see all the which versions of the other plugins are available to use.

I also setup specific JREs and pointed them to the RDI install folders so that the compiler would give me any potential errors.

Make a new workspace just for the plugin development.
With that new workspace loaded go into the Preferences for the Installed JREs.
Preferences-> Java -> Installed JREs.
Add a new JRE and point it the IBM JDK folder you need to use.
For example I have 9.1 pointing to "..\IBM\SDP\jdk" and 9.5 pointing to "..\IBM\SDP95\jdk".

With the JRE defined you can have your plugin use it.
First, change the JRE for your plugin.
In the Preferences for the project go to "Java Build Path".
In the "Libraries" tab select the JRE and click the edit button.
Select "Alternate JRE" and choose the JRE you defined that points to the RDI java you need to use.

Once that is done the project should compile with the JDK version needed for the RDI product.

To test the plugin you can create an Eclipse Application definition that uses the correct JRE.
Most of the arguments you can extract from the eclipse.ini file inside your RDI folder.
Some of these may be defaults, others were found in the eclipse.ini file.

In order to get the 9.1 working I used these settings.

Main Tab:
Program to run: Run a product: "com.ibm.rational.developer.ibmi.product.ide"
Java Runtime: Runtime JRE dropdown: Select JDK added above.

Arguments tab:
Program arguments:
-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog

VM arguments:
-Xquickstart
-Xms100m
-Xmx1024m
-Xmnx64m
-Xgcpolicy:gencon
-Xscmx96m
-Xshareclasses:name=IBMSDP_%u
-XX:MaxPermSize=512M
-Xcompressedrefs
-Dcom.ibm.ws.management.event.max_polling_interval=1000
-Xss2m


After setting up the Application, I was able to test my plugin which starts up the correct RDI version I wanted.

When going between versions of RDI I actually found it easier to download the JEE Eclipse version that matches the RDI I want to write the plugin for.
Then using the above steps I can have that base Eclipse editor write and test plugins for the RDI version.

Eclipse has a number of Wizards to help create parts of the plugins.
You can create a Feature Project to categorize your plugins.
Then you can add the features into an Update Site Project.
You can then "Export" the Site-Project to a local or remote folder, or an archive.

Then, depending on the RDI version, you can add your Update Site-Site as a Repository location.

RDI 9.1.1.1 uses Eclipse 4.2.0
RDI 9.5.0.3 uses Eclipse 4.4.2

The P2 Repository system changed between the two versions. So each may need its own version of the repository.
Eclipse is up to Version 4.6 with 4.7 under development.

Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.


-----Original Message-----
From: WDSCI-L [mailto:wdsci-l-bounces@xxxxxxxxxxxx] On Behalf Of Craig Richards
Sent: Friday, August 19, 2016 1:27 AM
To: Rational Developer for IBM i / Websphere Development Studio Client for System i & iSeries <wdsci-l@xxxxxxxxxxxx>
Subject: [WDSCI-L] Plugin Compatibility

All,

I created an lpex plugin for RDi and had no trouble getting it to work on my machine.

I then copied the jar file onto the machine of a work colleague ( stopping and restarting eclipse ) and defined the new userAction to call it and assigned it a shortcut key.

But when I return to the view of an open RPGLE source member, I get a message that the class is not found.

To figure out where the plugin directory was, ( we are running citrix / vdi, which makes things a bit awkward and sometimes out of our control ) I right-clicked RDi from the Start Menu and selected "open file location" and then used this as a start to drill down to the plugin directory.

It seems clear that the plugin was loaded, on my machine I can see it under installation details on the plugin tab, but not on my colleague's machine.
However I can see no evidence in the log that there was a problem loading the plugin.

I'm not doing anything funky with the plugin, simply running the command "insertText" with various strings and using the "end" and "up" actions to reposition the cursor.

My best guess right now is that it's because of different versions of Eclipse / RDI / JRE. I'm running 9.5.03 of Eclipse and Java 8. The other machine ( well, machines, I hassled a couple of colleagues ) are using 9.1.?? of Eclipse and I think Java 7.

Forgive my plugin ignorance but do I have build a plugin back to their levels of Eclipse and/or Java? If Eclipse encounters an incompatible plugin when it starts up does it just fail silently rather than logging the fact?

Any suggestions/advice gratefully accepted.
thanks in advance
Craig
--
This is the Rational Developer for IBM i / Websphere Development Studio Client for System i & iSeries (WDSCI-L) mailing list To post a message email: WDSCI-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/wdsci-l.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.