Merge branch 'develop' into remoting-4.0
authorCherian Mathew <c.mathew@bgbm.org>
Mon, 14 Sep 2015 14:37:41 +0000 (16:37 +0200)
committerCherian Mathew <c.mathew@bgbm.org>
Mon, 14 Sep 2015 14:37:41 +0000 (16:37 +0200)
Conflicts:
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/create/NewSpecimenHandler.java

1  2 
eu.etaxonomy.taxeditor.application/.classpath
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/create/NewSpecimenHandler.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewDerivedUnitBaseWizard.java

@@@ -3,7 -3,6 +3,6 @@@
        <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>
@@@ -45,29 -31,28 +31,29 @@@ public class NewSpecimenHandler extend
        /** {@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;
        }
  }