Project

General

Profile

« Previous | Next » 

Revision 9e1446d2

Added by Katja Luther about 5 years ago

ref #7428: update all name editors involved when executing subtree operations

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/TaxonNameEditorE4.java
61 61
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
62 62
import eu.etaxonomy.cdm.model.common.CdmBase;
63 63
import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
64
import eu.etaxonomy.cdm.model.name.TaxonName;
64 65
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
65 66
import eu.etaxonomy.cdm.model.taxon.Taxon;
66 67
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
......
752 753
        }
753 754
    }
754 755

  
756
    @Inject
757
    @Optional
758
    private void updateView(@UIEventTopic(WorkbenchEventConstants.REFRESH_NAME_EDITOR) List<CdmBase> cdmBases) {
759

  
760
        for (CdmBase cdmBase: cdmBases){
761
            if (cdmBase instanceof Taxon || cdmBase instanceof TaxonName){
762
                if ((EventUtility.getTaxonEditor() != null && EventUtility.getTaxonEditor().equals(this))
763
                        || (this.taxon != null && (this.taxon.equals(cdmBase)
764
                                || (this.taxon.getName() != null && this.taxon.getName().equals(cdmBase))))) {
765
                    EPartService partService = TaxeditorEditorPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getService(EPartService.class);
766
                    EModelService modelService = TaxeditorEditorPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getService(EModelService.class);
767
                    EditorUtil.openTaxonBaseE4(this.getTaxon().getUuid(), modelService, partService, application);
768

  
769
                }
770
            }
771
        }
772
    }
773

  
755 774
    @Inject
756 775
    @Optional
757 776
    private void updateView(@UIEventTopic(WorkbenchEventConstants.REFRESH_NAME_EDITOR) UUID cdmbaseUuid) {

Also available in: Unified diff