Skip to main content
summaryrefslogblamecommitdiffstats
blob: f8876bac2954492caf139d85597924c0b6ef771b (plain) (tree)
1
2
3
4
5
6
7
8
9
10


                                      
                                                       





                                                                               




                                             
 
                        
                                      

                                                        
 
                        
                                     


                                                       




                                                    
 




































                                                                                                   




                                                          






                                                                                             






                                                                                                     
                    

 
                                          
 

                                                                  
 









                                                                                                  

                                                                                 
                             






                                                                                







                                                                                                         
                                                                                   

                                    
 
                    





















                                                                                            
                                             
 

                                                                     
 
                               
                                                                                       


                                                                                                 
                                                                                                    
 





                                                                                                             
 
                               
                                                                                

                                                                   

                                                                                                           
 
                    






                                                                





                                                                                      



                                                                    

                                                                     
 





                                                                                                       
                                                                                                           


                                       
 





                                                                                                   
                                             
                                                                                                          

                                                                                                                   
                                                                                                                                   
                                              


                                       
 





                                                                                                      
                                                                                                                 


                                       
 





                                                                                                   
                                                                                                  




                                                                                     
 
                    


                                                  
 

                                                                                   
 




                                                                                       
                           
 
                    
 
         
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<!--
  Copyright (c) 2011, 2013 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.

  Contributors:
    Oracle - initial API and implementation
 -->
 
