Revision 0b4fb2cc
Added by Patrick Plitzner almost 8 years ago
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/command/DynamicNewObjectMenu.java | ||
---|---|---|
10 | 10 |
|
11 | 11 |
package eu.etaxonomy.taxeditor.bulkeditor.command; |
12 | 12 |
|
13 |
import java.util.Collections; |
|
13 | 14 |
import java.util.Map; |
14 | 15 |
|
15 | 16 |
import org.apache.log4j.Logger; |
... | ... | |
32 | 33 |
import eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput; |
33 | 34 |
|
34 | 35 |
/** |
35 |
* <p>DynamicNewObjectMenu class.</p> |
|
36 |
* |
|
37 | 36 |
* @author n.hoffmann |
38 | 37 |
* @created 17.04.2009 |
39 | 38 |
* @version 1.0 |
... | ... | |
44 | 43 |
|
45 | 44 |
private final IHandlerService handlerService = (IHandlerService) BulkEditorUtil.getService(IHandlerService.class); |
46 | 45 |
private Map<Object, String> classLabelPairs; |
47 |
/* (non-Javadoc) |
|
48 |
* @see org.eclipse.ui.actions.CompoundContributionItem#getContributionItems() |
|
49 |
*/ |
|
46 |
|
|
50 | 47 |
/** {@inheritDoc} */ |
51 | 48 |
@Override |
52 | 49 |
protected IContributionItem[] getContributionItems() { |
... | ... | |
99 | 96 |
|
100 | 97 |
if(input instanceof AbstractBulkEditorInput){ |
101 | 98 |
IEntityCreator<?> entityCreator = ((AbstractBulkEditorInput) input).getEntityCreator(); |
102 |
return entityCreator.getKeyLabelPairs(); |
|
99 |
if(entityCreator!=null){ |
|
100 |
return entityCreator.getKeyLabelPairs(); |
|
101 |
} |
|
103 | 102 |
} |
104 | 103 |
} |
105 | 104 |
|
106 |
return null;
|
|
105 |
return Collections.EMPTY_MAP;
|
|
107 | 106 |
} |
108 | 107 |
} |
Also available in: Unified diff
Remove bulk editor for name relations from menu #5788