Move property tester to editor plugin
authorPatrick Plitzner <p.plitzner@bgbm.org>
Tue, 25 Aug 2015 15:42:30 +0000 (17:42 +0200)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Tue, 25 Aug 2015 15:42:30 +0000 (17:42 +0200)
eu.etaxonomy.taxeditor.editor/plugin.xml
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/SpecimenPropertyTester.java [moved from eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/SpecimenPropertyTester.java with 87% similarity]
eu.etaxonomy.taxeditor.molecular/plugin.xml

index b9a3d50db54a0e6946d6ef4b413333c62c4b3d6a..4d30784b6a7bd14bceb845e1bae0dd287a3ad92a 100644 (file)
             </test>
          </with>
       </definition>
+      <definition
+            id="isSequence">
+         <with
+               variable="selection">
+            <test
+                  property="eu.etaxonomy.taxeditor.editor.handler.SpecimenPropertyTester.isSequence">
+            </test>
+         </with>
+      </definition>
+      <definition
+            id="isSingleRead">
+         <with
+               variable="selection">
+            <test
+                  property="eu.etaxonomy.taxeditor.editor.handler.SpecimenPropertyTester.isSingleRead">
+            </test>
+         </with>
+      </definition>
    </extension>
    <extension
          point="org.eclipse.core.expressions.propertyTesters">
             properties="isGroupEditor"
             type="eu.etaxonomy.taxeditor.bulkeditor.BulkEditor">
       </propertyTester>
+      <propertyTester
+            class="eu.etaxonomy.taxeditor.editor.handler.SpecimenPropertyTester"
+            id="eu.etaxonomy.taxeditor.editor.handler.SpecimenPropertyTester"
+            namespace="eu.etaxonomy.taxeditor.editor.handler.SpecimenPropertyTester"
+            properties="isSequence,isSingleRead"
+            type="org.eclipse.jface.viewers.IStructuredSelection">
+      </propertyTester>
    </extension>
    <extension
          point="org.eclipse.ui.bindings">   
@@ -1,4 +1,4 @@
-package eu.etaxonomy.taxeditor.molecular.handler;
+package eu.etaxonomy.taxeditor.editor.handler;
 
 
 import org.eclipse.core.expressions.PropertyTester;
@@ -24,10 +24,6 @@ public class SpecimenPropertyTester extends PropertyTester {
 
     public SpecimenPropertyTester() {}
 
-
-    /* (non-Javadoc)
-     * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
-     */
     /** {@inheritDoc} */
     @Override
     public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
@@ -46,12 +42,10 @@ public class SpecimenPropertyTester extends PropertyTester {
         return false;
     }
 
-
        private boolean isSequence(Object object) {
        return (object instanceof Sequence);
        }
 
-
        private boolean isSingleReadAlignment(Object object) {
        return (object instanceof SingleRead);
     }
index 20e8acae07575ffcc7db6bcccae830f87b360c9b..7b968c499f5d2c6dde1e7d9f8d58b811cd7fd4ea 100644 (file)
                commandId="eu.etaxonomy.taxeditor.molecular.pherogramComponent.changeQualityOutput">
          </handler>
       </extension>
-      <extension
-            point="org.eclipse.core.expressions.definitions">
-         <definition
-               id="isSequence">
-            <with
-                  variable="selection">
-               <test
-                     property="eu.etaxonomy.taxeditor.molecular.SpecimenPropertyTester.isSequence">
-               </test>
-            </with>
-         </definition>
-         <definition
-               id="isSingleRead">
-            <with
-                  variable="selection">
-               <test
-                     property="eu.etaxonomy.taxeditor.molecular.SpecimenPropertyTester.isSingleRead">
-               </test>
-            </with>
-         </definition>
-      </extension>
-      <extension
-            point="org.eclipse.core.expressions.propertyTesters">
-         <propertyTester
-               class="eu.etaxonomy.taxeditor.molecular.handler.SpecimenPropertyTester"
-               id="eu.etaxonomy.taxeditor.molecular.SpecimenPropertyTester"
-               namespace="eu.etaxonomy.taxeditor.molecular.SpecimenPropertyTester"
-               properties="isSequence,isSingleRead"
-               type="org.eclipse.jface.viewers.IStructuredSelection">
-         </propertyTester>
-      </extension>
       <extension
             point="org.eclipse.ui.bindings">
          <scheme