<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="org.eclipse.ui">
<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 define menus, separators, logical groups and menu items -- appearing anywhere within the application, from status lines to context menus.  It also allows sets of such contributions to be defined (i.e., action sets); these action sets can be turned on or off by the end user.  In brief, the menus extension point contains all of the presentation elements (except the icons) for contributing to any menu or trim area in Eclipse.
&lt;/p&gt;
&lt;p&gt;
Every element within this extension point is given a unique identifier.  This is so that these elements can be referred to elsewhere without having to restate the element.  For example, the identifier might be required for ordering or for defining an action set.  Also, this allows third-party plug-in developers to place these elements in new locations within the interface, as appropriate.
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;NOTE: For 3.2 the only part of this extension mechanism that has been implemented is that part associated with &apos;trim&apos; contributions. Attempting to add items, menus, toolbars or status line entries will act as a NO-OP.
&lt;/b&gt;&lt;/p&gt;
      </documentation>
   </annotation>

   <include schemaLocation="schema://org.eclipse.core.expressions/schema/expressionLanguage.exsd"/>

   <element name="extension">
      <complexType>
         <sequence>
            <element ref="item" minOccurs="0" maxOccurs="unbounded"/>
            <element ref="menu" minOccurs="0" maxOccurs="unbounded"/>
            <element ref="group" minOccurs="0" maxOccurs="unbounded"/>
            <element ref="widget" 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="item">
      <annotation>
         <documentation>
            &lt;p&gt;
An item could be a menu item or a trim item, depending on where it is placed.  The text and image associated with the item will be drawn from the command.
&lt;/p&gt;
         </documentation>
      </annotation>
      <complexType>
         <sequence>
            <element ref="parameter" minOccurs="0" maxOccurs="unbounded"/>
            <element ref="location" minOccurs="0" maxOccurs="unbounded"/>
            <element ref="visibleWhen" minOccurs="0" maxOccurs="1"/>
         </sequence>
         <attribute name="id" type="string" use="required">
            <annotation>
               <documentation>
                  A unique identifier for this item.  It is recommended that the identifier be prefixed by the plug-in name, to guarantee uniqueness.  For example, an item contributed by &lt;code&gt;org.eclipse.ui&lt;/code&gt; might be called &lt;code&gt;org.eclipse.ui.item1&lt;/code&gt;.
               </documentation>
            </annotation>
         </attribute>
         <attribute name="commandId" type="string" use="required">
            <annotation>
               <documentation>
                  The identifier of the command that should be executed when this item is triggered by the user.  Commands are defined in the &lt;a href=&quot;org_eclipse_ui_commands.html&quot;&gt;commands extension point&lt;/a&gt;.
               </documentation>
            </annotation>
         </attribute>
         <attribute name="menuId" type="string">
            <annotation>
               <documentation>
                  Attaches a drop-down menu to a tool item.  If this item appears somewhere other than a tool bar, then a warning will be printed to the log on start-up.
               </documentation>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="menu">
      <annotation>
         <appInfo>
            <meta.element labelAttribute="label"/>
         </appInfo>
         <documentation>
            &lt;p&gt;
A menu can appear either attached to a tool item, or somewhere within a view menu, context menu or the top-level menu bar.  For free, the plug-in developer can assume that there is a menu and tool bar for every view, and that the top-level menu bar exists.  Context menus must be registered programmatically before they can be used (see API Information).
&lt;/p&gt;
&lt;p&gt;
A menu can only contain groups.
&lt;/p&gt;
         </documentation>
      </annotation>
      <complexType>
         <sequence>
            <element ref="location" minOccurs="0" maxOccurs="unbounded"/>
            <element ref="visibleWhen" minOccurs="0" maxOccurs="1"/>
         </sequence>
         <attribute name="id" type="string" use="required">
            <annotation>
               <documentation>
                  A unique identifier for this menu.  It is recommended that the identifier be prefixed by the plug-in name, to guarantee uniqueness.  For example, a menu contributed by &lt;code&gt;org.eclipse.ui&lt;/code&gt; might be called &lt;code&gt;org.eclipse.ui.menu1&lt;/code&gt;.
               </documentation>
            </annotation>
         </attribute>
         <attribute name="label" type="string">
            <annotation>
               <documentation>
                  The human-readable text to associate with this menu.
               </documentation>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="group">
      <annotation>
         <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;
         </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>
         <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.  Unfortunately, this means that 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;  This also will cause problems for things like macro support, scripting and pretty much any other command-based mechanism.
            When used as trim the widget will only cause the plug-in to load when it becomes visible in the UI.
         </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;.
               </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.  This class must implement &lt;code&gt;IWorkbenchWidget&lt;/code&gt;. Clients may choose to use the default implementation; &lt;code&gt;AbstractWorkbenchTrimWidget&lt;/code&gt;. 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>
         <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>
         <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.
         </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"/>
               </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>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="bar">
      <annotation>
         <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>
                  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;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;cmd1&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;cmd2&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>
            </annotation>
            <simpleType>
               <restriction base="string">
                  <enumeration value="menu">
                  </enumeration>
                  <enumeration value="trim">
                  </enumeration>
               </restriction>
            </simpleType>
         </attribute>
         <attribute name="path" type="string">
            <annotation>
               <documentation>
                  The path from the root of the bar, including menus and groups.  This path uses &lt;code&gt;&apos;/&apos;&lt;/code&gt; as a separator character.
               </documentation>
            </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>
            Controls the visibility of the given element.
         </documentation>
      </annotation>
      <complexType>
         <choice>
            <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"/>
         </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>
         <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;
         </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>
            </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>
         <documentation>
            Controls the position of a menu, group, item or widget within a particular location.
         </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>
         <documentation>
            Part of a location.  It indicates that the menu, group, item or widget should appear in the popup menu.
         </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>

   <annotation>
      <appInfo>
         <meta.section type="since"/>
      </appInfo>
      <documentation>
         3.2
      </documentation>
   </annotation>

   <annotation>
      <appInfo>
         <meta.section type="examples"/>
      </appInfo>
      <documentation>
         &lt;p&gt;
A basic menu definition looks like this.
&lt;/p&gt;
&lt;pre&gt;
&lt;menu
 id=&quot;com.mycompany.myplugin.projection&quot;
 label=&quot;%Folding.label&quot;&gt;
 &lt;location mnemonic=&quot;%Folding.label.mnemonic&quot;&gt;
  &lt;part id=&quot;AntEditor&quot;&gt;
   &lt;popup id=&quot;#RulerContext&quot; path=&quot;rest&quot; /&gt;
  &lt;/part&gt;
 &lt;/location&gt;
&lt;/menu&gt;
&lt;/pre&gt;
&lt;p&gt;
In this example, the plug-in developer is contributing to all parts who subclass or implement the given type.  This allows, for example, for some contributions to be added to all text editors.
&lt;/p&gt;
&lt;pre&gt;
&lt;menu
 id=&quot;com.mycompany.myplugin.textEditorMenu&quot;
 label=&quot;Text Commands&quot;&gt;
 &lt;location mnemonic=&quot;X&quot;&gt;
  &lt;part class=&quot;AbstractTextEditor&quot;&gt;
   &lt;popup id=&quot;#RulerContext&quot; path=&quot;rest&quot; /&gt;
  &lt;/part&gt;
 &lt;/location&gt;
&lt;/menu&gt;
&lt;/pre&gt;
&lt;p&gt;
It is possible to associate help with a menu.
&lt;/p&gt;
&lt;pre&gt;
&lt;menu
 id=&quot;com.mycompany.myplugin.RunWithConfigurationAction&quot;
 label=&quot;Run With Configuration&quot;
 helpContextId=&quot;run_with_configuration_context&quot;&gt;
 &lt;location&gt;
  &lt;bar /&gt;
 &lt;/location&gt;
&lt;/menu&gt;
&lt;/pre&gt;
&lt;p&gt;
Within a menu, it is possible to define logical groups.  These logical groups 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;pre&gt;
&lt;group id=&quot;com.mycompany.myplugin.stepGroup&quot;&gt;
 &lt;location&gt;
  &lt;bar path=&quot;org.eclipse.ui.run&quot; /&gt;
 &lt;/location&gt;
&lt;/group&gt;
&lt;group
 id=&quot;com.mycompany.myplugin.stepIntoGroup&quot;
 separatorsVisible=&quot;false&quot; &gt;
 &lt;location&gt;
  &lt;bar path=&quot;org.eclipse.ui.run&quot; /&gt;
 &lt;/location&gt;
&lt;/group&gt;
&lt;/pre&gt;
&lt;p&gt;
It is possible to place menus, group, items and widgets in multiple locations.
&lt;/p&gt;
&lt;pre&gt;
&lt;item
 id=&quot;com.mycompany.myplugin.ToggleStepFilters&quot;
 commandId=&quot;com.mycompany.myplugin.ToggleStepFilters&quot;&gt;
 &lt;location mnemonic=&quot;%mnemonic&quot;&gt;
  &lt;bar path=&quot;org.eclipse.ui.run/emptyStepGroup&quot; /&gt;
 &lt;/location&gt;
 &lt;location&gt;
  &lt;part id=&quot;org.eclipse.debug.ui.DebugView&quot;&gt;
   &lt;bar type=&quot;trim&quot; path=&quot;renderGroup&quot; /&gt;
  &lt;/part&gt;
 &lt;/location&gt;
 &lt;location mnemonic=&quot;%mnemonic&quot;&gt;
  &lt;part id=&quot;org.eclipse.debug.ui.DebugView&quot;&gt;
   &lt;popup path=&quot;renderGroup&quot; /&gt;
  &lt;/part&gt;
 &lt;/location&gt;
&lt;/item&gt;
&lt;/pre&gt;
&lt;p&gt;
If the popup element is specified with no id and no parent part element, then it applies to any context menu registered with the workbench.  This is similar to the behaviour of the old object contributions.  Similarly, a top-level popup element with an id will affect any context menu registered with the given name.
&lt;/p&gt;
&lt;pre&gt;
&lt;item
 id=&quot;com.mycompany.myplugin.ObjectContribution&quot;
 commandId=&quot;com.mycompany.myplugin.ObjectContribution&quot;&gt;
 &lt;location&gt;
  &lt;popup path=&quot;additions&quot; /&gt;
 &lt;/location&gt;
&lt;/item&gt;
&lt;/pre&gt;
&lt;p&gt;
Sometimes, you might want to control the visibility of an item.  While normally it is preferrable to maintain stability in the layout of menus and tool bars, it is sometimes desirable to hide items that aren&apos;t immediately relevent.  This is particularly true on context menus, where space is limited.  In this case, you would define a &lt;code&gt;visibleWhen&lt;/code&gt; element.  This element is almost identical to the &lt;code&gt;activeWhen&lt;/code&gt; and &lt;code&gt;enabledWhen&lt;/code&gt; elements defined in the &lt;a href=&quot;org_eclipse_ui_handlers.html&quot;&gt;handlers extension point&lt;/a&gt;.
&lt;/p&gt;
&lt;pre&gt;
&lt;item
 id=&quot;com.mycompany.myplugin.ConvertToWatchExpression&quot;
 commandId=&quot;com.mycompany.myplugin.ConvertToWatchExpression&quot;&gt;
 &lt;location mnemonic=&quot;%mnemonic&quot;&gt;
  &lt;part id=&quot;org.eclipse.debug.ui.DebugView&quot;&gt;
   &lt;popup path=&quot;additions&quot; /&gt;
  &lt;/part&gt;
 &lt;/location&gt;
 &lt;visibleWhen&gt;
  &lt;with variable=&quot;selection&quot;&gt;
   &lt;iterate operator=&quot;and&quot;&gt;
    &lt;not&gt;
     &lt;instanceof value=&quot;IWatchExpression&quot;/&gt;
    &lt;/not&gt;
    &lt;instanceof value=&quot;IExpression&quot; /&gt;
   &lt;/iterate&gt;
  &lt;/with&gt;
 &lt;/visibleWhen&gt;
