### Eclipse Workspace Patch 1.0 #P org.eclipse.rse.ui Index: UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionInputProvider.java =================================================================== RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionInputProvider.java,v retrieving revision 1.4 diff -u -r1.4 SystemResourceSelectionInputProvider.java --- UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionInputProvider.java 14 May 2007 13:04:52 -0000 1.4 +++ UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionInputProvider.java 11 Sep 2007 14:53:12 -0000 @@ -13,6 +13,7 @@ * Contributors: * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry + * Martin Oberhuber (Wind River) - [202866] Fix exceptions in RSE browse dialog when SystemRegistry is not yet fully initialized ********************************************************************************/ package org.eclipse.rse.internal.ui.view; @@ -25,7 +26,7 @@ public abstract class SystemResourceSelectionInputProvider extends SystemAbstractAPIProvider { - private IHost _connection; + private IHost _connection = null; private boolean _onlyConnection = false; private boolean _allowNew = true; private IRSESystemType[] _systemTypes; @@ -41,8 +42,9 @@ // choose random host ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry(); IHost[] hosts = registry.getHosts(); - if (hosts != null) + if (hosts != null && hosts.length>0) { _connection = hosts[0]; + } } public IHost getSystemConnection() @@ -86,8 +88,10 @@ if (_connection == null) { ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry(); - _connection = registry.getHosts()[0]; - + IHost[] hosts = registry.getHosts(); + if (hosts!=null && hosts.length!=0) { + _connection = registry.getHosts()[0]; + } } return getConnectionChildren(_connection); } @@ -101,16 +105,22 @@ { if (selectedConnection != null) { - return getSubSystem(selectedConnection).getChildren(); + ISubSystem ss = getSubSystem(selectedConnection); + if (ss!=null) { + return ss.getChildren(); + } } - return null; + return new Object[0]; } public boolean hasConnectionChildren(IHost selectedConnection) { if (selectedConnection != null) { - return getSubSystem(selectedConnection).hasChildren(); + ISubSystem ss = getSubSystem(selectedConnection); + if (ss!=null) { + return ss.hasChildren(); + } } return false; } Index: UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionForm.java =================================================================== RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionForm.java,v retrieving revision 1.9 diff -u -r1.9 SystemResourceSelectionForm.java --- UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionForm.java 1 Jun 2007 11:56:37 -0000 1.9 +++ UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionForm.java 11 Sep 2007 14:53:12 -0000 @@ -15,6 +15,7 @@ * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry * Martin Oberhuber (Wind River) - [190442] made SystemActionViewerFilter API + * Martin Oberhuber (Wind River) - [202866] Fix exceptions in RSE browse dialog when SystemRegistry is not yet fully initialized ********************************************************************************/ package org.eclipse.rse.internal.ui.view; @@ -128,7 +129,6 @@ } /** * Return all selected objects. - * @see #setMultipleSelectionMode(boolean) */ public Object[] getSelectedObjects() { @@ -199,6 +199,7 @@ connectionChanged(connection); }} ); + _connectionCombo.listenToConnectionEvents(true); } _pathText = SystemWidgetHelpers.createReadonlyTextField(composite_prompts);