Project

General

Profile

Revision 159247e6

ID159247e62b7852351928df6d4829b3b58fced261
Parent 30c956e4
Child a797ba42

Added by Patrick Plitzner about 2 years ago

ref #6668 Update taxon name editor when deleting the type specimen

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/TaxonNameEditorE4.java
29 29
import org.eclipse.e4.ui.di.Focus;
30 30
import org.eclipse.e4.ui.di.Persist;
31 31
import org.eclipse.e4.ui.di.UIEventTopic;
32
import org.eclipse.e4.ui.model.application.MApplication;
32 33
import org.eclipse.e4.ui.model.application.ui.MDirtyable;
33 34
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
34 35
import org.eclipse.e4.ui.services.EMenuService;
36
import org.eclipse.e4.ui.workbench.modeling.EPartService;
35 37
import org.eclipse.e4.ui.workbench.modeling.ESelectionService;
36 38
import org.eclipse.jface.dialogs.MessageDialog;
37 39
import org.eclipse.jface.viewers.ISelection;
......
52 54

  
53 55
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
54 56
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
57
import eu.etaxonomy.cdm.api.service.DeleteResult;
55 58
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
56 59
import eu.etaxonomy.cdm.model.common.CdmBase;
57 60
import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
......
61 64
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
62 65
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
63 66
import eu.etaxonomy.taxeditor.editor.CdmDataTransfer;
67
import eu.etaxonomy.taxeditor.editor.EditorUtil;
64 68
import eu.etaxonomy.taxeditor.editor.ISecuredEditor;
65 69
import eu.etaxonomy.taxeditor.editor.ITaxonEditor;
66 70
import eu.etaxonomy.taxeditor.editor.e4.TaxonEditorInputE4;
......
723 727
        }
724 728
    }
725 729

  
730
    @Inject
731
    @Optional
732
    private void updatefromDelete(@UIEventTopic(WorkbenchEventConstants.DELETE_DERIVATIVE)DeleteResult result,
733
            EPartService partService, MApplication application){
734
        //TODO evaluate if update necessary based on specimen type designations
735
        EditorUtil.updateEditor(this.input.getTaxonNode(), partService, application);
736
    }
737

  
726 738
}
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/DeleteDerivateHandler.java
34 34
import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin;
35 35
import eu.etaxonomy.taxeditor.editor.l10n.Messages;
36 36
import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
37
import eu.etaxonomy.taxeditor.event.EventUtility;
38
import eu.etaxonomy.taxeditor.event.WorkbenchEventConstants;
37 39
import eu.etaxonomy.taxeditor.model.DeleteResultMessagingUtils;
38 40
import eu.etaxonomy.taxeditor.model.MessagingUtils;
39 41
import eu.etaxonomy.taxeditor.store.CdmStore;
......
78 80

  
79 81
                return Status.CANCEL_STATUS;
80 82
            }
83
            //broadcast delete result
84
            EventUtility.postEvent(WorkbenchEventConstants.DELETE_DERIVATIVE, deleteResult);
85

  
81 86
            if(derivateView.postOperation(null)){
82 87
                derivateView.remove(treeNode);
83 88

  
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/event/WorkbenchEventConstants.java
26 26
    public static final String REFRESH_NAME_EDITOR = "REFRESH/EDITOR/NAME";
27 27

  
28 28
    public static final String REFRESH_SUPPLEMENTAL = "REFRESH/SUPPLEMENTAL";
29

  
29 30
    public static final String NO_FOCUS_VIEW = "FOCUS/NO";
30 31

  
32
    public static final String DELETE_DERIVATIVE = "DELETE/DERIVATIVE";
33

  
31 34
}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)