blob: 5c452365a052a100251fd5f936c7692aec142bbb [file] [log] [blame]
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="org.eclipse.ui" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
<meta.schema plugin="org.eclipse.ui" id="menus" name="Menus"/>
</appinfo>
<documentation>
&lt;p&gt;
This extension point allows the plug-in developer to add (contribute) a variety of custom additions to the eclipse framework:
&lt;ul&gt;
&lt;li&gt;Main Menu&lt;/li&gt;
&lt;li&gt;Main Toolbars&lt;/li&gt;
&lt;li&gt;View Menus/Toolbars:
&lt;ul&gt;
&lt;li&gt;View Dropdown Menu&lt;/li&gt;
&lt;li&gt;View Toolbar&lt;/li&gt;
&lt;li&gt;Context Menu(s)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Trim&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;
&lt;p&gt;
It provides a common implementation for and acts as a replacement of the following (legacy) eclipse extension points:
&lt;ul&gt;
&lt;li&gt;org.eclipse.ui.ActionSets&lt;/li&gt;
&lt;li&gt;org.eclipse.ui.EditorActions&lt;/li&gt;
&lt;li&gt;org.eclipse.ui.popupMenus (including &apos;objectContributions&apos;)&lt;/li&gt;
&lt;li&gt;org.eclipse.ui.viewActions&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;
&lt;p&gt;
The general strategy for this mechanism is to separate the &apos;location&apos; where the contributions should be inserted from the visibility and enablement state of the element. Each contribution first defines its insertion location through a Menu &apos;URI&apos;, a string (loosely) formatted according to the jave.net.URI format:
&lt;/p&gt;&lt;p&gt;
&lt;b&gt;&quot;[Scheme]:[ID]?[ArgList]&quot;&lt;/b&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Scheme&lt;/b&gt; - The &apos;type&apos; of the UI component into which the contributions will be added. It may be either &quot;menu&quot;, &quot;popup&quot; or &quot;toolbar&quot;. While &apos;popup&apos; is indeed a form of menu it is provided to allow a distinction between a view&apos;s &apos;chevron&apos; menu (for which we use the &quot;menu&quot; scheme) and its default context menu which, by convention, should be registered using the &quot;popup&quot; scheme.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;ID&lt;/b&gt; - This is the id of menu or toolbar into which the contributions should be added. By convention views should use their view id as the id of the root of their chevron and default popup menu. Note that there is no explicit distinction between contributions supporting editors and &apos;normal&apos; contributions into the Menu Menu or Toolbar; both global contributions and editor contributions would use the &quot;org.eclipse.ui.main.menu&quot; id or &quot;org.eclipse.ui.main.toolbar&quot;. A special id used with popup:, &quot;org.eclipse.ui.any.popup&quot;, is reserved to handle contributions which are candidates to appear on any (top level) context menu. Note that these contributions are expected to implement a &apos;visibleWhen&apos; expression sufficient to limit their visibility to appropriate menus&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Query&lt;/b&gt; - This field allows fine-grained definition of the specific location &lt;i&gt;within&lt;/i&gt; a given menu. It has the form &quot;[placement]=[id]&quot; where placement is one of &quot;before&quot; or &quot;after&quot; and the id is expected to be the id of some IContributionItem in the menu.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
This will define the location at which the contributions will appear in the eclipse UI. Once the insertion point has been defined the rest of the contributions describe the UI elements that will be added at that location. Each element supports a &apos;visibleWhen&apos; expression that determines at run time whether a particular item should appear in the menu based on the system&apos;s current state (selection, active view/editor, context...). See &lt;code&gt;org.eclipse.ui.ISources&lt;/code&gt; for a list of currently
supported variables.
&lt;/p&gt;
</documentation>
</annotation>
<include schemaLocation="schema://org.eclipse.core.expressions/schema/expressionLanguage.exsd"/>
<element name="extension">
<complexType>
<sequence>
<element ref="group" minOccurs="0" maxOccurs="unbounded"/>
<element ref="widget" minOccurs="0" maxOccurs="unbounded"/>
<element ref="menuContribution" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="point" type="string" use="required">
<annotation>
<documentation>
org.eclipse.ui.menus
</documentation>
</annotation>
</attribute>
<attribute name="id" type="string">
<annotation>
<documentation>
An optional identifier of the extension instance.
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string">
<annotation>
<documentation>
An optional name of the extension instance.
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="group">
<annotation>
<appinfo>
<meta.element deprecated="true"/>
</appinfo>
<documentation>
&lt;p&gt;
A logical group. It can either be visible (e.g., separators are drawn before and after, as appropriate) or invisible. By default, logicial groups are visible.
&lt;/p&gt;
&lt;p&gt;
A group can contain menus, items and other groups.
&lt;/p&gt;
&lt;p&gt;
This element is deprecated. Groups are now expressed as id&apos;d &apos;separator&apos; elements. The menu insertion URI can be used to define an insertion point either &apos;before&apos; or &apos;after&apos; &lt;b&gt;any&lt;/b&gt; id&apos;d element and placing it after the separator is the same as contibuting it to the group. &lt;/p&gt;
&lt;p&gt;
See the documentation for the &apos;locationURI&apos; attribute of &apos;menuAddition&apos; for more details on how to define insertion points adn how they relate to the menu structure.
&lt;/p&gt;
</documentation>
</annotation>
<complexType>
<sequence>
<element ref="location" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
A unique identifier for this group. It is recommended that the identifier be prefixed by the plug-in name, to guarantee uniqueness. For example, a group contributed by &lt;code&gt;org.eclipse.ui&lt;/code&gt; might be called &lt;code&gt;org.eclipse.ui.group1&lt;/code&gt;.
</documentation>
</annotation>
</attribute>
<attribute name="separatorsVisible" type="boolean" use="default" value="true">
<annotation>
<documentation>
Whether separators should be drawn around the group. The workbench will take care of deciding whether a separator needs to be drawn at the top or bottom -- accounting for the top and bottom of the menu and duplicate separators. By default, separators are visible.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="widget">
<annotation>
<appinfo>
<meta.element deprecated="true"/>
</appinfo>
<documentation>
A menu or trim element that is given direct access to the widgets. For example, this can be used to render a combo box. &lt;b&gt;NOTE:&lt;/b&gt; If a widget element becomes visible in the user interface, this will lead to plug-in loading. &lt;strong&gt;Use this element with caution, as it can cause performance problems.&lt;/strong&gt;
When used as trim the widget will only cause the plug-in to load when it becomes visible in the UI.
&lt;p&gt;
&lt;b&gt;NOTE:&lt;/b&gt; This element is deprecated. Clients should contribute a Toolbar to one of the trim areas and place a control contribution inside it. See the Trim Contribution example for details.
&lt;/p&gt;
</documentation>
</annotation>
<complexType>
<sequence>
<element ref="location" minOccurs="0" maxOccurs="unbounded"/>
<element ref="class" minOccurs="0" maxOccurs="1"/>
<element ref="visibleWhen" minOccurs="0" maxOccurs="1"/>
<element ref="layout" minOccurs="0" maxOccurs="1"/>
</sequence>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
A unique identifier for this widget. It is recommended that the identifier be prefixed by the plug-in name, to guarantee uniqueness. For example, a widget contributed by &lt;code&gt;org.eclipse.ui&lt;/code&gt; might be called &lt;code&gt;org.eclipse.ui.widget1&lt;/code&gt;.
&lt;p&gt;
If defined then it can be used as a reference in the Query part of the location defining whether the additions are to go before or after this element (or at the end of the logical group containing this element using the &apos;endof&apos; value).
&lt;/p&gt;
</documentation>
</annotation>
</attribute>
<attribute name="class" type="string" use="required">
<annotation>
<documentation>
This class is loaded to fill the appropriate spot in the menu or trim when it shows. While, strictly speaking, this class must implement &lt;code&gt;IWorkbenchWidget&lt;/code&gt; you should use the default implementation; &lt;code&gt;AbstractWorkbenchTrimWidget&lt;/code&gt; as the base from which to derive your widget implementation. This implementation handles the &apos;init&apos; method and caches the result for use through its &lt;code&gt;getWorkbenchWindow&lt;/code&gt; method.
</documentation>
<appinfo>
<meta.attribute kind="java" basedOn="org.eclipse.ui.menus.IWorkbenchWidget"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="layout">
<annotation>
<appinfo>
<meta.element deprecated="true"/>
</appinfo>
<documentation>
This element can be used to specify various layout options for elements added into &lt;code&gt;trim&lt;/code&gt; locations.
</documentation>
</annotation>
<complexType>
<attribute name="fillMajor" type="boolean">
<annotation>
<documentation>
The widget will stretch to use up any additional space available along its &lt;b&gt;major&lt;/b&gt; dimension in the group&apos;s area (i.e. it will use the extra horizontal space for horizontally oriented trim areas). Default is &lt;code&gt;false&lt;/code&gt;.
</documentation>
</annotation>
</attribute>
<attribute name="fillMinor" type="boolean">
<annotation>
<documentation>
The widget will stretch to use up any additional space available along its &lt;b&gt;minor&lt;/b&gt; dimension in the group&apos;s area (i.e. it will use the extra vertical space for horizontally oriented trim areas). Default is &lt;code&gt;false&lt;/code&gt;.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="location">
<annotation>
<appinfo>
<meta.element deprecated="true"/>
</appinfo>
<documentation>
A location in which a &lt;code&gt;menu&lt;/code&gt;, &lt;code&gt;group&lt;/code&gt;, &lt;code&gt;item&lt;/code&gt; or &lt;code&gt;widget&lt;/code&gt; can appear. This element is used to control location-specific information.
&lt;p&gt;
This element is deprecated. Users of this extension point should now define the location at which their contributions should appear using the &apos;locationURI&apos; specification.
&lt;/p&gt;
</documentation>
</annotation>
<complexType>
<sequence>
<element ref="order" minOccurs="0" maxOccurs="1"/>
<choice>
<element ref="bar"/>
<element ref="part"/>
<element ref="popup"/>
</choice>
</sequence>
<attribute name="mnemonic" type="string">
<annotation>
<documentation>
The mnemonic that should be associated with this element in the given location. A mnemonic should be a single character.
</documentation>
<appinfo>
<meta.attribute translatable="true" deprecated="true"/>
</appinfo>
</annotation>
</attribute>
<attribute name="imageStyle" type="string">
<annotation>
<documentation>
The image style to associate with this location. It is possible for commands to have different styles of images associated with them. For example, a different icon could be selected for the tool bar and for the menu. This is especially important for developers using drop-down tool items in the tool bar, as they may wish to display an icon more appropriate for the drop-down.
</documentation>
<appinfo>
<meta.attribute deprecated="true"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="bar">
<annotation>
<appinfo>
<meta.element deprecated="true"/>
</appinfo>
<documentation>
A leaf element within a location. This can be the menu bar or the trim area. If unqualified, this indicates the top-level menu bar or trim. If this is qualified with a &lt;code&gt;part&lt;/code&gt; element, then this indicates that part&apos;s menu or trim.
</documentation>
</annotation>
<complexType>
<attribute name="type" use="required">
<annotation>
<documentation>
&lt;p&gt;
&lt;b&gt;NOTE:&lt;/b&gt; This is not only deprecated but has no value in the current implementation (the only acceptable value is &apos;trim&apos; which is the default. You may safely remove this from any declarations.
&lt;/p&gt;
&lt;p&gt;
What type of bar to contribute to. This can be &lt;code&gt;menu&lt;/code&gt; or &lt;code&gt;trim&lt;/code&gt;. If contributing to the menu, then the item will be parented to some widget structure. In general, this means using widget elements does not make much sense, and an icon for an item&apos;s command is not strictly necessary. The default value is &lt;code&gt;menu&lt;/code&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;If contributing to the &lt;code&gt;trim&lt;/code&gt;, then the bar will generally not require a command or an icon, it should be filled with a widget that displays the trim information.
&lt;p&gt;
Within the trim, the workbench defines five general groups which correspond to various positions around the window:
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;command1&lt;/b&gt; - This represents the (horizontal) trim area that the main toolbars are placed into.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;command2&lt;/b&gt; - This represents the (horizontal) trim area that the Perspective Switcher is in by default.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;vertical1&lt;/b&gt; - This represents the (vertical) trim area that is on the left side when the text direction is Left-&gt;Right and on the right side for Right-&gt;Left text.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;vertical2&lt;/b&gt; - This represents the (vertical) trim area that is on the opposite side of the workbench from &lt;code&gt;vertical1&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;status&lt;/b&gt; - This represents the (horizontal) trim area along the bottom edge of the workbench.&lt;/li&gt;
&lt;/ul&gt;
By positioning the trim contribution within or with respect to these groups, the position is inferred by the workbench.
&lt;/p&gt;
</documentation>
<appinfo>
<meta.attribute deprecated="true"/>
</appinfo>
</annotation>
<simpleType>
<restriction base="string">
<enumeration value="menu">
</enumeration>
<enumeration value="trim">
</enumeration>
</restriction>
</simpleType>
</attribute>
<attribute name="path" type="string">
<annotation>
<documentation>
This represents the id of a group that the widget is to be placed into.
</documentation>
<appinfo>
<meta.attribute deprecated="true"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="class">
<annotation>
<documentation>
A class element supporting the executable extension parsing syntax for both &lt;code&gt;widget&lt;/code&gt; and &lt;code&gt;dynamic&lt;/code&gt; elements.
</documentation>
</annotation>
<complexType>
<sequence>
<element ref="parameter" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="class" type="string" use="required">
<annotation>
<documentation>
The class to load as an &lt;code&gt;IExecutableExtension&lt;/code&gt;.
</documentation>
<appinfo>
<meta.attribute kind="java"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="visibleWhen">
<annotation>
<documentation>
A core Expression that ontrols the visibility of the given element.
</documentation>
</annotation>
<complexType>
<choice minOccurs="0" maxOccurs="1">
<element ref="not"/>
<element ref="or"/>
<element ref="and"/>
<element ref="instanceof"/>
<element ref="test"/>
<element ref="systemTest"/>
<element ref="equals"/>
<element ref="count"/>
<element ref="with"/>
<element ref="resolve"/>
<element ref="adapt"/>
<element ref="iterate"/>
<element ref="reference"/>
</choice>
<attribute name="checkEnabled" type="boolean" use="default" value="false">
<annotation>
<documentation>
If this attribute is set to &lt;code&gt;true&lt;/code&gt;, then there should be no sub-elements. This just checks the enabled state of the command, and makes the corresponding element visible if the command is enabled.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="part">
<annotation>
<appinfo>
<meta.element deprecated="true"/>
</appinfo>
<documentation>
&lt;p&gt;
An element within a location. This qualifies the location to refer to a particular workbench part. This can be either a view or an editor. The qualification can use either the class name of the part (including inheritance), or it can refer to the identifier for the view or editor.
&lt;/p&gt;
&lt;p&gt;
Only one of &lt;code&gt;id&lt;/code&gt; and &lt;code&gt;class&lt;/code&gt; can be specified.
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;NOTE:&lt;/b&gt; This element is deprecated. It had been used for a previous technique for adding trim elements. Instead, clients should contribute a Toolbar to one of the trim areas and place a control contribution inside it. See the Trim Contribution example for details.
&lt;/p&gt;
</documentation>
</annotation>
<complexType>
<choice>
<element ref="popup"/>
<element ref="bar"/>
</choice>
<attribute name="id" type="string">
<annotation>
<documentation>
The identifier of the view or editor.
</documentation>
</annotation>
</attribute>
<attribute name="class" type="string">
<annotation>
<documentation>
The class of the part. This can be a superclass, interface or superinterface of the part, and it will still match.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="parameter">
<annotation>
<documentation>
A parameter to either an executable extension or a command -- depending on where it appears in the extension.
</documentation>
</annotation>
<complexType>
<attribute name="name" type="string" use="required">
<annotation>
<documentation>
The name is either the name of the parameter to pass to the executable extension, or the identifier of the parameter for the command.
</documentation>
<appinfo>
<meta.attribute kind="identifier" basedOn="org.eclipse.ui.commands/command/commandParameter/@id"/>
</appinfo>
</annotation>
</attribute>
<attribute name="value" type="string" use="required">
<annotation>
<documentation>
The value to pass for this parameter.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="order">
<annotation>
<appinfo>
<meta.element deprecated="true"/>
</appinfo>
<documentation>
&lt;b&gt;NOTE:&lt;/b&gt; This element is deprecated in favor of using the &apos;locationURI&apos; to specify the location at which contributions should be placed.
&lt;p&gt;
Controls the position of a widget within a particular group.
&lt;/p&gt;
</documentation>
</annotation>
<complexType>
<attribute name="position" use="required">
<annotation>
<documentation>
&lt;p&gt;
This attribute accepts the following values: &lt;code&gt;start&lt;/code&gt; (put the element at the beginning of the container); &lt;code&gt;end&lt;/code&gt; (put the element at the end of its container); &lt;code&gt;after&lt;/code&gt; (put the element after the sibling element whose id matches &lt;code&gt;ref&lt;/code&gt;); and, &lt;code&gt;before&lt;/code&gt; (put the element before the sibling element whose id matches &lt;code&gt;ref&lt;/code&gt;). Relative ordering can be applied to any type of menu element.
&lt;/p&gt;
&lt;p&gt;
In the event of conflicts, Eclipse will chose an arbitrary order. The only guarantee is that, in the event of a conflict, the order will remain the same as long as the following holds:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The Eclipse version is the same.&lt;/li&gt;
&lt;li&gt;The list of elements is the same (i.e., no dynamic elements, no plug-ins added or removed).&lt;/li&gt;
&lt;/ul&gt;
</documentation>
</annotation>
<simpleType>
<restriction base="string">
<enumeration value="start">
</enumeration>
<enumeration value="end">
</enumeration>
<enumeration value="before">
</enumeration>
<enumeration value="after">
</enumeration>
</restriction>
</simpleType>
</attribute>
<attribute name="relativeTo" type="string">
<annotation>
<documentation>
The identifier of the element to which this position is relative. This value is required if the &lt;code&gt;position&lt;/code&gt; is &lt;code&gt;before&lt;/code&gt; or &lt;code&gt;after&lt;/code&gt;.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="popup">
<annotation>
<appinfo>
<meta.element deprecated="true"/>
</appinfo>
<documentation>
Part of a location. It indicates that the menu, group, item or widget should appear in the popup menu.
&lt;p&gt;
&lt;p&gt;
&lt;b&gt;NOTE:&lt;/b&gt; This element is deprecated. It had been used for a previous technique for adding trim elements. Instead, clients should contribute a Toolbar to one of the trim areas and place a control contribution inside it. See the Trim Contribution example for details.
&lt;/p&gt;
</documentation>
</annotation>
<complexType>
<attribute name="id" type="string">
<annotation>
<documentation>
The identifier of the popup menu. If none is specified, then it will appear in all popup menus.
</documentation>
</annotation>
</attribute>
<attribute name="path" type="string">
<annotation>
<documentation>
The path within the popup menu to place the element. If not specified, then this is added to the &quot;additions&quot; group.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="menuContribution">
<annotation>
<documentation>
&lt;p&gt;Defines an ordered set of additions to the command UI structure. The defined elements will be added into the command UI structure at the location specified by the &lt;code&gt;locationURI&lt;/code&gt; element.
&lt;/p&gt;&lt;p&gt;
This should be the starting point for &lt;i&gt;all&lt;/i&gt; contributions into menus, toolbars or trim, wherever they occur in the UI.
&lt;/p&gt;
</documentation>
</annotation>
<complexType>
<sequence>
<element ref="menu" minOccurs="0" maxOccurs="unbounded"/>
<element ref="command" minOccurs="0" maxOccurs="unbounded"/>
<element ref="separator" minOccurs="0" maxOccurs="unbounded"/>
<element ref="dynamic" minOccurs="0" maxOccurs="unbounded"/>
<element ref="toolbar" minOccurs="0" maxOccurs="unbounded"/>
<element ref="control" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="locationURI" type="string" use="required">
<annotation>
<documentation>
A &lt;code&gt;URI&lt;/code&gt; specification that defines the insertion point at which the contained additions will be added.
The format for the URI is comprised of three basic parts:
Scheme: One of &quot;menu&quot;, &quot;popup&quot; or &quot;toolbar. Indicates the type of the manager used to handle the contributions
Id: This is either the id of an existing menu, a view id or the id of the editor &apos;type&apos;
Query: The query format is &amp;lt;placement&amp;gt;=&amp;lt;id&amp;gt; where:
&amp;lt;placement&amp;gt; is either &quot;before&quot; or &quot;after&quot; and
&amp;lt;id&amp;gt; is the id of an existing menu item
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="menu">
<annotation>
<appinfo>
<meta.element labelAttribute="label" icon="icon"/>
</appinfo>
<documentation>
Defines a new menu contribution at the given insertion point.
</documentation>
</annotation>
<complexType>
<sequence minOccurs="0" maxOccurs="1">
<element ref="visibleWhen" minOccurs="0" maxOccurs="1"/>
<choice minOccurs="0" maxOccurs="unbounded">
<element ref="menu" minOccurs="0" maxOccurs="1"/>
<element ref="command" minOccurs="0" maxOccurs="1"/>
<element ref="separator" minOccurs="0" maxOccurs="1"/>
<element ref="dynamic" minOccurs="0" maxOccurs="1"/>
</choice>
</sequence>
<attribute name="id" type="string">
<annotation>
<documentation>
The &apos;id&apos; of this menu contribution. If defined then it can be extended through other &apos;menuAddition&apos; elements or the id can be used as a reference in the Query part of the location defining whether the additions are to go before or after this element.
</documentation>
</annotation>
</attribute>
<attribute name="mnemonic" type="string">
<annotation>
<documentation>
The character of the Label that should be given the mnemonic affordance. This is to allow the menu system to re-define the value during translation without having to understand the various platforms&apos; conventions for menu label definition (i.e. using the &apos;&amp;amp;&apos; character...).
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
<attribute name="icon" type="string">
<annotation>
<documentation>
A plugin relative path to the image to be used as the icon for this menu in either a menu or a toolbar.
</documentation>
<appinfo>
<meta.attribute kind="resource"/>
</appinfo>
</annotation>
</attribute>
<attribute name="tooltip" type="string">
<annotation>
<documentation>
The tooltip to be displayed for this element when it is placed in a toolbar. This value should be translatable.
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
<attribute name="label" type="string" use="required">
<annotation>
<documentation>
The label to be displayed for this element when it is placed in either a menu or a toolbar. This value should be translatable.
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="command">
<annotation>
<appinfo>
<meta.element labelAttribute="label" icon="icon"/>
</appinfo>
<documentation>
Defines a new Command Contribution at the defined insertion point.
</documentation>
</annotation>
<complexType>
<sequence>
<element ref="visibleWhen" minOccurs="0" maxOccurs="1"/>
<element ref="parameter" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="commandId" type="string" use="required">
<annotation>
<documentation>
This is the id of the Command that is to be bound to this element. This is the hook into the Commands/Handlers/Key binding services that actually do the work should this item be selected. In many cases this command will have been defined in a previous extension declaration.
</documentation>
<appinfo>
<meta.attribute kind="identifier" basedOn="org.eclipse.ui.commands/command/@id"/>
</appinfo>
</annotation>
</attribute>
<attribute name="id" type="string">
<annotation>
<documentation>
The &apos;id&apos; of this contribution. If defined then it can be used as a reference in the Query part of the location defining whether the additions are to go before or after this element.
</documentation>
</annotation>
</attribute>
<attribute name="mnemonic" type="string">
<annotation>
<documentation>
The character of the Label that should be given the mnemonic affordance. This is to allow the menu system to re-define the value during translation without having to understand the various platforms&apos; conventions for menu label definition (i.e. using the &apos;&amp;amp;&apos; character...).
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
<attribute name="icon" type="string">
<annotation>
<documentation>
a relative path of an icon used to visually represent the action in its context.
If omitted and the action appears in the toolbar, the Workbench will use a placeholder icon. The path is relative to the location of the plugin.xml file of the contributing plug-in.
</documentation>
<appinfo>
<meta.attribute kind="resource"/>
</appinfo>
</annotation>
</attribute>
<attribute name="disabledIcon" type="string">
<annotation>
<documentation>
a relative path of an icon used to visually represent the action in its context when the action is disabled. If omitted, the normal icon will simply appear greyed out. The path is relative to the location of the plugin.xml file of the contributing plug-in. The disabled icon will appear in toolbars but not in menus. Icons for disabled actions in menus will be supplied by the OS.
</documentation>
<appinfo>
<meta.attribute kind="resource"/>
</appinfo>
</annotation>
</attribute>
<attribute name="hoverIcon" type="string">
<annotation>
<documentation>
a relative path of an icon used to visually represent the action in its context when the mouse pointer is over the action. If omitted, the normal icon will be used. The path is relative to the location of the plugin.xml file of the contributing plug-in.
</documentation>
<appinfo>
<meta.attribute kind="resource"/>
</appinfo>
</annotation>
</attribute>
<attribute name="label" type="string">
<annotation>
<documentation>
The label to be displayed for this element when it is placed in either a menu. This value should be translatable.
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
<attribute name="tooltip" type="string">
<annotation>
<documentation>
The tooltip to be displayed for this element when it is placed in a toolbar. This value should be translatable.
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
<attribute name="helpContextId" type="string">
<annotation>
<documentation>
a unique identifier indicating the help context for this action. If the action appears as a menu item, then pressing F1 while the menu item is highlighted will display help. This overrides the help context id provided by the active handler or command.
</documentation>
</annotation>
</attribute>
<attribute name="style" use="default" value="push">
<annotation>
<documentation>
an attribute to define the user interface style type for the action. If omitted, then it is &lt;samp&gt;push&lt;/samp&gt; by default. The attribute value will be one of the following:
&lt;table border=&quot;0&quot; width=&quot;80%&quot;&gt;
&lt;tr&gt;
&lt;td valign=&quot;top&quot; width=&quot;25&quot;&gt;&lt;/td&gt;
&lt;td valign=&quot;top&quot; nowrap&gt;&lt;b&gt;push&lt;/b&gt;&lt;/td&gt;
&lt;td valign=&quot;top&quot;&gt;- as a regular menu item or tool item.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=&quot;top&quot; width=&quot;25&quot;&gt;&lt;/td&gt;
&lt;td valign=&quot;top&quot; nowrap&gt;&lt;b&gt;radio&lt;/b&gt;&lt;/td&gt;
&lt;td valign=&quot;top&quot;&gt;- as a radio style menu item or tool item. Actions with the radio style within the same menu or toolbar group behave as a radio set. The initial value is specified by the &lt;samp&gt;state&lt;/samp&gt; attribute.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=&quot;top&quot; width=&quot;25&quot;&gt;&lt;/td&gt;
&lt;td valign=&quot;top&quot; nowrap&gt;&lt;b&gt;toggle&lt;/b&gt;&lt;/td&gt;
&lt;td valign=&quot;top&quot;&gt;- as a checked style menu item or as a toggle tool item. The initial value is specified by the &lt;samp&gt;state&lt;/samp&gt; attribute.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=&quot;top&quot; width=&quot;25&quot;&gt;&lt;/td&gt;
&lt;td valign=&quot;top&quot; nowrap&gt;&lt;b&gt;pulldown&lt;/b&gt;&lt;/td&gt;
&lt;td valign=&quot;top&quot;&gt;- (ToolBar only) Creates a ToolItem with the &lt;code&gt;SWT.DROP_DOWN&lt;/code&gt; affordance. The URI of the menu is &quot;menu:&quot; + this item&apos;s ID.&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
</documentation>
</annotation>
<simpleType>
<restriction base="string">
<enumeration value="push">
</enumeration>
<enumeration value="radio">
</enumeration>
<enumeration value="toggle">
</enumeration>
<enumeration value="pulldown">
</enumeration>
</restriction>
</simpleType>
</attribute>
</complexType>
</element>
<element name="separator">
<annotation>
<appinfo>
<meta.element labelAttribute="name"/>
</appinfo>
<documentation>
Inserts a separator at the current insertion point.
</documentation>
</annotation>
<complexType>
<attribute name="name" type="string" use="required">
<annotation>
<documentation>
The &apos;id&apos; of this contribution. If defined then it can be used as a reference in the Query part of the location defining whether the additions are to go before or after this element (or at the end of the logical group containing this element using the &apos;endOf&apos; value).
&lt;p&gt;
Separator contributions that have an id define the start of a logical group so the result of using the &apos;endof&apos; value for placement is to search forward in the current menu to locate the next id&apos;d separator and to place the inserted elements before that element. If no trailing separator is found then the items are placed at the end of the menu.
&lt;/p&gt;
</documentation>
</annotation>
</attribute>
<attribute name="visible" type="boolean">
<annotation>
<documentation>
Indicates whether or not the separator should be visible in the UI. &lt;code&gt;false&lt;/code&gt; by default.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="toolbar">
<annotation>
<appinfo>
<meta.element labelAttribute="id"/>
</appinfo>
<documentation>
Contributes a new ToolBar at the current insertion point.
</documentation>
</annotation>
<complexType>
<sequence minOccurs="0" maxOccurs="1">
<element ref="visibleWhen" minOccurs="0" maxOccurs="1"/>
<choice minOccurs="0" maxOccurs="unbounded">
<element ref="command" minOccurs="0" maxOccurs="1"/>
<element ref="separator" minOccurs="0" maxOccurs="1"/>
<element ref="dynamic" minOccurs="0" maxOccurs="1"/>
<element ref="control" minOccurs="0" maxOccurs="1"/>
</choice>
</sequence>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
The &apos;id&apos; of this toolbar contribution. If defined then it can be extended through other &apos;menuAddition&apos; elements or the id can be used as a reference in the Query part of the location defining whether the additions are to go before or after this element.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="control">
<annotation>
<documentation>
Used to contribute controls to ToolBars in the workbench. The &apos;class&apos; attribute must be a derivative of the
WorkbenchWindowControlContribution base class.
&lt;p&gt;
&lt;b&gt;NOTE:&lt;/b&gt; Due to platform restruictions ontrol contributions are only supported for toolbars; Attempts to contribute controls into a menu or popup will be treated as a NO-OP.
&lt;/p&gt;
</documentation>
</annotation>
<complexType>
<sequence>
<element ref="visibleWhen" minOccurs="0" maxOccurs="1"/>
</sequence>
<attribute name="id" type="string">
<annotation>
<documentation>
The &apos;id&apos; of this menu contribution. If defined then it can be used as a reference in the Query part of the location defining whether the additions are to go before or after this element.
</documentation>
</annotation>
</attribute>
<attribute name="class" type="string" use="required">
<annotation>
<documentation>
The class which will be used to create the control that is to be hosted in a ToolBar. This must be a subclass of
WorkbenchWindowControlContribution which provides information as to the control&apos;s location (i.e. which workbench window it&apos;s being hosted in and the side of the window that it is currently being displayed on.
</documentation>
<appinfo>
<meta.attribute kind="java" basedOn="org.eclipse.ui.menus.WorkbenchWindowControlContribution"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="dynamic">
<annotation>
<documentation>
The element provides a mechanism that will call back into the defined class to fill a list with the IContributionItems to be shown when the menu or toolbar is built. The defined class must be a derivative of the org.eclipse.ui.actions.CompoundContributionItem base class that provides an implementation for the abstract &lt;code&gt;getContributionItems&lt;/code&gt; method.
</documentation>
</annotation>
<complexType>
<sequence>
<element ref="class" minOccurs="0" maxOccurs="1"/>
<element ref="visibleWhen" minOccurs="0" maxOccurs="1"/>
</sequence>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
A unique identifier for this contribution. It is recommended that the identifier be prefixed by the plug-in name, to guarantee uniqueness. For example, a widget contributed by &lt;code&gt;org.eclipse.ui&lt;/code&gt; might be called &lt;code&gt;org.eclipse.ui.widget1&lt;/code&gt;.
&lt;p&gt;
If defined then it can be used as a reference in the Query part of the location defining whether the additions are to go before or after this element (or at the end of the logical group containing this element using the &apos;endof&apos; value).
&lt;/p&gt;
</documentation>
</annotation>
</attribute>
<attribute name="class" type="string" use="required">
<annotation>
<documentation>
This class is expected to be a subclass of CompoundContributionItem. When an addition of this type is encountered the specified class is instantiated and used to retrieve a list of the IContributionItems to be placed into the menu. The resulting list may be empty if there are no appropriate items to be shown in the current context.
</documentation>
<appinfo>
<meta.attribute kind="java" basedOn="org.eclipse.ui.actions.CompoundContributionItem"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<annotation>
<appinfo>
<meta.section type="since"/>
</appinfo>
<documentation>
3.3
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="examples"/>
</appinfo>
<documentation>
&lt;p&gt;
A basic extension looks like this.
&lt;/p&gt;
&lt;pre&gt;
&lt;extension
id=&quot;add.item&quot;
point=&quot;org.eclipse.ui.menus&quot;&gt;
&lt;menuContribution
locationURI=&quot;menu:someorg.somemenu.id?after=additions&quot;&gt;
&lt;command
commandId=&quot;someorg.someid.someCommand&quot;
icon=&quot;icons/anything.gif&quot;
id=&quot;someorg.someid.BasicCmdItem&quot;
label=&quot;Simple Item&quot;
mnemonic=&quot;S&quot;&gt;
&lt;/command&gt;
&lt;/menuContribution&gt;
&lt;/extension&gt;
&lt;/pre&gt;
&lt;p&gt;
This is the simplest example; adding a command contribution after an existing menu&apos;s additions group.
&lt;/p&gt;
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="apiInfo"/>
</appinfo>
<documentation>
&lt;p&gt;
It is preferred that menu contributions be added in the &lt;code&gt;plugin.xml&lt;/code&gt;. Plugins can
programmatically add their own menu contributions using &lt;code&gt;org.eclipse.ui.menus.IMenuService&lt;/code&gt; and &lt;code&gt;org.eclipse.ui.menus.AbstractContributionFactory&lt;/code&gt;, but should be sure to remove them if the plugin is unloaded. The &lt;code&gt;IMenuService&lt;/code&gt; can be retrieved through any of the &lt;code&gt;IServiceLocators&lt;/code&gt;, the workbench, the workbench window, or the part site.
&lt;/p&gt;
&lt;p&gt;
See &lt;a href=&quot;org_eclipse_ui_commands.html&quot;&gt;org.eclipse.ui.commands&lt;/a&gt; to define a command and &lt;a href=&quot;org_eclipse_ui_handlers.html&quot;&gt;org.eclipse.ui.handlers&lt;/a&gt; to define an implementation for the command.
&lt;/p&gt;
&lt;p&gt;To register a context menu, use the &lt;code&gt;IWorkbenchPartSite.registerContextMenu&lt;/code&gt; methods.&lt;/p&gt;
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="copyright"/>
</appinfo>
<documentation>
Copyright (c) 2005,2007 IBM Corporation and others.&lt;br&gt;
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 &lt;a
href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
</documentation>
</annotation>
</schema>