Cleaned up Navigator code for checking whether a taxonomic tree has taxa.
authorp.ciardelli <p.ciardelli@localhost>
Wed, 24 Jun 2009 11:18:20 +0000 (11:18 +0000)
committerp.ciardelli <p.ciardelli@localhost>
Wed, 24 Jun 2009 11:18:20 +0000 (11:18 +0000)
taxeditor-navigation/plugin.xml

index 7327d33bafc53a26d743c76bcde4a8a055944e02..7e12707460dc45fa91ca0e660b969dbdd696b3d5 100644 (file)
             labelProvider="eu.etaxonomy.taxeditor.navigation.navigator.TaxonNodeLabelProvider"
             name="Taxon">
          <triggerPoints>
-            <instanceof value="eu.etaxonomy.cdm.model.taxon.TaxonNode"/>
+            <or>
+               <instanceof
+                     value="eu.etaxonomy.cdm.model.taxon.TaxonNode">
+               </instanceof>
+               <and>
+                  <instanceof
+                     value="eu.etaxonomy.cdm.model.taxon.TaxonomicTree">
+                  </instanceof>
+                  <test
+                     forcePluginActivation="true"
+                     property="eu.etaxonomy.taxeditor.propertytests.hasTaxa">
+                  </test>
+               </and>
+            </or>
          </triggerPoints>
          <dropAssistant
                class="eu.etaxonomy.taxeditor.navigation.navigator.TaxonDropAdapterAssistant"
             properties="hasSynonyms"
             type="eu.etaxonomy.cdm.model.taxon.TaxonNode">
       </propertyTester>
+      <propertyTester
+            class="eu.etaxonomy.taxeditor.navigation.navigator.TaxonNodePropertyTester"
+            id="eu.etaxonomy.taxeditor.propertytests.navigatorPropertyTester"
+            namespace="eu.etaxonomy.taxeditor.propertytests"
+            properties="hasTaxa"
+            type="eu.etaxonomy.cdm.model.taxon.TaxonomicTree">
+      </propertyTester>
    </extension>
    <extension
          point="org.eclipse.ui.newWizards">