### Eclipse Workspace Patch 1.0
#P org.eclipse.rse.examples.tutorial
Index: plugin.xml
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/examples/org.eclipse.rse.examples.tutorial/plugin.xml,v
retrieving revision 1.11
diff -u -r1.11 plugin.xml
--- plugin.xml 12 May 2007 01:39:44 -0000 1.11
+++ plugin.xml 3 Apr 2008 23:04:21 -0000
@@ -36,6 +36,19 @@
id="actions.jar.show">
+
- * Designed to be as fast as possible by going directly to the SWT widgets - */ - public boolean sameParent() - { - return tree.sameParent(); - } - /** - * This is called to accurately get the parent object for the current selection - * for this viewer. - *
- * The getParent() method in the adapter is very unreliable... adapters can't be sure
- * of the context which can change via filtering and view options.
- */
- public Object getSelectedParent()
- {
- return tree.getSelectedParent();
- }
- /**
- * This returns the element immediately before the first selected element in this tree level.
- * Often needed for enablement decisions for move up actions.
- */
- public Object getPreviousElement()
- {
- return tree.getPreviousElement();
- }
- /**
- * This returns the element immediately after the last selected element in this tree level
- * Often needed for enablement decisions for move down actions.
- */
- public Object getNextElement()
- {
- return tree.getNextElement();
- }
-
- /**
- * This is called to walk the tree back up to the roots and return the visible root
- * node for the first selected object.
- */
- public Object getRootParent()
- {
- return tree.getRootParent();
- }
- /**
- * This returns an array containing each element in the tree, up to but not including the root.
- * The array is in reverse order, starting at the leaf and going up.
- */
- public Object[] getElementNodes(Object element)
- {
- return tree.getElementNodes(element);
- }
- /**
- * Helper method to determine if a given object is currently selected.
- * Does consider if a child node of the given object is currently selected.
- */
- public boolean isSelectedOrChildSelected(Object parentElement)
- {
- return tree.isSelectedOrChildSelected(parentElement);
- }
-
- /**
- * Return the number of immediate children in the tree, for the given tree node
- */
- public int getChildCount(Object element)
- {
- return tree.getChildCount(element);
- }
-
- /**
- * Called when a property is updated and we need to inform the Property Sheet viewer.
- * There is no formal mechanism for this so we simulate a selection changed event as
- * this is the only event the property sheet listens for.
- */
- public void updatePropertySheet()
- {
- tree.updatePropertySheet();
- }
-
- /**
- * Called to select an object within the tree, and optionally expand it
- */
- public void select(Object element, boolean expand)
- {
- tree.select(element, expand);
- }
-
- /**
- * Returns the tree item of the first selected object. Used for setViewerItem in a resource
- * change event.
- */
- public Item getViewerItem()
- {
- return tree.getViewerItem();
- }
-
- /**
- * Returns true if it is ok to close the dialog or wizard page. Returns false if there
- * is a remote request currently in progress.
- */
- public boolean okToClose()
- {
- return !requestInProgress; //d43433
- }
-
- // -----------------------
- // INTERNAL-USE METHODS...
- // -----------------------
- /**
- * Prepares this composite control and sets the default layout data.
- * @param Number of columns the new group will contain.
- */
- protected Composite prepareComposite(int numColumns,
- int horizontalSpan, int verticalSpan)
- {
- Composite composite = this;
- //GridLayout
- GridLayout layout = new GridLayout();
- layout.numColumns = numColumns;
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- layout.horizontalSpacing = 0;
- layout.verticalSpacing = 0;
- composite.setLayout(layout);
- //GridData
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.grabExcessVerticalSpace = true;
- data.widthHint = DEFAULT_WIDTH;
- data.heightHint = DEFAULT_HEIGHT;
- data.horizontalSpan = horizontalSpan;
- data.verticalSpan = verticalSpan;
- composite.setLayoutData(data);
- return composite;
- }
-
- protected void createSystemView(Shell shell, ISystemViewInputProvider inputProvider, boolean singleSelectionMode)
- {
- // TREE
- int style = (singleSelectionMode ? SWT.SINGLE : SWT.MULTI) | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER;
- tree = new SystemView(shell, this, style, deferLoading ? emptyProvider : inputProvider, msgLine, initViewerFilters);
- GridData treeData = new GridData();
- treeData.horizontalAlignment = GridData.FILL;
- treeData.verticalAlignment = GridData.FILL;
- treeData.grabExcessHorizontalSpace = true;
- treeData.grabExcessVerticalSpace = true;
- treeData.widthHint = 300;
- treeData.heightHint= 200;
- tree.getTree().setLayoutData(treeData);
- tree.setShowActions(showActions);
- }
-
- protected void addOurMouseListener()
- {
- MouseListener mouseListener = new MouseAdapter()
- {
- public void mouseDown(MouseEvent e)
- {
- //requestActivation();
- }
- };
- toolbar.addMouseListener(mouseListener);
- }
-
- /**
- * Fire long running request listener event
- */
- protected void fireRequestStartEvent()
- {
- if (requestListeners != null)
- {
- SystemLongRunningRequestEvent event = new SystemLongRunningRequestEvent();
- for (int idx=0; idx
- * Default is false
- */
- public void setShowPropertySheet(boolean show)
- {
- this.showPropertySheet = show;
- }
-
-
-
- /**
- * Specify a validator to use when the user selects a remote file or folder.
- * This allows you to decide if OK should be enabled or not for that remote file or folder.
- */
- public void setSelectionValidator(IValidatorRemoteSelection selectionValidator)
- {
- _selectionValidator = selectionValidator;
- }
-
- protected void clearErrorMessage()
- {
- if (_msgLine != null)
- _msgLine.clearErrorMessage();
- }
- protected void setErrorMessage(String msg)
- {
- if (_msgLine != null)
- if (msg != null)
- _msgLine.setErrorMessage(msg);
- else
- _msgLine.clearErrorMessage();
- }
- protected void setErrorMessage(SystemMessage msg)
- {
- if (_msgLine != null)
- if (msg != null)
- _msgLine.setErrorMessage(msg);
- else
- _msgLine.clearErrorMessage();
- }
-
-
- /**
- * Set the message shown as the text at the top of the form. Eg, "Select a file"
- */
- public void setMessage(String message)
- {
- this._verbiage = message;
- if (verbiageLabel != null)
- verbiageLabel.setText(message);
- }
- /**
- * Set the tooltip text for the remote systems tree from which an item is selected.
- */
- public void setSelectionTreeToolTipText(String tip)
- {
- _systemViewForm.setToolTipText(tip);
- }
-
-
-}
\ No newline at end of file
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.12
diff -u -r1.12 SystemSelectRemoteObjectAPIProviderImpl.java
--- UI/org/eclipse/rse/internal/ui/view/SystemSelectRemoteObjectAPIProviderImpl.java 5 Jun 2007 20:59:59 -0000 1.12
+++ UI/org/eclipse/rse/internal/ui/view/SystemSelectRemoteObjectAPIProviderImpl.java 3 Apr 2008 23:04:24 -0000
@@ -28,14 +28,15 @@
import org.eclipse.rse.core.filters.ISystemFilterStringReference;
import org.eclipse.rse.core.filters.SystemFilterSimple;
import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemViewInputProvider;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
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;
import org.eclipse.rse.ui.view.SystemAdapterHelpers;
import org.eclipse.swt.widgets.Shell;
@@ -52,8 +53,8 @@
*/
public class SystemSelectRemoteObjectAPIProviderImpl
extends SystemAbstractAPIProvider
- implements ISystemViewInputProvider
-{
+ implements ISystemSelectRemoteObjectAPIProvider
+ {
protected ISubSystem subsystem = null;
Index: UI/org/eclipse/rse/internal/ui/view/SystemTableViewColumnManager.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewColumnManager.java,v
retrieving revision 1.3
diff -u -r1.3 SystemTableViewColumnManager.java
--- UI/org/eclipse/rse/internal/ui/view/SystemTableViewColumnManager.java 3 Apr 2008 16:03:35 -0000 1.3
+++ UI/org/eclipse/rse/internal/ui/view/SystemTableViewColumnManager.java 3 Apr 2008 23:04:24 -0000
@@ -20,11 +20,12 @@
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.rse.ui.SystemPreferencesManager;
+import org.eclipse.rse.ui.view.ISystemTableViewColumnManager;
import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
import org.eclipse.ui.views.properties.IPropertyDescriptor;
-public class SystemTableViewColumnManager
+public class SystemTableViewColumnManager implements ISystemTableViewColumnManager
{
private Viewer _viewer;
protected HashMap _descriptorCache;
Index: UI/org/eclipse/rse/internal/ui/view/SystemViewDataDropAdapter.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDataDropAdapter.java,v
retrieving revision 1.4
diff -u -r1.4 SystemViewDataDropAdapter.java
--- UI/org/eclipse/rse/internal/ui/view/SystemViewDataDropAdapter.java 20 Aug 2007 14:16:48 -0000 1.4
+++ UI/org/eclipse/rse/internal/ui/view/SystemViewDataDropAdapter.java 3 Apr 2008 23:04:25 -0000
@@ -114,7 +114,7 @@
for (int i = 0;i < tokens.length; i++)
{
String srcStr = tokens[i];
- if (srcStr.equals("org.eclipse.ui.navigator.ProjectExplorer"))
+ if (srcStr.equals("org.eclipse.ui.navigator.ProjectExplorer")) //$NON-NLS-1$
{
return true;
}
Index: UI/org/eclipse/rse/internal/ui/view/SystemAbstractAPIProvider.java
===================================================================
RCS file: UI/org/eclipse/rse/internal/ui/view/SystemAbstractAPIProvider.java
diff -N UI/org/eclipse/rse/internal/ui/view/SystemAbstractAPIProvider.java
--- UI/org/eclipse/rse/internal/ui/view/SystemAbstractAPIProvider.java 21 Feb 2008 15:28:55 -0000 1.9
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,213 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 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) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Tobias Schwarz (Wind River) - [173267] "empty list" should not be displayed
- * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
- * Martin Oberhuber (Wind River) - [218524][api] Remove deprecated ISystemViewInputProvider#getShell()
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.ISystemMessageObject;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.model.ISystemViewInputProvider;
-import org.eclipse.rse.core.model.SystemMessageObject;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * This is a base class that a provider of root nodes to the remote systems tree viewer part can
- * use as a parent class.
- */
-public abstract class SystemAbstractAPIProvider
- implements ISystemViewInputProvider
-{
- protected Viewer viewer;
- protected ISystemRegistry sr;
-
- protected Object[] emptyList = new Object[0];
- protected Object[] msgList = new Object[1];
- /**
- * @deprecated Use {@link #checkForEmptyList(Object[], Object, boolean)} instead.
- */
- protected SystemMessageObject nullObject = null;
- protected SystemMessageObject canceledObject = null;
- protected SystemMessageObject errorObject = null;
-
- private Preferences fPrefStore = null;
-
- /**
- * Constructor
- */
- public SystemAbstractAPIProvider()
- {
- super();
- sr = RSECorePlugin.getTheSystemRegistry();
- }
-
- /**
- * This is the method required by the IAdaptable interface.
- * Given an adapter class type, return an object castable to the type, or
- * null if this is not possible.
- */
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#setViewer(java.lang.Object)
- */
- public void setViewer(Object viewer)
- {
- this.viewer = (Viewer)viewer;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#getViewer()
- */
- public Object getViewer()
- {
- return viewer;
- }
-
- protected final void initMsgObjects()
- {
- nullObject = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_EMPTY),ISystemMessageObject.MSGTYPE_EMPTY, null);
- canceledObject = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_LIST_CANCELED),ISystemMessageObject.MSGTYPE_CANCEL, null);
- errorObject = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_FAILED),ISystemMessageObject.MSGTYPE_ERROR, null);
- }
-
- /**
- * Callable by subclasses. Do not override
- * If you want to prompt the user for the parent filter pool to create this filter in,
- * but want to not use the term "pool" say, you can use an array of euphamisms. That is,
- * you can pass an array of objects that map to filter pools, but have a different
- * display name that is shown in the dropdown.
- *
- * Of course, if you want to do this, then you will likely want to offer a different
- * label and tooltip for the prompt, and different verbiage above the prompt. The
- * object this method accepts as a parameter encapsulates all that information, and
- * there is a default class you can use for this.
- */
- public void setAllowFilterPoolSelection(ISystemFilterPoolWrapperInformation poolWrappersToSelectFrom,
- ISystemValidator[] nameValidators)
- {
- this.poolWrapperInformation = poolWrappersToSelectFrom;
- this.nameValidators = nameValidators;
- if (parentPool == null)
- parentPool = poolWrappersToSelectFrom.getPreSelectWrapper().getSystemFilterPool();
- }
- /**
- * Set the validator to call when the user selects a filter pool. Optional.
- */
- public void setFilterPoolSelectionValidator(ISystemFilterPoolSelectionValidator validator)
- {
- filterPoolSelectionValidator = validator;
- //System.out.println("Inside setFilterPoolSelectionValidator. Non null? " + (validator != null));
- }
-
- // ---------------------------------
- // LIFECYCLE METHODS...
- // ---------------------------------
-
- /**
- * Populate the dialog area with our widgets. Return the composite they are in.
- */
- public Control createContents(Composite parent)
- {
-
- int nbrColumns = 2;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
-
- SystemWidgetHelpers.createVerbiage(composite_prompts, configurator.getPage2NameVerbiage(), nbrColumns, false, 200);
- nameText = SystemWidgetHelpers.createLabeledTextField(composite_prompts, null, configurator.getPage2NamePromptLabel(), configurator.getPage2NamePromptTooltip());
-
- addSeparatorLine(composite_prompts, nbrColumns);
- addFillerLine(composite_prompts, nbrColumns);
-
- // allow the user to create this filter uniquely for this connection, which means putting it in a
- // special filter pool we will create, just for this connection. This option is not shown if we are
- // already told which filter pool to create the filter in, such as in Show Filter Pools mode, when
- // the user selects New Filter to create a filter in the selected pool. We assume in this case the
- // will go in whatever filter is selected.
- if ((poolsToSelectFrom!=null) || (poolWrapperInformation!=null))
- {
- uniqueCB = SystemWidgetHelpers.createCheckBox(composite_prompts, nbrColumns, configurator.getPage2UniqueToConnectionLabel(), null);
- uniqueCB.setToolTipText(configurator.getPage2UniqueToConnectionToolTip());
- uniqueCB.addSelectionListener(this);
- uniqueCB.setSelection(true); // [160403] filters should be connection private by default
- }
-
- addFillerLine(composite_prompts, nbrColumns);
-
- if (poolsToSelectFrom != null)
- {
- poolVerbiage = SystemWidgetHelpers.createVerbiage(composite_prompts, configurator.getPage2PoolVerbiage(), nbrColumns, false, 200);
- poolVerbiage.setToolTipText(configurator.getPage2PoolVerbiageTip());
- poolCombo = SystemWidgetHelpers.createLabeledReadonlyCombo(composite_prompts, null, configurator.getPage2PoolPromptLabel(), configurator.getPage2PoolPromptTooltip());
- poolComboLabel = SystemWidgetHelpers.getLastLabel();
- String[] poolNames = new String[poolsToSelectFrom.length];
- int filterPoolSelectionIndex = 0;
- for (int idx=0; idx
- * Caller must supply the subsystem which owns this existing or potential filter string.
- *
- * This dialog contains a dropdown for selecting connections to use in the test. Only connections which
- * contain subsystems with the same parent factory as the given subsystem factory are shown.
- *
- */
-public class SystemTestFilterStringDialog
- extends SystemPromptDialog
- implements ISelectionChangedListener, SelectionListener
-{
- protected ISubSystem subsystem = null;
- protected ISystemRegistry sr = null;
- protected String subsystemConfigurationId = null;
- protected String filterString = null;
- protected SystemTestFilterStringAPIProviderImpl inputProvider = null;
- // GUI widgets
- protected Label prompt, promptValue;
- protected SystemViewForm tree;
- protected SystemHostCombo connectionCombo;
-
- /**
- * Constructor
- * @param shell The shell to hang the dialog off of
- * @param subsystem The contextual subsystem that owns this filter string
- * @param filterString The filter string that is to be tested.
- */
- public SystemTestFilterStringDialog(Shell shell, ISubSystem subsystem, String filterString)
- {
- this(shell, SystemResources.RESID_TESTFILTERSTRING_TITLE, subsystem, filterString);
- }
- /**
- * Constructor when unique title desired
- * @param shell The shell to hang the dialog off of
- * @param title The title to give the dialog
- * @param subsystem The contextual subsystem that owns this filter string
- * @param filterString The filter string that is to be tested.
- */
- public SystemTestFilterStringDialog(Shell shell, String title, ISubSystem subsystem, String filterString)
- {
- super(shell, title);
- setCancelButtonLabel(SystemResources.BUTTON_CLOSE);
- setShowOkButton(false);
- setBlockOnOpen(true); // always modal
- this.subsystem = subsystem;
- this.filterString = filterString;
- this.subsystemConfigurationId = subsystem.getSubSystemConfiguration().getId();
- sr = RSECorePlugin.getTheSystemRegistry();
- setNeedsProgressMonitor(true);
- //pack();
- }
-
- // ------------------
- // PUBLIC METHODS...
- // ------------------
- // ------------------
- // PRIVATE METHODS...
- // ------------------
- /**
- * Private method.
- * @see SystemPromptDialog#getInitialFocusControl()
- */
- protected Control getInitialFocusControl()
- {
- //return tree.getTreeControl();
- return connectionCombo.getCombo();
- }
-
- /**
- * Private method.
- * @see SystemPromptDialog#createInner(Composite)
- */
- protected Control createInner(Composite parent)
- {
- // Inner composite
- int gridColumns = 2;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, gridColumns);
-
- // connection selection combo
- connectionCombo = SystemWidgetHelpers.createConnectionCombo(composite_prompts, null, null, subsystem.getSubSystemConfiguration(),
- null, null, subsystem.getHost(), gridColumns, false);
-
- // filter string prompt
- // Composite promptComposite = composite_prompts;
- Composite promptComposite = connectionCombo;
- prompt = SystemWidgetHelpers.createLabel(promptComposite, SystemResources.RESID_TESTFILTERSTRING_PROMPT_LABEL, SystemResources.RESID_TESTFILTERSTRING_PROMPT_TOOLTIP);
- promptValue = SystemWidgetHelpers.createLabel(promptComposite, SystemResources.RESID_TESTFILTERSTRING_PROMPT_LABEL, SystemResources.RESID_TESTFILTERSTRING_PROMPT_TOOLTIP);
-
- promptValue.setToolTipText(filterString); // Since the dialog is not resizable, this is the way to show the whole string
-
- // Make sure the label width is not longer than the window width
- // Otherwise the combo box dropdown arrow above it will be pushed beyond the window and invisible
- //promptValue.setText(filterString);
-
- String label = filterString;
-
- if ( label.length() > 30)
- label = label.substring(0,30) + " ..."; // Use ... to show that not entire string is displayed //$NON-NLS-1$
- promptValue.setText( label);
-
- //Point point = promptValue.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- //GridData data = new GridData();
- //data.widthHint = point.x < 230 ? point.x : 230;
- GridData data = new GridData();
- data.widthHint = 200;
- promptValue.setLayoutData(data);
-
- // TREE
- inputProvider = new SystemTestFilterStringAPIProviderImpl(subsystem, filterString);
- tree = new SystemViewForm(getShell(), composite_prompts, SWT.NULL, inputProvider, false, getMessageLine(), gridColumns, 1);
-
- // add selection listeners
- //tree.addSelectionChangedListener(this);
- connectionCombo.addSelectionListener(this);
-
- return composite_prompts;
- }
-
- /**
- * Override of parent. Must pass selected object onto the form for initializing fields.
- * Called by SystemDialogAction's default run() method after dialog instantiated.
- */
- public void setInputObject(Object inputObject)
- {
- super.setInputObject(inputObject);
- }
-
- /**
- * When re-using this dialog between runs, call this to reset its contents.
- * Assumption: original input subsystem factory Id doesn't change between runs
- */
- public void reset(ISubSystem subsystem, String filterString)
- {
- this.subsystem = subsystem;
- this.filterString = filterString;
- //this.subsystemConfigurationId = subsystem.getParentSubSystemConfiguration().getId();
- inputProvider.setSubSystem(subsystem);
- inputProvider.setFilterString(filterString);
- tree.reset(inputProvider);
- }
-
- /**
- * ISelectionChangedListener interface method
- */
- public void selectionChanged(SelectionChangedEvent event)
- {
- }
- public void widgetDefaultSelected(SelectionEvent event)
- {
- }
- public void widgetSelected(SelectionEvent event)
- {
-
- //if (src == connectionCombo.getCombo())
- {
- //System.out.println("connection changed");
- IHost newConnection = connectionCombo.getHost();
- ISubSystem newSubSystem = null;
- ISubSystemConfiguration config = sr.getSubSystemConfiguration(subsystemConfigurationId);
- if (config!=null) {
- ISubSystem[] newSubSystems = config.getSubSystems(newConnection, true);
- if (newSubSystems != null && newSubSystems.length > 0) {
- newSubSystem = newSubSystems[0];
- subsystemConfigurationId = subsystem.getSubSystemConfiguration().getId();
- }
- }
- inputProvider.setSubSystem(newSubSystem);
- tree.reset(inputProvider);
- }
- }
-
-}
\ No newline at end of file
Index: UI/org/eclipse/rse/internal/ui/dialogs/SystemControlEnableState.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemControlEnableState.java,v
retrieving revision 1.2
diff -u -r1.2 SystemControlEnableState.java
--- UI/org/eclipse/rse/internal/ui/dialogs/SystemControlEnableState.java 5 Jun 2007 11:36:52 -0000 1.2
+++ UI/org/eclipse/rse/internal/ui/dialogs/SystemControlEnableState.java 3 Apr 2008 23:04:22 -0000
@@ -20,7 +20,7 @@
import java.util.List;
import org.eclipse.rse.internal.ui.view.SystemPropertySheetForm;
-import org.eclipse.rse.internal.ui.view.SystemViewForm;
+import org.eclipse.rse.ui.view.SystemViewForm;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
Index: UI/org/eclipse/rse/internal/ui/actions/SystemFilterWorkWithFilterPoolsAction.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterWorkWithFilterPoolsAction.java,v
retrieving revision 1.6
diff -u -r1.6 SystemFilterWorkWithFilterPoolsAction.java
--- UI/org/eclipse/rse/internal/ui/actions/SystemFilterWorkWithFilterPoolsAction.java 12 Feb 2008 23:06:32 -0000 1.6
+++ UI/org/eclipse/rse/internal/ui/actions/SystemFilterWorkWithFilterPoolsAction.java 3 Apr 2008 23:04:22 -0000
@@ -21,13 +21,13 @@
import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.filters.SystemFilterPoolDialogInterface;
import org.eclipse.rse.internal.ui.filters.SystemFilterPoolManagerUIProvider;
import org.eclipse.rse.internal.ui.filters.dialogs.SystemFilterWorkWithFilterPoolsDialog;
import org.eclipse.rse.ui.ISystemContextMenuConstants;
import org.eclipse.rse.ui.ISystemIconConstants;
import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
+import org.eclipse.rse.ui.filters.SystemFilterPoolDialogInterface;
import org.eclipse.rse.ui.filters.SystemFilterUIHelpers;
import org.eclipse.rse.ui.filters.actions.SystemFilterAbstractFilterPoolAction;
import org.eclipse.rse.ui.validators.ValidatorFilterPoolName;
Index: UI/org/eclipse/rse/internal/ui/actions/SystemFilterNewFilterPoolAction.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterNewFilterPoolAction.java,v
retrieving revision 1.4
diff -u -r1.4 SystemFilterNewFilterPoolAction.java
--- UI/org/eclipse/rse/internal/ui/actions/SystemFilterNewFilterPoolAction.java 5 Jun 2007 11:36:52 -0000 1.4
+++ UI/org/eclipse/rse/internal/ui/actions/SystemFilterNewFilterPoolAction.java 3 Apr 2008 23:04:22 -0000
@@ -22,17 +22,17 @@
import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.filters.SystemFilterPoolDialogOutputs;
import org.eclipse.rse.internal.ui.filters.dialogs.SystemFilterNewFilterPoolWizard;
import org.eclipse.rse.internal.ui.filters.dialogs.SystemFilterPoolWizardDialog;
-import org.eclipse.rse.internal.ui.filters.dialogs.SystemFilterPoolWizardInterface;
import org.eclipse.rse.internal.ui.filters.dialogs.SystemFilterWorkWithFilterPoolsDialog;
import org.eclipse.rse.ui.ISystemContextMenuConstants;
import org.eclipse.rse.ui.ISystemIconConstants;
import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.actions.ISystemWizardAction;
import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
+import org.eclipse.rse.ui.filters.SystemFilterPoolDialogOutputs;
import org.eclipse.rse.ui.filters.actions.SystemFilterAbstractFilterPoolWizardAction;
+import org.eclipse.rse.ui.filters.dialogs.SystemFilterPoolWizardInterface;
import org.eclipse.swt.widgets.Shell;
Index: UI/org/eclipse/rse/internal/ui/actions/SystemFilterSelectFilterPoolsAction.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterSelectFilterPoolsAction.java,v
retrieving revision 1.4
diff -u -r1.4 SystemFilterSelectFilterPoolsAction.java
--- UI/org/eclipse/rse/internal/ui/actions/SystemFilterSelectFilterPoolsAction.java 5 Jun 2007 11:36:52 -0000 1.4
+++ UI/org/eclipse/rse/internal/ui/actions/SystemFilterSelectFilterPoolsAction.java 3 Apr 2008 23:04:22 -0000
@@ -24,12 +24,12 @@
import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.filters.SystemFilterPoolDialogInterface;
import org.eclipse.rse.ui.ISystemContextMenuConstants;
import org.eclipse.rse.ui.ISystemIconConstants;
import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
import org.eclipse.rse.ui.dialogs.SystemSimpleSelectDialog;
+import org.eclipse.rse.ui.filters.SystemFilterPoolDialogInterface;
import org.eclipse.rse.ui.filters.SystemFilterUIHelpers;
import org.eclipse.rse.ui.filters.actions.SystemFilterAbstractFilterPoolAction;
import org.eclipse.swt.widgets.Shell;
Index: subsystems/org/eclipse/rse/core/subsystems/SubSystemConfiguration.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystemConfiguration.java,v
retrieving revision 1.72
diff -u -r1.72 SubSystemConfiguration.java
--- subsystems/org/eclipse/rse/core/subsystems/SubSystemConfiguration.java 19 Mar 2008 15:54:13 -0000 1.72
+++ subsystems/org/eclipse/rse/core/subsystems/SubSystemConfiguration.java 3 Apr 2008 23:04:31 -0000
@@ -58,6 +58,7 @@
import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
+import org.eclipse.rse.core.filters.ISystemFilterPoolWrapperInformation;
import org.eclipse.rse.core.filters.ISystemFilterString;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.model.ILabeledObject;
@@ -1414,7 +1415,7 @@
* Overridable entry for child classes to supply their own flavour of ISystemFilterPoolWrapperInformation for
* the new filter wizards.
*/
- protected SystemFilterPoolWrapperInformation getNewFilterWizardPoolWrapperInformation()
+ protected ISystemFilterPoolWrapperInformation getNewFilterWizardPoolWrapperInformation()
{
return new SystemFilterPoolWrapperInformation(SystemResources.RESID_NEWFILTER_PAGE2_PROFILE_LABEL, SystemResources.RESID_NEWFILTER_PAGE2_PROFILE_TOOLTIP,
SystemResources.RESID_NEWFILTER_PAGE2_PROFILE_VERBIAGE);
Index: UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPropertySetAdapter.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPropertySetAdapter.java,v
retrieving revision 1.1
diff -u -r1.1 SystemTeamViewPropertySetAdapter.java
--- UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPropertySetAdapter.java 28 Mar 2008 19:44:13 -0000 1.1
+++ UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPropertySetAdapter.java 3 Apr 2008 23:04:26 -0000
@@ -242,7 +242,7 @@
public String getMementoHandleKey(Object element)
{
SystemTeamViewPropertySetNode factory = (SystemTeamViewPropertySetNode)element;
- return factory.getLabel(); //$NON-NLS-1$
+ return factory.getLabel();
}
/**
Index: UI/org/eclipse/rse/ui/actions/SystemTestFilterStringAction.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemTestFilterStringAction.java,v
retrieving revision 1.4
diff -u -r1.4 SystemTestFilterStringAction.java
--- UI/org/eclipse/rse/ui/actions/SystemTestFilterStringAction.java 5 Jun 2007 11:36:56 -0000 1.4
+++ UI/org/eclipse/rse/ui/actions/SystemTestFilterStringAction.java 3 Apr 2008 23:04:27 -0000
@@ -19,7 +19,7 @@
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.dialogs.SystemTestFilterStringDialog;
+import org.eclipse.rse.ui.dialogs.SystemTestFilterStringDialog;
import org.eclipse.swt.widgets.Shell;
Index: UI/org/eclipse/rse/ui/actions/SystemBaseSubMenuAction.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseSubMenuAction.java,v
retrieving revision 1.7
diff -u -r1.7 SystemBaseSubMenuAction.java
--- UI/org/eclipse/rse/ui/actions/SystemBaseSubMenuAction.java 3 Apr 2008 17:53:57 -0000 1.7
+++ UI/org/eclipse/rse/ui/actions/SystemBaseSubMenuAction.java 3 Apr 2008 23:04:27 -0000
@@ -42,7 +42,7 @@
{
- protected SystemSubMenuManager subMenu = null;
+ private SystemSubMenuManager subMenu = null;
protected String actionLabel;
protected String menuID;
protected boolean createMenuEachTime = true;
Index: UI/org/eclipse/rse/ui/RSEUIPlugin.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java,v
retrieving revision 1.73
diff -u -r1.73 RSEUIPlugin.java
--- UI/org/eclipse/rse/ui/RSEUIPlugin.java 6 Mar 2008 12:30:18 -0000 1.73
+++ UI/org/eclipse/rse/ui/RSEUIPlugin.java 3 Apr 2008 23:04:27 -0000
@@ -57,13 +57,13 @@
import org.eclipse.rse.internal.ui.actions.SystemShowPreferencesPageAction;
import org.eclipse.rse.internal.ui.subsystems.SubSystemConfigurationProxyAdapterFactory;
import org.eclipse.rse.internal.ui.view.SubSystemConfigurationAdapterFactory;
-import org.eclipse.rse.internal.ui.view.SystemViewAdapterFactory;
import org.eclipse.rse.internal.ui.view.team.SystemTeamViewResourceAdapterFactory;
import org.eclipse.rse.persistence.IRSEPersistenceManager;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessageFile;
import org.eclipse.rse.ui.internal.model.SystemRegistryUI;
import org.eclipse.rse.ui.model.ISystemRegistryUI;
+import org.eclipse.rse.ui.view.SystemViewAdapterFactory;
import org.osgi.framework.BundleContext;
Index: UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorViewPart.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorViewPart.java,v
retrieving revision 1.9
diff -u -r1.9 SystemMonitorViewPart.java
--- UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorViewPart.java 18 Mar 2008 18:29:10 -0000 1.9
+++ UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorViewPart.java 3 Apr 2008 23:04:26 -0000
@@ -25,7 +25,7 @@
import java.util.ArrayList;
import java.util.Vector;
-
+
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IStatusLineManager;
@@ -49,7 +49,6 @@
import org.eclipse.rse.internal.ui.SystemPropertyResources;
import org.eclipse.rse.internal.ui.SystemResources;
import org.eclipse.rse.internal.ui.view.SystemTableTreeViewProvider;
-import org.eclipse.rse.internal.ui.view.SystemTableViewColumnManager;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.ui.ISystemIconConstants;
import org.eclipse.rse.ui.RSEUIPlugin;
@@ -58,6 +57,7 @@
import org.eclipse.rse.ui.messages.ISystemMessageLine;
import org.eclipse.rse.ui.model.ISystemShellProvider;
import org.eclipse.rse.ui.view.IRSEViewPart;
+import org.eclipse.rse.ui.view.ISystemTableViewColumnManager;
import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
import org.eclipse.rse.ui.view.SystemTableView;
import org.eclipse.swt.SWT;
@@ -311,7 +311,7 @@
class SelectColumnsDialog extends SystemPromptDialog
{
private ISystemViewElementAdapter _adapter;
- private SystemTableViewColumnManager _columnManager;
+ private ISystemTableViewColumnManager _columnManager;
private IPropertyDescriptor[] _uniqueDescriptors;
private ArrayList _currentDisplayedDescriptors;
private ArrayList _availableDescriptors;
@@ -325,7 +325,7 @@
private Button _downButton;
- public SelectColumnsDialog(Shell shell, ISystemViewElementAdapter viewAdapter, SystemTableViewColumnManager columnManager)
+ public SelectColumnsDialog(Shell shell, ISystemViewElementAdapter viewAdapter, ISystemTableViewColumnManager columnManager)
{
super(shell, SystemResources.RESID_TABLE_SELECT_COLUMNS_LABEL);
setToolTipText(SystemResources.RESID_TABLE_SELECT_COLUMNS_TOOLTIP);
@@ -600,7 +600,7 @@
public void run()
{
SystemTableView viewer = getViewer();
- SystemTableViewColumnManager mgr = viewer.getColumnManager();
+ ISystemTableViewColumnManager mgr = viewer.getColumnManager();
ISystemViewElementAdapter adapter = viewer.getAdapterForContents();
SelectColumnsDialog dlg = new SelectColumnsDialog(getShell(), adapter, mgr);
if (dlg.open() == Window.OK)
Index: UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizard.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizard.java,v
retrieving revision 1.14
diff -u -r1.14 SystemNewFilterWizard.java
--- UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizard.java 15 Mar 2008 00:54:49 -0000 1.14
+++ UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizard.java 3 Apr 2008 23:04:28 -0000
@@ -35,7 +35,6 @@
import org.eclipse.rse.core.filters.ISystemFilterPoolWrapperInformation;
import org.eclipse.rse.core.filters.ISystemFilterReference;
import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.filters.dialogs.SystemNewFilterWizardNamePage;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.ui.ISystemIconConstants;
import org.eclipse.rse.ui.ISystemMessages;
Index: UI/org/eclipse/rse/ui/dialogs/SystemSelectAnythingDialog.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectAnythingDialog.java,v
retrieving revision 1.7
diff -u -r1.7 SystemSelectAnythingDialog.java
--- UI/org/eclipse/rse/ui/dialogs/SystemSelectAnythingDialog.java 26 Nov 2007 20:11:13 -0000 1.7
+++ UI/org/eclipse/rse/ui/dialogs/SystemSelectAnythingDialog.java 3 Apr 2008 23:04:27 -0000
@@ -23,8 +23,8 @@
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.model.ISystemViewInputProvider;
-import org.eclipse.rse.internal.ui.view.SystemViewForm;
import org.eclipse.rse.ui.SystemActionViewerFilter;
+import org.eclipse.rse.ui.view.SystemViewForm;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
@@ -48,10 +48,10 @@
{
_view = new SystemViewForm(getShell(), parent, SWT.NONE, getInputProvider(), true, this);
- _view.getSystemView().addSelectionChangedListener(this);
+ _view.getSystemTree().addSelectionChangedListener(this);
if (_filter != null){
- _view.getSystemView().addFilter(_filter);
+ _view.getSystemTree().addFilter(_filter);
}
return _view.getTreeControl();
@@ -104,7 +104,7 @@
_filter = filter;
if (_view != null)
{
- _view.getSystemView().addFilter(filter);
+ _view.getSystemTree().addFilter(filter);
}
}
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.14
diff -u -r1.14 SystemRemoteResourceDialog.java
--- UI/org/eclipse/rse/ui/dialogs/SystemRemoteResourceDialog.java 14 Mar 2008 18:23:35 -0000 1.14
+++ UI/org/eclipse/rse/ui/dialogs/SystemRemoteResourceDialog.java 3 Apr 2008 23:04:27 -0000
@@ -22,11 +22,11 @@
import org.eclipse.rse.core.IRSESystemType;
import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.internal.ui.view.SystemResourceSelectionForm;
-import org.eclipse.rse.internal.ui.view.SystemResourceSelectionInputProvider;
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.SystemResourceSelectionForm;
+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;
Index: UI/org/eclipse/rse/ui/view/SystemViewForm.java
===================================================================
RCS file: UI/org/eclipse/rse/ui/view/SystemViewForm.java
diff -N UI/org/eclipse/rse/ui/view/SystemViewForm.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ UI/org/eclipse/rse/ui/view/SystemViewForm.java 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,540 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * Kevin Doyle (IBM) - [187553] - Removed code and related methods for toolbar/button bar.
+ * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
+ * David McKnight (IBM) - [187711] select SystemView APIs exposed by the ISystemTree interface
+ *******************************************************************************/
+package org.eclipse.rse.ui.view;
+import java.util.List;
+import java.util.Vector;
+
+import org.eclipse.jface.action.ToolBarManager;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.rse.core.filters.ISystemFilter;
+import org.eclipse.rse.core.filters.ISystemFilterReference;
+import org.eclipse.rse.core.model.ISystemViewInputProvider;
+import org.eclipse.rse.core.subsystems.ISubSystem;
+import org.eclipse.rse.internal.ui.view.SystemEmptyListAPIProviderImpl;
+import org.eclipse.rse.internal.ui.view.SystemView;
+import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
+import org.eclipse.rse.ui.messages.ISystemMessageLine;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Item;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+
+
+/**
+ * This re-usable widget is for a single widget that displays a
+ * toolbar underneath which is a systems view tree.
+ */
+public class SystemViewForm extends Composite implements ISystemTree
+{
+ private ToolBar toolbar = null;
+ private ToolBarManager toolbarMgr = null;
+ private Button refreshButton, getListButton;
+ private SystemView tree = null;
+ private ISystemMessageLine msgLine = null;
+ private boolean showActions = true;
+ private boolean deferLoading = false;
+ private boolean requestInProgress = false;
+ private ISystemViewInputProvider inputProvider = null;
+ private ISystemViewInputProvider emptyProvider = new SystemEmptyListAPIProviderImpl();
+ private Vector requestListeners = null;
+ public static final int DEFAULT_WIDTH = 300;
+ public static final int DEFAULT_HEIGHT = 300;
+
+ // the following allows us to identify dialog/wizard hosting this widget so we can
+ // disable it's close capability while a remote request is in place.
+ protected Object caller;
+ protected boolean callerInstanceOfWizardPage, callerInstanceOfSystemPromptDialog;
+
+ // viewer filters
+ protected ViewerFilter[] initViewerFilters = null;
+
+ /**
+ * Constructor
+ * @param shell The owning window
+ * @param parent The owning composite
+ * @param style The swt style to apply to the overall composite. Typically SWT.NULL
+ * @param inputProvider Who is supplying the roots for the system viewer?
+ * @param singleSelectionMode Are users allowed to select multiple things at once?
+ * @param msgLine where to show messages and tooltip text
+ */
+ public SystemViewForm(Shell shell, Composite parent, int style, ISystemViewInputProvider inputProvider,
+ boolean singleSelectionMode, ISystemMessageLine msgLine)
+ {
+ this(shell, parent, style, inputProvider, singleSelectionMode, msgLine, 1, 1);
+ }
+ /**
+ * Constructor when you want to span more than one column or row
+ * @param shell The owning window
+ * @param parent The owning composite
+ * @param style The swt style to apply to the overall composite. Typically SWT.NULL
+ * @param inputProvider Who is supplying the roots for the system viewer?
+ * @param singleSelectionMode Are users allowed to select multiple things at once?
+ * @param msgLine where to show messages and tooltip text
+ * @param horizontalSpan how many columns in parent composite to span
+ * @param verticalSpan how many rows in parent composite to span
+ */
+ public SystemViewForm(Shell shell, Composite parent, int style, ISystemViewInputProvider inputProvider,
+ boolean singleSelectionMode, ISystemMessageLine msgLine,
+ int horizontalSpan, int verticalSpan)
+ {
+ this(shell, parent, style, inputProvider, singleSelectionMode, msgLine, horizontalSpan, verticalSpan, null);
+ }
+
+ /**
+ * Constructor when you want to span more than one column or row
+ * @param shell The owning window
+ * @param parent The owning composite
+ * @param style The swt style to apply to the overall composite. Typically SWT.NULL
+ * @param inputProvider Who is supplying the roots for the system viewer?
+ * @param singleSelectionMode Are users allowed to select multiple things at once?
+ * @param msgLine where to show messages and tooltip text
+ * @param horizontalSpan how many columns in parent composite to span
+ * @param verticalSpan how many rows in parent composite to span
+ * @param initViewerFilters the initial viewer filters to apply.
+ */
+ public SystemViewForm(Shell shell, Composite parent, int style, ISystemViewInputProvider inputProvider,
+ boolean singleSelectionMode, ISystemMessageLine msgLine,
+ int horizontalSpan, int verticalSpan, ViewerFilter[] initViewerFilters)
+ {
+ super(parent, style);
+ this.inputProvider = inputProvider;
+ this.msgLine = msgLine;
+ callerInstanceOfWizardPage = (caller instanceof WizardPage);
+ callerInstanceOfSystemPromptDialog = (caller instanceof SystemPromptDialog);
+ prepareComposite(1, horizontalSpan, verticalSpan);
+
+ // set viewer filters
+ this.initViewerFilters = initViewerFilters;
+
+ createSystemView(shell, inputProvider, singleSelectionMode);
+
+ }
+
+ /**
+ * Return the toolbar widget manager
+ */
+ public ToolBarManager getToolBarManager()
+ {
+ return toolbarMgr;
+ }
+ /**
+ * Return the system view tree viewer
+ */
+ public ISystemTree getSystemTree()
+ {
+ return tree;
+ }
+ /**
+ * Return the system view tree viewer tree widget
+ */
+ public Tree getTreeControl()
+ {
+ return tree.getTree();
+ }
+
+ /**
+ * Set the tree's tooltip text
+ */
+ public void setToolTipText(String tip)
+ {
+ tree.getTree().setToolTipText(tip);
+ }
+
+ /**
+ * Refresh contents
+ */
+ public void refresh()
+ {
+ tree.refreshAll();
+ }
+
+ /**
+ * Reset contents
+ */
+ public void reset(ISystemViewInputProvider inputProvider)
+ {
+ this.inputProvider = inputProvider;
+ if (deferLoading)
+ {
+ tree.setSelection(null);
+ tree.setInputProvider(emptyProvider);
+ }
+ else
+ {
+ tree.setSelection(null);
+ tree.setInputProvider(inputProvider);
+ }
+ }
+
+ /*
+ * Turn off right-click actions
+ *
+ NOW SET VIA INPUT PROVIDER METHODS
+ public void setShowActions(boolean show)
+ {
+ this.showActions = show;
+ if (tree != null)
+ tree.setShowActions(show);
+ }*/
+
+ /**
+ * Disable/Enable all the child controls.
+ */
+ public void setEnabled(boolean enabled)
+ {
+ if (toolbar != null)
+ toolbar.setEnabled(enabled);
+ tree.setEnabled(enabled);
+ //if ((tree != null) && (tree.getTree() != null))
+ // tree.getTree().setEnabled(enabled);
+ //super.setEnabled(enabled);
+ }
+ /**
+ * Register a listener interested in an item is selected in the system view
+ * @see #removeSelectionChangedListener(ISelectionChangedListener)
+ */
+ public void addSelectionChangedListener(ISelectionChangedListener listener)
+ {
+ tree.addSelectionChangedListener(listener);
+ }
+ /**
+ * Remove a previously set system view selection listener.
+ * @see #addSelectionChangedListener(ISelectionChangedListener)
+ */
+ public void removeSelectionChangedListener(ISelectionChangedListener listener)
+ {
+ tree.removeSelectionChangedListener(listener);
+ }
+ /**
+ * Add a listener that is informed when a remote list request starts and stops.
+ * This allows for the listener to do things like disable the Close button
+ */
+ public void addListRequestListener(ISystemLongRunningRequestListener listener)
+ {
+ if (requestListeners == null)
+ requestListeners = new Vector();
+ requestListeners.addElement(listener);
+ }
+ /**
+ * Add a listener that is informed when a remote list request starts and stops.
+ * This allows for the listener to do things like disable the Close button
+ */
+ public void removeListRequestListener(ISystemLongRunningRequestListener listener)
+ {
+ if (requestListeners != null)
+ requestListeners.removeElement(listener);
+ }
+
+ /**
+ * Return the selection of the tree viewer
+ */
+ public ISelection getSelection()
+ {
+ return tree.getSelection();
+ }
+
+
+ // --------------------------------------------
+ // ISystemTree methods to facilitate our GUI...
+ // ... all these are delegated to the SystemView tree
+ // --------------------------------------------
+ /**
+ * Returns true if any of the selected items are currently expanded
+ */
+ public boolean areAnySelectedItemsExpanded()
+ {
+ return tree.areAnySelectedItemsExpanded();
+ }
+ /**
+ * Returns true if any of the selected items are expandable but not yet expanded
+ */
+ public boolean areAnySelectedItemsExpandable()
+ {
+ return tree.areAnySelectedItemsExpandable();
+ }
+ /**
+ * This is called to ensure all elements in a multiple-selection have the same parent in the
+ * tree viewer. If they don't we automatically disable all actions.
+ *
+ * Designed to be as fast as possible by going directly to the SWT widgets
+ */
+ public boolean sameParent()
+ {
+ return tree.sameParent();
+ }
+ /**
+ * This is called to accurately get the parent object for the current selection
+ * for this viewer.
+ *
+ * The getParent() method in the adapter is very unreliable... adapters can't be sure
+ * of the context which can change via filtering and view options.
+ */
+ public Object getSelectedParent()
+ {
+ return tree.getSelectedParent();
+ }
+ /**
+ * This returns the element immediately before the first selected element in this tree level.
+ * Often needed for enablement decisions for move up actions.
+ */
+ public Object getPreviousElement()
+ {
+ return tree.getPreviousElement();
+ }
+ /**
+ * This returns the element immediately after the last selected element in this tree level
+ * Often needed for enablement decisions for move down actions.
+ */
+ public Object getNextElement()
+ {
+ return tree.getNextElement();
+ }
+
+ /**
+ * This is called to walk the tree back up to the roots and return the visible root
+ * node for the first selected object.
+ */
+ public Object getRootParent()
+ {
+ return tree.getRootParent();
+ }
+ /**
+ * This returns an array containing each element in the tree, up to but not including the root.
+ * The array is in reverse order, starting at the leaf and going up.
+ */
+ public Object[] getElementNodes(Object element)
+ {
+ return tree.getElementNodes(element);
+ }
+ /**
+ * Helper method to determine if a given object is currently selected.
+ * Does consider if a child node of the given object is currently selected.
+ */
+ public boolean isSelectedOrChildSelected(Object parentElement)
+ {
+ return tree.isSelectedOrChildSelected(parentElement);
+ }
+
+ /**
+ * Return the number of immediate children in the tree, for the given tree node
+ */
+ public int getChildCount(Object element)
+ {
+ return tree.getChildCount(element);
+ }
+
+ /**
+ * Called when a property is updated and we need to inform the Property Sheet viewer.
+ * There is no formal mechanism for this so we simulate a selection changed event as
+ * this is the only event the property sheet listens for.
+ */
+ public void updatePropertySheet()
+ {
+ tree.updatePropertySheet();
+ }
+
+ /**
+ * Called to select an object within the tree, and optionally expand it
+ */
+ public void select(Object element, boolean expand)
+ {
+ tree.select(element, expand);
+ }
+
+ /**
+ * Returns the tree item of the first selected object. Used for setViewerItem in a resource
+ * change event.
+ */
+ public Item getViewerItem()
+ {
+ return tree.getViewerItem();
+ }
+
+ /**
+ * Returns true if it is ok to close the dialog or wizard page. Returns false if there
+ * is a remote request currently in progress.
+ */
+ public boolean okToClose()
+ {
+ return !requestInProgress; //d43433
+ }
+
+ // -----------------------
+ // INTERNAL-USE METHODS...
+ // -----------------------
+ /**
+ * Prepares this composite control and sets the default layout data.
+ * @param Number of columns the new group will contain.
+ */
+ protected Composite prepareComposite(int numColumns,
+ int horizontalSpan, int verticalSpan)
+ {
+ Composite composite = this;
+ //GridLayout
+ GridLayout layout = new GridLayout();
+ layout.numColumns = numColumns;
+ layout.marginWidth = 0;
+ layout.marginHeight = 0;
+ layout.horizontalSpacing = 0;
+ layout.verticalSpacing = 0;
+ composite.setLayout(layout);
+ //GridData
+ GridData data = new GridData();
+ data.verticalAlignment = GridData.FILL;
+ data.horizontalAlignment = GridData.FILL;
+ data.grabExcessHorizontalSpace = true;
+ data.grabExcessVerticalSpace = true;
+ data.widthHint = DEFAULT_WIDTH;
+ data.heightHint = DEFAULT_HEIGHT;
+ data.horizontalSpan = horizontalSpan;
+ data.verticalSpan = verticalSpan;
+ composite.setLayoutData(data);
+ return composite;
+ }
+
+ protected void createSystemView(Shell shell, ISystemViewInputProvider inputProvider, boolean singleSelectionMode)
+ {
+ // TREE
+ int style = (singleSelectionMode ? SWT.SINGLE : SWT.MULTI) | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER;
+ tree = new SystemView(shell, this, style, deferLoading ? emptyProvider : inputProvider, msgLine, initViewerFilters);
+ GridData treeData = new GridData();
+ treeData.horizontalAlignment = GridData.FILL;
+ treeData.verticalAlignment = GridData.FILL;
+ treeData.grabExcessHorizontalSpace = true;
+ treeData.grabExcessVerticalSpace = true;
+ treeData.widthHint = 300;
+ treeData.heightHint= 200;
+ tree.getTree().setLayoutData(treeData);
+ tree.setShowActions(showActions);
+ }
+
+ protected void addOurMouseListener()
+ {
+ MouseListener mouseListener = new MouseAdapter()
+ {
+ public void mouseDown(MouseEvent e)
+ {
+ //requestActivation();
+ }
+ };
+ toolbar.addMouseListener(mouseListener);
+ }
+
+ /**
+ * Fire long running request listener event
+ */
+ protected void fireRequestStartEvent()
+ {
+ if (requestListeners != null)
+ {
+ SystemLongRunningRequestEvent event = new SystemLongRunningRequestEvent();
+ for (int idx=0; idx
+ * This dialog contains a dropdown for selecting connections to use in the test. Only connections which
+ * contain subsystems with the same parent factory as the given subsystem factory are shown.
+ *
+ */
+public class SystemTestFilterStringDialog
+ extends SystemPromptDialog
+ implements ISelectionChangedListener, SelectionListener
+{
+ protected ISubSystem subsystem = null;
+ protected ISystemRegistry sr = null;
+ protected String subsystemConfigurationId = null;
+ protected String filterString = null;
+ protected SystemTestFilterStringAPIProviderImpl inputProvider = null;
+ // GUI widgets
+ protected Label prompt, promptValue;
+ protected SystemViewForm tree;
+ protected SystemHostCombo connectionCombo;
+
+ /**
+ * Constructor
+ * @param shell The shell to hang the dialog off of
+ * @param subsystem The contextual subsystem that owns this filter string
+ * @param filterString The filter string that is to be tested.
+ */
+ public SystemTestFilterStringDialog(Shell shell, ISubSystem subsystem, String filterString)
+ {
+ this(shell, SystemResources.RESID_TESTFILTERSTRING_TITLE, subsystem, filterString);
+ }
+ /**
+ * Constructor when unique title desired
+ * @param shell The shell to hang the dialog off of
+ * @param title The title to give the dialog
+ * @param subsystem The contextual subsystem that owns this filter string
+ * @param filterString The filter string that is to be tested.
+ */
+ public SystemTestFilterStringDialog(Shell shell, String title, ISubSystem subsystem, String filterString)
+ {
+ super(shell, title);
+ setCancelButtonLabel(SystemResources.BUTTON_CLOSE);
+ setShowOkButton(false);
+ setBlockOnOpen(true); // always modal
+ this.subsystem = subsystem;
+ this.filterString = filterString;
+ this.subsystemConfigurationId = subsystem.getSubSystemConfiguration().getId();
+ sr = RSECorePlugin.getTheSystemRegistry();
+ setNeedsProgressMonitor(true);
+ //pack();
+ }
+
+ // ------------------
+ // PUBLIC METHODS...
+ // ------------------
+ // ------------------
+ // PRIVATE METHODS...
+ // ------------------
+ /**
+ * Private method.
+ * @see SystemPromptDialog#getInitialFocusControl()
+ */
+ protected Control getInitialFocusControl()
+ {
+ //return tree.getTreeControl();
+ return connectionCombo.getCombo();
+ }
+
+ /**
+ * Private method.
+ * @see SystemPromptDialog#createInner(Composite)
+ */
+ protected Control createInner(Composite parent)
+ {
+ // Inner composite
+ int gridColumns = 2;
+ Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, gridColumns);
+
+ // connection selection combo
+ connectionCombo = SystemWidgetHelpers.createConnectionCombo(composite_prompts, null, null, subsystem.getSubSystemConfiguration(),
+ null, null, subsystem.getHost(), gridColumns, false);
+
+ // filter string prompt
+ // Composite promptComposite = composite_prompts;
+ Composite promptComposite = connectionCombo;
+ prompt = SystemWidgetHelpers.createLabel(promptComposite, SystemResources.RESID_TESTFILTERSTRING_PROMPT_LABEL, SystemResources.RESID_TESTFILTERSTRING_PROMPT_TOOLTIP);
+ promptValue = SystemWidgetHelpers.createLabel(promptComposite, SystemResources.RESID_TESTFILTERSTRING_PROMPT_LABEL, SystemResources.RESID_TESTFILTERSTRING_PROMPT_TOOLTIP);
+
+ promptValue.setToolTipText(filterString); // Since the dialog is not resizable, this is the way to show the whole string
+
+ // Make sure the label width is not longer than the window width
+ // Otherwise the combo box dropdown arrow above it will be pushed beyond the window and invisible
+ //promptValue.setText(filterString);
+
+ String label = filterString;
+
+ if ( label.length() > 30)
+ label = label.substring(0,30) + " ..."; // Use ... to show that not entire string is displayed //$NON-NLS-1$
+ promptValue.setText( label);
+
+ //Point point = promptValue.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+ //GridData data = new GridData();
+ //data.widthHint = point.x < 230 ? point.x : 230;
+ GridData data = new GridData();
+ data.widthHint = 200;
+ promptValue.setLayoutData(data);
+
+ // TREE
+ inputProvider = new SystemTestFilterStringAPIProviderImpl(subsystem, filterString);
+ tree = new SystemViewForm(getShell(), composite_prompts, SWT.NULL, inputProvider, false, getMessageLine(), gridColumns, 1);
+
+ // add selection listeners
+ //tree.addSelectionChangedListener(this);
+ connectionCombo.addSelectionListener(this);
+
+ return composite_prompts;
+ }
+
+ /**
+ * Override of parent. Must pass selected object onto the form for initializing fields.
+ * Called by SystemDialogAction's default run() method after dialog instantiated.
+ */
+ public void setInputObject(Object inputObject)
+ {
+ super.setInputObject(inputObject);
+ }
+
+ /**
+ * When re-using this dialog between runs, call this to reset its contents.
+ * Assumption: original input subsystem factory Id doesn't change between runs
+ */
+ public void reset(ISubSystem subsystem, String filterString)
+ {
+ this.subsystem = subsystem;
+ this.filterString = filterString;
+ //this.subsystemConfigurationId = subsystem.getParentSubSystemConfiguration().getId();
+ inputProvider.setSubSystem(subsystem);
+ inputProvider.setFilterString(filterString);
+ tree.reset(inputProvider);
+ }
+
+ /**
+ * ISelectionChangedListener interface method
+ */
+ public void selectionChanged(SelectionChangedEvent event)
+ {
+ }
+ public void widgetDefaultSelected(SelectionEvent event)
+ {
+ }
+ public void widgetSelected(SelectionEvent event)
+ {
+
+ //if (src == connectionCombo.getCombo())
+ {
+ //System.out.println("connection changed");
+ IHost newConnection = connectionCombo.getHost();
+ ISubSystem newSubSystem = null;
+ ISubSystemConfiguration config = sr.getSubSystemConfiguration(subsystemConfigurationId);
+ if (config!=null) {
+ ISubSystem[] newSubSystems = config.getSubSystems(newConnection, true);
+ if (newSubSystems != null && newSubSystems.length > 0) {
+ newSubSystem = newSubSystems[0];
+ subsystemConfigurationId = subsystem.getSubSystemConfiguration().getId();
+ }
+ }
+ inputProvider.setSubSystem(newSubSystem);
+ tree.reset(inputProvider);
+ }
+ }
+
+}
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
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ UI/org/eclipse/rse/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:
+ * {Name} (company) - description of contribution.
+ ********************************************************************************/
+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
+ *
+ * If you want to prompt the user for the parent filter pool to create this filter in,
+ * but want to not use the term "pool" say, you can use an array of euphamisms. That is,
+ * you can pass an array of objects that map to filter pools, but have a different
+ * display name that is shown in the dropdown.
+ *
+ * Of course, if you want to do this, then you will likely want to offer a different
+ * label and tooltip for the prompt, and different verbiage above the prompt. The
+ * object this method accepts as a parameter encapsulates all that information, and
+ * there is a default class you can use for this.
+ */
+ public void setAllowFilterPoolSelection(ISystemFilterPoolWrapperInformation poolWrappersToSelectFrom,
+ ISystemValidator[] nameValidators)
+ {
+ this.poolWrapperInformation = poolWrappersToSelectFrom;
+ this.nameValidators = nameValidators;
+ if (parentPool == null)
+ parentPool = poolWrappersToSelectFrom.getPreSelectWrapper().getSystemFilterPool();
+ }
+ /**
+ * Set the validator to call when the user selects a filter pool. Optional.
+ */
+ public void setFilterPoolSelectionValidator(ISystemFilterPoolSelectionValidator validator)
+ {
+ filterPoolSelectionValidator = validator;
+ //System.out.println("Inside setFilterPoolSelectionValidator. Non null? " + (validator != null));
+ }
+
+ // ---------------------------------
+ // LIFECYCLE METHODS...
+ // ---------------------------------
+
+ /**
+ * Populate the dialog area with our widgets. Return the composite they are in.
+ */
+ public Control createContents(Composite parent)
+ {
+
+ int nbrColumns = 2;
+ Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
+
+ SystemWidgetHelpers.createVerbiage(composite_prompts, configurator.getPage2NameVerbiage(), nbrColumns, false, 200);
+ nameText = SystemWidgetHelpers.createLabeledTextField(composite_prompts, null, configurator.getPage2NamePromptLabel(), configurator.getPage2NamePromptTooltip());
+
+ addSeparatorLine(composite_prompts, nbrColumns);
+ addFillerLine(composite_prompts, nbrColumns);
+
+ // allow the user to create this filter uniquely for this connection, which means putting it in a
+ // special filter pool we will create, just for this connection. This option is not shown if we are
+ // already told which filter pool to create the filter in, such as in Show Filter Pools mode, when
+ // the user selects New Filter to create a filter in the selected pool. We assume in this case the
+ // will go in whatever filter is selected.
+ if ((poolsToSelectFrom!=null) || (poolWrapperInformation!=null))
+ {
+ uniqueCB = SystemWidgetHelpers.createCheckBox(composite_prompts, nbrColumns, configurator.getPage2UniqueToConnectionLabel(), null);
+ uniqueCB.setToolTipText(configurator.getPage2UniqueToConnectionToolTip());
+ uniqueCB.addSelectionListener(this);
+ uniqueCB.setSelection(true); // [160403] filters should be connection private by default
+ }
+
+ addFillerLine(composite_prompts, nbrColumns);
+
+ if (poolsToSelectFrom != null)
+ {
+ poolVerbiage = SystemWidgetHelpers.createVerbiage(composite_prompts, configurator.getPage2PoolVerbiage(), nbrColumns, false, 200);
+ poolVerbiage.setToolTipText(configurator.getPage2PoolVerbiageTip());
+ poolCombo = SystemWidgetHelpers.createLabeledReadonlyCombo(composite_prompts, null, configurator.getPage2PoolPromptLabel(), configurator.getPage2PoolPromptTooltip());
+ poolComboLabel = SystemWidgetHelpers.getLastLabel();
+ String[] poolNames = new String[poolsToSelectFrom.length];
+ int filterPoolSelectionIndex = 0;
+ for (int idx=0; idx
+ * Default is false
+ */
+ public void setShowPropertySheet(boolean show)
+ {
+ this.showPropertySheet = show;
+ }
+
+
+
+ /**
+ * Specify a validator to use when the user selects a remote file or folder.
+ * This allows you to decide if OK should be enabled or not for that remote file or folder.
+ */
+ public void setSelectionValidator(IValidatorRemoteSelection selectionValidator)
+ {
+ _selectionValidator = selectionValidator;
+ }
+
+ protected void clearErrorMessage()
+ {
+ if (_msgLine != null)
+ _msgLine.clearErrorMessage();
+ }
+ protected void setErrorMessage(String msg)
+ {
+ if (_msgLine != null)
+ if (msg != null)
+ _msgLine.setErrorMessage(msg);
+ else
+ _msgLine.clearErrorMessage();
+ }
+ protected void setErrorMessage(SystemMessage msg)
+ {
+ if (_msgLine != null)
+ if (msg != null)
+ _msgLine.setErrorMessage(msg);
+ else
+ _msgLine.clearErrorMessage();
+ }
+
+
+ /**
+ * Set the message shown as the text at the top of the form. Eg, "Select a file"
+ */
+ public void setMessage(String message)
+ {
+ this._verbiage = message;
+ if (verbiageLabel != null)
+ verbiageLabel.setText(message);
+ }
+ /**
+ * Set the tooltip text for the remote systems tree from which an item is selected.
+ */
+ public void setSelectionTreeToolTipText(String tip)
+ {
+ _systemViewForm.setToolTipText(tip);
+ }
+
+
+}
Index: UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogInputs.java
===================================================================
RCS file: UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogInputs.java
diff -N UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogInputs.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogInputs.java 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2007 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:
+ * {Name} (company) - description of contribution.
+ *******************************************************************************/
+
+package org.eclipse.rse.ui.filters;
+//import org.eclipse.rse.core.*;
+import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
+import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
+import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
+import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
+import org.eclipse.rse.ui.filters.dialogs.SystemFilterDialogInputs;
+
+
+
+/**
+ * A class capturing the attributes commonly needed by dialogs that
+ * work with filter pools.
+ */
+public class SystemFilterPoolDialogInputs extends SystemFilterDialogInputs
+{
+
+
+ public ISystemFilterPoolManagerProvider poolManagerProvider = null;
+ public ISystemFilterPoolManager[] poolManagers = null;
+ public ISystemFilterPoolReferenceManager refManager = null;
+ public int mgrSelection = 0;
+ public String poolNamePrompt;
+ public String poolNameTip;
+ public String poolMgrNamePrompt;
+ public String poolMgrNameTip;
+
+ public SystemSimpleContentElement filterPoolTreeRoot;
+}
#P org.eclipse.rse.files.ui
Index: src/org/eclipse/rse/internal/files/ui/search/SystemSearchSelectFileTypesAction.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchSelectFileTypesAction.java,v
retrieving revision 1.2
diff -u -r1.2 SystemSearchSelectFileTypesAction.java
--- src/org/eclipse/rse/internal/files/ui/search/SystemSearchSelectFileTypesAction.java 28 Mar 2007 19:49:39 -0000 1.2
+++ src/org/eclipse/rse/internal/files/ui/search/SystemSearchSelectFileTypesAction.java 3 Apr 2008 23:04:34 -0000
@@ -18,7 +18,7 @@
package org.eclipse.rse.internal.files.ui.search;
import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.rse.internal.files.ui.actions.SystemSelectFileTypesAction;
+import org.eclipse.rse.files.ui.actions.SystemSelectFileTypesAction;
import org.eclipse.swt.widgets.Shell;
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.1
diff -u -r1.1 SystemSearchRemoteFolderForm.java
--- src/org/eclipse/rse/internal/files/ui/search/SystemSearchRemoteFolderForm.java 16 Feb 2007 18:22:37 -0000 1.1
+++ src/org/eclipse/rse/internal/files/ui/search/SystemSearchRemoteFolderForm.java 3 Apr 2008 23:04:34 -0000
@@ -10,9 +10,9 @@
package org.eclipse.rse.internal.files.ui.search;
import org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm;
-import org.eclipse.rse.internal.ui.view.SystemSelectRemoteObjectAPIProviderImpl;
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.
@@ -32,7 +32,7 @@
* Returns an instance of the search input provider {@link SystemSearchRemoteObjectAPIProvider}
* @see org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm#getInputProvider()
*/
- protected SystemSelectRemoteObjectAPIProviderImpl getInputProvider() {
+ protected ISystemSelectRemoteObjectAPIProvider getInputProvider() {
if (inputProvider == null) {
// create the input provider that drives the contents of the tree
Index: src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFilesForm.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFilesForm.java,v
retrieving revision 1.12
diff -u -r1.12 SystemSelectRemoteFilesForm.java
--- src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFilesForm.java 28 Feb 2008 22:22:36 -0000 1.12
+++ src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFilesForm.java 3 Apr 2008 23:04:34 -0000
@@ -25,8 +25,8 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.viewers.ICheckStateListener;
import org.eclipse.rse.core.IRSESystemType;
+import org.eclipse.rse.files.ui.actions.SystemSelectFileTypesAction;
import org.eclipse.rse.internal.files.ui.Activator;
-import org.eclipse.rse.internal.files.ui.actions.SystemSelectFileTypesAction;
import org.eclipse.rse.internal.ui.SystemResources;
import org.eclipse.rse.internal.ui.view.SystemViewLabelAndContentProvider;
import org.eclipse.rse.services.clientserver.messages.CommonMessages;
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.18
diff -u -r1.18 SystemSelectRemoteFileOrFolderForm.java
--- src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFileOrFolderForm.java 15 May 2007 23:53:55 -0000 1.18
+++ src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFileOrFolderForm.java 3 Apr 2008 23:04:34 -0000
@@ -38,7 +38,6 @@
import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
import org.eclipse.rse.internal.ui.view.SystemPropertySheetForm;
import org.eclipse.rse.internal.ui.view.SystemSelectRemoteObjectAPIProviderImpl;
-import org.eclipse.rse.internal.ui.view.SystemViewForm;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.subsystems.files.core.model.ISystemFileRemoteTypes;
import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
@@ -53,7 +52,9 @@
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.SystemAdapterHelpers;
+import org.eclipse.rse.ui.view.SystemViewForm;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
@@ -107,7 +108,7 @@
protected Label verbiageLabel, spacer1, spacer2;
protected Text nameEntryValue;
protected SystemViewForm tree;
- protected SystemPropertySheetForm ps;
+ private SystemPropertySheetForm ps;
protected ISystemMessageLine msgLine;
protected Composite outerParent, ps_composite;
// inputs
@@ -135,7 +136,7 @@
protected IHost outputConnection = null;
// state
//protected ResourceBundle rb;
- protected SystemSelectRemoteObjectAPIProviderImpl inputProvider = null;
+ protected ISystemSelectRemoteObjectAPIProvider inputProvider = null;
protected ISystemFilter preSelectFilter;
protected String preSelectFilterChild;
protected boolean preSelectRoot;
@@ -195,7 +196,7 @@
* Returns the input provider that drives the contents of the tree
* Subclasses can override to provide custom tree contents
*/
- protected SystemSelectRemoteObjectAPIProviderImpl getInputProvider()
+ protected ISystemSelectRemoteObjectAPIProvider getInputProvider()
{
if (inputProvider == null)
{
@@ -753,7 +754,7 @@
//tree.setToolTipText(treeTip); //EXTREMELY ANNOYING!
if (autoExpandDepth != 0)
{
- tree.getSystemView().setAutoExpandLevel(autoExpandDepth);
+ tree.getSystemTree().setAutoExpandLevel(autoExpandDepth);
tree.reset(inputProvider);
}
@@ -803,7 +804,7 @@
*/
protected IHost internalGetConnection()
{
- Object parent = tree.getSystemView().getRootParent();
+ Object parent = tree.getSystemTree().getRootParent();
if (parent instanceof IHost)
{
return (IHost)parent;
@@ -1058,4 +1059,5 @@
public void setAllowFolderSelection(boolean allow) {
allowFolderSelection = allow;
}
+
}
\ No newline at end of file
Index: src/org/eclipse/rse/files/ui/widgets/SystemFileFilterStringEditPane.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemFileFilterStringEditPane.java,v
retrieving revision 1.7
diff -u -r1.7 SystemFileFilterStringEditPane.java
--- src/org/eclipse/rse/files/ui/widgets/SystemFileFilterStringEditPane.java 13 Mar 2008 02:39:58 -0000 1.7
+++ src/org/eclipse/rse/files/ui/widgets/SystemFileFilterStringEditPane.java 3 Apr 2008 23:04:33 -0000
@@ -28,10 +28,10 @@
import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
+import org.eclipse.rse.files.ui.actions.SystemSelectFileTypesAction;
import org.eclipse.rse.internal.files.ui.Activator;
import org.eclipse.rse.internal.files.ui.FileResources;
import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
-import org.eclipse.rse.internal.files.ui.actions.SystemSelectFileTypesAction;
import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
Index: src/org/eclipse/rse/files/ui/dialogs/SystemSelectRemoteFileOrFolderDialog.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemSelectRemoteFileOrFolderDialog.java,v
retrieving revision 1.10
diff -u -r1.10 SystemSelectRemoteFileOrFolderDialog.java
--- src/org/eclipse/rse/files/ui/dialogs/SystemSelectRemoteFileOrFolderDialog.java 19 Jun 2007 17:11:21 -0000 1.10
+++ src/org/eclipse/rse/files/ui/dialogs/SystemSelectRemoteFileOrFolderDialog.java 3 Apr 2008 23:04:33 -0000
@@ -26,13 +26,13 @@
import org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm;
import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.view.SystemView;
-import org.eclipse.rse.internal.ui.view.SystemViewForm;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
import org.eclipse.rse.ui.messages.ISystemMessageLine;
import org.eclipse.rse.ui.validators.IValidatorRemoteSelection;
+import org.eclipse.rse.ui.view.ISystemTree;
+import org.eclipse.rse.ui.view.SystemViewForm;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
@@ -421,7 +421,7 @@
protected Control createContents(Composite parent)
{
Control control = super.createContents(parent);
- form.getSystemViewForm().getSystemView().addDoubleClickListener(new IDoubleClickListener() {
+ form.getSystemViewForm().getSystemTree().addDoubleClickListener(new IDoubleClickListener() {
public void doubleClick(DoubleClickEvent event) {
handleDoubleClick(event);
}
@@ -435,7 +435,7 @@
*/
protected void handleDoubleClick(DoubleClickEvent event)
{
- SystemView tree = form.getSystemViewForm().getSystemView();
+ ISystemTree tree = form.getSystemViewForm().getSystemTree();
IStructuredSelection s = (IStructuredSelection) event.getSelection();
Object element = s.getFirstElement();
if (element == null)
Index: src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileSelectionInputProvider.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileSelectionInputProvider.java,v
retrieving revision 1.6
diff -u -r1.6 SystemRemoteFileSelectionInputProvider.java
--- src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileSelectionInputProvider.java 5 Jun 2007 10:54:41 -0000 1.6
+++ src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileSelectionInputProvider.java 3 Apr 2008 23:04:33 -0000
@@ -19,8 +19,8 @@
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;
+import org.eclipse.rse.ui.view.SystemResourceSelectionInputProvider;
public class SystemRemoteFileSelectionInputProvider extends
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.8
diff -u -r1.8 SystemRemoteFileDialog.java
--- src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileDialog.java 1 Jun 2007 12:52:15 -0000 1.8
+++ src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileDialog.java 3 Apr 2008 23:04:33 -0000
@@ -23,9 +23,9 @@
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.internal.ui.view.SystemView;
import org.eclipse.rse.ui.SystemActionViewerFilter;
import org.eclipse.rse.ui.dialogs.SystemRemoteResourceDialog;
+import org.eclipse.rse.ui.view.ISystemTree;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
@@ -70,7 +70,7 @@
protected Control createContents(Composite parent)
{
Control control = super.createContents(parent);
- _form.getSystemViewForm().getSystemView().addDoubleClickListener(new IDoubleClickListener() {
+ _form.getSystemViewForm().getSystemTree().addDoubleClickListener(new IDoubleClickListener() {
public void doubleClick(DoubleClickEvent event) {
handleDoubleClick(event);
}
@@ -84,7 +84,7 @@
*/
protected void handleDoubleClick(DoubleClickEvent event)
{
- SystemView tree = _form.getSystemViewForm().getSystemView();
+ ISystemTree tree = _form.getSystemViewForm().getSystemTree();
IStructuredSelection s = (IStructuredSelection) event.getSelection();
Object element = s.getFirstElement();
if (element == null)
Index: src/org/eclipse/rse/internal/files/ui/actions/SystemSelectFileTypesAction.java
===================================================================
RCS file: src/org/eclipse/rse/internal/files/ui/actions/SystemSelectFileTypesAction.java
diff -N src/org/eclipse/rse/internal/files/ui/actions/SystemSelectFileTypesAction.java
--- src/org/eclipse/rse/internal/files/ui/actions/SystemSelectFileTypesAction.java 5 Jun 2007 10:54:41 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,158 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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:
- * {Name} (company) - description of contribution.
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.actions;
-
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
-import org.eclipse.rse.ui.actions.SystemBaseDialogAction;
-import org.eclipse.rse.ui.dialogs.SystemSelectFileTypesDialog;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * The action for allowing the user to select one or more file types, using the Eclipse
- * dialog for this. The types are from the file editor registry, as specified in the
- * Workbench preferences.
- *
- * To set preselected types, use {@link #setTypes(List)} or {@link #setTypes(String[])}.
- * Or, if you have single string of comma-separated types, call {@link #setTypes(String)}.
- *
- * After running, and checking wasCancelled(), you can query the selected types
- * using one of:
- *
- * Note the types are remembered after running, so a subsequent run will result in the previous types
- * being preselected, assuming you re-use the same instance of this class.
- *
- * @see org.eclipse.rse.ui.dialogs.SystemSelectFileTypesDialog
- */
-public class SystemSelectFileTypesAction extends SystemBaseDialogAction
-{
- protected List types = new ArrayList();
-
- /**
- * Constructor
- * To set preselected types, use {@link #setTypes(List)} or {@link #setTypes(String[])}.
- * Note the types are remember after running, so a subsequent run will result in the previous types
- * being preselected.
- */
- public SystemSelectFileTypesAction(Shell shell)
- {
- super(SystemFileResources.ACTION_SELECTFILETYPES_LABEL, SystemFileResources.ACTION_SELECTFILETYPES_TOOLTIP, null, shell);
- }
-
- /**
- * Set the current input types as a String array.
- * Each type is a file name extension, without the dot, as in "java" or "class"
- */
- public void setTypes(String[] types)
- {
- this.types = Arrays.asList(types);
- }
- /**
- * Set the current input types as a java.util List, such as ArrayList
- * Each type is a file name extension, without the dot, as in "java" or "class"
- */
- public void setTypes(List types)
- {
- this.types = types;
- }
- /**
- * Set the current input types given a comma-separated list as a single String.
- */
- public void setTypes(String typeString)
- {
- setTypes(RemoteFileFilterString.parseTypes(typeString));
- }
-
- /**
- * Get the selected file types after running the action. Returns an ArrayList
- */
- public List getTypes()
- {
- return types;
- }
- /**
- * Get the selected file types after running the action. Returns a String array
- */
- public String[] getTypesArray()
- {
- String[] typesArray = new String[types.size()];
- Iterator i = types.iterator();
- int idx=0;
- while (i.hasNext())
- typesArray[idx++] = (String)i.next();
- return typesArray;
- }
- /**
- * Get the selected file types as a concatenated list of strings, comma-separated
- */
- public String getTypesString()
- {
- return RemoteFileFilterString.getTypesString(getTypesArray());
- }
-
- /**
- * Return true if the dialog was cancelled by the user.
- * Only valid after calling run().
- */
- public boolean wasCancelled()
- {
- return (getValue() == null);
- }
-
-
- /**
- * Create and return the dialog
- */
- public Dialog createDialog(Shell parent)
- {
- SystemSelectFileTypesDialog dialog =
- new SystemSelectFileTypesDialog(getShell(), types);
- return dialog;
- }
-
- /**
- * Parent abstract method.
- * Called after dialog runs, to retrieve the value from the dialog.
- * Will return null if dialog cancelled.
- */
- public Object getDialogValue(Dialog dlg)
- {
- Object[] result = ((SystemSelectFileTypesDialog)dlg).getResult();
- if (result != null)
- {
- types = new ArrayList(result.length);
- for (int idx = 0; idx < result.length; idx++)
- types.add(result[idx]);
- return types;
- }
- else
- return null;
- }
-}
Index: src/org/eclipse/rse/files/ui/actions/SystemSelectFileTypesAction.java
===================================================================
RCS file: src/org/eclipse/rse/files/ui/actions/SystemSelectFileTypesAction.java
diff -N src/org/eclipse/rse/files/ui/actions/SystemSelectFileTypesAction.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ src/org/eclipse/rse/files/ui/actions/SystemSelectFileTypesAction.java 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,158 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2007 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:
+ * {Name} (company) - description of contribution.
+ *******************************************************************************/
+
+package org.eclipse.rse.files.ui.actions;
+
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
+import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
+import org.eclipse.rse.ui.actions.SystemBaseDialogAction;
+import org.eclipse.rse.ui.dialogs.SystemSelectFileTypesDialog;
+import org.eclipse.swt.widgets.Shell;
+
+
+/**
+ * The action for allowing the user to select one or more file types, using the Eclipse
+ * dialog for this. The types are from the file editor registry, as specified in the
+ * Workbench preferences.
+ *
+ * To set preselected types, use {@link #setTypes(List)} or {@link #setTypes(String[])}.
+ * Or, if you have single string of comma-separated types, call {@link #setTypes(String)}.
+ *
+ * After running, and checking wasCancelled(), you can query the selected types
+ * using one of:
+ *
+ * Note the types are remembered after running, so a subsequent run will result in the previous types
+ * being preselected, assuming you re-use the same instance of this class.
+ *
+ * @see org.eclipse.rse.ui.dialogs.SystemSelectFileTypesDialog
+ */
+public class SystemSelectFileTypesAction extends SystemBaseDialogAction
+{
+ protected List types = new ArrayList();
+
+ /**
+ * Constructor
+ * To set preselected types, use {@link #setTypes(List)} or {@link #setTypes(String[])}.
+ * Note the types are remember after running, so a subsequent run will result in the previous types
+ * being preselected.
+ */
+ public SystemSelectFileTypesAction(Shell shell)
+ {
+ super(SystemFileResources.ACTION_SELECTFILETYPES_LABEL, SystemFileResources.ACTION_SELECTFILETYPES_TOOLTIP, null, shell);
+ }
+
+ /**
+ * Set the current input types as a String array.
+ * Each type is a file name extension, without the dot, as in "java" or "class"
+ */
+ public void setTypes(String[] types)
+ {
+ this.types = Arrays.asList(types);
+ }
+ /**
+ * Set the current input types as a java.util List, such as ArrayList
+ * Each type is a file name extension, without the dot, as in "java" or "class"
+ */
+ public void setTypes(List types)
+ {
+ this.types = types;
+ }
+ /**
+ * Set the current input types given a comma-separated list as a single String.
+ */
+ public void setTypes(String typeString)
+ {
+ setTypes(RemoteFileFilterString.parseTypes(typeString));
+ }
+
+ /**
+ * Get the selected file types after running the action. Returns an ArrayList
+ */
+ public List getTypes()
+ {
+ return types;
+ }
+ /**
+ * Get the selected file types after running the action. Returns a String array
+ */
+ public String[] getTypesArray()
+ {
+ String[] typesArray = new String[types.size()];
+ Iterator i = types.iterator();
+ int idx=0;
+ while (i.hasNext())
+ typesArray[idx++] = (String)i.next();
+ return typesArray;
+ }
+ /**
+ * Get the selected file types as a concatenated list of strings, comma-separated
+ */
+ public String getTypesString()
+ {
+ return RemoteFileFilterString.getTypesString(getTypesArray());
+ }
+
+ /**
+ * Return true if the dialog was cancelled by the user.
+ * Only valid after calling run().
+ */
+ public boolean wasCancelled()
+ {
+ return (getValue() == null);
+ }
+
+
+ /**
+ * Create and return the dialog
+ */
+ public Dialog createDialog(Shell parent)
+ {
+ SystemSelectFileTypesDialog dialog =
+ new SystemSelectFileTypesDialog(getShell(), types);
+ return dialog;
+ }
+
+ /**
+ * Parent abstract method.
+ * Called after dialog runs, to retrieve the value from the dialog.
+ * Will return null if dialog cancelled.
+ */
+ public Object getDialogValue(Dialog dlg)
+ {
+ Object[] result = ((SystemSelectFileTypesDialog)dlg).getResult();
+ if (result != null)
+ {
+ types = new ArrayList(result.length);
+ for (int idx = 0; idx < result.length; idx++)
+ types.add(result[idx]);
+ return types;
+ }
+ else
+ return null;
+ }
+}
#P org.eclipse.rse.subsystems.files.core
Index: src/org/eclipse/rse/internal/subsystems/files/core/SystemFileAPIProviderImpl.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileAPIProviderImpl.java,v
retrieving revision 1.8
diff -u -r1.8 SystemFileAPIProviderImpl.java
--- src/org/eclipse/rse/internal/subsystems/files/core/SystemFileAPIProviderImpl.java 30 May 2007 18:09:33 -0000 1.8
+++ src/org/eclipse/rse/internal/subsystems/files/core/SystemFileAPIProviderImpl.java 3 Apr 2008 23:04:35 -0000
@@ -21,9 +21,9 @@
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.internal.ui.view.SystemAbstractAPIProvider;
import org.eclipse.rse.subsystems.files.core.model.ISystemFileAPIProvider;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
+import org.eclipse.rse.ui.view.SystemAbstractAPIProvider;
/**
ISystemProfile
. instance as adaptable object.
- */
- public SystemTeamViewProfileAdapter getProfileAdapter() {
- return profileAdapter;
- }
-}
\ No newline at end of file
Index: UI/org/eclipse/rse/internal/ui/view/SystemEmptyListAPIProviderImpl.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemEmptyListAPIProviderImpl.java,v
retrieving revision 1.4
diff -u -r1.4 SystemEmptyListAPIProviderImpl.java
--- UI/org/eclipse/rse/internal/ui/view/SystemEmptyListAPIProviderImpl.java 5 Jun 2007 20:59:59 -0000 1.4
+++ UI/org/eclipse/rse/internal/ui/view/SystemEmptyListAPIProviderImpl.java 3 Apr 2008 23:04:23 -0000
@@ -18,6 +18,7 @@
package org.eclipse.rse.internal.ui.view;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.model.ISystemViewInputProvider;
+import org.eclipse.rse.ui.view.SystemAbstractAPIProvider;
/**
Index: UI/org/eclipse/rse/internal/ui/view/SystemTableViewPart.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewPart.java,v
retrieving revision 1.28
diff -u -r1.28 SystemTableViewPart.java
--- UI/org/eclipse/rse/internal/ui/view/SystemTableViewPart.java 3 Apr 2008 16:03:35 -0000 1.28
+++ UI/org/eclipse/rse/internal/ui/view/SystemTableViewPart.java 3 Apr 2008 23:04:25 -0000
@@ -95,6 +95,7 @@
import org.eclipse.rse.ui.messages.ISystemMessageLine;
import org.eclipse.rse.ui.model.ISystemShellProvider;
import org.eclipse.rse.ui.view.IRSEViewPart;
+import org.eclipse.rse.ui.view.ISystemTableViewColumnManager;
import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
import org.eclipse.rse.ui.view.SystemTableView;
import org.eclipse.rse.ui.view.SystemTableViewProvider;
@@ -806,7 +807,7 @@
class SelectColumnsDialog extends SystemPromptDialog
{
private ISystemViewElementAdapter _adapter;
- private SystemTableViewColumnManager _columnManager;
+ private ISystemTableViewColumnManager _columnManager;
private IPropertyDescriptor[] _uniqueDescriptors;
private ArrayList _currentDisplayedDescriptors;
private ArrayList _availableDescriptors;
@@ -820,7 +821,7 @@
private Button _downButton;
- public SelectColumnsDialog(Shell shell, ISystemViewElementAdapter viewAdapter, SystemTableViewColumnManager columnManager)
+ public SelectColumnsDialog(Shell shell, ISystemViewElementAdapter viewAdapter, ISystemTableViewColumnManager columnManager)
{
super(shell, SystemResources.RESID_TABLE_SELECT_COLUMNS_LABEL);
setToolTipText(SystemResources.RESID_TABLE_SELECT_COLUMNS_TOOLTIP);
@@ -1092,7 +1093,7 @@
}
public void run()
{
- SystemTableViewColumnManager mgr = _viewer.getColumnManager();
+ ISystemTableViewColumnManager mgr = _viewer.getColumnManager();
ISystemViewElementAdapter adapter = _viewer.getAdapterForContents();
SelectColumnsDialog dlg = new SelectColumnsDialog(getShell(), adapter, mgr);
if (dlg.open() == Window.OK)
Index: UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForSubSystems.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForSubSystems.java,v
retrieving revision 1.3
diff -u -r1.3 SystemViewAPIProviderForSubSystems.java
--- UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForSubSystems.java 5 Jun 2007 11:36:52 -0000 1.3
+++ UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForSubSystems.java 3 Apr 2008 23:04:25 -0000
@@ -18,6 +18,7 @@
package org.eclipse.rse.internal.ui.view;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.subsystems.ISubSystem;
+import org.eclipse.rse.ui.view.SystemAbstractAPIProvider;
/**
Index: UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilterPools.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilterPools.java,v
retrieving revision 1.3
diff -u -r1.3 SystemViewAPIProviderForFilterPools.java
--- UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilterPools.java 5 Jun 2007 11:36:52 -0000 1.3
+++ UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilterPools.java 3 Apr 2008 23:04:25 -0000
@@ -20,6 +20,7 @@
import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.subsystems.ISubSystem;
+import org.eclipse.rse.ui.view.SystemAbstractAPIProvider;
/**
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
--- UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionInputProvider.java 11 Sep 2007 16:30:31 -0000 1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,142 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2007 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
- ********************************************************************************/
-
-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;
-
-
-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/internal/ui/view/SystemViewAPIProviderForConnections.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForConnections.java,v
retrieving revision 1.4
diff -u -r1.4 SystemViewAPIProviderForConnections.java
--- UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForConnections.java 30 May 2007 18:09:25 -0000 1.4
+++ UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForConnections.java 3 Apr 2008 23:04:25 -0000
@@ -17,6 +17,7 @@
package org.eclipse.rse.internal.ui.view;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.ui.view.SystemAbstractAPIProvider;
/**
* This class is a provider of root nodes to the remote systems tree viewer part.
Index: UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionForm.java
===================================================================
RCS file: UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionForm.java
diff -N UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionForm.java
--- UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionForm.java 11 Sep 2007 16:30:31 -0000 1.10
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,636 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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:
- * Kevin Doyle (IBM) - Added getSystemViewForm()
- * 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;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-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.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.SystemActionViewerFilter;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-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.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-import org.eclipse.rse.ui.widgets.SystemHostCombo;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-
-public class SystemResourceSelectionForm implements ISelectionChangedListener
-{
- 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 SystemHostCombo _connectionCombo;
- private SystemViewForm _systemViewForm;
- private Composite _propertySheetContainer;
- protected SystemPropertySheetForm _ps;
-
- private Text _pathText;
- private boolean _isValid;
- private ISystemMessageLine _msgLine;
- protected Object previousSelection = null;
- private IValidatorRemoteSelection _selectionValidator = null;
- private boolean showPropertySheet = false;
-
-
- protected Object caller;
- protected boolean callerInstanceOfWizardPage, callerInstanceOfSystemPromptDialog;
-
- protected String _verbiage = null;
- protected Label verbiageLabel;
- private Composite _container;
-
- // history
- private HashMap _history;
-
- // outputs
- protected IHost outputConnection = null;
- protected Object[] outputObjects = null;
-
-
- public SystemResourceSelectionForm(Shell shell, Composite parent, Object caller,
- SystemResourceSelectionInputProvider inputProvider, String verbiage,
- boolean multipleSelection,
- ISystemMessageLine msgLine)
- {
- _msgLine= msgLine;
- _history = new HashMap();
- _inputProvider = inputProvider;
- _multipleSelection = multipleSelection;
- _shell = shell;
- _verbiage = verbiage;
- this.caller = caller;
- callerInstanceOfWizardPage = (caller instanceof WizardPage);
- callerInstanceOfSystemPromptDialog = (caller instanceof SystemPromptDialog);
-
- createControls(parent);
- }
-
- public void setMessageLine(ISystemMessageLine msgLine)
- {
- _msgLine = msgLine;
- }
-
- /**
- * Return first selected object
- */
- public Object getSelectedObject()
- {
- if ((outputObjects != null) && (outputObjects.length>=1))
- return outputObjects[0];
- else
- return null;
- }
- /**
- * Return all selected objects.
- */
- public Object[] getSelectedObjects()
- {
- return outputObjects;
- }
-
- /**
- * Return the embedded System Tree object.
- * Will be null until createControls is called.
- */
- public SystemViewForm getSystemViewForm()
- {
- return _systemViewForm;
- }
-
- public void createControls(Composite parent)
- {
- _container = SystemWidgetHelpers.createComposite(parent, showPropertySheet ? 2 : 1);
- //Composite container = new Composite(parent, SWT.NULL);
-
-
- // INNER COMPOSITE
- int gridColumns = 2;
- Composite composite_prompts = SystemWidgetHelpers.createFlushComposite(_container, gridColumns);
-
- // PROPERTY SHEET COMPOSITE
- if (showPropertySheet)
- {
- createPropertySheet(_container, _shell);
- }
-
-
- // MESSAGE/VERBIAGE TEXT AT TOP
- verbiageLabel = SystemWidgetHelpers.createVerbiage(composite_prompts, _verbiage, gridColumns, false, PROMPT_WIDTH);
-
-
- boolean allowMultipleConnnections = _inputProvider.allowMultipleConnections();
- if (!allowMultipleConnnections)
- {
- //Label connectionLabel = SystemWidgetHelpers.createLabel(composite_prompts, _inputProvider.getSystemConnection().getHostName());
- }
- else
- {
- IRSESystemType[] systemTypes = _inputProvider.getSystemTypes();
- String category = _inputProvider.getCategory();
-
- if (systemTypes != null)
- {
- _connectionCombo = new SystemHostCombo(composite_prompts, SWT.NULL, systemTypes, _inputProvider.getSystemConnection(), _inputProvider.allowNewConnection());
- }
- else if (category != null)
- {
- _connectionCombo = new SystemHostCombo(composite_prompts, SWT.NULL, _inputProvider.getSystemConnection(), _inputProvider.allowNewConnection(), category);
- }
- else
- {
- _connectionCombo = new SystemHostCombo(composite_prompts, SWT.NULL,
- SystemWidgetHelpers.getValidSystemTypes(null),
- _inputProvider.getSystemConnection(),
- _inputProvider.allowNewConnection());
-
- }
- _connectionCombo.addSelectionListener(new SelectionAdapter()
- {
- public void widgetSelected(SelectionEvent evt)
- {
- IHost connection = _connectionCombo.getHost();
- connectionChanged(connection);
- }}
- );
- _connectionCombo.listenToConnectionEvents(true);
- }
-
- _pathText = SystemWidgetHelpers.createReadonlyTextField(composite_prompts);
- _systemViewForm = new SystemViewForm(_shell, composite_prompts, SWT.NULL, _inputProvider, !_multipleSelection, _msgLine);
- _systemViewForm.addSelectionChangedListener(this);
-
-
- GridLayout layout = new GridLayout();
- GridData gdata = new GridData(GridData.FILL_BOTH);
- composite_prompts.setLayout(layout);
- composite_prompts.setLayoutData(gdata);
-
- doInitializeFields();
- }
-
- private void doInitializeFields()
- {
- setPageComplete();
- return;
- }
-
- /**
- * Create the property sheet viewer
- */
- private void createPropertySheet(Composite outerParent, Shell shell)
- {
- _propertySheetContainer = SystemWidgetHelpers.createFlushComposite(outerParent, 1);
- ((GridData)_propertySheetContainer.getLayoutData()).grabExcessVerticalSpace = true;
- ((GridData)_propertySheetContainer.getLayoutData()).verticalAlignment = GridData.FILL;
-
- // PROPERTY SHEET VIEWER
- _ps = new SystemPropertySheetForm(shell,_propertySheetContainer, SWT.BORDER, _msgLine);
- }
-
- public Control getInitialFocusControl()
- {
- return _systemViewForm.getTreeControl();
- }
-
- public void applyViewerFilter(SystemActionViewerFilter filter)
- {
- if (filter != null)
- {
- _systemViewForm.getSystemView().addFilter(filter);
- }
- }
-
- /**
- * Completes processing of the wizard page or dialog. If this
- * method returns true, the wizard/dialog will close;
- * otherwise, it will stay active.
- *
- * @return true if no errors
- */
- public boolean verify()
- {
- if (_isValid)
- {
- if (_msgLine != null)
- {
- _msgLine.clearErrorMessage();
- }
- return true;
- }
- else
- {
- return false;
- }
- }
-
- protected ISystemViewElementAdapter getViewAdapter(Object selection)
- {
- if (selection != null && selection instanceof IAdaptable)
- {
- return (ISystemViewElementAdapter)((IAdaptable)selection).getAdapter(ISystemViewElementAdapter.class);
- }
- return null;
- }
-
- protected ISystemRemoteElementAdapter getRemoteAdapter(Object selection)
- {
- if (selection != null && selection instanceof IAdaptable)
- {
- return SystemAdapterHelpers.getRemoteAdapter(selection);
- }
- return null;
- }
-
- protected ISystemRemoteElementAdapter[] getRemoteAdapters(ISelection selection)
- {
- Object[] selectedObjects = getSelections(selection);
- ISystemRemoteElementAdapter[] adapters = new ISystemRemoteElementAdapter[selectedObjects.length];
- for (int idx=0; idx
- * In getChildren, return checkForEmptyList(children, parent, true/false)<.samp>
- * versus your array directly. This method checks for a null array which is
- * not allowed and replaces it with an empty array.
- * If true is passed then it returns the "Empty list" message object if the array is null or empty
- *
- * @param children The list of children.
- * @param parent The parent for the children.
- * @param returnNullMsg true
if an "Empty List" message should be returned.
- * @return The list of children, a list with the "Empty List" message object or an empty list.
- */
- protected Object[] checkForEmptyList(Object[] children, Object parent, boolean returnNullMsg) {
- if ((children == null) || (children.length == 0)) {
- if (fPrefStore == null) {
- fPrefStore = RSEUIPlugin.getDefault().getPluginPreferences();
- }
- if (!returnNullMsg
- || (fPrefStore != null && !fPrefStore
- .getBoolean(ISystemPreferencesConstants.SHOW_EMPTY_LISTS))) {
- return emptyList;
- } else {
- return new Object[] {
- new SystemMessageObject(
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_EMPTY),
- ISystemMessageObject.MSGTYPE_EMPTY,
- parent)};
- }
- }
- return children;
- }
-
- /**
- * In getChildren, return checkForNull(children, true/false) vs your array directly.
- * This method checks for a null array which not allow and replaces it with an empty array.
- * If true is passed then it returns the "Empty list" message object if the array is null or empty
- *
- * @deprecated Use {@link #checkForEmptyList(Object[], Object, boolean)} instead.
- */
- protected Object[] checkForNull(Object[] children, boolean returnNullMsg)
- {
- if ((children == null) || (children.length==0))
- {
- if (!returnNullMsg)
- return emptyList;
- else
- {
- if (nullObject == null)
- initMsgObjects();
- msgList[0] = nullObject;
- return msgList;
- }
- }
- else
- return children;
- }
-
- /**
- * Return the "Operation cancelled by user" msg as an object array so can be used to answer getChildren()
- */
- protected Object[] getCancelledMessageObject()
- {
- if (canceledObject == null)
- initMsgObjects();
- msgList[0] = canceledObject;
- return msgList;
- }
-
- /**
- * Return the "Operation failed" msg as an object array so can be used to answer getChildren()
- */
- protected Object[] getFailedMessageObject()
- {
- if (errorObject == null)
- initMsgObjects();
- msgList[0] = errorObject;
- return msgList;
- }
-
- /**
- * Return true if we are listing connections or not, so we know whether we are interested in
- * connection-add events
- */
- public boolean showingConnections()
- {
- return false;
- }
-
- // ------------------
- // HELPER METHODS...
- // ------------------
- /**
- * Returns the implementation of ISystemViewElement for the given
- * object. Returns null if the adapter is not defined or the
- * object is not adaptable.
- */
- protected ISystemViewElementAdapter getViewAdapter(Object o)
- {
- return SystemAdapterHelpers.getViewAdapter(o);
- }
-
- /**
- * Returns the implementation of ISystemRemoteElement for the given
- * object. Returns null if this object does not adaptable to this.
- */
- protected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
- {
- return SystemAdapterHelpers.getRemoteAdapter(o);
- }
-}
\ No newline at end of file
Index: UI/org/eclipse/rse/internal/ui/filters/SystemFilterPoolDialogOutputs.java
===================================================================
RCS file: UI/org/eclipse/rse/internal/ui/filters/SystemFilterPoolDialogOutputs.java
diff -N UI/org/eclipse/rse/internal/ui/filters/SystemFilterPoolDialogOutputs.java
--- UI/org/eclipse/rse/internal/ui/filters/SystemFilterPoolDialogOutputs.java 5 Jun 2007 11:36:53 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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:
- * {Name} (company) - description of contribution.
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.filters;
-//import org.eclipse.rse.core.*;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
-
-
-
-/**
- * A class capturing the attributes commonly returned by dialogs that
- * work with filter pools.
- */
-public class SystemFilterPoolDialogOutputs
-{
-
-
- public String filterPoolName;
- public String filterPoolManagerName;
- public SystemSimpleContentElement filterPoolTreeRoot;
- public ISystemFilterPool newPool;
-}
Index: UI/org/eclipse/rse/internal/ui/filters/SystemFilterPoolDialogInterface.java
===================================================================
RCS file: UI/org/eclipse/rse/internal/ui/filters/SystemFilterPoolDialogInterface.java
diff -N UI/org/eclipse/rse/internal/ui/filters/SystemFilterPoolDialogInterface.java
--- UI/org/eclipse/rse/internal/ui/filters/SystemFilterPoolDialogInterface.java 5 Jun 2007 11:36:53 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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:
- * {Name} (company) - description of contribution.
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.filters;
-import org.eclipse.rse.ui.filters.actions.SystemFilterAbstractFilterPoolAction;
-
-
-/**
- * Common interface for dialogs or wizards that work with filter pools.
- */
-public interface SystemFilterPoolDialogInterface
-{
-
-
- /**
- * Allow base action to pass instance of itself for callback to get info
- */
- public void setFilterPoolDialogActionCaller(SystemFilterAbstractFilterPoolAction caller);
- /**
- * Return an object containing user-specified information pertinent to filter pool actions
- */
- public SystemFilterPoolDialogOutputs getFilterPoolDialogOutputs();
- /**
- * Set the help context id for this wizard
- */
- public void setHelpContextId(String id);
-}
Index: UI/org/eclipse/rse/internal/ui/filters/SystemFilterPoolDialogInputs.java
===================================================================
RCS file: UI/org/eclipse/rse/internal/ui/filters/SystemFilterPoolDialogInputs.java
diff -N UI/org/eclipse/rse/internal/ui/filters/SystemFilterPoolDialogInputs.java
--- UI/org/eclipse/rse/internal/ui/filters/SystemFilterPoolDialogInputs.java 5 Jun 2007 11:36:53 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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:
- * {Name} (company) - description of contribution.
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.filters;
-//import org.eclipse.rse.core.*;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
-import org.eclipse.rse.ui.filters.dialogs.SystemFilterDialogInputs;
-
-
-
-/**
- * A class capturing the attributes commonly needed by dialogs that
- * work with filter pools.
- */
-public class SystemFilterPoolDialogInputs extends SystemFilterDialogInputs
-{
-
-
- public ISystemFilterPoolManagerProvider poolManagerProvider = null;
- public ISystemFilterPoolManager[] poolManagers = null;
- public ISystemFilterPoolReferenceManager refManager = null;
- public int mgrSelection = 0;
- public String poolNamePrompt;
- public String poolNameTip;
- public String poolMgrNamePrompt;
- public String poolMgrNameTip;
-
- public SystemSimpleContentElement filterPoolTreeRoot;
-}
Index: UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterNewFilterPoolWizardMainPageInterface.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterNewFilterPoolWizardMainPageInterface.java,v
retrieving revision 1.2
diff -u -r1.2 SystemFilterNewFilterPoolWizardMainPageInterface.java
--- UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterNewFilterPoolWizardMainPageInterface.java 5 Jun 2007 11:36:53 -0000 1.2
+++ UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterNewFilterPoolWizardMainPageInterface.java 3 Apr 2008 23:04:23 -0000
@@ -18,7 +18,7 @@
package org.eclipse.rse.internal.ui.filters.dialogs;
import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.internal.ui.filters.SystemFilterPoolDialogOutputs;
+import org.eclipse.rse.ui.filters.SystemFilterPoolDialogOutputs;
import org.eclipse.rse.ui.validators.ISystemValidator;
import org.eclipse.rse.ui.wizards.ISystemWizardPage;
Index: UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterNewFilterPoolWizardDefaultMainPage.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterNewFilterPoolWizardDefaultMainPage.java,v
retrieving revision 1.5
diff -u -r1.5 SystemFilterNewFilterPoolWizardDefaultMainPage.java
--- UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterNewFilterPoolWizardDefaultMainPage.java 14 Mar 2008 18:23:32 -0000 1.5
+++ UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterNewFilterPoolWizardDefaultMainPage.java 3 Apr 2008 23:04:23 -0000
@@ -19,9 +19,9 @@
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.filters.SystemFilterPoolDialogOutputs;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.ui.SystemWidgetHelpers;
+import org.eclipse.rse.ui.filters.SystemFilterPoolDialogOutputs;
import org.eclipse.rse.ui.filters.actions.SystemFilterAbstractFilterPoolAction;
import org.eclipse.rse.ui.validators.ISystemValidator;
import org.eclipse.rse.ui.validators.ValidatorFilterPoolName;
Index: UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterWorkWithFilterPoolsDialog.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterWorkWithFilterPoolsDialog.java,v
retrieving revision 1.8
diff -u -r1.8 SystemFilterWorkWithFilterPoolsDialog.java
--- UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterWorkWithFilterPoolsDialog.java 12 Feb 2008 23:06:32 -0000 1.8
+++ UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterWorkWithFilterPoolsDialog.java 3 Apr 2008 23:04:23 -0000
@@ -43,8 +43,6 @@
import org.eclipse.rse.internal.ui.actions.SystemFilterMoveFilterPoolAction;
import org.eclipse.rse.internal.ui.actions.SystemFilterNewFilterPoolAction;
import org.eclipse.rse.internal.ui.actions.SystemFilterWorkWithFilterPoolsRefreshAllAction;
-import org.eclipse.rse.internal.ui.filters.SystemFilterPoolDialogInterface;
-import org.eclipse.rse.internal.ui.filters.SystemFilterPoolDialogOutputs;
import org.eclipse.rse.internal.ui.filters.SystemFilterPoolManagerUIProvider;
import org.eclipse.rse.internal.ui.filters.SystemFilterWorkWithFilterPoolsTreeViewer;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
@@ -58,6 +56,8 @@
import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
import org.eclipse.rse.ui.dialogs.SystemSimpleContentProvider;
+import org.eclipse.rse.ui.filters.SystemFilterPoolDialogInterface;
+import org.eclipse.rse.ui.filters.SystemFilterPoolDialogOutputs;
import org.eclipse.rse.ui.filters.SystemFilterUIHelpers;
import org.eclipse.rse.ui.filters.actions.SystemFilterAbstractFilterPoolAction;
import org.eclipse.rse.ui.messages.ISystemMessageLine;
Index: UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterNewFilterPoolWizard.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterNewFilterPoolWizard.java,v
retrieving revision 1.3
diff -u -r1.3 SystemFilterNewFilterPoolWizard.java
--- UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterNewFilterPoolWizard.java 5 Jun 2007 11:36:53 -0000 1.3
+++ UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterNewFilterPoolWizard.java 3 Apr 2008 23:04:23 -0000
@@ -21,12 +21,13 @@
import org.eclipse.rse.core.filters.ISystemFilterPool;
import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.filters.SystemFilterPoolDialogOutputs;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.ui.ISystemIconConstants;
import org.eclipse.rse.ui.ISystemMessages;
import org.eclipse.rse.ui.RSEUIPlugin;
+import org.eclipse.rse.ui.filters.SystemFilterPoolDialogOutputs;
import org.eclipse.rse.ui.filters.actions.SystemFilterAbstractFilterPoolAction;
+import org.eclipse.rse.ui.filters.dialogs.SystemFilterPoolWizardInterface;
import org.eclipse.rse.ui.messages.SystemMessageDialog;
import org.eclipse.rse.ui.validators.ValidatorFolderName;
import org.eclipse.rse.ui.wizards.AbstractSystemWizard;
Index: UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterPoolWizardDialog.java
===================================================================
RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterPoolWizardDialog.java,v
retrieving revision 1.3
diff -u -r1.3 SystemFilterPoolWizardDialog.java
--- UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterPoolWizardDialog.java 5 Jun 2007 11:36:53 -0000 1.3
+++ UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterPoolWizardDialog.java 3 Apr 2008 23:04:23 -0000
@@ -16,10 +16,11 @@
*******************************************************************************/
package org.eclipse.rse.internal.ui.filters.dialogs;
-import org.eclipse.rse.internal.ui.filters.SystemFilterPoolDialogInterface;
-import org.eclipse.rse.internal.ui.filters.SystemFilterPoolDialogOutputs;
import org.eclipse.rse.ui.dialogs.SystemWizardDialog;
+import org.eclipse.rse.ui.filters.SystemFilterPoolDialogInterface;
+import org.eclipse.rse.ui.filters.SystemFilterPoolDialogOutputs;
import org.eclipse.rse.ui.filters.actions.SystemFilterAbstractFilterPoolAction;
+import org.eclipse.rse.ui.filters.dialogs.SystemFilterPoolWizardInterface;
import org.eclipse.swt.widgets.Shell;
Index: UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemNewFilterWizardNamePage.java
===================================================================
RCS file: UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemNewFilterWizardNamePage.java
diff -N UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemNewFilterWizardNamePage.java
--- UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemNewFilterWizardNamePage.java 12 Feb 2008 23:06:32 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,485 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 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 Dykstal (IBM) - [160403] filters should be connection private by default
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.filters.dialogs;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolSelectionValidator;
-import org.eclipse.rse.core.filters.ISystemFilterPoolWrapper;
-import org.eclipse.rse.core.filters.ISystemFilterPoolWrapperInformation;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.filters.dialogs.ISystemNewFilterWizardConfigurator;
-import org.eclipse.rse.ui.filters.dialogs.SystemNewFilterWizard;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.wizards.AbstractSystemWizardPage;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-
-
-
-/**
- * Second page of the New Filter wizard that prompts for the name of the filter.
- */
-public class SystemNewFilterWizardNamePage
- extends AbstractSystemWizardPage
- implements SelectionListener
-{
-
- protected Text nameText;
- protected Button uniqueCB;
- protected Label poolVerbiage;
- protected Label poolComboLabel;
- protected Combo poolWrapperCombo;
- protected Combo poolCombo;
- protected SystemMessage errorMessage;
- protected String inputFilterName;
- protected boolean contentsCreated;
- protected boolean userEditedName;
- protected boolean ignoreChanges;
- protected ISystemValidator nameValidator;
- protected ISystemValidator[] nameValidators;
- protected ISystemFilterPoolSelectionValidator filterPoolSelectionValidator;
- protected ISystemFilterPool[] poolsToSelectFrom = null;
- protected ISystemFilterPoolWrapper[] poolWrappers = null;
- protected ISystemFilterPoolWrapperInformation poolWrapperInformation;
- protected ISystemFilterPool parentPool = null;
- private ISystemNewFilterWizardConfigurator configurator;
-
- /**
- * Constructor.
- */
- public SystemNewFilterWizardNamePage(SystemNewFilterWizard wizard, ISystemFilterPool parentPool, ISystemNewFilterWizardConfigurator data)
- {
- super(wizard, "SetNewFilterName", data.getPage2Title(), data.getPage2Description()); //$NON-NLS-1$
- this.parentPool = parentPool;
- this.configurator = data;
- setHelp(data.getPage2HelpID());
- }
-
- // ---------------------------------
- // INPUT METHODS...
- // ---------------------------------
- /**
- * Set the filter name to default the entry field to
- */
- public void setFilterName(String filterName)
- {
- this.inputFilterName = filterName;
- if (nameText != null)
- nameText.setText(inputFilterName);
- }
- /**
- * Set the validator to use to verify the filter name is correct
- */
- public void setFilterNameValidator(ISystemValidator nameValidator)
- {
- this.nameValidator = nameValidator;
- }
- /**
- * Call if you want to allow the user to select the filter pool to create this filter in.
- */
- public void setAllowFilterPoolSelection(ISystemFilterPool[] poolsToSelectFrom,
- ISystemValidator[] nameValidators)
- {
- this.poolsToSelectFrom = poolsToSelectFrom;
- this.nameValidators = nameValidators;
- if ((poolsToSelectFrom != null) && (poolsToSelectFrom.length>0))
- {
- if (parentPool == null)
- parentPool = poolsToSelectFrom[0];
- }
- }
- /**
- * This is an alternative to {@link #setAllowFilterPoolSelection(ISystemFilterPool[], ISystemValidator[])}
- * 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/ui/filters/SystemFilterPoolDialogInterface.java
===================================================================
RCS file: UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogInterface.java
diff -N UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogInterface.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogInterface.java 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2007 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:
+ * {Name} (company) - description of contribution.
+ *******************************************************************************/
+
+package org.eclipse.rse.ui.filters;
+import org.eclipse.rse.ui.filters.actions.SystemFilterAbstractFilterPoolAction;
+
+
+/**
+ * Common interface for dialogs or wizards that work with filter pools.
+ */
+public interface SystemFilterPoolDialogInterface
+{
+
+
+ /**
+ * Allow base action to pass instance of itself for callback to get info
+ */
+ public void setFilterPoolDialogActionCaller(SystemFilterAbstractFilterPoolAction caller);
+ /**
+ * Return an object containing user-specified information pertinent to filter pool actions
+ */
+ public SystemFilterPoolDialogOutputs getFilterPoolDialogOutputs();
+ /**
+ * Set the help context id for this wizard
+ */
+ public void setHelpContextId(String id);
+}
Index: UI/org/eclipse/rse/ui/view/SystemViewAdapterFactory.java
===================================================================
RCS file: UI/org/eclipse/rse/ui/view/SystemViewAdapterFactory.java
diff -N UI/org/eclipse/rse/ui/view/SystemViewAdapterFactory.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ UI/org/eclipse/rse/ui/view/SystemViewAdapterFactory.java 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,178 @@
+/********************************************************************************
+ * Copyright (c) 2006, 2007 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) - [168975] Move RSE Events API to Core
+ * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
+ * Xuan Chen (IBM) - [222263] Need to provide a PropertySet Adapter for System Team View
+ ********************************************************************************/
+
+package org.eclipse.rse.ui.view;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.core.runtime.IAdapterManager;
+import org.eclipse.rse.core.filters.ISystemFilter;
+import org.eclipse.rse.core.filters.ISystemFilterPool;
+import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
+import org.eclipse.rse.core.filters.ISystemFilterReference;
+import org.eclipse.rse.core.filters.ISystemFilterString;
+import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.core.model.ISystemMessageObject;
+import org.eclipse.rse.core.model.ISystemProfile;
+import org.eclipse.rse.core.model.ISystemViewInputProvider;
+import org.eclipse.rse.core.subsystems.ISubSystem;
+import org.eclipse.rse.core.subsystems.ISystemDragDropAdapter;
+import org.eclipse.rse.internal.ui.view.SystemViewConnectionAdapter;
+import org.eclipse.rse.internal.ui.view.SystemViewFilterAdapter;
+import org.eclipse.rse.internal.ui.view.SystemViewFilterPoolAdapter;
+import org.eclipse.rse.internal.ui.view.SystemViewFilterPoolReferenceAdapter;
+import org.eclipse.rse.internal.ui.view.SystemViewFilterReferenceAdapter;
+import org.eclipse.rse.internal.ui.view.SystemViewFilterStringAdapter;
+import org.eclipse.rse.internal.ui.view.SystemViewMessageAdapter;
+import org.eclipse.rse.internal.ui.view.SystemViewNewConnectionPromptAdapter;
+import org.eclipse.rse.internal.ui.view.SystemViewPromptableAdapter;
+import org.eclipse.rse.internal.ui.view.SystemViewRootInputAdapter;
+import org.eclipse.rse.internal.ui.view.SystemViewSubSystemAdapter;
+import org.eclipse.rse.internal.ui.view.team.SystemTeamViewCategoryAdapter;
+import org.eclipse.rse.internal.ui.view.team.SystemTeamViewCategoryNode;
+import org.eclipse.rse.internal.ui.view.team.SystemTeamViewProfileAdapter;
+import org.eclipse.rse.internal.ui.view.team.SystemTeamViewPropertySetAdapter;
+import org.eclipse.rse.internal.ui.view.team.SystemTeamViewPropertySetNode;
+import org.eclipse.rse.internal.ui.view.team.SystemTeamViewSubSystemConfigurationAdapter;
+import org.eclipse.rse.internal.ui.view.team.SystemTeamViewSubSystemConfigurationNode;
+import org.eclipse.rse.ui.SystemBasePlugin;
+import org.eclipse.rse.ui.internal.model.SystemNewConnectionPromptObject;
+import org.eclipse.rse.ui.model.ISystemPromptableObject;
+import org.eclipse.ui.IActionFilter;
+import org.eclipse.ui.model.IWorkbenchAdapter;
+import org.eclipse.ui.progress.IDeferredWorkbenchAdapter;
+import org.eclipse.ui.views.properties.IPropertySource;
+
+/**
+ * This factory maps requests for an adapter object from a given
+ * element object.
+ */
+public class SystemViewAdapterFactory implements IAdapterFactory {
+
+ private SystemViewRootInputAdapter rootAdapter = new SystemViewRootInputAdapter();
+ private SystemViewConnectionAdapter connectionAdapter = new SystemViewConnectionAdapter();
+ private SystemViewSubSystemAdapter subsystemAdapter = new SystemViewSubSystemAdapter();
+ private SystemViewFilterPoolAdapter filterPoolAdapter = new SystemViewFilterPoolAdapter();
+ private SystemViewFilterAdapter filterAdapter = new SystemViewFilterAdapter();
+ private SystemViewFilterPoolReferenceAdapter filterPoolReferenceAdapter = new SystemViewFilterPoolReferenceAdapter();
+ private SystemViewFilterReferenceAdapter filterReferenceAdapter = new SystemViewFilterReferenceAdapter();
+ private SystemViewMessageAdapter msgAdapter = new SystemViewMessageAdapter();
+ private SystemViewPromptableAdapter promptAdapter = new SystemViewPromptableAdapter();
+ private SystemViewNewConnectionPromptAdapter newConnPromptAdapter = new SystemViewNewConnectionPromptAdapter();
+ private SystemTeamViewProfileAdapter profileAdapter = new SystemTeamViewProfileAdapter();
+ private SystemTeamViewCategoryAdapter categoryAdapter = new SystemTeamViewCategoryAdapter();
+ private SystemTeamViewSubSystemConfigurationAdapter subsysFactoryAdapter = new SystemTeamViewSubSystemConfigurationAdapter();
+ private SystemTeamViewPropertySetAdapter propertySetAdapter = new SystemTeamViewPropertySetAdapter();
+
+ private SystemViewFilterStringAdapter filterStringAdapter = new SystemViewFilterStringAdapter();
+
+ /**
+ * @see IAdapterFactory#getAdapterList()
+ */
+ public Class[] getAdapterList() {
+ return new Class[] { ISystemViewElementAdapter.class, ISystemDragDropAdapter.class, IPropertySource.class, IWorkbenchAdapter.class,
+ IActionFilter.class, IDeferredWorkbenchAdapter.class };
+ }
+
+ /**
+ * Called by our plugin's startup method to register our adaptable object types
+ * with the platform. We prefer to do it here to isolate/encapsulate all factory
+ * logic in this one place.
+ * @param manager the adapter manager controlling this factory
+ */
+ public void registerWithManager(IAdapterManager manager) {
+ manager.registerAdapters(this, ISystemViewInputProvider.class);
+ manager.registerAdapters(this, ISystemProfile.class);
+ manager.registerAdapters(this, IHost.class);
+ manager.registerAdapters(this, ISubSystem.class);
+ manager.registerAdapters(this, ISystemFilter.class);
+ manager.registerAdapters(this, ISystemFilterPool.class);
+ manager.registerAdapters(this, ISystemFilterPoolReference.class);
+ manager.registerAdapters(this, ISystemFilterReference.class);
+ manager.registerAdapters(this, ISystemFilterString.class);
+ manager.registerAdapters(this, ISystemMessageObject.class);
+ manager.registerAdapters(this, ISystemPromptableObject.class);
+ manager.registerAdapters(this, SystemTeamViewCategoryNode.class);
+ manager.registerAdapters(this, SystemTeamViewSubSystemConfigurationNode.class);
+ manager.registerAdapters(this, SystemTeamViewPropertySetNode.class);
+
+ // FIXME - UDAs no longer in core
+ //manager.registerAdapters(this, SystemTeamViewCompileTypeNode.class);
+ //manager.registerAdapters(this, SystemTeamViewCompileCommandNode.class);
+ //manager.registerAdapters(this, SystemUDActionElement.class);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
+ */
+ public Object getAdapter(Object adaptableObject, Class adapterType) {
+ Object adapter = null;
+ if (adaptableObject instanceof ISystemViewElementAdapter)
+ adapter = adaptableObject;
+ else if (adaptableObject instanceof ISystemDragDropAdapter)
+ adapter = adaptableObject;
+ else if (adaptableObject instanceof ISystemViewInputProvider)
+ adapter = rootAdapter;
+ else if (adaptableObject instanceof ISystemProfile)
+ adapter = profileAdapter;
+ else if (adaptableObject instanceof IHost)
+ adapter = connectionAdapter;
+ else if (adaptableObject instanceof ISubSystem)
+ adapter = subsystemAdapter;
+ else if (adaptableObject instanceof ISystemFilterPoolReference)
+ adapter = filterPoolReferenceAdapter;
+ else if (adaptableObject instanceof ISystemFilterPool)
+ adapter = filterPoolAdapter;
+ else if (adaptableObject instanceof ISystemFilterReference)
+ adapter = filterReferenceAdapter;
+ else if (adaptableObject instanceof ISystemFilterString)
+ adapter = filterStringAdapter;
+ else if (adaptableObject instanceof ISystemFilter)
+ adapter = filterAdapter;
+ else if (adaptableObject instanceof ISystemMessageObject)
+ adapter = msgAdapter;
+ else if (adaptableObject instanceof ISystemPromptableObject) {
+
+ if (adaptableObject instanceof SystemNewConnectionPromptObject) {
+ adapter = newConnPromptAdapter;
+ } else {
+ adapter = promptAdapter;
+ }
+ } else if (adaptableObject instanceof SystemTeamViewCategoryNode)
+ adapter = categoryAdapter;
+ else if (adaptableObject instanceof SystemTeamViewSubSystemConfigurationNode) adapter = subsysFactoryAdapter;
+ else if (adaptableObject instanceof SystemTeamViewPropertySetNode) adapter = propertySetAdapter;
+
+ /** FIXME - UDAs no longer in core
+ else if (adaptableObject instanceof SystemTeamViewCompileTypeNode)
+ adapter = getCompileTypeAdapter();
+ else if (adaptableObject instanceof SystemTeamViewCompileCommandNode)
+ adapter = getCompileCommandAdapter();
+ else if (adaptableObject instanceof SystemUDActionElement)
+ adapter = getUserActionAdapter();
+ */
+
+ if ((adapter != null) && (adapterType == IPropertySource.class)) {
+ ((ISystemViewElementAdapter) adapter).setPropertySourceInput(adaptableObject);
+ } else if (adapter == null) {
+ SystemBasePlugin.logWarning("No adapter found for object of type: " + adaptableObject.getClass().getName()); //$NON-NLS-1$
+ }
+ return adapter;
+ }
+
+
+}
Index: UI/org/eclipse/rse/ui/view/ISystemTableViewColumnManager.java
===================================================================
RCS file: UI/org/eclipse/rse/ui/view/ISystemTableViewColumnManager.java
diff -N UI/org/eclipse/rse/ui/view/ISystemTableViewColumnManager.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ UI/org/eclipse/rse/ui/view/ISystemTableViewColumnManager.java 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,23 @@
+/********************************************************************************
+ * 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:
+ * {Name} (company) - description of contribution.
+ ********************************************************************************/
+package org.eclipse.rse.ui.view;
+
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+
+public interface ISystemTableViewColumnManager {
+
+ public IPropertyDescriptor[] getVisibleDescriptors(ISystemViewElementAdapter adapter);
+
+ public void setCustomDescriptors(ISystemViewElementAdapter adapter, IPropertyDescriptor[] descriptors);
+}
Index: UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardNamePage.java
===================================================================
RCS file: UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardNamePage.java
diff -N UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardNamePage.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardNamePage.java 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,483 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 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 Dykstal (IBM) - [160403] filters should be connection private by default
+ *******************************************************************************/
+
+package org.eclipse.rse.ui.filters.dialogs;
+import org.eclipse.rse.core.filters.ISystemFilterPool;
+import org.eclipse.rse.core.filters.ISystemFilterPoolSelectionValidator;
+import org.eclipse.rse.core.filters.ISystemFilterPoolWrapper;
+import org.eclipse.rse.core.filters.ISystemFilterPoolWrapperInformation;
+import org.eclipse.rse.services.clientserver.messages.SystemMessage;
+import org.eclipse.rse.ui.SystemWidgetHelpers;
+import org.eclipse.rse.ui.validators.ISystemValidator;
+import org.eclipse.rse.ui.wizards.AbstractSystemWizardPage;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+
+
+
+/**
+ * Second page of the New Filter wizard that prompts for the name of the filter.
+ */
+public class SystemNewFilterWizardNamePage
+ extends AbstractSystemWizardPage
+ implements SelectionListener
+{
+
+ protected Text nameText;
+ protected Button uniqueCB;
+ protected Label poolVerbiage;
+ protected Label poolComboLabel;
+ protected Combo poolWrapperCombo;
+ protected Combo poolCombo;
+ protected SystemMessage errorMessage;
+ protected String inputFilterName;
+ protected boolean contentsCreated;
+ protected boolean userEditedName;
+ protected boolean ignoreChanges;
+ protected ISystemValidator nameValidator;
+ protected ISystemValidator[] nameValidators;
+ protected ISystemFilterPoolSelectionValidator filterPoolSelectionValidator;
+ protected ISystemFilterPool[] poolsToSelectFrom = null;
+ protected ISystemFilterPoolWrapper[] poolWrappers = null;
+ protected ISystemFilterPoolWrapperInformation poolWrapperInformation;
+ protected ISystemFilterPool parentPool = null;
+ private ISystemNewFilterWizardConfigurator configurator;
+
+ /**
+ * Constructor.
+ */
+ public SystemNewFilterWizardNamePage(SystemNewFilterWizard wizard, ISystemFilterPool parentPool, ISystemNewFilterWizardConfigurator data)
+ {
+ super(wizard, "SetNewFilterName", data.getPage2Title(), data.getPage2Description()); //$NON-NLS-1$
+ this.parentPool = parentPool;
+ this.configurator = data;
+ setHelp(data.getPage2HelpID());
+ }
+
+ // ---------------------------------
+ // INPUT METHODS...
+ // ---------------------------------
+ /**
+ * Set the filter name to default the entry field to
+ */
+ public void setFilterName(String filterName)
+ {
+ this.inputFilterName = filterName;
+ if (nameText != null)
+ nameText.setText(inputFilterName);
+ }
+ /**
+ * Set the validator to use to verify the filter name is correct
+ */
+ public void setFilterNameValidator(ISystemValidator nameValidator)
+ {
+ this.nameValidator = nameValidator;
+ }
+ /**
+ * Call if you want to allow the user to select the filter pool to create this filter in.
+ */
+ public void setAllowFilterPoolSelection(ISystemFilterPool[] poolsToSelectFrom,
+ ISystemValidator[] nameValidators)
+ {
+ this.poolsToSelectFrom = poolsToSelectFrom;
+ this.nameValidators = nameValidators;
+ if ((poolsToSelectFrom != null) && (poolsToSelectFrom.length>0))
+ {
+ if (parentPool == null)
+ parentPool = poolsToSelectFrom[0];
+ }
+ }
+ /**
+ * This is an alternative to {@link #setAllowFilterPoolSelection(ISystemFilterPool[], ISystemValidator[])}
+ *
+ * In getChildren, return checkForEmptyList(children, parent, true/false)<.samp>
+ * versus your array directly. This method checks for a null array which is
+ * not allowed and replaces it with an empty array.
+ * If true is passed then it returns the "Empty list" message object if the array is null or empty
+ *
+ * @param children The list of children.
+ * @param parent The parent for the children.
+ * @param returnNullMsg true
if an "Empty List" message should be returned.
+ * @return The list of children, a list with the "Empty List" message object or an empty list.
+ */
+ protected Object[] checkForEmptyList(Object[] children, Object parent, boolean returnNullMsg) {
+ if ((children == null) || (children.length == 0)) {
+ if (fPrefStore == null) {
+ fPrefStore = RSEUIPlugin.getDefault().getPluginPreferences();
+ }
+ if (!returnNullMsg
+ || (fPrefStore != null && !fPrefStore
+ .getBoolean(ISystemPreferencesConstants.SHOW_EMPTY_LISTS))) {
+ return emptyList;
+ } else {
+ return new Object[] {
+ new SystemMessageObject(
+ RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_EMPTY),
+ ISystemMessageObject.MSGTYPE_EMPTY,
+ parent)};
+ }
+ }
+ return children;
+ }
+
+ /**
+ * In getChildren, return checkForNull(children, true/false) vs your array directly.
+ * This method checks for a null array which not allow and replaces it with an empty array.
+ * If true is passed then it returns the "Empty list" message object if the array is null or empty
+ *
+ * @deprecated Use {@link #checkForEmptyList(Object[], Object, boolean)} instead.
+ */
+ protected Object[] checkForNull(Object[] children, boolean returnNullMsg)
+ {
+ if ((children == null) || (children.length==0))
+ {
+ if (!returnNullMsg)
+ return emptyList;
+ else
+ {
+ if (nullObject == null)
+ initMsgObjects();
+ msgList[0] = nullObject;
+ return msgList;
+ }
+ }
+ else
+ return children;
+ }
+
+ /**
+ * Return the "Operation cancelled by user" msg as an object array so can be used to answer getChildren()
+ */
+ protected Object[] getCancelledMessageObject()
+ {
+ if (canceledObject == null)
+ initMsgObjects();
+ msgList[0] = canceledObject;
+ return msgList;
+ }
+
+ /**
+ * Return the "Operation failed" msg as an object array so can be used to answer getChildren()
+ */
+ protected Object[] getFailedMessageObject()
+ {
+ if (errorObject == null)
+ initMsgObjects();
+ msgList[0] = errorObject;
+ return msgList;
+ }
+
+ /**
+ * Return true if we are listing connections or not, so we know whether we are interested in
+ * connection-add events
+ */
+ public boolean showingConnections()
+ {
+ return false;
+ }
+
+ // ------------------
+ // HELPER METHODS...
+ // ------------------
+ /**
+ * Returns the implementation of ISystemViewElement for the given
+ * object. Returns null if the adapter is not defined or the
+ * object is not adaptable.
+ */
+ protected ISystemViewElementAdapter getViewAdapter(Object o)
+ {
+ return SystemAdapterHelpers.getViewAdapter(o);
+ }
+
+ /**
+ * Returns the implementation of ISystemRemoteElement for the given
+ * object. Returns null if this object does not adaptable to this.
+ */
+ protected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
+ {
+ return SystemAdapterHelpers.getRemoteAdapter(o);
+ }
+}
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
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ UI/org/eclipse/rse/ui/view/SystemResourceSelectionInputProvider.java 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,142 @@
+/********************************************************************************
+ * Copyright (c) 2004, 2007 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
+ ********************************************************************************/
+
+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;
+ }
+
+
+}
Index: UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogOutputs.java
===================================================================
RCS file: UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogOutputs.java
diff -N UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogOutputs.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogOutputs.java 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2007 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:
+ * {Name} (company) - description of contribution.
+ *******************************************************************************/
+
+package org.eclipse.rse.ui.filters;
+//import org.eclipse.rse.core.*;
+import org.eclipse.rse.core.filters.ISystemFilterPool;
+import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
+
+
+
+/**
+ * A class capturing the attributes commonly returned by dialogs that
+ * work with filter pools.
+ */
+public class SystemFilterPoolDialogOutputs
+{
+
+
+ public String filterPoolName;
+ public String filterPoolManagerName;
+ public SystemSimpleContentElement filterPoolTreeRoot;
+ public ISystemFilterPool newPool;
+}
Index: UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterPoolWizardInterface.java
===================================================================
RCS file: UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterPoolWizardInterface.java
diff -N UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterPoolWizardInterface.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterPoolWizardInterface.java 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2007 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:
+ * {Name} (company) - description of contribution.
+ *******************************************************************************/
+
+package org.eclipse.rse.ui.filters.dialogs;
+import org.eclipse.rse.ui.filters.SystemFilterPoolDialogInterface;
+import org.eclipse.rse.ui.wizards.ISystemWizard;
+
+/**
+ * An interface for filter pool wizards to implement
+ */
+public interface SystemFilterPoolWizardInterface
+ extends ISystemWizard, SystemFilterPoolDialogInterface
+{
+}
Index: UI/org/eclipse/rse/ui/view/SystemResourceSelectionForm.java
===================================================================
RCS file: UI/org/eclipse/rse/ui/view/SystemResourceSelectionForm.java
diff -N UI/org/eclipse/rse/ui/view/SystemResourceSelectionForm.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ UI/org/eclipse/rse/ui/view/SystemResourceSelectionForm.java 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,634 @@
+/********************************************************************************
+ * Copyright (c) 2006, 2007 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:
+ * Kevin Doyle (IBM) - Added getSystemViewForm()
+ * 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.ui.view;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.rse.core.IRSESystemType;
+import org.eclipse.rse.core.RSECorePlugin;
+import org.eclipse.rse.core.filters.ISystemFilterReference;
+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.internal.ui.view.SystemPropertySheetForm;
+import org.eclipse.rse.services.clientserver.messages.SystemMessage;
+import org.eclipse.rse.ui.SystemActionViewerFilter;
+import org.eclipse.rse.ui.SystemWidgetHelpers;
+import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
+import org.eclipse.rse.ui.messages.ISystemMessageLine;
+import org.eclipse.rse.ui.validators.IValidatorRemoteSelection;
+import org.eclipse.rse.ui.widgets.SystemHostCombo;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+
+public class SystemResourceSelectionForm implements ISelectionChangedListener
+{
+ 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 SystemHostCombo _connectionCombo;
+ private SystemViewForm _systemViewForm;
+ private Composite _propertySheetContainer;
+ private SystemPropertySheetForm _ps;
+
+ private Text _pathText;
+ private boolean _isValid;
+ private ISystemMessageLine _msgLine;
+ protected Object previousSelection = null;
+ private IValidatorRemoteSelection _selectionValidator = null;
+ private boolean showPropertySheet = false;
+
+
+ protected Object caller;
+ protected boolean callerInstanceOfWizardPage, callerInstanceOfSystemPromptDialog;
+
+ protected String _verbiage = null;
+ protected Label verbiageLabel;
+ private Composite _container;
+
+ // history
+ private HashMap _history;
+
+ // outputs
+ protected IHost outputConnection = null;
+ protected Object[] outputObjects = null;
+
+
+ public SystemResourceSelectionForm(Shell shell, Composite parent, Object caller,
+ SystemResourceSelectionInputProvider inputProvider, String verbiage,
+ boolean multipleSelection,
+ ISystemMessageLine msgLine)
+ {
+ _msgLine= msgLine;
+ _history = new HashMap();
+ _inputProvider = inputProvider;
+ _multipleSelection = multipleSelection;
+ _shell = shell;
+ _verbiage = verbiage;
+ this.caller = caller;
+ callerInstanceOfWizardPage = (caller instanceof WizardPage);
+ callerInstanceOfSystemPromptDialog = (caller instanceof SystemPromptDialog);
+
+ createControls(parent);
+ }
+
+ public void setMessageLine(ISystemMessageLine msgLine)
+ {
+ _msgLine = msgLine;
+ }
+
+ /**
+ * Return first selected object
+ */
+ public Object getSelectedObject()
+ {
+ if ((outputObjects != null) && (outputObjects.length>=1))
+ return outputObjects[0];
+ else
+ return null;
+ }
+ /**
+ * Return all selected objects.
+ */
+ public Object[] getSelectedObjects()
+ {
+ return outputObjects;
+ }
+
+ /**
+ * Return the embedded System Tree object.
+ * Will be null until createControls is called.
+ */
+ public SystemViewForm getSystemViewForm()
+ {
+ return _systemViewForm;
+ }
+
+ public void createControls(Composite parent)
+ {
+ _container = SystemWidgetHelpers.createComposite(parent, showPropertySheet ? 2 : 1);
+ //Composite container = new Composite(parent, SWT.NULL);
+
+
+ // INNER COMPOSITE
+ int gridColumns = 2;
+ Composite composite_prompts = SystemWidgetHelpers.createFlushComposite(_container, gridColumns);
+
+ // PROPERTY SHEET COMPOSITE
+ if (showPropertySheet)
+ {
+ createPropertySheet(_container, _shell);
+ }
+
+
+ // MESSAGE/VERBIAGE TEXT AT TOP
+ verbiageLabel = SystemWidgetHelpers.createVerbiage(composite_prompts, _verbiage, gridColumns, false, PROMPT_WIDTH);
+
+
+ boolean allowMultipleConnnections = _inputProvider.allowMultipleConnections();
+ if (!allowMultipleConnnections)
+ {
+ //Label connectionLabel = SystemWidgetHelpers.createLabel(composite_prompts, _inputProvider.getSystemConnection().getHostName());
+ }
+ else
+ {
+ IRSESystemType[] systemTypes = _inputProvider.getSystemTypes();
+ String category = _inputProvider.getCategory();
+
+ if (systemTypes != null)
+ {
+ _connectionCombo = new SystemHostCombo(composite_prompts, SWT.NULL, systemTypes, _inputProvider.getSystemConnection(), _inputProvider.allowNewConnection());
+ }
+ else if (category != null)
+ {
+ _connectionCombo = new SystemHostCombo(composite_prompts, SWT.NULL, _inputProvider.getSystemConnection(), _inputProvider.allowNewConnection(), category);
+ }
+ else
+ {
+ _connectionCombo = new SystemHostCombo(composite_prompts, SWT.NULL,
+ SystemWidgetHelpers.getValidSystemTypes(null),
+ _inputProvider.getSystemConnection(),
+ _inputProvider.allowNewConnection());
+
+ }
+ _connectionCombo.addSelectionListener(new SelectionAdapter()
+ {
+ public void widgetSelected(SelectionEvent evt)
+ {
+ IHost connection = _connectionCombo.getHost();
+ connectionChanged(connection);
+ }}
+ );
+ _connectionCombo.listenToConnectionEvents(true);
+ }
+
+ _pathText = SystemWidgetHelpers.createReadonlyTextField(composite_prompts);
+ _systemViewForm = new SystemViewForm(_shell, composite_prompts, SWT.NULL, _inputProvider, !_multipleSelection, _msgLine);
+ _systemViewForm.addSelectionChangedListener(this);
+
+
+ GridLayout layout = new GridLayout();
+ GridData gdata = new GridData(GridData.FILL_BOTH);
+ composite_prompts.setLayout(layout);
+ composite_prompts.setLayoutData(gdata);
+
+ doInitializeFields();
+ }
+
+ private void doInitializeFields()
+ {
+ setPageComplete();
+ return;
+ }
+
+ /**
+ * Create the property sheet viewer
+ */
+ private void createPropertySheet(Composite outerParent, Shell shell)
+ {
+ _propertySheetContainer = SystemWidgetHelpers.createFlushComposite(outerParent, 1);
+ ((GridData)_propertySheetContainer.getLayoutData()).grabExcessVerticalSpace = true;
+ ((GridData)_propertySheetContainer.getLayoutData()).verticalAlignment = GridData.FILL;
+
+ // PROPERTY SHEET VIEWER
+ _ps = new SystemPropertySheetForm(shell,_propertySheetContainer, SWT.BORDER, _msgLine);
+ }
+
+ public Control getInitialFocusControl()
+ {
+ return _systemViewForm.getTreeControl();
+ }
+
+ public void applyViewerFilter(SystemActionViewerFilter filter)
+ {
+ if (filter != null)
+ {
+ _systemViewForm.getSystemTree().addFilter(filter);
+ }
+ }
+
+ /**
+ * Completes processing of the wizard page or dialog. If this
+ * method returns true, the wizard/dialog will close;
+ * otherwise, it will stay active.
+ *
+ * @return true if no errors
+ */
+ public boolean verify()
+ {
+ if (_isValid)
+ {
+ if (_msgLine != null)
+ {
+ _msgLine.clearErrorMessage();
+ }
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ protected ISystemViewElementAdapter getViewAdapter(Object selection)
+ {
+ if (selection != null && selection instanceof IAdaptable)
+ {
+ return (ISystemViewElementAdapter)((IAdaptable)selection).getAdapter(ISystemViewElementAdapter.class);
+ }
+ return null;
+ }
+
+ protected ISystemRemoteElementAdapter getRemoteAdapter(Object selection)
+ {
+ if (selection != null && selection instanceof IAdaptable)
+ {
+ return SystemAdapterHelpers.getRemoteAdapter(selection);
+ }
+ return null;
+ }
+
+ protected ISystemRemoteElementAdapter[] getRemoteAdapters(ISelection selection)
+ {
+ Object[] selectedObjects = getSelections(selection);
+ ISystemRemoteElementAdapter[] adapters = new ISystemRemoteElementAdapter[selectedObjects.length];
+ for (int idx=0; idx
- *
+ *