Command Images

Identifier:
org.eclipse.ui.commandImages

Since:
3.2

Description:

The images extension point provides a way of linking different types of images and icons to a particular command. These images can be used, as appropriate, wherever the command appears in the user interface. To accommodate some boundary cases (e.g., tool bar drop-down items), it is possible to group the images for a particular commands into "styles". These styles can then be specifically requested when a command is to be displayed.

Commands placed in menus using the org.eclipse.ui.menus extension point will use the default image if available, and commands placed in a toolbar will use the toolbar style images if available, followed by the default images.

Configuration Markup:

<!ELEMENT extension (image*)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT image EMPTY>

<!ATTLIST image

commandId    IDREF #REQUIRED

icon         CDATA #REQUIRED

disabledIcon CDATA #IMPLIED

hoverIcon    CDATA #IMPLIED

style        CDATA #IMPLIED>

The images to associate with a particular command.



Examples:

<extension
 point="org.eclipse.ui.commandImages">
 <image
  commandId="org.eclipse.example.ProfileLast"
  hoverIcon="icons/full/etool16/profile.png"
  disabledIcon="icons/full/dtool16/profile.png"
  icon="icons/full/etool16/profile.png" />
 <image
  commandId="org.eclipse.example.ProfileLast"
  hoverIcon="icons/full/etool16/history.png"
  disabledIcon="icons/full/dtool16/history.png"
  icon="icons/full/etool16/history.png"
  style="toolbar" />
</extension>

API Information:

Within the workbench, it is possible to get images for commands using the org.eclipse.ui.commands.ICommandImageService interface. This interface can be retrieved from supporting workbench objects, such as IWorkbench itself, the IWorkbenchWindow, or the IWorkbenchPartSite. To retrieve the service, you would make a call like workbench.getService(ICommandImageService.class).


Copyright (c) 2005,2007 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