Revision 7ccb7304
Added by Katja Luther over 5 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/NameEditorMenuPropertyTester.java | ||
---|---|---|
112 | 112 |
} |
113 | 113 |
else if (IS_ORPHANED.equals(property)){ |
114 | 114 |
return isOrphaned(selectedElement); |
115 |
} |
|
115 |
}else if (IS_NOT_INVALID_DESIGNATION.equals(property)){ |
|
116 |
return isNotInvalidDesignation(selectedElement); |
|
117 |
} |
|
116 | 118 |
|
117 | 119 |
} |
118 | 120 |
|
... | ... | |
210 | 212 |
} |
211 | 213 |
|
212 | 214 |
public static boolean isAccepted(Object selectedElement) { |
213 |
return (selectedElement instanceof Taxon && ! ((Taxon) selectedElement).isMisapplication() && ! ((Taxon) selectedElement).isProparteSynonym()) ? true : false;
|
|
215 |
return (selectedElement instanceof Taxon && !(((Taxon) selectedElement).isMisapplication()|| ((Taxon) selectedElement).isProparteSynonym() || ((Taxon) selectedElement).isInvalidDesignation())) ? true : false;
|
|
214 | 216 |
} |
215 | 217 |
|
216 | 218 |
public static boolean isOrphaned(Object selectedElement) { |
... | ... | |
233 | 235 |
} |
234 | 236 |
return false; |
235 | 237 |
} |
238 |
|
|
239 |
/** |
|
240 |
* @param selectedElement |
|
241 |
* @return |
|
242 |
*/ |
|
243 |
public static boolean isNotInvalidDesignation(Object selectedElement) { |
|
244 |
if((selectedElement instanceof Taxon) && ((Taxon) selectedElement).isInvalidDesignation()){ |
|
245 |
return false; |
|
246 |
} |
|
247 |
return true; |
|
248 |
} |
|
249 |
|
|
236 | 250 |
} |
Also available in: Unified diff
ref #7424: after updating name editor set menu to all containers to avoid missing menu