Merged refactoring from development branch.
[taxeditor.git] / taxeditor-navigation / plugin.xml
index 7de422b5b48dadb0590dcf10552bc906dc24153d..87559168053388ecd2b01800400e045699931fff 100644 (file)
             name="Taxon Navigator"
             restorable="true">
       </view>
+      <view
+            allowMultiple="false"
+            class="eu.etaxonomy.taxeditor.navigation.key.polytomous.PolytomousKeyViewPart"
+            id="eu.etaxonomy.taxeditor.navigation.key.polytomous.polytomousKeyViewPart"
+            name="Polytomous Keys"
+            restorable="true">
+      </view>
    </extension>
    <extension
          point="org.eclipse.ui.menus">
       <menuContribution
             locationURI="menu:eu.etaxonomy.taxeditor.menu.showView">
          <command
-               commandId="eu.etaxonomy.taxeditor.navigation.command.showTaxonomicTreeView"
+               commandId="org.eclipse.ui.views.showView"
                label="Taxon Navigator"
                style="push">
+            <parameter
+                  name="org.eclipse.ui.views.showView.viewId"
+                  value="eu.etaxonomy.taxeditor.navigation.navigator">
+            </parameter>
+         </command>
+         <command
+               commandId="org.eclipse.ui.views.showView"
+               label="Polytomous Keys"
+               style="push">
+            <parameter
+                  name="org.eclipse.ui.views.showView.viewId"
+                  value="eu.etaxonomy.taxeditor.navigation.key.polytomous.polytomousKeyViewPart">
+            </parameter>
          </command>
       </menuContribution>
       <menuContribution
@@ -73,8 +93,8 @@
                   visible="true">
             </separator>
             <command
-                  commandId="eu.etaxonomy.taxeditor.navigation.newTaxonomicTree"
-                  id="eu.etaxonomy.taxeditor.navigation.menu.nu.new.taxonomicTree"
+                  commandId="eu.etaxonomy.taxeditor.navigation.newClassification"
+                  id="eu.etaxonomy.taxeditor.navigation.newClassificationHandler"
                   label="Classification"
                   style="push">
             </command>
                commandId="eu.etaxonomy.taxeditor.navigation.command.editSelection"
                label="Edit"
                style="push">       
-            <visibleWhen>
+            <visibleWhen
+                  checkEnabled="true">
                <or>
                   <reference
                         definitionId="isTaxonNode">
          </command>
          <command
                commandId="eu.etaxonomy.taxeditor.navigation.command.moveTaxon"
-               label="Move Taxon (with Subtree)"
+               label="Move Taxon (with child taxa)"
                style="push">
-            <visibleWhen>
+            <visibleWhen
+                  checkEnabled="true">
                <reference
                      definitionId="isTaxonNode">
                </reference>
          </separator>
          <command
                commandId="org.eclipse.ui.file.refresh"
-               label="Refresh Tree"
+               label="Refresh"
                style="push">
          </command>
       </menuContribution>
                visible="true">
          </separator>
          <command
-               commandId="eu.etaxonomy.taxeditor.navigation.newTaxonomicTree"
-               id="eu.etaxonomy.taxeditor.navigation.menu.nu.new.taxonomicTree"
+               commandId="eu.etaxonomy.taxeditor.navigation.newClassification"
+               id="eu.etaxonomy.taxeditor.navigation.newClassificationHandler"
                label="Classification"
                style="push">
          </command>
       </menuContribution>
+      <menuContribution
+            locationURI="popup:eu.etaxonomy.taxeditor.navigation.key.polytomous.polytomousKeyViewPart">
+         <command
+               commandId="eu.etaxonomy.taxeditor.navigation.key.polytomous.edit"
+               label="Edit"
+               style="push">
+         </command>
+         <separator
+               name="eu.etaxonomy.eu.polytomousKeyView.separator"
+               visible="true">
+         </separator>
+         <command
+               commandId="org.eclipse.ui.edit.delete"
+               label="Delete"
+               style="push">
+         </command>
+      </menuContribution>
    </extension>
    <extension
          point="org.eclipse.ui.commands">
       <command
-            defaultHandler="eu.etaxonomy.taxeditor.navigation.handler.NewTaxonNodeHandler"
+            defaultHandler="eu.etaxonomy.taxeditor.navigation.navigator.handler.NewTaxonNodeHandler"
             id="eu.etaxonomy.taxeditor.navigation.newTaxonNode"
             name="New Taxon Node">
       </command>
       <command
