<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>

    
<!-- ====================================================== -->
<!--                                                        -->
<!-- Purpose: Extension for the J2EE ACtion Sets            -->
<!-- Extension point: org.eclipse.ui.actionSets             -->
<!-- ====================================================== -->
   <extension
         point="org.eclipse.ui.actionSets">
      <actionSet
            label="%web.category_ui_"
            description="%web.actions.description_ui_"
            visible="false"
            id="org.eclipse.jst.j2ee.J2eeMainActionSet2">
            <action
               label="%create.web.module_ui_"
               icon="icons/full/ctool16/newwar_wiz.gif"
               tooltip="%create.web.module_ui_"
               class="org.eclipse.jst.servlet.ui.internal.actions.NewWebComponentAction"
               toolbarPath="J2EEMain"
               id="org.eclipse.jst.servlet.ui.internal.actions.NewWebComponent">
         </action>
      </actionSet>
	</extension> 
      
   <!-- Web Module Wizard -->
    <extension
         id="J2EEUIProjectWizards"
         point="org.eclipse.ui.newWizards">
      <category
            name="%web.category_ui_"
            id="org.eclipse.wst.web.ui">
      </category>
      <wizard
            name="%web.project_ui_"
            icon="icons/full/ctool16/newwar_wiz.gif"
            category="org.eclipse.wst.web.ui"
            class="org.eclipse.jst.servlet.ui.project.facet.WebProjectWizard"
            project="true"
            finalPerspective="org.eclipse.jst.j2ee.J2EEPerspective"
            id="org.eclipse.jst.servlet.ui.project.facet.WebProjectWizard">
         <description>
            %new.web.project.description_ui_
         </description>
         <selection
               class="org.eclipse.core.resources.IResource">
         </selection>
      </wizard>
      
      <!--new servlet contribution-->
 	  <wizard
            name="%ServletWebRegionWizard.name"
            icon="icons/full/ctool16/newservlet_wiz.gif"
            category="org.eclipse.wst.web.ui"
            class="org.eclipse.jst.servlet.ui.internal.wizard.AddServletWizard"
            id="org.eclipse.jst.servlet.ui.internal.wizard.AddServletWizard">
         <description>
            %ServletWebRegionWizard.description
         </description>
      </wizard>      
    </extension>
      
   <extension
         point="org.eclipse.ui.importWizards">
      <category
            name="%web.category_ui_"
            id="org.eclipse.wst.web.ui">
      </category>         
    <wizard
            name="%WarImportWizard.name"
            icon="icons/full/ctool16/importwar_wiz.gif"
            class="org.eclipse.jst.servlet.ui.internal.wizard.WebComponentImportWizard"
            category="org.eclipse.wst.web.ui"
            id="org.eclipse.jst.servlet.ui.internal.wizard.WebComponentImportWizard">
         <description>
            %WarImportWizard.description
         </description>
         <selection
               class="org.eclipse.core.resources.IResource">
         </selection>
      </wizard>
      
    </extension>
    
  <extension
         point="org.eclipse.ui.exportWizards">
     <category
            name="%web.category_ui_"
            id="org.eclipse.wst.web.ui">
      </category>         
    <wizard
            name="%WarexportWizard.name"
            icon="icons/full/ctool16/exportwar_wiz.gif"
            class="org.eclipse.jst.servlet.ui.internal.wizard.WebComponentExportWizard"
            category="org.eclipse.wst.web.ui"
            id="org.eclipse.jst.servlet.ui.internal.wizard.WebComponentExportWizard">
         <description>
            %WarexportWizard.description
         </description>
         <selection
               class="org.eclipse.core.resources.IResource">
         </selection>
      </wizard>
    </extension>

   <extension
         point="org.eclipse.wst.common.frameworks.ui.extendableWizard">
      <extendableWizard
            id="org.eclipse.jst.servlet.ui.WebModuleCreationWizard">
      </extendableWizard>
   </extension>
   <extension
		point="org.eclipse.ui.actionSets">
		<actionSet
			label="%ConvertWebProjectType"
			description="%ConvertWebProjectType"
			visible="true"
			id="org.eclipse.jst.servlet.ui.internal.actions.ConvertToWebModuleTypeActionSet">
			<action
				label="%convertWebProjectTypeAction.label"
				tooltip="%ConvertWebProjectTypeAction.tooltip"
				menubarPath="project/additions"
				class="org.eclipse.jst.servlet.ui.internal.actions.ConvertToWebModuleTypeAction"
				enablesFor="1"
				id="convertToWebModuleTypeAction">   
				<enablement>
					<and>
						<objectClass name="org.eclipse.core.resources.IProject"/>
						<!--<objectState
	                       name="facet"
	                       value="wst.web">
	                     </objectState> -->
					</and>
				</enablement>            
			</action>
		</actionSet>
	</extension>
	
	<extension
         point="org.eclipse.ui.popupMenus">
      <objectContribution
            objectClass="org.eclipse.core.resources.IProject"
            adaptable="true"
            id = "convertToWebModuleTypeAction">
         <menu
               label="%static.web.project_ui_"
               path="additions"
               id="ConvertWebProjectType">
            <separator
                  name="ConvertWebProjectType">
            </separator>
         </menu>
        <action
				label="%convertWebProjectTypeAction.label"
				tooltip="%ConvertWebProjectTypeAction.tooltip"
				menubarPath="ConvertWebProjectType/ConvertWebProjectType"
				class="org.eclipse.jst.servlet.ui.internal.actions.ConvertToWebModuleTypeAction"
				enablesFor="1"
				id="convertToWebModuleTypeAction">
		</action>
		<enablement>
		  <adapt type="org.eclipse.core.resources.IProject">
						<test forcePluginActivation="true"
							property="org.eclipse.wst.common.project.facet.core.projectFacet"
							value="wst.web" />
					</adapt>
		</enablement>
      </objectContribution>  
    </extension>

  <!-- ==================================================================== -->
