All Downloads are FREE. Search and download functionalities are using the official Maven repository.

schema.viewer.exsd Maven / Gradle / Ivy





      
         
      
      
         <p>
The <b>viewer</b> 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 "Filters and Customization" 
dialog. In addition, nested configuration elements give full control over the structure
and behavior of the popup context menu.
<p>
<b>viewerContentBinding</b> binds defined content extensions (through the <b>navigatorContent</b> 
extension point) to viewers. <b>viewerContentBinding</b> also binds a 
<b>linkHelper</b> extension point to a viewer.  
Any content extension bound to a viewer is described as <i>visible</i>. A
content service (<code>org.eclipse.ui.navigator.INavigatorContentService</code>)
will not return any extensions which are not visible for
its viewer id.
      
   

   
      
         
            
         
      
      
         
            
            
            
            
         
         
            
               
                  
               
            
         
         
            
               
                  
               
            
         
         
            
               
                  
               
               
                  
               
            
         
      
   

   
      
         
            
         
         
            Provides basic configuration to establish the characteristics of a viewer. Clients must also define an <b>org.eclipse.ui.views</b> extension to create the view part.
         
      
      
         
            
            
         
         
            
               
                  The id of the common viewer. If the viewer is in a common navigator then the id must match the navigator's id defined in its <b>org.eclipse.ui.views</b> extension.
               
            
         
         
            
               
                  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 <b>popupMenu</b> element, but not both. The default list of insertion points is declared in the documentation for the <b>popupMenu</b> element.
               
            
         
         
            
               
                  Causes all of the action and content bindings from the specified viewer to be used by this viewer.
               
               
                  
               
            
         
         
            
               
                  The help context Id to be associated with the Control associated with the viewer.
               
            
         
      
   

   
      
         
            Clients must define one or more <b>viewerContentBinding</b> elements to describe which content extensions, common filters, and link helpers are <i>visible</i> to the viewer. A content extension or common filter is <i>visible</i> if the id of the content extension or common filter matches an <b>includes</b> statement under a <b>viewerContentBinding</b> and is not excluded by an <b>excludes</b> statement. If a content extension or common filter is not <i>visible</i> to a viewer, then the extension will never be asked for content by a content service for that viewer or be presented to the user in the available filters dialog. 
<br><br>
Clients may define an <b>includes</b> element to select which extensions are <i>visible</i> to the viewer, and similarly an <b>excludes</b> element for extensions that should not be made <i>visible</i> 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 <b>contentExtension</b> elements have "isRoot" set to true within the <b>includes</b> statement, only those extensions will be queried for root elements. The "isRoot" attribute has no effect for exclusions.
<br><br>
A viewer may have multiple viewerContentBindings defined, and their includes/excludes statements will be aggregated to produce the final behavior.
         
      
      
         
            
            
         
         
            
               
                  The id of the common viewer. If the viewer is in a common navigator then the id must match the navigator's id defined in its <b>org.eclipse.ui.views</b> extension.
               
            
         
      
   

   
      
         
            Clients must define which action providers are visible to their viewer. Clients may define an <b>includes</b> element to select which extensions are visible to the viewer, and  similarly an <b>excludes</b> element for extensions that should not be made visible to the viewer. 
<br><br>
A viewer may have multiple <b>viewerActionBinding</b>s defined, and their <b>includes</b>/<b>excludes</b> statements will be aggregated to produce the final behavior.
<br><br>
For <b>actionProvider</b> definitions which are not nested under a <b>navigatorContent</b> definition, clients may specify a custom id. If clients do not specify an id, the id defaults to "org.eclipse.ui.navigator.actionProvider.X". For clients that wish to pick up <b>actionProvider</b>s with no specific id, clients must define a <b>viewerActionBinding</b> for the default id. See the examples section for how this is done.
         
      
      
         
            
            
         
         
            
               
                  The id of the common viewer. If the viewer is in a common navigator then the id must match the navigator's id defined in its <b>org.eclipse.ui.views</b> extension.
               
            
         
      
   

   
      
         
            Define a set of regular expressions 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 excludes statement will be given precedence.

<p>
Note: these are regular expressions and not wildcards.  So if you want to include something like <code>com.mycompany.content*</code>, the expression would be <code>com\.mycompany\.content.*</code>.
         
      
      
         
            
               
            
            
               
            
         
      
   

   
      
         
            Define a set of regular expressions 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 excludes statement will be given precedence.
            To be meaningful this will be a subset of the includes pattern.
            
<p>
Note: these are regular expressions and not wildcards.  So if you want to include something like <code>com.mycompany.content*</code>, the expression would be <code>com\.mycompany\.content.*</code>.
         
      
      
         
            
               
            
            
               
            
         
      
   

   
      
         
            Indicates the id (or matching pattern) of a content extension that should be queried by <code>ITreeContentProvider.getElements()</code> or <code>ITreeContentProvider.getChildren()</code>
