Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Changes in Service provider and resource manager classes in PTP 5.0?

Dave,

If you already have an IResourceManager object, then try this:

IResourceManagerComponentConfiguration config = rm.getControl().getControlConfiguration();
String id = config.getRemoteServicesId();
String connName = config.getConnectionName();


If you have a service provider, then try this:

if (provider instanceof ResourceManagerServiceProvider) {
String name = ((ResourceManagerServiceProvider)provider).getUniqueName();
IResourceManager rm = ModelManager.getInstance().getResourceManagerFromUniqueName(name);
// Same as above
...
}

Greg


On May 25, 2011, at 9:59 PM, Dave Wootton wrote:


Greg
I'm trying to build my HPC Toolkit plugin with PTP 5.0 and there seem to be a few changes that are causing compilation errors.

1) IResourceManager has moved from the org.eclipse.ptp.core.elements package to org.eclipse.ptp.rmsystem in the org.eclipse.ptp,core plugin
2) I'm trying to get the remote connection from the service configuration where I was getting an IResourceManagerConfiguration object by calling AbstractResourceManager.getConfiguration() then calling getRemoteServicesID() and getConnectionName() on that IResourceManagerConfiguration object, but now those methods have been removed.
3) In a different class, I'm trying to get the remote connection from the launch service provider for the active service configuration. Previously, the launch service provider was an instance of IResourceManagerConfiguration. Now, stepping thru the code in debug, it is a ResourceManagerServiceProvider object and the check for instance of IResourceManagerConfiguration fails. Since htat fails, I don't have a way to get hte remote connection.

I've resolved #1, but I'm not sure how to resolve #2 and #3 so I can get the remote connection from the service configuration.
Dave_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev


Back to the top