Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Eclipse Plug-in Developer Guide
Previous Page Home Next Page


A command is the declaration of a behaviour by id. Commands are used to declare semantic behaviour so that action implementations defined elsewhere by handlers, or linked to the action extension points (see Basic workbench extension points using actions) can associate themselves with a particular semantic command. The separation of the command from the action implementation allows multiple plug-ins to define actions that implement the same semantic command. The command is what gets associated with a particular key binding.

The workbench defines many common commands in its plugin.xml file, and plug-ins are encouraged to associate their own actions with these commands where it makes sense. In this way, semantically similar actions implemented in different plug-ins may share the same key binding.

Defining a command

Commands are defined using the org.eclipse.ui.commands extension point. The following comes from the Info example markup:


The command definition specifies a name, description, and id for the action. It also specifies the id of a category for the command, which is used to group commands in the preferences dialog.  The categories are also defined in the org.eclipse.ui.commands extension point:


Note that there is no implementation specified for a command. A command only becomes concrete when a plug-in associates its handler or action with the command id. We'll talk about the different ways to associate handler implementations with commands in the org.eclipse.ui.handlers section. We'll talk about binding key sequences to commands in the org.eclipse.ui.bindings section.

  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire