Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] How do I access existing project using RDT?

You want to do something like this (from RemoteMakeBuilder):

ServiceModelManager smm = ServiceModelManager.getInstance();

try{
IServiceConfiguration serviceConfig = smm.getActiveConfiguration(getProject());
IService buildService = smm.getService(IRDTServiceConstants.SERVICE_BUILD);
IServiceProvider provider = serviceConfig.getServiceProvider(buildService);
IRemoteExecutionServiceProvider executionProvider = null;
if(provider instanceof IRemoteExecutionServiceProvider) {
executionProvider = (IRemoteExecutionServiceProvider) provider;
}

IRemoteServices remoteServices = executionProvider.getRemoteServices();

if (remoteServices == null)
return false;

if(!remoteServices.isInitialized()) {
remoteServices.initialize();
}

if (remoteServices == null)
return false;

IRemoteConnection connection = executionProvider.getConnection();

if(connection == null)
return false;

if(!connection.isOpen())
connection.open(monitor);

IRemoteProcessBuilder processBuilder = remoteServices.getProcessBuilder(connection, command);

===========================
Chris Recoskie
Team Lead, IBM CDT and RDT
IBM Toronto

Inactive hide details for Jeff Johnston ---09/29/2011 03:15:00 PM---Could someone explain the usual sequence for getting RDT inJeff Johnston ---09/29/2011 03:15:00 PM---Could someone explain the usual sequence for getting RDT interfaces for an existing project (remote


From:

Jeff Johnston <jjohnstn@xxxxxxxxxx>

To:

ptp-dev@xxxxxxxxxxx

Date:

09/29/2011 03:15 PM

Subject:

[ptp-dev] How do I access existing project using RDT?

Sent by:

ptp-dev-bounces@xxxxxxxxxxx




Could someone explain the usual sequence for getting RDT interfaces for
an existing project (remote or local)?

What I want to do is: starting from an IProject, get an
IRemoteFileManager and an IRemoteProcessBuilder for that project (either
local or remote depending on the project).

It is not clear from the APIs how to do this.

-- Jeff Johnston
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev


GIF image

GIF image


Back to the top