<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
   <extension
         point="org.eclipse.wst.common.project.facet.core.facets">
      
      <project-facet id="struts">
         <label>Struts</label>
         <description>Strutsのライブラリを追加します。</description>
      </project-facet>
      
      <project-facet-version
            facet="struts"
            version="1.3.8">
         <constraint>
            <requires facet="jst.web" version="[2.3"/>
         </constraint>
      </project-facet-version>
      <action
            facet="struts"
            type="install"
            version="1.3.8">
         <delegate class="jp.sf.amateras.wtp.facet.StrutsFacetInstallDelegate"/>
      </action>
      <action
            facet="struts"
            type="uninstall"
            version="1.3.8">
         <delegate class="jp.sf.amateras.wtp.facet.StrutsFacetUninstallDelegate"/>
      </action>
   </extension>
   
   <extension point="org.eclipse.wst.common.project.facet.core.runtimes">
      <supported>
         <runtime-component any="true"/>
         <facet id="struts" version="1.3.8"/>
      </supported>
   </extension>
   
   <extension
         point="org.eclipse.wst.common.snippets.SnippetContributions">
      <category id="jp.sf.amateras.wtp.snippets.struts" 
          label="Struts" smallicon="icons/apache.gif">
         <item label="html:form" smallicon="icons/form.gif"
               id="jp.sf.amateras.wtp.snippets.struts.form">
            <content><![CDATA[<html:form action="${action}"></html:form>]]></content>         
            <variable description="フォームのターゲット・アクション" id="action"/>
         </item>
      </category>
   </extension>
   <extension
         point="org.eclipse.wst.xml.core.catalogContributions">
      <catalogContribution>
         <public
               publicId="-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
               uri="struts-1.3.8/dtd/struts-config_1_3.dtd"
               webURL="http://struts.apache.org/dtds/struts-config_1_3.dtd"/>
         <public
               publicId="-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.3.0//EN"
               uri="struts-1.3.8/dtd/validator_1_3_0.dtd"
               webURL="http://jakarta.apache.org/commons/dtds/validator_1_3_0.dtd"/>
         <public
               publicId="-//Apache Software Foundation//DTD Tiles Configuration 1.3//EN"
               uri="struts-1.3.8/dtd/tiles-config_1_3.dtd"
               webURL="http://struts.apache.org/dtds/tiles-config_1_3.dtd"/>
      </catalogContribution>
   </extension>
   
   <extension
         point="org.eclipse.core.runtime.contentTypes">
      <content-type
            base-type="org.eclipse.core.runtime.xml"
            file-names="struts-config.xml"
            id="strutsConfig"
            name="Struts Configuration File"
            priority="high"/>
   </extension>
   
   <extension
         point="org.eclipse.wst.sse.ui.editorConfiguration">
      <sourceViewerConfiguration
         class="jp.sf.amateras.wtp.editor.StrutsConfigEditorConfiguration"
         target="jp.sf.amateras.wtp.strutsConfig" />
      <contentOutlineConfiguration
            class="jp.sf.amateras.wtp.editor.StrutsConfigOutlineConfiguration"
            target="jp.sf.amateras.wtp.strutsConfig"/>
      <propertySheetConfiguration
            class="jp.sf.amateras.wtp.editor.StrutsConfigPropertySheetConfiguration"
            target="jp.sf.amateras.wtp.strutsConfig"/>
   </extension>
  
  <extension
      id="strutsConfigValidator"
      name="struts-config.xmlバリデータ"
      point="org.eclipse.wst.validation.validator">
    <validator>
    <!--
      <projectNature id="org.eclipse.wst.common.modulecore.ModuleCoreNature"/>
    -->
      <projectNature id="org.eclipse.jdt.core.javanature"/>
      <filter
            nameFilter="struts-config.xml"
            objectClass="org.eclipse.core.resources.IFile"/>
      <helper
            class="org.eclipse.wst.validation.internal.operations.WorkbenchContext">
      </helper>
      <run
            enabled="true"
            class="jp.sf.amateras.wtp.validation.StrutsConfigValidator">
      </run>
    </validator>
  </extension>
  
</plugin>
