Command in Eclipse represents task. Anything can be a task. In the example in the picture above, I used ‘delete’ as example. A command can have several handlers, which are active on different conditions. In the previous example, I used three handlers which active depend on the type of the object.
Commands can be triggered from one or more place(s). We can define a menu that call a command or define a context menu for that. We can also bind a keyboard shortcut to call a command and we can as well programmatically call a command from our code. And that’s just some examples.
Command, architecturally, is representation of controller. Using command should made it easy for developer to get a big picture of what an application does. Just list all the command and that should be it.
You can find more about command in these links.
- Platform Command Framework in Eclipse Wiki
- Eclipse Commands Tutorial by Vogella
- Command in Action from Eclipse Tips