diff --git a/rse/doc/org.eclipse.rse.doc.isv/reference/extension-points/index.html b/rse/doc/org.eclipse.rse.doc.isv/reference/extension-points/index.html index c43ba380072..88fd27e5904 100755 --- a/rse/doc/org.eclipse.rse.doc.isv/reference/extension-points/index.html +++ b/rse/doc/org.eclipse.rse.doc.isv/reference/extension-points/index.html @@ -1,7 +1,7 @@ - + RSE Extension Points @@ -17,7 +17,6 @@ -
  • org.eclipse.rse.ui.dynamicPopupMenuExtensions
  • org.eclipse.rse.ui.keystoreProviders
  • org.eclipse.rse.ui.mountPathMappers
  • org.eclipse.rse.ui.newConnectionWizards
  • diff --git a/rse/doc/org.eclipse.rse.doc.isv/topics_Reference.xml b/rse/doc/org.eclipse.rse.doc.isv/topics_Reference.xml index 2901e97edcb..6f1d376b5f6 100755 --- a/rse/doc/org.eclipse.rse.doc.isv/topics_Reference.xml +++ b/rse/doc/org.eclipse.rse.doc.isv/topics_Reference.xml @@ -12,7 +12,6 @@ - diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemDynamicPopupMenuExtensionManager.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemDynamicPopupMenuExtensionManager.java deleted file mode 100644 index 6abd847eabe..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemDynamicPopupMenuExtensionManager.java +++ /dev/null @@ -1,74 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2005, 2006 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, 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.actions; -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.ui.SystemMenuManager; -import org.eclipse.rse.ui.actions.ISystemDynamicPopupMenuExtension; -import org.eclipse.rse.ui.actions.ISystemDynamicPopupMenuExtensionManager; -import org.eclipse.swt.widgets.Shell; - -/** - * - * Singleton class for managing adapter menu extensions. - * View adapters that support this feature, should call populateMenu to allow for - * extended menu contributions. - */ -public class SystemDynamicPopupMenuExtensionManager implements - ISystemDynamicPopupMenuExtensionManager -{ - private static SystemDynamicPopupMenuExtensionManager _instance = new SystemDynamicPopupMenuExtensionManager(); - - private List _extensions; - - private SystemDynamicPopupMenuExtensionManager() - { - _extensions= new ArrayList(); - } - - public static SystemDynamicPopupMenuExtensionManager getInstance() - { - return _instance; - } - - public void registerMenuExtension(ISystemDynamicPopupMenuExtension ext) - { - _extensions.add(ext); - } - - /** - * Actions are added to a contribution menu. - * @param shell the shell - * @param menu the menu to contribute to - * @param selection are processed to determine the resource source file - * @param menuGroup the default menu group to add actions to - */ - public void populateMenu(Shell shell, SystemMenuManager menu,IStructuredSelection selection, String menuGroup) - { - for (int i = 0; i <_extensions.size(); i++) - { - ISystemDynamicPopupMenuExtension extension = (ISystemDynamicPopupMenuExtension)_extensions.get(i); - if (extension.supportsSelection(selection)) - { - extension.populateMenu(shell, menu, selection, menuGroup); - } - } - } - -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java index d90de7f7104..a471b31497d 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java @@ -16,6 +16,7 @@ * David Dykstal (IBM) - 168870: move core function from UI to core * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods + * Martin Oberhuber (Wind River) - [185554] Remove dynamicPopupMenuExtensions extension point ********************************************************************************/ package org.eclipse.rse.ui; @@ -54,7 +55,6 @@ import org.eclipse.rse.internal.core.subsystems.SubSystemConfigurationProxy; import org.eclipse.rse.internal.core.subsystems.SubSystemConfigurationProxyComparator; import org.eclipse.rse.internal.ui.RSESystemTypeAdapterFactory; import org.eclipse.rse.internal.ui.SystemResources; -import org.eclipse.rse.internal.ui.actions.SystemDynamicPopupMenuExtensionManager; import org.eclipse.rse.internal.ui.actions.SystemShowPreferencesPageAction; import org.eclipse.rse.internal.ui.subsystems.SubSystemConfigurationProxyAdapterFactory; import org.eclipse.rse.internal.ui.view.SubSystemConfigurationAdapterFactory; @@ -64,7 +64,6 @@ import org.eclipse.rse.persistence.IRSEPersistenceManager; import org.eclipse.rse.services.clientserver.messages.ISystemMessageProvider; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessageFile; -import org.eclipse.rse.ui.actions.ISystemDynamicPopupMenuExtension; import org.eclipse.rse.ui.internal.model.SystemRegistry; import org.eclipse.rse.ui.model.ISystemRegistryUI; import org.osgi.framework.Bundle; @@ -107,7 +106,6 @@ public class RSEUIPlugin extends SystemBasePlugin implements ISystemMessageProvi SystemResourceListener listener = SystemResourceListener.getListener(remoteSystemsProject); SystemResourceManager.startResourceEventListening(listener); - registerDynamicPopupMenuExtensions(); registerKeystoreProviders(); // new support to allow products to not pre-create a local connection @@ -970,47 +968,6 @@ public class RSEUIPlugin extends SystemBasePlugin implements ISystemMessageProvi viewSuppliers.remove(vs); } - /** - * Initializes the System View Adapter Menu Extension Manager, by registering menu extensions - */ - protected void registerDynamicPopupMenuExtensions() - { - // Get reference to the plug-in registry - IExtensionRegistry registry = Platform.getExtensionRegistry(); - - // Get configured extenders - IConfigurationElement[] systemTypeExtensions = registry.getConfigurationElementsFor("org.eclipse.rse.ui", "dynamicPopupMenuExtensions"); //$NON-NLS-1$ //$NON-NLS-2$ - - for (int i = 0; i < systemTypeExtensions.length; i++) - { - try - { - // get the name space of the declaring extension - String nameSpace = systemTypeExtensions[i].getDeclaringExtension().getNamespaceIdentifier(); - - String menuExtensionType = systemTypeExtensions[i].getAttribute("class"); //$NON-NLS-1$ - - // use the name space to get the bundle - Bundle bundle = Platform.getBundle(nameSpace); - - // if the bundle has not been uninstalled, then load the handler referred to in the - // extension, and load it using the bundle - // then register the handler - if (bundle.getState() != Bundle.UNINSTALLED) - { - Class menuExtension = bundle.loadClass(menuExtensionType); - - ISystemDynamicPopupMenuExtension extension = (ISystemDynamicPopupMenuExtension)menuExtension.getConstructors()[0].newInstance(null); - SystemDynamicPopupMenuExtensionManager.getInstance().registerMenuExtension(extension); - } - } - catch (Exception e) - { - e.printStackTrace(); - } - } - } - protected void registerKeystoreProviders() { // Get reference to the plug-in registry diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemDynamicPopupMenuExtension.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemDynamicPopupMenuExtension.java deleted file mode 100644 index 0a6e073d583..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemDynamicPopupMenuExtension.java +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2005, 2006 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, 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.actions; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.ui.SystemMenuManager; -import org.eclipse.swt.widgets.Shell; - -/** - * Required interface for use in making contributions view the - * adapter menu extension extension point (org.eclipse.rse.ui.dynamicPopupMenuExtensions). - */ -public interface ISystemDynamicPopupMenuExtension -{ - /** - * Returns true if this menu extension supports the specified selection. - * @param selection the resources to contriubte menu items to - * @return true if the extension will be used for menu population - */ - public boolean supportsSelection(IStructuredSelection selection); - - /** - * Populates the menu with specialized actions. - * @param shell the shell - * @param menu the menu to contribute actions to - * @param menuGroup the defect menu group to add actions to - * @param selection the resources to contriubte menu items to - * - */ - public void populateMenu(Shell shell, SystemMenuManager menu, IStructuredSelection selection, String menuGroup); -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemDynamicPopupMenuExtensionManager.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemDynamicPopupMenuExtensionManager.java deleted file mode 100644 index 4b7c976d85f..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemDynamicPopupMenuExtensionManager.java +++ /dev/null @@ -1,23 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2004, 2006 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, 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.actions; -/** - * @author dmcknigh - */ -public interface ISystemDynamicPopupMenuExtensionManager { - -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.java index fa7278b6416..e0ea3b35f23 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.java @@ -54,7 +54,6 @@ import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter; import org.eclipse.rse.internal.ui.SystemPropertyResources; import org.eclipse.rse.internal.ui.SystemResources; -import org.eclipse.rse.internal.ui.actions.SystemDynamicPopupMenuExtensionManager; import org.eclipse.rse.internal.ui.view.ISystemMementoConstants; import org.eclipse.rse.internal.ui.view.SystemViewPart; import org.eclipse.rse.internal.ui.view.SystemViewResources; @@ -349,10 +348,14 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda /** - * Called by system viewers. No need to override or call.
    - * Contributes actions provided via the dynamicPopupMenuExtensions extension point. Unlike - * addCommonRemoteActions(), these contributions are for any artifact in the RSE views and are contributed - * independently of subsystem factories. + * Add or remove custom actions dynamically to a context menu. + * + * This method is called by the system viewers. Extenders may + * override this method in order to modify the context menu + * shown for elements of the type they adapt to. + * Unlike addCommonRemoteActions(), these contributions are for + * any artifact in the RSE views and are contributed independently + * of subsystem factories. * * @param menu The menu to contribute actions to * @param selection The window's current selection. @@ -361,9 +364,8 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda */ public void addDynamicPopupMenuActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup) { - // system view adapter menu extensions + // empty by default, extenders may override. // these extensions are independent of subsystem factories and are contributed via extension point - SystemDynamicPopupMenuExtensionManager.getInstance().populateMenu(shell, menu, selection, menuGroup); } /** diff --git a/rse/plugins/org.eclipse.rse.ui/plugin.xml b/rse/plugins/org.eclipse.rse.ui/plugin.xml index 18574761190..8519bed96e4 100644 --- a/rse/plugins/org.eclipse.rse.ui/plugin.xml +++ b/rse/plugins/org.eclipse.rse.ui/plugin.xml @@ -1,6 +1,6 @@ @@ -445,11 +445,6 @@ Contributors: - - - - - diff --git a/rse/plugins/org.eclipse.rse.ui/schema/dynamicPopupMenuExtensions.exsd b/rse/plugins/org.eclipse.rse.ui/schema/dynamicPopupMenuExtensions.exsd deleted file mode 100644 index 54a155476a7..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/schema/dynamicPopupMenuExtensions.exsd +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - - This extension point is used to allow programmatic menu contributions via view adapters that allow for extension. - - - - - - - (no description available) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (no description available) - - - - - - - a unique name that will be used to identify this extension. - - - - - - - a translatable name that will be used to identify this Popup Menu Extension in the UI. - - - - - - - a fully qualified name of the Java class that implements the <samp>org.eclipse.rse.ui.actions.ISystemDynamicPopupMenuExtension</samp> interface. - - - - - - - - - - - - - - - The following is an example of this extension point's usage: - -<p> -<pre> - <extension point="org.eclipse.rse.ui.dynamicPopupMenuExtensions"> - <dynamicPopupMenuExtension - id="com.abc.ui.MyPopupMenuExtension" - name="My Popup Menu Extension" - class="com.abc.MyPopupMenuExtension"> - </dynamicPopupMenuExtension> - </extension> -</pre> -</p> - - - - - - - - - Plug-ins that want to extend this extension point must implement <samp>org.eclipse.rse.ui.actions.ISystemDynamicPopupMenuExtension</samp> interface. - - - - - - - - - By default there are not contributions to this. - - - - - - - - - Copyright (c) 2002, 2006 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 - -Contributors: -IBM Corporation - initial API and implementation - - - -