Revision e9f9f442
Added by Katja Luther almost 6 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/NameEditorMenuPropertyTester.java | ||
---|---|---|
31 | 31 |
public class NameEditorMenuPropertyTester extends PropertyTester { |
32 | 32 |
|
33 | 33 |
private static final String ACCEPTED = "isAcceptedTaxon"; //$NON-NLS-1$ |
34 |
private static final String NOT_ACCEPTED = "isNotAcceptedTaxon"; //$NON-NLS-1$ |
|
34 | 35 |
private static final String SYNONYM = "isSynonym"; //$NON-NLS-1$ |
35 | 36 |
private static final String MISAPPLICATION = "isMisapplication"; //$NON-NLS-1$ |
36 | 37 |
private static final String TAXONBASE = "isTaxonBase"; //$NON-NLS-1$ |
... | ... | |
62 | 63 |
CdmBase cdmBase = CdmStore.getCommonService().find(uuidAndTitleCache.getType(), uuidAndTitleCache.getUuid()); |
63 | 64 |
selectedElement = cdmBase; |
64 | 65 |
} |
65 |
|
|
66 |
if(NOT_ACCEPTED.equals(property)){ |
|
67 |
return !isAccepted(selectedElement); |
|
68 |
} |
|
66 | 69 |
if(ACCEPTED.equals(property)){ |
67 | 70 |
return isAccepted(selectedElement); |
68 | 71 |
} |
... | ... | |
107 | 110 |
} |
108 | 111 |
return false; |
109 | 112 |
} |
113 |
public static boolean isNotAcceptedTaxon(Object selectedElement) { |
|
114 |
|
|
115 |
return !isAccepted(selectedElement); |
|
116 |
} |
|
110 | 117 |
|
111 | 118 |
public static boolean isSynonymInHomotypicalGroupWithMoreSynonyms(Object selectedElement) { |
112 | 119 |
if (isSynonym(selectedElement)){ |
Also available in: Unified diff
ref #7379: disable change to menu item for accepted taxa in name editor