<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry including="**/*.java" kind="src" path="src/main/java"/>
- <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="src" path="src/test/java"/>
- <classpathentry kind="src" path="src/main/resources/"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
/** {@inheritDoc} */
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
- ConversationHolder conversation = CdmStore.createConversation();
- conversation.bind();
- FieldUnit fieldUnit = FieldUnit.NewInstance();
- DerivedUnit derivedUnit = DerivedUnit.NewInstance(SpecimenOrObservationType.PreservedSpecimen);
- DerivationEvent.NewSimpleInstance(fieldUnit, derivedUnit, DerivationEventType.GATHERING_IN_SITU());
- CdmStore.getService(IOccurrenceService.class).merge(fieldUnit);
- conversation.commit();
- DerivateViewEditorInput input = new DerivateViewEditorInput(Collections.singleton(fieldUnit.getUuid()));
- fieldUnit.setCacheStrategy(new DerivedUnitFacadeFieldUnitCacheStrategy());
- derivedUnit.setCacheStrategy(new DerivedUnitFacadeCacheStrategy());
- 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();
++
+ //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;
}
}