-            defaultHandler="eu.etaxonomy.taxeditor.navigation.handler.NewTaxonomicTreeHandler"
-            id="eu.etaxonomy.taxeditor.navigation.newTaxonomicTree"
+            defaultHandler="eu.etaxonomy.taxeditor.navigation.navigator.handler.NewClassificationHandler"
+            id="eu.etaxonomy.taxeditor.navigation.newClassification"
             name="New Classification">
       </command>
    </extension>
    <extension
          point="org.eclipse.ui.commands">
       <command
-            defaultHandler="eu.etaxonomy.taxeditor.navigation.handler.EditHandler"
+            defaultHandler="eu.etaxonomy.taxeditor.navigation.navigator.handler.EditHandler"
             id="eu.etaxonomy.taxeditor.navigation.command.editSelection"
             name="Edit">
       </command>
       <command
-            defaultHandler="eu.etaxonomy.taxeditor.navigation.handler.MoveTaxonHandler"
+            defaultHandler="eu.etaxonomy.taxeditor.navigation.navigator.handler.MoveTaxonHandler"
             id="eu.etaxonomy.taxeditor.navigation.command.moveTaxon"
             name="Move Taxon">
       </command>
       <command
-            defaultHandler="eu.etaxonomy.taxeditor.navigation.handler.RefreshTreeHandler"
+            defaultHandler="eu.etaxonomy.taxeditor.navigation.navigator.handler.RefreshTreeHandler"
             id="org.eclipse.ui.file.refresh"
             name="Refresh">
       </command>
    </extension>
+   <extension
+         point="org.eclipse.ui.commands">
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.navigation.key.polytomous.handler.EditHandler"
+            id="eu.etaxonomy.taxeditor.navigation.key.polytomous.edit"
+            name="Edit Polytomous Key">
+      </command>
+   </extension>
    <extension
          point="org.eclipse.ui.handlers">
       <handler
-            class="eu.etaxonomy.taxeditor.navigation.handler.DeleteTreeNodeHandler"
+            class="eu.etaxonomy.taxeditor.navigation.navigator.handler.DeleteHandler"
             commandId="org.eclipse.ui.edit.delete">
-         <enabledWhen>
+         <activeWhen>
             <with
                   variable="activePartId">
                <equals
                      value="eu.etaxonomy.taxeditor.navigation.navigator">
                </equals>
             </with>
-         </enabledWhen>
+         </activeWhen>
+      </handler>
+      <handler
+            class="eu.etaxonomy.taxeditor.navigation.key.polytomous.handler.DeleteHandler"
+            commandId="org.eclipse.ui.edit.delete">
+         <activeWhen>
+            <with
+                  variable="activePartId">
+               <equals
+                     value="eu.etaxonomy.taxeditor.navigation.key.polytomous.polytomousKeyViewPart">
+               </equals>
+            </with>
+         </activeWhen>
       </handler>
-   </extension>
-   <extension
-         point="org.eclipse.ui.commands">
-      <command
-            defaultHandler="eu.etaxonomy.taxeditor.navigation.handler.ShowTaxonomicTreeViewHandler"
-            id="eu.etaxonomy.taxeditor.navigation.command.showTaxonomicTreeView"
-            name="Show Taxonomic Tree View">
-      </command>
    </extension>
 
       
    <extension
          point="org.eclipse.ui.navigator.navigatorContent">
       <navigatorContent
-            contentProvider="eu.etaxonomy.taxeditor.navigation.navigator.TaxonomicTreeContentProvider"
-            id="eu.etaxonomy.taxeditor.navigation.taxonomictreecontent"
-            labelProvider="eu.etaxonomy.taxeditor.navigation.navigator.TaxonomicTreeLabelProvider"
-            name="Taxonomic Tree">
+            contentProvider="eu.etaxonomy.taxeditor.navigation.navigator.ClassificationContentProvider"
+            id="eu.etaxonomy.taxeditor.navigation.classificationContent"
+            labelProvider="eu.etaxonomy.taxeditor.navigation.navigator.ClassificationLabelProvider"
+            name="Classification">
          <triggerPoints>
             <instanceof
                   value="eu.etaxonomy.taxeditor.navigation.navigator.Root">
       </navigatorContent>
       <navigatorContent
             contentProvider="eu.etaxonomy.taxeditor.navigation.navigator.TaxonNodeContentProvider"
