blob: d19f7a17e190799b389798465ec5baae438bb672 [file] [log] [blame]
<?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="navigatorContent" name="navigatorContent"/>
</appInfo>
<documentation>
A content extension provides a content and label provider
that can be used by a navigator content service. The
&apos;navigatorContent&apos; extension defines the specific classes
for the content provider, label provider, and action provider
in addition to the types of elements the extension knows about.
&lt;p&gt;
The &apos;triggerPoints&apos; expression describes the elements that will
cause this extension to be invoked for either children or for
labels. The &apos;possibleChildren&apos; expression describes the elements
that the extension may be able to provide a parent for. Clients
should describe all elements that could be set as the selection
to ensure that the link with editor support can properly
expand to the right node.
&lt;p&gt;
&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;. 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>
<include schemaLocation="schema://org.eclipse.core.expressions/schema/expressionLanguage.exsd"/>
<element name="extension">
<complexType>
<sequence>
<choice>
<element ref="navigatorContent" minOccurs="0" maxOccurs="1"/>
<element ref="actionProvider" minOccurs="0" maxOccurs="1"/>
<element ref="commonWizard" minOccurs="0" maxOccurs="1"/>
</choice>
</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>
</annotation>
</attribute>
</complexType>
</element>
<element name="navigatorContent">
<annotation>
<appInfo>
<meta.element labelAttribute="name"/>
</appInfo>
<documentation>
A navigator content extension defines a content provider and label provider that can be used to provide children whenever an element matches the triggerPoints expression and also to provide a parent whenever an element matches the possibleChildren expression.
&lt;p&gt;
Optionally, clients may also provide an action provider which can provide menu contributions and action bar contributions when an element is selected that the extension contributed, or that matches the triggerPoints expression. Clients may also choose to contribute a sorter to sort elements that are contributed by the extension.
</documentation>
</annotation>
<complexType>
<sequence>
<choice>
<element ref="enablement"/>
<sequence>
<element ref="triggerPoints"/>
<element ref="possibleChildren"/>
</sequence>
</choice>
<element ref="actionProvider" minOccurs="0" maxOccurs="unbounded"/>
<element ref="duplicateContentFilter" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
A unique ID to identify this extension. Used for extension activation and by other extensions that would like to extend the defined extension (e.g. add another org.eclipse.ui.navigator.CommonActionProvider)
</documentation>
</annotation>
</attribute>
<attribute name="priority">
<annotation>
<documentation>
Indicates the relative priority of this extension to other extensions. Used by the Common Navigator to handle sorting and organization of the contributed content from this extension in relation to content from other extensions. Defaults to &quot;normal&quot;
</documentation>
</annotation>
<simpleType>
<restriction base="string">
<enumeration value="lowest">
</enumeration>
<enumeration value="lower">
</enumeration>
<enumeration value="low">
</enumeration>
<enumeration value="normal">
</enumeration>
<enumeration value="high">
</enumeration>
<enumeration value="higher">
</enumeration>
<enumeration value="highest">
</enumeration>
</restriction>
</simpleType>
</attribute>
<attribute name="contentProvider" type="string" use="required">
<annotation>
<documentation>
Supplies the name of a class which implements org.eclipse.jface.viewers.ITreeContentProvider or org.eclipse.ui.navigator.ICommonContentProvider.
&lt;p&gt;
The content provider will be consulted when addeding children to the tree. Use the &apos;enablement&apos; clause to indicate what kinds of content should trigger a request to your content provider or label provider.
</documentation>
<appInfo>
<meta.attribute kind="java" basedOn="org.eclipse.jface.viewers.ITreeContentProvider"/>
</appInfo>
</annotation>
</attribute>
<attribute name="sorter" type="string">
<annotation>
<documentation>
Indicates the name of class which implements java.util.Comparator that knows how to sort the items supported by this extension. If the extension enables on types that it does not provide, but understands, it may be called upon to sort items that it did not contribute.
</documentation>
<appInfo>
<meta.attribute kind="java" basedOn="java.util.Comparator"/>
</appInfo>
</annotation>
</attribute>
<attribute name="icon" type="string">
<annotation>
<documentation>
A plugin-relative path to an icon for use when displaying the metadata about the content extension to the user.
</documentation>
</annotation>
</attribute>
<attribute name="activeByDefault" type="boolean">
<annotation>
<documentation>
Indicates whether the current extension will be active by default. Each content extension may be turned on or off by the user. This state is referred to as the &apos;active&apos; state of a content extension. If this attribute is set to &apos;false&apos;, then the user will have to explicitly open the dialog and turn the extension on.
</documentation>
</annotation>
</attribute>
<attribute name="labelProvider" type="string" use="required">
<annotation>
<documentation>
Supplies the name of a class which implements &lt;code&gt;org.eclipse.jface.viewers.ILabelProvider&lt;/code&gt; or for more advanced functionality, the &lt;code&gt;org.eclipse.ui.navigator.ICommonLabelProvider&lt;/code&gt;.
&lt;p&gt;
Clients may also implement &lt;code&gt;org.eclipse.ui.navigator.IDescriptionProvider&lt;/code&gt; in order to add text to the status bar at the bottom of the Eclipse workbench based on the selection in the viewer.
</documentation>
<appInfo>
<meta.attribute kind="java" basedOn="org.eclipse.jface.viewers.ILabelProvider"/>
</appInfo>
</annotation>
</attribute>
<attribute name="name" type="string" use="required">
<annotation>
<documentation>
Specify a display name for the Content Extension. The display name is used in the activation dialog to allow clients to turn an extension on or off.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="enablement">
<annotation>
<documentation>
The enablement expression allows clients to specify the same expression for both triggerPoints and possibleChildren.
&lt;p&gt;
In the case of &apos;actionProvider&apos;, clients must define an expression that will indicate to the framework when their org.eclipse.ui.navigator.CommonActionProvider should be invoked. Because of contributions to the IActionBars, clients must be invoked whenever an object they are interested in is selected. Therefore, clients should use discretion in deciding when their extension should be enabled.
</documentation>
</annotation>
<complexType>
<sequence minOccurs="0" maxOccurs="unbounded">
<element ref="not"/>
<element ref="and"/>
<element ref="or"/>
<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"/>
</sequence>
</complexType>
</element>
<element name="triggerPoints">
<annotation>
<documentation>
The triggerPoints expression defines the nodes in a tree that should cause this extension to be invoked for children.
</documentation>
</annotation>
<complexType>
<sequence minOccurs="0" maxOccurs="unbounded">
<element ref="not"/>
<element ref="and"/>
<element ref="or"/>
<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"/>
</sequence>
</complexType>
</element>
<element name="possibleChildren">
<annotation>
<documentation>
The possibleChildren expression defines the nodes in a tree that could be contributed by this extension. Clients should describes when this content extension could provide a parent for elements that match the expression.
</documentation>
</annotation>
<complexType>
<sequence minOccurs="0" maxOccurs="unbounded">
<element ref="not"/>
<element ref="and"/>
<element ref="or"/>
<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"/>
</sequence>
</complexType>
</element>
<element name="duplicateContentFilter">
<annotation>
<documentation>
For extensions that which to augment or enhance the content provided by another existing extension (e.g. Resources), a client may specify a &quot;duplicateContentFilter&quot; which will be turned on and off with their extensions. Users will not have the capability to turn this special viewer filter on and off.
</documentation>
</annotation>
<complexType>
<attribute name="viewerFilter" type="string" use="required">
<annotation>
<documentation>
A subclass of INavigatorExtensionFilter.
</documentation>
<appInfo>
<meta.attribute kind="java"/>
</appInfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="actionProvider">
<annotation>
<appInfo>
<meta.element labelAttribute="class"/>
</appInfo>
<documentation>
Supplies the name of a class that implements &lt;code&gt;org.eclipse.ui.navigator.CommonActionProvider&lt;/code&gt;. The action provider has an opportunity to contribute to the context menu and the retargetable actions defined in the IActionBars for the view that holds the navigator. Clients may also contribute directly to the view menu through the IActionBars view menu.
&lt;p&gt;
A top level &lt;actionProvider /&gt; is &apos;visible&apos; to an abstract viewer if there is a &lt;viewerActionBinding /&gt; for that &lt;actionProvider /&gt;. For actionProviders that are nested under a navigatorContent element, the visibility will be controlled by the id of the navigatorContent extension id. Child action providers will automatically
be picked up by matching viewerContentBindings. See org.eclipse.ui.navigator.viewer for more information on visibility bindings.
&lt;p&gt;
Clients may provider &apos;actionProvider&apos;(s) under the root &apos;extention&apos; element (peer to &apos;navigatorContent&apos;) in order to better control the binding (see &apos;veiwerActionBinding&apos;) and their enablement (the root level &apos;actionProvider&apos; element supports a nested &apos;enablement&apos; Eclipse core expression).
&lt;p&gt;
For root &apos;actionProviders&apos; with no id, the id defaults to &apos;org.eclipse.ui.navigator.actionProvider&apos;. For these actionProviders to be given the opportunity to contribute the menus or action bars of a viewer, a viewerActionBinding must be defined (as part of the org.eclipse.ui.navigator.viewer extension point) which declares a binding between the specific viewer and the default id (&quot;org.eclipse.ui.navigator.actionProvider&quot;). See the documentation for &apos;viewerActionBinding&apos; under the schema documentation of org.eclipse.ui.navigator.viewer for more information.
</documentation>
</annotation>
<complexType>
<sequence>
<element ref="enablement" minOccurs="0" maxOccurs="1"/>
</sequence>
<attribute name="class" type="string" use="required">
<annotation>
<documentation>
</documentation>
<appInfo>
<meta.attribute kind="java" basedOn="org.eclipse.ui.navigator.CommonActionProvider"/>
</appInfo>
</annotation>
</attribute>
<attribute name="id" type="string">
<annotation>
<documentation>
Clients may optionally define an id to use for filtering purposes (either through activities or viewerContentBindings).
</documentation>
</annotation>
</attribute>
<attribute name="dependsOn" type="string">
<annotation>
<documentation>
Specifies the ID of an action provider that configures some menu or submenu that must be prepared before this action provider is applied.
&lt;p&gt;
Specifying a dependency on another action provider does not guarantee that this action provider will be invoked whereever the required action provider is invoked. The downstream action provider must be bound to the particular viewer to be invoked.
&lt;/p&gt;
&lt;p&gt;
If the required action provider is disabled or unbound to the current viewer, then this action provider will not be applied. If a cycle exists, the framework will try to continue, but there are no guarantees as to what menu items or action bar contributions will be available.
&lt;/p&gt;
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="commonWizard">
<annotation>
<documentation>
The extension point provides the ability to contribute to the menu defined by type.
</documentation>
</annotation>
<complexType>
<sequence>
<element ref="enablement"/>
</sequence>
<attribute name="type" use="required">
<annotation>
<documentation>
The type atttribute should be the value of the root category of the expected wizard. The possible values include &quot;import&quot; for &lt;b&gt;org.eclipse.ui.importWizards&lt;/b&gt;, &quot;export&quot; &lt;b&gt;org.eclipse.ui.exportWizards&lt;/b&gt;, and &quot;new&quot; for &lt;b&gt;org.eclipse.ui.newWizards&lt;/b&gt;
</documentation>
</annotation>
<simpleType>
<restriction base="string">
<enumeration value="import">
</enumeration>
<enumeration value="export">
</enumeration>
<enumeration value="new">
</enumeration>
</restriction>
</simpleType>
</attribute>
<attribute name="wizardId" type="string" use="required">
<annotation>
<documentation>
The id of the desired wizard shortcut as defined by &lt;b&gt;org.eclipse.ui.importWizards&lt;/b&gt;, &lt;b&gt;org.eclipse.ui.exportWizards&lt;/b&gt;, or &lt;b&gt;org.eclipse.ui.newWizards&lt;/b&gt;
</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;
The following example describes a content extension that
provides resource content. The &apos;triggerPoints&apos; expression
determines when this extension is initially invoked. If
a &apos;viewerContentBinding&apos; matches this extension with
the &apos;isRoot&apos; attribute set to true, then the extension
will be used, regardless of whether the root element
matches the &apos;triggerPoints&apos; expression.
&lt;p&gt;
&lt;pre&gt;
&lt;extension
point=&quot;org.eclipse.ui.navigator.navigatorContent&quot;&gt;
&lt;navigatorContent
name=&quot;%resource.extension.name&quot;
priority=&quot;low&quot;
icon=&quot;icons/full/eview16/resource_persp.gif&quot;
activeByDefault=&quot;true&quot;
contentProvider=&quot;org.eclipse.ui.navigator.resources.internal.workbench.ResourceExtensionContentProvider&quot;
labelProvider=&quot;org.eclipse.ui.navigator.resources.internal.workbench.ResourceExtensionLabelProvider&quot;
sorter=&quot;org.eclipse.ui.navigator.resources.internal.workbench.ResourceSorter&quot;
id=&quot;org.eclipse.ui.navigator.resourceContent&quot;&gt;
&lt;triggerPoints&gt;
&lt;or&gt;
&lt;instanceof
value=&quot;org.eclipse.core.resources.IWorkspaceRoot&quot; /&gt;
&lt;instanceof
value=&quot;org.eclipse.core.resources.IProject&quot; /&gt;
&lt;instanceof
value=&quot;org.eclipse.core.resources.IFolder&quot; /&gt;
&lt;/or&gt;
&lt;/triggerPoints&gt;
&lt;possibleChildren&gt;
&lt;or&gt;
&lt;instanceof
value=&quot;org.eclipse.core.resources.IWorkspaceRoot&quot; /&gt;
&lt;instanceof
value=&quot;org.eclipse.core.resources.IProject&quot; /&gt;
&lt;instanceof
value=&quot;org.eclipse.core.resources.IResource&quot; /&gt;
&lt;instanceof
value=&quot;org.eclipse.core.resources.IFolder&quot; /&gt;
&lt;instanceof
value=&quot;org.eclipse.core.resources.IFile&quot; /&gt;
&lt;/or&gt;
&lt;/possibleChildren&gt;
&lt;/navigatorContent&gt;
&lt;/extension&gt;
&lt;/pre&gt;
&lt;/p&gt;
&lt;p&gt;
The following example demonstrates how to add wizard shortcut actions for
&quot;New Folder&quot; and &quot;New File&quot;, which are enabled on the specific subclasses
of org.eclipse.core.resources.IResource. Clients may use whatever parts of
the org.eclipse.core.expressions that are necessary to describe when the
menu options should be available. For clients building their own viewers or
view parts, be sure to use &lt;code&gt;org.eclipse.ui.navigator.WizardActionGroup&lt;/code&gt;
to correctly populate the menu. See that class for more documentation on
using this feature.
&lt;p&gt;
</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.&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>