1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 18:26:01 +02:00

Return osgi properties insead of system properties on local provider for

os name and arch.

Signed-off-by: Greg Watson <g.watson@computer.org>
This commit is contained in:
Greg Watson 2014-03-24 09:24:06 -04:00
parent 62dec7e1b6
commit 87c2a034d4

View file

@ -31,6 +31,7 @@ import org.eclipse.remote.core.IRemoteServices;
import org.eclipse.remote.core.IUserAuthenticator;
import org.eclipse.remote.core.exception.RemoteConnectionException;
import org.eclipse.remote.core.exception.UnableToForwardPortException;
import org.eclipse.remote.internal.core.RemoteCorePlugin;
import org.eclipse.remote.internal.core.messages.Messages;
public class LocalConnection implements IRemoteConnection {
@ -263,6 +264,15 @@ public class LocalConnection implements IRemoteConnection {
*/
@Override
public String getProperty(String key) {
/*
* Convert os.name and os.arch to framework properties so they make more sense
*/
switch (key) {
case IRemoteConnection.OS_NAME_PROPERTY:
return RemoteCorePlugin.getDefault().getBundle().getBundleContext().getProperty("osgi.os"); //$NON-NLS-1$
case IRemoteConnection.OS_ARCH_PROPERTY:
return RemoteCorePlugin.getDefault().getBundle().getBundleContext().getProperty("osgi.arch"); //$NON-NLS-1$
}
return System.getProperty(key);
}