Project

General

Profile

Revision 92e8d1df

ID92e8d1df8062226a509a5baa488e270007460beb
Parent ac0479b6
Child 71e8cb9c

Added by Katja Luther over 1 year ago

adapt details view to pro parte synonyms

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/AbstractCdmDataViewerE4.java
29 29
import eu.etaxonomy.taxeditor.model.IDirtyMarkable;
30 30
import eu.etaxonomy.taxeditor.model.MessagingUtils;
31 31
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
32
import eu.etaxonomy.taxeditor.remoting.CdmEagerLoadingException;
32 33
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
33 34
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
34 35
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
......
138 139
	public void setInput(Object input) {
139 140
		this.input = input;
140 141
		if(input!=null){
141
		    refresh();
142
		    try{
143
		        refresh();
144
		    }catch(CdmEagerLoadingException e){
145
		        logger.error(e);
146
		    }
142 147
		}
143 148
	}
144 149

  
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/AbstractCdmEditorPartE4.java
36 36
import eu.etaxonomy.cdm.model.description.Distribution;
37 37
import eu.etaxonomy.cdm.model.taxon.Taxon;
38 38
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
39
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
39 40
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
40 41
import eu.etaxonomy.taxeditor.editor.IDistributionEditor;
41 42
import eu.etaxonomy.taxeditor.editor.ITaxonEditor;
......
195 196
            if(selection.getFirstElement()!=null){
196 197
                if (element instanceof Taxon){
197 198
                    Taxon taxon = HibernateProxyHelper.deproxy(element, Taxon.class);
198
                    if (taxon.isMisapplication()){
199
                    if (taxon.isMisapplication() || taxon.isProparteSynonym()){
199 200

  
200 201
                        if(part instanceof ITaxonEditor){
201 202
                            Taxon accepted = ((ITaxonEditor) part).getTaxon();
......
203 204

  
204 205
                            if (rels != null && rels.iterator().hasNext()){
205 206
                                TaxonRelationship rel = rels.iterator().next();
206
                                if (rel.getType().isAnyMisappliedName() && !rel.getFromTaxon().equals(((ITaxonEditor) part).getTaxon())){
207
                                if ((rel.getType().isAnyMisappliedName() || rel.getType().equals(TaxonRelationshipType.PRO_PARTE_SYNONYM_FOR()))&& !rel.getFromTaxon().equals(((ITaxonEditor) part).getTaxon())){
207 208
                                    viewer.setInput(rel);
208 209

  
209 210
                                    return;
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/details/DetailsViewerE4.java
56 56
import eu.etaxonomy.cdm.model.reference.Reference;
57 57
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
58 58
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
59
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
59 60
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
60 61
import eu.etaxonomy.taxeditor.editor.IDistributionEditor;
61 62
import eu.etaxonomy.taxeditor.event.WorkbenchEventConstants;
......
355 356
        } else if (input instanceof Group) {
356 357
            createGroupSection(rootElement);
357 358
        } else if (input instanceof TaxonRelationship && ((TaxonRelationship)input).getType()!=null
358
                && ((TaxonRelationship)input).getType().isAnyMisappliedName()) {
359
                && (((TaxonRelationship)input).getType().isAnyMisappliedName() || ((TaxonRelationship)input).getType().equals(TaxonRelationshipType.PRO_PARTE_SYNONYM_FOR()))) {
359 360
            createMisappliedNameSection(rootElement);
360 361
        }else if (input instanceof TaxonRelationship ) {
361 362
            createTaxonRelationshipSection(rootElement);

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)