### Eclipse Workspace Patch 1.0
#P org.eclipse.rse.ui
Index: UI/org/eclipse/rse/ui/view/SystemResourceSelectionInputProvider.java
===================================================================
RCS file: UI/org/eclipse/rse/ui/view/SystemResourceSelectionInputProvider.java
diff -N UI/org/eclipse/rse/ui/view/SystemResourceSelectionInputProvider.java
--- UI/org/eclipse/rse/ui/view/SystemResourceSelectionInputProvider.java 5 Apr 2008 17:47:20 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,143 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * 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
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-
-public abstract class SystemResourceSelectionInputProvider extends SystemAbstractAPIProvider
-{
- private IHost _connection = null;
- private boolean _onlyConnection = false;
- private boolean _allowNew = true;
- private IRSESystemType[] _systemTypes;
- private String _category = null;
-
- public SystemResourceSelectionInputProvider(IHost connection)
- {
- _connection = connection;
- }
-
- public SystemResourceSelectionInputProvider()
- {
- // choose random host
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- IHost[] hosts = registry.getHosts();
- if (hosts != null && hosts.length>0) {
- _connection = hosts[0];
- }
- }
-
- public IHost getSystemConnection()
- {
- return _connection;
- }
-
- public boolean allowMultipleConnections()
- {
- return !_onlyConnection;
- }
-
- public void setAllowNewConnection(boolean flag)
- {
- _allowNew = flag;
- }
-
- public boolean allowNewConnection()
- {
- return _allowNew;
- }
-
- public void setSystemConnection(IHost connection, boolean onlyConnection)
- {
- _connection = connection;
- _onlyConnection = onlyConnection;
- }
-
- public IRSESystemType[] getSystemTypes()
- {
- return _systemTypes;
- }
-
- public void setSystemTypes(IRSESystemType[] types)
- {
- _systemTypes = types;
- }
-
- public Object[] getSystemViewRoots()
- {
- if (_connection == null)
- {
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- IHost[] hosts = registry.getHosts();
- if (hosts!=null && hosts.length!=0) {
- _connection = registry.getHosts()[0];
- }
- }
- return getConnectionChildren(_connection);
- }
-
- public boolean hasSystemViewRoots()
- {
- return false;
- }
-
- public Object[] getConnectionChildren(IHost selectedConnection)
- {
- if (selectedConnection != null)
- {
- ISubSystem ss = getSubSystem(selectedConnection);
- if (ss!=null) {
- return ss.getChildren();
- }
- }
- return new Object[0];
- }
-
- public boolean hasConnectionChildren(IHost selectedConnection)
- {
- if (selectedConnection != null)
- {
- ISubSystem ss = getSubSystem(selectedConnection);
- if (ss!=null) {
- return ss.hasChildren();
- }
- }
- return false;
- }
-
- protected abstract ISubSystem getSubSystem(IHost selectedConnection);
-
-
- public void setCategory(String category)
- {
- _category = category;
- }
-
- public String getCategory()
- {
- return _category;
- }
-
-
-}
\ No newline at end of file
Index: UI/org/eclipse/rse/ui/view/ISystemSelectRemoteObjectAPIProvider.java
===================================================================
RCS file: UI/org/eclipse/rse/ui/view/ISystemSelectRemoteObjectAPIProvider.java
diff -N UI/org/eclipse/rse/ui/view/ISystemSelectRemoteObjectAPIProvider.java
--- UI/org/eclipse/rse/ui/view/ISystemSelectRemoteObjectAPIProvider.java 5 Apr 2008 17:47:20 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,98 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- ********************************************************************************/
-package org.eclipse.rse.ui.view;
-
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemViewInputProvider;
-
-public interface ISystemSelectRemoteObjectAPIProvider
- extends ISystemViewInputProvider
-{
- /**
- * This method is called by the connection adapter when the user expands
- * a connection. This method must return the child objects to show for that
- * connection.
- */
- public Object[] getConnectionChildren(IHost selectedConnection);
-
- /**
- * Get the name of the item to select when the first filter is expanded.
- * Called by the filter adapter.
- */
- public String getPreSelectFilterChild();
-
- /**
- * Get the actual object of the item to select when the first filter is expanded.
- * Called by the GUI form after expansion, so it can select this object
- */
- public Object getPreSelectFilterChildObject();
-
- /**
- * Set the filter string to use to resolve the inputs.
- * If this is an absolute filter string, it gets turned into a quick filter string,
- * so that the user sees it and can expand it. If it is a relative filter string
- * to apply to all expansions, it is used to decorate all filtering as the user drills down.
- */
- public void setFilterString(String string);
-
- /**
- * Set actual child object of the first filter to preselect. Called
- * by the filter adapter once the children are resolved and a match on
- * the name is found.
- */
- public void setPreSelectFilterChildObject(Object obj);
-
- /**
- * Set child of the first filter to preselect
- */
- public void setPreSelectFilterChild(String name);
-
- /**
- * Set the quick filters to be exposed to the user. These will be shown to the
- * user when they expand a connection.
- * @see org.eclipse.rse.core.filters.SystemFilterSimple
- */
- public void setQuickFilters(ISystemFilter[] filters);
-
-
- /**
- * Specify whether the user should see the "New Connection..." special connection prompt
- */
- public void setShowNewConnectionPrompt(boolean show);
-
-
- /**
- * Default or Restrict to a specific connection.
- * If default mode, it is preselected.
- * If only mode, it is the only connection listed.
- * @param connection The connection to default or restrict to
- * @param onlyMode true if this is to be the only connection shown in the list
- */
- public void setSystemConnection(IHost connection, boolean onlyMode);
-
-
- /**
- * Specify system types to restrict what types of connections
- * the user can create, and see.
- * This will override subsystemConfigurationId,if that has been set!
- *
- * @param systemTypes An array of system types, or
- * null
to allow all registered valid system types.
- * A system type is valid if at least one subsystem configuration
- * is registered against it.
- */
- public void setSystemTypes(IRSESystemType[] systemTypes);
-}
Index: UI/org/eclipse/rse/internal/ui/view/SystemSelectRemoteObjectAPIProviderImpl.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemSelectRemoteObjectAPIProviderImpl.java,v
retrieving revision 1.14
diff -u -r1.14 SystemSelectRemoteObjectAPIProviderImpl.java
--- UI/org/eclipse/rse/internal/ui/view/SystemSelectRemoteObjectAPIProviderImpl.java 5 Apr 2008 17:47:19 -0000 1.14
+++ UI/org/eclipse/rse/internal/ui/view/SystemSelectRemoteObjectAPIProviderImpl.java 7 Apr 2008 16:36:40 -0000
@@ -35,7 +35,6 @@
import org.eclipse.rse.ui.SystemBasePlugin;
import org.eclipse.rse.ui.internal.model.SystemNewConnectionPromptObject;
import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemSelectRemoteObjectAPIProvider;
import org.eclipse.rse.ui.view.ISystemSelectRemoteObjectAPIProviderCaller;
import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
import org.eclipse.rse.ui.view.SystemAbstractAPIProvider;
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.11
diff -u -r1.11 SystemResourceSelectionForm.java
--- UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionForm.java 5 Apr 2008 17:47:19 -0000 1.11
+++ UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionForm.java 7 Apr 2008 16:36:39 -0000
@@ -44,10 +44,10 @@
import org.eclipse.rse.ui.messages.ISystemMessageLine;
import org.eclipse.rse.ui.validators.IValidatorRemoteSelection;
import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
+import org.eclipse.rse.ui.view.ISystemResourceSelectionInputProvider;
import org.eclipse.rse.ui.view.ISystemTree;
import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-import org.eclipse.rse.ui.view.SystemResourceSelectionInputProvider;
import org.eclipse.rse.ui.widgets.SystemHostCombo;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
@@ -67,8 +67,8 @@
private Shell _shell;
private boolean _multipleSelection = true;
protected static final int PROMPT_WIDTH = 400; // The maximum width of the dialog's prompt, in pixels.
-
- private SystemResourceSelectionInputProvider _inputProvider;
+
+ private ISystemResourceSelectionInputProvider _inputProvider;
private SystemHostCombo _connectionCombo;
private SystemViewForm _systemViewForm;
private Composite _propertySheetContainer;
@@ -98,7 +98,8 @@
public SystemResourceSelectionForm(Shell shell, Composite parent, Object caller,
- SystemResourceSelectionInputProvider inputProvider, String verbiage,
+ ISystemResourceSelectionInputProvider inputProvider,
+ String verbiage,
boolean multipleSelection,
ISystemMessageLine msgLine)
{
Index: UI/org/eclipse/rse/ui/dialogs/SystemRemoteResourceDialog.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRemoteResourceDialog.java,v
retrieving revision 1.15
diff -u -r1.15 SystemRemoteResourceDialog.java
--- UI/org/eclipse/rse/ui/dialogs/SystemRemoteResourceDialog.java 5 Apr 2008 17:47:24 -0000 1.15
+++ UI/org/eclipse/rse/ui/dialogs/SystemRemoteResourceDialog.java 7 Apr 2008 16:36:40 -0000
@@ -27,8 +27,8 @@
import org.eclipse.rse.ui.SystemActionViewerFilter;
import org.eclipse.rse.ui.messages.ISystemMessageLine;
import org.eclipse.rse.ui.validators.IValidatorRemoteSelection;
+import org.eclipse.rse.ui.view.ISystemResourceSelectionInputProvider;
import org.eclipse.rse.ui.view.ISystemTree;
-import org.eclipse.rse.ui.view.SystemResourceSelectionInputProvider;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
@@ -37,7 +37,7 @@
public abstract class SystemRemoteResourceDialog extends SystemPromptDialog
{
private SystemResourceSelectionForm _form;
- private SystemResourceSelectionInputProvider _inputProvider;
+ private ISystemResourceSelectionInputProvider _inputProvider;
private Object _preSelection;
private IValidatorRemoteSelection _selectionValidator;
private boolean _multipleSelectionMode;
@@ -47,7 +47,8 @@
private String _message, _tip;
- public SystemRemoteResourceDialog(Shell shell, String title, SystemResourceSelectionInputProvider inputProvider)
+ public SystemRemoteResourceDialog(Shell shell, String title,
+ ISystemResourceSelectionInputProvider inputProvider)
{
super(shell, title);
_inputProvider = inputProvider;
Index: UI/org/eclipse/rse/ui/view/ISystemResourceSelectionInputProvider.java
===================================================================
RCS file: UI/org/eclipse/rse/ui/view/ISystemResourceSelectionInputProvider.java
diff -N UI/org/eclipse/rse/ui/view/ISystemResourceSelectionInputProvider.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ UI/org/eclipse/rse/ui/view/ISystemResourceSelectionInputProvider.java 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,80 @@
+/********************************************************************************
+ * Copyright (c) 2008 IBM Corporation. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Initial Contributors:
+ * The following IBM employees contributed to the Remote System Explorer
+ * component that contains this file: David McKnight.
+ *
+ * Contributors:
+ * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
+ ********************************************************************************/
+package org.eclipse.rse.ui.view;
+
+import org.eclipse.rse.core.IRSESystemType;
+import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.core.model.ISystemViewInputProvider;
+
+/**
+ * Public interface for the system resource selection input provider
+ * that is used in the SystemRemoteResourceDialog and the
+ * SystemResourceSelectionForm
+ *
+ */
+public interface ISystemResourceSelectionInputProvider
+ extends ISystemViewInputProvider
+{
+ /**
+ * Gets the associated system connection
+ * @return the system connection
+ */
+ public IHost getSystemConnection();
+
+ /**
+ * Indicates whether the input provider should allow new connections
+ * to be created.
+ * @param flag whether new connections should be allowed
+ */
+ public void setAllowNewConnection(boolean flag);
+
+ /**
+ * Returns whether multiple connections can be displayed via the
+ * input provider
+ * @return true if multiple connections are allowed
+ */
+ public boolean allowMultipleConnections();
+
+ /**
+ * Returns whether new connections can be created from the view
+ * using this input provider.
+ * @return true if new connections are allowed.
+ */
+ public boolean allowNewConnection();
+
+ /**
+ * Returns the category for the view using the input provider (i.e. "files")
+ * @return the category
+ */
+ public String getCategory();
+
+ /**
+ * Sets the system types allowed for this input provider
+ * @param types the types of systems
+ */
+ public void setSystemTypes(IRSESystemType[] types);
+
+ /**
+ * Gets the system types allowed for the associated control
+ * @return the system types
+ */
+ public IRSESystemType[] getSystemTypes();
+
+ /**
+ * Sets the associated system connection for the input provider
+ * @param connection the connection
+ * @param onlyConnection whether other connections are allowed
+ */
+ public void setSystemConnection(IHost connection, boolean onlyConnection);
+}
Index: UI/org/eclipse/rse/internal/ui/view/ISystemSelectRemoteObjectAPIProvider.java
===================================================================
RCS file: UI/org/eclipse/rse/internal/ui/view/ISystemSelectRemoteObjectAPIProvider.java
diff -N UI/org/eclipse/rse/internal/ui/view/ISystemSelectRemoteObjectAPIProvider.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ UI/org/eclipse/rse/internal/ui/view/ISystemSelectRemoteObjectAPIProvider.java 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,98 @@
+/********************************************************************************
+ * Copyright (c) 2008 IBM Corporation. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Initial Contributors:
+ * The following IBM employees contributed to the Remote System Explorer
+ * component that contains this file: David McKnight.
+ *
+ * Contributors:
+ * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
+ ********************************************************************************/
+package org.eclipse.rse.internal.ui.view;
+
+import org.eclipse.rse.core.IRSESystemType;
+import org.eclipse.rse.core.filters.ISystemFilter;
+import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.core.model.ISystemViewInputProvider;
+
+public interface ISystemSelectRemoteObjectAPIProvider
+ extends ISystemViewInputProvider
+{
+ /**
+ * This method is called by the connection adapter when the user expands
+ * a connection. This method must return the child objects to show for that
+ * connection.
+ */
+ public Object[] getConnectionChildren(IHost selectedConnection);
+
+ /**
+ * Get the name of the item to select when the first filter is expanded.
+ * Called by the filter adapter.
+ */
+ public String getPreSelectFilterChild();
+
+ /**
+ * Get the actual object of the item to select when the first filter is expanded.
+ * Called by the GUI form after expansion, so it can select this object
+ */
+ public Object getPreSelectFilterChildObject();
+
+ /**
+ * Set the filter string to use to resolve the inputs.
+ * If this is an absolute filter string, it gets turned into a quick filter string,
+ * so that the user sees it and can expand it. If it is a relative filter string
+ * to apply to all expansions, it is used to decorate all filtering as the user drills down.
+ */
+ public void setFilterString(String string);
+
+ /**
+ * Set actual child object of the first filter to preselect. Called
+ * by the filter adapter once the children are resolved and a match on
+ * the name is found.
+ */
+ public void setPreSelectFilterChildObject(Object obj);
+
+ /**
+ * Set child of the first filter to preselect
+ */
+ public void setPreSelectFilterChild(String name);
+
+ /**
+ * Set the quick filters to be exposed to the user. These will be shown to the
+ * user when they expand a connection.
+ * @see org.eclipse.rse.core.filters.SystemFilterSimple
+ */
+ public void setQuickFilters(ISystemFilter[] filters);
+
+
+ /**
+ * Specify whether the user should see the "New Connection..." special connection prompt
+ */
+ public void setShowNewConnectionPrompt(boolean show);
+
+
+ /**
+ * Default or Restrict to a specific connection.
+ * If default mode, it is preselected.
+ * If only mode, it is the only connection listed.
+ * @param connection The connection to default or restrict to
+ * @param onlyMode true if this is to be the only connection shown in the list
+ */
+ public void setSystemConnection(IHost connection, boolean onlyMode);
+
+
+ /**
+ * Specify system types to restrict what types of connections
+ * the user can create, and see.
+ * This will override subsystemConfigurationId,if that has been set!
+ *
+ * @param systemTypes An array of system types, or
+ * null
to allow all registered valid system types.
+ * A system type is valid if at least one subsystem configuration
+ * is registered against it.
+ */
+ public void setSystemTypes(IRSESystemType[] systemTypes);
+}
Index: UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionInputProvider.java
===================================================================
RCS file: UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionInputProvider.java
diff -N UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionInputProvider.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionInputProvider.java 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,146 @@
+/********************************************************************************
+ * Copyright (c) 2004, 2008 IBM Corporation and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Initial Contributors:
+ * The following IBM employees contributed to the Remote System Explorer
+ * component that contains this file: David McKnight, Kushal Munir,
+ * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
+ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
+ *
+ * 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
+ * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
+ ********************************************************************************/
+
+package org.eclipse.rse.internal.ui.view;
+import org.eclipse.rse.core.IRSESystemType;
+import org.eclipse.rse.core.RSECorePlugin;
+import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.core.model.ISystemRegistry;
+import org.eclipse.rse.core.subsystems.ISubSystem;
+import org.eclipse.rse.ui.view.ISystemResourceSelectionInputProvider;
+import org.eclipse.rse.ui.view.SystemAbstractAPIProvider;
+
+
+public abstract class SystemResourceSelectionInputProvider extends SystemAbstractAPIProvider
+ implements ISystemResourceSelectionInputProvider
+{
+ private IHost _connection = null;
+ private boolean _onlyConnection = false;
+ private boolean _allowNew = true;
+ private IRSESystemType[] _systemTypes;
+ private String _category = null;
+
+ public SystemResourceSelectionInputProvider(IHost connection)
+ {
+ _connection = connection;
+ }
+
+ public SystemResourceSelectionInputProvider()
+ {
+ // choose random host
+ ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
+ IHost[] hosts = registry.getHosts();
+ if (hosts != null && hosts.length>0) {
+ _connection = hosts[0];
+ }
+ }
+
+ public IHost getSystemConnection()
+ {
+ return _connection;
+ }
+
+ public boolean allowMultipleConnections()
+ {
+ return !_onlyConnection;
+ }
+
+ public void setAllowNewConnection(boolean flag)
+ {
+ _allowNew = flag;
+ }
+
+ public boolean allowNewConnection()
+ {
+ return _allowNew;
+ }
+
+ public void setSystemConnection(IHost connection, boolean onlyConnection)
+ {
+ _connection = connection;
+ _onlyConnection = onlyConnection;
+ }
+
+ public IRSESystemType[] getSystemTypes()
+ {
+ return _systemTypes;
+ }
+
+ public void setSystemTypes(IRSESystemType[] types)
+ {
+ _systemTypes = types;
+ }
+
+ public Object[] getSystemViewRoots()
+ {
+ if (_connection == null)
+ {
+ ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
+ IHost[] hosts = registry.getHosts();
+ if (hosts!=null && hosts.length!=0) {
+ _connection = registry.getHosts()[0];
+ }
+ }
+ return getConnectionChildren(_connection);
+ }
+
+ public boolean hasSystemViewRoots()
+ {
+ return false;
+ }
+
+ public Object[] getConnectionChildren(IHost selectedConnection)
+ {
+ if (selectedConnection != null)
+ {
+ ISubSystem ss = getSubSystem(selectedConnection);
+ if (ss!=null) {
+ return ss.getChildren();
+ }
+ }
+ return new Object[0];
+ }
+
+ public boolean hasConnectionChildren(IHost selectedConnection)
+ {
+ if (selectedConnection != null)
+ {
+ ISubSystem ss = getSubSystem(selectedConnection);
+ if (ss!=null) {
+ return ss.hasChildren();
+ }
+ }
+ return false;
+ }
+
+ protected abstract ISubSystem getSubSystem(IHost selectedConnection);
+
+
+ public void setCategory(String category)
+ {
+ _category = category;
+ }
+
+ public String getCategory()
+ {
+ return _category;
+ }
+
+
+}
#P org.eclipse.rse.files.ui
Index: src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFileOrFolderForm.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFileOrFolderForm.java,v
retrieving revision 1.20
diff -u -r1.20 SystemSelectRemoteFileOrFolderForm.java
--- src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFileOrFolderForm.java 5 Apr 2008 17:47:35 -0000 1.20
+++ src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFileOrFolderForm.java 7 Apr 2008 16:36:41 -0000
@@ -38,6 +38,7 @@
import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.files.ui.ISystemAddFileListener;
import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
+import org.eclipse.rse.internal.ui.view.ISystemSelectRemoteObjectAPIProvider;
import org.eclipse.rse.internal.ui.view.SystemPropertySheetForm;
import org.eclipse.rse.internal.ui.view.SystemSelectRemoteObjectAPIProviderImpl;
import org.eclipse.rse.internal.ui.view.SystemViewForm;
@@ -55,7 +56,6 @@
import org.eclipse.rse.ui.messages.ISystemMessageLine;
import org.eclipse.rse.ui.validators.IValidatorRemoteSelection;
import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemSelectRemoteObjectAPIProvider;
import org.eclipse.rse.ui.view.ISystemTree;
import org.eclipse.rse.ui.view.SystemAdapterHelpers;
import org.eclipse.swt.SWT;
@@ -198,7 +198,7 @@
* Returns the input provider that drives the contents of the tree
* Subclasses can override to provide custom tree contents
*/
- protected ISystemSelectRemoteObjectAPIProvider getInputProvider()
+ private ISystemSelectRemoteObjectAPIProvider getInputProvider()
{
if (inputProvider == null)
{
Index: src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileSelectionInputProvider.java
===================================================================
RCS file: src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileSelectionInputProvider.java
diff -N src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileSelectionInputProvider.java
--- src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileSelectionInputProvider.java 5 Apr 2008 17:47:35 -0000 1.7
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.files.ui.dialogs;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
-import org.eclipse.rse.ui.view.SystemResourceSelectionInputProvider;
-
-
-public class SystemRemoteFileSelectionInputProvider extends
- SystemResourceSelectionInputProvider
-{
-
- public SystemRemoteFileSelectionInputProvider(IHost connection)
- {
- super(connection);
- setCategory("files"); //$NON-NLS-1$
- }
-
- public SystemRemoteFileSelectionInputProvider()
- {
- super();
- setCategory("files"); //$NON-NLS-1$
- }
-
- protected ISubSystem getSubSystem(IHost selectedConnection)
- {
- return RemoteFileUtility.getFileSubSystem(selectedConnection);
- }
-
-}
Index: src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileDialog.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileDialog.java,v
retrieving revision 1.9
diff -u -r1.9 SystemRemoteFileDialog.java
--- src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileDialog.java 5 Apr 2008 17:47:35 -0000 1.9
+++ src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileDialog.java 7 Apr 2008 16:36:41 -0000
@@ -23,6 +23,7 @@
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.internal.files.ui.view.SystemRemoteFileSelectionInputProvider;
import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
import org.eclipse.rse.ui.SystemActionViewerFilter;
import org.eclipse.rse.ui.dialogs.SystemRemoteResourceDialog;
Index: src/org/eclipse/rse/internal/files/ui/search/SystemSearchRemoteFolderForm.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchRemoteFolderForm.java,v
retrieving revision 1.2
diff -u -r1.2 SystemSearchRemoteFolderForm.java
--- src/org/eclipse/rse/internal/files/ui/search/SystemSearchRemoteFolderForm.java 5 Apr 2008 17:47:34 -0000 1.2
+++ src/org/eclipse/rse/internal/files/ui/search/SystemSearchRemoteFolderForm.java 7 Apr 2008 16:36:41 -0000
@@ -11,9 +11,9 @@
package org.eclipse.rse.internal.files.ui.search;
import org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm;
+import org.eclipse.rse.internal.ui.view.ISystemSelectRemoteObjectAPIProvider;
import org.eclipse.rse.subsystems.files.core.model.ISystemFileRemoteTypes;
import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.view.ISystemSelectRemoteObjectAPIProvider;
/**
* The selection form to use is search selection dialogs.
Index: src/org/eclipse/rse/internal/files/ui/view/SystemRemoteFileSelectionInputProvider.java
===================================================================
RCS file: src/org/eclipse/rse/internal/files/ui/view/SystemRemoteFileSelectionInputProvider.java
diff -N src/org/eclipse/rse/internal/files/ui/view/SystemRemoteFileSelectionInputProvider.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ src/org/eclipse/rse/internal/files/ui/view/SystemRemoteFileSelectionInputProvider.java 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Initial Contributors:
+ * The following IBM employees contributed to the Remote System Explorer
+ * component that contains this file: David McKnight, Kushal Munir,
+ * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
+ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
+ *
+ * Contributors:
+ * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
+ *******************************************************************************/
+
+package org.eclipse.rse.internal.files.ui.view;
+
+import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.core.subsystems.ISubSystem;
+import org.eclipse.rse.internal.ui.view.SystemResourceSelectionInputProvider;
+import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
+
+
+public class SystemRemoteFileSelectionInputProvider extends
+ SystemResourceSelectionInputProvider
+{
+
+ public SystemRemoteFileSelectionInputProvider(IHost connection)
+ {
+ super(connection);
+ setCategory("files"); //$NON-NLS-1$
+ }
+
+ public SystemRemoteFileSelectionInputProvider()
+ {
+ super();
+ setCategory("files"); //$NON-NLS-1$
+ }
+
+ protected ISubSystem getSubSystem(IHost selectedConnection)
+ {
+ return RemoteFileUtility.getFileSubSystem(selectedConnection);
+ }
+
+}