| <?xml version='1.0' encoding='UTF-8'?> |
| <!-- Schema file written by PDE --> |
| <schema targetNamespace="org.eclipse.ui.navigator"> |
| <annotation> |
| <appInfo> |
| <meta.schema plugin="org.eclipse.ui.navigator" id="viewer" name="Common Viewer Configuration"/> |
| </appInfo> |
| <documentation> |
| <p> |
| The 'viewer' element defines the configuration for a common viewer. The extension |
| may provide a custom popup menu id, override whether the viewer provides link with |
| editor support, provides a filter dialog, and/or provides an 'available extensions' |
| dialog. In addition, nested configuration elements give full control over the structure |
| and behavior of the popup context menu. |
| <p> |
| 'viewerContentBinding' binds defined content extensions (through the navigatorContent |
| extension point) to viewers (defined through the |
| org.eclipse.ui.views extension point). Any content |
| extension bound to a viewer is described as 'visible'. A |
| content service (org.eclipse.ui.navigator.INavigatorContentService) |
| will not return any extensions which are not visible for |
| its viewer id. |
| <p> |
| <strong>EXPERIMENTAL</strong>. This class or interface has been added as |
| part of a work in progress. There is a guarantee neither that this API will |
| work nor that it will remain the same. Please do not use this API without |
| consulting with the Platform/UI team. |
| </documentation> |
| </annotation> |
| |
| <element name="extension"> |
| <complexType> |
| <sequence> |
| <element ref="viewer" minOccurs="0" maxOccurs="unbounded"/> |
| <element ref="viewerContentBinding" minOccurs="0" maxOccurs="unbounded"/> |
| <element ref="viewerActionBinding" minOccurs="0" maxOccurs="unbounded"/> |
| </sequence> |
| <attribute name="point" type="string" use="required"> |
| <annotation> |
| <documentation> |
| |
| </documentation> |
| </annotation> |
| </attribute> |
| <attribute name="id" type="string"> |
| <annotation> |
| <documentation> |
| |
| </documentation> |
| </annotation> |
| </attribute> |
| <attribute name="name" type="string"> |
| <annotation> |
| <documentation> |
| |
| </documentation> |
| <appInfo> |
| <meta.attribute translatable="true"/> |
| </appInfo> |
| </annotation> |
| </attribute> |
| </complexType> |
| </element> |
| |
| <element name="viewer"> |
| <annotation> |
| <appInfo> |
| <meta.element labelAttribute="id"/> |
| </appInfo> |
| <documentation> |
| Provides basic configuration to establish the characteristics |
| of a viewer. Clients must also define an org.eclipse.ui.views |
| extension to create the view part. |
| </documentation> |
| </annotation> |
| <complexType> |
| <sequence> |
| <element ref="popupMenu" minOccurs="0" maxOccurs="1"/> |
| </sequence> |
| <attribute name="viewerId" type="string" use="required"> |
| <annotation> |
| <documentation> |
| The id that matches the id provides in an org.eclipse.ui.views extension. |
| </documentation> |
| </annotation> |
| </attribute> |
| <attribute name="popupMenuId" type="string"> |
| <annotation> |
| <documentation> |
| The popupMenuId of the defined viewer. If not specified, the popupMenuId defaults to the id of the viewer. Clients may specify |
| only the popupMenuId OR a popupMenu element, but not both. The default list of insertion points is declared in the documentation for the popupMenu element. |
| </documentation> |
| </annotation> |
| </attribute> |
| </complexType> |
| </element> |
| |
| <element name="viewerContentBinding"> |
| <annotation> |
| <documentation> |
| Clients must define one or more 'viwerContentBinding' elements to describe which content extensions are 'visible' to the viewer. A content extension is 'visible' if the id of the content extension matches an 'includes' statement under a viewerContentBinding and is not excluded by an 'excludes' statement. If a content extension is not 'visible' to a viewer, then the extension will never be asked for content by a content service for that viewer. |
| <p> |
| Clients may define an 'includes' element to select which extensions are visible to the viewer, and similarly an 'excludes' element for extensions that should not be made visible to the viewer. Clients may further define the extensions that should be explicitly queried for root elements (through ITreeContentProvider.getElements()) by the 'isRoot' attribute. If one or more 'contentExtension' elements have 'isRoot' set to true within the 'includes' statement, only those extensions will be queried for root elements. The 'isRoot' attribute has no effect for exclusions. |
| <p> |
| A viewer may have multiple viewerContentBindings defined, and their includes/excludes statements will be aggregated to produce the final behavior. |
| </documentation> |
| </annotation> |
| <complexType> |
| <sequence> |
| <element ref="includes" minOccurs="0" maxOccurs="1"/> |
| <element ref="excludes" minOccurs="0" maxOccurs="1"/> |
| </sequence> |
| <attribute name="viewerId" type="string" use="required"> |
| <annotation> |
| <documentation> |
| There should be a corresponding org.eclipse.ui.views extension that corresponds to this Id. That extension should specify an instance of org.eclipse.ui.navigator.CommonNavigator. |
| </documentation> |
| </annotation> |
| </attribute> |
| </complexType> |
| </element> |
| |
| <element name="viewerActionBinding"> |
| <annotation> |
| <documentation> |
| Clients must define which action providers are visible to their viewer. Clients may define an 'includes' element to select which extensions are visible to the viewer, and similarly an 'excludes' element for extensions that should not be made visible to the viewer. |
| <p> |
| A viewer may have multiple viewerActionBindings defined, and their includes/excludes statements will be aggregated to produce the final behavior. |
| <p> |
| For 'actionProvider' definitions which are not nested under a 'navigatorContent' definition, clients may specify a custom id. If clients do not specify an id, the id defaults to 'org.eclipse.ui.navigator.actionProvider'. For clients that wish to pick up actionProviders with no specific id, clients must define a 'viewerActionBinding' for the default id. See the examples section for how this is done. |
| </documentation> |
| </annotation> |
| <complexType> |
| <sequence> |
| <element ref="includes" minOccurs="0" maxOccurs="1"/> |
| <element ref="excludes" minOccurs="0" maxOccurs="1"/> |
| </sequence> |
| <attribute name="viewerId" type="string" use="required"> |
| <annotation> |
| <documentation> |
| There should be a corresponding org.eclipse.ui.views extension that corresponds to this Id. That extension should specify an instance of org.eclipse.ui.navigator.CommonNavigator. |
| </documentation> |
| </annotation> |
| </attribute> |
| </complexType> |
| </element> |
| |
| <element name="includes"> |
| <annotation> |
| <documentation> |
| Define a set of patterns that should be included when looking for content extensions for the viewer that matches the viewerId attribute. When the includes and excludes statements intersect, the includes statement will be given precedence. |
| </documentation> |
| </annotation> |
| <complexType> |
| <choice> |
| <sequence> |
| <element ref="contentExtension" minOccurs="1" maxOccurs="unbounded"/> |
| </sequence> |
| <sequence> |
| <element ref="actionExtension" minOccurs="1" maxOccurs="unbounded"/> |
| </sequence> |
| </choice> |
| </complexType> |
| </element> |
| |
| <element name="excludes"> |
| <annotation> |
| <documentation> |
| Define a set of patterns that should be excluded when looking for content extensions for the viewer that matches the viewerId attribute. When the includes and excludes statements intersect, the includes statement will be given precedence. |
| </documentation> |
| </annotation> |
| <complexType> |
| <choice> |
| <sequence> |
| <element ref="contentExtension" minOccurs="1" maxOccurs="unbounded"/> |
| </sequence> |
| <sequence> |
| <element ref="actionExtension" minOccurs="1" maxOccurs="unbounded"/> |
| </sequence> |
| </choice> |
| </complexType> |
| </element> |
| |
| <element name="contentExtension"> |
| <annotation> |
| <documentation> |
| Indicates that the content extension should be queried by getElements() or getChildren() |
| for the root of the viewer. |
| <p> |
| Clients may specify 'isRoot' to select specific root extensions to override |
| the extensions which would otherwise be enabled for the viewer input element |
| (based on the matching 'triggerPoints' expression for the viewer input element). |
| <p> |
| See the documentation for 'viewerContentBinding' for more information. |
| </documentation> |
| </annotation> |
| <complexType> |
| <attribute name="pattern" type="string" use="required"> |
| <annotation> |
| <documentation> |
| Content extensions may be selected exactly by using their content extension id. Clients may also use a regular expression pattern to select any content extensions that have ids that match the pattern. |
| <p> |
| Patterns are regular expressions which match unique identifiers. Please see the Java(tm) Platform documentation for java.util.regex.Pattern for further details. |
| </documentation> |
| </annotation> |
| </attribute> |
| <attribute name="isRoot" type="boolean"> |
| <annotation> |
| <documentation> |
| A value of true indicates the content extension will provide root content, and override the default triggerPoints expressions defined in the bound content extensions for a given viewer. |
| </documentation> |
| </annotation> |
| </attribute> |
| </complexType> |
| </element> |
| |
| <element name="actionExtension"> |
| <annotation> |
| <documentation> |
| Indicates that the action extension that should be given opportunities |
| to contribute to the context menu and action bars. |
| <p> |
| See the documentation for 'viewerActionBinding' for more information. |
| </documentation> |
| </annotation> |
| <complexType> |
| <attribute name="pattern" type="string" use="required"> |
| <annotation> |
| <documentation> |
| Content extensions may be selected exactly by using their content extension id. Clients may also use a regular expression pattern to select any content extensions that have ids that match the pattern. |
| <p> |
| Patterns are regular expressions which match unique identifiers. Please see the Java(tm) Platform documentation for java.util.regex.Pattern for further details. |
| </documentation> |
| </annotation> |
| </attribute> |
| </complexType> |
| </element> |
| |
| <element name="popupMenu"> |
| <annotation> |
| <appInfo> |
| <meta.element labelAttribute="id"/> |
| </appInfo> |
| <documentation> |
| A popupMenu element may only be defined if the 'popupMenuId' attribute of the |
| 'viewer' element is not specified. |
| <p> |
| The popupMenu element allows further customization of the context menu associated |
| with the viewer. For the options to be applied correctly, an instance of the viewer |
| must delegate to a org.eclipse.ui.navigator.NavigatorActionService, which behaves |
| like a normal org.eclipse.ui.ActionGroup. See the documentation for this API class |
| for more information on exploiting this functionality. For clients that use an |
| instance of org.eclipse.ui.navigator.CommonNavigator do not need to do any extra work. |
| <p> |
| A popupMenu declares one or more insertionPoints that will be used by contributors to |
| organize their contributions into a meaningful, more user-friendly, consistent list. |
| <p> |
| If clients only specify the popupMenuId attribute of the 'viewer' element, then the |
| set of insertionPoints used by the context menu will default to the following list |
| in the given order: |
| <p> |
| <pre> |
| "group.new" separator="true" |
| "group.goto" |
| "group.open" separator="true" |
| "group.openWith" |
| "group.show" separator="true" |
| "group.edit" separator="true" |
| "group.reorganize" |
| "group.port" |
| "group.generate" separator="true" |
| "group.search" separator="true" |
| "group.build" separator="true" |
| "additions" separator="true" |
| "group.properties" separator="true" |
| </pre> |
| </p> |
| <p> |
| Clients that wish to refer to these values programmatically may use the corresponding constants in org.eclipse.ui.navigator.ICommonMenuConstants. |
| <p> |
| Clients that wish to customize their menus are encouraged to start with this list and add or remove insertion points as necessary. Clients are also |
| encouraged to follow the pattern of beginning each group name with "group.". |
| <p> |
| If the popupMenu element is specified and contains NO insertionPoint children elements, then the context menu will have no published insertion points. Of course, programmatic clients are not restricted from adding their own insertion points as necessary. Clients defining viewers are encouraged to publish their insertion points for documentation purposes and clarity for downstream extensions to their viewers/navigators, or to explicitly document which insertion points are considered API and which are considered internal. |
| </documentation> |
| </annotation> |
| <complexType> |
| <sequence> |
| <element ref="insertionPoint" minOccurs="0" maxOccurs="unbounded"/> |
| </sequence> |
| <attribute name="id" type="string"> |
| <annotation> |
| <documentation> |
| The id of the menu. Has the same function as the popupMenuId attribute of 'viewer'. |
| </documentation> |
| </annotation> |
| </attribute> |
| <attribute name="allowsPlatformContributions" type="boolean"> |
| <annotation> |
| <documentation> |
| A value of 'true' will register the declared popupMenu (by id) for object or viewer contributions as declared by the <b>org.eclipse.ui.popupMenus</b> extension point. A value of 'false' will restrict the popupMenu to programmatic contributions as declared by org.eclipse.ui.navigator.CommonActionProviders (see <b>org.eclipse.ui.navigator.navigatorContent/actionProvider</b> and <b>org.eclipse.ui.navigator.navigatorContent/navigatorContent/actionProvider</b>). |
| </documentation> |
| </annotation> |
| </attribute> |
| </complexType> |
| </element> |
| |
| <element name="insertionPoint"> |
| <annotation> |
| <appInfo> |
| <meta.element labelAttribute="name"/> |
| </appInfo> |
| <documentation> |
| Defines an insertion point for the context menu. Indcludes the name of the point for clients to refer to, and whether the insertion point should be rendered as a separator or a group marker. |
| </documentation> |
| </annotation> |
| <complexType> |
| <attribute name="name" type="string" use="required"> |
| <annotation> |
| <documentation> |
| Indicates the name of the insertion point. Clients will use the name to refer to the insertion point as part of a menu path when providing either programmatic contributions via org.eclipse.ui.navigator.CommonActionProvider or declarative contributions via the <b>org.eclipse.ui.popupMenus</b> extension point. |
| </documentation> |
| </annotation> |
| </attribute> |
| <attribute name="separator" type="boolean"> |
| <annotation> |
| <documentation> |
| A value of true will cause the insertion point to be represented as a bar in the menu. This allows clients to visually group items in the context menu, based on their relevance to the user. By default, the value is false. |
| </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> |
| <p> |
| The following example configures the popup menu id for a viewer. |
| <p> |
| <pre> |
| |
| <extension |
| point="org.eclipse.ui.navigator.viewer"> |
| <viewer |
| id="org.eclipse.testViewer" |
| popupMenuId="org.eclipse.testViewer#PopupMenu"/> |
| </extension> |
| </pre> |
| </p> |
| <p> |
| Since the popupMenu child element of viewer is not used in the above example, the default set of |
| insertionPoints will be used. This set is defined as follows. See the documentation for |
| the popupMenu element for more information. |
| <p> |
| <pre> |
| "group.new" separator="true" |
| "group.goto" |
| "group.open" separator="true" |
| "group.openWith" |
| "group.show" separator="true" |
| "group.edit" separator="true" |
| "group.reorganize" |
| "group.port" |
| "group.generate" separator="true" |
| "group.search" separator="true" |
| "group.build" separator="true" |
| "additions" separator="true" |
| "group.properties" separator="true" |
| </pre> |
| </p> |
| <p> |
| The following example demonstrates a viewer configuration which declares custom |
| popupMenu insertion points, but restricts object and viewer contributions |
| with the 'allowsPlatformContributions' attribute. Clients may only contribute |
| to the defined menu via org.eclipse.ui.navigator.CommonActionProviders declared |
| for the viewer (either top-level or associated with content extensions). |
| <p> |
| Note that the popupMenuId attribute is not concurrently specified with the |
| popupMenu element. Only one or the other, but not both, is a valid configuration. |
| <p> |
| <pre> |
| <extension |
| point="org.eclipse.ui.navigator.viewer"> |
| <viewer |
| viewerId="org.eclipse.ui.navigator.resourceContent"> |
| <popupMenu |
| allowsPlatformContributions="false" |
| id="org.eclipse.ui.navigator.resourceContent#PopupMenu"> |
| <insertionPoint name="group.new"/> |
| <insertionPoint |
| name="group.open" |
| separator="true"/> |
| <insertionPoint name="group.openWith"/> |
| <insertionPoint |
| name="group.port" |
| separator="true"/> |
| <insertionPoint |
| name="additions" |
| separator="true"/> |
| <insertionPoint |
| name="group.properties" |
| separator="true"/> |
| </popupMenu> |
| </viewer> |
| <viewerContentBinding |
| viewerId="org.eclipse.ui.navigator.resourceContent"> |
| <includes> |
| <contentExtension pattern="org.eclipse.ui.navigator.resourceContent" /> |
| </includes> |
| </viewerContentBinding> |
| </extension> |
| |
| </pre> |
| </p> |
| |
| <p> |
| The following example declares that one content extension |
| (id: org.eclipse.ui.navigator.resourceContent) is bound |
| to a viewer matching the id 'org.eclipse.ui.navigator.resourceContent'. |
| Further, any id that begins with 'org.eclipse.ui.navigator.tests' |
| will be ignored. |
| <p> |
| <pre> |
| <extension |
| point="org.eclipse.ui.navigator.viewer"> |
| <viewerContentBinding |
| viewerId="org.eclipse.ui.navigator.resourceContent"> |
| <includes> |
| <contentExtension pattern="org.eclipse.ui.navigator.resourceContent" /> |
| </includes> |
| <excludes> |
| <contentExtension pattern="org.eclipse.ui.navigator.tests.*" /> |
| </excludes> |
| </viewerContentBinding> |
| </extension> |
| </pre> |
| </p> |
| <p> |
| The following example declares a 'viewerActionBinding' for all actionProviders (not |
| nested under a navigatorContent extension) that match the regular expression |
| "org.acme.actions.*" but not "org.acme.actions.tests.*". This expression |
| will make any actionProvider whose id begins with "org.acme.actions." but not "org.acme.actions.tests." visible to the viewer with the id "org.acme.viewer". |
| Of course, the 'viewerActionBindings' only apply to 'actionProvider' elements that |
| are not nested under a 'navigatorContent' element. The visibility of nested |
| 'actionProvider' elements is controlled by 'viewerContentBindings' for the enclosing |
| 'navigatorContent' element. |
| <p> |
| <pre> |
| <extension |
| point="org.eclipse.ui.navigator.viewer"> |
| <viewerActionBinding |
| viewerId="org.acme.viewer"> |
| <includes> |
| <contentExtension pattern="org.acme.actions.*" /> |
| </includes> |
| <excludes> |
| <contentExtension pattern="org.acme.actions.tests.*" /> |
| </excludes> |
| </viewerActionBinding> |
| </extension> |
| </pre> |
| </p> |
| <p> |
| The following example makes any actionProvider with no 'id' attribute visible |
| to the viewer 'org.acme.viewer'. The actionProviders with no 'id' attribute |
| have a default id of "org.eclipse.ui.navigator.actionProvider". Of course, |
| the 'viewerActionBindings' only apply to 'actionProvider' elements that |
| are not nested under a 'navigatorContent' element. The visibility of nested |
| 'actionProvider' elements is controlled by 'viewerContentBindings' for the enclosing |
| 'navigatorContent' element. |
| |
| <p> |
| <pre> |
| <extension |
| point="org.eclipse.ui.navigator.viewer"> |
| <viewerActionBinding |
| viewerId="org.acme.viewer"> |
| <includes> |
| <contentExtension pattern="org.eclipse.ui.navigator.actionProvider" /> |
| </includes> |
| </viewerActionBinding> |
| </extension> |
| </pre> |
| </p> |
| </documentation> |
| </annotation> |
| |
| <annotation> |
| <appInfo> |
| <meta.section type="apiInfo"/> |
| </appInfo> |
| <documentation> |
| |
| </documentation> |
| </annotation> |
| |
| <annotation> |
| <appInfo> |
| <meta.section type="implementation"/> |
| </appInfo> |
| <documentation> |
| |
| </documentation> |
| </annotation> |
| |
| <annotation> |
| <appInfo> |
| <meta.section type="copyright"/> |
| </appInfo> |
| <documentation> |
| Copyright (c) 2002, 2005 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> |
| </documentation> |
| </annotation> |
| |
| </schema> |