alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

What this is

This file is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Other links

The source code

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
   <extension
         point="org.eclipse.ui.views">
      <view
            allowMultiple="false"
            class="org.eclipse.ui.navigator.CommonNavigator"
            id="org.eclipse.ui.tests.navigator.TestView"
            name="%test.navigator.viewName"/>
            
      <view
            allowMultiple="false"
            class="org.eclipse.ui.navigator.CommonNavigator"
            id="org.eclipse.ui.tests.navigator.ProgrammaticTestView"
            name="%test.navigator.programmaticViewName"/>     
            
      <view
            allowMultiple="false"
            class="org.eclipse.ui.navigator.CommonNavigator"
            id="org.eclipse.ui.tests.navigator.PipelineTestView"
            name="%test.navigator.pipelineViewName"/>            
   </extension>
   <extension
         point="org.eclipse.ui.navigator.navigatorContent">
      <navigatorContent 
            id="org.eclipse.ui.tests.navigator.testContent" 
            name="%test.navigator.extension"
            contentProvider="org.eclipse.ui.tests.navigator.extension.TestContentProvider"
            labelProvider="org.eclipse.ui.tests.navigator.extension.TestLabelProvider"
            activeByDefault="true"
            priority="higher">
         <triggerPoints>
			<adapt type="org.eclipse.core.resources.IProject"/>
         </triggerPoints> 
         <possibleChildren>
            <or>
				<instanceof value="org.eclipse.ui.tests.navigator.extension.TestExtensionTreeData"/>
				<instanceof value="org.eclipse.core.resources.IFile" />
			</or>
    
         </possibleChildren> 
      	 <actionProvider
            class="org.eclipse.ui.tests.navigator.extension.TestNestedActionProvider"
            id="org.eclipse.ui.tests.navigator.extension.TestNestedActionProvider"> 
      	 </actionProvider>
        <commonSorter
              class="org.eclipse.ui.tests.navigator.extension.TestDataSorter"
              id="org.eclipse.ui.tests.navigator.commonSorter">
           <parentExpression>
              <or>
                 <adapt type="org.eclipse.core.resources.IProject"/>
                 <instanceof value="org.eclipse.ui.tests.navigator.extension.TestExtensionTreeData"/>
              </or>
           </parentExpression>
        </commonSorter>
        <!-- The following two sorters are used to test the INavigatorSorterService -->
       <commonSorter class="org.eclipse.ui.tests.navigator.extension.TestDataSorter">
          <parentExpression>
             <instanceof value="org.eclipse.ui.navigator.INavigatorSorterService"/>
          </parentExpression>
       </commonSorter> 
       <commonSorter class="org.eclipse.ui.tests.navigator.extension.TestDataSorter">
          <parentExpression>
             <instanceof value="org.eclipse.ui.navigator.INavigatorSorterService"/>
          </parentExpression>
       </commonSorter>
	      <actionProvider
	            class="org.eclipse.ui.tests.navigator.extension.TestActionProvider"
	            id="org.eclipse.ui.tests.navigator.extension.TestActionProvider"
	            overrides="org.eclipse.ui.navigator.resources.actions.RefactorActions">
	         <enablement>
	            <instanceof value="org.eclipse.core.resources.IFile"/>
	         </enablement>
	      </actionProvider>
      </navigatorContent>
      <actionProvider
            class="org.eclipse.ui.tests.navigator.extension.DependentActionProvider"
            dependsOn="org.eclipse.ui.tests.navigator.extension.TestActionProvider"
            id="org.eclipse.ui.tests.navigator.extension.DependentActionProvider">
         <enablement>
            <instanceof value="org.eclipse.core.resources.IResource"/>
         </enablement>
      </actionProvider>
      <actionProvider
            class="org.eclipse.ui.tests.navigator.extension.DependentActionProvider"
            dependsOn="Invalid Id"
            id="org.eclipse.ui.tests.navigator.extension.[If this menu option shows, it is an INTENTIONAL ERROR from org.eclipse.ui.tests.navigator! A warning SHOULD appear in the log!]">
         <enablement>
            <instanceof value="org.eclipse.core.resources.IResource"/>
         </enablement>
      </actionProvider>
      <actionProvider
            class="org.eclipse.ui.tests.navigator.extension.DependentActionProvider"
            dependsOn="org.eclipse.ui.tests.navigator.extension.DependentActionProvider"
            id="org.eclipse.ui.tests.navigator.extension.[Second Dependent Action]">
         <enablement>
            <instanceof value="org.eclipse.core.resources.IResource"/>
         </enablement>
      </actionProvider>
      <navigatorContent
            contentProvider="org.eclipse.ui.tests.navigator.extension.TestContentProvider"
            id="org.eclipse.ui.tests.navigator.testContent2"
            labelProvider="org.eclipse.ui.tests.navigator.extension.TestLabelProvider"
            name="Test Navigator Extension [Programmatic Binding]">
	     <triggerPoints>
            <instanceof value="org.eclipse.core.resources.IProject"/>
         </triggerPoints>            
      </navigatorContent>
      <commonFilter
            class="org.eclipse.ui.tests.navigator.extension.TestItemsThatEndIn3"
            description="Hide TestItem objects that end in the number "3""
            id="org.eclipse.ui.tests.navigator.filters.TestItemsThatEndWith3"
            name="TestItems that end with "3""
            activeByDefault="true"
            /> 
      <commonFilter
            description="Hides all instances of Test Item"
            id="org.eclipse.ui.tests.navigator.filters.AllTestItems"
            name="A TestItem Exp Filter (should be sorted alphab..)">
         <filterExpression>
            <instanceof value="org.eclipse.ui.tests.navigator.extension.TestExtensionTreeData"/>
         </filterExpression>
      </commonFilter>      
      <commonFilter
            class="org.eclipse.ui.tests.navigator.extension.TestItemsThatEndIn3"
            description="This filter specifies a class an an expression; selecting it should result in a warning in the log."
            id="org.eclipse.ui.tests.navigator.filters.ErrantFilter"
            name="An errant filter">
         <filterExpression>
            <instanceof value="org.eclipse.ui.tests.navigator.extension.TestExtensionTreeData"/>
         </filterExpression>
      </commonFilter>
      <commonFilter
            id="org.eclipse.ui.tests.navigator.filters.NoDescriptionFilter"
            name="No Description Filter">
         <filterExpression>
            <instanceof value="org.eclipse.ui.navigator.INavigatorContentService"/>
         </filterExpression>
      </commonFilter>
      <actionProvider
            class="org.eclipse.ui.tests.navigator.TestOverrideableActionProvider"
            id="org.eclipse.ui.tests.navigator.extension.TestOverrideABLEActionProvider"
            priority="normal">
         <enablement>
            <instanceof
                  value="org.eclipse.core.resources.IResource">
            </instanceof>
         </enablement>
      </actionProvider>
      <actionProvider
            class="org.eclipse.ui.tests.navigator.TestOverrideableActionProvider"
            id="org.eclipse.ui.tests.navigator.extension.TestOverridINGActionProvider1"
            overrides="org.eclipse.ui.tests.navigator.extension.TestOverrideABLEActionProvider"
            priority="high">
         <enablement>
            <instanceof
                  value="org.eclipse.core.resources.IFile">
            </instanceof>
         </enablement>
      </actionProvider>
            <actionProvider
            class="org.eclipse.ui.tests.navigator.TestOverrideableActionProvider"
            id="org.eclipse.ui.tests.navigator.extension.TestOverridINGActionProvider2"
            overrides="org.eclipse.ui.tests.navigator.extension.TestOverrideABLEActionProvider"
            priority="higher">
         <enablement>
         	<and>
            	<instanceof
                 	value="org.eclipse.core.resources.IFile" />
                <test property="org.eclipse.core.resources.extension" value="txt"/>
            </and> 
         </enablement>
      </actionProvider>
      <navigatorContent 
            id="org.eclipse.ui.tests.navigator.testHasChildren" 
            name="Dat File Content Extension"
            contentProvider="org.eclipse.ui.tests.navigator.extension.DatContentProvider"
            labelProvider="org.eclipse.ui.tests.navigator.extension.TestLabelProvider"
            activeByDefault="true"
            priority="lower">
         <triggerPoints>
            <or> 
            	<and>
					<instanceof value="org.eclipse.core.resources.IFile" />
                <test property="org.eclipse.core.resources.extension" value="dat"/>
				</and>
			</or> 
         </triggerPoints> 
         <possibleChildren> 
         </possibleChildren> 
	  </navigatorContent>      
   </extension>
   <extension
         point="org.eclipse.ui.navigator.viewer">
      <viewer
            popupMenuId="org.eclipse.ui.tests.navigator.TestView#PopupMenu"
            viewerId="org.eclipse.ui.tests.navigator.TestView">
         <options>
            <!-- 
            <property
                  name="org.eclipse.ui.navigator.hideAvailableExtensionsTab"
                  value="true"/>
            
            <property
                  name="org.eclipse.ui.navigator.hideAvailableCustomizationsDialog"
                  value="true"/>
                  
             --> 
             <!--   -->
            <property
                  name="org.eclipse.ui.navigator.hideLinkWithEditorAction"
                  value="true"/> 
             <!--  -->
            <property
                  name="org.eclipse.ui.navigator.hideCollapseAllAction"
                  value="true"/>  
            <property
                  name="org.eclipse.ui.navigator.enforceHasChildren"
                  value="true"/> 
         </options>
      </viewer>
      <viewerContentBinding viewerId="org.eclipse.ui.tests.navigator.TestView">
         <includes>
            <contentExtension pattern="org.eclipse.ui.tests.navigator.testContent"/>
            <contentExtension pattern="org.eclipse.ui.tests.navigator.testHasChildren"/>            
            <contentExtension pattern="org.eclipse.ui.navigator.resourceContent"/>
            <contentExtension pattern="org.eclipse.ui.tests.navigator.filters.*"/> 
            <!-- pick up the resource filters for free --> 
            <contentExtension pattern="org.eclipse.ui.navigator.resources.filters.*"/>
            <actionExtension
                  pattern="org.eclipse.ui.tests.navigator.extension.*">
            </actionExtension> 
         </includes>
      </viewerContentBinding>
      
      <!-- For testing -->
      <viewerContentBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer">
         <includes>
            <contentExtension pattern="org.eclipse.ui.tests.navigator.testContent"/> 
            <contentExtension pattern="org.eclipse.ui.tests.navigator.filters.*"/> 
         </includes>
      </viewerContentBinding>
      <viewerActionBinding viewerId="org.eclipse.ui.tests.navigator.TestView">
         <includes>
            <actionExtension pattern="org.eclipse.ui.tests.navigator.extension.*"/>
            <actionExtension pattern="org.eclipse.ui.navigator.resources.PropertiesActionProvider"/>
         </includes>
      </viewerActionBinding>
      <dragAssistant
            class="org.eclipse.ui.navigator.resources.ResourceDragAdapterAssistant"
            viewerId="org.eclipse.ui.tests.navigator.TestView"/>
   </extension>
 
 
   <extension
         point="org.eclipse.core.runtime.adapters">
      <factory
            adaptableType="org.eclipse.ui.tests.navigator.extension.TestExtensionTreeData"
            class="org.eclipse.ui.tests.navigator.extension.TestExtensionAdapterFactory">
         <adapter type="org.eclipse.core.resources.IResource"/>
         <adapter type="org.eclipse.core.resources.IFile"/>
      </factory>
   </extension>
   <extension
         point="org.eclipse.ui.navigator.viewer">
      <viewer viewerId="org.eclipse.ui.tests.navigator.ProgrammaticTestView"/>      
      <viewer viewerId="org.eclipse.ui.tests.navigator.PipelineTestView"/>      
      
   </extension>
   
   
   <!-- Verify decorator extension: Adds ">>" to Test Items that end in "3" --> 
   <extension
         point="org.eclipse.ui.decorators">
      <decorator
            class="org.eclipse.ui.tests.navigator.extension.TestLabelDecorator"
            id="org.eclipse.ui.tests.navigator.threeDecorator"
            label="Items that end in 3 decorator"
            lightweight="false"
            state="true">
         <enablement>
            <objectClass name="org.eclipse.ui.tests.navigator.extension.TestExtensionTreeData"/>
         </enablement>
      </decorator>
   </extension>
   <extension
         point="org.eclipse.ui.activities">
      <activityPatternBinding
            activityId="org.eclipse.wst.web"
            pattern="org\.eclipse\.ui\.tests\.navigator\.*"/> 
   </extension>
   
   <extension
         point="org.eclipse.ui.newWizards">
      <wizard
            class="org.eclipse.ui.tests.navigator.wizards.NewWizard1"
            id="org.eclipse.ui.tests.navigator.SampleNewWizard"
            name="Sample New Wizard (Does Nothing)"/>
   </extension>
   
   <extension
         point="org.eclipse.ui.importWizards">
      <wizard
            class="org.eclipse.ui.tests.navigator.wizards.ImportWizard1"
            id="org.eclipse.ui.tests.navigator.SampleImportWizard"
            name="Sample Import Wizard  (Does Nothing)"/>
   </extension>
  
   <extension
         point="org.eclipse.ui.exportWizards">
      <wizard
            class="org.eclipse.ui.tests.navigator.wizards.ExportWizard1"
            id="org.eclipse.ui.tests.navigator.SampleExportWizard"
            name="Sample Export Wizard  (Does Nothing)"/>
   </extension>
	<extension
	      point="org.eclipse.ui.navigator.navigatorContent"> 
      <commonWizard
            associatedExtensionId="org.eclipse.ui.tests.navigator.testContent"
            menuGroupId="org.eclipse.ui.tests.navigator"
            type="import"
            wizardId="org.eclipse.ui.tests.navigator.SampleImportWizard">
         <enablement>
            <or>
				<instanceof value="org.eclipse.ui.tests.navigator.extension.TestExtensionTreeData"/>
				<instanceof value="org.eclipse.core.resources.IFile" />
			</or>         
         </enablement>
      </commonWizard>
      <commonWizard
            associatedExtensionId="org.eclipse.ui.tests.navigator.testContent"
            menuGroupId="org.eclipse.ui.tests.navigator"
            type="export"
            wizardId="org.eclipse.ui.tests.navigator.SampleExportWizard">
         <enablement>
            <or>
				<instanceof value="org.eclipse.ui.tests.navigator.extension.TestExtensionTreeData"/>
				<instanceof value="org.eclipse.core.resources.IFile" />
			</or>         
         </enablement>
      </commonWizard>
      <commonWizard
            associatedExtensionId="org.eclipse.ui.tests.navigator.testContent"
            menuGroupId="org.eclipse.ui.tests.navigator"
            type="new"
            wizardId="org.eclipse.ui.tests.navigator.SampleNewWizard">  
         <enablement>
            <or>
				<instanceof value="org.eclipse.ui.tests.navigator.extension.TestExtensionTreeData"/>
				<instanceof value="org.eclipse.core.resources.IFile" />
			</or>         
         </enablement>            
      </commonWizard>
   </extension> 
</plugin>
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.