Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 239159
Collapse All | Expand All

(-)src/org/eclipse/rse/internal/subsystems/processes/shell/linux/Activator.java (-9 / +15 lines)
Lines 1-13 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2006, 2007 MontaVista Software, Inc. and others.
2
 * Copyright (c) 2006, 2008 MontaVista Software, Inc. and others.
3
 * All rights reserved. This program and the accompanying materials 
3
 * All rights reserved. This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0 
4
 * are made available under the terms of the Eclipse Public License v1.0 
5
 * which accompanies this distribution, and is available at 
5
 * which accompanies this distribution, and is available at 
6
 * http://www.eclipse.org/legal/epl-v10.html 
6
 * http://www.eclipse.org/legal/epl-v10.html 
7
 * 
7
 * 
8
 * Contributors: 
8
 * Contributors: 
9
 * Yu-Fen Kuo (MontaVista) - initial API and implementation
9
 * Yu-Fen Kuo       (MontaVista) - initial API and implementation
10
 * Martin Oberhuber (Wind River) - [refactor] "shell" instead of "ssh" everywhere 
10
 * Martin Oberhuber (Wind River) - [refactor] "shell" instead of "ssh" everywhere 
11
 * Anna Dushistova  (MontaVista) - [239159] The shell process subsystem not working without the shells subsystem present for the systemType
11
 *******************************************************************************/
12
 *******************************************************************************/
12
13
13
package org.eclipse.rse.internal.subsystems.processes.shell.linux;
14
package org.eclipse.rse.internal.subsystems.processes.shell.linux;
Lines 22-30 Link Here
22
23
23
import org.eclipse.rse.core.model.IHost;
24
import org.eclipse.rse.core.model.IHost;
24
import org.eclipse.rse.core.subsystems.ISubSystem;
25
import org.eclipse.rse.core.subsystems.ISubSystem;
26
import org.eclipse.rse.services.IService;
25
import org.eclipse.rse.services.shells.IShellService;
27
import org.eclipse.rse.services.shells.IShellService;
26
import org.eclipse.rse.subsystems.processes.servicesubsystem.IProcessServiceSubSystem;
28
import org.eclipse.rse.subsystems.processes.servicesubsystem.IProcessServiceSubSystem;
27
import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.IShellServiceSubSystem;
28
29
29
/**
30
/**
30
 * The activator class controls the plug-in life cycle
31
 * The activator class controls the plug-in life cycle
Lines 159-167 Link Here
159
     * @return shell service object, or <code>null</code> if not found.
160
     * @return shell service object, or <code>null</code> if not found.
160
     */
161
     */
161
    public static IShellService getShellService(IHost host) {
162
    public static IShellService getShellService(IHost host) {
162
    	IShellServiceSubSystem ss = getShellServiceSubSystem(host);
163
    	ISubSystem ss = getSuitableSubSystem(host);
163
    	if (ss!=null) {
164
    	if (ss!=null) {
164
    		return ss.getShellService();
165
    		return (IShellService)ss.getSubSystemConfiguration().getService(host).getAdapter(IShellService.class);
165
    	}
166
    	}
166
        return null;
167
        return null;
167
    }
168
    }
Lines 172-185 Link Here
172
     * @param host the connection 
173
     * @param host the connection 
173
     * @return shell service subsystem, or <code>null</code> if not found.
174
     * @return shell service subsystem, or <code>null</code> if not found.
174
     */
175
     */
175
    public static IShellServiceSubSystem getShellServiceSubSystem(IHost host) {
176
    public static ISubSystem getSuitableSubSystem(IHost host) {
176
        if (host == null)
177
        if (host == null)
177
            return null;
178
            return null;
178
        ISubSystem[] subSystems = host.getSubSystems();
179
        ISubSystem[] subSystems = host.getSubSystems();
180
        IShellService ssvc = null;
179
        for (int i = 0; subSystems != null && i < subSystems.length; i++) {
181
        for (int i = 0; subSystems != null && i < subSystems.length; i++) {
180
            if (subSystems[i] instanceof IShellServiceSubSystem) {
182
        	IService svc = subSystems[i].getSubSystemConfiguration().getService(host);
181
                return (IShellServiceSubSystem)subSystems[i];
183
        	if (svc!=null) {
182
            }
184
        		ssvc = (IShellService)svc.getAdapter(IShellService.class);
185
        		if (ssvc != null) {
186
        		    return subSystems[i];	
187
        		}	
188
        	}
183
        }
189
        }
184
        return null;
190
        return null;
185
    }
191
    }
