Project

General

Profile

« Previous | Next » 

Revision 61650dda

Added by Patrick Plitzner over 6 years ago

ref #6902 migrate remaining context menu items for molecular module

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/SpecimenPropertyTester.java
6 6
import org.eclipse.jface.viewers.TreeNode;
7 7

  
8 8
import eu.etaxonomy.cdm.model.molecular.Sequence;
9
import eu.etaxonomy.cdm.model.molecular.SingleRead;
9 10
import eu.etaxonomy.cdm.model.occurrence.MediaSpecimen;
10 11
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
11 12
import eu.etaxonomy.taxeditor.editor.EditorUtil;
......
20 21
 */
21 22
public class SpecimenPropertyTester extends PropertyTester {
22 23
    private static final String SEQUENCE = "isSequence"; //$NON-NLS-1$
24
    private static final String SINGLE_READ = "isSingleRead"; //$NON-NLS-1$
23 25
    private static final String IS_SPECIMEN_OR_OBSERVATION_BASE = "isSpecimenOrObservationBase"; //$NON-NLS-1$
24 26
    private static final String IS_ADD_DERIVATE_ALLOWED = "isAddDerivateAllowed"; //$NON-NLS-1$
25 27
    private static final String IS_ADD_MEDIA_ALLOWED = "isAddMediaAllowed"; //$NON-NLS-1$
......
37 39
                if (SEQUENCE.equals(property)) {
38 40
                    return isSequence(treeNodeOfSelection.getValue());
39 41
                }
42
                else if (SINGLE_READ.equals(property)) {
43
                    return isSingleRead(treeNodeOfSelection.getValue());
44
                }
40 45
                else if (IS_SPECIMEN_OR_OBSERVATION_BASE.equals(property)) {
41 46
                    return isSpecimenOrObservationBase(treeNodeOfSelection.getValue());
42 47
                }
......
66 71
                && !(object instanceof MediaSpecimen);
67 72
    }
68 73

  
74
    private boolean isSingleRead(Object object) {
75
        return (object instanceof SingleRead);
76
    }
77

  
69 78
    private boolean isSequence(Object object) {
70 79
        return (object instanceof Sequence);
71 80
    }

Also available in: Unified diff