Revision f853dd5b
Added by Patrick Plitzner almost 6 years ago
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/RefreshTreeHandlerE4.java | ||
---|---|---|
18 | 18 |
import org.eclipse.e4.ui.services.IServiceConstants; |
19 | 19 |
import org.eclipse.jface.viewers.TreeSelection; |
20 | 20 |
|
21 |
import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto; |
|
22 | 21 |
import eu.etaxonomy.taxeditor.navigation.navigator.e4.TaxonNavigatorE4; |
23 | 22 |
|
24 | 23 |
/** |
... | ... | |
40 | 39 |
@CanExecute |
41 | 40 |
private boolean canExecute(@Named(IServiceConstants.ACTIVE_SELECTION)TreeSelection selection, MHandledMenuItem menuItem){ |
42 | 41 |
boolean canExecute = false; |
43 |
canExecute = selection.getFirstElement() instanceof TaxonNodeDto;
|
|
42 |
canExecute = !selection.isEmpty();
|
|
44 | 43 |
menuItem.setVisible(canExecute); |
45 | 44 |
return canExecute; |
46 | 45 |
} |
Also available in: Unified diff
ref #7010 Adapt taxon navigator handlers for multiple selection