-            id="eu.etaxonomy.taxeditor.navigation.taxoncontent"
+            id="eu.etaxonomy.taxeditor.navigation.taxonNodeContent"
             labelProvider="eu.etaxonomy.taxeditor.navigation.navigator.TaxonNodeLabelProvider"
-            name="Taxon">
+            name="TaxonNode">
          <triggerPoints>
             <or>
                <instanceof
       <navigatorContent
             activeByDefault="false"
             contentProvider="eu.etaxonomy.taxeditor.navigation.navigator.SynonymContentProvider"
-            id="eu.etaxonomy.taxeditor.navigation.synonymcontent"
+            id="eu.etaxonomy.taxeditor.navigation.synonymContent"
             labelProvider="eu.etaxonomy.taxeditor.navigation.navigator.SynonymLabelProvider"
-            name="Synonyms"
+            name="Synonyms (experimental)"
             priority="highest">
          <triggerPoints>
             <and>
       <viewerContentBinding viewerId="eu.etaxonomy.taxeditor.navigation.navigator">
          <includes>
             <contentExtension
-                  pattern="eu.etaxonomy.taxeditor.navigation.taxonomictreecontent">
+                  pattern="eu.etaxonomy.taxeditor.navigation.classificationContent">
             </contentExtension>
-            <contentExtension pattern="eu.etaxonomy.taxeditor.navigation.taxoncontent"/>
+            <contentExtension pattern="eu.etaxonomy.taxeditor.navigation.taxonNodeContent"/>
             <contentExtension pattern="eu.etaxonomy.taxeditor.navigation.taxonlinkhelper"/>
             <contentExtension
-                  pattern="eu.etaxonomy.taxeditor.navigation.synonymcontent">
+                  pattern="eu.etaxonomy.taxeditor.navigation.synonymContent">
             </contentExtension>
          </includes>
       </viewerContentBinding>
             type="eu.etaxonomy.cdm.model.taxon.TaxonomicTree">
       </propertyTester>
    </extension>
-   <extension
-         point="org.eclipse.ui.newWizards">
-      <category
-            id="eu.etaxonomy.taxeditor.new.category.cdm"
-            name="CDM">
-      </category>
-      <!--primaryWizard
-            id="taxeditor-navigation.wizard1">
-      </primaryWizard-->
-      <wizard
-            category="eu.etaxonomy.taxeditor.new.category.cdm"
-            class="eu.etaxonomy.taxeditor.wizard.ClassificationWizard"
-            hasPages="true"
-            icon="icons/tree_icon_small.jpg"
-            id="eu.etaxonomy.taxeditor.new.classification"
-            name="Classification">
-      </wizard>
-      <wizard
-            category="eu.etaxonomy.taxeditor.new.category.cdm"
-            class="eu.etaxonomy.taxeditor.wizard.NewTaxonNodeWizard"
-            hasPages="true"
-            id="eu.etaxonomy.taxeditor.new.taxonNode"
-            name="Taxon">
-      </wizard>
-   </extension>
    <extension
          point="org.eclipse.core.expressions.definitions">
       <definition
          </with>
       </definition>
    </extension>
-      <extension
-         point="org.eclipse.ui.handlers">
-      <handler
-            class="org.eclipse.ui.internal.handlers.WidgetMethodHandler:cut"
-            commandId="org.eclipse.ui.edit.cut">
-         <activeWhen>
-            <with
-                  variable="activeFocusControlId">
-               <equals
-                     value="navigation.textControlId">
-               </equals>
-            </with>
-         </activeWhen>
-      </handler>
-      <handler
-            class="org.eclipse.ui.internal.handlers.WidgetMethodHandler:copy"
-            commandId="org.eclipse.ui.edit.copy">
-         <activeWhen>
-            <with
-                  variable="activeFocusControlId">
-               <equals
-                     value="navigation.textControlId">
-               </equals>
-            </with>
-         </activeWhen>
-      </handler>
-      <handler
-            class="org.eclipse.ui.internal.handlers.WidgetMethodHandler:paste"
-            commandId="org.eclipse.ui.edit.paste">
-         <activeWhen>
-            <with
-                  variable="activeFocusControlId">
-               <equals
-                     value="navigation.textControlId">
-               </equals>
-            </with>
-         </activeWhen>
-      </handler>
-   </extension>
 </plugin>