Hi Doug,
Looks like you figured most of this out, but here are some more details:
You should only be using the interfaces defined in the
com.ibm.etools.iseries.services.qsys.api package like IQSYSObject,
IQSYSMember, IQSYSSourceMember (which extends IQSYSMember). The
QSYSRemote.. vs QSYSHost... classes are an internal implementation of
those interfaces.
There is also an interface called
com.ibm.etools.iseries.subsystems.qsys.objects.IRemoteObjectContextProvider
that all objects returned by the Object subsystem will implement. From
this interface you can call:
((IRemoteObjectContextProvider) object).getRemoteObjectContext().
getObjectSubsystem();
Once you have the subsystem you can create an IBMiConnection (the follow
on to what use to be ISeriesConnection) using:
IBMiConnection.getConnection(subsystem.getHost());
I'm not sure what you are trying to figure out in question 1. Can you not
differentiate between the Objects subsystem and IFS subsystem just based
on the underlying objects they return? The IFS subsystem will be returning
instances of:
org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile
Don Yantzi
Technical Lead
Rational Developer for System i
IBM Toronto Lab
From:
"Doug Davie" <dougdavie@xxxxxxxxx>
To:
wdsc-plugin-dev@xxxxxxxxxxxx
Date:
11/19/2008 03:15 PM
Subject:
Re: [Wdsc-Plugin-Dev] RDi 7.5 changes
I will partially answer my own questions.
1) QSYSRemoteObject
My Plugin.xml does an object contribution with:
<objectContribution
objectClass="com.ibm.etools.iseries.subsystems.qsys.objects.QSYSRemoteObject"
So I feel this is the proper type to use.
I found this by examining the properties for the "work with objects..."
node
of my IBM i connection. I found the that Parent filter pool was
com.ibm.etools.iseries.subsystems.qsys.objects.
If I wanted my plugin to work with IFS files instead, I would examine the
properties of the "File Systems" node under the IFS Files node. Here I
would find that the object to contribute to would be
com.ibm.etools.iseries.subsystems.ifs.files.ifs.
Does anyone have alternatives to figuring this out?
2) Use IBMiConnection for PCML connection
I knew that I had selected an object that was already existing within the
opened connection.
I put my plugin into debug, and analyzed the variables. By drilling down
through my object I found my connection. So I was able to do this:
import com.ibm.as400.access.AS400;
import com.ibm.etools.iseries.subsystems.qsys.api.IBMiConnection;
private AS400 as400;
private QSYSRemoteObject object;
as400 =
IBMiConnection.getConnection(object.getRemoteObjectContext().getObjectSubsystem().getHost()).getAS400ToolboxObject();
then I could create :
pcml = new ProgramCallDocument(as400......
So I had to debug to find this. Was there an easier way?
-doug
On Tue, Nov 18, 2008 at 2:20 PM, Doug Davie <dougdavie@xxxxxxxxx> wrote:
RDi version 7.5 makes some significant changes in the way things are
implemented versus earlier versions.
I would appreciate some assistance in learning how to figure some stuff
out.
I have a plugin that extends a popup menu using
ISeriesAbstractQSYSPopupMenuExtensionAction. When I right click an
object
in my iSeries object filter and select my option, a program is called on
the
i. The program returns some data that I show in a dialog.
The existing plugin uses ISeriesObject. From this ISeriesObject I am
able
to use getISeriesConnection and create a ProgramCallDocument(AS400 arg0,
String arg1, ClassLoader arg2) to call the program:
<relevent code>
import com.ibm.etools.iseries.core.api.ISeriesObject;
import com.ibm.as400.data.ProgramCallDocument;
private ISeriesObject dataArea;
private ProgramCallDocument pcml;
public MyPgm(ISeriesObject dataarea).... {
this.dataArea = dataArea;
pcml =
*new*ProgramCallDocument(dataArea.getISeriesConnection().getAS400ToolboxObject(Display.
*getCurrent*().getActiveShell()), "com.myplugin", *this*
.getClass().getClassLoader());
With the changes made for RDi 7.5, the existing code does not work.
I've now extended ISeriesAbstractQsysPopupMenuAction.
Neither IQSYObject nor QSYSRemoteObject provide the getISeriesConnection
method so that I can create (use) the AS400() connection.
1) Is there a different type that I should use?
2) What is the best way to get the selected connection to pass to
ProgramCallDocuement?
I have other plugins that I will be working on.
4) How can I tell if I want to use QSYSRemoteObject, QSYSHostMember,
QSYSHostSourceMember, QSYSRemoteMember, IQSYSObject, etc?
3) How would I know this information? Is there a document that I'm
missing? Am I looking at the wrong websites for info?
Thank you
-doug
As an Amazon Associate we earn from qualifying purchases.