null
.
- */
- private Throwable cause;
-
/**
* Creates a new instance of this class with the specified detail message.
*
@@ -57,20 +51,7 @@ public CommandException(final String message) {
* the cause; may be null
.
*/
public CommandException(final String message, final Throwable cause) {
- super(message);
- // don't pass the cause to super, to allow compilation against JCL Foundation
- this.cause = cause;
- }
-
- /**
- * Returns the cause of this throwable or null
if the
- * cause is nonexistent or unknown.
- *
- * @return the cause or null
- */
- @Override
- public Throwable getCause() {
- return cause;
+ super(message, cause);
}
}
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/resource/DeviceResourceException.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/resource/DeviceResourceException.java
index b70f3142c3e..d71681e8282 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/resource/DeviceResourceException.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/resource/DeviceResourceException.java
@@ -21,8 +21,6 @@
*/
public class DeviceResourceException extends RuntimeException {
- private Throwable cause;
-
/**
* All serializable objects should have a stable serialVersionUID
*/
@@ -36,9 +34,7 @@ public class DeviceResourceException extends RuntimeException {
* @param cause cause of the exception (or null if none)
*/
public DeviceResourceException(DeviceResourceDescriptor> missingResource, Throwable cause) {
- super("Unable to create resource " + missingResource); //$NON-NLS-1$
- // don't pass the cause to super, to allow compilation against JCL Foundation (bug 80059)
- this.cause = cause;
+ super("Unable to create resource " + missingResource, cause); //$NON-NLS-1$
}
/**
@@ -51,16 +47,4 @@ public DeviceResourceException(DeviceResourceDescriptor> missingResource) {
this(missingResource, null);
}
- /**
- * Returns the cause of this throwable or null
if the
- * cause is nonexistent or unknown.
- *
- * @return the cause or null
- * @since 3.1
- */
- @Override
- public Throwable getCause() {
- return cause;
- }
-
}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbench.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbench.java
index 85922a2c26e..905e7015efe 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbench.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbench.java
@@ -23,7 +23,6 @@
import org.eclipse.ui.activities.IWorkbenchActivitySupport;
import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
import org.eclipse.ui.commands.ICommandService;
-import org.eclipse.ui.commands.IWorkbenchCommandSupport;
import org.eclipse.ui.contexts.IContextService;
import org.eclipse.ui.contexts.IWorkbenchContextSupport;
import org.eclipse.ui.handlers.IHandlerService;
@@ -473,21 +472,6 @@ IWorkbenchPage showPerspective(String perspectiveId, IWorkbenchWindow window, IA
*/
IWorkbenchActivitySupport getActivitySupport();
- /**
- * Returns an interface to manage commands at the workbench level.
- *
- * @return an interface to manage commands at the workbench level. Guaranteed
- * not to be null
.
- * @since 3.0
- * @deprecated Please use {@link IServiceLocator#getService(Class)} instead.
- * This API is scheduled for deletion, see Bug 431177 for details
- * @see ICommandService
- * @see IHandlerService
- * @noreference IWorkbenchCommandSupport is scheduled for deletion.
- */
- @Deprecated
- IWorkbenchCommandSupport getCommandSupport();
-
/**
* Returns an interface to manage contexts at the workbench level.
*
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/AbstractHandler.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/AbstractHandler.java
deleted file mode 100644
index 2a3c7da92c8..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/AbstractHandler.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.commands;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.HandlerEvent;
-import org.eclipse.core.commands.IHandlerAttributes;
-
-/**
- * This class is a partial implementation of IHandler
. This
- * abstract implementation provides support for handler listeners. You should
- * subclass from this method unless you want to implement your own listener
- * support. Subclasses should call
- * {@link AbstractHandler#fireHandlerChanged(HandlerEvent)}when the handler
- * changes. Subclasses should also override
- * {@link AbstractHandler#getAttributeValuesByName()}if they have any
- * attributes.
- *
- * @since 3.0
- * @deprecated Please use the "org.eclipse.core.commands" plug-in instead. This
- * API is scheduled for deletion, see Bug 431177 for details
- * @see org.eclipse.core.commands.AbstractHandler
- * @noreference This class is scheduled for deletion.
- * @noextend This class is not intended to be extended by clients.
- */
-@Deprecated(forRemoval = true, since = "2024-03")
-public abstract class AbstractHandler extends org.eclipse.core.commands.AbstractHandler implements IHandler {
-
- /**
- * Those interested in hearing about changes to this instance of
- * IHandler
. This member is null iff there are no listeners
- * attached to this handler. (Most handlers don't have any listeners, and this
- * optimization saves some memory.)
- */
- private Listnull
.
- */
- @Override
- @Deprecated
- protected void fireHandlerChanged(HandlerEvent handlerEvent) {
- super.fireHandlerChanged(handlerEvent);
-
- if (handlerListeners != null) {
- final boolean attributesChanged = handlerEvent.isEnabledChanged() || handlerEvent.isHandledChanged();
- final Map previousAttributes;
- if (attributesChanged) {
- previousAttributes = new HashMap();
- previousAttributes.putAll(getAttributeValuesByName());
- if (handlerEvent.isEnabledChanged()) {
- Boolean disabled = !isEnabled() ? Boolean.TRUE : Boolean.FALSE;
- previousAttributes.put("enabled", disabled); //$NON-NLS-1$
- }
- if (handlerEvent.isHandledChanged()) {
- Boolean notHandled = !isHandled() ? Boolean.TRUE : Boolean.FALSE;
- previousAttributes.put(IHandlerAttributes.ATTRIBUTE_HANDLED, notHandled);
- }
- } else {
- previousAttributes = null;
- }
- final org.eclipse.ui.commands.HandlerEvent legacyEvent = new org.eclipse.ui.commands.HandlerEvent(this,
- attributesChanged, previousAttributes);
-
- for (IHandlerListener handlerListener : handlerListeners) {
- handlerListener.handlerChanged(legacyEvent);
- }
- }
- }
-
- /**
- * @see org.eclipse.core.commands.AbstractHandler
- */
- @Deprecated
- protected void fireHandlerChanged(final org.eclipse.ui.commands.HandlerEvent handlerEvent) {
- if (handlerEvent == null) {
- throw new NullPointerException();
- }
-
- if (handlerListeners != null) {
- for (IHandlerListener handlerListener : handlerListeners) {
- handlerListener.handlerChanged(handlerEvent);
- }
- }
-
- if (super.hasListeners()) {
- final boolean enabledChanged;
- final boolean handledChanged;
- if (handlerEvent.haveAttributeValuesByNameChanged()) {
- Map previousAttributes = handlerEvent.getPreviousAttributeValuesByName();
-
- Object attribute = previousAttributes.get("enabled"); //$NON-NLS-1$
- if (attribute instanceof Boolean) {
- enabledChanged = ((Boolean) attribute).booleanValue();
- } else {
- enabledChanged = false;
- }
-
- attribute = previousAttributes.get(IHandlerAttributes.ATTRIBUTE_HANDLED);
- if (attribute instanceof Boolean) {
- handledChanged = ((Boolean) attribute).booleanValue();
- } else {
- handledChanged = false;
- }
- } else {
- enabledChanged = false;
- handledChanged = true;
- }
- final HandlerEvent newEvent = new HandlerEvent(this, enabledChanged, handledChanged);
- super.fireHandlerChanged(newEvent);
- }
- }
-
- /**
- * This simply return an empty map. The default implementation has no
- * attributes.
- *
- * @see IHandler#getAttributeValuesByName()
- */
- @Override
- @Deprecated
- public Map getAttributeValuesByName() {
- return Collections.EMPTY_MAP;
- }
-
- /**
- * Returns true iff there is one or more IHandlerListeners attached to this
- * AbstractHandler.
- *
- * @return true iff there is one or more IHandlerListeners attached to this
- * AbstractHandler
- * @since 3.1
- */
- @Override
- @Deprecated
- protected final boolean hasListeners() {
- return super.hasListeners() || handlerListeners != null;
- }
-
- @Override
- @Deprecated
- public boolean isEnabled() {
- final Object handled = getAttributeValuesByName().get("enabled"); //$NON-NLS-1$
- if (handled instanceof Boolean) {
- return ((Boolean) handled).booleanValue();
- }
-
- return false;
- }
-
- @Override
- @Deprecated
- public boolean isHandled() {
- final Object handled = getAttributeValuesByName().get(IHandlerAttributes.ATTRIBUTE_HANDLED);
- if (handled instanceof Boolean) {
- return ((Boolean) handled).booleanValue();
- }
-
- return false;
- }
-
- /**
- * @see IHandler#removeHandlerListener(IHandlerListener)
- */
- @Override
- @Deprecated
- public void removeHandlerListener(IHandlerListener handlerListener) {
- if (handlerListener == null) {
- throw new NullPointerException();
- }
- if (handlerListeners == null) {
- return;
- }
-
- if (handlerListeners != null) {
- handlerListeners.remove(handlerListener);
- }
- if (handlerListeners.isEmpty()) {
- handlerListeners = null;
- }
- }
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ActionHandler.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ActionHandler.java
deleted file mode 100644
index 4d27c1127f6..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ActionHandler.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.commands;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.commands.IHandlerAttributes;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.actions.RetargetAction;
-
-/**
- * This class adapts instances of IAction
to IHandler
.
- *
- * @since 3.0
- * @deprecated Please use the "org.eclipse.core.commands" plug-in instead. This
- * API is scheduled for deletion, see Bug 431177 for details
- * @see org.eclipse.jface.commands.ActionHandler
- * @noreference This class is scheduled for deletion.
- */
-@Deprecated
-@SuppressWarnings("all")
-public final class ActionHandler extends AbstractHandler {
-
- /**
- * The attribute name for the checked property of the wrapped action. This
- * indicates whether the action should be displayed with as a checked check box.
- */
- private static final String ATTRIBUTE_CHECKED = "checked"; //$NON-NLS-1$
-
- /**
- * The attribute name for the enabled property of the wrapped action.
- */
- private static final String ATTRIBUTE_ENABLED = "enabled"; //$NON-NLS-1$
-
- /**
- *
- * The name of the attribute indicating whether the wrapped instance of
- * RetargetAction
has a handler.
- *
null
.
- */
- private final IAction action;
-
- /**
- * The map of attributes values. The keys are String
values of the
- * attribute names (given above). The values can be any type of
- * Object
.
- *
- * This map is always null if there are no IHandlerListeners registered.
- */
- private Map attributeValuesByName;
-
- /**
- * The property change listener hooked on to the action. This is initialized
- * when the first listener is attached to this handler, and is removed when the
- * handler is disposed or the last listener is removed.
- */
- private IPropertyChangeListener propertyChangeListener;
-
- /**
- * Creates a new instance of this class given an instance of
- * IAction
.
- *
- * @param action the action. Must not be null
.
- */
- @Deprecated
- public ActionHandler(IAction action) {
- if (action == null) {
- throw new NullPointerException();
- }
-
- this.action = action;
- }
-
- /**
- * @see org.eclipse.ui.commands.IHandler#addHandlerListener(org.eclipse.ui.commands.IHandlerListener)
- * @since 3.1
- */
- @Override
- @Deprecated
- public void addHandlerListener(IHandlerListener handlerListener) {
- if (!hasListeners()) {
- attachListener();
- }
-
- super.addHandlerListener(handlerListener);
- }
-
- /**
- * When a listener is attached to this handler, then this registers a listener
- * with the underlying action.
- *
- * @since 3.1
- */
- private void attachListener() {
- if (propertyChangeListener == null) {
- attributeValuesByName = getAttributeValuesByNameFromAction();
-
- propertyChangeListener = propertyChangeEvent -> {
- String property = propertyChangeEvent.getProperty();
- if (IAction.ENABLED.equals(property) || IAction.CHECKED.equals(property)
- || IHandlerAttributes.ATTRIBUTE_HANDLED.equals(property)) {
-
- Map previousAttributeValuesByName = attributeValuesByName;
- attributeValuesByName = getAttributeValuesByNameFromAction();
- if (!attributeValuesByName.equals(previousAttributeValuesByName)) {
- fireHandlerChanged(new HandlerEvent(ActionHandler.this, true, previousAttributeValuesByName));
- }
- }
- };
- }
-
- this.action.addPropertyChangeListener(propertyChangeListener);
- }
-
- /**
- * When no more listeners are registered, then this is used to removed the
- * property change listener from the underlying action.
- *
- * @since 3.1
- */
- private void detachListener() {
- this.action.removePropertyChangeListener(propertyChangeListener);
- propertyChangeListener = null;
- attributeValuesByName = null;
- }
-
- /**
- * Removes the property change listener from the action.
- *
- * @see org.eclipse.ui.commands.IHandler#dispose()
- */
- @Override
- @Deprecated
- public void dispose() {
- if (hasListeners()) {
- action.removePropertyChangeListener(propertyChangeListener);
- }
- }
-
- @Override
- @Deprecated
- public Object execute(Map parameterValuesByName) throws ExecutionException {
- if ((action.getStyle() == IAction.AS_CHECK_BOX) || (action.getStyle() == IAction.AS_RADIO_BUTTON)) {
- action.setChecked(!action.isChecked());
- }
- try {
- action.runWithEvent(new Event());
- } catch (Exception e) {
- throw new ExecutionException("While executing the action, an exception occurred", e); //$NON-NLS-1$
- }
- return null;
- }
-
- /**
- * Returns the action associated with this handler
- *
- * @return the action associated with this handler (not null)
- * @since 3.1
- */
- @Deprecated
- public IAction getAction() {
- return action;
- }
-
- @Override
- @Deprecated
- public Map getAttributeValuesByName() {
- if (attributeValuesByName == null) {
- return getAttributeValuesByNameFromAction();
- }
-
- return attributeValuesByName;
- }
-
- /**
- * An accessor for the attribute names from the action. This reads out all of
- * the attributes from an action into a local map.
- *
- * @return A map of the attribute values indexed by the attribute name. The
- * attributes names are strings, but the values can by any object.
- */
- private Map getAttributeValuesByNameFromAction() {
- Map map = new HashMap();
- map.put(ATTRIBUTE_CHECKED, action.isChecked() ? Boolean.TRUE : Boolean.FALSE);
- map.put(ATTRIBUTE_ENABLED, action.isEnabled() ? Boolean.TRUE : Boolean.FALSE);
- boolean handled = true;
- if (action instanceof RetargetAction) {
- RetargetAction retargetAction = (RetargetAction) action;
- handled = retargetAction.getActionHandler() != null;
- }
- map.put(ATTRIBUTE_HANDLED, handled ? Boolean.TRUE : Boolean.FALSE);
- map.put(ATTRIBUTE_ID, action.getId());
- map.put(ATTRIBUTE_STYLE, Integer.valueOf(action.getStyle()));
- return Collections.unmodifiableMap(map);
- }
-
- /**
- * @see org.eclipse.ui.commands.IHandler#removeHandlerListener(org.eclipse.ui.commands.IHandlerListener)
- * @since 3.1
- */
- @Override
- @Deprecated
- public void removeHandlerListener(IHandlerListener handlerListener) {
- super.removeHandlerListener(handlerListener);
-
- if (!hasListeners()) {
- detachListener();
- }
- }
-
- @Override
- @Deprecated
- public String toString() {
- final StringBuilder buffer = new StringBuilder();
-
- buffer.append("ActionHandler(action="); //$NON-NLS-1$
- buffer.append(action);
- buffer.append(')');
-
- return buffer.toString();
- }
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/CategoryEvent.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/CategoryEvent.java
deleted file mode 100644
index b55b07d5533..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/CategoryEvent.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.ui.commands;
-
-/**
- * An instance of this class describes changes to an instance of
- * ICategory
.
- * - * This class is not intended to be extended by clients. - *
- * - * @since 3.0 - * @see org.eclipse.ui.commands.ICategoryListener#categoryChanged(CategoryEvent) - * @deprecated Please use the "org.eclipse.core.commands" plug-in instead. This - * API is scheduled for deletion, see Bug 431177 for details - * @see org.eclipse.core.commands.CategoryEvent - * @noreference This class is scheduled for deletion. - */ -@Deprecated -public final class CategoryEvent { - - /** - * The category that has changed; this value is nevernull
.
- */
- private final ICategory category;
-
- /**
- * Whether the defined state of the category has changed.
- */
- private final boolean definedChanged;
-
- /**
- * Whether the name of the category has changed.
- */
- private final boolean nameChanged;
-
- /**
- * Creates a new instance of this class.
- *
- * @param category the instance of the interface that changed.
- * @param definedChanged true, iff the defined property changed.
- * @param nameChanged true, iff the name property changed.
- */
- @Deprecated
- public CategoryEvent(ICategory category, boolean definedChanged, boolean nameChanged) {
- if (category == null) {
- throw new NullPointerException();
- }
-
- this.category = category;
- this.definedChanged = definedChanged;
- this.nameChanged = nameChanged;
- }
-
- /**
- * Returns the instance of the interface that changed.
- *
- * @return the instance of the interface that changed. Guaranteed not to be
- * null
.
- */
- @Deprecated
- public ICategory getCategory() {
- return category;
- }
-
- /**
- * Returns whether or not the defined property changed.
- *
- * @return true, iff the defined property changed.
- */
- @Deprecated
- public boolean hasDefinedChanged() {
- return definedChanged;
- }
-
- /**
- * Returns whether or not the name property changed.
- *
- * @return true, iff the name property changed.
- */
- @Deprecated
- public boolean hasNameChanged() {
- return nameChanged;
- }
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/CommandEvent.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/CommandEvent.java
deleted file mode 100644
index 4aecfa33a6c..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/CommandEvent.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.commands;
-
-import java.util.Collections;
-import java.util.Map;
-import org.eclipse.ui.internal.util.Util;
-
-/**
- * An instance of this class describes changes to an instance of
- * ICommand
.
- * - * This class is not intended to be extended by clients. - *
- * - * @since 3.0 - * @see ICommandListener#commandChanged(CommandEvent) - * @deprecated Please use the "org.eclipse.core.commands" plug-in instead. This - * API is scheduled for deletion, see Bug 431177 for details - * @see org.eclipse.core.commands.CommandEvent - * @noreference This class is scheduled for deletion. - */ -@Deprecated -@SuppressWarnings("all") -public final class CommandEvent { - - /** - * Whether the attributes of the command have changed. These are name and value - * pairs representing properties of the command. - */ - private final boolean attributeValuesByNameChanged; - - /** - * Whether the category identifier has changed. - */ - private final boolean categoryIdChanged; - - /** - * The command that has changed; this value is nevernull
.
- */
- private final ICommand command;
-
- /**
- * Whether the defined state of the command has changed.
- */
- private final boolean definedChanged;
-
- /**
- * Whether the description of the command has changed.
- */
- private final boolean descriptionChanged;
-
- /**
- * Whether the command has either gained or lost a handler.
- */
- private final boolean handledChanged;
-
- /**
- * Whether the key bindings for the command have changed.
- */
- private final boolean keySequenceBindingsChanged;
-
- /**
- * Whether the name of the command has changed.
- */
- private final boolean nameChanged;
-
- /**
- * The map of attributes before the change. This is a map of attribute name
- * (strings) to values (any object).
- */
- private Map previousAttributeValuesByName;
-
- /**
- * Creates a new instance of this class.
- *
- * @param command the instance of the interface that
- * changed.
- * @param attributeValuesByNameChanged true, iff the attributeValuesByName
- * property changed.
- * @param categoryIdChanged true, iff the categoryId property
- * changed.
- * @param definedChanged true, iff the defined property changed.
- * @param descriptionChanged true, iff the description property
- * changed.
- * @param handledChanged true, iff the handled property changed.
- * @param keySequenceBindingsChanged true, iff the keySequenceBindings
- * property changed.
- * @param nameChanged true, iff the name property changed.
- * @param previousAttributeValuesByName the map of previous attribute values by
- * name. This map may be empty. If this map
- * is not empty, it's collection of keys
- * must only contain instances of
- * String
. This map must be
- * null
if
- * attributeValuesByNameChanged is
- * false
and must not be null
- * if attributeValuesByNameChanged is
- * true
.
- */
- public CommandEvent(ICommand command, boolean attributeValuesByNameChanged, boolean categoryIdChanged,
- boolean definedChanged, boolean descriptionChanged, boolean handledChanged,
- boolean keySequenceBindingsChanged, boolean nameChanged, Map previousAttributeValuesByName) {
- if (command == null) {
- throw new NullPointerException();
- }
-
- if (!attributeValuesByNameChanged && previousAttributeValuesByName != null) {
- throw new IllegalArgumentException();
- }
-
- if (attributeValuesByNameChanged) {
- if (previousAttributeValuesByName == null) {
- this.previousAttributeValuesByName = Collections.EMPTY_MAP;
- } else {
- this.previousAttributeValuesByName = Util.safeCopy(previousAttributeValuesByName, String.class,
- Object.class, false, true);
- }
- }
-
- this.command = command;
- this.attributeValuesByNameChanged = attributeValuesByNameChanged;
- this.categoryIdChanged = categoryIdChanged;
- this.definedChanged = definedChanged;
- this.descriptionChanged = descriptionChanged;
- this.handledChanged = handledChanged;
- this.keySequenceBindingsChanged = keySequenceBindingsChanged;
- this.nameChanged = nameChanged;
- }
-
- /**
- * Returns the instance of the interface that changed.
- *
- * @return the instance of the interface that changed. Guaranteed not to be
- * null
.
- */
- @Deprecated
- public ICommand getCommand() {
- return command;
- }
-
- /**
- * Returns the map of previous attribute values by name.
- *
- * @return the map of previous attribute values by name. This map may be empty.
- * If this map is not empty, it's collection of keys is guaranteed to
- * only contain instances of String
. This map is guaranteed
- * to be null
if haveAttributeValuesByNameChanged() is
- * false
and is guaranteed to not be null if
- * haveAttributeValuesByNameChanged() is true
.
- */
- @Deprecated
- public Map getPreviousAttributeValuesByName() {
- return previousAttributeValuesByName;
- }
-
- /**
- * Returns whether or not the categoryId property changed.
- *
- * @return true, iff the categoryId property changed.
- */
- @Deprecated
- public boolean hasCategoryIdChanged() {
- return categoryIdChanged;
- }
-
- /**
- * Returns whether or not the defined property changed.
- *
- * @return true, iff the defined property changed.
- */
- @Deprecated
- public boolean hasDefinedChanged() {
- return definedChanged;
- }
-
- /**
- * Returns whether or not the description property changed.
- *
- * @return true, iff the description property changed.
- */
- @Deprecated
- public boolean hasDescriptionChanged() {
- return descriptionChanged;
- }
-
- /**
- * Returns whether or not the handled property changed.
- *
- * @return true, iff the handled property changed.
- */
- @Deprecated
- public boolean hasHandledChanged() {
- return handledChanged;
- }
-
- /**
- * Returns whether or not the name property changed.
- *
- * @return true, iff the name property changed.
- */
- @Deprecated
- public boolean hasNameChanged() {
- return nameChanged;
- }
-
- /**
- * Returns whether or not the attributeValuesByName property changed.
- *
- * @return true, iff the attributeValuesByName property changed.
- */
- @Deprecated
- public boolean haveAttributeValuesByNameChanged() {
- return attributeValuesByNameChanged;
- }
-
- /**
- * Returns whether or not the keySequenceBindings property changed.
- *
- * @return true, iff the keySequenceBindings property changed.
- */
- @Deprecated
- public boolean haveKeySequenceBindingsChanged() {
- return keySequenceBindingsChanged;
- }
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/CommandException.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/CommandException.java
deleted file mode 100644
index 9b9b594382e..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/CommandException.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.commands;
-
-/**
- * Signals that an exception occurred within the command architecture.
- * - * This class is not intended to be extended by clients. - *
- * - * @since 3.0 - * @deprecated Please use the "org.eclipse.core.commands" plug-in instead. This - * API is scheduled for deletion, see Bug 431177 for details - * @see org.eclipse.core.commands.common.CommandException - * @noextend This class is not intended to be subclassed by clients. - * @noreference This class is scheduled for deletion. - */ -@Deprecated -@SuppressWarnings("all") -public abstract class CommandException extends Exception { - - /** - * Generated serial version UID for this class. - * - * @since 3.4 - */ - private static final long serialVersionUID = 1776879459633730964L; - - private Throwable cause; - - /** - * Creates a new instance of this class with the specified detail message. - * - * @param message the detail message. - */ - @Deprecated - public CommandException(String message) { - super(message); - } - - /** - * Creates a new instance of this class with the specified detail message and - * cause. - * - * @param message the detail message. - * @param cause the cause. - */ - @Deprecated - public CommandException(String message, Throwable cause) { - super(message); - // don't pass the cause to super, to allow compilation against JCL Foundation - this.cause = cause; - } - - /** - * Returns the cause of this throwable ornull
if the cause is
- * nonexistent or unknown.
- *
- * @return the cause or null
- * @since 3.1
- */
- @Override
- @Deprecated
- public Throwable getCause() {
- return cause;
- }
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/CommandManagerEvent.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/CommandManagerEvent.java
deleted file mode 100644
index 9e5c9e8a68f..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/CommandManagerEvent.java
+++ /dev/null
@@ -1,332 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.commands;
-
-import java.util.Set;
-import org.eclipse.ui.internal.util.Util;
-
-/**
- * An instance of this class describes changes to an instance of
- * ICommandManager
.
- * - * This class is not intended to be extended by clients. - *
- * - * @since 3.0 - * @see ICommandManagerListener#commandManagerChanged(CommandManagerEvent) - * @see org.eclipse.core.commands.CommandManagerEvent - * @deprecated Please use the "org.eclipse.core.commands" plug-in instead. This - * API is scheduled for deletion, see Bug 431177 for details - * @noreference This class is scheduled for deletion. - */ -@Deprecated -@SuppressWarnings("all") -public final class CommandManagerEvent { - - /** - * Whether the set of active contexts has changed. - */ - private final boolean activeContextIdsChanged; - - /** - * Whether the active key configuration has changed. - */ - private final boolean activeKeyConfigurationIdChanged; - - /** - * Whether the locale has changed. - */ - private final boolean activeLocaleChanged; - - /** - * Whether the platform has changed. - */ - private final boolean activePlatformChanged; - - /** - * Whether the command manager has changed. - */ - private final ICommandManager commandManager; - - /** - * Whether the list of defined categories has changed. - */ - private final boolean definedCategoryIdsChanged; - - /** - * Whether the list of defined commands has changed. - */ - private final boolean definedCommandIdsChanged; - - /** - * Whether the list of defined key configurations has changed. - */ - private final boolean definedKeyConfigurationIdsChanged; - - /** - * The set of the defined categories before the change occurred. This is a set - * of strings (category identifiers). - */ - private final Set previouslyDefinedCategoryIds; - - /** - * The set of the defined commands before the change occurred. This is a set of - * strings (command identifiers). - */ - private final Set previouslyDefinedCommandIds; - - /** - * The set of the defined key configurations before the change occurred. This is - * a set of strings (key configuration identifiers). - */ - private final Set previouslyDefinedKeyConfigurationIds; - - /** - * Creates a new instance of this class. - * - * @param commandManager the instance of the interface - * that changed. - * @param activeContextIdsChanged true, iff the - * activeContextIdsChanged property - * changed. - * @param activeKeyConfigurationIdChanged true, iff the - * activeKeyConfigurationIdChanged - * property changed. - * @param activeLocaleChanged true, iff the activeLocaleChanged - * property changed. - * @param activePlatformChanged true, iff the - * activePlatformChanged property - * changed. - * @param definedCategoryIdsChanged true, iff the - * definedCategoryIdsChanged - * property changed. - * @param definedCommandIdsChanged true, iff the - * definedCommandIdsChanged property - * changed. - * @param definedKeyConfigurationIdsChanged true, iff the - * definedKeyConfigurationIdsChanged - * property changed. - * @param previouslyDefinedCategoryIds the set of identifiers to - * previously defined categories. - * This set may be empty. If this - * set is not empty, it must only - * contain instances of - *String
. This set
- * must be null
if
- * definedCategoryIdsChanged is
- * false
and must not
- * be null if
- * definedCategoryIdsChanged is
- * true
.
- * @param previouslyDefinedCommandIds the set of identifiers to
- * previously defined commands. This
- * set may be empty. If this set is
- * not empty, it must only contain
- * instances of String
.
- * This set must be
- * null
if
- * definedCommandIdsChanged is
- * false
and must not
- * be null if
- * definedContextIdsChanged is
- * true
.
- * @param previouslyDefinedKeyConfigurationIds the set of identifiers to
- * previously defined key
- * configurations. This set may be
- * empty. If this set is not empty,
- * it must only contain instances of
- * String
. This set
- * must be null
if
- * definedKeyConfigurationIdsChanged
- * is false
and must
- * not be null if
- * definedKeyConfigurationIdsChanged
- * is true
.
- */
- public CommandManagerEvent(ICommandManager commandManager, boolean activeContextIdsChanged,
- boolean activeKeyConfigurationIdChanged, boolean activeLocaleChanged, boolean activePlatformChanged,
- boolean definedCategoryIdsChanged, boolean definedCommandIdsChanged,
- boolean definedKeyConfigurationIdsChanged, Set previouslyDefinedCategoryIds,
- Set previouslyDefinedCommandIds, Set previouslyDefinedKeyConfigurationIds) {
- if (commandManager == null) {
- throw new NullPointerException();
- }
-
- if (!definedCategoryIdsChanged && previouslyDefinedCategoryIds != null) {
- throw new IllegalArgumentException();
- }
-
- if (!definedCommandIdsChanged && previouslyDefinedCommandIds != null) {
- throw new IllegalArgumentException();
- }
-
- if (!definedKeyConfigurationIdsChanged && previouslyDefinedKeyConfigurationIds != null) {
- throw new IllegalArgumentException();
- }
-
- if (definedCategoryIdsChanged) {
- this.previouslyDefinedCategoryIds = Util.safeCopy(previouslyDefinedCategoryIds, String.class);
- } else {
- this.previouslyDefinedCategoryIds = null;
- }
-
- if (definedCommandIdsChanged) {
- this.previouslyDefinedCommandIds = Util.safeCopy(previouslyDefinedCommandIds, String.class);
- } else {
- this.previouslyDefinedCommandIds = null;
- }
-
- if (definedKeyConfigurationIdsChanged) {
- this.previouslyDefinedKeyConfigurationIds = Util.safeCopy(previouslyDefinedKeyConfigurationIds,
- String.class);
- } else {
- this.previouslyDefinedKeyConfigurationIds = null;
- }
-
- this.commandManager = commandManager;
- this.activeContextIdsChanged = activeContextIdsChanged;
- this.activeKeyConfigurationIdChanged = activeKeyConfigurationIdChanged;
- this.activeLocaleChanged = activeLocaleChanged;
- this.activePlatformChanged = activePlatformChanged;
- this.definedCategoryIdsChanged = definedCategoryIdsChanged;
- this.definedCommandIdsChanged = definedCommandIdsChanged;
- this.definedKeyConfigurationIdsChanged = definedKeyConfigurationIdsChanged;
- }
-
- /**
- * Returns the instance of the interface that changed.
- *
- * @return the instance of the interface that changed. Guaranteed not to be
- * null
.
- */
- @Deprecated
- public ICommandManager getCommandManager() {
- return commandManager;
- }
-
- /**
- * Returns the set of identifiers to previously defined categories.
- *
- * @return the set of identifiers to previously defined categories. This set may
- * be empty. If this set is not empty, it is guaranteed to only contain
- * instances of String
. This set is guaranteed to be
- * null
if haveDefinedCategoryIdsChanged() is
- * false
and is guaranteed to not be null if
- * haveDefinedCategoryIdsChanged() is true
.
- */
- @Deprecated
- public Set getPreviouslyDefinedCategoryIds() {
- return previouslyDefinedCategoryIds;
- }
-
- /**
- * Returns the set of identifiers to previously defined commands.
- *
- * @return the set of identifiers to previously defined commands. This set may
- * be empty. If this set is not empty, it is guaranteed to only contain
- * instances of String
. This set is guaranteed to be
- * null
if haveDefinedCommandIdsChanged() is
- * false
and is guaranteed to not be null if
- * haveDefinedCommandIdsChanged() is true
.
- */
- @Deprecated
- public Set getPreviouslyDefinedCommandIds() {
- return previouslyDefinedCommandIds;
- }
-
- /**
- * Returns the set of identifiers to previously defined key conigurations.
- *
- * @return the set of identifiers to previously defined key configurations. This
- * set may be empty. If this set is not empty, it is guaranteed to only
- * contain instances of String
. This set is guaranteed to
- * be null
if haveDefinedKeyConfigurationIdsChanged() is
- * false
and is guaranteed to not be null if
- * haveDefinedKeyConfigurationIdsChanged() is true
.
- */
- @Deprecated
- public Set getPreviouslyDefinedKeyConfigurationIds() {
- return previouslyDefinedKeyConfigurationIds;
- }
-
- /**
- * Returns whether or not the activeKeyConfigurationId property changed.
- *
- * @return true, iff the activeKeyConfigurationId property changed.
- */
- @Deprecated
- public boolean hasActiveKeyConfigurationIdChanged() {
- return activeKeyConfigurationIdChanged;
- }
-
- /**
- * Returns whether or not the activeLocale property changed.
- *
- * @return true, iff the activeLocale property changed.
- */
- @Deprecated
- public boolean hasActiveLocaleChanged() {
- return activeLocaleChanged;
- }
-
- /**
- * Returns whether or not the activePlatform property changed.
- *
- * @return true, iff the activePlatform property changed.
- */
- @Deprecated
- public boolean hasActivePlatformChanged() {
- return activePlatformChanged;
- }
-
- /**
- * Returns whether or not the activeContextIds property changed.
- *
- * @return true, iff the activeContextIds property changed.
- */
- @Deprecated
- public boolean haveActiveContextIdsChanged() {
- return activeContextIdsChanged;
- }
-
- /**
- * Returns whether or not the definedCategoryIds property changed.
- *
- * @return true, iff the definedCategoryIds property changed.
- */
- @Deprecated
- public boolean haveDefinedCategoryIdsChanged() {
- return definedCategoryIdsChanged;
- }
-
- /**
- * Returns whether or not the definedCommandIds property changed.
- *
- * @return true, iff the definedCommandIds property changed.
- */
- @Deprecated
- public boolean haveDefinedCommandIdsChanged() {
- return definedCommandIdsChanged;
- }
-
- /**
- * Returns whether or not the definedKeyConfigurationIds property changed.
- *
- * @return true, iff the definedKeyConfigurationIds property changed.
- */
- @Deprecated
- public boolean haveDefinedKeyConfigurationIdsChanged() {
- return definedKeyConfigurationIdsChanged;
- }
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ExecutionException.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ExecutionException.java
deleted file mode 100644
index fd5fcbb0804..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ExecutionException.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.commands;
-
-/**
- * Signals that an exception occured during the execution of a command.
- * - * This class is not intended to be extended by clients. - *
- * - * @since 3.0 - * @deprecated Please use the "org.eclipse.core.commands" plug-in instead. This - * API is scheduled for deletion, see Bug 431177 for details - * @see org.eclipse.core.commands.ExecutionException - * @noreference This class is scheduled for deletion. - */ -@Deprecated -@SuppressWarnings("all") -public final class ExecutionException extends CommandException { - - /** - * Generated serial version UID for this class. - * - * @since 3.1 - */ - private static final long serialVersionUID = 3258130262767448120L; - - /** - * Creates a new instance of this class with the specified detail message and - * cause. - * - * @param message the detail message. - * @param cause the cause. - */ - public ExecutionException(String message, Throwable cause) { - super(message, cause); - } - - /** - * Constructs a new instance ofExecutionException
using an
- * instance of the new ExecutionException
.
- *
- * @param e The exception from which this exception should be created; must not
- * be null
.
- * @since 3.1
- */
- public ExecutionException(final org.eclipse.core.commands.ExecutionException e) {
- super(e.getMessage(), e);
- }
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/HandlerEvent.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/HandlerEvent.java
deleted file mode 100644
index afe2e181900..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/HandlerEvent.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.commands;
-
-import java.util.Map;
-import org.eclipse.ui.internal.util.Util;
-
-/**
- * An instance of this class describes changes to an instance of
- * IHandler
.
- * - * This class is not intended to be extended by clients. - *
- * - * @since 3.0 - * @see IHandlerListener#handlerChanged(HandlerEvent) - * @deprecated Please use the "org.eclipse.core.commands" plug-in instead. This - * API is scheduled for deletion, see Bug 431177 for details - * @noreference This class is scheduled for deletion. - */ -@Deprecated -@SuppressWarnings("all") -public final class HandlerEvent { - - /** - * Whether the attributes of the handler changed. - */ - private final boolean attributeValuesByNameChanged; - - /** - * The handler that changed; this value is nevernull
.
- */
- private final IHandler handler;
-
- /**
- * This is the cached result of getPreviousAttributeValuesByName. It is computed
- * the first time getPreviousAttributeValuesByName is called.
- */
- private Map previousAttributeValuesByName;
-
- /**
- * The map of previous attributes, if they changed. If they did not change, then
- * this value is null
. The map's keys are the attribute names
- * (strings), and its value are any object.
- *
- * This is the original map passed into the constructor. This object always
- * returns a copy of this map, not the original. However the constructor of this
- * object is called very frequently and the map is rarely requested, so we only
- * copy the map the first time it is requested.
- *
- * @since 3.1
- */
- private final Map originalPreviousAttributeValuesByName;
-
- /**
- * Creates a new instance of this class.
- *
- * @param handler the instance of the interface that
- * changed.
- * @param attributeValuesByNameChanged true, iff the attributeValuesByName
- * property changed.
- * @param previousAttributeValuesByName the map of previous attribute values by
- * name. This map may be empty. If this map
- * is not empty, it's collection of keys
- * must only contain instances of
- * String
. This map must be
- * null
if
- * attributeValuesByNameChanged is
- * false
and must not be null
- * if attributeValuesByNameChanged is
- * true
.
- */
- @Deprecated
- public HandlerEvent(IHandler handler, boolean attributeValuesByNameChanged, Map previousAttributeValuesByName) {
- if (handler == null) {
- throw new NullPointerException();
- }
-
- if (!attributeValuesByNameChanged && previousAttributeValuesByName != null) {
- throw new IllegalArgumentException();
- }
-
- if (attributeValuesByNameChanged) {
- this.originalPreviousAttributeValuesByName = previousAttributeValuesByName;
- } else {
- this.originalPreviousAttributeValuesByName = null;
- }
-
- this.handler = handler;
- this.attributeValuesByNameChanged = attributeValuesByNameChanged;
- }
-
- /**
- * Returns the instance of the interface that changed.
- *
- * @return the instance of the interface that changed. Guaranteed not to be
- * null
.
- */
- @Deprecated
- public IHandler getHandler() {
- return handler;
- }
-
- /**
- * Returns the map of previous attribute values by name.
- *
- * @return the map of previous attribute values by name. This map may be empty.
- * If this map is not empty, it's collection of keys is guaranteed to
- * only contain instances of String
. This map is guaranteed
- * to be null
if haveAttributeValuesByNameChanged() is
- * false
and is guaranteed to not be null if
- * haveAttributeValuesByNameChanged() is true
.
- */
- @Deprecated
- public Map getPreviousAttributeValuesByName() {
- if (originalPreviousAttributeValuesByName == null) {
- return null;
- }
-
- if (previousAttributeValuesByName == null) {
- previousAttributeValuesByName = Util.safeCopy(originalPreviousAttributeValuesByName, String.class,
- Object.class, false, true);
- }
-
- return previousAttributeValuesByName;
- }
-
- /**
- * Returns whether or not the attributeValuesByName property changed.
- *
- * @return true, iff the attributeValuesByName property changed.
- */
- @Deprecated
- public boolean haveAttributeValuesByNameChanged() {
- return attributeValuesByNameChanged;
- }
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/HandlerSubmission.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/HandlerSubmission.java
deleted file mode 100644
index 30d730d01df..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/HandlerSubmission.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.commands;
-
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchPartSite;
-import org.eclipse.ui.internal.util.Util;
-
-/**
- * - * An instance of this class represents a request to handle a command. A handler - * submission specifies a list of conditions under which it would be appropriate - * for a particular command to have a particular handler. These conditions - * include things like the active part or the active shell. So, it is possible - * to say things like: "when my part is active, please consider calling these - * classes when you want to perform a cut, copy or paste". - *
- *- * The workbench considers all of the submissions it has received and choses the - * ones it views as the best possible match. - *
- *- * This class is not intended to be extended by clients. - *
- *- * Note: this class has a natural ordering that is inconsistent with equals. - *
- * - * @since 3.0 - * @see org.eclipse.ui.commands.IWorkbenchCommandSupport - * @deprecated Please useIHandlerService.activateHandler
instead.
- * This API is scheduled for deletion, see Bug 431177 for details
- * @see org.eclipse.ui.handlers.IHandlerService
- * @noreference This class is scheduled for deletion.
- */
-@Deprecated
-@SuppressWarnings("all")
-public final class HandlerSubmission implements Comparable {
-
- /**
- * The part identifier for the part that should be active before this submission
- * can be considered. This value can be null
, which indicates that
- * it should match any part.
- */
- private final String activePartId;
-
- /**
- * The shell that must be active before this submission can be considered. This
- * value can be null
, which indicates that it should match any
- * shell.
- */
- private final Shell activeShell;
-
- /**
- * The workbench site that must be active before this submission can be
- * considered. This value can be null
, which indicates that it
- * should match an workbench part site.
- */
- private final IWorkbenchPartSite activeWorkbenchPartSite;
-
- /**
- * The identifier for the command which the submitted handler handles. This
- * value cannot be null
.
- */
- private final String commandId;
-
- /**
- * The handler being submitted. This value cannot be null
.
- */
- private final IHandler handler;
-
- /**
- * The priority for this submission. In the event of all other factors being
- * equal, the priority will be considered in an attempt to resolve conflicts.
- * This value cannot be null
.
- */
- private final Priority priority;
-
- /**
- * A lazily computed cache of the string representation of this submission. This
- * value is computed once; before it is computed, it is null
.
- */
- private transient String string;
-
- /**
- * Creates a new instance of this class.
- *
- * @param activePartId the identifier of the part that must be active
- * for this request to be considered. May be
- * null
.
- * @param activeShell the shell that must be active for this request
- * to be considered. May be null
.
- * @param activeWorkbenchPartSite the workbench part site of the part that must
- * be active for this request to be considered.
- * May be null
.
- * @param commandId the identifier of the command to be handled.
- * Must not be null
.
- * @param handler the handler. Must not be null
.
- * @param priority the priority. Must not be null
.
- */
- @Deprecated
- public HandlerSubmission(String activePartId, Shell activeShell, IWorkbenchPartSite activeWorkbenchPartSite,
- String commandId, IHandler handler, Priority priority) {
- if (commandId == null || handler == null || priority == null) {
- throw new NullPointerException();
- }
-
- this.activePartId = activePartId;
- this.activeShell = activeShell;
- this.activeWorkbenchPartSite = activeWorkbenchPartSite;
- this.commandId = commandId;
- this.handler = handler;
- this.priority = priority;
- }
-
- /**
- * @see Comparable#compareTo(java.lang.Object)
- */
- @Override
- @Deprecated
- public int compareTo(Object object) {
- HandlerSubmission castedObject = (HandlerSubmission) object;
- int compareTo = Util.compare(activeWorkbenchPartSite, castedObject.activeWorkbenchPartSite);
-
- if (compareTo == 0) {
- compareTo = Util.compare(activePartId, castedObject.activePartId);
-
- if (compareTo == 0) {
- compareTo = Util.compare(activeShell, castedObject.activeShell);
-
- if (compareTo == 0) {
- compareTo = Util.compare(priority, castedObject.priority);
-
- if (compareTo == 0) {
- compareTo = Util.compare(commandId, castedObject.commandId);
-
- if (compareTo == 0) {
- compareTo = Util.compare(handler, castedObject.handler);
- }
- }
- }
- }
- }
-
- return compareTo;
- }
-
- /**
- * Returns the identifier of the part that must be active for this request to be
- * considered.
- *
- * @return the identifier of the part that must be active for this request to be
- * considered. May be null
.
- */
- @Deprecated
- public String getActivePartId() {
- return activePartId;
- }
-
- /**
- * Returns the shell that must be active for this request to be considered.
- *
- * @return the shell that must be active for this request to be considered. May
- * be null
.
- */
- @Deprecated
- public Shell getActiveShell() {
- return activeShell;
- }
-
- /**
- * Returns the workbench part site of the part that must be active for this
- * request to be considered.
- *
- * @return the workbench part site of the part that must be active for this
- * request to be considered. May be null
.
- */
- @Deprecated
- public IWorkbenchPartSite getActiveWorkbenchPartSite() {
- return activeWorkbenchPartSite;
- }
-
- /**
- * Returns the identifier of the command to be handled.
- *
- * @return the identifier of the command to be handled. Guaranteed not to be
- * null
.
- */
- @Deprecated
- public String getCommandId() {
- return commandId;
- }
-
- /**
- * Returns the handler.
- *
- * @return the handler. Guaranteed not to be null
.
- */
- @Deprecated
- public IHandler getHandler() {
- return handler;
- }
-
- /**
- * Returns the priority.
- *
- * @return the priority. Guaranteed not to be null
.
- */
- @Deprecated
- public Priority getPriority() {
- return priority;
- }
-
- /**
- * @see Object#toString()
- */
- @Override
- public String toString() {
- if (string == null) {
- final StringBuilder stringBuffer = new StringBuilder();
- stringBuffer.append("[activePartId="); //$NON-NLS-1$
- stringBuffer.append(activePartId);
- stringBuffer.append(",activeShell="); //$NON-NLS-1$
- stringBuffer.append(activeShell);
- stringBuffer.append(",activeWorkbenchSite="); //$NON-NLS-1$
- stringBuffer.append(activeWorkbenchPartSite);
- stringBuffer.append(",commandId="); //$NON-NLS-1$
- stringBuffer.append(commandId);
- stringBuffer.append(",handler="); //$NON-NLS-1$
- stringBuffer.append(handler);
- stringBuffer.append(",priority="); //$NON-NLS-1$
- stringBuffer.append(priority);
- stringBuffer.append(']');
- string = stringBuffer.toString();
- }
-
- return string;
- }
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICategory.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICategory.java
deleted file mode 100644
index 482ccee1dc7..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICategory.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.ui.commands;
-
-/**
- * - * A category is a grouping of commands by functional area. For example, in the - * Eclipse workbench, "Text Editing" is a category containing various commands - * related to text editing. A category's primary functionality is to control the - * display of commands to the user. When appropriate, commands displayed to the - * user (e.g., keys preference page) will be grouped by category. - *
- *
- * An instance of ICategory
is a handle representing a category as
- * defined by the extension point org.eclipse.ui.commands
. The
- * identifier of the handle is identifier of the category being represented.
- *
- * An instance of ICategory
can be obtained from an instance of
- * ICommandManager
for any identifier, whether or not a category
- * with that identifier defined in the plugin registry.
- *
- * The handle-based nature of this API allows it to work well with runtime - * plugin activation and deactivation, which causes dynamic changes to the - * plugin registry, and therefore, potentially, dynamic changes to the set of - * category definitions. - *
- *- * This interface is not intended to be extended or implemented by clients. - *
- * - * @since 3.0 - * @see ICategoryListener - * @see ICommandManager - * @see org.eclipse.core.commands.Category - * @deprecated Please use the "org.eclipse.core.commands" plug-in instead. This - * API is scheduled for deletion, see Bug 431177 for details - * @noimplement This interface is not intended to be implemented by clients. - * @noreference This interface is scheduled for deletion. - * @noextend This interface is not intended to be extended by clients. - */ -@Deprecated -@SuppressWarnings("all") -public interface ICategory extends Comparable { - - /** - * Registers an instance ofICategoryListener
to listen for changes
- * to attributes of this instance.
- *
- * @param categoryListener the instance of ICategoryListener
to
- * register. Must not be null
. If an
- * attempt is made to register an instance of
- * ICategoryListener
which is already
- * registered with this instance, no operation is
- * performed.
- */
- @Deprecated
- void addCategoryListener(ICategoryListener categoryListener);
-
- /**
- * - * Returns the description of the category represented by this handle, suitable - * for display to the user. - *
- *- * Notification is sent to all registered listeners if this attribute changes. - *
- * - * @return the description of the category represented by this handle. - * Guaranteed not to benull
.
- * @throws NotDefinedException if the category represented by this handle is not
- * defined.
- */
- @Deprecated
- String getDescription() throws NotDefinedException;
-
- /**
- * Returns the identifier of this handle.
- *
- * @return the identifier of this handle. Guaranteed not to be
- * null
.
- */
- @Deprecated
- String getId();
-
- /**
- * - * Returns the name of the category represented by this handle, suitable for - * display to the user. - *
- *- * Notification is sent to all registered listeners if this attribute changes. - *
- * - * @return the name of the category represented by this handle. Guaranteed not - * to benull
.
- * @throws NotDefinedException if the category represented by this handle is not
- * defined.
- */
- @Deprecated
- String getName() throws NotDefinedException;
-
- /**
- * - * Returns whether or not the category represented by this handle is defined. - *
- *- * Notification is sent to all registered listeners if this attribute changes. - *
- * - * @returntrue
, iff the category represented by this handle is
- * defined.
- */
- @Deprecated
- boolean isDefined();
-
- /**
- * Unregisters an instance of ICategoryListener
listening for
- * changes to attributes of this instance.
- *
- * @param categoryListener the instance of ICategoryListener
to
- * unregister. Must not be null
. If an
- * attempt is made to unregister an instance of
- * ICategoryListener
which is not already
- * registered with this instance, no operation is
- * performed.
- */
- @Deprecated
- void removeCategoryListener(ICategoryListener categoryListener);
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICategoryListener.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICategoryListener.java
deleted file mode 100644
index b12ec9766c9..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICategoryListener.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.ui.commands;
-
-/**
- *
- * An instance of ICategoryListener
can be used by clients to
- * receive notification of changes to one or more instances of
- * ICategory
.
- *
- * This interface may be implemented by clients. - *
- * - * @since 3.0 - * @see CategoryEvent - * @see org.eclipse.ui.commands.ICategory#addCategoryListener(ICategoryListener) - * @see org.eclipse.ui.commands.ICategory#removeCategoryListener(ICategoryListener) - * @see org.eclipse.core.commands.ICategoryListener - * @deprecated Please use the "org.eclipse.core.commands" plug-in instead. This - * API is scheduled for deletion, see Bug 431177 for details - * @noreference This interface is scheduled for deletion. - * @noimplement This interface is not intended to be implemented by clients. - * @noextend This interface is not intended to be extended by clients. - */ -@Deprecated -@SuppressWarnings("all") -public interface ICategoryListener { - - /** - * Notifies that one or more attributes of an instance ofICategory
- * have changed. Specific details are described in the
- * CategoryEvent
.
- *
- * @param categoryEvent the category event. Guaranteed not to be
- * null
.
- */
- @Deprecated
- void categoryChanged(CategoryEvent categoryEvent);
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICommand.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICommand.java
deleted file mode 100644
index 42be6a2a959..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICommand.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.commands;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- *
- * An instance of ICommand
is a handle representing a command as
- * defined by the extension point org.eclipse.ui.commands
. The
- * identifier of the handle is identifier of the command being represented.
- *
- * An instance of ICommand
can be obtained from an instance of
- * ICommandManager
for any identifier, whether or not a command
- * with that identifier defined in the plugin registry.
- *
- * The handle-based nature of this API allows it to work well with runtime
- * plugin activation and deactivation. If a command is defined, that means that
- * its corresponding plug-in is active. If the plug-in is then deactivated, the
- * command will still exist but it will be undefined. An attempts to use an
- * undefined command will result in a NotDefinedException
being
- * thrown.
- *
- * This interface is not intended to be extended or implemented by clients. - *
- * - * @since 3.0 - * @see ICommandListener - * @see ICommandManager - * @see org.eclipse.core.commands.Command - * @deprecated Please use the "org.eclipse.core.commands" plug-in instead. This - * API is scheduled for deletion, see Bug 431177 for details - * @noimplement This interface is not intended to be implemented by clients. - * @noreference This interface is scheduled for deletion. - * @noextend This interface is not intended to be extended by clients. - */ -@Deprecated -@SuppressWarnings("all") -public interface ICommand extends Comparable { - - /** - * Registers an instance ofICommandListener
to listen for changes
- * to attributes of this instance.
- *
- * @param commandListener the instance of ICommandListener
to
- * register. Must not be null
. If an attempt
- * is made to register an instance of
- * ICommandListener
which is already
- * registered with this instance, no operation is
- * performed.
- */
- @Deprecated
- void addCommandListener(ICommandListener commandListener);
-
- /**
- * Executes with the map of parameter values by name.
- *
- * @param parameterValuesByName the map of parameter values by name. Reserved
- * for future use, must be null
.
- * @return the result of the execution. Reserved for future use, must be
- * null
.
- * @throws ExecutionException if an exception occurred during execution.
- * @throws NotHandledException if this is not handled.
- */
- @Deprecated
- Object execute(Map parameterValuesByName) throws ExecutionException, NotHandledException;
-
- /**
- * Returns the map of attribute values by name.
- * - * Notification is sent to all registered listeners if this property changes. - *
- * - * @return the map of attribute values by name. This map may be empty, but is - * guaranteed not to benull
. If this map is not empty, its
- * collection of keys is guaranteed to only contain instances of
- * String
.
- * @throws NotHandledException if this is not handled.
- */
- @Deprecated
- Map getAttributeValuesByName() throws NotHandledException;
-
- /**
- * - * Returns the identifier of the category of the command represented by this - * handle. - *
- *- * Notification is sent to all registered listeners if this attribute changes. - *
- * - * @return the identifier of the category of the command represented by this - * handle. May benull
.
- * @throws NotDefinedException if the command represented by this handle is not
- * defined.
- */
- @Deprecated
- String getCategoryId() throws NotDefinedException;
-
- /**
- * - * Returns the description of the command represented by this handle, suitable - * for display to the user. - *
- *- * Notification is sent to all registered listeners if this attribute changes. - *
- * - * @return the description of the command represented by this handle. Guaranteed - * not to benull
.
- * @throws NotDefinedException if the command represented by this handle is not
- * defined.
- */
- @Deprecated
- String getDescription() throws NotDefinedException;
-
- /**
- * Returns the identifier of this handle.
- *
- * @return the identifier of this handle. Guaranteed not to be
- * null
.
- */
- @Deprecated
- String getId();
-
- /**
- * - * Returns the list of key sequence bindings for this handle. This method will - * return all key sequence bindings for this handle's identifier, whether or not - * the command represented by this handle is defined. - *
- *- * Notification is sent to all registered listeners if this attribute changes. - *
- * - * @return the list of key sequence bindings. This list may be empty, but is - * guaranteed not to benull
. If this list is not empty, it
- * is guaranteed to only contain instances of
- * IKeySequenceBinding
.
- */
- List getKeySequenceBindings();
-
- /**
- * - * Returns the name of the command represented by this handle, suitable for - * display to the user. - *
- *- * Notification is sent to all registered listeners if this attribute changes. - *
- * - * @return the name of the command represented by this handle. Guaranteed not to - * benull
.
- * @throws NotDefinedException if the command represented by this handle is not
- * defined.
- */
- @Deprecated
- String getName() throws NotDefinedException;
-
- /**
- * - * Returns whether or not the command represented by this handle is defined. - *
- *- * Notification is sent to all registered listeners if this attribute changes. - *
- * - * @returntrue
, iff the command represented by this handle is
- * defined.
- */
- @Deprecated
- boolean isDefined();
-
- /**
- *
- * Returns whether or not this command is handled. A command is handled if it
- * currently has an IHandler
instance associated with it. A command
- * needs a handler to carry out the {@link ICommand#execute(Map)} method.
- *
- * Notification is sent to all registered listeners if this attribute changes. - *
- * - * @returntrue
, iff this command is enabled.
- */
- @Deprecated
- boolean isHandled();
-
- /**
- * Unregisters an instance of ICommandListener
listening for
- * changes to attributes of this instance.
- *
- * @param commandListener the instance of ICommandListener
to
- * unregister. Must not be null
. If an
- * attempt is made to unregister an instance of
- * ICommandListener
which is not already
- * registered with this instance, no operation is
- * performed.
- */
- @Deprecated
- void removeCommandListener(ICommandListener commandListener);
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICommandListener.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICommandListener.java
deleted file mode 100644
index 0634b50b497..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICommandListener.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.commands;
-
-/**
- * An instance of this interface can be used by clients to receive notification
- * of changes to one or more instances of ICommand
.
- * - * This interface may be implemented by clients. - *
- * - * @since 3.0 - * @see ICommand#addCommandListener(ICommandListener) - * @see ICommand#removeCommandListener(ICommandListener) - * @see org.eclipse.core.commands.ICommandListener - * @deprecated Please use the "org.eclipse.core.commands" plug-in instead. This - * API is scheduled for deletion, see Bug 431177 for details - * @noreference This interface is scheduled for deletion. - * @noimplement This interface is not intended to be implemented by clients. - * @noextend This interface is not intended to be extended by clients. - */ -@Deprecated -@SuppressWarnings("all") -public interface ICommandListener { - - /** - * Notifies that one or more properties of an instance ofICommand
- * have changed. Specific details are described in the
- * CommandEvent
.
- *
- * @param commandEvent the command event. Guaranteed not to be
- * null
.
- */
- @Deprecated
- void commandChanged(CommandEvent commandEvent);
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICommandManager.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICommandManager.java
deleted file mode 100644
index 2e4bc0db02e..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICommandManager.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.ui.commands;
-
-import java.util.Map;
-import java.util.Set;
-import org.eclipse.ui.keys.KeySequence;
-
-/**
- *
- * An instance of ICommandManager
can be used to obtain instances
- * of ICommand
, as well as manage whether or not those instances
- * are active or inactive, enabled or disabled.
- *
- * This interface is not intended to be extended or implemented by clients. - *
- * - * @since 3.0 - * @see org.eclipse.ui.commands.ICommand - * @see org.eclipse.ui.commands.ICommandManagerListener - * @see org.eclipse.core.commands.CommandManager - * @deprecated Please use the "org.eclipse.core.commands" plug-in instead. This - * API is scheduled for deletion, see Bug 431177 for details - * @noimplement This interface is not intended to be implemented by clients. - * @noreference This interface is scheduled for deletion. - * @noextend This interface is not intended to be extended by clients. - */ -@Deprecated -@SuppressWarnings("all") -public interface ICommandManager { - - /** - * Registers an instance ofICommandManagerListener
to listen for
- * changes to attributes of this instance.
- *
- * @param commandManagerListener the instance of
- * ICommandManagerListener
to
- * register. Must not be null
. If an
- * attempt is made to register an instance of
- * ICommandManagerListener
which is
- * already registered with this instance, no
- * operation is performed.
- */
- @Deprecated
- void addCommandManagerListener(ICommandManagerListener commandManagerListener);
-
- /**
- * Returns the set of identifiers to active contexts.
- * - * Notification is sent to all registered listeners if this property changes. - *
- * - * @return the set of identifiers to active contexts. This set may be empty, but - * is guaranteed not to benull
. If this set is not empty,
- * it is guaranteed to only contain instances of String
.
- */
- @Deprecated
- Set getActiveContextIds();
-
- /**
- * Returns the active key configuration.
- * - * Notification is sent to all registered listeners if this property changes. - *
- * - * @return the active key configuration identifier. This set may be empty, but - * it is guaranteed to not benull
. If this set is not
- * empty, it is guaranteed to only contains instances of
- * String
.
- */
- @Deprecated
- String getActiveKeyConfigurationId();
-
- /**
- * Returns the active locale. While this property tends to be simply the result
- * of {@link java.util.Locale#getDefault()}, it may also be changed at runtime
- * by different implementations of command manager.
- * - * Notification is sent to all registered listeners if this property changes. - *
- * - * @return the active locale. May benull
.
- */
- @Deprecated
- String getActiveLocale();
-
- /**
- * Returns the active platform. While this property tends to be simply the
- * result of {@link org.eclipse.swt.SWT#getPlatform()}, it may also be changed
- * at runtime by different implementations of command manager.
- * - * Notification is sent to all registered listeners if this property changes. - *
- * - * @return the active platform. May benull
.
- */
- @Deprecated
- String getActivePlatform();
-
- /**
- * Returns a handle to a category given an identifier.
- *
- * @param categoryId an identifier. Must not be null
- * @return a handle to a category.
- */
- @Deprecated
- ICategory getCategory(String categoryId);
-
- /**
- * Returns a handle to a command given an identifier.
- *
- * @param commandId an identifier. Must not be null
- * @return a handle to a command; never null
.
- */
- @Deprecated
- ICommand getCommand(String commandId);
-
- /**
- * - * Returns the set of identifiers to defined categories. - *
- *- * Notification is sent to all registered listeners if this attribute changes. - *
- * - * @return the set of identifiers to defined categories. This set may be empty, - * but is guaranteed not to benull
. If this set is not
- * empty, it is guaranteed to only contain instances of
- * String
.
- */
- @Deprecated
- Set getDefinedCategoryIds();
-
- /**
- * - * Returns the set of identifiers to defined commands. - *
- *- * Notification is sent to all registered listeners if this attribute changes. - *
- * - * @return the set of identifiers to defined commands. This set may be empty, - * but is guaranteed not to benull
. If this set is not
- * empty, it is guaranteed to only contain instances of
- * String
.
- */
- @Deprecated
- Set getDefinedCommandIds();
-
- /**
- * - * Returns the set of identifiers to defined key configurations. - *
- *- * Notification is sent to all registered listeners if this attribute changes. - *
- * - * @return the set of identifiers to defined key configurations. This set may be - * empty, but is guaranteed not to benull
. If this set is
- * not empty, it is guaranteed to only contain instances of
- * String
.
- */
- @Deprecated
- Set getDefinedKeyConfigurationIds();
-
- /**
- * Returns a handle to a key configuration given an identifier.
- *
- * @param keyConfigurationId an identifier. Must not be null
- * @return a handle to a key configuration.
- */
- @Deprecated
- IKeyConfiguration getKeyConfiguration(String keyConfigurationId);
-
- /**
- * Finds all of the commands which have key bindings that start with the given
- * key sequence.
- *
- * @param keySequence The prefix to look for; must not be null
.
- * @return A map of all of the matching key sequences (
- * KeySequence
) to command identifiers (
- * String
). This map may be empty, but it is never
- * null
.
- */
- @Deprecated
- Map getPartialMatches(KeySequence keySequence);
-
- /**
- * Finds the command which has the given key sequence as one of its key
- * bindings.
- *
- * @param keySequence The key binding to look for; must not be
- * null
.
- * @return The command id for the matching command, if any; null
if
- * none.
- */
- @Deprecated
- String getPerfectMatch(KeySequence keySequence);
-
- /**
- * Checks to see whether there are any commands which have key bindings that
- * start with the given key sequence.
- *
- * @param keySequence The prefix to look for; must not be null
.
- * @return true
if at least one command has a key binding that
- * starts with keySequence
;false
otherwise.
- */
- @Deprecated
- boolean isPartialMatch(KeySequence keySequence);
-
- /**
- * Checks to see if there is a command with the given key sequence as one of its
- * key bindings.
- *
- * @param keySequence The key binding to look for; must not be
- * null
.
- * @return true
if a command has a matching key binding;
- * false
otherwise.
- */
- @Deprecated
- boolean isPerfectMatch(KeySequence keySequence);
-
- /**
- * Unregisters an instance of ICommandManagerListener
listening for
- * changes to attributes of this instance.
- *
- * @param commandManagerListener the instance of
- * ICommandManagerListener
to
- * unregister. Must not be null
. If
- * an attempt is made to unregister an instance of
- * ICommandManagerListener
which is
- * not already registered with this instance, no
- * operation is performed.
- */
- @Deprecated
- void removeCommandManagerListener(ICommandManagerListener commandManagerListener);
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICommandManagerListener.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICommandManagerListener.java
deleted file mode 100644
index 85020c54859..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/ICommandManagerListener.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.commands;
-
-/**
- * An instance of this interface can be used by clients to receive notification
- * of changes to one or more instances of ICommandManager
.
- * - * This interface may be implemented by clients. - *
- * - * @since 3.0 - * @see ICommandManager#addCommandManagerListener(ICommandManagerListener) - * @see ICommandManager#removeCommandManagerListener(ICommandManagerListener) - * @deprecated Please use the "org.eclipse.core.commands" plug-in instead. This - * API is scheduled for deletion, see Bug 431177 for details - * @see org.eclipse.core.commands.ICommandManagerListener - * @noreference This interface is scheduled for deletion. - * @noextend This interface is not intended to be extended by clients. - * @noimplement This interface is not intended to be implemented by clients. - */ -@Deprecated -@SuppressWarnings("all") -public interface ICommandManagerListener { - - /** - * Notifies that one or more properties of an instance of - *ICommandManager
have changed. Specific details are described in
- * the CommandManagerEvent
.
- *
- * @param commandManagerEvent the commandManager event. Guaranteed not to be
- * null
.
- */
- @Deprecated
- void commandManagerChanged(CommandManagerEvent commandManagerEvent);
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/IHandler.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/IHandler.java
deleted file mode 100644
index b8e2fe14a96..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/IHandler.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.commands;
-
-import java.util.Map;
-
-/**
- * A handler is the pluggable piece of a command that handles execution. Each
- * command can have zero or more handlers associated with it (in general), of
- * which only one will be active at any given moment in time. When the command
- * is asked to execute, it will simply pass that request on to its active
- * handler, if any.
- * - * This interface is not intended to be extended by clients. - *
- * - * @since 3.0 - * @deprecated Please use the "org.eclipse.core.commands" plug-in instead. This - * API is scheduled for deletion, see Bug 431177 for details - * @see org.eclipse.core.commands.IHandler - * @noreference This interface is scheduled for deletion. - * @noextend This interface is not intended to be extended by clients. - * @noimplement This interface is not intended to be implemented by clients. - */ -@Deprecated -@SuppressWarnings("all") -public interface IHandler { - - /** - * Registers an instance ofIHandlerListener
to listen for changes
- * to properties of this instance.
- *
- * @param handlerListener the instance to register. Must not be
- * null
. If an attempt is made to register
- * an instance which is already registered with this
- * instance, no operation is performed.
- */
- @Deprecated
- void addHandlerListener(IHandlerListener handlerListener);
-
- /**
- * Disposes of this handler. This method is run once when the object is no
- * longer referenced. This can be used as an opportunity to unhook listeners
- * from other objects.
- */
- @Deprecated
- void dispose();
-
- /**
- * Executes with the map of parameter values by name.
- *
- * @param parameterValuesByName the map of parameter values by name. Reserved
- * for future use, must be null
.
- * @return the result of the execution. Reserved for future use, must be
- * null
.
- * @throws ExecutionException if an exception occurred during execution.
- */
- @Deprecated
- Object execute(Map parameterValuesByName) throws ExecutionException;
-
- /**
- * Returns the map of attribute values by name.
- * - * Notification is sent to all registered listeners if this property changes. - *
- * - * @return the map of attribute values by name. This map may be empty, but is - * guaranteed not to benull
. If this map is not empty, its
- * collection of keys is guaranteed to only contain instances of
- * String
.
- */
- @Deprecated
- Map getAttributeValuesByName();
-
- /**
- * Unregisters an instance of IPropertyListener
listening for
- * changes to properties of this instance.
- *
- * @param handlerListener the instance to unregister. Must not be
- * null
. If an attempt is made to unregister
- * an instance which is not already registered with this
- * instance, no operation is performed.
- */
- @Deprecated
- void removeHandlerListener(IHandlerListener handlerListener);
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/IHandlerListener.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/IHandlerListener.java
deleted file mode 100644
index 2609b634010..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/IHandlerListener.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.commands;
-
-/**
- * An instance of this interface can be used by clients to receive notification
- * of changes to one or more instances of IHandler
.
- * - * This interface may be implemented by clients. - *
- * - * @since 3.0 - * @see IHandler#addHandlerListener(IHandlerListener) - * @see IHandler#removeHandlerListener(IHandlerListener) - * @deprecated Please use the "org.eclipse.core.commands" plug-in instead. This - * API is scheduled for deletion, see Bug 431177 for details - * @see org.eclipse.core.commands.IHandlerListener - * @noreference This interface is scheduled for deletion. - * @noextend This interface is not intended to be extended by clients. - * @noimplement This interface is not intended to be implemented by clients. - */ -@Deprecated -@SuppressWarnings("all") -public interface IHandlerListener { - - /** - * Notifies that one or more properties of an instance ofIHandler
- * have changed. Specific details are described in the
- * HandlerEvent
.
- *
- * @param handlerEvent the handler event. Guaranteed not to be
- * null
.
- */
- @Deprecated
- void handlerChanged(HandlerEvent handlerEvent);
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/IKeyConfiguration.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/IKeyConfiguration.java
deleted file mode 100644
index 31ab2649f45..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/IKeyConfiguration.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.ui.commands;
-
-/**
- *
- * An instance of IKeyConfiguration
is a handle representing a key
- * configuration as defined by the extension point
- * org.eclipse.ui.commands
. The identifier of the handle is
- * identifier of the key configuration being represented.
- *
- * An instance of IKeyConfiguration
can be obtained from an
- * instance of ICommandManager
for any identifier, whether or not a
- * key configuration with that identifier defined in the plugin registry.
- *
- * The handle-based nature of this API allows it to work well with runtime
- * plugin activation and deactivation. If a key configuration is defined, that
- * means that its corresponding plug-in is active. If the plug-in is then
- * deactivated, the configuration will still exist but it will be undefined. An
- * attempt to use an undefined key configuration will result in a
- * NotDefinedException
being thrown.
- *
- * This interface is not intended to be extended or implemented by clients. - *
- * - * @since 3.0 - * @see IKeyConfigurationListener - * @see ICommandManager - * @see org.eclipse.jface.bindings.Scheme - * @deprecated Please use the bindings support in the "org.eclipse.jface" - * plug-in instead. This API is scheduled for deletion, see Bug - * 431177 for details - * @noimplement This interface is not intended to be implemented by clients. - * @noreference This interface is scheduled for deletion. - * @noextend This interface is not intended to be extended by clients. - */ -@Deprecated -@SuppressWarnings("all") -public interface IKeyConfiguration extends Comparable { - - /** - * Registers an instance ofIKeyConfigurationListener
to listen for
- * changes to attributes of this instance.
- *
- * @param keyConfigurationListener the instance of
- * IKeyConfigurationListener
to
- * register. Must not be null
. If
- * an attempt is made to register an instance of
- * IKeyConfigurationListener
which
- * is already registered with this instance, no
- * operation is performed.
- */
- @Deprecated
- void addKeyConfigurationListener(IKeyConfigurationListener keyConfigurationListener);
-
- /**
- * - * Returns the description of the key configuration represented by this handle, - * suitable for display to the user. - *
- *- * Notification is sent to all registered listeners if this attribute changes. - *
- * - * @return the description of the key configuration represented by this handle. - * Guaranteed not to benull
.
- * @throws NotDefinedException if the key configuration represented by this
- * handle is not defined.
- */
- @Deprecated
- String getDescription() throws NotDefinedException;
-
- /**
- * Returns the identifier of this handle.
- *
- * @return the identifier of this handle. Guaranteed not to be
- * null
.
- */
- @Deprecated
- String getId();
-
- /**
- * - * Returns the name of the key configuration represented by this handle, - * suitable for display to the user. - *
- *- * Notification is sent to all registered listeners if this attribute changes. - *
- * - * @return the name of the key configuration represented by this handle. - * Guaranteed not to benull
.
- * @throws NotDefinedException if the key configuration represented by this
- * handle is not defined.
- */
- @Deprecated
- String getName() throws NotDefinedException;
-
- /**
- * - * Returns the identifier of the parent of the key configuration represented by - * this handle. - *
- *- * Notification is sent to all registered listeners if this attribute changes. - *
- * - * @return the identifier of the parent of the key configuration represented by - * this handle. May benull
.
- * @throws NotDefinedException if the key configuration represented by this
- * handle is not defined.
- */
- @Deprecated
- String getParentId() throws NotDefinedException;
-
- /**
- *
- * Returns whether or not this command is active. Instances of
- * ICommand
are activated and deactivated by the instance of
- * ICommandManager
from whence they were brokered.
- *
- * Notification is sent to all registered listeners if this attribute changes. - *
- * - * @returntrue
, iff this command is active.
- */
- @Deprecated
- boolean isActive();
-
- /**
- * - * Returns whether or not the key configuration represented by this handle is - * defined. - *
- *- * Notification is sent to all registered listeners if this attribute changes. - *
- * - * @returntrue
, iff the key configuration represented by this
- * handle is defined.
- */
- @Deprecated
- boolean isDefined();
-
- /**
- * Unregisters an instance of IKeyConfigurationListener
listening
- * for changes to attributes of this instance.
- *
- * @param keyConfigurationListener the instance of
- * IKeyConfigurationListener
to
- * unregister. Must not be null
. If
- * an attempt is made to unregister an instance
- * of IKeyConfigurationListener
- * which is not already registered with this
- * instance, no operation is performed.
- */
- @Deprecated
- void removeKeyConfigurationListener(IKeyConfigurationListener keyConfigurationListener);
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/IKeyConfigurationListener.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/IKeyConfigurationListener.java
deleted file mode 100644
index 28f87f02464..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/IKeyConfigurationListener.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.ui.commands;
-
-/**
- *
- * An instance of IKeyConfigurationListener
can be used by clients
- * to receive notification of changes to one or more instances of
- * IKeyConfiguration
.
- *
- * This interface may be implemented by clients. - *
- * - * @since 3.0 - * @see IKeyConfiguration#addKeyConfigurationListener(IKeyConfigurationListener) - * @see IKeyConfiguration#removeKeyConfigurationListener(IKeyConfigurationListener) - * @see org.eclipse.ui.commands.KeyConfigurationEvent - * @deprecated Please use the bindings support in the "org.eclipse.jface" - * plug-in instead. This API is scheduled for deletion, see Bug - * 431177 for details - * @see org.eclipse.jface.bindings.ISchemeListener - * @noreference This interface is scheduled for deletion. - * @noimplement This interface is not intended to be implemented by clients. - * @noextend This interface is not intended to be extended by clients. - */ -@Deprecated -@SuppressWarnings("all") -public interface IKeyConfigurationListener { - - /** - * Notifies that one or more attributes of an instance of - *IKeyConfiguration
have changed. Specific details are described
- * in the KeyConfigurationEvent
.
- *
- * @param keyConfigurationEvent the keyConfiguration event. Guaranteed not to be
- * null
.
- */
- @Deprecated
- void keyConfigurationChanged(KeyConfigurationEvent keyConfigurationEvent);
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/IKeySequenceBinding.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/IKeySequenceBinding.java
deleted file mode 100644
index 1ad110f19f4..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/IKeySequenceBinding.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.ui.commands;
-
-import org.eclipse.ui.keys.KeySequence;
-
-/**
- *
- * An instance of IKeySequenceBinding
represents a binding between
- * a command and a key sequence. This is a wrapper for the a key sequence.
- *
- * This interface is not intended to be extended or implemented by clients. - *
- * - * @since 3.0 - * @see org.eclipse.ui.commands.ICommand - * @deprecated Please use the bindings support in the "org.eclipse.jface" - * plug-in instead. This API is scheduled for deletion, see Bug - * 431177 for details - * @see org.eclipse.jface.bindings.keys.KeyBinding - * @noimplement This interface is not intended to be implemented by clients. - * @noreference This interface is scheduled for deletion. - * @noextend This interface is not intended to be extended by clients. - */ -@Deprecated -@SuppressWarnings("all") -public interface IKeySequenceBinding extends Comparable { - - /** - * Returns the key sequence represented in this binding. - * - * @return the key sequence. Guaranteed not to benull
.
- */
- @Deprecated
- KeySequence getKeySequence();
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/IWorkbenchCommandSupport.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/IWorkbenchCommandSupport.java
deleted file mode 100644
index 7524d20300b..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/IWorkbenchCommandSupport.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.ui.commands;
-
-import java.util.Collection;
-
-/**
- * An instance of this interface provides support for managing commands at the
- * IWorkbench
level.
- * - * This interface is not intended to be extended or implemented by clients. - *
- * - * @since 3.0 - * @deprecated Please useICommandService
and
- * IHandlerService
instead. This API is scheduled for
- * deletion, see Bug 431177 for details
- * @see org.eclipse.ui.commands.ICommandService
- * @see org.eclipse.ui.handlers.IHandlerService
- * @noimplement This interface is not intended to be implemented by clients.
- * @noreference This interface is scheduled for deletion.
- * @noextend This interface is not intended to be extended by clients.
- */
-@Deprecated
-@SuppressWarnings("all")
-public interface IWorkbenchCommandSupport {
-
- /**
- * Adds a single handler submissions for consideration by the workbench. The
- * submission indicates to the workbench a set of conditions under which the
- * handler should become active. The workbench, however, ultimately decides
- * which handler becomes active (in the event of conflicts or changes in state).
- * This could cause the handlers for one or more commands to change.
- *
- * @param handlerSubmission The submission to be added; must not be
- * null
.
- */
- @Deprecated
- void addHandlerSubmission(HandlerSubmission handlerSubmission);
-
- /**
- * Adds a collection of handler submissions for consideration by the workbench.
- * The submission indicates to the workbench a set of conditions under which the
- * handler should become active. The workbench, however, ultimately decides
- * which handler becomes active (in the event of conflicts or changes in state).
- * This could cause the handlers for one or more commands to change.
- *
- * @param handlerSubmissions The submissions to be added; must not be
- * null
, and must contain zero or more
- * instances of HandlerSubmission
.
- */
- @Deprecated
- void addHandlerSubmissions(Collection handlerSubmissions);
-
- /**
- * Returns the command manager for the workbench.
- *
- * @return the command manager for the workbench. Guaranteed not to be
- * null
.
- */
- @Deprecated
- ICommandManager getCommandManager();
-
- /**
- * Removes a single handler submission from consideration by the workbench. The
- * handler submission must be the same as the one added (not just equivalent).
- * This could cause the handlers for one or more commands to change.
- *
- * @param handlerSubmission The submission to be removed; must not be
- * null
.
- */
- @Deprecated
- void removeHandlerSubmission(HandlerSubmission handlerSubmission);
-
- /**
- * Removes a single handler submission from consideration by the workbench. The
- * handler submission must be the same as the one added (not just equivalent).
- * This could cause the handlers for one or more commands to change.
- *
- * @param handlerSubmissions The submissions to be removed; must not be
- * null
, and must contain instances of
- * HandlerSubmission
only.
- */
- @Deprecated
- void removeHandlerSubmissions(Collection handlerSubmissions);
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/KeyConfigurationEvent.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/KeyConfigurationEvent.java
deleted file mode 100644
index d9555b1bc7e..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/KeyConfigurationEvent.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.ui.commands;
-
-/**
- * An instance of this class describes changes to an instance of
- * IKeyConfiguration
.
- * - * This class is not intended to be extended by clients. - *
- * - * @since 3.0 - * @see IKeyConfigurationListener#keyConfigurationChanged(KeyConfigurationEvent) - * @deprecated Please use the bindings support in the "org.eclipse.jface" - * plug-in instead. This API is scheduled for deletion, see Bug - * 431177 for details - * @see org.eclipse.jface.bindings.SchemeEvent - * @noreference This class is scheduled for deletion. - */ -@Deprecated -@SuppressWarnings("all") -public final class KeyConfigurationEvent { - - /** - * whether the key configuration has become or active or inactive. - */ - private final boolean activeChanged; - - /** - * Whether the key configuration has become defined or undefined. - */ - private final boolean definedChanged; - - /** - * The key configuration that has changed; this value is never - *null
.
- */
- private final IKeyConfiguration keyConfiguration;
-
- /**
- * Whether the name of the key configuration has changed.
- */
- private final boolean nameChanged;
-
- /**
- * Whether the parent identifier has changed.
- */
- private final boolean parentIdChanged;
-
- /**
- * Creates a new instance of this class.
- *
- * @param keyConfiguration the instance of the interface that changed.
- * @param activeChanged true, iff the active property changed.
- * @param definedChanged true, iff the defined property changed.
- * @param nameChanged true, iff the name property changed.
- * @param parentIdChanged true, iff the parentId property changed.
- */
- @Deprecated
- public KeyConfigurationEvent(IKeyConfiguration keyConfiguration, boolean activeChanged, boolean definedChanged,
- boolean nameChanged, boolean parentIdChanged) {
- if (keyConfiguration == null) {
- throw new NullPointerException();
- }
-
- this.keyConfiguration = keyConfiguration;
- this.activeChanged = activeChanged;
- this.definedChanged = definedChanged;
- this.nameChanged = nameChanged;
- this.parentIdChanged = parentIdChanged;
- }
-
- /**
- * Returns the instance of the interface that changed.
- *
- * @return the instance of the interface that changed. Guaranteed not to be
- * null
.
- */
- @Deprecated
- public IKeyConfiguration getKeyConfiguration() {
- return keyConfiguration;
- }
-
- /**
- * Returns whether or not the active property changed.
- *
- * @return true, iff the active property changed.
- */
- @Deprecated
- public boolean hasActiveChanged() {
- return activeChanged;
- }
-
- /**
- * Returns whether or not the defined property changed.
- *
- * @return true, iff the defined property changed.
- */
- @Deprecated
- public boolean hasDefinedChanged() {
- return definedChanged;
- }
-
- /**
- * Returns whether or not the name property changed.
- *
- * @return true, iff the name property changed.
- */
- @Deprecated
- public boolean hasNameChanged() {
- return nameChanged;
- }
-
- /**
- * Returns whether or not the parentId property changed.
- *
- * @return true, iff the parentId property changed.
- */
- @Deprecated
- public boolean hasParentIdChanged() {
- return parentIdChanged;
- }
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/NotDefinedException.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/NotDefinedException.java
deleted file mode 100644
index fd0569b9b11..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/NotDefinedException.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.commands;
-
-/**
- * Signals that an attempt was made to access the properties of an undefined
- * object.
- * - * This class is not intended to be extended by clients. - *
- * - * @since 3.0 - * @deprecated Please use the "org.eclipse.core.commands" plug-in instead. This - * API is scheduled for deletion, see Bug 431177 for details - * @see org.eclipse.core.commands.common.NotDefinedException - * @noreference This class is scheduled for deletion. - */ -@Deprecated -@SuppressWarnings("all") -public final class NotDefinedException extends CommandException { - - /** - * Generated serial version UID for this class. - * - * @since 3.1 - */ - private static final long serialVersionUID = 3257572788998124596L; - - /** - * Creates a new instance of this class with the specified detail message. - * - * @param s the detail message. - */ - @Deprecated - public NotDefinedException(String s) { - super(s); - } - - /** - * Constructs a legacyNotDefinedException
based on the new
- * NotDefinedException
.
- *
- * @param e The exception from which this exception should be created; must not
- * be null
.
- * @since 3.1
- */
- @Deprecated
- public NotDefinedException(final org.eclipse.core.commands.common.NotDefinedException e) {
- super(e.getMessage(), e);
- }
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/NotHandledException.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/NotHandledException.java
deleted file mode 100644
index e968113eed5..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/NotHandledException.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.commands;
-
-/**
- * Signals that an attempt was made to access the properties of an unhandled
- * object.
- * - * This class is not intended to be extended by clients. - *
- * - * @since 3.0 - * @deprecated Please use the "org.eclipse.core.commands" plug-in instead. This - * API is scheduled for deletion, see Bug 431177 for details - * @see org.eclipse.core.commands.NotHandledException - * @noreference This class is scheduled for deletion. - */ -@Deprecated -@SuppressWarnings("all") -public final class NotHandledException extends CommandException { - - /** - * Generated serial version UID for this class. - * - * @since 3.1 - */ - private static final long serialVersionUID = 3256446914827726904L; - - /** - * Creates a new instance of this class with the specified detail message. - * - * @param s the detail message. - */ - @Deprecated - public NotHandledException(String s) { - super(s); - } - - /** - * Constructs a legacyNotHandledException
based on the new
- * NotHandledException
- *
- * @param e The exception from which this exception should be created; must not
- * be null
.
- * @since 3.1
- */
- @Deprecated
- public NotHandledException(final org.eclipse.core.commands.NotHandledException e) {
- super(e.getMessage(), e);
- }
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/Priority.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/Priority.java
deleted file mode 100644
index deef616d060..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/commands/Priority.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.commands;
-
-import org.eclipse.core.expressions.Expression;
-import org.eclipse.ui.ISources;
-import org.eclipse.ui.internal.util.Util;
-
-/**
- *
- * An instance of this interface represents a priority for use with instances of
- * HandlerSubmission
.
- *
- * The order of precedence (from highest to lowest) is as follows. Submissions - * with higher priority will be preferred over those with lower priority. - *
- *- * This class is not intended to be extended by clients. - *
- * - * @since 3.0 - * @see HandlerSubmission - * @see org.eclipse.ui.ISources - * @see org.eclipse.ui.handlers.IHandlerService#activateHandler(String, - * org.eclipse.core.commands.IHandler, Expression) - * @deprecated This concept is now captured in theISources
integer
- * constants. This API is scheduled for deletion, see Bug 431177 for
- * details
- * @noreference This class is scheduled for deletion.
- */
-@Deprecated
-public final class Priority implements Comparable {
-
- /**
- * An instance representing 'legacy' priority.
- */
- public static final Priority LEGACY = new Priority(ISources.LEGACY_LEGACY);
-
- /**
- * An instance representing 'low' priority.
- */
- public static final Priority LOW = new Priority(ISources.LEGACY_LOW);
-
- /**
- * An instance representing 'medium' priority.
- */
- public static final Priority MEDIUM = new Priority(ISources.LEGACY_MEDIUM);
-
- /**
- * The string representation of this priority. This is computed once (lazily).
- * Before it is computed, this value is null
.
- */
- private transient String string = null;
-
- /**
- * The priority value for this instance. A lesser integer is considered to have
- * a higher priority.
- */
- private int value;
-
- /**
- * Constructs a new instance of Priority
using a value. This
- * constructor should only be used internally. Priority instances should be
- * retrieved from the static members defined above.
- *
- * @param value The priority value; a lesser integer is consider to have a
- * higher priority value.
- */
- private Priority(int value) {
- this.value = value;
- }
-
- /**
- * @see Comparable#compareTo(java.lang.Object)
- */
- @Override
- @Deprecated
- public int compareTo(Object object) {
- Priority castedObject = (Priority) object;
- return Util.compare(value, castedObject.value);
- }
-
- /**
- * The value for this priority. The lesser the value, the higher priority this
- * represents.
- *
- * @return The integer priority value.
- */
- @Deprecated
- int getValue() {
- return value;
- }
-
- /**
- * @see Object#toString()
- */
- @Override
- @Deprecated
- public String toString() {
- if (string == null) {
- final StringBuilder stringBuffer = new StringBuilder();
- stringBuffer.append("[value="); //$NON-NLS-1$
- stringBuffer.append(value);
- stringBuffer.append(']');
- string = stringBuffer.toString();
- }
-
- return string;
- }
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java
index 25853abd436..4dbcdd4865b 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java
@@ -189,7 +189,6 @@
import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
import org.eclipse.ui.commands.ICommandImageService;
import org.eclipse.ui.commands.ICommandService;
-import org.eclipse.ui.commands.IWorkbenchCommandSupport;
import org.eclipse.ui.contexts.IContextService;
import org.eclipse.ui.contexts.IWorkbenchContextSupport;
import org.eclipse.ui.handlers.IHandlerService;
@@ -202,7 +201,6 @@
import org.eclipse.ui.internal.commands.CommandImageManager;
import org.eclipse.ui.internal.commands.CommandImageService;
import org.eclipse.ui.internal.commands.CommandService;
-import org.eclipse.ui.internal.commands.WorkbenchCommandSupport;
import org.eclipse.ui.internal.contexts.ActiveContextSourceProvider;
import org.eclipse.ui.internal.contexts.ContextService;
import org.eclipse.ui.internal.contexts.WorkbenchContextSupport;
@@ -2413,8 +2411,6 @@ public void runWithException() {
}
});
workbenchContextSupport = new WorkbenchContextSupport(this, contextManager);
- workbenchCommandSupport = new WorkbenchCommandSupport(bindingManager, commandManager, contextManager,
- handlerService[0]);
initializeCommandResolver();
bindingManager.addBindingManagerListener(bindingManagerListener);
@@ -3167,8 +3163,6 @@ public IProgressService getProgressService() {
private WorkbenchActivitySupport workbenchActivitySupport;
- private WorkbenchCommandSupport workbenchCommandSupport;
-
private WorkbenchContextSupport workbenchContextSupport;
/**
@@ -3206,11 +3200,6 @@ public IWorkbenchActivitySupport getActivitySupport() {
return e4Context.get(IWorkbenchActivitySupport.class);
}
- @Override
- public IWorkbenchCommandSupport getCommandSupport() {
- return workbenchCommandSupport;
- }
-
@Override
public IWorkbenchContextSupport getContextSupport() {
return workbenchContextSupport;
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/CommandLegacyWrapper.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/CommandLegacyWrapper.java
deleted file mode 100644
index 8f737f6e28b..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/CommandLegacyWrapper.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Lars Vogel ICommand
interface.
- *
- * @since 3.1
- */
-final class CommandLegacyWrapper implements ICommand {
-
- /**
- * The supporting binding manager; never null
.
- */
- private final BindingManager bindingManager;
-
- /**
- * The wrapped command; never null
.
- */
- private final Command command;
-
- /**
- * A parameterized representation of the command. This is created lazily. If it
- * has not yet been created, it is null
.
- */
- private ParameterizedCommand parameterizedCommand;
-
- /**
- * Constructs a new CommandWrapper
- *
- * @param command The command to be wrapped; must not be
- * null
.
- * @param bindingManager The binding manager to support this wrapper; must not
- * be null
.
- */
- CommandLegacyWrapper(final Command command, final BindingManager bindingManager) {
- if (command == null) {
- throw new NullPointerException("The wrapped command cannot be null
."); //$NON-NLS-1$
- }
-
- if (bindingManager == null) {
- throw new NullPointerException("A binding manager is required to wrap a command"); //$NON-NLS-1$
- }
-
- this.command = command;
- this.bindingManager = bindingManager;
- }
-
- @Override
- public void addCommandListener(final ICommandListener commandListener) {
- command.addCommandListener(new LegacyCommandListenerWrapper(commandListener, bindingManager));
- }
-
- @Override
- public Object execute(Map parameterValuesByName) throws ExecutionException, NotHandledException {
- try {
- IHandlerService service = PlatformUI.getWorkbench().getService(IHandlerService.class);
-
- return command.execute(new ExecutionEvent(command,
- (parameterValuesByName == null) ? Collections.EMPTY_MAP : parameterValuesByName, null,
- service.getCurrentState()));
- } catch (final org.eclipse.core.commands.ExecutionException e) {
- throw new ExecutionException(e);
- } catch (final org.eclipse.core.commands.NotHandledException e) {
- throw new NotHandledException(e);
- }
- }
-
- @Override
- public MapICommandManager
.
- * - * This class is not intended to be extended by clients. - *
- * - * @since 3.0 - */ -public final class CommandManagerFactory { - - /** - * Creates a new instance ofIMutableCommandManager
.
- *
- * @param bindingManager The binding manager providing support for the command
- * manager; must not be null
.
- * @param commandManager The command manager providing support for this command
- * manager; must not be null
.
- * @param contextManager The context manager for this command manager; must not
- * be null
.
- * @return a new instance of IMutableCommandManager
. Clients should
- * not make assumptions about the concrete implementation outside the
- * contract of the interface. Guaranteed not to be null
.
- */
- public static CommandManagerLegacyWrapper getCommandManagerWrapper(final BindingManager bindingManager,
- final CommandManager commandManager, final ContextManager contextManager) {
- return new CommandManagerLegacyWrapper(bindingManager, commandManager, contextManager);
- }
-
- private CommandManagerFactory() {
- }
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/CommandManagerLegacyWrapper.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/CommandManagerLegacyWrapper.java
deleted file mode 100644
index 4ac2f8aebdc..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/CommandManagerLegacyWrapper.java
+++ /dev/null
@@ -1,406 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.internal.commands;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import org.eclipse.core.commands.Command;
-import org.eclipse.core.commands.CommandManager;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.core.commands.contexts.ContextManager;
-import org.eclipse.core.commands.contexts.ContextManagerEvent;
-import org.eclipse.core.commands.contexts.IContextManagerListener;
-import org.eclipse.e4.core.commands.internal.HandlerServiceImpl;
-import org.eclipse.jface.bindings.Binding;
-import org.eclipse.jface.bindings.BindingManager;
-import org.eclipse.jface.bindings.BindingManagerEvent;
-import org.eclipse.jface.bindings.IBindingManagerListener;
-import org.eclipse.jface.bindings.Scheme;
-import org.eclipse.jface.bindings.TriggerSequence;
-import org.eclipse.jface.bindings.keys.ParseException;
-import org.eclipse.ui.commands.CommandManagerEvent;
-import org.eclipse.ui.commands.ICategory;
-import org.eclipse.ui.commands.ICommand;
-import org.eclipse.ui.commands.ICommandManager;
-import org.eclipse.ui.commands.ICommandManagerListener;
-import org.eclipse.ui.commands.IKeyConfiguration;
-import org.eclipse.ui.internal.handlers.LegacyHandlerWrapper;
-import org.eclipse.ui.internal.keys.SchemeLegacyWrapper;
-import org.eclipse.ui.internal.util.Util;
-import org.eclipse.ui.keys.KeySequence;
-import org.eclipse.ui.keys.KeyStroke;
-
-/**
- * Provides support for the old ICommandManager
interface.
- *
- * @since 3.1
- */
-public final class CommandManagerLegacyWrapper implements ICommandManager,
- org.eclipse.core.commands.ICommandManagerListener, IBindingManagerListener, IContextManagerListener {
-
- /**
- * Whether commands should print out information about which handlers are being
- * executed. Change this value if you want console output on command execution.
- */
- public static boolean DEBUG_COMMAND_EXECUTION = false;
-
- /**
- * Whether commands should print out information about handler changes. Change
- * this value if you want console output when commands change handlers.
- */
- public static boolean DEBUG_HANDLERS = false;
-
- /**
- * Which command should print out debugging information. Change this value if
- * you want to only here when a command with a particular identifier changes its
- * handler.
- */
- public static String DEBUG_HANDLERS_COMMAND_ID = null;
-
- static boolean validateKeySequence(KeySequence keySequence) {
- if (keySequence == null) {
- return false;
- }
- Listnull
.
- *
- * @since 3.1
- */
- private final BindingManager bindingManager;
-
- /**
- * The command manager that provides functionality for this workbench command
- * manager. This value will never be null
.
- *
- * @since 3.1
- */
- private final CommandManager commandManager;
-
- private Listnull
.
- *
- * @since 3.1
- */
- private final ContextManager contextManager;
-
- /**
- * Constructs a new instance of MutableCommandManager
. The binding
- * manager and command manager providing support for this manager are
- * constructed at this time.
- *
- * @param bindingManager The binding manager providing support for the command
- * manager; must not be null
.
- * @param commandManager The command manager providing support for this command
- * manager; must not be null
.
- * @param contextManager The context manager to provide context support to this
- * manager. This value must not be null
.
- */
- public CommandManagerLegacyWrapper(final BindingManager bindingManager, final CommandManager commandManager,
- final ContextManager contextManager) {
- if (contextManager == null) {
- throw new NullPointerException("The context manager cannot be null."); //$NON-NLS-1$
- }
- this.bindingManager = bindingManager;
- this.commandManager = commandManager;
- this.contextManager = contextManager;
- }
-
- @Override
- public void addCommandManagerListener(final ICommandManagerListener commandManagerListener) {
- if (commandManagerListener == null) {
- throw new NullPointerException("Cannot add a null listener."); //$NON-NLS-1$
- }
-
- if (commandManagerListeners == null) {
- commandManagerListeners = new ArrayList<>();
- this.commandManager.addCommandManagerListener(this);
- this.bindingManager.addBindingManagerListener(this);
- this.contextManager.addContextManagerListener(this);
- }
-
- if (!commandManagerListeners.contains(commandManagerListener)) {
- commandManagerListeners.add(commandManagerListener);
- }
- }
-
- @Override
- public void bindingManagerChanged(final BindingManagerEvent event) {
- final boolean schemeDefinitionsChanged = event.getScheme() != null;
- final SetString
) to handler
- * (IHandler
).
- */
- public void setHandlersByCommandId(final Mapnull
.
- */
- private final BindingManager bindingManager;
-
- /**
- * The listener which is being wrapped. This value should never be
- * null
.
- */
- private final org.eclipse.ui.commands.ICommandListener listener;
-
- /**
- * Constructs a new instance of CommandListenerWrapper
around a
- * legacy listener.
- *
- * @param listener The listener to be wrapped; must not be null
.
- */
- LegacyCommandListenerWrapper(final org.eclipse.ui.commands.ICommandListener listener,
- final BindingManager bindingManager) {
- if (listener == null) {
- throw new NullPointerException("Cannot wrap a null listener."); //$NON-NLS-1$
- }
-
- if (bindingManager == null) {
- throw new NullPointerException("Cannot create a listener wrapper without a binding manager"); //$NON-NLS-1$
- }
-
- this.listener = listener;
- this.bindingManager = bindingManager;
- }
-
- @Override
- public void commandChanged(final CommandEvent commandEvent) {
- final ICommand command = new CommandLegacyWrapper(commandEvent.getCommand(), bindingManager);
- final boolean definedChanged = commandEvent.isDefinedChanged();
- final boolean descriptionChanged = commandEvent.isDescriptionChanged();
- final boolean handledChanged = commandEvent.isHandledChanged();
- final boolean nameChanged = commandEvent.isNameChanged();
-
- listener.commandChanged(new org.eclipse.ui.commands.CommandEvent(command, false, false, definedChanged,
- descriptionChanged, handledChanged, false, nameChanged, null));
-
- }
-
- @Override
- public boolean equals(final Object object) {
- if (object instanceof LegacyCommandListenerWrapper) {
- final LegacyCommandListenerWrapper wrapper = (LegacyCommandListenerWrapper) object;
- return listener.equals(wrapper.listener);
- }
-
- if (object instanceof org.eclipse.ui.commands.ICommandListener) {
- final org.eclipse.ui.commands.ICommandListener other = (org.eclipse.ui.commands.ICommandListener) object;
- return listener.equals(other);
- }
-
- return false;
- }
-
- @Override
- public int hashCode() {
- return listener.hashCode();
- }
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/WorkbenchCommandSupport.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/WorkbenchCommandSupport.java
deleted file mode 100644
index 33d85b03fa1..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/WorkbenchCommandSupport.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.internal.commands;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import org.eclipse.core.commands.CommandManager;
-import org.eclipse.core.commands.contexts.ContextManager;
-import org.eclipse.jface.bindings.BindingManager;
-import org.eclipse.ui.LegacyHandlerSubmissionExpression;
-import org.eclipse.ui.commands.HandlerSubmission;
-import org.eclipse.ui.commands.ICommandManager;
-import org.eclipse.ui.commands.IWorkbenchCommandSupport;
-import org.eclipse.ui.handlers.IHandlerActivation;
-import org.eclipse.ui.handlers.IHandlerService;
-import org.eclipse.ui.internal.handlers.LegacyHandlerWrapper;
-
-/**
- * Provides command support in terms of the workbench.
- *
- * @since 3.0
- */
-public class WorkbenchCommandSupport implements IWorkbenchCommandSupport {
-
- /**
- * The map of activations that have been given to the handler service
- * (IHandlerActivation
), indexed by the submissions
- * (HandlerSubmission
). This map should be null
if
- * there are no such activations.
- */
- private Mapnull
.
- */
- private final CommandManagerLegacyWrapper commandManagerWrapper;
-
- /**
- * The handler service for the workbench. This value is never null
.
- */
- private final IHandlerService handlerService;
-
- /**
- * Constructs a new instance of WorkbenchCommandSupport
- *
- * @param bindingManager The binding manager providing support for the command
- * manager; must not be null
.
- * @param commandManager The command manager for the workbench; must not be
- * null
.
- * @param contextManager The context manager providing support for the command
- * manager and binding manager; must not be
- * null
.
- * @param handlerService The handler service for the workbench; must not be
- * null
.
- */
- public WorkbenchCommandSupport(final BindingManager bindingManager, final CommandManager commandManager,
- final ContextManager contextManager, final IHandlerService handlerService) {
- if (handlerService == null) {
- throw new NullPointerException("The handler service cannot be null"); //$NON-NLS-1$
- }
-
- this.handlerService = handlerService;
-
- commandManagerWrapper = CommandManagerFactory.getCommandManagerWrapper(bindingManager, commandManager,
- contextManager);
-
- // Initialize the old key formatter settings.
- org.eclipse.ui.keys.KeyFormatterFactory
- .setDefault(org.eclipse.ui.keys.SWTKeySupport.getKeyFormatterForPlatform());
- }
-
- @Override
- public final void addHandlerSubmission(final HandlerSubmission handlerSubmission) {
- final IHandlerActivation activation = handlerService.activateHandler(handlerSubmission.getCommandId(),
- new LegacyHandlerWrapper(handlerSubmission.getHandler()),
- new LegacyHandlerSubmissionExpression(handlerSubmission.getActivePartId(),
- handlerSubmission.getActiveShell(), handlerSubmission.getActiveWorkbenchPartSite()));
- if (activationsBySubmission == null) {
- activationsBySubmission = new HashMap<>();
- }
- activationsBySubmission.put(handlerSubmission, activation);
- }
-
- @Override
- public final void addHandlerSubmissions(final Collection handlerSubmissions) {
- final Iteratornull
.
*/
+ @Deprecated
private void readHandlerSubmissionsFromRegistry(final IConfigurationElement[] configurationElements,
final int configurationElementCount) {
final Listnull
.
- */
- private final IHandler handler;
-
- /**
- * The wrapped listener; never null
.
- */
- private final org.eclipse.core.commands.IHandlerListener listener;
-
- /**
- * Constructs a new instance of LegacyHandlerListenerWrapper
.
- *
- * @param listener The listener to wrap; must not be null
.
- */
- public LegacyHandlerListenerWrapper(final IHandler handler,
- final org.eclipse.core.commands.IHandlerListener listener) {
- if (handler == null) {
- throw new NullPointerException("A listener wrapper cannot be created on a null handler"); //$NON-NLS-1$
- }
-
- if (listener == null) {
- throw new NullPointerException("A listener wrapper cannot be created on a null listener"); //$NON-NLS-1$
- }
-
- this.handler = handler;
- this.listener = listener;
- }
-
- @Override
- public void handlerChanged(HandlerEvent event) {
- final boolean enabledChanged = ((Boolean) event.getPreviousAttributeValuesByName()
- .get(ILegacyAttributeNames.ENABLED)).booleanValue() != handler.isEnabled();
- final boolean handledChanged = ((Boolean) event.getPreviousAttributeValuesByName()
- .get(ILegacyAttributeNames.HANDLED)).booleanValue() != handler.isHandled();
- listener.handlerChanged(new org.eclipse.core.commands.HandlerEvent(handler, enabledChanged, handledChanged));
- }
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/LegacyHandlerProxy.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/LegacyHandlerProxy.java
deleted file mode 100644
index 8e4659453a3..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/LegacyHandlerProxy.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.ui.internal.handlers;
-
-import java.util.Collections;
-import java.util.Map;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.ui.commands.AbstractHandler;
-import org.eclipse.ui.commands.ExecutionException;
-import org.eclipse.ui.commands.IHandler;
-import org.eclipse.ui.internal.WorkbenchPlugin;
-
-/**
- * - * A proxy for a handler that has been defined in XML. This delays the class - * loading until the handler is really asked for information (besides the - * priority or the command identifier). Asking a proxy for anything but the - * attributes defined publicly in this class will cause the proxy to instantiate - * the proxied handler. - *
- * - * @since 3.0 - */ -public final class LegacyHandlerProxy extends AbstractHandler { - - /** - * The name of the configuration element attribute which contains the - * information necessary to instantiate the real handler. - */ - private static final String HANDLER_ATTRIBUTE_NAME = "handler"; //$NON-NLS-1$ - - /** - * The configuration element from which the handler can be created. This value - * will exist until the element is converted into a real class -- at which point - * this value will be set tonull
.
- */
- private IConfigurationElement configurationElement;
-
- /**
- * The real handler. This value is null
until the proxy is forced
- * to load the real handler. At this point, the configuration element is
- * converted, nulled out, and this handler gains a reference.
- */
- private IHandler handler;
-
- /**
- * Constructs a new instance of HandlerProxy
with all the
- * information it needs to try to avoid loading until it is needed.
- *
- * @param newConfigurationElement The configuration element from which the real
- * class can be loaded at run-time.
- */
- public LegacyHandlerProxy(final IConfigurationElement newConfigurationElement) {
- configurationElement = newConfigurationElement;
- handler = null;
- }
-
- /**
- * Passes the dipose on to the proxied handler, if it has been loaded.
- */
- @Override
- public void dispose() {
- if (handler != null) {
- handler.dispose();
- }
- }
-
- @Override
- public Object execute(Map parameters) throws ExecutionException {
- if (loadHandler()) {
- return handler.execute(parameters);
- }
-
- return null;
- }
-
- @Override
- public Map getAttributeValuesByName() {
- if (loadHandler()) {
- return handler.getAttributeValuesByName();
- }
- return Collections.EMPTY_MAP;
- }
-
- /**
- * Loads the handler, if possible. If the handler is loaded, then the member
- * variables are updated accordingly.
- *
- * @return true
if the handler is now non-null; false
- * otherwise.
- */
- private boolean loadHandler() {
- if (handler == null) {
- // Load the handler.
- try {
- handler = (IHandler) configurationElement.createExecutableExtension(HANDLER_ATTRIBUTE_NAME);
- configurationElement = null;
- return true;
- } catch (final CoreException e) {
- /*
- * TODO If it can't be instantiated, should future attempts to instantiate be
- * blocked?
- */
- final String message = "The proxied handler for '" //$NON-NLS-1$
- + configurationElement.getAttribute(HANDLER_ATTRIBUTE_NAME) + "' could not be loaded"; //$NON-NLS-1$
- IStatus status = new Status(IStatus.ERROR, WorkbenchPlugin.PI_WORKBENCH, 0, message, e);
- WorkbenchPlugin.log(message, status);
- return false;
- }
- }
-
- return true;
- }
-
- @Override
- public String toString() {
- final StringBuilder buffer = new StringBuilder();
-
- buffer.append("LegacyProxy("); //$NON-NLS-1$
- if (handler == null) {
- final String className = configurationElement.getAttribute(HANDLER_ATTRIBUTE_NAME);
- buffer.append(className);
- } else {
- buffer.append(handler);
- }
- buffer.append(')');
-
- return buffer.toString();
- }
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/LegacyHandlerWrapper.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/LegacyHandlerWrapper.java
deleted file mode 100644
index 7eca6010e15..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/LegacyHandlerWrapper.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.internal.handlers;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.core.commands.IHandlerListener;
-import org.eclipse.core.commands.util.Tracing;
-import org.eclipse.ui.internal.commands.ILegacyAttributeNames;
-import org.eclipse.ui.internal.misc.Policy;
-
-/**
- * A handler that wraps a legacy handler. This provide backward compatibility
- * with the handlers release in Eclipse 3.0.
- *
- * @since 3.1
- */
-public final class LegacyHandlerWrapper implements IHandler {
-
- /**
- * This flag can be set to true
if commands should print
- * information to System.out
when changing handlers.
- */
- private static final boolean DEBUG_HANDLERS = Policy.DEBUG_HANDLERS && Policy.DEBUG_HANDLERS_VERBOSE;
-
- /**
- * The wrapped handler; never null
.
- */
- private final org.eclipse.ui.commands.IHandler handler;
-
- /**
- * Constructs a new instance of HandlerWrapper
.
- *
- * @param handler The handler that should be wrapped; must not be
- * null
.
- */
- public LegacyHandlerWrapper(final org.eclipse.ui.commands.IHandler handler) {
- if (handler == null) {
- throw new NullPointerException("A handler wrapper cannot be constructed on a null handler"); //$NON-NLS-1$
- }
-
- this.handler = handler;
- }
-
- @Override
- public void addHandlerListener(final IHandlerListener handlerListener) {
- handler.addHandlerListener(new LegacyHandlerListenerWrapper(this, handlerListener));
- }
-
- @Override
- public void dispose() {
- handler.dispose();
- }
-
- @Override
- public boolean equals(final Object object) {
- if (object instanceof org.eclipse.ui.commands.IHandler) {
- return this.handler == object;
- }
-
- if (object instanceof LegacyHandlerWrapper) {
- return this.handler == ((LegacyHandlerWrapper) object).handler;
- }
-
- return false;
- }
-
- @Override
- public Object execute(final ExecutionEvent event) throws ExecutionException {
- // Debugging output
- if (DEBUG_HANDLERS) {
- final StringBuilder buffer = new StringBuilder("Executing LegacyHandlerWrapper for "); //$NON-NLS-1$
- if (handler == null) {
- buffer.append("no handler"); //$NON-NLS-1$
- } else {
- buffer.append('\'');
- buffer.append(handler.getClass().getName());
- buffer.append('\'');
- }
- Tracing.printTrace("HANDLERS", buffer.toString()); //$NON-NLS-1$
- }
-
- try {
- return handler.execute(event.getParameters());
- } catch (final org.eclipse.ui.commands.ExecutionException e) {
- throw new ExecutionException(e.getMessage(), e.getCause());
- }
- }
-
- @Override
- public int hashCode() {
- return this.handler.hashCode();
- }
-
- @Override
- public boolean isEnabled() {
- final Object enabled = handler.getAttributeValuesByName().get(ILegacyAttributeNames.ENABLED);
- if (enabled instanceof Boolean) {
- return ((Boolean) enabled).booleanValue();
- }
-
- return true;
- }
-
- @Override
- public boolean isHandled() {
- final Object handled = handler.getAttributeValuesByName().get(ILegacyAttributeNames.HANDLED);
- if (handled instanceof Boolean) {
- return ((Boolean) handled).booleanValue();
- }
-
- return true;
- }
-
- @Override
- public void removeHandlerListener(final IHandlerListener handlerListener) {
- handler.removeHandlerListener(new LegacyHandlerListenerWrapper(this, handlerListener));
- }
-
- @Override
- public String toString() {
- final StringBuilder buffer = new StringBuilder();
-
- buffer.append("LegacyHandlerWrapper("); //$NON-NLS-1$
- buffer.append(handler);
- buffer.append(')');
-
- return buffer.toString();
- }
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/help/WorkbenchHelpSystem.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/help/WorkbenchHelpSystem.java
index 53de63c672a..d129e21bca1 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/help/WorkbenchHelpSystem.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/help/WorkbenchHelpSystem.java
@@ -41,7 +41,6 @@
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.commands.ICommand;
import org.eclipse.ui.help.AbstractHelpUI;
import org.eclipse.ui.help.IWorkbenchHelpSystem;
import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
@@ -674,30 +673,6 @@ public void setHelp(MenuItem item, Object[] contexts) {
item.addHelpListener(getHelpListener());
}
- /**
- * Creates a new help listener for the given command. This retrieves the help
- * context ID from the command, and creates an appropriate listener based on
- * this.
- *
- * @param command The command for which the listener should be created; must not
- * be null
.
- * @return A help listener; never null
.
- */
- public HelpListener createHelpListener(ICommand command) {
- // TODO Need a help ID from the context
- // final String contextId = command.getHelpId();
- final String contextId = ""; //$NON-NLS-1$
- return event -> {
- if (getHelpUI() != null) {
- IContext context = HelpSystem.getContext(contextId);
- if (context != null) {
- Point point = computePopUpLocation(event.widget.getDisplay());
- displayContext(context, point.x, point.y);
- }
- }
- };
- }
-
@Override
public void displayHelp() {
AbstractHelpUI helpUI = getHelpUI();
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/KeySequenceBinding.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/KeySequenceBinding.java
deleted file mode 100644
index 933cb30b34d..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/KeySequenceBinding.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.ui.internal.keys;
-
-import java.util.Objects;
-import org.eclipse.ui.commands.IKeySequenceBinding;
-import org.eclipse.ui.internal.util.Util;
-import org.eclipse.ui.keys.KeySequence;
-
-public final class KeySequenceBinding implements IKeySequenceBinding {
-
- /**
- * This is the identifier for the default context. This is used wherever some
- * default is needed. For example, this is the context that is used for key
- * bindings that specify no context. This is also used to select a default
- * context in the keys preference page.
- */
- public static final String DEFAULT_CONTEXT_ID = "org.eclipse.ui.contexts.window"; //$NON-NLS-1$
-
- private static final int HASH_FACTOR = 89;
-
- private static final int HASH_INITIAL = KeySequenceBinding.class.getName().hashCode();
-
- private transient int hashCode;
-
- private transient boolean hashCodeComputed;
-
- private KeySequence keySequence;
-
- private int match;
-
- private transient String string;
-
- public KeySequenceBinding(KeySequence keySequence, int match) {
- if (keySequence == null) {
- throw new NullPointerException();
- }
-
- if (match < 0) {
- throw new IllegalArgumentException();
- }
-
- this.keySequence = keySequence;
- this.match = match;
- }
-
- @Override
- public int compareTo(Object object) {
- KeySequenceBinding castedObject = (KeySequenceBinding) object;
- int compareTo = Util.compare(match, castedObject.match);
-
- if (compareTo == 0) {
- compareTo = Util.compare(keySequence, castedObject.keySequence);
- }
-
- return compareTo;
- }
-
- @Override
- public boolean equals(Object object) {
- if (!(object instanceof KeySequenceBinding)) {
- return false;
- }
-
- final KeySequenceBinding castedObject = (KeySequenceBinding) object;
- return Objects.equals(keySequence, castedObject.keySequence) && match == castedObject.match;
- }
-
- @Override
- public KeySequence getKeySequence() {
- return keySequence;
- }
-
- public int getMatch() {
- return match;
- }
-
- @Override
- public int hashCode() {
- if (!hashCodeComputed) {
- hashCode = HASH_INITIAL;
- hashCode = hashCode * HASH_FACTOR + Objects.hashCode(keySequence);
- hashCode = hashCode * HASH_FACTOR + Integer.hashCode(match);
- hashCodeComputed = true;
- }
-
- return hashCode;
- }
-
- @Override
- public String toString() {
- if (string == null) {
- final StringBuilder stringBuffer = new StringBuilder();
- stringBuffer.append('[');
- stringBuffer.append(keySequence);
- stringBuffer.append(',');
- stringBuffer.append(match);
- stringBuffer.append(']');
- string = stringBuffer.toString();
- }
-
- return string;
- }
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/LegacySchemeListenerWrapper.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/LegacySchemeListenerWrapper.java
deleted file mode 100644
index 2b8fef57a35..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/LegacySchemeListenerWrapper.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.internal.keys;
-
-import org.eclipse.jface.bindings.BindingManager;
-import org.eclipse.jface.bindings.ISchemeListener;
-import org.eclipse.jface.bindings.SchemeEvent;
-import org.eclipse.ui.commands.IKeyConfiguration;
-import org.eclipse.ui.commands.IKeyConfigurationListener;
-import org.eclipse.ui.commands.KeyConfigurationEvent;
-
-/**
- * A wrapper for old-style listeners to be hooked on to new style schemes.
- *
- * @since 3.1
- */
-final class LegacySchemeListenerWrapper implements ISchemeListener {
-
- /**
- * The binding manager; never null
.
- */
- private final BindingManager bindingManager;
-
- /**
- * The listener that is being wrapped. This value is never null
.
- */
- private final IKeyConfigurationListener listener;
-
- /**
- * Constructs a new instance of SchemeListenerWrapper
with the
- * given listener.
- *
- * @param listener The listener to be wrapped; must mot be null
.
- */
- LegacySchemeListenerWrapper(final IKeyConfigurationListener listener, final BindingManager bindingManager) {
- if (listener == null) {
- throw new NullPointerException("Cannot wrap a null listener"); //$NON-NLS-1$
- }
-
- if (bindingManager == null) {
- throw new NullPointerException("Cannot wrap a listener without a binding manager"); //$NON-NLS-1$
- }
-
- this.listener = listener;
- this.bindingManager = bindingManager;
- }
-
- @Override
- public boolean equals(final Object object) {
- if (object instanceof LegacySchemeListenerWrapper) {
- final LegacySchemeListenerWrapper wrapper = (LegacySchemeListenerWrapper) object;
- return listener.equals(wrapper.listener);
- }
-
- if (object instanceof IKeyConfigurationListener) {
- final IKeyConfigurationListener other = (IKeyConfigurationListener) object;
- return listener.equals(other);
- }
-
- return false;
- }
-
- @Override
- public int hashCode() {
- return listener.hashCode();
- }
-
- @Override
- public void schemeChanged(final SchemeEvent schemeEvent) {
- final IKeyConfiguration keyConfiguration = new SchemeLegacyWrapper(schemeEvent.getScheme(), bindingManager);
- final boolean definedChanged = schemeEvent.isDefinedChanged();
- final boolean nameChanged = schemeEvent.isNameChanged();
- final boolean parentIdChanged = schemeEvent.isParentIdChanged();
-
- listener.keyConfigurationChanged(
- new KeyConfigurationEvent(keyConfiguration, false, definedChanged, nameChanged, parentIdChanged));
- }
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/SchemeLegacyWrapper.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/SchemeLegacyWrapper.java
deleted file mode 100644
index 2cc36e34dc2..00000000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/SchemeLegacyWrapper.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2015 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.internal.keys;
-
-import org.eclipse.jface.bindings.BindingManager;
-import org.eclipse.jface.bindings.Scheme;
-import org.eclipse.ui.commands.IKeyConfiguration;
-import org.eclipse.ui.commands.IKeyConfigurationListener;
-import org.eclipse.ui.commands.NotDefinedException;
-
-/**
- * A wrapper around the new {@link Scheme} class, providing supported for the
- * old {@code IKeyConfiguration} interface.
- *
- * @since 3.1
- */
-public final class SchemeLegacyWrapper implements IKeyConfiguration {
-
- /**
- * The binding manager managing this scheme. This value is never
- * null
.
- */
- private final BindingManager bindingManager;
-
- /**
- * The wrapped scheme; never null
- */
- private final Scheme scheme;
-
- /**
- * Constructs a new instance of SchemeWrapper
.
- *
- * @param scheme The scheme to be wrapped; must not be
- * null
.
- * @param bindingManager The binding manager for this scheme; must not be
- * null
.
- */
- public SchemeLegacyWrapper(final Scheme scheme, final BindingManager bindingManager) {
- if (scheme == null) {
- throw new NullPointerException("Cannot wrap a null scheme"); //$NON-NLS-1$
- }
-
- if (bindingManager == null) {
- throw new NullPointerException("Cannot wrap a scheme without a binding manager"); //$NON-NLS-1$
- }
-
- this.scheme = scheme;
- this.bindingManager = bindingManager;
- }
-
- @Override
- public void addKeyConfigurationListener(IKeyConfigurationListener keyConfigurationListener) {
- scheme.addSchemeListener(new LegacySchemeListenerWrapper(keyConfigurationListener, bindingManager));
- }
-
- @Override
- public int compareTo(Object o) {
- return scheme.compareTo(o);
- }
-
- @Override
- public String getDescription() throws NotDefinedException {
- try {
- return scheme.getDescription();
- } catch (final org.eclipse.core.commands.common.NotDefinedException e) {
- throw new NotDefinedException(e);
- }
- }
-
- @Override
- public String getId() {
- return scheme.getId();
- }
-
- @Override
- public String getName() throws NotDefinedException {
- try {
- return scheme.getName();
- } catch (final org.eclipse.core.commands.common.NotDefinedException e) {
- throw new NotDefinedException(e);
- }
- }
-
- @Override
- public String getParentId() throws NotDefinedException {
- try {
- return scheme.getParentId();
- } catch (final org.eclipse.core.commands.common.NotDefinedException e) {
- throw new NotDefinedException(e);
- }
- }
-
- @Override
- public boolean isActive() {
- return scheme.getId().equals(bindingManager.getActiveScheme().getId());
- }
-
- @Override
- public boolean isDefined() {
- return scheme.isDefined();
- }
-
- @Override
- public void removeKeyConfigurationListener(IKeyConfigurationListener keyConfigurationListener) {
- scheme.removeSchemeListener(new LegacySchemeListenerWrapper(keyConfigurationListener, bindingManager));
-
- }
-
-}
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/Bug66182Test.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/Bug66182Test.java
deleted file mode 100644
index 5e548ad7f66..00000000000
--- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/Bug66182Test.java
+++ /dev/null
@@ -1,353 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Jeanderson Candido PubliclyRetargettableAction
.
- *
- * @param actionID
- * The action identifier to pass to the
- * RetargetAction
; should not be
- * null
.
- * @param text
- * The text to be displayed on the action; may be
- * null
if there should be no text.
- */
- public PubliclyRetargettableAction(String actionID, String text) {
- super(actionID, text);
- }
-
- /**
- * A public version of the setActionHandler
method.
- *
- * @param handler
- * The new action handler; may be null
if
- * there is no handler currently.
- */
- private final void changeHandler(final IAction handler) {
- super.setActionHandler(handler);
- }
- }
-
- /**
- * Tests whether changing only the handler will update an action handler.
- * The set up is a RetargetAction
wrapped in an
- * ActionHandler
. The test verifies a switch back and forth
- * to make sure that the updates are happening.
- */
- @Test
- public final void testHandlerChangeCausesUpdate() {
- final PubliclyRetargettableAction retargetAction = new PubliclyRetargettableAction(
- "actionID", "text");
- final ActionHandler actionHandler = new ActionHandler(retargetAction);
- assertFalse("The retarget action handler should start 'unhandled'",
- ((Boolean) actionHandler.getAttributeValuesByName().get(
- "handled")).booleanValue());
- retargetAction.changeHandler(new PubliclyRetargettableAction(
- "actionID", "text"));
- assertTrue(
- "The retarget action handler should recognize the new handler.",
- ((Boolean) actionHandler.getAttributeValuesByName().get(
- "handled")).booleanValue());
- retargetAction.changeHandler(null);
- assertFalse(
- "The retarget action handler should recognize that the handler is now gone.",
- ((Boolean) actionHandler.getAttributeValuesByName().get(
- "handled")).booleanValue());
- }
-}
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/Bug74982Test.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/Bug74982Test.java
deleted file mode 100644
index f0badb652d6..00000000000
--- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/Bug74982Test.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2011 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.tests.commands;
-
-import static org.junit.Assert.assertTrue;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.commands.ExecutionException;
-import org.eclipse.ui.commands.ICommand;
-import org.eclipse.ui.commands.IWorkbenchCommandSupport;
-import org.eclipse.ui.commands.NotHandledException;
-import org.eclipse.ui.internal.Workbench;
-import org.junit.After;
-import org.junit.Test;
-
-/**
- * A test for whether the select all handler will send a selection event.
- *
- * @since 3.1
- */
-public final class Bug74982Test {
-
- /**
- * Whether the selection event has been fired.
- */
- private boolean selectionEventFired = false;
-
- private Shell dialog;
-
- @After
- public void doTearDown() throws Exception {
- if (dialog != null) {
- dialog.dispose();
- }
- }
-
- /**
- * Tests that the SelectAllHandler
triggers a selection
- * event. Creates a dialog with a text widget, gives the text widget focus,
- * and then calls the select all command. This should then call the
- * SelectAllHandler
and trigger a selection event.
- *
- * @throws ExecutionException
- * If the SelectAllHandler
is broken in some way.
- * @throws NotHandledException
- * If the dialog does not have focus, or if the
- * WorkbenchCommandSupport
class is broken in
- * some way.
- */
- @Test
- public final void testSelectAllHandlerSendsSelectionEvent()
- throws ExecutionException, NotHandledException {
- // Create a dialog with a text widget.
- IWorkbench fWorkbench = PlatformUI.getWorkbench();
- dialog = new Shell(fWorkbench.getActiveWorkbenchWindow().getShell());
- dialog.setLayout(new GridLayout());
- final Text text = new Text(dialog, SWT.SINGLE);
- text.setText("Mooooooooooooooooooooooooooooo");
- text.setLayoutData(new GridData());
- text.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- selectionEventFired = true;
- }
- });
-
- // Open the dialog and give the text widget focus.
- dialog.pack();
- dialog.open();
- text.setFocus();
-
- // Spin the event loop to make sure focus is set-up properly.
- final Display display = fWorkbench.getDisplay();
- while (display.readAndDispatch()) {
- ((Workbench)fWorkbench).getContext().processWaiting();
- }
-
- // Get the select all command and execute it.
- final IWorkbenchCommandSupport commandSupport = fWorkbench
- .getCommandSupport();
- final ICommand selectAllCommand = commandSupport.getCommandManager()
- .getCommand("org.eclipse.ui.edit.selectAll");
- selectAllCommand.execute(null);
-
- // Check to see if the selection event has been fired.
- assertTrue(
- "The selection event was not fired when the SelectAllHandler was used.",
- selectionEventFired);
- }
-}
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/Bug74990Test.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/Bug74990Test.java
deleted file mode 100644
index 0c3efa4e5c1..00000000000
--- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/Bug74990Test.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2014 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Jeanderson Candido