1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-02 22:55:26 +02:00

[225506] [api][breaking] RSE UI leaks non-API types

This commit is contained in:
David McKnight 2008-04-07 22:54:54 +00:00
parent b714fd6f69
commit 77e0b0e35b
10 changed files with 100 additions and 13 deletions

View file

@ -24,6 +24,7 @@ import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.internal.files.ui.view.SystemRemoteFileSelectionInputProvider;
import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
import org.eclipse.rse.ui.SystemActionViewerFilter;
import org.eclipse.rse.ui.dialogs.SystemRemoteResourceDialog;

View file

@ -198,7 +198,7 @@ public class SystemSelectRemoteFileOrFolderForm
* Returns the input provider that drives the contents of the tree
* Subclasses can override to provide custom tree contents
*/
protected ISystemSelectRemoteObjectAPIProvider getInputProvider()
private ISystemSelectRemoteObjectAPIProvider getInputProvider()
{
if (inputProvider == null)
{

View file

@ -28,6 +28,7 @@ import org.eclipse.jface.viewers.ICheckStateListener;
import org.eclipse.rse.core.IRSESystemType;
import org.eclipse.rse.internal.files.ui.Activator;
import org.eclipse.rse.internal.files.ui.actions.SystemSelectFileTypesAction;
import org.eclipse.rse.internal.files.ui.widgets.SystemFileTreeAndListGroup;
import org.eclipse.rse.internal.ui.SystemResources;
import org.eclipse.rse.internal.ui.view.SystemViewLabelAndContentProvider;
import org.eclipse.rse.services.clientserver.messages.CommonMessages;

View file

@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2006, 2008 IBM Corporation. All rights reserved.
* Copyright (c) 2006, 2007 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

View file

@ -15,12 +15,12 @@
* David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
*******************************************************************************/
package org.eclipse.rse.files.ui.dialogs;
package org.eclipse.rse.internal.files.ui.view;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.internal.ui.view.SystemResourceSelectionInputProvider;
import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
import org.eclipse.rse.ui.view.SystemResourceSelectionInputProvider;
public class SystemRemoteFileSelectionInputProvider extends

View file

@ -15,7 +15,7 @@
* {Name} (company) - description of contribution.
*******************************************************************************/
package org.eclipse.rse.files.ui.widgets;
package org.eclipse.rse.internal.files.ui.widgets;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.IStructuredSelection;

View file

@ -44,10 +44,10 @@ 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.ISystemResourceSelectionInputProvider;
import org.eclipse.rse.ui.view.ISystemTree;
import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
import org.eclipse.rse.ui.view.SystemAdapterHelpers;
import org.eclipse.rse.ui.view.SystemResourceSelectionInputProvider;
import org.eclipse.rse.ui.widgets.SystemHostCombo;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
@ -67,8 +67,8 @@ 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 ISystemResourceSelectionInputProvider _inputProvider;
private SystemHostCombo _connectionCombo;
private SystemViewForm _systemViewForm;
private Composite _propertySheetContainer;
@ -98,7 +98,8 @@ public class SystemResourceSelectionForm implements ISelectionChangedListener
public SystemResourceSelectionForm(Shell shell, Composite parent, Object caller,
SystemResourceSelectionInputProvider inputProvider, String verbiage,
ISystemResourceSelectionInputProvider inputProvider,
String verbiage,
boolean multipleSelection,
ISystemMessageLine msgLine)
{

View file

@ -17,15 +17,18 @@
* David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
********************************************************************************/
package org.eclipse.rse.ui.view;
package org.eclipse.rse.internal.ui.view;
import org.eclipse.rse.core.IRSESystemType;
import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.ui.view.ISystemResourceSelectionInputProvider;
import org.eclipse.rse.ui.view.SystemAbstractAPIProvider;
public abstract class SystemResourceSelectionInputProvider extends SystemAbstractAPIProvider
implements ISystemResourceSelectionInputProvider
{
private IHost _connection = null;
private boolean _onlyConnection = false;

View file

@ -27,8 +27,8 @@ import org.eclipse.rse.internal.ui.view.SystemResourceSelectionForm;
import org.eclipse.rse.ui.SystemActionViewerFilter;
import org.eclipse.rse.ui.messages.ISystemMessageLine;
import org.eclipse.rse.ui.validators.IValidatorRemoteSelection;
import org.eclipse.rse.ui.view.ISystemResourceSelectionInputProvider;
import org.eclipse.rse.ui.view.ISystemTree;
import org.eclipse.rse.ui.view.SystemResourceSelectionInputProvider;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
@ -37,7 +37,7 @@ import org.eclipse.swt.widgets.Shell;
public abstract class SystemRemoteResourceDialog extends SystemPromptDialog
{
private SystemResourceSelectionForm _form;
private SystemResourceSelectionInputProvider _inputProvider;
private ISystemResourceSelectionInputProvider _inputProvider;
private Object _preSelection;
private IValidatorRemoteSelection _selectionValidator;
private boolean _multipleSelectionMode;
@ -47,7 +47,8 @@ public abstract class SystemRemoteResourceDialog extends SystemPromptDialog
private String _message, _tip;
public SystemRemoteResourceDialog(Shell shell, String title, SystemResourceSelectionInputProvider inputProvider)
public SystemRemoteResourceDialog(Shell shell, String title,
ISystemResourceSelectionInputProvider inputProvider)
{
super(shell, title);
_inputProvider = inputProvider;

View file

@ -0,0 +1,80 @@
/********************************************************************************
* Copyright (c) 2008 IBM Corporation. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
*
* Initial Contributors:
* The following IBM employees contributed to the Remote System Explorer
* component that contains this file: David McKnight.
*
* Contributors:
* David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
********************************************************************************/
package org.eclipse.rse.ui.view;
import org.eclipse.rse.core.IRSESystemType;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.model.ISystemViewInputProvider;
/**
* Public interface for the system resource selection input provider
* that is used in the SystemRemoteResourceDialog and the
* SystemResourceSelectionForm
*
*/
public interface ISystemResourceSelectionInputProvider
extends ISystemViewInputProvider
{
/**
* Gets the associated system connection
* @return the system connection
*/
public IHost getSystemConnection();
/**
* Indicates whether the input provider should allow new connections
* to be created.
* @param flag whether new connections should be allowed
*/
public void setAllowNewConnection(boolean flag);
/**
* Returns whether multiple connections can be displayed via the
* input provider
* @return true if multiple connections are allowed
*/
public boolean allowMultipleConnections();
/**
* Returns whether new connections can be created from the view
* using this input provider.
* @return true if new connections are allowed.
*/
public boolean allowNewConnection();
/**
* Returns the category for the view using the input provider (i.e. "files")
* @return the category
*/
public String getCategory();
/**
* Sets the system types allowed for this input provider
* @param types the types of systems
*/
public void setSystemTypes(IRSESystemType[] types);
/**
* Gets the system types allowed for the associated control
* @return the system types
*/
public IRSESystemType[] getSystemTypes();
/**
* Sets the associated system connection for the input provider
* @param connection the connection
* @param onlyConnection whether other connections are allowed
*/
public void setSystemConnection(IHost connection, boolean onlyConnection);
}