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 b9a3d50..4d30784 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 20e8aca..7b968c4 100644 (file)
          </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
                description="%scheme.description"