(-)src/org/eclipse/rse/internal/subsystems/processes/shell/linux/DelegatingShellProcessConnectorService.java (-5 / +4 lines)
Lines 1-5 Link Here
1
/********************************************************************************
1
/********************************************************************************
2
 * Copyright (c) 2007 IBM Corporation. All rights reserved.
2
 * Copyright (c) 2007, 2008 IBM Corporation. All rights reserved.
3
 * This program and the accompanying materials are made available under the terms
3
 * This program and the accompanying materials are made available under the terms
4
 * of the Eclipse Public License v1.0 which accompanies this distribution, and is 
4
 * of the Eclipse Public License v1.0 which accompanies this distribution, and is 
5
 * available at http://www.eclipse.org/legal/epl-v10.html
5
 * available at http://www.eclipse.org/legal/epl-v10.html
Lines 9-24 Link Here
9
 * component that contains this file: David McKnight.
9
 * component that contains this file: David McKnight.
10
 * 
10
 * 
11
 * Contributors:
11
 * Contributors:
12
 * {Name} (company) - description of contribution.
12
 * Anna Dushistova  (MontaVista) - [239159] The shell process subsystem not working without the shells subsystem present for the systemType
13
 ********************************************************************************/
13
 ********************************************************************************/
14
package org.eclipse.rse.internal.subsystems.processes.shell.linux;
14
package org.eclipse.rse.internal.subsystems.processes.shell.linux;
15
15
16
import org.eclipse.rse.core.model.IHost;
16
import org.eclipse.rse.core.model.IHost;
17
import org.eclipse.rse.core.subsystems.AbstractDelegatingConnectorService;
17
import org.eclipse.rse.core.subsystems.AbstractDelegatingConnectorService;
18
import org.eclipse.rse.core.subsystems.IConnectorService;
18
import org.eclipse.rse.core.subsystems.IConnectorService;
19
19
import org.eclipse.rse.core.subsystems.ISubSystem;
20
import org.eclipse.rse.subsystems.processes.servicesubsystem.IProcessServiceSubSystem;
20
import org.eclipse.rse.subsystems.processes.servicesubsystem.IProcessServiceSubSystem;
21
import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.IShellServiceSubSystem;
22
21
23
/**
22
/**
24
 * This class delegates the connector service requests for the linux process 
23
 * This class delegates the connector service requests for the linux process 
Lines 47-53 Link Here
47
		}
46
		}
48
		else
47
		else
49
		{
48
		{
50
			IShellServiceSubSystem ss = Activator.getShellServiceSubSystem(getHost());
49
			ISubSystem ss = Activator.getSuitableSubSystem(getHost());
51
			if (ss != null)
50
			if (ss != null)
52
			{
51
			{
53
				_realService = ss.getConnectorService();
52
				_realService = ss.getConnectorService();
(-)src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxShellProcessService.java (-2 / +3 lines)
Lines 12-17 Link Here
12
 * David McKnight   (IBM)        - [175308] Need to use a job to wait for shell to exit
12
 * David McKnight   (IBM)        - [175308] Need to use a job to wait for shell to exit
13
 * Martin Oberhuber (Wind River) - [226262] Make IService IAdaptable and add Javadoc
13
 * Martin Oberhuber (Wind River) - [226262] Make IService IAdaptable and add Javadoc
14
 * Martin Oberhuber (Wind River) - [226301][api] IShellService should throw SystemMessageException on error
14
 * Martin Oberhuber (Wind River) - [226301][api] IShellService should throw SystemMessageException on error
15
 * Anna Dushistova  (MontaVista) - [239159] The shell process subsystem not working without the shells subsystem present for the systemType
15
 *******************************************************************************/
16
 *******************************************************************************/
