mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 14:55:41 +02:00
[225506] [api][breaking] RSE UI leaks non-API types
This commit is contained in:
parent
b8e845710c
commit
3a839ecb3b
8 changed files with 51 additions and 22 deletions
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2002, 2007 IBM Corporation and others.
|
||||
* 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
|
||||
|
@ -12,7 +12,7 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.ui.actions;
|
||||
|
@ -25,6 +25,7 @@ import org.eclipse.rse.internal.ui.view.SystemViewMenuListener;
|
|||
import org.eclipse.rse.ui.ISystemContextMenuConstants;
|
||||
import org.eclipse.rse.ui.ISystemIconConstants;
|
||||
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||
import org.eclipse.rse.ui.actions.ISystemViewMenuListener;
|
||||
import org.eclipse.rse.ui.actions.SystemBaseAction;
|
||||
import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
@ -128,7 +129,7 @@ public class SystemFilterCascadingNewFilterPoolReferenceAction
|
|||
* Overridable method from parent that instantiates the menu listener who job is to add mnemonics.
|
||||
* @param setMnemonicsOnlyOnce true if the menu is static and so mnemonics need only be set once. False if it is dynamic
|
||||
*/
|
||||
protected SystemViewMenuListener createMnemonicsListener(boolean setMnemonicsOnlyOnce)
|
||||
protected ISystemViewMenuListener createMnemonicsListener(boolean setMnemonicsOnlyOnce)
|
||||
{
|
||||
return new SystemViewMenuListener(false); // our menu is re-built dynamically each time
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2002, 2007 IBM Corporation and others.
|
||||
* 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
|
||||
|
@ -12,7 +12,7 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.ui.actions;
|
||||
|
@ -22,6 +22,7 @@ import org.eclipse.rse.core.filters.ISystemFilterPool;
|
|||
import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
|
||||
import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
|
||||
import org.eclipse.rse.internal.ui.view.SystemViewMenuListener;
|
||||
import org.eclipse.rse.ui.actions.ISystemViewMenuListener;
|
||||
import org.eclipse.rse.ui.actions.SystemBaseAction;
|
||||
import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
@ -120,7 +121,7 @@ public class SystemFilterCascadingNewFilterPoolReferenceFPMgrAction
|
|||
* Overridable method from parent that instantiates the menu listener who job is to add mnemonics.
|
||||
* @param setMnemonicsOnlyOnce true if the menu is static and so mnemonics need only be set once. False if it is dynamic
|
||||
*/
|
||||
protected SystemViewMenuListener createMnemonicsListener(boolean setMnemonicsOnlyOnce)
|
||||
protected ISystemViewMenuListener createMnemonicsListener(boolean setMnemonicsOnlyOnce)
|
||||
{
|
||||
return new SystemViewMenuListener(false); // our menu is re-built dynamically each time
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
@ -12,6 +12,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
|
||||
* David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.ui.actions;
|
||||
|
@ -38,9 +39,7 @@ import org.eclipse.swt.widgets.Shell;
|
|||
* The state-setting methods including setShell, setSelection and setValue.
|
||||
*/
|
||||
public class SystemSubMenuManager
|
||||
extends MenuManager
|
||||
//implements ISelectionChangedListener
|
||||
//implements ISystemAction
|
||||
extends MenuManager
|
||||
{
|
||||
protected String toolTipText;
|
||||
protected ImageDescriptor image = null;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2007 IBM Corporation and others.
|
||||
* 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
|
||||
|
@ -12,21 +12,19 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.ui.view;
|
||||
import org.eclipse.jface.action.ActionContributionItem;
|
||||
import org.eclipse.jface.action.IMenuListener;
|
||||
import org.eclipse.jface.action.IMenuManager;
|
||||
import org.eclipse.jface.action.MenuManager;
|
||||
import org.eclipse.rse.internal.ui.actions.SystemSubMenuManager;
|
||||
import org.eclipse.rse.ui.Mnemonics;
|
||||
import org.eclipse.rse.ui.actions.ISystemViewMenuListener;
|
||||
import org.eclipse.rse.ui.messages.ISystemMessageLine;
|
||||
import org.eclipse.swt.events.ArmEvent;
|
||||
import org.eclipse.swt.events.ArmListener;
|
||||
import org.eclipse.swt.events.MenuEvent;
|
||||
import org.eclipse.swt.events.MenuListener;
|
||||
import org.eclipse.swt.widgets.Menu;
|
||||
import org.eclipse.swt.widgets.MenuItem;
|
||||
import org.eclipse.swt.widgets.Widget;
|
||||
|
@ -36,7 +34,8 @@ import org.eclipse.swt.widgets.Widget;
|
|||
* A class that listens for menu show events for the purpose of applying mnemonics
|
||||
* to the menu items.
|
||||
*/
|
||||
public class SystemViewMenuListener implements IMenuListener, MenuListener, ArmListener
|
||||
public class SystemViewMenuListener
|
||||
implements ISystemViewMenuListener
|
||||
{
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
/********************************************************************************
|
||||
* 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.actions;
|
||||
|
||||
import org.eclipse.jface.action.IMenuListener;
|
||||
import org.eclipse.swt.events.ArmListener;
|
||||
import org.eclipse.swt.events.MenuListener;
|
||||
|
||||
/**
|
||||
* An interface to be implemented for listening for menu show events for
|
||||
* the purpose of applying mnemonics to the menu items.
|
||||
*/
|
||||
public interface ISystemViewMenuListener extends IMenuListener, MenuListener, ArmListener
|
||||
{
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2002, 2007 IBM Corporation and others.
|
||||
* 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
|
||||
|
@ -12,7 +12,7 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.ui.actions;
|
||||
|
@ -269,12 +269,12 @@ public abstract class SystemBaseSubMenuAction
|
|||
* Overridable method that instantiates the menu listener who job is to add mnemonics.
|
||||
* @param setMnemonicsOnlyOnce true if the menu is static and so mnemonics need only be set once. False if it is dynamic
|
||||
*/
|
||||
protected SystemViewMenuListener createMnemonicsListener(boolean setMnemonicsOnlyOnce)
|
||||
protected ISystemViewMenuListener createMnemonicsListener(boolean setMnemonicsOnlyOnce)
|
||||
{
|
||||
return new SystemViewMenuListener(setMnemonicsOnlyOnce);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Sets the parent shell for this action. This is an override of our parent's method so we can
|
||||
* cascade it to each sub-action.
|
||||
*/
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
* IBM Corporation - initial API and implementation
|
||||
* Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
|
||||
* David Dykstal (IBM) - [186589] move user actions API out of org.eclipse.rse.ui
|
||||
* David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
|
||||
*******************************************************************************/
|
||||
package org.eclipse.rse.internal.useractions.ui.compile;
|
||||
|
||||
|
@ -21,6 +22,7 @@ import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
|
|||
import org.eclipse.rse.internal.ui.view.SystemViewMenuListener;
|
||||
import org.eclipse.rse.ui.ISystemIconConstants;
|
||||
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||
import org.eclipse.rse.ui.actions.ISystemViewMenuListener;
|
||||
import org.eclipse.rse.ui.actions.SystemBaseDummyAction;
|
||||
import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
|
||||
import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
|
||||
|
@ -78,7 +80,7 @@ public class SystemCompileCascadeByProfileAction extends SystemBaseSubMenuAction
|
|||
* Overridable method from parent that instantiates the menu listener who job is to add mnemonics.
|
||||
* @param setMnemonicsOnlyOnce true if the menu is static and so mnemonics need only be set once. False if it is dynamic
|
||||
*/
|
||||
protected SystemViewMenuListener createMnemonicsListener(boolean setMnemonicsOnlyOnce) {
|
||||
protected ISystemViewMenuListener createMnemonicsListener(boolean setMnemonicsOnlyOnce) {
|
||||
return new SystemViewMenuListener(false); // our menu is re-built dynamically each time
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ import org.eclipse.rse.core.model.ISystemProfile;
|
|||
import org.eclipse.rse.internal.ui.view.SystemViewMenuListener;
|
||||
import org.eclipse.rse.ui.ISystemIconConstants;
|
||||
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||
import org.eclipse.rse.ui.actions.ISystemViewMenuListener;
|
||||
import org.eclipse.rse.ui.actions.SystemBaseDummyAction;
|
||||
import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
@ -70,7 +71,7 @@ public class SystemUDACascadeByProfileAction extends SystemBaseSubMenuAction imp
|
|||
* Overridable method from parent that instantiates the menu listener who job is to add mnemonics.
|
||||
* @param setMnemonicsOnlyOnce true if the menu is static and so mnemonics need only be set once. False if it is dynamic
|
||||
*/
|
||||
protected SystemViewMenuListener createMnemonicsListener(boolean setMnemonicsOnlyOnce) {
|
||||
protected ISystemViewMenuListener createMnemonicsListener(boolean setMnemonicsOnlyOnce) {
|
||||
return new SystemViewMenuListener(false); // our menu is re-built dynamically each time
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue