Skip to content

Commit bc46354

Browse files
committed
Improve org.eclipse.ui.menus extension point documentation
Fixes a typo and improves formatting in locationURI documentation for menuContribution elements.
1 parent 6963b1a commit bc46354

File tree

1 file changed

+24
-22
lines changed

1 file changed

+24
-22
lines changed

bundles/org.eclipse.ui/schema/menus.exsd

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -527,12 +527,14 @@ This should be the starting point for <i>all</i> contributions into
527527
A <code>URI</code> specification that defines the insertion point at which the contained additions will be added.
528528

529529
The format for the URI is comprised of three basic parts:
530-
531-
Scheme: One of "menu", "popup" or "toolbar. Indicates the type of the manager used to handle the contributions
532-
Id: This is either the id of an existing menu, a view id or the id of the editor 'type'
533-
Query: The query format is <placement>=<id> where:
534-
<placement> is either "before", "after", or "endof" and
535-
<id> is the id of an existing menu item. The placement modifier is executed when this contribution is processed. Following contributions may change the final shape of the menu when they are processed.
530+
<ul>
531+
<li>Scheme: One of "menu", "popup" or "toolbar". Indicates the type of the manager used to handle the contributions</li>
532+
<li>Id: This is either the id of an existing menu, a view id or the id of the editor 'type'</li>
533+
<li>Query: The query format is <placement>=<id> where <placement> is either "before", "after", or "endof" and <id> is the id of an existing menu item.</li>
534+
</ul>
535+
<p>
536+
The placement modifier is executed when this contribution is processed. Following contributions may change the final shape of the menu when they are processed.
537+
</p>
536538
</documentation>
537539
</annotation>
538540
</attribute>
@@ -917,22 +919,6 @@ If defined then it can be used as a reference in the Query part of the location
917919
</complexType>
918920
</element>
919921

920-
<annotation>
921-
<appInfo>
922-
<meta.section type="apiInfo"/>
923-
</appInfo>
924-
<documentation>
925-
&lt;p&gt;
926-
It is preferred that menu contributions be added in the &lt;code&gt;plugin.xml&lt;/code&gt;. Plugins can
927-
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.
928-
&lt;/p&gt;
929-
&lt;p&gt;
930-
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.
931-
&lt;/p&gt;
932-
&lt;p&gt;To register a context menu, use the &lt;code&gt;IWorkbenchPartSite.registerContextMenu&lt;/code&gt; methods.&lt;/p&gt;
933-
</documentation>
934-
</annotation>
935-
936922
<annotation>
937923
<appInfo>
938924
<meta.section type="since"/>
@@ -972,6 +958,22 @@ This is the simplest example; adding a command contribution after an existing me
972958
</documentation>
973959
</annotation>
974960

961+
<annotation>
962+
<appInfo>
963+
<meta.section type="apiInfo"/>
964+
</appInfo>
965+
<documentation>
966+
&lt;p&gt;
967+
It is preferred that menu contributions be added in the &lt;code&gt;plugin.xml&lt;/code&gt;. Plugins can
968+
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.
969+
&lt;/p&gt;
970+
&lt;p&gt;
971+
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.
972+
&lt;/p&gt;
973+
&lt;p&gt;To register a context menu, use the &lt;code&gt;IWorkbenchPartSite.registerContextMenu&lt;/code&gt; methods.&lt;/p&gt;
974+
</documentation>
975+
</annotation>
976+
975977

976978
<annotation>
977979
<appInfo>

0 commit comments

Comments
 (0)