@CanExecute
private boolean canExecute(@Named(IServiceConstants.ACTIVE_SELECTION)TreeSelection selection, MHandledMenuItem menuItem){
boolean canExecute = false;
- canExecute = selection.getFirstElement() instanceof Classification && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_EXPERIMENTAL_FEATURES);
+ canExecute = selection.getFirstElement() instanceof TaxonNode
+ && ((TaxonNode) selection.getFirstElement()).getTaxon()==null
+ && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_EXPERIMENTAL_FEATURES);
menuItem.setVisible(canExecute);
return canExecute;
}
@CanExecute
private boolean canExecute(@Named(IServiceConstants.ACTIVE_SELECTION)TreeSelection selection, MHandledMenuItem menuItem){
boolean canExecute = false;
- canExecute = selection.getFirstElement() instanceof Classification && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_EXPERIMENTAL_FEATURES);
+ canExecute = selection.getFirstElement() instanceof TaxonNode
+ && ((TaxonNode) selection.getFirstElement()).getTaxon()==null
+ && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_EXPERIMENTAL_FEATURES);
menuItem.setVisible(canExecute);
return canExecute;
}