Revision bc72f4e6
Added by Patrick Plitzner about 4 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/NameEditorMenuPropertyTester.java | ||
---|---|---|
68 | 68 |
CdmBase cdmBase = CdmStore.getCommonService().find(uuidAndTitleCache.getType(), uuidAndTitleCache.getUuid()); |
69 | 69 |
selectedElement = cdmBase; |
70 | 70 |
} |
71 |
if(NOT_ACCEPTED.equals(property)){ |
|
71 |
if(EMPTY_NAMES.equals(property)){ |
|
72 |
return hasEmptyNames(receiver); |
|
73 |
} |
|
74 |
else if(selectedElement==null){ |
|
75 |
return false; |
|
76 |
} |
|
77 |
else if(NOT_ACCEPTED.equals(property)){ |
|
72 | 78 |
return !isAccepted(selectedElement); |
73 | 79 |
} |
74 |
if(ACCEPTED.equals(property)){ |
|
80 |
else if(ACCEPTED.equals(property)){
|
|
75 | 81 |
return isAccepted(selectedElement); |
76 | 82 |
} |
77 | 83 |
else if(SYNONYM.equals(property)){ |
... | ... | |
98 | 104 |
else if(CONCEPT.equals(property)){ |
99 | 105 |
return isRelatedConcept(selectedElement); |
100 | 106 |
} |
101 |
else if(EMPTY_NAMES.equals(property)){ |
|
102 |
return hasEmptyNames(receiver); |
|
103 |
} |
|
104 | 107 |
else if(ACCEPTED_AND_NO_HOMOTYPIC_SYNONYMS.equals(property)){ |
105 | 108 |
return isAcceptedAndHasNoHomotypicSynonyms(selectedElement); |
106 | 109 |
} |
... | ... | |
112 | 115 |
} |
113 | 116 |
else if (IS_ORPHANED.equals(property)){ |
114 | 117 |
return isOrphaned(selectedElement); |
115 |
}else if (IS_NOT_INVALID_DESIGNATION.equals(property)){ |
|
118 |
} |
|
119 |
else if (IS_NOT_INVALID_DESIGNATION.equals(property)){ |
|
116 | 120 |
return isNotInvalidDesignation(selectedElement); |
117 | 121 |
} |
118 |
|
|
119 | 122 |
} |
120 |
|
|
121 | 123 |
return false; |
122 | 124 |
|
123 | 125 |
} |
Also available in: Unified diff
Handle null selection in property tester