blob: 1963347824bce691ec2c1280e5436fcbace27047 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<!--
Copyright (c) 2007, 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="jpaPlatformUis"
name="%JPA_PLATFORM_UI"
schema="schema/jpaPlatformUis.exsd"/>
<!-- ***** expressions ***** -->
<extension
point="org.eclipse.core.expressions.definitions">
<!--
A test for determining whether our current context is within the
JPA Structure View
-->
<definition
id="org.eclipse.jpt.jpa.ui.reference.inJpaStructureView">
<with
variable="activePartId">
<equals
value="org.eclipse.jpt.ui.jpaStructureView"/>
</with>
</definition>
</extension>
<!-- ***** adapters ***** -->
<extension
point="org.eclipse.core.runtime.adapters">
<!-- JpaPlatform -> JpaPlatformUi -->
<factory
adaptableType="org.eclipse.jpt.jpa.core.JpaPlatform"
class="org.eclipse.jpt.jpa.ui.internal.JpaPlatformAdapterFactory">
<adapter type="org.eclipse.jpt.jpa.ui.JpaPlatformUi"/>
</factory>
<!-- IProject
-> JpaProjectModel
-> JpaRootContextNodeModel
-->
<factory
adaptableType="org.eclipse.core.resources.IProject"
class="org.eclipse.jpt.jpa.ui.internal.ProjectAdapterFactory">
<adapter type="org.eclipse.jpt.jpa.ui.JpaProjectModel"/>
<adapter type="org.eclipse.jpt.jpa.ui.JpaRootContextNodeModel"/>
</factory>
<!-- IFile -> JpaFileModel -->
<factory
adaptableType="org.eclipse.core.resources.IFile"
class="org.eclipse.jpt.jpa.ui.internal.FileAdapterFactory">
<adapter type="org.eclipse.jpt.jpa.ui.JpaFileModel"/>
</factory>
<!-- JpaStructureNode -> JpaDetailsPageManager.Factory -->
<factory
adaptableType="org.eclipse.jpt.jpa.core.JpaStructureNode"
class="org.eclipse.jpt.jpa.ui.internal.JpaStructureNodeAdapterFactory">
<adapter type="org.eclipse.jpt.jpa.ui.details.JpaDetailsPageManager$Factory"/>
</factory>
<!-- IWorkbench -> JpaSelectionManager -->
<factory
adaptableType="org.eclipse.ui.IWorkbench"
class="org.eclipse.jpt.jpa.ui.internal.selection.WorkbenchAdapterFactory">
<adapter type="org.eclipse.jpt.jpa.ui.selection.JpaSelectionManager"/>
</factory>
<!-- IWorkbenchWindow -> JpaSelectionManager -->
<factory
adaptableType="org.eclipse.ui.IWorkbenchWindow"
class="org.eclipse.jpt.jpa.ui.internal.selection.WorkbenchWindowAdapterFactory">
<adapter type="org.eclipse.jpt.jpa.ui.selection.JpaSelectionManager"/>
</factory>
<!-- ITextEditor -> JpaEditorManager -->
<factory
adaptableType="org.eclipse.ui.texteditor.ITextEditor"
class="org.eclipse.jpt.jpa.ui.internal.selection.TextEditorAdapterFactory">
<adapter type="org.eclipse.jpt.jpa.ui.selection.JpaEditorManager"/>
</factory>
<!-- IViewPart -> JpaViewManager.PageManager -->
<factory
adaptableType="org.eclipse.ui.IViewPart"
class="org.eclipse.jpt.jpa.ui.internal.selection.ViewPartAdapterFactory">
<adapter type="org.eclipse.jpt.jpa.ui.selection.JpaViewManager$PageManager"/>
</factory>
</extension>
<!-- ***** Java/XML completion proposal computers ***** -->
<extension
point="org.eclipse.jdt.ui.javaCompletionProposalComputer"
id="jpaProposalCategory"
name="%JpaProposalCategory">
<proposalCategory
icon="$nl$/icons/full/eview16/jpa_perspective.gif">
<enablement>
<with variable="project">
<adapt
type="org.eclipse.core.resources.IProject">
<test
property="org.eclipse.wst.common.project.facet.core.projectFacet"
value="jpt.jpa" forcePluginActivation="true"/>
</adapt>
</with>
</enablement>
</proposalCategory>
</extension>
<extension
point="org.eclipse.jdt.ui.javaCompletionProposalComputer"
id="JpaCompletionProposalComputer">
<javaCompletionProposalComputer
class="org.eclipse.jpt.jpa.ui.internal.JpaJavaCompletionProposalComputer"
categoryId="org.eclipse.jpt.jpa.ui.jpaProposalCategory">
<partition type="__dftl_partition_content_type"/>
<partition type="__java_string"/>
</javaCompletionProposalComputer>
</extension>
<extension
point="org.eclipse.jdt.ui.javaCompletionProposalComputer"
id="JpaJpqlCompletionProposalComputer">
<javaCompletionProposalComputer
class="org.eclipse.jpt.jpa.ui.internal.jpql.JpaJpqlJavaCompletionProposalComputer"
activate="true"
categoryId="org.eclipse.jpt.jpa.ui.jpaProposalCategory">
<partition type="__dftl_partition_content_type"/>
<partition type="__java_string"/>
</javaCompletionProposalComputer>
</extension>
<extension
point="org.eclipse.wst.sse.ui.completionProposal"
id="org.eclipse.jpt.jpa.ui.xml.jpqlCompletionProposal">
<proposalCategory
icon="$nl$/icons/full/eview16/jpa_perspective.gif"
id="org.eclipse.jpt.jpa.ui.xml.jpqlProposalCategory"
name="%JpaProposalCategory">
</proposalCategory>
<proposalComputer
activate="true"
categoryId="org.eclipse.jpt.jpa.ui.xml.jpqlProposalCategory"
class="org.eclipse.jpt.jpa.ui.internal.jpql.JpaJpqlSseCompletionProposalComputer"
id="org.eclipse.jpt.jpa.ui.internal.jpql.JpaJpqlSseCompletionProposalComputer">
<contentType
id="org.eclipse.core.runtime.xml">
</contentType>
</proposalComputer>
</extension>
<!-- ***** Dali extensions (eat our own dogfood) ***** -->
<extension
point="org.eclipse.jpt.jpa.ui.jpaPlatformUis">
<jpaPlatformUi
id="generic.ui"
jpaPlatform="generic"
factoryClass="org.eclipse.jpt.jpa.ui.internal.platform.generic.GenericJpaPlatformUiFactory"/>
<jpaPlatformUi
id="generic2_0.ui"
jpaPlatform="generic2_0"
factoryClass="org.eclipse.jpt.jpa.ui.internal.jpa2.platform.generic.Generic2_0JpaPlatformUiFactory"/>
</extension>
<!-- ***** action sets ***** -->
<extension
point="org.eclipse.ui.actionSets">
<actionSet
description="%JptCreationActionSet.description"
id="org.eclipse.jpt.jpa.ui.JptCreationActionSet"
label="%JptCreationActionSet.label">
<action
class="org.eclipse.jpt.jpa.ui.internal.wizards.NewEntityDropDownAction"
disabledIcon="icons/full/etool16/new_entity_wiz.gif"
icon="icons/full/etool16/new_entity_wiz.gif"
id="org.eclipse.jpt.jpa.ui.NewEntityAction"
label="%NewEntityAction.label"
style="pulldown"
toolbarPath="Normal/JptWizards">
</action>
</actionSet>
</extension>
<!-- ***** commands ***** -->
<extension
point="org.eclipse.ui.commands">
<command
id="org.eclipse.jpt.jpa.ui.convertJavaProjectToJpa"
name="%convertJavaProjectToJpaCommandName"
categoryId="org.eclipse.ui.category.file"
defaultHandler="org.eclipse.jpt.jpa.ui.internal.commands.ConvertJavaProjectToJpaCommandHandler"/>
<command
id="org.eclipse.jpt.jpa.ui.xmlFileUpgradeToLatestVersion"
name="%upgradeToLatestVersion"/>
<category
id="org.eclipse.jpt.jpa.ui.jpaStructureViewCommands"
name="%jpaStructureViewCommandCategory">
</category>
<command
id="org.eclipse.jpt.jpa.ui.entityMappingsAddPersistentClass"
name="%addPersistentClass"
categoryId="org.eclipse.jpt.jpa.ui.jpaStructureViewCommands">
</command>
<command
id="org.eclipse.jpt.jpa.ui.persistentTypeRemovePersistentClass"
name="%removePersistentClass"
categoryId="org.eclipse.jpt.jpa.ui.jpaStructureViewCommands">
</command>
<command
id="org.eclipse.jpt.jpa.ui.persistentAttributeAddToXml"
name="%addPersistentAttributeToXml"
categoryId="org.eclipse.jpt.jpa.ui.jpaStructureViewCommands">
</command>
<command
id="org.eclipse.jpt.jpa.ui.persistentAttributeAddToXmlAndMap"
name="%addPersistentAttributeToXmlAndMap"
categoryId="org.eclipse.jpt.jpa.ui.jpaStructureViewCommands">
</command>
<command
id="org.eclipse.jpt.jpa.ui.persistentAttributeRemoveFromXml"
name="%removePersistentAttributeFromXml"
categoryId="org.eclipse.jpt.jpa.ui.jpaStructureViewCommands">
</command>
<command
id="org.eclipse.jpt.jpa.ui.persistentTypeMapAs"
name="%mapAs"
categoryId="org.eclipse.jpt.jpa.ui.jpaStructureViewCommands">
<commandParameter
id="persistentTypeMappingKey"
name="%mapAsParameterName"
optional="false">
</commandParameter>
</command>
<command
id="org.eclipse.jpt.jpa.ui.persistentAttributeMapAs"
name="%mapAs"
categoryId="org.eclipse.jpt.jpa.ui.jpaStructureViewCommands">
<commandParameter
id="specifiedPersistentAttributeMappingKey"
name="%mapAsSpecifiedMappingParameterName"
optional="false">
</commandParameter>
<commandParameter
id="defaultPersistentAttributeMappingKey"
name="%mapAsDefaultMappingParameterName"
optional="false">
</commandParameter>
</command>
</extension>
<!-- ***** persitence.xml editor ***** -->
<extension
point="org.eclipse.ui.editors">
<editor
class="org.eclipse.jpt.jpa.ui.internal.editors.PersistenceEditor"
contributorClass="org.eclipse.jpt.jpa.ui.internal.editors.PersistenceContributor"
icon="$nl$/icons/full/obj16/jpa-file.gif"
id="org.eclipse.jpt.jpa.ui.internal.editors.PersistenceEditor"
name="%persistenceEditor">
<contentTypeBinding
contentTypeId="org.eclipse.jpt.jpa.core.content.persistence"/>
</editor>
</extension>
<!-- ***** handlers ***** -->
<extension
point="org.eclipse.ui.handlers">
<handler
commandId="org.eclipse.jpt.jpa.ui.xmlFileUpgradeToLatestVersion"
class="org.eclipse.jpt.jpa.ui.internal.commands.UpgradeXmlFileVersionHandler">
<enabledWhen>
<iterate>
<or>
<adapt type="org.eclipse.jpt.jpa.core.context.XmlFile">
<test property="org.eclipse.jpt.jpa.core.isNotLatestSupportedVersion"/>
</adapt>
<adapt type="org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource">
<test property="org.eclipse.jpt.jpa.core.isNotLatestSupportedVersion"/>
</adapt>
</or>
</iterate>
</enabledWhen>
</handler>
<handler
commandId="org.eclipse.jpt.jpa.ui.entityMappingsAddPersistentClass"
class="org.eclipse.jpt.jpa.ui.internal.commands.AddPersistentClassHandler">
<activeWhen>
<reference
definitionId="org.eclipse.jpt.jpa.ui.reference.inJpaStructureView">
</reference>
</activeWhen>
<enabledWhen>
<and>
<count value="1"/>
<iterate>
<instanceof value="org.eclipse.jpt.jpa.core.context.orm.EntityMappings"/>
</iterate>
</and>
</enabledWhen>
</handler>
<handler
commandId="org.eclipse.jpt.jpa.ui.persistentTypeRemovePersistentClass"
class="org.eclipse.jpt.jpa.ui.internal.commands.RemovePersistentClassHandler">
<activeWhen>
<reference
definitionId="org.eclipse.jpt.jpa.ui.reference.inJpaStructureView">
</reference>
</activeWhen>
<enabledWhen>
<iterate>
<instanceof value="org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType"/>
</iterate>
</enabledWhen>
</handler>
<handler
commandId="org.eclipse.jpt.jpa.ui.persistentAttributeAddToXml"
class="org.eclipse.jpt.jpa.ui.internal.commands.AddPersistentAttributeToXmlHandler">
<activeWhen>
<reference
definitionId="org.eclipse.jpt.jpa.ui.reference.inJpaStructureView">
</reference>
</activeWhen>
<enabledWhen>
<iterate>
<and>
<instanceof value="org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute"/>
<test property="org.eclipse.jpt.jpa.core.isVirtual"/>
<test property="org.eclipse.jpt.jpa.core.isMapped"/>
</and>
</iterate>
</enabledWhen>
</handler>
<handler
commandId="org.eclipse.jpt.jpa.ui.persistentAttributeAddToXmlAndMap"
class="org.eclipse.jpt.jpa.ui.internal.commands.AddPersistentAttributeToXmlAndMapHandler">
<activeWhen>
<reference
definitionId="org.eclipse.jpt.jpa.ui.reference.inJpaStructureView">
</reference>
</activeWhen>
<enabledWhen>
<iterate>
<and>
<instanceof value="org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute"/>
<test property="org.eclipse.jpt.jpa.core.isVirtual"/>
</and>
</iterate>
</enabledWhen>
</handler>
<handler
commandId="org.eclipse.jpt.jpa.ui.persistentAttributeRemoveFromXml"
class="org.eclipse.jpt.jpa.ui.internal.commands.RemovePersistentAttributeFromXmlHandler">
<activeWhen>
<reference
definitionId="org.eclipse.jpt.jpa.ui.reference.inJpaStructureView">
</reference>
</activeWhen>
<enabledWhen>
<iterate>
<and>
<instanceof value="org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute"/>
<test property="org.eclipse.jpt.jpa.core.isNotVirtual"/>
</and>
</iterate>
</enabledWhen>
</handler>
<handler
commandId="org.eclipse.jpt.jpa.ui.persistentTypeMapAs"
class="org.eclipse.jpt.jpa.ui.internal.commands.PersistentTypeMapAsHandler">
<activeWhen>
<reference
definitionId="org.eclipse.jpt.jpa.ui.reference.inJpaStructureView"/>
</activeWhen>
<enabledWhen>
<iterate>
<instanceof value="org.eclipse.jpt.jpa.core.context.PersistentType"/>
</iterate>
</enabledWhen>
</handler>
<handler
commandId="org.eclipse.jpt.jpa.ui.persistentAttributeMapAs"
class="org.eclipse.jpt.jpa.ui.internal.commands.PersistentAttributeMapAsHandler">
<activeWhen>
<reference
definitionId="org.eclipse.jpt.jpa.ui.reference.inJpaStructureView"/>
</activeWhen>
<enabledWhen>
<iterate>
<and>
<instanceof value="org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute"/>
<test property="org.eclipse.jpt.jpa.core.isNotVirtual"/>
</and>
</iterate>
</enabledWhen>
</handler>
</extension>
<!-- ***** menus ***** -->
<extension
point="org.eclipse.ui.menus">
<!-- contributions for any popup -->
<menuContribution
locationURI="popup:org.eclipse.ui.popup.any">
<!-- "JPA Tools" submenu for
- anything that adapts to JpaXmlResource (IFile objects, mostly)
- anything that adapts to IProject and has a JPA facet
-->
<menu
id="org.eclipse.jpt.jpa.ui.menu.JpaTools"
label="%jpaMenuName">
<visibleWhen>
<with
variable="selection">
<iterate ifEmpty="false">
<or>
<adapt type="org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource"/>
<adapt type="org.eclipse.core.resources.IProject">
<test
property="org.eclipse.wst.common.project.facet.core.projectFacet"
value="jpt.jpa"/>
</adapt>
<and>
<adapt type="org.eclipse.core.resources.IResource">
<test
property="org.eclipse.wst.common.project.facet.core.projectFacet"
value="jpt.jpa"/>
</adapt>
<adapt type="org.eclipse.jdt.core.IJavaElement"/>
</and>
</or>
</iterate>
</with>
</visibleWhen>
</menu>
<!-- commands for objects that don't need "JPA Tools" submenu -->
<command
commandId="org.eclipse.jpt.jpa.ui.xmlFileUpgradeToLatestVersion">
<visibleWhen>
<with
variable="selection">
<iterate ifEmpty="false">
<adapt type="org.eclipse.jpt.jpa.core.context.XmlFile">
<test property="org.eclipse.jpt.jpa.core.isNotLatestSupportedVersion"/>
</adapt>
</iterate>
</with>
</visibleWhen>
</command>
</menuContribution>
<!-- contributions to the "JPA Tools" submenu -->
<menuContribution
locationURI="popup:org.eclipse.jpt.jpa.ui.menu.JpaTools">
<command
commandId="org.eclipse.jpt.jpa.ui.xmlFileUpgradeToLatestVersion">
<visibleWhen>
<with
variable="selection">
<iterate ifEmpty="false">
<adapt type="org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource">
<test property="org.eclipse.jpt.jpa.core.isNotLatestSupportedVersion"/>
</adapt>
</iterate>
</with>
</visibleWhen>
</command>
</menuContribution>
<!-- contributions to the project configure menu -->
<menuContribution locationURI="popup:org.eclipse.ui.projectConfigure?after=additions">
<command commandId="org.eclipse.jpt.jpa.ui.convertJavaProjectToJpa" style="push">
<visibleWhen checkEnabled="false">
<and>
<count value="1"/>
<iterate ifEmpty="false" operator="and">
<adapt type="org.eclipse.core.resources.IProject">
<and>
<test
property="org.eclipse.core.resources.projectNature"
value="org.eclipse.jdt.core.javanature"/>
<not>
<test
property="org.eclipse.core.resources.projectNature"
value="org.eclipse.wst.common.project.facet.core.nature"/>
</not>
</and>
</adapt>
</iterate>
</and>
</visibleWhen>
</command>
</menuContribution>
<!-- contributions to objects in the JPA structure view -->
<menuContribution
locationURI="popup:org.eclipse.jpt.ui.jpaStructureView">
<command
commandId="org.eclipse.jpt.jpa.ui.entityMappingsAddPersistentClass">
<visibleWhen>
<with
variable="selection">
<iterate ifEmpty="false">
<instanceof value="org.eclipse.jpt.jpa.core.context.orm.EntityMappings"/>
</iterate>
</with>
</visibleWhen>
</command>
<command
commandId="org.eclipse.jpt.jpa.ui.persistentTypeRemovePersistentClass">
<visibleWhen>
<with
variable="selection">
<iterate ifEmpty="false">
<instanceof value="org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType"/>
</iterate>
</with>
</visibleWhen>
</command>
<command
commandId="org.eclipse.jpt.jpa.ui.persistentAttributeAddToXml">
<visibleWhen>
<with
variable="selection">
<iterate ifEmpty="false">
<and>
<instanceof value="org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute"/>
<test property="org.eclipse.jpt.jpa.core.isVirtual"/>
</and>
</iterate>
</with>
</visibleWhen>
</command>
<command
commandId="org.eclipse.jpt.jpa.ui.persistentAttributeAddToXmlAndMap">
<visibleWhen>
<with
variable="selection">
<iterate ifEmpty="false">
<and>
<instanceof value="org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute"/>
<test property="org.eclipse.jpt.jpa.core.isVirtual"/>
</and>
</iterate>
</with>
</visibleWhen>
</command>
<command
commandId="org.eclipse.jpt.jpa.ui.persistentAttributeRemoveFromXml">
<visibleWhen>
<with
variable="selection">
<iterate ifEmpty="false">
<and>
<instanceof value="org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute"/>
<test property="org.eclipse.jpt.jpa.core.isNotVirtual"/>
</and>
</iterate>
</with>
</visibleWhen>
</command>
<menu
id="org.eclipse.jpt.jpa.ui.persistentTypeMapAs"
label="%mapAs"
mnemonic="%mapAsMnemonic">
<visibleWhen>
<with
variable="selection">
<iterate ifEmpty="false">
<instanceof value="org.eclipse.jpt.jpa.core.context.PersistentType"/>
</iterate>
</with>
</visibleWhen>
<dynamic
id="org.eclipse.jpt.jpa.ui.persistentTypeMapAs"
class="org.eclipse.jpt.jpa.ui.internal.menus.PersistentTypeMapAsContribution">
</dynamic>
</menu>
<menu
id="org.eclipse.jpt.jpa.ui.persistentAttributeMapAs"
label="%mapAs"
mnemonic="%mapAsMnemonic">
<visibleWhen>
<with
variable="selection">
<iterate ifEmpty="false">
<and>
<instanceof value="org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute"/>
<test property="org.eclipse.jpt.jpa.core.isNotVirtual"/>
</and>
</iterate>
</with>
</visibleWhen>
<dynamic
id="org.eclipse.jpt.jpa.ui.persistentAttributeMapAs"
class="org.eclipse.jpt.jpa.ui.internal.menus.PersistentAttributeMapAsContribution">
</dynamic>
</menu>
</menuContribution>
</extension>
<!-- ***** Project Explorer contribution ***** -->
<extension
point="org.eclipse.ui.navigator.viewer">
<viewerContentBinding
viewerId="org.eclipse.ui.navigator.ProjectExplorer">
<includes>
<contentExtension pattern="org.eclipse.jpt.jpa.ui.*"/>
</includes>
</viewerContentBinding>
</extension>
<!-- ***** navigator content ***** -->
<extension
point="org.eclipse.ui.navigator.navigatorContent">
<navigatorContent
id="org.eclipse.jpt.jpa.ui.jpaNavigatorContent"
name="%jpaNavigatorContent"
priority="higher"
appearsBefore="org.eclipse.jst.servlet.ui.EnhancedJavaRendering"
icon="icons/full/obj16/jpa-content.gif"
activeByDefault="true"
contentProvider="org.eclipse.jpt.jpa.ui.internal.navigator.JpaNavigatorContentProvider"
labelProvider="org.eclipse.jpt.common.ui.internal.jface.NavigatorLabelProvider">
<triggerPoints>
<or>
<instanceof value="org.eclipse.jpt.jpa.core.context.JpaContextNode"/>
<instanceof value="org.eclipse.jpt.jpa.ui.JpaRootContextNodeModel"/>
<adapt type="org.eclipse.core.resources.IProject">
<test
property="org.eclipse.wst.common.project.facet.core.projectFacet"
value="jpt.jpa"
forcePluginActivation="true"/>
</adapt>
</or>
</triggerPoints>
<possibleChildren>
<instanceof value="org.eclipse.jpt.jpa.core.context.JpaContextNode"/>
</possibleChildren>
<actionProvider
class="org.eclipse.jpt.jpa.ui.internal.navigator.JpaNavigatorActionProvider"
id="org.eclipse.jpt.jpa.ui.jpaActionProvider">
<enablement>
<instanceof value="org.eclipse.jpt.jpa.core.context.JpaContextNode"/>
</enablement>
</actionProvider>
<commonWizard
menuGroupId="org.eclipse.jpt.jpa.ui"
type="new"
wizardId="org.eclipse.jpt.jpa.ui.wizard.newEntity">
<enablement>
<and>
<or>
<instanceof value="org.eclipse.core.resources.IProject"/>
<instanceof value="org.eclipse.jdt.core.IPackageFragment"/>
<instanceof value="org.eclipse.jdt.core.IPackageFragmentRoot"/>
</or>
<adapt type="org.eclipse.core.resources.IResource">
<test
property="org.eclipse.wst.common.project.facet.core.projectFacet"
value="jpt.jpa"
forcePluginActivation="true"/>
</adapt>
</and>
</enablement>
</commonWizard>
<commonWizard
menuGroupId="org.eclipse.jpt.jpa.ui"
type="new"
wizardId="org.eclipse.jpt.jpa.ui.wizard.newMappingFile">
<enablement>
<and>
<or>
<instanceof value="org.eclipse.core.resources.IProject"/>
<instanceof value="org.eclipse.core.resources.IFolder"/>
<instanceof value="org.eclipse.jdt.core.IPackageFragmentRoot"/>
<instanceof value="org.eclipse.jdt.core.IPackageFragment"/>
</or>
<adapt type="org.eclipse.core.resources.IResource">
<test
property="org.eclipse.wst.common.project.facet.core.projectFacet"
value="jpt.jpa"
forcePluginActivation="true"/>
</adapt>
</and>
</enablement>
</commonWizard>
<commonWizard
menuGroupId="org.eclipse.jpt.jpa.ui"
type="new"
wizardId="org.eclipse.jpt.jpa.ui.wizard.newEntitiesFromTables">
<enablement>
<and>
<or>
<instanceof value="org.eclipse.core.resources.IProject"/>
<instanceof value="org.eclipse.jdt.core.IPackageFragment"/>
<instanceof value="org.eclipse.jdt.core.IPackageFragmentRoot"/>
</or>
<adapt type="org.eclipse.core.resources.IResource">
<test
property="org.eclipse.wst.common.project.facet.core.projectFacet"
value="jpt.jpa"
forcePluginActivation="true"/>
</adapt>
</and>
</enablement>
</commonWizard>
</navigatorContent>
</extension>
<!-- ***** "New Dialog" wizards ***** -->
<extension
point="org.eclipse.ui.newWizards">
<category
id="org.eclipse.jpt.jpa"
name="%jpaWizardCategoryName"/>
<wizard
id="org.eclipse.jpt.jpa.ui.wizard.newJpaProject"
name="%newJpaProjectWizardName"
icon="icons/full/etool16/new_jpaproject_wiz.gif"
category="org.eclipse.jpt.jpa"
project="true"
finalPerspective="org.eclipse.jpt.ui.jpaPerspective">
<description>%newJpaProjectWizardDesc</description>
<class class="org.eclipse.jpt.jpa.ui.internal.wizards.proj.JpaProjectWizard">
<parameter name="menuIndex" value="35"/>
</class>
</wizard>
<wizard
id="org.eclipse.jpt.jpa.ui.wizard.newEntity"
name="%newJpaEntityWizardName"
icon="icons/full/etool16/new_entity_wiz.gif"
category="org.eclipse.jpt.jpa">
<description>%newJpaEntityWizardDesc</description>
<class class="org.eclipse.jpt.jpa.ui.internal.wizards.entity.EntityWizard">
<parameter name="javaeeartifact" value="true"/>
<parameter name="menuIndex" value="38" />
<parameter name="jptartifact" value="true"/>
</class>
</wizard>
<wizard
category="org.eclipse.jpt.jpa"
class="org.eclipse.jpt.jpa.ui.internal.wizards.gen.GenerateEntitiesFromSchemaWizard"
icon="platform:/plugin/org.eclipse.jpt.jpa.ui/icons/full/etool16/new_entity_wiz.gif"
id="org.eclipse.jpt.jpa.ui.wizard.newEntitiesFromTables"
name="%newJpaEntityFromTableWizardName">
<description>%newJpaEntityFromTableWizardDesc</description>
<selection class="org.eclipse.core.resources.IResource"/>
</wizard>
<wizard
id="org.eclipse.jpt.jpa.ui.wizard.newMappingFile"
name="%newJpaMappingFileWizardName"
icon="icons/full/etool16/new_jpa_file_wiz.gif"
category="org.eclipse.jpt.jpa">
<description>%newJpaMappingFileWizardDesc</description>
<class class="org.eclipse.jpt.jpa.ui.internal.wizards.orm.MappingFileWizard">
<parameter name="javaeeartifact" value="true"/>
<parameter name="menuIndex" value="39" />
<parameter name="jptartifact" value="true"/>
</class>
</wizard>
</extension>
<!-- ***** JPA Perspective ***** -->
<extension
point="org.eclipse.ui.perspectives">
<perspective
class="org.eclipse.jpt.jpa.ui.internal.perspective.JpaPerspectiveFactory"
icon="icons/full/eview16/jpa_perspective.gif"
id="org.eclipse.jpt.ui.jpaPerspective"
name="%jpaPerspective">
<description>%jpaPerspectiveDescription</description>
</perspective>
</extension>
<extension
point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension
targetID="org.eclipse.jpt.ui.jpaPerspective">
<newWizardShortcut id="org.eclipse.jpt.jpa.ui.wizard.newJpaProject"/>
<newWizardShortcut id="org.eclipse.jpt.jpa.ui.wizard.newEntity"/>
<newWizardShortcut id="org.eclipse.jpt.jpa.ui.wizard.newMappingFile"/>
<newWizardShortcut id="org.eclipse.jdt.ui.wizards.NewPackageCreationWizard"/>
<newWizardShortcut id="org.eclipse.jdt.ui.wizards.NewClassCreationWizard"/>
<newWizardShortcut id="org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard"/>
<newWizardShortcut id="org.eclipse.jdt.ui.wizards.NewEnumCreationWizard"/>
<newWizardShortcut id="org.eclipse.jdt.ui.wizards.NewAnnotationCreationWizard"/>
<newWizardShortcut id="org.eclipse.jdt.ui.wizards.NewSourceFolderCreationWizard"/>
<newWizardShortcut id="org.eclipse.jdt.ui.wizards.NewJavaWorkingSetWizard"/>
<newWizardShortcut id="org.eclipse.ui.wizards.new.file"/>
<newWizardShortcut id="org.eclipse.ui.wizards.new.folder"/>
<newWizardShortcut id="org.eclipse.ui.editors.wizards.UntitledTextFileWizard"/>
<perspectiveShortcut id="org.eclipse.jdt.ui.JavaPerspective"/>
<perspectiveShortcut id="org.eclipse.debug.ui.DebugPerspective"/>
<perspectiveShortcut id="org.eclipse.jst.j2ee.J2EEPerspective"/>
<perspectiveShortcut id="org.eclipse.jdt.ui.JavaBrowsingPerspective"/>
<actionSet id="org.eclipse.debug.ui.launchActionSet"/>
<actionSet id="org.eclipse.jdt.ui.JavaActionSet"/>
<actionSet id="org.eclipse.jdt.ui.JavaElementCreationActionSet"/>
<actionSet id="org.eclipse.ui.NavigateActionSet"/>
<actionSet id="org.eclipse.jpt.jpa.ui.JptCreationActionSet"/>
<viewShortcut id="org.eclipse.jdt.ui.PackageExplorer"/>
<viewShortcut id="org.eclipse.jdt.ui.TypeHierarchy"/>
<viewShortcut id="org.eclipse.jdt.ui.SourceView"/>
<viewShortcut id="org.eclipse.jdt.ui.JavadocView"/>
<viewShortcut id="org.eclipse.ui.navigator.ProjectExplorer"/>
<viewShortcut id="org.eclipse.ui.views.ContentOutline"/>
<viewShortcut id="org.eclipse.ui.views.ProblemView"/>
<viewShortcut id="org.eclipse.ui.views.ResourceNavigator"/>
<viewShortcut id="org.eclipse.jpt.ui.jpaStructureView"/>
<viewShortcut id="org.eclipse.jpt.ui.jpaDetailsView"/>
<viewShortcut id="org.eclipse.datatools.connectivity.DataSourceExplorerNavigator"/>
</perspectiveExtension>
<perspectiveExtension
targetID="org.eclipse.jst.j2ee.J2EEPerspective">
<newWizardShortcut id="org.eclipse.jpt.jpa.ui.wizard.newJpaProject"/>
<perspectiveShortcut id="org.eclipse.jpt.ui.jpaPerspective"/>
</perspectiveExtension>
</extension>
<!-- ***** pop-up menus ***** -->
<extension
point="org.eclipse.ui.popupMenus">
<objectContribution
id="org.eclipse.jpt.jpa.ui.project.JPATools"
objectClass="org.eclipse.core.resources.IProject"
adaptable="true">
<!-- ignore the warning - see bug 247250 -->
<enablement>
<test
property="org.eclipse.wst.common.project.facet.core.projectFacet"
value="jpt.jpa"/>
</enablement>
<action
id="org.eclipse.jpt.jpa.ui.generateEntities"
label="%generateEntities"
class="org.eclipse.jpt.jpa.ui.internal.actions.GenerateEntitiesAction"
enablesFor="1"
menubarPath="org.eclipse.jpt.jpa.ui.menu.JpaTools/content"/>
<action
id="org.eclipse.jpt.jpa.ui.generateDDL"
label="%generateDDL"
class="org.eclipse.jpt.jpa.ui.internal.actions.GenerateDDLAction"
enablesFor="1"
menubarPath="org.eclipse.jpt.jpa.ui.menu.JpaTools/content"/>
</objectContribution>
<objectContribution
id="org.eclipse.jpt.jpa.ui.MakePersistent"
objectClass="org.eclipse.jdt.core.IJavaElement"
adaptable="true">
<action
class="org.eclipse.jpt.jpa.ui.internal.actions.MakePersistentAction"
enablesFor="*"
id="org.eclipse.jpt.jpa.ui.generateEntities"
label="%makePersistent"
menubarPath="org.eclipse.jpt.jpa.ui.menu.JpaTools/content">
<enablement>
<or>
<objectClass name="org.eclipse.jdt.core.ICompilationUnit"/>
<objectClass name="org.eclipse.jdt.core.IType"/>
<objectClass name="org.eclipse.jdt.core.IPackageFragment"/>
<objectClass name="org.eclipse.jdt.core.IPackageFragmentRoot"/>
</or>
</enablement>
</action>
</objectContribution>
<objectContribution
id="org.eclipse.jpt.jpa.ui.persistenceXmlFileActions"
objectClass="org.eclipse.core.resources.IFile"
nameFilter="persistence.xml">
<action
id="synchClassesAction"
label="%synchronizeClasses"
menubarPath="org.eclipse.jpt.jpa.ui.menu.JpaTools/content"
class="org.eclipse.jpt.jpa.ui.internal.actions.SynchronizeClassesAction"
enablesFor="1"/>
</objectContribution>
<objectContribution
id="org.eclipse.jpt.jpa.ui.persistenceXmlActions"
objectClass="org.eclipse.jpt.jpa.core.context.persistence.PersistenceXml">
<action
id="synchClassesAction"
label="%synchronizeClasses"
menubarPath="content"
class="org.eclipse.jpt.jpa.ui.internal.actions.SynchronizeClassesAction"
enablesFor="1"/>
</objectContribution>
</extension>
<!-- ***** preferences ***** -->
<extension
point="org.eclipse.ui.preferencePages">
<page
id="org.eclipse.jpt.jpa.ui.preferences"
name="%javaPersistenceNode"
class="org.eclipse.jpt.jpa.ui.internal.preferences.JptPreferencesPage"/>
<page
id="org.eclipse.jpt.jpa.ui.jpaPreferences"
category="org.eclipse.jpt.jpa.ui.preferences"
class="org.eclipse.jpt.jpa.ui.internal.preferences.JpaPreferencesPage"
name="%jpaNode"/>
<page
id="org.eclipse.jpt.jpa.ui.jpaProblemSeveritiesPreferences"
category="org.eclipse.jpt.jpa.ui.jpaPreferences"
class="org.eclipse.jpt.jpa.ui.internal.preferences.JpaProblemSeveritiesPage"
name="%jpaProblemSeveritiesNode">
</page>
</extension>
<extension
point="org.eclipse.core.runtime.preferences"
id="org.eclipse.jpt.jpa.ui">
<initializer
class="org.eclipse.jpt.jpa.ui.internal.prefs.JpaUiPreferenceInitializer">
</initializer>
</extension>
<!-- ***** JPA project properties pages ***** -->
<extension
point="org.eclipse.ui.propertyPages">
<page
id="org.eclipse.jpt.jpa.ui.jpaProjectProperties"
name="%jpaNode"
class="org.eclipse.jpt.jpa.ui.internal.properties.JpaProjectPropertiesPage">
<enabledWhen>
<adapt type="org.eclipse.core.resources.IProject">
<test
property="org.eclipse.wst.common.project.facet.core.projectFacet"
value="jpt.jpa"
forcePluginActivation="true"/>
</adapt>
</enabledWhen>
</page>
<page
id="org.eclipse.jpt.jpa.ui.jpaProblemSeveritiesProperties"
name="%jpaProblemSeveritiesNode"
category="org.eclipse.jpt.jpa.ui.jpaProjectProperties"
class="org.eclipse.jpt.jpa.ui.internal.preferences.JpaProblemSeveritiesPage">
<enabledWhen>
<adapt type="org.eclipse.core.resources.IProject">
<test
property="org.eclipse.wst.common.project.facet.core.projectFacet"
value="jpt.jpa"
forcePluginActivation="true"/>
</adapt>
</enabledWhen>
</page>
</extension>
<!-- ***** views ***** -->
<extension
point="org.eclipse.ui.views">
<category
id="org.eclipse.jpt.jpa.ui"
name="%jpaPerspective"/>
<view
id="org.eclipse.jpt.ui.jpaStructureView"
category="org.eclipse.jpt.jpa.ui"
class="org.eclipse.jpt.jpa.ui.internal.views.JpaStructureView"
icon="icons/full/eview16/jpa_structure.gif"
name="%jpaStructure"/>
<view
id="org.eclipse.jpt.ui.jpaDetailsView"
category="org.eclipse.jpt.jpa.ui"
class="org.eclipse.jpt.jpa.ui.internal.views.JpaDetailsView"
icon="icons/full/eview16/jpa_details.gif"
name="%jpaDetails"/>
</extension>
<!-- ***** WTP facet framework ***** -->
<extension
point="org.eclipse.wst.common.project.facet.ui.images">
<image facet="jpt.jpa" path="icons/full/etool16/jpa_facet.gif"/>
</extension>
<extension
point="org.eclipse.wst.common.project.facet.ui.wizardPages">
<wizard-pages action="jpt.jpa.install">
<page class="org.eclipse.jpt.jpa.ui.internal.wizards.JpaFacetInstallPage"/>
</wizard-pages>
<wizard-pages action="jpt.jpa.version-change">
<page class="org.eclipse.jpt.jpa.ui.internal.wizards.JpaFacetVersionChangePage"/>
</wizard-pages>
</extension>
</plugin>