blob: 7207038fd667e8d45008f7cce3b353f713f15063 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<!--
Copyright (c) 2007, 2011 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="jpaPlatforms"
name="%JPA_PLATFORM"
schema="schema/jpaPlatforms.exsd"/>
<!-- ***** Eclipse core extensions ***** -->
<extension
point="org.eclipse.core.contenttype.contentTypes">
<!-- "abstract" content type to be extended by all JPA XML file content types -->
<content-type
id="org.eclipse.jpt.core.content.baseJpaContent"
name="%BASE_JPA_CONTENT"
base-type="org.eclipse.core.runtime.xml"
describer="org.eclipse.jpt.core.internal.resource.contenttypes.IndeterminateContentDescriber">
</content-type>
<!-- persistence.xml content type -->
<content-type
id="org.eclipse.jpt.core.content.persistence"
name="%PERSISTENCE_XML_CONTENT"
base-type="org.eclipse.jpt.core.content.baseJpaContent"
file-names="persistence.xml">
<describer
class="org.eclipse.core.runtime.content.XMLRootElementContentDescriber2">
<parameter
name="element"
value="{http://java.sun.com/xml/ns/persistence}persistence"/>
</describer>
</content-type>
<!-- "abstract" mapping file content type -->
<content-type
id="org.eclipse.jpt.core.content.mappingFile"
name="%MAPPING_FILE_CONTENT"
base-type="org.eclipse.jpt.core.content.baseJpaContent">
</content-type>
<!-- orm.xml content type -->
<content-type
id="org.eclipse.jpt.core.content.orm"
name="%ORM_XML_CONTENT"
base-type="org.eclipse.jpt.core.content.mappingFile">
<describer
class="org.eclipse.core.runtime.content.XMLRootElementContentDescriber2">
<parameter
name="element"
value="{http://java.sun.com/xml/ns/persistence/orm}entity-mappings"/>
</describer>
</content-type>
</extension>
<extension
point="org.eclipse.core.expressions.propertyTesters">
<propertyTester
id="org.eclipse.jpt.core.propertyTester.persistentAttribute"
type="org.eclipse.jpt.core.context.ReadOnlyPersistentAttribute"
namespace="org.eclipse.jpt.core"
properties="isMapped, isVirtual"
class="org.eclipse.jpt.core.internal.context.PersistentAttributePropertyTester"/>
<propertyTester
id="org.eclipse.jpt.core.propertyTester.platformResource"
type="org.eclipse.core.resources.IResource"
namespace="org.eclipse.jpt.core"
properties="jpaPlatform, jpaPlatformGroup"
class="org.eclipse.jpt.core.internal.JpaPlatformTester"/>
<propertyTester
id="org.eclipse.jpt.core.propertyTester.javaElement"
type="org.eclipse.jdt.core.IJavaElement"
namespace="org.eclipse.jpt.core"
properties="jpaPlatform, jpaPlatformGroup"
class="org.eclipse.jpt.core.internal.JpaPlatformTester"/>
<propertyTester
id="org.eclipse.jpt.core.propertyTester.jpaPlatformDescription"
type="org.eclipse.jpt.core.platform.JpaPlatformDescription"
namespace="org.eclipse.jpt.core"
properties="jpaPlatform, jpaPlatformGroup"
class="org.eclipse.jpt.core.internal.JpaPlatformTester"/>
<propertyTester
id="org.eclipse.jpt.core.propertyTester.jpaLibraryProviderConfig"
type="org.eclipse.jpt.core.libprov.JpaLibraryProviderInstallOperationConfig"
namespace="org.eclipse.jpt.core"
properties="jpaPlatform, jpaPlatformGroup"
class="org.eclipse.jpt.core.internal.JpaPlatformTester"/>
<propertyTester
id="org.eclipse.jpt.core.propertyTester.xmlResource"
type="org.eclipse.jpt.core.resource.xml.JpaXmlResource"
namespace="org.eclipse.jpt.core"
properties="isLatestSupportedVersion"
class="org.eclipse.jpt.core.internal.resource.xml.JpaXmlResourcePropertyTester"/>
<propertyTester
id="org.eclipse.jpt.core.propertyTester.xmlFile"
type="org.eclipse.jpt.core.context.XmlFile"
namespace="org.eclipse.jpt.core"
properties="isLatestSupportedVersion"
class="org.eclipse.jpt.core.internal.resource.xml.JpaXmlResourcePropertyTester"/>
</extension>
<extension
point="org.eclipse.core.runtime.adapters">
<factory
class="org.eclipse.jpt.core.internal.ProjectAdapterFactory"
adaptableType="org.eclipse.core.resources.IProject">
<adapter type="org.eclipse.jpt.core.JpaProject"/>
</factory>
<factory
class="org.eclipse.jpt.core.internal.ProjectAdapterFactory"
adaptableType="org.eclipse.jdt.core.IJavaProject">
<adapter type="org.eclipse.jpt.core.JpaProject"/>
</factory>
<factory
class="org.eclipse.jpt.core.internal.resource.xml.JpaXmlResourceAdapterFactory"
adaptableType="org.eclipse.core.resources.IFile">
<adapter type="org.eclipse.jpt.core.resource.xml.JpaXmlResource"/>
</factory>
</extension>
<extension
point="org.eclipse.core.runtime.preferences">
<initializer
class="org.eclipse.jpt.core.internal.prefs.JpaPreferenceInitializer"/>
</extension>
<!-- ***** JPT extensions (eat our own dogfood) ***** -->
<extension
point="org.eclipse.jpt.core.jpaPlatforms">
<jpaPlatformGroup
id="generic"
label="%GENERIC_PLATFORM_GROUP_LABEL"/>
<jpaPlatform
id="generic"
label="%GENERIC_1_0_PLATFORM_LABEL"
factoryClass="org.eclipse.jpt.core.internal.GenericJpaPlatformFactory"
group="generic"
jpaFacetVersion="1.0"
default="false"/>
<jpaPlatform
id="generic2_0"
label="%GENERIC_2_0_PLATFORM_LABEL"
factoryClass="org.eclipse.jpt.core.internal.jpa2.Generic2_0JpaPlatformFactory"
group="generic"
jpaFacetVersion="2.0"
default="false"/>
</extension>
<extension
point="org.eclipse.jpt.common.core.libraryValidators">
<libraryValidator
id="genericUserLibraryValidator"
class="org.eclipse.jpt.core.internal.libval.GenericJpaUserLibraryValidator">
<enablement>
<with variable="libraryProvider">
<test property="org.eclipse.jpt.common.core.extendsId" value="jpa-user-library-provider"/>
</with>
</enablement>
</libraryValidator>
<libraryValidator
id="genericEclipselinkBundlesLibraryValidator"
class="org.eclipse.jpt.core.internal.libval.GenericEclipseLinkBundlesLibraryValidator">
<enablement>
<with variable="libraryProvider">
<test property="org.eclipse.jpt.common.core.extendsId" value="eclipselink-bundles-library-provider"/>
</with>
</enablement>
</libraryValidator>
</extension>
<!--
******************************************
* Library Provider Framework Integration *
******************************************
-->
<extension
point="org.eclipse.jst.common.project.facet.core.legacyLibraryProviderDetectors">
<detector
class="org.eclipse.jpt.core.internal.libprov.LegacyJpaLibraryProviderDetector"/>
</extension>
<extension
point="org.eclipse.jst.common.project.facet.core.libraryProviders">
<provider
id="jpa-legacy-library-provider"
extends="legacy-library-provider"
hidden="true">
<action type="UNINSTALL">
<operation class="org.eclipse.jpt.core.internal.libprov.LegacyJpaLibraryProviderUninstallOperation"/>
</action>
</provider>
<provider
id="jpa-no-op-library-provider"
extends="jpt-no-op-library-provider">
<param name="message" value="%NO_OP_LIBRARY_PROVIDER_MESSAGE"/>
<enablement>
<with variable="requestingProjectFacet">
<test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jpt.jpa" forcePluginActivation="true"/>
</with>
</enablement>
</provider>
<provider
id="jpa-user-library-provider"
extends="wtp-user-library-provider">
<enablement>
<with variable="requestingProjectFacet">
<test property="org.eclipse.wst.common.project.facet.core.projectFacet"
value="jpt.jpa" forcePluginActivation="true"/>
</with>
</enablement>
<action type="INSTALL">
<config class="org.eclipse.jpt.core.internal.libprov.JpaUserLibraryProviderInstallOperationConfig"/>
<operation class="org.eclipse.jst.j2ee.internal.common.classpath.WtpUserLibraryProviderInstallOperation"/>
</action>
</provider>
<provider
id="jpa-deprecated-user-library-provider"
extends="user-library-provider"
abstract="true">
<label>%DEPRECATED_USER_LIBRARY_PROVIDER_LABEL</label>
<action type="INSTALL">
<config class="org.eclipse.jst.common.project.facet.core.libprov.user.UserLibraryProviderInstallOperationConfig"/>
<operation class="org.eclipse.jst.common.project.facet.core.libprov.NoOpLibraryProviderOperation"/>
</action>
</provider>
<provider
id="jpa-generic1_0-user-library-provider"
extends="jpa-deprecated-user-library-provider"
hidden="true">
</provider>
<provider
id="jpa-generic2_0-user-library-provider"
extends="jpa-deprecated-user-library-provider"
hidden="true">
</provider>
<provider
id="jpa-osgi-bundles-library-provider"
extends="wtp-osgi-bundles-library-provider"
abstract="true">
<enablement>
<with variable="requestingProjectFacet">
<test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jpt.jpa" forcePluginActivation="true"/>
</with>
</enablement>
<action type="INSTALL">
<config class="org.eclipse.jpt.core.internal.libprov.JpaOsgiBundlesLibraryProviderInstallOperationConfig"/>
<operation class="org.eclipse.jst.j2ee.internal.common.classpath.WtpOsgiBundlesLibraryProviderInstallOperation"/>
</action>
</provider>
<!--
All osgi library providers that point to eclipselink bundles extend this.
It exists purely as an identifier for library validation.
-->
<provider
id="eclipselink-bundles-library-provider"
extends="jpa-osgi-bundles-library-provider"
abstract="true"/>
<provider
id="eclipselink-102-osgi-bundles-library-provider"
extends="eclipselink-bundles-library-provider">
<label>EclipseLink 1.0.x</label>
<param name="container.label" value="EclipseLink 1.0.x"/>
<param name="bundle.0" value="javax.persistence:[1.0.0, 2.0.0)"/>
<param name="bundle.1" value="org.eclipse.persistence.core:[1.0.0, 1.1.0)"/>
<param name="bundle.2" value="org.eclipse.persistence.jpa:[1.0.0, 1.1.0)"/>
<param name="bundle.3" value="org.eclipse.persistence.asm:[1.0.0, 1.1.0)"/>
<param name="bundle.4" value="org.eclipse.persistence.antlr:[1.0.0, 1.1.0)"/>
<enablement>
<with variable="requestingProjectFacet">
<test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jpt.jpa:1.0"/>
</with>
</enablement>
</provider>
<provider
id="eclipselink-110-osgi-bundles-library-provider"
extends="eclipselink-bundles-library-provider">
<label>EclipseLink 1.1.x</label>
<param name="container.label" value="EclipseLink 1.1.x"/>
<param name="bundle.0" value="javax.persistence:[1.99.0, 2.1.0)"/>
<param name="bundle.1" value="org.eclipse.persistence.core:[1.1.0, 1.2.0)"/>
<param name="bundle.2" value="org.eclipse.persistence.jpa:[1.1.0, 1.2.0)"/>
<param name="bundle.3" value="org.eclipse.persistence.asm:[1.1.0, 1.2.0)"/>
<param name="bundle.4" value="org.eclipse.persistence.antlr:[1.1.0, 1.2.0)"/>
<enablement>
<with variable="requestingProjectFacet">
<test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jpt.jpa:1.0"/>
</with>
</enablement>
</provider>
<provider
id="eclipselink-120-osgi-bundles-library-provider"
extends="eclipselink-bundles-library-provider">
<label>EclipseLink 1.2.x</label>
<param name="container.label" value="EclipseLink 1.2.x"/>
<param name="bundle.0" value="javax.persistence:[1.99.0, 2.1.0)"/>
<param name="bundle.1" value="org.eclipse.persistence.core:[1.2.0, 1.3.0)"/>
<param name="bundle.2" value="org.eclipse.persistence.jpa:[1.2.0, 1.3.0)"/>
<param name="bundle.3" value="org.eclipse.persistence.asm:[1.2.0, 1.3.0)"/>
<param name="bundle.4" value="org.eclipse.persistence.antlr:[1.2.0, 1.3.0)"/>
<enablement>
<with variable="requestingProjectFacet">
<test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jpt.jpa:1.0"/>
</with>
</enablement>
</provider>
<provider
id="eclipselink-200-osgi-bundles-library-provider"
extends="eclipselink-bundles-library-provider">
<label>EclipseLink 2.0.x</label>
<param name="container.label" value="EclipseLink 2.0.x"/>
<param name="bundle.0" value="javax.persistence:[2.0.0, 2.1.0)"/>
<param name="bundle.1" value="org.eclipse.persistence.core:[2.0.0, 2.1.0)"/>
<param name="bundle.2" value="org.eclipse.persistence.jpa:[2.0.0, 2.1.0)"/>
<param name="bundle.3" value="org.eclipse.persistence.asm:[2.0.0, 2.1.0)"/>
<param name="bundle.4" value="org.eclipse.persistence.antlr:[2.0.0, 2.1.0)"/>
</provider>
<provider
id="eclipselink-210-osgi-bundles-library-provider"
extends="eclipselink-bundles-library-provider">
<label>EclipseLink 2.1.x</label>
<param name="container.label" value="EclipseLink 2.1.x"/>
<param name="bundle.0" value="javax.persistence:[2.0.0, 2.1.0)"/>
<param name="bundle.1" value="org.eclipse.persistence.core:[2.1.0, 2.2.0)"/>
<param name="bundle.2" value="org.eclipse.persistence.jpa:[2.1.0, 2.2.0)"/>
<param name="bundle.3" value="org.eclipse.persistence.asm:[2.1.0, 2.2.0)"/>
<param name="bundle.4" value="org.eclipse.persistence.antlr:[2.1.0, 2.2.0)"/>
</provider>
</extension>
<!-- ***** WTP extensions ***** -->
<extension
point="org.eclipse.wst.common.modulecore.resourceFactories">
<resourceFactory
class="org.eclipse.jpt.core.resource.persistence.PersistenceXmlResourceFactory"
isDefault="true">
<contentTypeBinding
contentTypeId="org.eclipse.jpt.core.content.persistence">
</contentTypeBinding>
</resourceFactory>
<resourceFactory
class="org.eclipse.jpt.core.resource.orm.OrmXmlResourceFactory"
isDefault="true">
<contentTypeBinding
contentTypeId="org.eclipse.jpt.core.content.orm">
</contentTypeBinding>
</resourceFactory>
</extension>
<extension
point="org.eclipse.wst.common.project.facet.core.facets">
<project-facet id="jpt.jpa">
<label>%JPA_FACET_LABEL</label>
<description>%JPA_FACET_DESCRIPTION</description>
</project-facet>
<project-facet-version facet="jpt.jpa" version="1.0">
<constraint>
<requires facet="java" version="[5.0"/>
</constraint>
</project-facet-version>
<project-facet-version facet="jpt.jpa" version="2.0">
<constraint>
<requires facet="java" version="[5.0"/>
</constraint>
</project-facet-version>
<template id="jpt.jpa.template">
<label>%JPA_TEMPLATE_LABEL</label>
<fixed facet="jpt.jpa"/>
<fixed facet="java"/>
<!--
<preset id="jpt.jpa.2_0.preset"/>
-->
</template>
<action facet="jpt.jpa" type="install" id="jpt.jpa.install">
<config-factory class="org.eclipse.jpt.core.internal.facet.JpaFacetInstallDataModelProvider"/>
<delegate class="org.eclipse.jpt.core.internal.facet.JpaFacetInstallDelegate"/>
</action>
<!--
The uninstall action is only used to enable facet uninstallation
through the facet UI. The delegate currently has no functionality.
-->
<action facet="jpt.jpa" type="uninstall" id="jpt.jpa.uninstall">
<delegate class="org.eclipse.jpt.core.internal.facet.JpaFacetUninstallDelegate"/>
</action>
<!--
The version change
-->
<action facet="jpt.jpa" type="version-change" id="jpt.jpa.version-change">
<config-factory class="org.eclipse.jpt.core.internal.facet.JpaFacetVersionChangeDataModelProvider"/>
<delegate class="org.eclipse.jpt.core.internal.facet.JpaFacetVersionChangeDelegate"/>
</action>
</extension>
<extension
point="org.eclipse.wst.common.project.facet.core.listeners">
<listener
class="org.eclipse.jpt.core.internal.facet.RuntimeChangedListener"
eventTypes="TARGETED_RUNTIMES_CHANGED"/>
</extension>
<extension
point="org.eclipse.wst.common.project.facet.core.runtimes">
<supported>
<facet id="jpt.jpa"/>
<runtime-component any="true"/>
</supported>
</extension>
<extension
point="org.eclipse.wst.validation.validatorV2"
id="jpaValidator"
name="%JPA_VALIDATOR">
<validator
class="org.eclipse.jpt.core.internal.validation.JpaValidator"
markerId="org.eclipse.jpt.core.jpaProblemMarker">
<include>
<rules>
<facet id="jpt.jpa"/>
</rules>
</include>
<include>
<rules>
<contentType id="org.eclipse.jdt.core.javaSource" exactMatch="false"/>
<contentType id="org.eclipse.jpt.core.content.jar"/>
<contentType id="org.eclipse.jpt.core.content.baseJpaContent" exactMatch="false"/>
</rules>
</include>
</validator>
</extension>
<!-- =================================================================================== -->
<!-- Extension: JPA Problem Marker -->
<!-- **** Do NOT qualify the marker id with org.eclipse.jpt.core, see bug 252891 -->
<!-- =================================================================================== -->
<extension
point="org.eclipse.core.resources.markers"
id="jpaProblemMarker"
name="%JPA_PROBLEM">
<persistent value="true"/>
<!-- Can't use text marker until we have specific models for each input type (XML, java)
<super type="org.eclipse.core.resources.textmarker"/>
-->
<super type="org.eclipse.wst.validation.problemmarker2"/>
<super type="org.eclipse.jdt.core.problem"/>
</extension>
<extension
point="org.eclipse.ltk.core.refactoring.deleteParticipants">
<deleteParticipant
class="org.eclipse.jpt.core.internal.refactoring.JpaDeleteTypeParticipant"
id="org.eclipse.jpt.core.refactoring.jpaDeleteTypeParticipant"
name="%JPA_DELETE_TYPE_PARTICIPANT_NAME">
<enablement>
<with variable="element">
<instanceof value="org.eclipse.jdt.core.IType"/>
</with>
</enablement>
</deleteParticipant>
<deleteParticipant
class="org.eclipse.jpt.core.internal.refactoring.JpaDeletePackageOrFolderParticipant"
id="org.eclipse.jpt.core.refactoring.jpaDeletePackageOrFolderParticipant"
name="%JPA_DELETE_PACKAGE_OR_FOLDER_PARTICIPANT_NAME">
<enablement>
<with variable="element">
<or>
<instanceof value="org.eclipse.jdt.core.IPackageFragment"/>
<instanceof value="org.eclipse.core.resources.IFolder"/>
</or>
</with>
</enablement>
</deleteParticipant>
<deleteParticipant
class="org.eclipse.jpt.core.internal.refactoring.JpaDeleteMappingFileParticipant"
id="org.eclipse.jpt.core.refactoring.jpaDeleteMappingFileParticipant"
name="%JPA_DELETE_MAPPING_FILE_PARTICIPANT_NAME">
<enablement>
<with variable="element">
<and>
<instanceof value="org.eclipse.core.resources.IFile"/>
<test
args="kindOf"
property="org.eclipse.core.resources.contentTypeId"
value="org.eclipse.jpt.core.content.mappingFile"/>
</and>
</with>
</enablement>
</deleteParticipant>
</extension>
<extension
point="org.eclipse.ltk.core.refactoring.moveParticipants">
<moveParticipant
class="org.eclipse.jpt.core.internal.refactoring.JpaMoveTypeParticipant"
id="org.eclipse.jpt.core.ltk.jpaMoveTypeParticipant"
name="%JPA_MOVE_TYPE_PARTICIPANT_NAME">
<enablement>
<with variable="element">
<instanceof value="org.eclipse.jdt.core.IType"/>
</with>
</enablement>
</moveParticipant>
</extension>
<extension
point="org.eclipse.ltk.core.refactoring.renameParticipants">
<renameParticipant
class="org.eclipse.jpt.core.internal.refactoring.JpaRenameTypeParticipant"
id="org.eclipse.jpt.core.ltk.jpaRenameTypeParticipant"
name="%JPA_RENAME_TYPE_PARTICIPANT_NAME">
<enablement>
<with variable="element">
<instanceof value="org.eclipse.jdt.core.IType"/>
</with>
</enablement>
</renameParticipant>
<renameParticipant
class="org.eclipse.jpt.core.internal.refactoring.JpaRenamePackageParticipant"
id="org.eclipse.jpt.core.ltk.jpaRenamePackageParticipant"
name="%JPA_RENAME_PACKAGE_PARTICIPANT_NAME">
<enablement>
<with variable="element">
<instanceof value="org.eclipse.jdt.core.IPackageFragment"/>
</with>
</enablement>
</renameParticipant>
<renameParticipant
class="org.eclipse.jpt.core.internal.refactoring.JpaRenameFolderParticipant"
id="org.eclipse.jpt.core.ltk.jpaRenameFolderParticipant"
name="%JPA_RENAME_FOLDER_PARTICIPANT_NAME">
<enablement>
<with variable="element">
<instanceof value="org.eclipse.core.resources.IFolder"/>
</with>
</enablement>
</renameParticipant>
<renameParticipant
class="org.eclipse.jpt.core.internal.refactoring.JpaRenameMappingFileParticipant"
id="org.eclipse.jpt.core.ltk.jpaRenameMappingFileParticipant"
name="%JPA_RENAME_MAPPING_FILE_PARTICIPANT_NAME">
<enablement>
<with variable="element">
<and>
<instanceof value="org.eclipse.core.resources.IFile"/>
<test
args="kindOf"
property="org.eclipse.core.resources.contentTypeId"
value="org.eclipse.jpt.core.content.mappingFile"/>
</and>
</with>
</enablement>
</renameParticipant>
</extension>
<extension
point="org.eclipse.ltk.core.refactoring.moveParticipants">
<moveParticipant
class="org.eclipse.jpt.core.internal.refactoring.JpaMoveMappingFileParticipant"
id="org.eclipse.jpt.core.ltk.jpaMoveMappingFileParticipant"
name="%JPA_MOVE_MAPPING_FILE_PARTICIPANT_NAME">
<enablement>
<with variable="element">
<and>
<instanceof value="org.eclipse.core.resources.IFile"/>
<test
args="kindOf"
property="org.eclipse.core.resources.contentTypeId"
value="org.eclipse.jpt.core.content.mappingFile"/>
</and>
</with>
</enablement>
</moveParticipant>
<moveParticipant
class="org.eclipse.jpt.core.internal.refactoring.JpaMoveFolderParticipant"
id="org.eclipse.jpt.core.ltk.jpaMoveFolderParticipant"
name="%JPA_MOVE_FOLDER_PARTICIPANT_NAME">
<enablement>
<with variable="element">
<instanceof value="org.eclipse.core.resources.IFolder"/>
</with>
</enablement>
</moveParticipant>
</extension>
</plugin>