<!-- Extension point: org.eclipse.etools.server.core.moduleObjectAdapters -->
<!-- Purpose: Define adapters for Web resources                           -->
<!-- ==================================================================== -->
      <extension point="org.eclipse.wst.server.core.moduleArtifactAdapters">  
      
       <moduleArtifactAdapter
            id="org.eclipse.jst.web.server.webresource"
            class="org.eclipse.jst.servlet.ui.internal.deployables.WebDeployableArtifactAdapterFactory">     
         <enablement>
           <with variable="selection">
             <adapt type="org.eclipse.jst.j2ee.webapplication.WebApp"/>
           </with>
         </enablement>
      </moduleArtifactAdapter> 
      
      <moduleArtifactAdapter
            id="org.eclipse.jst.web.server.webresource2"
             class="org.eclipse.jst.servlet.ui.internal.deployables.WebDeployableArtifactAdapterFactory">      
         <enablement>
           <with variable="selection">
             <adapt type="org.eclipse.jst.server.core.Servlet"/>
           </with>
         </enablement>
       </moduleArtifactAdapter>
       
       <moduleArtifactAdapter
            id="org.eclipse.jst.web.server.webresource3"
            class="org.eclipse.jst.servlet.ui.internal.deployables.WebDeployableArtifactAdapterFactory">     
         <enablement>
           <with variable="selection">
             <adapt type="org.eclipse.core.resources.IProject"/>
           </with>
         </enablement>
       </moduleArtifactAdapter>     
       
        <moduleArtifactAdapter
            id="org.eclipse.jst.web.server.webresource4"
            class="org.eclipse.jst.servlet.ui.internal.deployables.WebDeployableArtifactAdapterFactory">
         <enablement>
           <with variable="selection">
             <adapt type="org.eclipse.core.resources.IFile"/>
           </with>
         </enablement>
       </moduleArtifactAdapter>

      <moduleArtifactAdapter
            id="org.eclipse.jst.web.server.webresource5"
            class="org.eclipse.jst.servlet.ui.internal.deployables.WebDeployableArtifactAdapterFactory">
          
         <enablement>
           <with variable="selection">
             <adapt type="org.eclipse.jdt.core.ICompilationUnit"/>
           </with>
         </enablement>
       </moduleArtifactAdapter>
   </extension>
   
    <extension point="org.eclipse.core.runtime.adapters">
         <factory
             class="org.eclipse.jst.servlet.ui.internal.deployables.WebDeployableArtifactAdapterFactory"
             adaptableType="org.eclipse.core.resources.IProject">
             <adapter type= "org.eclipse.debug.ui.actions.ILaunchable"/>
        </factory>
        <factory
             class="org.eclipse.jst.servlet.ui.internal.deployables.WebDeployableArtifactAdapterFactory"
             adaptableType="org.eclipse.jdt.core.ICompilationUnit">
            <adapter type= "org.eclipse.debug.ui.actions.ILaunchable"/>
        </factory>
        <factory
             class="org.eclipse.jst.servlet.ui.internal.deployables.WebDeployableArtifactAdapterFactory"
             adaptableType="org.eclipse.core.resources.IFile">
            <adapter type= "org.eclipse.debug.ui.actions.ILaunchable"/>
       </factory>
       <factory
             class="org.eclipse.jst.servlet.ui.internal.deployables.WebDeployableArtifactAdapterFactory"
             adaptableType="org.eclipse.jst.j2ee.webapplication.Servlet">
             <adapter type= "org.eclipse.debug.ui.actions.ILaunchable"/>
       </factory>
       <factory
             class="org.eclipse.jst.servlet.ui.internal.deployables.WebDeployableArtifactAdapterFactory"
             adaptableType="org.eclipse.jst.j2ee.webapplication.WebApp">
             <adapter type= "org.eclipse.debug.ui.actions.ILaunchable"/>
       </factory> 
       <factory
             class="org.eclipse.jst.servlet.ui.internal.deployables.WebDeployableArtifactAdapterFactory"
             adaptableType="org.eclipse.jst.server.core.Servlet">
             <adapter type= "org.eclipse.debug.ui.actions.ILaunchable"/>
       </factory>
          
   </extension>  
  
<!-- ====================================================== -->
<!--           Label Decorators                             -->
<!-- ====================================================== -->
  
    <extension
         point="org.eclipse.ui.decorators">
         <decorator
               lightweight="true"
               adaptable="true"
               label="%servletAnnotationDecorator"
               class="org.eclipse.jst.j2ee.internal.ui.util.AnnotationIconDecorator"
               state="true"
               location="TOP_LEFT"
               id="org.eclipse.jst.j2ee.internal.ui.util.AnnotationIconDecorator_servlet">
         <description>
            %servletAnnotationDecorator.description
         </description>
         <enablement>
              <objectClass
                   name="org.eclipse.jst.j2ee.webapplication.Servlet">
              </objectClass>
         </enablement>
      </decorator>
    </extension> 
    
  <extension point="org.eclipse.wst.common.project.facet.ui.wizardPages">
    <wizard-pages action="jst.web.install">
      <page class="org.eclipse.jst.servlet.ui.project.facet.WebFacetInstallPage"/>
    </wizard-pages>
  </extension>
  
  <extension point="org.eclipse.wst.common.project.facet.ui.images">
    <image facet="jst.web" path="icons/war.gif"/>
  </extension>
  
  <extension
    point="org.eclipse.jdt.ui.classpathContainerPage">
    <classpathContainerPage
      name="%webAppLibrariesContainerName"
      class="org.eclipse.jst.servlet.ui.internal.wizard.WebAppLibrariesContainerPage"
      id="org.eclipse.jst.j2ee.internal.web.container">
    </classpathContainerPage>
  </extension>
  <extension
        point="org.eclipse.ui.navigator.navigatorContent">
     <navigatorContent
           activeByDefault="true"
           contentProvider="org.eclipse.jst.servlet.ui.internal.navigator.WebJavaContentProvider"
           icon="icons/full/ctool16/webjava-icon.gif"
           id="org.eclipse.jst.servlet.ui.EnhancedJavaRendering"
           labelProvider="org.eclipse.jst.servlet.ui.internal.navigator.WebJavaLabelProvider"
           name="%enhanced.java.for.web.name"
           priority="higher">
        <override
              policy="InvokeOnlyIfSuppressedExtAlsoVisibleAndActive"
              suppressedExtensionId="org.eclipse.jdt.java.ui.javaContent"/>					   
        <triggerPoints>
			<and>
				<adapt
					type="org.eclipse.core.resources.IProject">
					<or> 
						<test forcePluginActivation="true"
							property="org.eclipse.wst.common.project.facet.core.projectFacet"
							value="jst.web" />
					</or>
				</adapt>
			</and>        
        </triggerPoints>
        <possibleChildren>
           <or>
              <instanceof value="org.eclipse.jst.servlet.ui.internal.navigator.CompressedJavaProject"/>
              <instanceof value="org.eclipse.jdt.core.IPackageFragmentRoot"/>
              <instanceof value="org.eclipse.jdt.core.IPackageFragment"/>
              <instanceof value="org.eclipse.jdt.internal.ui.packageview.ClassPathContainer"/>
              <instanceof value="org.eclipse.jst.servlet.ui.internal.navigator.CompressedJavaLibraries"/>
           </or>
        </possibleChildren> 
		<actionProvider
			class="org.eclipse.ui.internal.navigator.resources.actions.NewActionProvider"
			id="org.eclipse.jst.servlet.ui.EnhancedJavaRendering.actions.NewActionProvider">
			<enablement>
				<instanceof
					value="org.eclipse.jst.servlet.ui.internal.navigator.ICompressedNode" />
			</enablement>
		</actionProvider>        
        <commonSorter
              class="org.eclipse.jst.servlet.ui.internal.navigator.CompressedJavaSorter"
              id="org.eclipse.jst.servlet.ui.EnhancedJavaRendering.sorter">
           <parentExpression>
              <instanceof value="org.eclipse.jst.servlet.ui.internal.navigator.CompressedJavaProject"/>
           </parentExpression>
        </commonSorter>
 
		   <commonWizard
		        type="new"
		        wizardId="org.eclipse.jdt.ui.wizards.NewPackageCreationWizard">
		     <enablement>
				<instanceof
					value="org.eclipse.jst.servlet.ui.internal.navigator.ICompressedNode" />
		     </enablement>
		  </commonWizard>
		  <commonWizard
		        type="new"
		        wizardId="org.eclipse.jdt.ui.wizards.NewClassCreationWizard">
		     <enablement>
				<instanceof
					value="org.eclipse.jst.servlet.ui.internal.navigator.ICompressedNode" />
		     </enablement>
		  </commonWizard>

   	      <commonWizard
		        type="new"
		        wizardId="org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard">
		     <enablement>
				<instanceof
					value="org.eclipse.jst.servlet.ui.internal.navigator.ICompressedNode" />
		     </enablement>
		  </commonWizard> 
		    <commonWizard
		          type="new"
		          wizardId="org.eclipse.jdt.ui.wizards.NewSourceFolderCreationWizard">
				<enablement>				        
					<instanceof
						value="org.eclipse.jst.servlet.ui.internal.navigator.ICompressedNode" />
			     </enablement>
			 </commonWizard>        			 
     </navigatorContent>
  </extension>
  <extension
        point="org.eclipse.ui.navigator.viewer">
     <viewerContentBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer">
        <includes>
           <contentExtension pattern="org.eclipse.jst.servlet.ui.EnhancedJavaRendering"/>
        </includes>
     </viewerContentBinding>
  </extension>
  <extension
        point="org.eclipse.core.runtime.adapters">
     <factory
           adaptableType="org.eclipse.jst.servlet.ui.internal.navigator.CompressedJavaProject"
           class="org.eclipse.jst.servlet.ui.internal.navigator.CompressedNodeAdapterFactory">
        <adapter type="org.eclipse.jdt.core.IJavaProject"/>
        <adapter type="org.eclipse.jdt.core.IJavaElement"/>
     </factory>
  </extension>
  
</plugin>
