<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>

<!--
	Copyright 2006 The Apache Software Foundation
	
	Licensed under the Apache License, Version 2.0 (the "License");
	you may not use this file except in compliance with the License.
	You may obtain a copy of the License at
	
	http://www.apache.org/licenses/LICENSE-2.0
	
	Unless required by applicable law or agreed to in writing, software
	distributed under the License is distributed on an "AS IS" BASIS,
	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	See the License for the specific language governing permissions and
	limitations under the License.
-->

<plugin>
   <extension
         id="cayenneNature"
         name="Cayenne Project Nature"
         point="org.eclipse.core.resources.natures">
      <runtime>
         <run class="org.objectstyle.cayenne.CayenneNature"/>
      </runtime>
   </extension>
   <extension
         point="org.eclipse.ui.preferencePages">
      <page
            class="org.objectstyle.cayenne.preferences.CayennePreferencePage"
            id="org.objectstyle.cayenne.preferences.CayennePreferencePage"
            name="Cayenne"/>
   </extension>
   <extension
         point="org.eclipse.core.runtime.preferences">
      <initializer class="org.objectstyle.cayenne.preferences.PreferenceInitializer"/>
   </extension>
   <extension
         point="org.eclipse.ui.newWizards">
      <category
            id="org.objectstyle.cayenne"
            name="Cayenne"/>
      <wizard
            category="org.objectstyle.cayenne"
            class="org.objectstyle.cayenne.wizards.CayenneProjectNewWizard"
            icon="icons/newprj_wiz.png"
            id="org.objectstyle.cayenne.wizards.CayenneProjectNewWizard"
            name="Cayenne Project"/>
   </extension>
   <extension
         point="org.eclipse.ant.core.antTasks">
      <antTask
            class="org.objectstyle.cayenne.tools.CayenneGenerator"
            eclipseRuntime="false"
            library="lib/cayenne.jar"
            name="cgen"/>
      <antTask
            class="org.objectstyle.cayenne.tools.DbGeneratorTask"
            eclipseRuntime="false"
            library="lib/cayenne.jar"
            name="cdbgen"/>
      <antTask
            class="org.objectstyle.cayenne.tools.DeploymentConfigurator"
            eclipseRuntime="false"
            library="lib/cayenne.jar"
            name="cdeploy"/>
      <antTask
            class="org.objectstyle.cayenne.tools.DataPortTask"
            eclipseRuntime="false"
            library="lib/cayenne.jar"
            name="cdataport"/>
   </extension>
   <extension
         point="org.eclipse.ui.popupMenus">
      <objectContribution
            adaptable="false"
            id="org.objectstyle.cayenne.PopupMenu"
            objectClass="org.eclipse.jdt.core.IJavaProject">
         <menu
               id="org.objectstyle.cayenne.Menu"
               label="Cayenne"
               path="additions">
            <separator name="separator1"/>
            <separator name="separator2"/>
            <separator name="separator3"/>
         </menu>
         <action
               class="org.objectstyle.cayenne.popup.actions.AddCayenneNatureAction"
               enablesFor="1"
               icon="icons/icon-plus.gif"
               id="org.objectstyle.cayenne.AddNature"
               label="Add Nature"
               menubarPath="org.objectstyle.cayenne.Menu/separator1">
            <enablement>
               <not>
                  <objectState
                        name="projectNature"
                        value="org.objectstyle.cayenne.cayenneNature"/>
               </not>
            </enablement>
         </action>
                  <action
               class="org.objectstyle.cayenne.popup.actions.RemoveCayenneNatureAction"
               enablesFor="1"
               icon="icons/icon-trash.gif"
               id="org.objectstyle.cayenne.RemoveNature"
               label="Remove Nature"
               menubarPath="org.objectstyle.cayenne.Menu/separator1">
            <enablement>
               <objectState
                     name="projectNature"
                     value="org.objectstyle.cayenne.cayenneNature"/>
            </enablement>
         </action>
         <action
               class="org.objectstyle.cayenne.popup.actions.ClassGenerationAction"
               icon="icons/icon-gen_java.gif"
               id="org.objectstyle.cayenne.GenerateClasses"
               label="Generate Classes"
               menubarPath="org.objectstyle.cayenne.Menu/separator2"/>
         <action
               class="org.objectstyle.cayenne.popup.actions.NewDataMapAction"
               enablesFor="1"
               icon="icons/icon-datamap.gif"
               id="org.objectstyle.cayenne.NewDataMap"
               label="New DataMap"
               menubarPath="org.objectstyle.cayenne.Menu/separator3">
            <enablement>
               <objectState
                     name="projectNature"
                     value="org.objectstyle.cayenne.cayenneNature"/>
            </enablement>
         </action>
         
                  <action
                        class="org.objectstyle.cayenne.popup.actions.NewDataNodeAction"
                        enablesFor="1"
                        icon="icons/icon-node.gif"
                        id="org.objectstyle.cayenne.NewDataNode"
                        label="New DataNode"
                        menubarPath="org.objectstyle.cayenne.Menu/separator3">
            <enablement>
               <objectState
                     name="projectNature"
                     value="org.objectstyle.cayenne.cayenneNature"/>
            </enablement>
         </action>
         
                  <action
                        class="org.objectstyle.cayenne.popup.actions.NewDataDomainAction"
                        enablesFor="1"
                        icon="icons/icon-dom.gif"
                        id="org.objectstyle.cayenne.NewDataDomain"
                        label="New DataDomain"
                        menubarPath="org.objectstyle.cayenne.Menu/separator3">
            <enablement>
               <objectState
                     name="projectNature"
                     value="org.objectstyle.cayenne.cayenneNature"/>
            </enablement>
         </action>
         

      </objectContribution>
   </extension>
   

</plugin>
