<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you 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 point="org.eclipse.ui.editors">
    <editor
        class="org.apache.directory.studio.apacheds.configuration.editor.ServerConfigurationEditor"
        default="false"
        icon="resources/icons/editor.gif"
        id="%Editor_ServerConfigurationEditor_id"
        name="%Editor_ServerConfigurationEditor_name">
      <contentTypeBinding contentTypeId="%ContentType_ServerConfiguration_id"/>
    </editor>
  </extension>
   
  <extension point="org.eclipse.core.contenttype.contentTypes">
    <content-type
        describer="org.apache.directory.studio.apacheds.configuration.ApacheDS2ConfigurationContentDescriber"
        file-names="config.ldif"
        id="%ContentType_ServerConfiguration_id"
        name="%ContentType_ServerConfiguration_name"/>
  </extension>
   
  <extension point="org.eclipse.ui.popupMenus">
    <objectContribution
        objectClass="org.apache.directory.studio.connection.core.Connection"
        id="org.apache.directory.studio.connection.core.Connection">
      <action
          class="org.apache.directory.studio.apacheds.configuration.actions.OpenConfigurationAction"
          enablesFor="1"
          id="%OpenConfigurationAction_id"
          label="%OpenConfigurationAction_label"
          icon="resources/icons/editor.gif"/>
      <visibility>
        <and>
          <objectState name="vendorName" value="Apache Software Foundation"/>
            <or>
              <objectState name="vendorVersion" value="2.0.0"/>
              <!-- Special case to handle ApacheDS servers launched via Eclipse -->
              <!--<objectState name="vendorVersion" value="${project.version}" /> -->
            </or>
        </and>
      </visibility>
    </objectContribution>
  </extension>
 
 <!-- Add a new entry to create an ApacheDS  configuration in the New menu -->  
 <extension point="org.eclipse.ui.newWizards">
  <category id="%NewWizards_Category_id" name="%NewWizards_Category_name" />
  <wizard
      canFinishEarly="true"
      category="%NewWizards_Category_id"
      class="org.apache.directory.studio.apacheds.configuration.wizards.NewApacheDSConfigurationFileWizard"
      hasPages="false"
      icon="resources/icons/editor_new.gif"
      id="%NewWizards_NewApacheDSConfigurationFileWizard_id"
      name="%NewWizards_NewApacheDSConfigurationFileWizard_name"
      project="false"/>
 </extension>
</plugin>
