![JAR search and dependency download from the Maven repository](/logo.png)
schema.commandImages.exsd Maven / Gradle / Ivy
The newest version!
<p>
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.
</p>
<p>
Commands placed in menus using the <a href="org_eclipse_ui_menus.html">org.eclipse.ui.menus</a> extension point will use the default image if available, and commands placed in a toolbar will use the <code>toolbar</code> style images if available, followed by the default images.
</p>
The images to associate with a particular command.
The identifier of the command with which the images should be associated.
The path to the icon which should be used in the default case, or the <code>ISharedImages</code> constant. This will appear when the icon is enabled and mouse is not hovering over it. It will also be used in any situation where such a more specific icon is not available.
The icon to display when the command is disabled.
The icon to display when the user is hovering over the command.
The particular scenario in which this block of icons apply. For example, it may be desirable to have different icons when the command is displayed as a toolbar drop-down item. Currently the org.eclipse.ui.menus extension will use the default style (no style) for menu icons and the <code>toolbar</code> style for toolbar contributions. If no <code>toolbar</code> entry is available for that command, it uses the default style.
3.2
<pre>
<extension
point="org.eclipse.ui.commandImages">
<image
commandId="org.eclipse.example.ProfileLast"
hoverIcon="icons/full/etool16/profile.gif"
disabledIcon="icons/full/dtool16/profile.gif"
icon="icons/full/etool16/profile.gif" />
<image
commandId="org.eclipse.example.ProfileLast"
hoverIcon="icons/full/etool16/history.gif"
disabledIcon="icons/full/dtool16/history.gif"
icon="icons/full/etool16/history.gif"
style="toolbar" />
</extension>
</pre>
<p>
Within the workbench, it is possible to get images for commands using the <code>org.eclipse.ui.commands.ICommandImageService</code> interface. This interface can be retrieved from supporting workbench objects, such as <code>IWorkbench</code> itself, the <code>IWorkbenchWindow</code>, or the <code>IWorkbenchPartSite</code>. To retrieve the service, you would make a call like <code>workbench.getService(ICommandImageService.class)</code>.
</p>
Copyright (c) 2005,2007 IBM Corporation and others.<br>
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 <a
href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy