mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-14 20:45:22 +02:00
[218524][api] Remove deprecated ISystemViewInputProvider#getShell()
This commit is contained in:
parent
d576a792fc
commit
4c642f694d
4 changed files with 9 additions and 50 deletions
|
@ -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
|
* 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
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -13,6 +13,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [186773] split SystemRegistryUI from SystemRegistry implementation
|
* 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) - [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;
|
package org.eclipse.rse.core.model;
|
||||||
|
@ -62,22 +63,6 @@ public interface ISystemViewInputProvider extends IAdaptable {
|
||||||
*/
|
*/
|
||||||
public Object getAdapter(Class adapterType);
|
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.
|
* Set the viewer in case it is needed for anything.
|
||||||
* The label and content provider will call this.
|
* The label and content provider will call this.
|
||||||
|
|
|
@ -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
|
* 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
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -14,6 +14,7 @@
|
||||||
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
|
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
|
||||||
* Tobias Schwarz (Wind River) - [173267] "empty list" should not be displayed
|
* Tobias Schwarz (Wind River) - [173267] "empty list" should not be displayed
|
||||||
* Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
|
* 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;
|
package org.eclipse.rse.internal.ui.view;
|
||||||
|
@ -42,9 +43,6 @@ import org.eclipse.swt.widgets.Shell;
|
||||||
public abstract class SystemAbstractAPIProvider
|
public abstract class SystemAbstractAPIProvider
|
||||||
implements ISystemViewInputProvider
|
implements ISystemViewInputProvider
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
protected Shell shell;
|
|
||||||
protected Viewer viewer;
|
protected Viewer viewer;
|
||||||
protected ISystemRegistry sr;
|
protected ISystemRegistry sr;
|
||||||
|
|
||||||
|
@ -78,24 +76,6 @@ public abstract class SystemAbstractAPIProvider
|
||||||
return Platform.getAdapterManager().getAdapter(this, adapterType);
|
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)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.ui.view.ISystemViewInputProvider#setViewer(java.lang.Object)
|
* @see org.eclipse.rse.ui.view.ISystemViewInputProvider#setViewer(java.lang.Object)
|
||||||
|
|
|
@ -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
|
* 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
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* 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
|
* 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) - [199424] api to create tree items after query complete
|
||||||
* David McKnight (IBM) - [187711] expandTo to handle filters specially
|
* 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;
|
package org.eclipse.rse.internal.ui.view;
|
||||||
|
@ -298,7 +299,6 @@ public class SystemView extends SafeTreeViewer
|
||||||
assert shell == parent.getShell();
|
assert shell == parent.getShell();
|
||||||
this.shell = shell;
|
this.shell = shell;
|
||||||
this.inputProvider = inputProvider;
|
this.inputProvider = inputProvider;
|
||||||
this.inputProvider.setShell(shell); // DY: defect 44544
|
|
||||||
this.messageLine = msgLine;
|
this.messageLine = msgLine;
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
@ -317,7 +317,6 @@ public class SystemView extends SafeTreeViewer
|
||||||
assert shell == parent.getShell();
|
assert shell == parent.getShell();
|
||||||
this.shell = shell;
|
this.shell = shell;
|
||||||
this.inputProvider = inputProvider;
|
this.inputProvider = inputProvider;
|
||||||
this.inputProvider.setShell(shell); // DY: defect 44544
|
|
||||||
this.messageLine = msgLine;
|
this.messageLine = msgLine;
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
@ -337,7 +336,6 @@ public class SystemView extends SafeTreeViewer
|
||||||
assert shell == parent.getShell();
|
assert shell == parent.getShell();
|
||||||
this.shell = shell;
|
this.shell = shell;
|
||||||
this.inputProvider = inputProvider;
|
this.inputProvider = inputProvider;
|
||||||
this.inputProvider.setShell(shell); // DY: defect 44544
|
|
||||||
this.messageLine = msgLine;
|
this.messageLine = msgLine;
|
||||||
this.initViewerFilters = initViewerFilters;
|
this.initViewerFilters = initViewerFilters;
|
||||||
init();
|
init();
|
||||||
|
@ -356,7 +354,6 @@ public class SystemView extends SafeTreeViewer
|
||||||
assert shell == tree.getShell();
|
assert shell == tree.getShell();
|
||||||
this.shell = shell;
|
this.shell = shell;
|
||||||
this.inputProvider = inputProvider;
|
this.inputProvider = inputProvider;
|
||||||
this.inputProvider.setShell(shell); // DY: defect 44544
|
|
||||||
this.messageLine = msgLine;
|
this.messageLine = msgLine;
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
@ -368,9 +365,6 @@ public class SystemView extends SafeTreeViewer
|
||||||
public void setInputProvider(ISystemViewInputProvider inputProvider) {
|
public void setInputProvider(ISystemViewInputProvider inputProvider) {
|
||||||
this.inputProvider = inputProvider;
|
this.inputProvider = inputProvider;
|
||||||
inputProvider.setViewer(this);
|
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);
|
setInput(inputProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -642,7 +636,6 @@ public class SystemView extends SafeTreeViewer
|
||||||
*/
|
*/
|
||||||
public ISystemViewInputProvider getInputProvider() {
|
public ISystemViewInputProvider getInputProvider() {
|
||||||
inputProvider.setViewer(this); // just in case. Added by Phil in V5.0
|
inputProvider.setViewer(this); // just in case. Added by Phil in V5.0
|
||||||
inputProvider.setShell(getShell()); // just in case. Added by Phil
|
|
||||||
return inputProvider;
|
return inputProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
* 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
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -17,6 +17,7 @@
|
||||||
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
|
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
|
||||||
* Tobias Schwarz (Wind River) - [173267] "empty list" should not be displayed
|
* Tobias Schwarz (Wind River) - [173267] "empty list" should not be displayed
|
||||||
* Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
|
* 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;
|
package org.eclipse.rse.internal.ui.view;
|
||||||
|
@ -142,7 +143,7 @@ public class SystemViewAPIProviderForFilters
|
||||||
children = new SystemMessageObject[1];
|
children = new SystemMessageObject[1];
|
||||||
try {
|
try {
|
||||||
ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ssf.getAdapter(ISubSystemConfigurationAdapter.class);
|
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)
|
if (newFilter == null)
|
||||||
{
|
{
|
||||||
children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_CANCELLED),
|
children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_CANCELLED),
|
||||||
|
|
Loading…
Add table
Reference in a new issue