<plugin>

	<!-- ***** extension points ***** -->

	<extension-point
		id="libraryValidators"
		name="%LIBRARY_VALIDATORS"
		schema="schema/libraryValidators.exsd"/>

	<extension-point
		id="resourceLocators"
		name="%RESOURCE_LOCATORS"
		schema="schema/resourceLocators.exsd"/>

	<extension-point
		id="resourceTypes"
		name="%RESOURCE_TYPES"
		schema="schema/resourceTypes.exsd"/>


	<!-- ***** expression definitions ***** -->

	<extension
		point="org.eclipse.core.expressions.definitions">

		<!--
			Return whether a resource's project has the Java facet
			(or a project facet version matches the Java facet).
			Force activation of the WST facet plug-in containing the property tester.
			Example usage:
			<adapt type="org.eclipse.core.resources.IResource">
				<reference definitionId="org.eclipse.jpt.expression.hasJavaFacet"/>
			</adapt>
		-->
		<definition id="org.eclipse.jpt.expression.hasJavaFacet">
			<test property="org.eclipse.wst.common.project.facet.core.projectFacet"
				value="java"
				forcePluginActivation="true"/>
		</definition>

		<!-- Return whether a resource's project has the Static Web facet. -->
		<definition id="org.eclipse.jpt.expression.hasStaticWebFacet">
			<test property="org.eclipse.wst.common.project.facet.core.projectFacet"
				value="wst.web"
				forcePluginActivation="true"/>
		</definition>

		<!-- Return whether a resource's project has the Dynamic Web facet. -->
		<definition id="org.eclipse.jpt.expression.hasDynamicWebFacet">
			<test property="org.eclipse.wst.common.project.facet.core.projectFacet"
				value="jst.web"
				forcePluginActivation="true"/>
		</definition>

	</extension>


	<!-- ***** adapters ***** -->

	<extension
		point="org.eclipse.core.runtime.adapters">

		<!-- IWorkspace -> JptWorkspace -->
		<factory
			adaptableType="org.eclipse.core.resources.IWorkspace"
			class="org.eclipse.jpt.common.core.internal.WorkspaceAdapterFactory">
			<adapter type="org.eclipse.jpt.common.core.JptWorkspace"/>
		</factory>

		<!-- IProject -> ProjectResourceLocator -->
		<factory
			adaptableType="org.eclipse.core.resources.IProject"
			class="org.eclipse.jpt.common.core.internal.resource.ProjectAdapterFactory">
			<adapter type="org.eclipse.jpt.common.core.resource.ProjectResourceLocator"/>
		</factory>

	</extension>


	<!-- ***** content types ***** -->

	<extension
		point="org.eclipse.core.contenttype.contentTypes">

		<!-- JAR content type -->
		<content-type
			id="org.eclipse.jpt.common.core.content.jar"
			name="%JAR_CONTENT"
			file-extensions="jar, zip">
			<describer
				class="org.eclipse.core.runtime.content.BinarySignatureDescriber">
				<parameter name="signature" value="50 4B 03 04"/>
			</describer>
		</content-type>

		<!-- package-info.java content type (for package annotations) -->
		<content-type
			id="org.eclipse.jpt.common.core.content.javaPackageInfo"
			name="%JAVA_PACKAGE_INFO_CONTENT"
			base-type="org.eclipse.jdt.core.javaSource"
			file-names="package-info.java"
			priority="normal">
		</content-type>

		<!-- faceted project file -->
		<content-type
			id="org.eclipse.jpt.common.core.content.projectFacet"
			name="%FACET_CONFIG_XML_CONTENT"
			file-names="org.eclipse.wst.common.project.facet.core.xml"
			base-type="org.eclipse.core.runtime.xml">
			<describer
				class="org.eclipse.core.runtime.content.XMLRootElementContentDescriber2">
				<parameter name="element" value="faceted-project"/>
			</describer>
		</content-type>

	</extension>


	<!-- ***** resource types (eat our own dogfood) ***** -->

	<extension 
		point="org.eclipse.jpt.common.core.resourceTypes">

		<resource-type
			id="org.eclipse.jpt.common.core.resource.jar"
			content-type="org.eclipse.jpt.common.core.content.jar"/>

		<resource-type
			id="org.eclipse.jpt.common.core.resource.javaPackageInfo"
			content-type="org.eclipse.jpt.common.core.content.javaPackageInfo"/>

		<resource-type
			id="org.eclipse.jpt.common.core.resource.javaSource"
			content-type="org.eclipse.jdt.core.javaSource"/>

	</extension>


	<!-- ***** property testers ***** -->

	<extension 
		point="org.eclipse.core.expressions.propertyTesters">

		<propertyTester
			id="org.eclipse.jpt.common.core.propertyTester.LibraryProvider"
			type="org.eclipse.jst.common.project.facet.core.libprov.ILibraryProvider"
			namespace="org.eclipse.jpt.common.core"
			properties="id, extendsId"
			class="org.eclipse.jpt.common.core.internal.LibraryProviderPropertyTester"/>

		<propertyTester
			id="org.eclipse.jpt.common.core.propertyTester.JptResourceTypeReference"
			type="org.eclipse.jpt.common.core.JptResourceTypeReference"
			namespace="org.eclipse.jpt.common.core"
			properties="resourceTypeIsKindOf"
			class="org.eclipse.jpt.common.core.internal.JptResourceTypeReferencePropertyTester"/>

		<propertyTester
			id="org.eclipse.jpt.common.core.propertyTester.Resource"
			type="org.eclipse.core.resources.IResource"
			namespace="org.eclipse.jpt.common.core"
			properties="anyReferencingProjectHasFacet"
			class="org.eclipse.jpt.common.core.internal.bundleexclude.ResourcePropertyTester"/>

	</extension>


	<!-- ***** EMF ecore package registry ***** -->

	<extension
		point="org.eclipse.emf.ecore.generated_package">

		<package
			uri="http://www.eclipse.org/dali/common"
			class="org.eclipse.jpt.common.core.resource.xml.CommonPackage"
			genModel="model/common.genmodel"/>
		
	</extension>


	<!-- ***** resource locators (eat our own dogfood) ***** -->

	<extension
		point="org.eclipse.jpt.common.core.resourceLocators">

		<resourceLocator
			id="simpleJavaResourceLocator"
			class="org.eclipse.jpt.common.core.internal.resource.SimpleJavaResourceLocator"
			priority="lowest">
			<enablement>
				<with variable="project">
					<reference definitionId="org.eclipse.jpt.expression.hasJavaFacet"/>
				</with>
			</enablement>
		</resourceLocator>

		<resourceLocator
			id="moduleResourceLocator"
			class="org.eclipse.jpt.common.core.internal.resource.ModuleResourceLocator"
			priority="lower">
			<enablement>
				<with variable="project">
					<and>
						<test property="org.eclipse.core.resources.projectNature" 
							value="org.eclipse.wst.common.modulecore.ModuleCoreNature" 
							forcePluginActivation="true"/>
						<not><reference definitionId="org.eclipse.jpt.expression.hasStaticWebFacet"/></not>
					</and>
				</with>
			</enablement>
		</resourceLocator>

		<resourceLocator
			id="webModuleResourceLocator"
			class="org.eclipse.jpt.common.core.internal.resource.WebModuleResourceLocator"
			priority="low">
			<enablement>
				<with variable="project">
					<reference definitionId="org.eclipse.jpt.expression.hasDynamicWebFacet"/>
				</with>
			</enablement>
		</resourceLocator>

		<resourceLocator
			id="pluginResourceLocator"
			class="org.eclipse.jpt.common.core.internal.resource.PluginResourceLocator"
			priority="normal">
			<enablement>
				<with variable="project">
					<test property="org.eclipse.core.resources.projectNature" 
						value="org.eclipse.pde.PluginNature" 
						forcePluginActivation="true"/>
				</with>
			</enablement>
		</resourceLocator>

	</extension>


	<!-- ***** WTP library providers ***** -->

	<extension 
		point="org.eclipse.jst.common.project.facet.core.libraryProviders">

		<provider 
			id="jpt-no-op-library-provider" 
			extends="no-op-library-provider"
			abstract="true">
			<param name="warning" value="%NO_OP_LIBRARY_PROVIDER_WARNING"/>
		</provider>

	</extension>

</plugin>

Back to the top