Expand polytomous key section #3461
authorPatrick Plitzner <p.plitzner@bgbm.org>
Mon, 21 Sep 2015 15:06:37 +0000 (17:06 +0200)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Tue, 22 Sep 2015 07:51:00 +0000 (09:51 +0200)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/CreateFieldUnitHandler.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java

diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/CreateFieldUnitHandler.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/CreateFieldUnitHandler.java
deleted file mode 100644 (file)
index e57cbfb..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-package eu.etaxonomy.taxeditor.editor.view.derivate.handler;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-
-import eu.etaxonomy.cdm.api.service.IOccurrenceService;
-import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
-import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
-import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateViewEditorInput;
-import eu.etaxonomy.taxeditor.model.AbstractUtility;
-import eu.etaxonomy.taxeditor.model.MessagingUtils;
-import eu.etaxonomy.taxeditor.store.CdmStore;
-
-public class CreateFieldUnitHandler extends AbstractHandler {
-
-    @Override
-    public Object execute(ExecutionEvent event) throws ExecutionException {
-        if(AbstractUtility.getActivePart() instanceof DerivateView){
-            DerivateView derivateView = (DerivateView)AbstractUtility.getActivePart();
-            if(derivateView.isDirty()){
-                MessagingUtils.warningDialog(DerivateView.VIEW_HAS_UNSAVED_CHANGES, this, DerivateView.YOU_NEED_TO_SAVE_BEFORE_PERFORMING_THIS_ACTION);
-                return null;
-            }
-            FieldUnit fieldUnit = FieldUnit.NewInstance();
-            CdmStore.getService(IOccurrenceService.class).save(fieldUnit);
-            derivateView.getConversationHolder().commit();
-            DerivateViewEditorInput input = (DerivateViewEditorInput) derivateView.getEditorInput();
-            input.addRootUuid(fieldUnit.getUuid());
-            derivateView.refreshTree();
-        }
-        return null;
-    }
-
-}
index 2b2a60399550a399c86bbc7c36de313f0fbde105..479adcaac20bca6e62c4c7d0820b2fd6959703e7 100644 (file)
@@ -711,7 +711,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
     private void createPolytomousKeyNodeSection(RootElement parent) {
         destroySections();
 
     private void createPolytomousKeyNodeSection(RootElement parent) {
         destroySections();
 
-        PolytomousKeyDetailSection polytomousKeyDetailSection = formFactory.createPolytomousKeyDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.COMPACT);
+        PolytomousKeyDetailSection polytomousKeyDetailSection = formFactory.createPolytomousKeyDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);