View | Details | Raw Unified | Return to bug 202866
Collapse All | Expand All

(-)UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionInputProvider.java (-7 / +17 lines)
Lines 13-18 Link Here
13
 * Contributors:
13
 * Contributors:
14
 * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
14
 * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
15
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
15
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
16
 * Martin Oberhuber (Wind River) - [202866] Fix exceptions in RSE browse dialog when SystemRegistry is not yet fully initialized
16
 ********************************************************************************/
17
 ********************************************************************************/
17
18
18
package org.eclipse.rse.internal.ui.view;
19
package org.eclipse.rse.internal.ui.view;
Lines 25-31 Link Here
25
26
26
public abstract class SystemResourceSelectionInputProvider extends SystemAbstractAPIProvider
27
public abstract class SystemResourceSelectionInputProvider extends SystemAbstractAPIProvider
27
{		
28
{		
28
	private IHost _connection;
29
	private IHost _connection = null;
29
	private boolean _onlyConnection = false;
30
	private boolean _onlyConnection = false;
30
	private boolean _allowNew = true;
31
	private boolean _allowNew = true;
31
	private IRSESystemType[] _systemTypes;
32
	private IRSESystemType[] _systemTypes;
Lines 41-48 Link Here
41
		// choose random host
42
		// choose random host
42
		ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
43
		ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
43
		IHost[] hosts = registry.getHosts();
44
		IHost[] hosts = registry.getHosts();
44
		if (hosts != null)
45
		if (hosts != null && hosts.length>0) {
45
			_connection = hosts[0];
46
			_connection = hosts[0];
47
		}
46
	}
48
	}
47
	
49
	
48
	public IHost getSystemConnection()
50
	public IHost getSystemConnection()
Lines 86-93 Link Here
86
		if (_connection == null)
88
		if (_connection == null)
87
		{
89
		{
88
			ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
90
			ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
89
			_connection = registry.getHosts()[0];
91
			IHost[] hosts = registry.getHosts();
90
			
92
			if (hosts!=null && hosts.length!=0) {
93
				_connection = registry.getHosts()[0];
94
			}
91
		}
95
		}
92
		return getConnectionChildren(_connection);
96
		return getConnectionChildren(_connection);
93
	}
97
	}
Lines 101-116 Link Here
101
	{
105
	{
102
		if (selectedConnection != null)
106
		if (selectedConnection != null)
103
		{
107
		{
104
			return getSubSystem(selectedConnection).getChildren();
108
			ISubSystem ss = getSubSystem(selectedConnection);
109
			if (ss!=null) {
110
				return ss.getChildren();
111
			}
105
		}
112
		}
106
		return null;
113
		return new Object[0];
107
	}
114
	}
108
115
109
	public boolean hasConnectionChildren(IHost selectedConnection)
116
	public boolean hasConnectionChildren(IHost selectedConnection)
110
	{
117
	{
111
		if (selectedConnection != null)
118
		if (selectedConnection != null)
112
		{
119
		{
113
			return getSubSystem(selectedConnection).hasChildren();
120
			ISubSystem ss = getSubSystem(selectedConnection);
121
			if (ss!=null) {
122
				return ss.hasChildren();
123
			}
114
		}
124
		}
115
		return false;
125
		return false;
116
	}
126
	}
(-)UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionForm.java (-1 / +2 lines)
Lines 15-20 Link Here
15
 * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
15
 * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
16
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
16
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
17
 * Martin Oberhuber (Wind River) - [190442] made SystemActionViewerFilter API
17
 * Martin Oberhuber (Wind River) - [190442] made SystemActionViewerFilter API
18
 * Martin Oberhuber (Wind River) - [202866] Fix exceptions in RSE browse dialog when SystemRegistry is not yet fully initialized
18
 ********************************************************************************/
19
 ********************************************************************************/
19
20
20
package org.eclipse.rse.internal.ui.view;
21
package org.eclipse.rse.internal.ui.view;
Lines 128-134 Link Here
128
    }
129
    }
129
    /**
130
    /**
130
     * Return all selected objects. 
131
     * Return all selected objects. 
131
     * @see #setMultipleSelectionMode(boolean)
132
     */	
132
     */	
133
    public Object[] getSelectedObjects()
133
    public Object[] getSelectedObjects()
134
    {
134
    {
Lines 199-204 Link Here
199
					   connectionChanged(connection);
199
					   connectionChanged(connection);
200
				   }}
200
				   }}
201
					);	
201
					);	
202
			_connectionCombo.listenToConnectionEvents(true);
202
		}
203
		}
203
		
204
		
204
		_pathText = SystemWidgetHelpers.createReadonlyTextField(composite_prompts);
205
		_pathText = SystemWidgetHelpers.createReadonlyTextField(composite_prompts);

Return to bug 202866