Project

General

Profile

« Previous | Next » 

Revision 54cc3ca6

Added by Katja Luther over 5 years ago

ref #6559: order misapplied names, pro parte synonyms and invalid designations

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/container/MisappliedGroupE4.java
32 32
	@Override
33 33
	protected void createContainers() {
34 34

  
35
		for(Taxon misapplication : getEditor().getTaxon().getProParteAndPartialSynonyms()){
35
		for(Taxon misapplication : getEditor().getTaxon().getAllProParteSynonyms()){
36 36
            ConceptContainerE4 container = new ConceptContainerE4(this, misapplication, false);
37 37
            this.add(container);
38 38
            container.createContent();
39 39
        }
40
		for(Taxon misapplication : getEditor().getTaxon().getMisappliedNames(true)){
40
		for(Taxon invalidDes : getEditor().getTaxon().getInvalidDesignations()){
41

  
42
            ConceptContainerE4 container = new ConceptContainerE4(this, invalidDes, true);
43
            this.add(container);
44
            container.createContent();
45
        }
46

  
47
		for(Taxon misapplication : getEditor().getTaxon().getAllMisappliedNames()){
41 48

  
42 49
            ConceptContainerE4 container = new ConceptContainerE4(this, misapplication, true);
43 50
            this.add(container);
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NomenclaturalStatusElement.java
9 9

  
10 10
package eu.etaxonomy.taxeditor.ui.section.name;
11 11

  
12
import java.util.Comparator;
13

  
12 14
import org.eclipse.swt.events.SelectionListener;
13 15

  
14 16
import eu.etaxonomy.cdm.api.service.IVocabularyService;
......
49 51
	@Override
50 52
	public void createControls(ICdmFormElement element, int style) {
51 53
	    TermVocabulary vocabulary = CdmStore.getService(IVocabularyService.class).find(VocabularyEnum.NomenclaturalStatusType.getUuid());
52
		nomenclaturalStatusTypeCombo = formFactory.createDefinedTermComboElement(vocabulary, this, "Status", null,false, style, true);
54

  
55
	    Comparator<NomenclaturalStatusType> termComparator= (NomenclaturalStatusType t1, NomenclaturalStatusType t2) -> t1.getLabel().compareTo(t2.getLabel());
56
		nomenclaturalStatusTypeCombo = formFactory.createDefinedTermComboElement(vocabulary, this, "Status", null,true, style, true);
57
		nomenclaturalStatusTypeCombo.setTermComparator(termComparator);
53 58
		ruleConsideredText = formFactory.createTextWithLabelElement(this, "Rule Considered", "", style);
54 59

  
55 60
		super.createControls(element, style);
......
60 65
	@Override
61 66
	public void setEntity(NomenclaturalStatus entity) {
62 67
		super.setEntity(entity);
63
		if (entity.getType() != null){
64
		    nomenclaturalStatusTypeCombo.setSelection(entity.getType());
65
		}
68
//		if (entity.getType() != null){
69
//		    nomenclaturalStatusTypeCombo.setSelection(entity.getType());
70
//		}
66 71
		ruleConsideredText.setText(entity.getRuleConsidered());
67 72
	}
68 73

  
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonRelationshipDetailElement.java
14 14
import eu.etaxonomy.cdm.model.reference.Reference;
15 15
import eu.etaxonomy.cdm.model.taxon.Taxon;
16 16
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
17
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
18 17
import eu.etaxonomy.taxeditor.event.EventUtility;
19 18
import eu.etaxonomy.taxeditor.event.WorkbenchEventConstants;
20 19
import eu.etaxonomy.taxeditor.model.TaxonRelationshipTypeInverseContainer;
......
199 198
        }
200 199
		firePropertyChangeEvent(new CdmPropertyChangeEvent(this, null));
201 200
		EventUtility.postEvent(WorkbenchEventConstants.REFRESH_NAME_EDITOR, getEntity().getToTaxon());
201
		taxonElement.updateTitle();
202 202
	}
203 203

  
204 204
	 @Override
......
208 208
	    }
209 209
	 @Override
210 210
	 protected void handleTitleCacheRelevantChange(PropertyChangeEvent event) {
211
		 if (getEntity().getType().equals(TaxonRelationshipType.MISAPPLIED_NAME_FOR())){
211
		 if (getEntity().getType().isAnyMisappliedName() || getEntity().getType().isAnySynonym()){
212 212
			String title = taxon.generateTitle();
213 213
			taxon.setTitleCache(title);
214 214
			super.handleTitleCacheRelevantChange(event);

Also available in: Unified diff