Revision 71a082e0
Added by Patrick Plitzner about 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/handler/RemoveFeatureHandler.java | ||
---|---|---|
48 | 48 |
@Named(IServiceConstants.ACTIVE_PART)MPart thisPart, |
49 | 49 |
MHandledMenuItem menuItem) { |
50 | 50 |
boolean canExecute = selection!=null && !selection.isEmpty(); |
51 |
for(Object object:selection.toArray()){ |
|
52 |
canExecute &= object instanceof FeatureNode; |
|
51 |
if(selection!=null){ |
|
52 |
for(Object object:selection.toArray()){ |
|
53 |
canExecute &= object instanceof FeatureNode; |
|
54 |
} |
|
53 | 55 |
} |
54 | 56 |
canExecute &= thisPart.getObject() instanceof IE4ViewerPart; |
55 | 57 |
menuItem.setVisible(canExecute); |
Also available in: Unified diff
ref #6746 Fix potential NPE