-// $Id$
/**
* Copyright (C) 2007 EDIT
* European Distributed Institute of Taxonomy
package eu.etaxonomy.taxeditor.bulkeditor.command;
+import java.util.Collections;
import java.util.Map;
import org.apache.log4j.Logger;
import eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput;
/**
- * <p>DynamicNewObjectMenu class.</p>
- *
* @author n.hoffmann
* @created 17.04.2009
* @version 1.0
private static final Logger logger = Logger
.getLogger(DynamicNewObjectMenu.class);
- private IHandlerService handlerService = (IHandlerService) BulkEditorUtil.getService(IHandlerService.class);
+ private final IHandlerService handlerService = (IHandlerService) BulkEditorUtil.getService(IHandlerService.class);
private Map<Object, String> classLabelPairs;
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.CompoundContributionItem#getContributionItems()
- */
+
/** {@inheritDoc} */
@Override
protected IContributionItem[] getContributionItems() {
if(input instanceof AbstractBulkEditorInput){
IEntityCreator<?> entityCreator = ((AbstractBulkEditorInput) input).getEntityCreator();
- return entityCreator.getKeyLabelPairs();
+ if(entityCreator!=null){
+ return entityCreator.getKeyLabelPairs();
+ }
}
}
- return null;
+ return Collections.EMPTY_MAP;
}
}