name="eu.etaxonomy.navigation.menu.new.separator2"
visible="true">
</separator>
- <command
- commandId="eu.etaxonomy.taxeditor.editor.command.new.specimen"
- label="%command.label.3"
- style="push">
- <visibleWhen
- checkEnabled="true">
- <reference
- definitionId="isCdmStoreConnected">
- </reference>
- </visibleWhen>
- </command>
<separator
name="eu.etaxonomy.navigation.menu.new.separator3"
visible="true">
id="eu.etaxonomy.taxeditor.editor.command.new.person"
name="%command.name.26">
</command>
- <command
- categoryId="eu.etaxonomy.taxeditor.editor.new.category"
- defaultHandler="eu.etaxonomy.taxeditor.editor.handler.create.NewSpecimenHandler"
- id="eu.etaxonomy.taxeditor.editor.command.new.specimen"
- name="%command.name.27">
- </command>
<category
id="eu.etaxonomy.taxeditor.editor.key.category"
name="%category.name.5">
+++ /dev/null
-// $Id$
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.editor.handler.create;
-
-import org.apache.log4j.Logger;
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-import eu.etaxonomy.taxeditor.newWizard.NewDerivedUnitBaseWizard;
-
-/**
- * @author n.hoffmann
- * @created Jun 16, 2010
- * @version 1.0
- */
-public class NewSpecimenHandler extends AbstractHandler {
- private static final Logger logger = Logger
- .getLogger(NewSpecimenHandler.class);
-
- /** {@inheritDoc} */
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
-
- //TODO: we need to discuss how specimens should be created and handled #5244
-// ConversationHolder conversation = CdmStore.createConversation();
-// conversation.bind();
-// FieldUnit fieldUnit = FieldUnit.NewInstance();
-// DerivedUnit derivedUnit = DerivedUnit.NewInstance(SpecimenOrObservationType.PreservedSpecimen);
-// DerivationEvent.NewSimpleInstance(fieldUnit, derivedUnit, DerivationEventType.GATHERING_IN_SITU());
-// fieldUnit.setCacheStrategy(new DerivedUnitFacadeFieldUnitCacheStrategy());
-// derivedUnit.setCacheStrategy(new DerivedUnitFacadeCacheStrategy());
-// CdmStore.getService(IOccurrenceService.class).save(fieldUnit);
-// CdmStore.getService(IOccurrenceService.class).save(derivedUnit);
-// conversation.commit();
-// DerivateViewEditorInput input = new DerivateViewEditorInput(Collections.singleton(fieldUnit.getUuid()));
-// try {
-// EditorUtil.open(input);
-// } catch (PartInitException e) {
-// // TODO Auto-generated catch block
-// e.printStackTrace();
-// }
- NewDerivedUnitBaseWizard wizard = new NewDerivedUnitBaseWizard();
- wizard.init(null, null);
- WizardDialog dialog = new WizardDialog(HandlerUtil.getActiveShell(event), wizard);
- dialog.open();
- return null;
- }
-}