Project

General

Profile

Revision cbe745d1

IDcbe745d1268d88505d6bd4e7a4ec42923c227191
Parent 95b421bd
Child 7171015b

Added by Katja Luther about 2 years ago

fix #5696: updating details view and supplemental data view after choosing a new name

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/event/WorkbenchEventConstants.java
21 21

  
22 22
    public static final String REFRESH_NAVIGATOR = "REFRESH/NAVIGATOR";
23 23

  
24
    public static final String REFRESH_TAXON_DETAILS = "REFRESH/DETAILS/TAXON";
25

  
24 26
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NonViralNameDetailSection.java
21 21
import eu.etaxonomy.cdm.model.name.INonViralName;
22 22
import eu.etaxonomy.cdm.model.name.TaxonName;
23 23
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
24
import eu.etaxonomy.taxeditor.event.EventUtility;
25
import eu.etaxonomy.taxeditor.event.WorkbenchEventConstants;
24 26
import eu.etaxonomy.taxeditor.model.ImageResources;
25 27
import eu.etaxonomy.taxeditor.model.MessagingUtils;
26 28
import eu.etaxonomy.taxeditor.ui.dialog.selection.NameSelectionDialog;
......
71 73
	                    if(taxonName!=null){
72 74
                            TaxonName nonViralName = HibernateProxyHelper.deproxy(taxonName);
73 75
                            taxonBase.setName(nonViralName);
74
                            //				        taxonBase.getTitleCache();
75 76
                            setEntity(nonViralName);
77

  
76 78
                            firePropertyChangeEvent(NonViralNameDetailSection.this);
79
                            EventUtility.postEvent(WorkbenchEventConstants.REFRESH_NAVIGATOR, true);
80
                            EventUtility.postEvent(WorkbenchEventConstants.REFRESH_TAXON_DETAILS, true);
77 81
	                    }
78 82
	                }
79 83
	            };
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/reference/NomenclaturalReferenceDetailSection.java
57 57
	@Override
58 58
    public void setTaxonBase(TaxonBase entity) {
59 59
		this.taxonBase = entity;
60
		TaxonName name = (TaxonName) HibernateProxyHelper.deproxy(entity.getName());
60
		TaxonName name = HibernateProxyHelper.deproxy(entity.getName());
61 61
		setEntity(name);
62 62
	}
63 63

  
......
83 83
			AbstractCdmDetailSection<TaxonName> parentElement, int style) {
84 84
	    return formFactory.createNomenclaturalReferenceDetailElement(parentElement, style);
85 85
	}
86

  
87

  
88

  
89

  
90

  
91

  
86 92
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/supplementaldata/SupplementalDataViewerE4.java
9 9

  
10 10
package eu.etaxonomy.taxeditor.view.e4.supplementaldata;
11 11

  
12
import javax.inject.Inject;
13

  
14
import org.eclipse.e4.core.di.annotations.Optional;
15
import org.eclipse.e4.ui.di.UIEventTopic;
12 16
import org.eclipse.jface.viewers.ISelection;
13 17
import org.eclipse.swt.SWT;
14 18
import org.eclipse.ui.forms.widgets.ExpandableComposite;
......
18 22
import eu.etaxonomy.cdm.model.common.VersionableEntity;
19 23
import eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity;
20 24
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
25
import eu.etaxonomy.taxeditor.event.WorkbenchEventConstants;
21 26
import eu.etaxonomy.taxeditor.model.IElementHasDetails;
22 27
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
23 28
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
......
168 173
	@Override
169 174
	public void update(CdmDataChangeMap arg0) {
170 175
	}
176

  
177
	@Inject
178
    @Optional
179
    private void updateView(@UIEventTopic(WorkbenchEventConstants.REFRESH_TAXON_DETAILS)boolean refresh){
180
        if(refresh){
181
            this.refresh();
182
        }
183
    }
171 184
}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)