16
17
17
package org.eclipse.rse.internal.subsystems.processes.shell.linux;
18
package org.eclipse.rse.internal.subsystems.processes.shell.linux;
Lines 26-31 Link Here
26
import org.eclipse.core.runtime.NullProgressMonitor;
27
import org.eclipse.core.runtime.NullProgressMonitor;
27
28
28
import org.eclipse.rse.core.model.IHost;
29
import org.eclipse.rse.core.model.IHost;
30
import org.eclipse.rse.core.subsystems.ISubSystem;
29
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
31
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
30
import org.eclipse.rse.services.clientserver.processes.IHostProcess;
32
import org.eclipse.rse.services.clientserver.processes.IHostProcess;
31
import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
33
import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
Lines 34-40 Link Here
34
import org.eclipse.rse.services.shells.HostShellProcessAdapter;
36
import org.eclipse.rse.services.shells.HostShellProcessAdapter;
35
import org.eclipse.rse.services.shells.IHostShell;
37
import org.eclipse.rse.services.shells.IHostShell;
36
import org.eclipse.rse.services.shells.IShellService;
38
import org.eclipse.rse.services.shells.IShellService;
37
import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.IShellServiceSubSystem;
38
39
39
/**
40
/**
40
 * class to fetch remote linux target's process info
41
 * class to fetch remote linux target's process info
Lines 106-112 Link Here
106
            final IProgressMonitor monitor) throws SystemMessageException {
107
            final IProgressMonitor monitor) throws SystemMessageException {
107
        // this is to workaround RSE bug 147531
108
        // this is to workaround RSE bug 147531
108
        if (filter.getUsername().equals("${user.id}") && host != null) { //$NON-NLS-1$
109
        if (filter.getUsername().equals("${user.id}") && host != null) { //$NON-NLS-1$
109
        	IShellServiceSubSystem ss = Activator.getShellServiceSubSystem(host);
110
        	ISubSystem ss = Activator.getSuitableSubSystem(host);
110
        	if (ss!=null) {
111
        	if (ss!=null) {
111
                // change filter username so the filter will filter out the right
112
                // change filter username so the filter will filter out the right
112
                // process for my processes
113
                // process for my processes
(-)src/org/eclipse/rse/subsystems/processes/shell/linux/ShellProcessSubSystemConfiguration.java (-3 / +3 lines)
Lines 1-5 Link Here
1
/********************************************************************************
1
/********************************************************************************
2
 * Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved.
2
 * Copyright (c) 2006, 2008 IBM Corporation and others. All rights reserved.
3
 * This program and the accompanying materials are made available under the terms
3
 * This program and the accompanying materials are made available under the terms
4
 * of the Eclipse Public License v1.0 which accompanies this distribution, and is 
4
 * of the Eclipse Public License v1.0 which accompanies this distribution, and is 
5
 * available at http://www.eclipse.org/legal/epl-v10.html
5
 * available at http://www.eclipse.org/legal/epl-v10.html
Lines 14-19 Link Here
14
 * Yu-Fen Kuo (MontaVista) - adapted from RSE ProcessServiceSubSystemConfiguration
14
 * Yu-Fen Kuo (MontaVista) - adapted from RSE ProcessServiceSubSystemConfiguration
15
 * Martin Oberhuber (Wind River) - [refactor] "shell" instead of "ssh" everywhere
15
 * Martin Oberhuber (Wind River) - [refactor] "shell" instead of "ssh" everywhere
16
 * Martin Oberhuber (Wind River) - [186523] Move subsystemConfigurations from UI to core
16
 * Martin Oberhuber (Wind River) - [186523] Move subsystemConfigurations from UI to core
17
 * Anna Dushistova  (MontaVista) - [239159] The shell process subsystem not working without the shells subsystem present for the systemType
17
 *******************************************************************************/
18
 *******************************************************************************/
18
19
19
package org.eclipse.rse.subsystems.processes.shell.linux;
20
package org.eclipse.rse.subsystems.processes.shell.linux;
Lines 30-36 Link Here
30
import org.eclipse.rse.subsystems.processes.core.subsystem.IHostProcessToRemoteProcessAdapter;
31
import org.eclipse.rse.subsystems.processes.core.subsystem.IHostProcessToRemoteProcessAdapter;
31
import org.eclipse.rse.subsystems.processes.servicesubsystem.ProcessServiceSubSystem;
32
import org.eclipse.rse.subsystems.processes.servicesubsystem.ProcessServiceSubSystem;
32
import org.eclipse.rse.subsystems.processes.servicesubsystem.ProcessServiceSubSystemConfiguration;
33
import org.eclipse.rse.subsystems.processes.servicesubsystem.ProcessServiceSubSystemConfiguration;
33
import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.IShellServiceSubSystem;
34
34
35
/**
35
/**
36
 * This class is used by org.eclipse.rse.core.subsystemConfigurations extension
36
 * This class is used by org.eclipse.rse.core.subsystemConfigurations extension
Lines 58-64 Link Here
58
58
59
    public IConnectorService getConnectorService(IHost host) 
59
    public IConnectorService getConnectorService(IHost host) 
60
    {
60
    {
61
    	IShellServiceSubSystem ss = Activator.getShellServiceSubSystem(host);
61
    	ISubSystem ss = Activator.getSuitableSubSystem(host);
62
    	if (ss!=null) 
62
    	if (ss!=null) 
63
    	{
63
    	{
64
    		return ss.getConnectorService();
64
    		return ss.getConnectorService();
(-)META-INF/MANIFEST.MF (-2 / +1 lines)
Lines 10-17 Link Here
10
 org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)",
10
 org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)",
11
 org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
11
 org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
12
 org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
12
 org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
13
 org.eclipse.rse.subsystems.processes.core;bundle-version="[3.0.0,4.0.0)",
13
 org.eclipse.rse.subsystems.processes.core;bundle-version="[3.0.0,4.0.0)"
14
 org.eclipse.rse.subsystems.shells.core;bundle-version="[3.0.0,4.0.0)"
15
Bundle-ActivationPolicy: lazy
14
Bundle-ActivationPolicy: lazy
16
Eclipse-LazyStart: true
15
Eclipse-LazyStart: true
17
Bundle-Vendor: %providerName
16
Bundle-Vendor: %providerName

Return to bug 239159