&lt;/item&gt;
&lt;/pre&gt;
&lt;p&gt;
The most common case is simply to make something visible when its handler is enabled.  This is handled with some syntactic sugar.  There is a &lt;code&gt;checkEnabled&lt;/code&gt; attribute on the &lt;code&gt;visibleWhen&lt;/code&gt; element.
&lt;/p&gt;
&lt;pre&gt;
&lt;item
 id=&quot;com.mycompany.myplugin.compareWithPatch&quot;
 commandId=&quot;com.mycompany.myplugin.compareWithPatch&quot;&gt;
 &lt;location mnemonic=&quot;%mnemonic&quot;&gt;
  &lt;part id=&quot;MyPart&quot;&gt;
   &lt;popup path=&quot;additions&quot; /&gt;
  &lt;/part&gt;
 &lt;/location&gt;
 &lt;visibleWhen checkEnabled=&quot;true&quot; /&gt;
&lt;/item&gt;
&lt;/pre&gt;
&lt;p&gt;
Any item associated with a command can include parameter values.  If the parameter of the given identifier is not defined, this is an error.  If the item does not have a command, then this is also an error.
&lt;/p&gt;
&lt;pre&gt;
&lt;item
 id=&quot;com.mycompany.myplugin.RunHistory&quot;
 commandId=&quot;com.mycompany.myplugin.RunHistory&quot;&gt;
 &lt;location&gt;
  &lt;bar path=&quot;org.eclipse.ui.run&quot; /&gt;
 &lt;/location&gt;
 &lt;parameter name=&quot;index&quot; value=&quot;1&quot; /&gt;
