Project

General

Profile

« Previous | Next » 

Revision 0e7b64fb

Added by Katja Luther about 3 years ago

ref #9549: adapt editor to secundum as originalsource and remove unused fields

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonBaseDetailElement.java
11 11
import org.eclipse.jface.util.PropertyChangeEvent;
12 12
import org.eclipse.swt.SWT;
13 13

  
14
import eu.etaxonomy.cdm.model.reference.Reference;
15 14
import eu.etaxonomy.cdm.model.taxon.Synonym;
16 15
import eu.etaxonomy.cdm.model.taxon.SynonymType;
17 16
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
......
25 24
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
26 25
import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
27 26
import eu.etaxonomy.taxeditor.ui.section.AbstractIdentifiableEntityDetailElement;
28
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
27
import eu.etaxonomy.taxeditor.ui.section.reference.SecundumSourceElement;
29 28

  
30 29
/**
31 30
 * @author n.hoffmann
......
37 36

  
38 37
	private CheckboxElement checkbox_useNameCache;
39 38

  
40
	private EntitySelectionElement<Reference> selection_secundum;
41
	private TextWithLabelElement text_secundum_microreference;
39
//	private EntitySelectionElement<Reference> selection_secundum;
40
    private SecundumSourceElement secElement;
41

  
42 42

  
43 43
	private TextWithLabelElement text_appendedPhrase;
44 44

  
......
63 63
					formElement, "Appended Phrase", entity.getAppendedPhrase(),
64 64
					SWT.WRAP);
65 65

  
66
		selection_secundum = formFactory.createSelectionElement(Reference.class,
67
				 formElement, "Secundum",
68
				entity.getSec(), EntitySelectionElement.ALL,
69
				style);
66
		secElement = formFactory.createSecundumSourceElement(formElement, null, "Secundum");
67

  
68
		secElement.setCdmEntity(entity);
69
		secElement.setEntity(entity.getSecSource());
70
//		selection_secundum = formFactory.createSelectionElement(Reference.class,
71
//				 formElement, "Secundum",
72
//				entity.getSec(), EntitySelectionElement.ALL,
73
//				style);
70 74
		if (config != null && !config.isSecEnabled()){
71
		    selection_secundum.setEnabled(false);
72
		}
73
		if (config != null && config.isSecDetailsActivated()){
74
    		text_secundum_microreference = formFactory.createTextWithLabelElement(
75
                    formElement, "Detail",
76
                   entity.getSecMicroReference(),null,
77
                    SWT.WRAP);
75
		    secElement.setEnabled(false);
78 76
		}
79 77

  
78

  
80 79
		checkbox_useNameCache = formFactory.createCheckbox(formElement,
81 80
					"Exclude Authorship", entity.isUseNameCache(), style);
82 81
		checkbox_doubtful = formFactory.createCheckbox(formElement,
......
94 93
	    //cache relevance
95 94
        registerCacheRelevance(checkbox_doubtful);
96 95
        registerCacheRelevance(checkbox_useNameCache);
97
        registerCacheRelevance(selection_secundum);
98
        registerCacheRelevance(text_secundum_microreference);
96
        registerCacheRelevance(secElement);
99 97
        registerCacheRelevance(text_appendedPhrase);
100 98
        registerCacheRelevance(combo_relationshipType);
101 99
	}
......
135 133
			getEntity().setDoubtful(checkbox_doubtful.getSelection());
136 134
		} else if (eventSource == checkbox_useNameCache) {
137 135
			getEntity().setUseNameCache(checkbox_useNameCache.getSelection());
138
		} else if (eventSource == selection_secundum) {
139
			getEntity().setSec(selection_secundum.getSelection());
136
		} else if (eventSource == secElement) {
137
			getEntity().setSecSource(secElement.getEntity());
140 138
		} else if (eventSource == text_appendedPhrase) {
141 139
			getEntity().setAppendedPhrase(text_appendedPhrase.getText());
142
		} else if (eventSource == text_secundum_microreference) {
143
            getEntity().setSecMicroReference(text_secundum_microreference.getText());
144 140
		} else if (eventSource == checkbox_published) {
145 141
		    getEntity().setPublish(checkbox_published.getSelection());
146 142
		} else if(eventSource == combo_relationshipType){

Also available in: Unified diff