Skip to main content
summaryrefslogtreecommitdiffstats
path: root/remote
diff options
context:
space:
mode:
authorDoug Schaefer2015-02-16 13:28:26 -0500
committerGerrit Code Review @ Eclipse.org2015-02-17 14:48:08 -0500
commitcd65a290169f473d1c615182207db6bfa5a6bc65 (patch)
treec7f9dabf4e4417e1dafbc62574ed6e774beed165 /remote
parent9471bc7bc1031ebbc86a539fc82664dcc677f758 (diff)
downloadorg.eclipse.cdt-cd65a290169f473d1c615182207db6bfa5a6bc65.tar.gz
org.eclipse.cdt-cd65a290169f473d1c615182207db6bfa5a6bc65.tar.xz
org.eclipse.cdt-cd65a290169f473d1c615182207db6bfa5a6bc65.zip
Bug 459972 - Update CDT to use o.e.remote 2.0.
Requires a couple of changes in the autotools plug-ins. Change the 4.5 target to refer to the remote 2.0 build and update the pom to use the 4.5 target. Also fixes autotools test so they run on the Mac. Change-Id: I145de3ea3f14d61ffba7354ad0fa3e0ec2467e26
Diffstat (limited to 'remote')
-rw-r--r--remote/org.eclipse.cdt.remote.core/src/org/eclipse/cdt/remote/core/RemoteCommandLauncher.java20
1 files changed, 13 insertions, 7 deletions
diff --git a/remote/org.eclipse.cdt.remote.core/src/org/eclipse/cdt/remote/core/RemoteCommandLauncher.java b/remote/org.eclipse.cdt.remote.core/src/org/eclipse/cdt/remote/core/RemoteCommandLauncher.java
index 412ac59d4d..25fd75ff0d 100644
--- a/remote/org.eclipse.cdt.remote.core/src/org/eclipse/cdt/remote/core/RemoteCommandLauncher.java
+++ b/remote/org.eclipse.cdt.remote.core/src/org/eclipse/cdt/remote/core/RemoteCommandLauncher.java
@@ -19,6 +19,7 @@ import java.util.Properties;
import org.eclipse.cdt.core.CommandLauncher;
import org.eclipse.cdt.core.ICommandLauncher;
+import org.eclipse.cdt.remote.internal.core.Activator;
import org.eclipse.cdt.remote.internal.core.messages.Messages;
import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.core.resources.IProject;
@@ -27,12 +28,14 @@ import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.remote.core.IRemoteConnection;
+import org.eclipse.remote.core.IRemoteConnectionType;
+import org.eclipse.remote.core.IRemoteFileService;
import org.eclipse.remote.core.IRemoteProcess;
import org.eclipse.remote.core.IRemoteProcessBuilder;
+import org.eclipse.remote.core.IRemoteProcessService;
import org.eclipse.remote.core.IRemoteResource;
-import org.eclipse.remote.core.IRemoteServices;
+import org.eclipse.remote.core.IRemoteServicesManager;
import org.eclipse.remote.core.RemoteProcessAdapter;
-import org.eclipse.remote.core.RemoteServices;
public class RemoteCommandLauncher implements ICommandLauncher {
@@ -130,16 +133,19 @@ public class RemoteCommandLauncher implements ICommandLauncher {
IRemoteResource remRes = (IRemoteResource) getProject().getAdapter(IRemoteResource.class);
if (remRes != null) {
URI uri = remRes.getActiveLocationURI();
- IRemoteServices remServices = RemoteServices.getRemoteServices(uri);
- if (remServices != null) {
- fConnection = remServices.getConnectionManager().getConnection(uri);
+ IRemoteServicesManager remoteServicesManager = Activator.getService(IRemoteServicesManager.class);
+ IRemoteConnectionType connectionType = remoteServicesManager.getConnectionType(uri);
+ if (connectionType != null) {
+ fConnection = connectionType.getConnection(uri);
if (fConnection != null) {
parseEnvironment(env);
fCommandArgs = constructCommandArray(commandPath.toString(), args, remRes);
- IRemoteProcessBuilder processBuilder = fConnection.getProcessBuilder(fCommandArgs);
+ IRemoteProcessService processService = fConnection.getService(IRemoteProcessService.class);
+ IRemoteProcessBuilder processBuilder = processService.getProcessBuilder(fCommandArgs);
if (workingDirectory != null) {
String remoteWorkingPath = makeRemote(workingDirectory.toString(), remRes);
- IFileStore wd = fConnection.getFileManager().getResource(remoteWorkingPath);
+ IRemoteFileService fileManager = fConnection.getService(IRemoteFileService.class);
+ IFileStore wd = fileManager.getResource(remoteWorkingPath);
processBuilder.directory(wd);
}
Map<String, String> processEnv = processBuilder.environment();

Back to the top