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

Embedding commands in help

It is possible to create links to workbench commands in help content. When the user clicks the link, the command will be executed. This feature is similar to Active Help in that it uses JavaScript to bridge between the documentation HTML and the Eclipse Java runtime. Also like Active Help, the command framework is extensible; so you can contribute new commands with interesting behaviors. However, unlike Active Help, there are a large number of useful commands already defined in the workbench and more are being added all the time. This should be appealing to documentation authors because linking to an existing command does not require writing any Java code.

Command links can be used to:

  • Open a specific preference page, such as General > Appearance .
  • Select a new perspective or switch to a pre-determined perspective like the Java Browsing . perspective
  • Select a view to open or open a pre-determined view like the Bookmarks . view
  • Open wizards like the New Plug-in Project wizard and the Export Preferences . wizard
  • Open a Cheat Sheet.
  • Open a message dialog.
  • Open the About Eclipse SDK dialog.
  • And much more!

To get an idea of the range of commands available, look at the General > Keys preference page. This page is used to bind key sequences to commands so it shows the list of available commands. Note that not every command will do something useful from help content. Many commands are designed to work within a somewhat narrow context (like a particular view, or expecting a certain type of selection).

If you want to define your own commands, refer to the documentation for the org.eclipse.core.commands API package and the org.eclipse.ui.commands and org.eclipse.ui.handlers extension-points.

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