Change-Id: I937c76141195f02d5c3694327e4e085764cd00c4
Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/26300
Tested-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
@Override
public void setPort(int port) {
}
@Override
public void setPort(int port) {
}
+
+ @Override
+ public boolean isLocal() {
+ return false;
+ }
.getHostsBySubSystemConfigurationCategory("shells"))); //$NON-NLS-1$
for (IHost connection : shellConnections) {
.getHostsBySubSystemConfigurationCategory("shells"))); //$NON-NLS-1$
for (IHost connection : shellConnections) {
- if (!connection.getSystemType().isLocal()) {
- ISubSystem[] subSystems = connection.getSubSystems();
- for (int i = 0; i < subSystems.length; i++) {
- if (subSystems[i] instanceof IFileServiceSubSystem) {
- result.add(connection);
- break;
- }
+ ISubSystem[] subSystems = connection.getSubSystems();
+ for (int i = 0; i < subSystems.length; i++) {
+ if (subSystems[i] instanceof IFileServiceSubSystem) {
+ result.add(connection);
+ break;
*/
public void deregister() {
ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
*/
public void deregister() {
ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- registry.deleteHost(fHost);
+ // Don't remove local host because it cannot be recreated by
+ // LTTng NewConnection Dialog
+ if (!fRemoteProxy.isLocal()) {
+ registry.deleteHost(fHost);
+ }
}
// ------------------------------------------------------------------------
}
// ------------------------------------------------------------------------
IShellService shellService = fProxy.getShellService();
Process p = null;
try {
IShellService shellService = fProxy.getShellService();
Process p = null;
try {
- fHostShell = shellService.launchShell("", new String[0], new NullProgressMonitor()); //$NON-NLS-1$
+ String[] env = new String[0];
+
+ if (fProxy.isLocal()) {
+ env = shellService.getHostEnvironment();
+ }
+
+ fHostShell = shellService.launchShell("", env, new NullProgressMonitor()); //$NON-NLS-1$
p = new HostShellProcessAdapter(fHostShell);
} catch (Exception e) {
throw new ExecutionException(Messages.TraceControl_CommandShellError, e);
p = new HostShellProcessAdapter(fHostShell);
} catch (Exception e) {
throw new ExecutionException(Messages.TraceControl_CommandShellError, e);
*/
void removeCommunicationListener(ICommunicationsListener listener);
*/
void removeCommunicationListener(ICommunicationsListener listener);
+ /**
+ * Checks whether the local host connector service is used or not.
+ *
+ * @return <code>true</code> if local connection else <false>
+ *
+ */
+ public boolean isLocal();
}
\ No newline at end of file
}
\ No newline at end of file
cs.removeCommunicationsListener(listener);
}
}
cs.removeCommunicationsListener(listener);
}
}
+
+ @Override
+ public boolean isLocal() {
+ return fHost.getSystemType().isLocal();
+ }