for the root of the viewer or a common filter that should be available to the user in the "Available Filters" dialog.
<br><br>
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 <b>triggerPoints</b> expression for the viewer input element). 
<br><br>
See the documentation for <b>viewerContentBinding</b> for more information.
         
      
      
         
            
               
                  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 <code>java.util.regex.Pattern</code> for further details.
               
            
         
         
            
               
                  A value of true indicates the content extension will provide root content, and override the default <b>triggerPoints</b> expressions defined in the bound content extensions for a given viewer.
               
            
         
      
   

   
      
         
            Indicates that the action extension that should be given opportunities
to contribute to the context menu and action bars. 
<br><br>          
See the documentation for <b>viewerActionBinding</b> for more information.
         
      
      
         
            
               
                  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 <code>java.util.regex.Pattern</code> for further details.
               
            
         
      
   

   
      
         
            
         
         
            A popupMenu element may only be defined if the "popupMenuId" attribute of the 
<b>viewer</b> element is not specified. 
<br><br>
The <b>popupMenu</b> 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 <code>org.eclipse.ui.navigator.NavigatorActionService</code>, which behaves
like a normal <code>org.eclipse.ui.ActionGroup</code>. See the documentation for this API class
for more information on exploiting this functionality. For clients that use an 
instance of <code>org.eclipse.ui.navigator.CommonNavigator</code> do not need to do any extra work. 
<br><br>
A <b>popupMenu</b> declares one or more <b>insertionPoints</b> that will be used by contributors to 
organize their contributions into a meaningful, more user-friendly, consistent list. 
<br>
If clients only specify the "popupMenuId" attribute of the <b>viewer</b> element, then the
set of <b>insertionPoints</b> used by the context menu will default to the following list 
in the given order:
<br>
<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>
<br><br>
Clients that wish to refer to these values programmatically may use the corresponding constants in <code>org.eclipse.ui.navigator.ICommonMenuConstants</code>. 
<br><br>
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.". 
<br><br>
If the <b>popupMenu</b> element is specified and contains NO <b>insertionPoint</b> 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.
         
      
      
         
            
         
         
            
               
                  The id of the menu. Has the same function as the "popupMenuId" attribute of <b>viewer</b>, but if a <b>popupMenu</b> nested element is used, you must use this "popupMenuId" attribute and NOT specify the "popupMenuId" of <b>viewer</b>.
               
            
         
         
            
               
                  A value of <b>true</b> will register the declared <b>popupMenu</b> (by id) for object or viewer contributions as declared by the <b>org.eclipse.ui.popupMenus</b> extension point. A value of <b>false</b> will restrict the popupMenu to programmatic contributions as declared by <code>org.eclipse.ui.navigator.CommonActionProviders</code> (see <b>org.eclipse.ui.navigator.navigatorContent/actionProvider</b> and <b>org.eclipse.ui.navigator.navigatorContent/navigatorContent/actionProvider</b>).
               
            
         
      
   

   
      
         
            
         
         
            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.
         
      
      
         
            
               
                  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 <code>org.eclipse.ui.navigator.CommonActionProvider</code> or declarative contributions via the <b>org.eclipse.ui.popupMenus</b> extension point.
               
            
         
         
            
               
                  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 <b>false</b>.
               
            
         
      
   

   
      
         
            Provide options to the viewer to custom how it is presented to the user. See <code>org.eclipse.ui.navigator.INavigatorViewerDescriptor</code> for the available properties.
         
      
      
         
            
         
      
   

   
      
         
            Provide a name=value pair. The value will be provided as-is to the viewer (so empty strings will be propagated as empty strings). See <code>org.eclipse.ui.navigator.INavigatorViewerDescriptor</code> for the available properties and their descriptions.
         
      
      
         
            
               
                  
               
            
         
         
            
               
                  
               
            
         
      
   

   
      
         
            A Drag and Drop assistant provides lightweight hook to supply extra transfer types and logic to set the drag data. This element is not required as the basic <b>org.eclipse.ui.navigator.CommonViewer</b> provides a <b>org.eclipse.jface.util.LocalSelectionTransfer</b> type. 
<br><br>
<b>
Clients should only define this extension in lightweight plugins with shallow dependency trees. The drag assistants must be loaded up front when the viewer is created, which will force the load of affected plugins. 
</b>
         
      
      
         
            
               
                  Provide an implementation of <code>org.eclipse.ui.navigator.CommonDragAdapterAssistant</code>.
               
               
                  
               
            
         
         
            
               
                  Associate this drag assistant with a particular viewer id.
               
               
                  
               
            
         
      
   

   
      
         
      
      
         3.2
      
   

   
      
         
      
      
         <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 <b>popupMenu</b> child element of viewer is not used in the above example, the default set of
