blob: 6be37f508705b652dc63d70d2469799aafc3a934 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<!--
Copyright (c) 2010, 2012 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="jaxbPlatforms"
name="%JAXB_PLATFORMS"
schema="schema/jaxbPlatforms.exsd"/>
<!-- ***** adapters ***** -->
<extension
point="org.eclipse.core.runtime.adapters">
<factory
class="org.eclipse.jpt.jaxb.core.internal.ResourceAdapterFactory"
adaptableType="org.eclipse.core.resources.IResource">
<adapter type="org.eclipse.jpt.jaxb.core.platform.JaxbPlatformDescription"/>
</factory>
<factory
class="org.eclipse.jpt.jaxb.core.internal.JavaElementAdapterFactory"
adaptableType="org.eclipse.jdt.core.IJavaElement">
<adapter type="org.eclipse.jpt.jaxb.core.platform.JaxbPlatformDescription"/>
</factory>
<!-- IPackageFragment -> JaxbPackage -->
<factory
class="org.eclipse.jpt.jaxb.core.internal.context.JaxbPackageAdapterFactory"
adaptableType="org.eclipse.jdt.core.IPackageFragment">
<adapter type="org.eclipse.jpt.jaxb.core.context.JaxbPackage"/>
</factory>
<factory
class="org.eclipse.jpt.jaxb.core.internal.libprov.JaxbLibraryProviderInstallOperationConfigAdapterFactory"
adaptableType="org.eclipse.jpt.jaxb.core.libprov.JaxbLibraryProviderInstallOperationConfig">
<adapter type="org.eclipse.jpt.jaxb.core.platform.JaxbPlatformDescription"/>
</factory>
</extension>
<!-- ***** content types ***** -->
<extension
point="org.eclipse.core.contenttype.contentTypes">
<content-type
id="org.eclipse.jpt.jaxb.core.content.jaxbIndex"
name="%JAXB_INDEX_CONTENT"
base-type="org.eclipse.core.runtime.text"
priority="high"
file-names="jaxb.index"/>
<content-type
id="org.eclipse.jpt.jaxb.core.content.jaxbProperties"
name="%JAXB_PROPERTIES_CONTENT"
base-type="org.eclipse.jdt.core.javaProperties"
priority="high"
file-names="jaxb.properties"/>
<file-association
content-type="org.eclipse.core.runtime.xml"
file-extensions="xjb"/>
</extension>
<!-- ***** property testers ***** -->
<extension
point="org.eclipse.core.expressions.propertyTesters">
<propertyTester
id="org.eclipse.jpt.jaxb.core.propertyTester.jaxbPlatformDescription"
type="org.eclipse.jpt.jaxb.core.platform.JaxbPlatformDescription"
namespace="org.eclipse.jpt.jaxb.core"
properties="jaxbPlatform, jaxbPlatformGroup"
class="org.eclipse.jpt.jaxb.core.internal.platform.JaxbPlatformTester"/>
<propertyTester
id="org.eclipse.jpt.jaxb.core.propertyTester.jaxbPackage"
type="org.eclipse.jpt.jaxb.core.context.JaxbPackage"
namespace="org.eclipse.jpt.jaxb.core"
properties="hasPackageInfo"
class="org.eclipse.jpt.jaxb.core.internal.context.JaxbPackageTester"/>
</extension>
<!-- ***** markers ***** -->
<!--
*** Do NOT qualify the marker id with "org.eclipse.jpt.jaxb.core".
*** See bug 252891.
-->
<extension
point="org.eclipse.core.resources.markers"
id="jaxbProblemMarker"
name="%JAXB_PROBLEM_MARKER">
<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>
<!-- ***** Dali extensions (eat our own dogfood) ***** -->
<extension
point="org.eclipse.jpt.jaxb.core.jaxbPlatforms">
<jaxbPlatformGroup
id="generic"
label="%GENERIC_PLATFORM_GROUP_LABEL"/>
<jaxbPlatform
id="generic_2_1"
label="%GENERIC_2_1_PLATFORM_LABEL"
factoryClass="org.eclipse.jpt.jaxb.core.internal.jaxb21.GenericJaxb_2_1_PlatformDefinitionFactory"
group="generic"
jaxbFacetVersion="2.1"
default="false"/>
<jaxbPlatform
id="generic_2_2"
label="%GENERIC_2_2_PLATFORM_LABEL"
factoryClass="org.eclipse.jpt.jaxb.core.internal.jaxb22.GenericJaxb_2_2_PlatformDefinitionFactory"
group="generic"
jaxbFacetVersion="2.2"
default="false"/>
</extension>
<extension
point="org.eclipse.jpt.common.core.libraryValidators">
<libraryValidator
id="jaxbJreLibraryValidator"
class="org.eclipse.jpt.jaxb.core.internal.libval.JaxbJreLibraryValidator">
<enablement>
<with variable="libraryProvider">
<test property="org.eclipse.jpt.common.core.extendsId"
value="jaxb-jre-library-provider"/>
</with>
</enablement>
</libraryValidator>
<libraryValidator
id="genericJaxbUserLibraryValidator"
class="org.eclipse.jpt.jaxb.core.internal.libval.GenericJaxbUserLibraryValidator">
<enablement>
<with variable="libraryProvider">
<test property="org.eclipse.jpt.common.core.extendsId"
value="jaxb-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.core.extendsId"
value="eclipselink-bundles-library-provider"/>
</with>
</enablement>
</libraryValidator>
-->
</extension>
<extension
point="org.eclipse.jst.common.project.facet.core.libraryProviders">
<provider
id="jaxb-no-op-library-provider"
extends="jpt-no-op-library-provider">
<param name="message" value="%JAXB_NO_OP_LIBRARY_PROVIDER_MESSAGE"/>
<enablement>
<with variable="requestingProjectFacet">
<test
property="org.eclipse.wst.common.project.facet.core.projectFacet"
value="jpt.jaxb" forcePluginActivation="true"/>
</with>
</enablement>
</provider>
<provider
id="jaxb-jre-library-provider">
<label>%JAXB_JRE_LIBRARY_PROVIDER_LABEL</label>
<priority>900</priority>
<param name="message" value="%JAXB_JRE_LIBRARY_PROVIDER_MESSAGE"/>
<enablement>
<and>
<with variable="requestingProjectFacet">
<test property="org.eclipse.wst.common.project.facet.core.projectFacet"
value="jpt.jaxb" forcePluginActivation="true"/>
</with>
</and>
</enablement>
<action type="INSTALL">
<config class="org.eclipse.jpt.jaxb.core.internal.libprov.JaxbJreLibraryProviderInstallOperationConfig"/>
<operation class="org.eclipse.jst.common.project.facet.core.libprov.NoOpLibraryProviderOperation"/>
</action>
<action type="UNINSTALL">
<operation class="org.eclipse.jst.common.project.facet.core.libprov.NoOpLibraryProviderOperation"/>
</action>
</provider>
<provider
id="jaxb-user-library-provider"
extends="wtp-user-library-provider">
<enablement>
<with variable="requestingProjectFacet">
<test property="org.eclipse.wst.common.project.facet.core.projectFacet"
value="jpt.jaxb" forcePluginActivation="true"/>
</with>
</enablement>
<action type="INSTALL">
<config class="org.eclipse.jpt.jaxb.core.internal.libprov.JaxbUserLibraryProviderInstallOperationConfig"/>
<operation class="org.eclipse.jst.j2ee.internal.common.classpath.WtpUserLibraryProviderInstallOperation"/>
</action>
</provider>
<!--
<provider
id="jaxb-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.jaxb" forcePluginActivation="true"/>
</with>
</enablement>
<action type="INSTALL">
<config class="org.eclipse.jpt.jaxb.core.internal.libprov.JaxbOsgiBundlesLibraryProviderInstallOperationConfig"/>
<operation class="org.eclipse.jst.j2ee.internal.common.classpath.WtpOsgiBundlesLibraryProviderInstallOperation"/>
</action>
</provider>
<provider
id="jaxb-eclipselink-bundles-library-provider"
extends="jaxb-osgi-bundles-library-provider"
abstract="true"/>
-->
</extension>
<!-- ***** WTP facet framework ***** -->
<extension
point="org.eclipse.wst.common.project.facet.core.runtimes">
<supported>
<facet id="jpt.jaxb"/>
<runtime-component any="true"/>
</supported>
</extension>
<extension
point="org.eclipse.wst.common.project.facet.core.facets">
<project-facet id="jpt.jaxb">
<label>%JAXB_FACET_LABEL</label>
<description>%JAXB_FACET_DESCRIPTION</description>
<default-version version="2.1"/>
</project-facet>
<project-facet-version facet="jpt.jaxb" version="2.1">
<constraint>
<requires facet="java" version="[5.0"/>
</constraint>
</project-facet-version>
<project-facet-version facet="jpt.jaxb" version="2.2">
<constraint>
<requires facet="java" version="[5.0"/>
</constraint>
</project-facet-version>
<template id="jpt.jaxb.template">
<label>%JAXB_TEMPLATE_LABEL</label>
<fixed facet="jpt.jaxb"/>
<fixed facet="java"/>
</template>
<action facet="jpt.jaxb" type="install" id="jpt.jaxb.install">
<config-factory class="org.eclipse.jpt.jaxb.core.internal.facet.JaxbFacetInstallDataModelProvider"/>
<delegate class="org.eclipse.jpt.jaxb.core.internal.facet.JaxbFacetInstallDelegate"/>
</action>
<action facet="jpt.jaxb" type="version-change" id="jpt.jaxb.version-change">
<config-factory class="org.eclipse.jpt.jaxb.core.internal.facet.JaxbFacetVersionChangeDataModelProvider"/>
<delegate class="org.eclipse.jpt.jaxb.core.internal.facet.JaxbFacetVersionChangeDelegate"/>
</action>
<action facet="jpt.jaxb" type="uninstall" id="jpt.jaxb.uninstall">
<delegate class="org.eclipse.jpt.jaxb.core.internal.facet.JaxbFacetUninstallDelegate"/>
</action>
</extension>
<!-- ***** WTP validation framework ***** -->
<extension
point="org.eclipse.wst.validation.validatorV2"
id="jaxbValidator"
name="%JAXB_VALIDATOR">
<validator
class="org.eclipse.jpt.jaxb.core.internal.validation.JaxbValidator"
markerId="org.eclipse.jpt.jaxb.core.jaxbProblemMarker">
<include>
<rules>
<facet id="jpt.jaxb"/>
</rules>
</include>
<include>
<rules>
<contentType id="org.eclipse.jdt.core.javaSource" exactMatch="false"/>
<contentType id="org.eclipse.jpt.core.content.javaPackageInfo" exactMatch="false"/>
<contentType id="org.eclipse.jpt.jaxb.core.content.jaxbProperties" exactMatch="false"/>
</rules>
</include>
</validator>
</extension>
</plugin>