<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin
   id="com.ssaglobal.generator.typesafe.java"
   name="%pluginName"
   version="10.3.0.0214"
   provider-name="%providerName"
   class="com.ssaglobal.generator.typesafe.java.TypesafePlugin">

   <runtime>
      <library name="java.jar">
         <export name="*"/>
      </library>
   </runtime>

   <requires>
      <import plugin="org.eclipse.ui"/>
      <import plugin="org.eclipse.core.runtime"/>
      <import plugin="com.ssaglobal.generator"/>
      <import plugin="com.ssaglobal.generator.ui"/>
      <import plugin="com.ssaglobal.istudio.core"/>
      <import plugin="org.eclipse.help" export="true" optional="true"/>
   </requires>
   <extension
         id="TypesafeProxyPackage"
         name="Java Proxy Generator"
         point="com.ssaglobal.generator.templatepackage">
      <Base
            templateRoot="templates"
            outputRoot="out"/>
      <Template
            appliesToClass="com.ssaglobal.istudio.core.model.bid.impl.BusinessInterfaceDefinitionImpl"
            appliesToSubclasses="true"
            engine="FreeMarker"
            nameTemplate="BdeManagerName.ftl"
            template="BdeManager.ftl"/>
      <Template
            appliesToClass="com.ssaglobal.istudio.core.model.bid.impl.ComponentImpl"
            appliesToSubclasses="true"
            engine="FreeMarker"
            nameTemplate="BdeIteratorName.ftl"
            template="BdeIterator.ftl"/>
      <Template
            appliesToClass="com.ssaglobal.istudio.core.model.bid.impl.ComponentImpl"
            appliesToSubclasses="true"
            engine="FreeMarker"
            nameTemplate="BdeProxyName.ftl"
            template="BdeProxy.ftl"/>
      <Template
            engine="FreeMarker"
            appliesToSubclasses="true"
            appliesToClass="com.ssaglobal.istudio.core.model.bid.Attribute"
            template="BdeComplexType.ftl"
            writer="none"
            nameTemplate="BdeComplexTypeName.ftl">
         <Condition
               propertyName="type"
               propertyValue="group"/>
      </Template>
      <Template
            engine="FreeMarker"
            appliesToSubclasses="true"
            appliesToClass="com.ssaglobal.istudio.core.model.bid.Attribute"
            template="BdeComplexType.ftl"
            writer="none"
            nameTemplate="BdeComplexTypeName.ftl">
         <Condition
               propertyName="type"
               propertyValue="complex"/>
      </Template>            
      <Helper
            appliesToSubclasses="true"
            helperClass="com.ssaglobal.generator.helper.PropertiesHelper"
            appliesToClass="org.eclipse.emf.ecore.impl.EObjectImpl"
            name="properties"/>
      <Helper
            appliesToSubclasses="true"
            helperClass="com.ssaglobal.generator.helper.DateHelper"
            appliesToClass="org.eclipse.emf.ecore.impl.EObjectImpl"
            name="today"/>
      <Helper
            appliesToSubclasses="true"
            appliesToClass="org.eclipse.emf.ecore.impl.EObjectImpl"
            helperClass="com.ssaglobal.generator.helper.VersionHelper"
            name="versionhelper"/>            
      <Property
            value=""
            helpid="com_ssaglobal_generator_typesafe_java_javaPackage"
            description="Java &amp;Package"
            name="javaPackage"/>
   </extension>
   <extension
         point="org.eclipse.ui.popupMenus">
      <objectContribution
            objectClass="com.ssaglobal.istudio.core.model.bid.BusinessInterfaceDefinition"
            id="com.ssaglobal.generator.typesafe.java.contribution1">
         <menu
               label="&amp;Proxy Generator"
               path="additions"
               id="com.ssaglobal.generator.ui.proxymenu">
            <separator name="group1"/>
         </menu>
         <action
               class="com.ssaglobal.generator.typesafe.java.TypesafeGenerateAction"
               definitionId="com.ssaglobal.istudio.generator.javaproxy"
               enablesFor="+"
               id="com.ssaglobal.generator.typesafe.java.Generate"
               label="&amp;Java Proxy"
               menubarPath="com.ssaglobal.generator.ui.proxymenu/group1"/>
      </objectContribution>
      <objectContribution
            objectClass="org.eclipse.core.resources.IFile"
            nameFilter="*.bid"
            id="com.ssaglobal.generator.typesafe.java.contribution2">
         <menu
               label="&amp;Proxy Generator"
               path="additions"
               id="com.ssaglobal.generator.ui.proxymenu">
            <separator name="group1"/>
         </menu>
         <action
               enablesFor="+"
               label="&amp;Java Proxy"
               class="com.ssaglobal.generator.typesafe.java.TypesafeGenerateAction"
               menubarPath="com.ssaglobal.generator.ui.proxymenu/group1"
               id="com.ssaglobal.generator.typesafe.java.Generate"/>
      </objectContribution>
   </extension>
   <extension
         point="org.eclipse.ui.preferencePages">
      <page
            class="com.ssaglobal.generator.typesafe.java.TypesafePreferencePage"
            category="com.ssaglobal.generator.ui.GeneratorMainPreferencePage"
            name="Java Proxy"
            id="com.ssaglobal.generator.typesafe.java.TypesafePreferencePage"/>
   </extension>
   <extension
         point="org.eclipse.core.runtime.preferences">
      <initializer class="com.ssaglobal.generator.typesafe.java.TypesafePreferenceInitializer"/>
   </extension>
   <extension
         point="org.eclipse.ui.propertyPages">
          <page
                class="com.ssaglobal.generator.typesafe.java.TypesafePropertyPage"
                name="Java Proxy Generator"
                id="com.ssaglobal.generator.typesafe.java.TypesafePropertyPage">
             <filter
                   value="com.ssaglobal.istudio.core.nature"
                   name="nature"/>
             <enabledWhen>
                <instanceof
                      value="org.eclipse.core.resources.IProject">
                </instanceof>
             </enabledWhen>
          </page>
   </extension>
   <extension point="org.eclipse.ui.commands">
        <command
              categoryId="com.ssaglobal.istudio.ui.integration"
              id="com.ssaglobal.istudio.generator.javaproxy"
              name="Generate Java Proxy"/> 
  </extension>
  <extension
         point="org.eclipse.ui.actionSets">
      <actionSet
            label="com.ssaglobal.generator.typesafe.java.actionSet"
            visible="true"
            id="com.ssaglobal.generator.typesafe.java.actionSet">
         <action
               label="com.ssaglobal.generator.typesafe.java.action"
               class="com.ssaglobal.generator.typesafe.java.TypesafeGenerateAction"
               definitionId="com.ssaglobal.istudio.generator.javaproxy"
               style="push"
               id="com.ssaglobal.generator.typesafe.java.action"/>
      </actionSet>
   </extension>
  <extension
        id="TypeSafeJavaStartup"
        name="Java Proxy Generator"
        point="org.eclipse.ui.startup">
  </extension>
  <extension
        point="org.eclipse.ui.bindings">
     <key
           commandId="com.ssaglobal.istudio.generator.javaproxy"
           contextId="com.ssaglobal.istudio.ui.integration"
           schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
           sequence="M1+M2+6"/>
  </extension>
   
</plugin>