<b>insertionPoints</b> will be used. This set is defined as follows. See the documentation for
the <b>popupMenu</b> 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
<b>popupMenu/insertionPoints</b>, but restricts object and viewer contributions
with the "allowsPlatformContributions" attribute. Clients may only contribute
to the defined menu via <code>org.eclipse.ui.navigator.CommonActionProvider</code>s declared
for the viewer (either top-level or associated with content extensions). 
<p>
Note that the "popupMenuId" attribute is not concurrently specified with the 
<b>popupMenu</b> 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". (In this example the content extension and viewer ids match, but this is not required.) 
<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>
       </viewerContentBinding>
   </extension> 
</pre>
</p>
<p>
The following example declares a <b>viewerActionBinding</b> for all <b>actionProvider</b>s (not 
nested under a <b>navigatorContent</b> extension) that match the regular expression
"org.acme.actions.*" but not "org.acme.actions.tests.*". This expression 
will make any <b>actionProvider</b> whose id begins with "org.acme.actions." but not "org.acme.actions.tests." <i>visible</i> to the viewer with the id "org.acme.viewer".
Of course, the <b>viewerActionBindings</b> only apply to <b>actionProvider</b> elements that 
are not nested under a <b>navigatorContent</b> element. The <i>visibility</i> of nested 
<b>actionProvider</b> elements is controlled by <b>viewerContentBindings</b> for the enclosing
<b>navigatorContent</b> element.
<p>
<pre>
   <extension
         point="org.eclipse.ui.navigator.viewer">
       <viewerActionBinding 
             viewerId="org.acme.viewer">
            <includes>
                <actionExtension pattern="org.acme.actions.*" />
            </includes>
            <excludes>
                <actionExtension pattern="org.acme.actions.tests.*" />
            </excludes>
       </viewerActionBinding>
   </extension> 
</pre>
</p>
<p>
The following example makes any actionProvider with no "id" attribute <i>visible</i>
to the viewer "org.acme.viewer". The <b>actionProvider</b>s with no "id" attribute
have a default id of "org.eclipse.ui.navigator.actionProvider.X". Of course,
the <b>viewerActionBindings</b> only apply to <b>actionProvider</b> elements that 
are not nested under a <b>navigatorContent</b> element. The <i>visibility</i> of nested 
<b>actionProvider</b> elements is controlled by <b>viewerContentBinding</b>s for the enclosing
<b>navigatorContent</b> element.

<p>
<pre>
   <extension
         point="org.eclipse.ui.navigator.viewer">
       <viewerActionBinding 
             viewerId="org.acme.viewer">
            <includes>
                <actionExtension pattern="org.eclipse.ui.navigator.actionProvider.*" />
            </includes> 
       </viewerActionBinding>
   </extension> 
</pre>
</p>

<p>
The following example demonstrates the standard properties available to the viewer.
</p>
<p>
<pre>
   <extension
         point="org.eclipse.ui.navigator.viewer">
      <viewer
            popupMenuId="org.eclipse.ui.tests.navigator.TestView#PopupMenu"
            viewerId="org.eclipse.ui.tests.navigator.TestView">
         <options> 
            <!-- Hide the "Available Extensions" tab in the "Filters and Customization" 
                 dialog (available from the "Filters" action -->
            <property
                  name="org.eclipse.ui.navigator.hideAvailableExtensionsTab"
                  value="true"/>
            <!-- Hide the "Filters and Customization" dialog completely. This includes hiding the 
              filters and the available content extensions. -->
            <property
                  name="org.eclipse.ui.navigator.hideAvailableCustomizationsDialog"
                  value="true"/> 
            <!-- Hide the "Link with Editor" action from the toolbar of the viewer -->
            <property
                  name="org.eclipse.ui.navigator.hideLinkWithEditorAction"
                  value="true"/> 
            <!-- Hide the "Collapse All" action from the toolbar of the viewer -->
            <property
                  name="org.eclipse.ui.navigator.hideCollapseAllAction"
                  value="true"/>  
         </options>
      </viewer>
   </extension>
</pre>
</p>
      
   



   
      
         
      
      
         Copyright (c) 2002, 2009 IBM Corporation and others.<br>

This program and the accompanying materials are made
available under the terms of the Eclipse Public License 2.0 which accompanies
this distribution, and is available at <a 
href="https://www.eclipse.org/legal/epl-2.0">https://www.eclipse.org/legal/epl-v20.html</a>/

SPDX-License-Identifier: EPL-2.0
      
   






© 2015 - 2025 Weber Informatics LLC | Privacy Policy