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
         id="test-preferences"
         name="test-preferences"
         point="org.eclipse.core.runtime.preferences">
      <scope
            name="test"
            class="org.eclipse.core.tests.internal.preferences.TestScope"/>
   </extension>
   <extension
         point="org.eclipse.core.runtime.contentTypes">      
      <content-type      
            name="My Content Type"
            id="myContent"
            file-names=" myContent.mc1 , myContent.mc2 "
            file-extensions=" myContent1, myContent2 "
            describer="org.eclipse.core.tests.runtime.content.MyContentDescriber"/>
      <!-- content types for content/name matching tests -->
      <content-type
            name="BinaryBase"
            id="binary_base"
            file-extensions="mybinary">
         <describer
            class="org.eclipse.core.runtime.content.BinarySignatureDescriber">
            <parameter name="signature" value="0A, 0B"/>
            <parameter name="required" value="false"/>            
         </describer>
      </content-type>
      <content-type                  
            name="BinaryDerived1"
            id="binary_derived1"
            file-names="foo.mybinary"
            file-extensions="mybinary"
            base-type="binary_base">            
         <describer
            class="org.eclipse.core.runtime.content.BinarySignatureDescriber">
            <parameter name="signature" value="0A, 0B, 0C"/>
            <parameter name="required" value="false"/>
         </describer>
      </content-type>
      <content-type                  
            name="BinaryDerived2"
            id="binary_derived2"
            base-type="binary_base">
         <describer
            class="org.eclipse.core.runtime.content.BinarySignatureDescriber">
            <parameter name="signature" value="0A, 0B, 0D"/>
            <parameter name="required" value="false"/>
         </describer>
      </content-type>            
      <!-- A base type and a sub-type are in conflict. Sub type should be picked. --> 
      <content-type      
            file-extensions="conflict1"
            name="Conflict 1"
            id="base_conflict1"/>         
      <content-type      
            base-type="base_conflict1"     
            name="Specialized Conflict 1"
            id="sub_conflict1"/>
      <!-- 
      	A base type and a sub-type (that restates file-spec) are in conflict. 
      	Base type still should be picked. 
      -->
      <content-type      
            file-extensions="conflict2"
            name="Conflict 2"
            id="base_conflict2"/>         
      <content-type      
            base-type="base_conflict2"         
            file-extensions="conflict2"
            name="Specialized Conflict 2"
            id="sub_conflict2"/>
      <!-- 
      	Two unrelated types (sub_conflict3 and unrelated conflict3) are in conflict. 
      	Order will be arbitrary.
      	-->
      <content-type            		
            id="base_conflict3"                  
            file-extensions="base_conflict3"
            name="Conflict 3"/>
      <content-type
            id="sub_conflict3"      
            base-type="base_conflict3"         
            file-extensions="conflict3"
            name="Deeper Conflict 3"/>
      <content-type
            id="unrelated_conflict3"      
            file-extensions="conflict3"
            name="Unrelated Conflict 3"/>                                              
      <!-- end of conflict-related content types -->
	  <content-type
            file-extensions="tzt"
            name="My Text"
            id="mytext">
            <property name="property1" default="value1"/>
            <!-- declares property for documentation purposes only -->
            <property name="property2"/>            
            <property name="property3" default="value3"/>
            <!-- overrides (non-local) parent property definition -->
            <property name="org.eclipse.core.runtime.charset" default="BAR"/>
      </content-type>
      <content-type
      		base-type="mytext"
            file-extensions="tzt1"
            name="My Text1"
            id="mytext1">
            <!-- overrides parent property definition by assigning a default value -->
            <property name="property2" default="value2"/>
            <!-- overrides parent property definition by clearing the default value -->
            <property name="property3"/>
            <property name="property4" default="value4"/>
      </content-type>
      <!-- overrides parent charset definition by clearing the default value -->                              
      <!-- Here we really want to use the deprecated way for defining charsets. -->      
      <content-type
      		base-type="mytext"      
            file-extensions="tzt2"
            default-charset=""
            name="My Text2"
            id="mytext2">
            <property name="property1"/>
            <property name="property2"/>
            <property name="property3"/>
            <property name="property4"/>
            <!-- Use a local property name clashing with an inherited one -->
            <property name="charset" default="mytext2"/>
      </content-type>
      <content-type
            file-names="foo.bar"
            file-extensions="bar"
            name="Foo Bar"
            id="fooBar"/>
      <content-type
            base-type="fooBar"
            name="Sub Foo Bar"
            id="subFooBar"/>
      <content-type
            file-extensions="xml2"
            base-type="org.eclipse.core.runtime.xml"
            name="XML Based with Different Extension"
            id="xml-based-different-extension">
      </content-type>
      <content-type
            file-names="xml-based.xml"
            base-type="org.eclipse.core.runtime.xml"
            name="XML Based with Specific Name"
            id="xml-based-specific-name"/>
      <content-type
            file-extensions="samplebin1"
            name="Sample Binary 1"
            id="sample-binary1">
         <describer
            class="org.eclipse.core.runtime.content.BinarySignatureDescriber">
            <parameter name="signature" value="10, AB, CD, FF"/>
            <parameter name="offset" value="5"/>                           
         </describer>
      </content-type>
      <content-type
            file-extensions="samplebin2"
            name="Sample Binary 2"
            id="sample-binary2">
         <describer
            class="org.eclipse.core.runtime.content.BinarySignatureDescriber">
            <parameter name="signature" value="10, AB, CD, EF"/>   
         </describer>
      </content-type>            
      <content-type
            file-extensions="class"
            name="Java Class file"
            id="javaClass">
         <describer
            class="org.eclipse.core.runtime.content.BinarySignatureDescriber">
            <parameter name="signature" value="CA, FE, BA, BE"/>   
         </describer>
      </content-type>            
      
      <!-- content types for association tests -->
	  <content-type
            id="assoc1" 
            name="Association Test 1"
            base-type="org.eclipse.core.runtime.text"
            describer="org.eclipse.core.tests.runtime.content.NaySayerContentDescriber"/>
	  <content-type
            id="assoc2" 
            name="Association Test 2"
            base-type="org.eclipse.core.runtime.text"
            file-extensions="txt_assoc2builtin"            
            describer="org.eclipse.core.tests.runtime.content.NaySayerContentDescriber"/>
      <file-association
            file-extensions="txt_assoc1pluginadded"
            content-type="org.eclipse.core.tests.runtime.assoc1"/>
      <file-association
            file-extensions="txt_assoc2pluginadded"
            content-type="org.eclipse.core.tests.runtime.assoc2"/>
      <file-association
            file-extensions="txt_pluginadded"
            content-type="org.eclipse.core.runtime.text"/>            
            
      <!-- content types for orphan tests -->            
      <content-type
            file-names="foo.orphan"
            file-extensions="orphan"
            base-type="org.eclipse.bundle01.missing"
            name="Orphan Type"
            id="orphan"/>
      <file-association
            file-extensions="orphan2"
            content-type="org.eclipse.bundle01.missing"/>
      <!-- content types for alias tests -->                        
      <content-type 
      		id="alias"
            name="Alias Type"
      		file-extensions="missing-target"
      		alias-for="org.eclipse.bundle02.missing-target"/>
      <content-type 
      		id="derived-from-alias"      		
            name="Derived from Alias Type"      		
      		base-type="alias"/>
      <!-- content types for content describer tests -->
      <content-type
            base-type="org.eclipse.core.runtime.xml"
            name="Root Element"
            id="root-element"
            describer="org.eclipse.core.runtime.content.XMLRootElementContentDescriber:org.eclipse.core.runtime.tests.root-element"/>
      <content-type
            base-type="org.eclipse.core.runtime.xml"
            name="Root Element in namespace"
            id="ns-root-element">
         <describer
               class="org.eclipse.core.runtime.content.XMLRootElementContentDescriber2">
            <parameter name="element" value="{urn:eclipse.core.runtime.ns1}rootElement1"/>
            <parameter name="element" value="{urn:eclipse.core.runtime.ns2}rootElement2"/>
         </describer>
      </content-type>      
      <content-type
            base-type="org.eclipse.core.runtime.xml"
            name="Wildcard element in namespace"
            id="ns-wildcard">
         <describer
               class="org.eclipse.core.runtime.content.XMLRootElementContentDescriber2">
            <parameter name="element" value="*/org.eclipse.core.runtime.tests.some.dtd3"/>
            <parameter name="element" value="{urn:eclipse.core.runtime.nsWild}*"/>
         </describer>
      </content-type>
      <content-type
            base-type="org.eclipse.core.runtime.xml"
            id="empty-ns-root-element"
            name="Root Element in empty namespace">
         <describer
               class="org.eclipse.core.runtime.content.XMLRootElementContentDescriber2">
            <parameter
                  name="element"
                  value="{}rootElement">
            </parameter>
         </describer>
      </content-type>
      <content-type
            base-type="org.eclipse.core.runtime.xml"
            name="DTD"
            id="dtd">
         <describer
               class="org.eclipse.core.runtime.content.XMLRootElementContentDescriber">
            <parameter name="dtd" value="org.eclipse.core.runtime.tests.some.dtd"/>
         </describer>
      </content-type>      
      <!-- this content type is used by the content description tests -->
      <content-type
            name="Void content type"
            id="void"/>      
      <content-type
            base-type="org.eclipse.core.runtime.xml"
            file-extensions="xml2"
            id="xml-based-different-extension-low-priority"
            name="XML Based with Different Extension and Low Priority"
            priority="low">
      </content-type>
   </extension>
   <extension
         point="org.eclipse.core.runtime.adapters">
      <factory
            class="org.eclipse.core.tests.runtime.TestAdapterFactory"
            adaptableType="org.eclipse.core.tests.runtime.TestAdaptable">
         <adapter
               type="org.eclipse.core.tests.runtime.TestAdapter">
         </adapter>
      </factory>
   </extension>
   <extension-point id="factoryLoaderTest" name="factoryLoaderTest" schema="schema/factoryLoaderTest.exsd"/>
   <extension point="org.eclipse.core.runtime.adapters">
      <factory class="org.eclipse.core.tests.runtime.TestAdapterFactoryLoader" 
         adaptableType="org.eclipse.core.tests.runtime.TestAdaptable">
         <adapter type="testAdapter.testUnknown"/>
      </factory>
   </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.