Refactor SingleReadContextMenu #5406
[taxeditor.git] / eu.etaxonomy.taxeditor.editor / plugin.xml
index 928c3b5811735fd8c176fcb816256b29c61217a3..70e779d74ef3c91104fae1f6f30c5dcc408d5351 100644 (file)
                name="eu.etaxonomy.taxeditor.editor.separator3"
                visible="true">
          </separator>
+         <command
+               commandId="eu.etaxonomy.taxeditor.editor.derivative.reuseSingleRead"
+               id="eu.etaxonomy.taxeditor.editor.derivative.reuseSingleReadMenuItem"
+               label="Reuse single read here"
+               style="push">
+            <visibleWhen
+                  checkEnabled="true">
+               <reference
+                     definitionId="isSingleReadReusableHere">
+               </reference>
+            </visibleWhen>
+         </command>
+         <command
+               commandId="eu.etaxonomy.taxeditor.editor.derivative.copySingleReadToClipBoard"
+               label="Reuse for other sequence"
+               style="push">
+            <visibleWhen
+                  checkEnabled="true">
+               <reference
+                     definitionId="isSingleRead">
+               </reference>
+            </visibleWhen>
+         </command>
+         <command
+               commandId="eu.etaxonomy.taxeditor.editor.derivative.removeSingleReadFromSequence"
+               label="Remove from this sequence"
+               style="push">
+            <visibleWhen
+                  checkEnabled="true">
+               <reference
+                     definitionId="isSingleReadReused">
+               </reference>
+            </visibleWhen>
+         </command>
+         <separator
+               name="eu.etaxonomy.taxeditor.editor.separator7"
+               visible="true">
+         </separator>
          <command
                commandId="org.eclipse.ui.edit.delete"
                label="%command.label.52"
             id="eu.etaxonomy.taxeditor.editor.derivative.listenToSelectionChange"
             name="Link with taxon selection">
       </command>
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.editor.view.derivate.handler.SingleReadHandler"
+            id="eu.etaxonomy.taxeditor.editor.derivative.copySingleReadToClipBoard"
+            name="Copy SingleRead to clipboard">
+      </command>
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.editor.view.derivate.handler.SingleReadHandler"
+            id="eu.etaxonomy.taxeditor.editor.derivative.reuseSingleRead"
+            name="Reuse SingleRead">
+      </command>
+      <command
+            defaultHandler="eu.etaxonomy.taxeditor.editor.view.derivate.handler.SingleReadHandler"
+            id="eu.etaxonomy.taxeditor.editor.derivative.removeSingleReadFromSequence"
+            name="Remove SingleRead from sequence">
+      </command>
         
    </extension>
    <extension
             </test>
          </with>
       </definition>
+      <definition
+            id="isSingleReadReusableHere">
+         <with
+               variable="selection">
+            <test
+                  property="eu.etaxonomy.taxeditor.editor.handler.SpecimenPropertyTester.isSingleReadReusableHere">
+            </test>
+         </with>
+      </definition>
+      <definition
+            id="isSingleReadReused">
+         <with
+               variable="selection">
+            <test
+                  property="eu.etaxonomy.taxeditor.editor.handler.SpecimenPropertyTester.isSingleReadReused">
+            </test>
+         </with>
+      </definition>
    </extension>
    <extension
          point="org.eclipse.core.expressions.propertyTesters">
             class="eu.etaxonomy.taxeditor.editor.handler.SpecimenPropertyTester"
             id="eu.etaxonomy.taxeditor.editor.handler.SpecimenPropertyTester"
             namespace="eu.etaxonomy.taxeditor.editor.handler.SpecimenPropertyTester"
-            properties="isSequence,isSingleRead"
+            properties="isSequence,isSingleRead,isSingleReadReusableHere,isSingleReadReused"
             type="org.eclipse.jface.viewers.IStructuredSelection">
       </propertyTester>
    </extension>