Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'profiling/org.eclipse.linuxtools.rdt.proxy/src/org/eclipse/linuxtools/rdt/proxy/RDTProxyManager.java')
-rw-r--r--profiling/org.eclipse.linuxtools.rdt.proxy/src/org/eclipse/linuxtools/rdt/proxy/RDTProxyManager.java33
1 files changed, 29 insertions, 4 deletions
diff --git a/profiling/org.eclipse.linuxtools.rdt.proxy/src/org/eclipse/linuxtools/rdt/proxy/RDTProxyManager.java b/profiling/org.eclipse.linuxtools.rdt.proxy/src/org/eclipse/linuxtools/rdt/proxy/RDTProxyManager.java
index 7cdc7241fb..a978a91501 100644
--- a/profiling/org.eclipse.linuxtools.rdt.proxy/src/org/eclipse/linuxtools/rdt/proxy/RDTProxyManager.java
+++ b/profiling/org.eclipse.linuxtools.rdt.proxy/src/org/eclipse/linuxtools/rdt/proxy/RDTProxyManager.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.linuxtools.rdt.proxy;
+import java.net.URI;
+
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.linuxtools.internal.rdt.proxy.RDTCommandLauncher;
@@ -17,26 +19,49 @@ import org.eclipse.linuxtools.internal.rdt.proxy.RDTFileProxy;
import org.eclipse.linuxtools.profiling.launch.IRemoteCommandLauncher;
import org.eclipse.linuxtools.profiling.launch.IRemoteFileProxy;
import org.eclipse.linuxtools.profiling.launch.IRemoteProxyManager;
+import org.eclipse.ptp.remote.core.IRemoteConnection;
+import org.eclipse.ptp.remote.core.IRemoteServices;
+import org.eclipse.ptp.remote.core.PTPRemoteCorePlugin;
public class RDTProxyManager implements IRemoteProxyManager {
@Override
+ public IRemoteFileProxy getFileProxy(URI uri) throws CoreException {
+ return new RDTFileProxy(uri);
+ }
+
+ @Override
public IRemoteFileProxy getFileProxy(IProject project) throws CoreException {
return new RDTFileProxy(project);
}
@Override
+ public IRemoteCommandLauncher getLauncher(URI uri)
+ throws CoreException {
+ return new RDTCommandLauncher(uri);
+ }
+
+ @Override
public IRemoteCommandLauncher getLauncher(IProject project)
throws CoreException {
return new RDTCommandLauncher(project);
}
@Override
+ public String getOS(URI uri) throws CoreException {
+ IRemoteServices services = PTPRemoteCorePlugin.getDefault().getRemoteServices(uri);
+ IRemoteConnection connection = services.getConnectionManager().getConnection(uri);
+ String os = connection.getProperty(IRemoteConnection.OS_NAME_PROPERTY);
+ if (os == null || os.length() == 0)
+ //FIXME: need better way to get this property
+ return "Linux"; //$NON-NLS-1$
+ return os;
+ }
+
+ @Override
public String getOS(IProject project) throws CoreException {
-// URI uri = project.getLocationURI();
-// IRemoteServices services = PTPRemoteCorePlugin.getDefault().getRemoteServices(uri);
-// IRemoteConnection connection = services.getConnectionManager().getConnection(uri);
- return "Linux"; //FIXME: why doesn't getProperty("os.name") work?
+ URI uri = project.getLocationURI();
+ return getOS(uri);
}
}

Back to the top