Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Table of WTP IDs"
(→Introduction) |
(→Menus) |
||
Line 12: | Line 12: | ||
In addition, controlling when a menu or command is available can be implemented with [[Command Core Expressions]]. | In addition, controlling when a menu or command is available can be implemented with [[Command Core Expressions]]. | ||
+ | |||
+ | org.eclipse.search.menu | ||
+ | |||
+ | <table border="1"> | ||
+ | <caption>Common Eclipse Menu Ids</caption> | ||
+ | <tr> | ||
+ | <td><b>Id</b></td> | ||
+ | <td><b>Name</b></td> | ||
+ | <td><b>Location</b></td> | ||
+ | <td><b>Type</b></td> | ||
+ | <td><b>Description</b></td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>file</td> | ||
+ | <td>File</td> | ||
+ | <td>platform</td> | ||
+ | <td>Main Menu</td> | ||
+ | <td>Standard platform File Menu</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>edit</td> | ||
+ | <td>Edit</td> | ||
+ | <td>platform</td> | ||
+ | <td>Main Menu</td> | ||
+ | <td>Standard Edit Menu</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>window</td> | ||
+ | <td>Window</td> | ||
+ | <td>platform</td> | ||
+ | <td>Main Menu</td> | ||
+ | <td>Standard Window Menu</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>help</td> | ||
+ | <td>Help</td> | ||
+ | <td>platform</td> | ||
+ | <td>Main Menu</td> | ||
+ | <td>Standard Help Menu</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>org.eclipse.search.menu</td> | ||
+ | <td>Search</td> | ||
+ | <td>platform</td> | ||
+ | <td>Main Menu</td> | ||
+ | <td>Standard search menu</td> | ||
+ | </tr> | ||
+ | |||
+ | </table> | ||
<table border="1"> | <table border="1"> |
Revision as of 18:15, 18 December 2007
Contents
Introduction
There are a vast number of ids that are used within the WTP. Every command, content-type, action, menu, etc has an id that is associated with it. This page will try to keep up to date with the various ids, where they can be found, and what they correspond too.
It is important to document the usage of the ids, especially when they relate to menus, toolbars, commands, and popus as the org.eclipse.ui.menus extension point allows for other plugins to contribute to menus based off the ids that are published. Commands are also referenced by id, and are implemented based on handlers.
Eclipse 3.3 introduced the org.eclipse.ui.menus extension point, this is to eventually replace the 4 contribution points that exist currently for creating menus. A detailed mapping can be found at Menus Extension Mapping. Paul Webster has created a good overview of the new org.eclipse.ui.menus extension point in his blog.
The Platform Command Framework contains information on how to debug handlers and commands that aren't working.
Menus
The org.eclipse.ui.menus extension point allows for the definition of menus that other plugins can contribute too. See Menu Contributions and Basic Workbench Extensions using Commands for more information specifically for working with org.eclipse.ui.menus, org.eclipse.ui.commands, and org.eclipse.ui.handlers (Platform Command Framework).
In addition, controlling when a menu or command is available can be implemented with Command Core Expressions.
org.eclipse.search.menu
Id | Name | Location | Type | Description |
file | File | platform | Main Menu | Standard platform File Menu |
edit | Edit | platform | Main Menu | Standard Edit Menu |
window | Window | platform | Main Menu | Standard Window Menu |
help | Help | platform | Main Menu | Standard Help Menu |
org.eclipse.search.menu | Search | platform | Main Menu | Standard search menu |
Id | Name | Location | Type | Description |
sourceMenuId | Source | SSE.ui/plugin.xml | Main Menu | A general source main menu that can be contributed to from other plug-ins. |
Commands
Commands are implemented and tied to menus using handlers. They can also be tied to actionSets and have actionDelegates. If implemented using handlers, a command may have zero to many handlers, but only zero to one may be active at any given point in time. Handlers can be specified using either the org.eclipse.ui.handlers extension point or programmatically.
Id | Category Id | Menu/Toolbar | Location | Description |
org.eclipse.wst.sse.ui.structure.select.enclosing | org.eclipse.ui.category.edit | Edit | SSE.ui/plugin.xml | Select Enclosing |
org.eclipse.wst.sse.ui.structure.select.next | org.eclipse.ui.category.edit | Edit | SSE.ui/plugin.xml | Select Next |
org.eclipse.wst.sse.ui.structure.select.previous | org.eclipse.ui.category.edit | Edit | SSE.ui/plugin.xml | Select Previous |
org.eclipse.wst.sse.ui.structure.select.last | org.eclipse.ui.category.edit | Edit | SSE.ui/plugin.xml | Select Last |
org.eclipse.wst.sse.ui.toggle.comment | org.eclipse.ui.category.edit | Source | SSE.ui/plugin.xml | Toggle Comment |
org.eclipse.wst.sse.ui.add.block.comment | org.eclipse.ui.category.edit | Source | SSE.ui/plugin.xml | Add Block Comment |
org.eclipse.wst.sse.ui.remove.block.comment | org.eclipse.ui.category.edit | Source | SSE.ui/plugin.xml | Remove Block Comment |
org.eclipse.wst.sse.ui.cleanup.document | org.eclipse.ui.category.edit | Source | SSE.ui/plugin.xml | Cleanup Document |
org.eclipse.wst.sse.ui.format.document | org.eclipse.ui.category.edit | Source | SSE.ui/plugin.xml | Format Document |
org.eclipse.wst.sse.ui.format.active.elements | org.eclipse.ui.category.edit | Source | SSE.ui/plugin.xml | Format Active Elements |
org.eclipse.wst.sse.ui.open.file.from.source | org.eclipse.ui.category.edit | Navigate | SSE.ui/plugin.xml | Open File From Source |
org.eclipse.wst.sse.ui.search.find.occurrences | org.eclipse.ui.category.edit | Source | SSE.ui/plugin.xml | Find Occurrences |
Context IDs
Used to indicate when particular contexts are active.
Id | Name | Location | Type | Description |
org.eclipse.wst.sse.ui.structuredTextEditorScope | Editing in Structured Text Editors | SSE.ui/plugin.xml | Context | <Context for when the Structured Text Editor is being used as one of the editors. Commands should use this to determine when they are active, enabled, and/or visible on a menu or toolbar. |
Core Command Expressions
Commands, Handlers, and Menu contributions are all driven by Core Command Expressions. These allow for control of when a particular command is available in a menu, when it is active, and when it is enabled. The following are some brief examples for controlling when commands are made available based on the type of variable involved.
activeContexts
The activeContexts variable returns a list of all the activeContextsIDs
<menuContribution locationURI="menu:sourceMenuId?after=additions"> <command commandId="org.eclipse.wst.xml.ui.command1" id="Test" style="push"> <visibleWhen checkEnabled="false"> <with variable="activeContexts"> <iterate operator="or"> <equals value="org.eclipse.wst.sse.ui.structuredTextEditorScope"/> </iterate> </with> </visibleWhen> </command> </menuContribution>
This will only enable the command, when the org.eclipse.wst.sse.ui.structuredTextEditorScope is one of the active contexts. Otherwise, the command will not be shown in the menu.