DESCRIPTION

Remote proxy: add getEnv() method

Added remote implementations to System.getenv() into the Local, RDT and SSH proxies.
Amend by Craig Arias xxx@xxx.xxx

Change-Id: Ib62b072b351a99c5d0079d742f786ff38d2faa45
Signed-off-by: Madeline Richardson xxx@xxx.xxx


COMMENTS

author: Craig Arias
date: 2013-07-27 20:36:44.000000000

Uploaded patch set 5.

-------------------------------------
author: Brenden Conley
date: 2013-07-27 20:36:49.000000000

Patch Set 5:

Build Started https://hudson.eclipse.org/sandbox/job/linuxtools/2990/

-------------------------------------
author: Brenden Conley
date: 2013-07-27 20:50:23.000000000

Patch Set 5: Verified+1

Build Successful 

https://hudson.eclipse.org/sandbox/job/linuxtools/2990/ : SUCCESS

-------------------------------------
author: Nathanael Holden
date: 2013-07-30 17:38:29.000000000

Patch Set 5: Code-Review-1

(6 comments)

The manifest, and pom files will need to be bumped to 2.1.0. Also does this change eliminate the need for https://git.eclipse.org/r/14296/ ?

Line:20, profiling/org.eclipse.linuxtools.profiling.launch/src/org/eclipse/linuxtools/profiling/launch/IRemoteEnvProxyManager.java -> The class needs xxx@xxx.xxx annotation (2.1)

Line:29, profiling/org.eclipse.linuxtools.profiling.launch/src/org/eclipse/linuxtools/profiling/launch/RemoteProxyManager.java -> any field/method becoming protected/public here would need xxx@xxx.xxx annotation (2.1).

Line:53, profiling/org.eclipse.linuxtools.tools.launch.core/src/org/eclipse/linuxtools/tools/launch/core/factory/LinuxtoolsProcessFactory.java -> This can still be RemoteEnvProxyManager.getInstance as before. The only concern here is that the getEnv calls getRemoteManager which will return some type of proxy. That proxy might not implement the new IRemoteEnvProxyManager and so getEnv will fail.

Look at my comments in RemoteEnvProxyManager since this is where the handling of this case should be done.

Line:32, profiling/org.eclipse.linuxtools.profiling.launch/src/org/eclipse/linuxtools/profiling/launch/RemoteEnvProxyManager.java -> This should support IRemoteProxyManager.

Line:42, profiling/org.eclipse.linuxtools.profiling.launch/src/org/eclipse/linuxtools/profiling/launch/RemoteEnvProxyManager.java -> There is no guarantee that an instance of IRemoteProxyManager will be an instance of IRemoteEnvProxyManager as well. I mean, we can guarantee it for the proxies we have defined, but if some user of the api has implemented their own proxy that only implements IRemoteProxyManager, then this casting will fail.

We should still support the old interface.

Line:56, profiling/org.eclipse.linuxtools.profiling.launch/src/org/eclipse/linuxtools/profiling/launch/RemoteEnvProxyManager.java -> I think getEnv should just assume it has an IRemoteProxyManager, and then call getEnv if the manager is an instance of IRemoteEnvProxyManager. If it isn't, then the default value (maybe System.getenv()) can be used.

-------------------------------------
author: Craig Arias
date: 2013-07-30 20:24:21.000000000

Patch Set 5:

Yes, it eliminates 14296.

-------------------------------------
