Bug 204458 [Commands] Allow menu and toolbars to fire execution events
Keybindings will currently fire execution events when executing actions from the action framework. i.e. IActions with their actionDefinitionId set and IActionDelegates with the definitionId attribute in their action contributions. But it would be nice if selecting the menu or tool item would also fire the equivalent events. PW
bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/CommandManager.java
public final Command getCommand(final String commandId) {
		checkId(commandId);
		Command command = (Command) handleObjectsById.get(commandId);
		if (command == null) {
			command = new Command(commandId);
			handleObjectsById.put(commandId, command);
			command.addCommandListener(this);
			if (executionListener != null) {
				command.addExecutionListener(executionListener);
			}
		}
		return command;
	}
	/**
	 * Returns the categories that are defined.
	 * 
	 * @return The defined categories; this value may be empty, but it is never
	 *         <code>null</code>.
	 * @since 3.2
	 */
	public final Category[] getDefinedCategories() {
		final Category[] categories = new Category[definedCategoryIds.size()];
		final Iterator categoryIdItr = definedCategoryIds.iterator();
		int i = 0;
		while (categoryIdItr.hasNext()) {
			String categoryId = (String) categoryIdItr.next();
			categories[i++] = getCategory(categoryId);
		}
		return categories;
	}