// }
@Override
- protected void open(Object entity, Shell shell, EPartService partService) {
+ protected void open(Object entity, Shell shell, EPartService partService) throws Exception {
if (entity instanceof TaxonBase){
EditorUtil.openTaxonBaseE4(((TaxonBase)entity).getUuid(), modelService, partService, application);
}else if (entity instanceof UuidAndTitleCache){
EditorUtil.openTaxonBaseE4(((UuidAndTitleCache)entity).getUuid(), modelService, partService, application);
+ }else{
+ throw new Exception("Only objects of type taxonbase can be handled.");
}
}
*/
@Override
protected boolean canExecute(Object entity) {
- return true;
+ return (entity instanceof TaxonBase) || (entity instanceof UuidAndTitleCache);
}
@Override