&lt;/item&gt;
&lt;/pre&gt;
&lt;p&gt;
It also possible to specify relative ordering.  This is done using the order attribute on the location element.  The order attribute accepts the following values: &lt;code&gt;start&lt;/code&gt; (put the element at the beginning of the container); end (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;pre&gt;
&lt;item
 id=&quot;com.mycompany.myplugin.MyFirstItem&quot;
 commandId=&quot;com.mycompany.myplugin.MyFirstCommand&quot;&gt;
 &lt;location&gt;
  &lt;order position=&quot;start&quot; /&gt;
  &lt;bar path=&quot;org.eclipse.ui.run&quot; /&gt;
 &lt;/location&gt;
&lt;/item&gt;
&lt;item
 id=&quot;com.mycompany.myplugin.MySecondItem&quot;
 commandId=&quot;com.mycompany.myplugin.MySecondCommand&quot;&gt;
 &lt;location&gt;
  &lt;order position=&quot;after&quot; relativeTo=&quot;com.mycompany.myplugin.MyFirstItem&quot; /&gt;
  &lt;bar path=&quot;org.eclipse.ui.run&quot; /&gt;
 &lt;/location&gt;
&lt;/item&gt;
&lt;/pre&gt;
&lt;p&gt;
If you require direct access to the widgets (e.g., for rendering a combo box), then you can use a &lt;code&gt;widget&lt;/code&gt; element.  Unfortunately, this means that if a widget element becomes visible in the user interface, this will lead to plug-in loading.
&lt;/p&gt;
&lt;pre&gt;
&lt;widget
 id=&quot;com.mycompany.myplugin.MyComboBoxSimple&quot;
 class=&quot;com.mycompany.myplugin.MyComboBox&quot;&gt;
 &lt;location&gt;
  &lt;bar type=&quot;trim&quot; path=&quot;myGroup&quot; /&gt;
 &lt;/location&gt;
&lt;/widget&gt;
&lt;widget
 id=&quot;com.mycompany.myplugin.MyComboBoxParameterized1&quot;
 class=&quot;com.mycompany.myplugin.MyComboBox:a,b,c&quot;&gt;
 &lt;location&gt;
  &lt;bar type=&quot;trim&quot; path=&quot;myGroup&quot; /&gt;
 &lt;/location&gt;
&lt;/widget&gt;
&lt;widget
 id=&quot;com.mycompany.myplugin.MyComboBoxParameterized2&quot;&gt;
 &lt;class class=&quot;com.mycompany.myplugin.MyComboBox&quot;&gt;
  &lt;parameter name=&quot;list&quot; value=&quot;a,b,c&quot; /&gt;
  &lt;parameter name=&quot;selected&quot; value=&quot;c&quot; /&gt;
  &lt;parameter name=&quot;editable&quot; value=&quot;false&quot; /&gt;
 &lt;/class&gt;
 &lt;location&gt;
  &lt;bar type=&quot;trim&quot; path=&quot;myGroup&quot; /&gt;
 &lt;/location&gt;
&lt;/widget&gt;
&lt;/pre&gt;
&lt;p&gt;
You can also use widgets to contribute into the workbench trim. The following example defines a new &apos;HeapStatus&apos; widget that should be placed, by default, immediately after the status line trim (i.e. at the bottom of the workbench window). See the description fo the &apos;bar&apos; element for more information on the pre-defined groups.
&lt;/p&gt;
&lt;p&gt;
Note that trim &apos;groups&apos; can be re-located to the other trim areas. The location information&apos;s &lt;code&gt;relativeTo&lt;/code&gt; will presume that the group that is referenced is in its default position when determining the new trim&apos;s location. In general it is expected that contributors of this type will create their own group to host the new widget, allowing that trim element to be relocated independently of the other trim elements. One notable exception to this is the &apos;status&apos; group.
&lt;/p&gt;
&lt;pre&gt;
   &lt;extension
         point=&quot;org.eclipse.ui.menus&quot;&gt;
      &lt;group
            id=&quot;TestTrimAPI.heapStatusGroup&quot;
            separatorsVisible=&quot;true&quot;&gt;
         &lt;location&gt;
            &lt;bar type=&quot;trim&quot;/&gt;
            &lt;order position=&quot;after&quot; relativeTo=&quot;status&quot;/&gt;
         &lt;/location&gt;
      &lt;/group&gt;
      &lt;widget class=&quot;HeapStatusWidget&quot; id=&quot;TestTrimAPI.HeapStatus&quot;&gt;
         &lt;location&gt;
            &lt;bar path=&quot;heapStatusGroup&quot; type=&quot;trim&quot;/&gt;
         &lt;/location&gt;
         &lt;layout fillMajor=&quot;false&quot; fillMinor=&quot;true&quot;/&gt;
      &lt;/widget&gt;
   &lt;/extension&gt;
&lt;/pre&gt;
      </documentation>
   </annotation>

   <annotation>
      <appInfo>
         <meta.section type="apiInfo"/>
      </appInfo>
      <documentation>
         To register a context menu, use the &lt;code&gt;IWorkbenchPartSite.registerContextMenu&lt;/code&gt; methods.
      </documentation>
   </annotation>

   <annotation>
      <appInfo>
         <meta.section type="implementation"/>
      </appInfo>
      <documentation>
         
      </documentation>
   </annotation>

   <annotation>
      <appInfo>
         <meta.section type="copyright"/>
      </appInfo>
      <documentation>
         Copyright (c) 2005 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>
