+++ /dev/null
-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;
- }
-
-}
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);