All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.ui.commands.IKeyConfiguration Maven / Gradle / Ivy

Go to download

This plug-in contains the bulk of the Workbench implementation, and depends on JFace, SWT, and Core Runtime. It cannot be used independently from org.eclipse.ui. Workbench client plug-ins should not depend directly on this plug-in.

The newest version!
/*******************************************************************************
 * Copyright (c) 2000, 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * 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. */ public interface IKeyConfiguration extends Comparable { /** * Registers an instance of IKeyConfigurationListener 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. */ 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 be null. * @throws NotDefinedException * if the key configuration represented by this handle is not * defined. */ String getDescription() throws NotDefinedException; /** * Returns the identifier of this handle. * * @return the identifier of this handle. Guaranteed not to be * null. */ 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 be null. * @throws NotDefinedException * if the key configuration represented by this handle is not * defined. */ 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 be null. * @throws NotDefinedException * if the key configuration represented by this handle is not * defined. */ 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. *

* * @return true, iff this command is active. */ 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. *

* * @return true, iff the key configuration represented by * this handle is defined. */ 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. */ void removeKeyConfigurationListener( IKeyConfigurationListener keyConfigurationListener); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy