diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemViewInputProvider.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemViewInputProvider.java index fea9a90ad93..a4f9ae76666 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemViewInputProvider.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemViewInputProvider.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. + * 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 @@ -13,6 +13,7 @@ * Contributors: * Martin Oberhuber (Wind River) - [186773] split SystemRegistryUI from SystemRegistry implementation * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core from org.eclipse.rse.ui.view + * Martin Oberhuber (Wind River) - [218524][api] Remove deprecated ISystemViewInputProvider#getShell() ********************************************************************************/ package org.eclipse.rse.core.model; @@ -62,22 +63,6 @@ public interface ISystemViewInputProvider extends IAdaptable { */ public Object getAdapter(Class adapterType); - /** - * Set the shell in case it is needed for anything. - * The label and content provider will call this. - * @param shell an {@link org.eclipse.swt.widgets.Shell shell} object, - * being used by the viewer using this provider - */ - public void setShell(Object shell); - - /** - * @return the {@link org.eclipse.swt.widgets.Shell shell} of the viewer - * we are currently associated with. - * @deprecated use other methods for getting the active workbench shell, - * e.g. {@link org.eclipse.rse.ui.RSEUIPlugin#getActiveWorkbenchShell()} - */ - public Object getShell(); - /** * Set the viewer in case it is needed for anything. * The label and content provider will call this. diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemAbstractAPIProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemAbstractAPIProvider.java index b336415feef..af9ed641fac 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemAbstractAPIProvider.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemAbstractAPIProvider.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. + * 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 @@ -14,6 +14,7 @@ * 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; @@ -42,9 +43,6 @@ import org.eclipse.swt.widgets.Shell; public abstract class SystemAbstractAPIProvider implements ISystemViewInputProvider { - - - protected Shell shell; protected Viewer viewer; protected ISystemRegistry sr; @@ -78,24 +76,6 @@ public abstract class SystemAbstractAPIProvider return Platform.getAdapterManager().getAdapter(this, adapterType); } - /* - * (non-Javadoc) - * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#setShell(java.lang.Object) - */ - public void setShell(Object shell) - { - this.shell = (Shell)shell; - } - - /* - * (non-Javadoc) - * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#getShell() - */ - public Object getShell() - { - return shell; - } - /* * (non-Javadoc) * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#setViewer(java.lang.Object) diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java index aab8af10048..20dd2f279d1 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. + * 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 @@ -47,6 +47,7 @@ * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread * David McKnight (IBM) - [199424] api to create tree items after query complete * David McKnight (IBM) - [187711] expandTo to handle filters specially + * Martin Oberhuber (Wind River) - [218524][api] Remove deprecated ISystemViewInputProvider#getShell() ********************************************************************************/ package org.eclipse.rse.internal.ui.view; @@ -298,7 +299,6 @@ public class SystemView extends SafeTreeViewer assert shell == parent.getShell(); this.shell = shell; this.inputProvider = inputProvider; - this.inputProvider.setShell(shell); // DY: defect 44544 this.messageLine = msgLine; init(); } @@ -317,7 +317,6 @@ public class SystemView extends SafeTreeViewer assert shell == parent.getShell(); this.shell = shell; this.inputProvider = inputProvider; - this.inputProvider.setShell(shell); // DY: defect 44544 this.messageLine = msgLine; init(); } @@ -337,7 +336,6 @@ public class SystemView extends SafeTreeViewer assert shell == parent.getShell(); this.shell = shell; this.inputProvider = inputProvider; - this.inputProvider.setShell(shell); // DY: defect 44544 this.messageLine = msgLine; this.initViewerFilters = initViewerFilters; init(); @@ -356,7 +354,6 @@ public class SystemView extends SafeTreeViewer assert shell == tree.getShell(); this.shell = shell; this.inputProvider = inputProvider; - this.inputProvider.setShell(shell); // DY: defect 44544 this.messageLine = msgLine; init(); } @@ -368,9 +365,6 @@ public class SystemView extends SafeTreeViewer public void setInputProvider(ISystemViewInputProvider inputProvider) { this.inputProvider = inputProvider; inputProvider.setViewer(this); - inputProvider.setShell(getShell()); // DY: Defect 44544, shell was not being set for Test dialogs, when they - // tried to connect there was not shell for the password prompt - // and an error message (expand failed) occurred. setInput(inputProvider); } @@ -642,7 +636,6 @@ public class SystemView extends SafeTreeViewer */ public ISystemViewInputProvider getInputProvider() { inputProvider.setViewer(this); // just in case. Added by Phil in V5.0 - inputProvider.setShell(getShell()); // just in case. Added by Phil return inputProvider; } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilters.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilters.java index ab56f0bf7aa..6bfcbf223ea 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilters.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilters.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. + * 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 @@ -17,6 +17,7 @@ * 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; @@ -142,7 +143,7 @@ public class SystemViewAPIProviderForFilters children = new SystemMessageObject[1]; try { ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ssf.getAdapter(ISubSystemConfigurationAdapter.class); - ISystemFilter newFilter = adapter.createFilterByPrompting(ssf, fRef, (Shell)getShell()); + ISystemFilter newFilter = adapter.createFilterByPrompting(ssf, fRef, RSEUIPlugin.getTheSystemRegistryUI().getShell()); if (newFilter == null) { children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_CANCELLED),