Revision a3e1e5d7
Added by Katja Luther about 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/MisappliedRelationshipComboElement.java | ||
---|---|---|
41 | 41 |
relTypes.add(TaxonRelationshipType.MISAPPLIED_NAME_FOR()); |
42 | 42 |
relTypes.add(TaxonRelationshipType.PRO_PARTE_MISAPPLIED_NAME_FOR()); |
43 | 43 |
populateTerms(relTypes); |
44 |
setSelection(selection); |
|
44 | 45 |
} |
45 | 46 |
|
46 | 47 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmFormFactory.java | ||
---|---|---|
1003 | 1003 |
TaxonRelationshipType selection, |
1004 | 1004 |
int style) { |
1005 | 1005 |
MisappliedRelationshipComboElement combo = new MisappliedRelationshipComboElement(this, parentElement, labelString, selection, false, style, false); |
1006 |
adapt(combo); |
|
1007 |
parentElement.addElement(combo); |
|
1006 | 1008 |
return combo; |
1007 | 1009 |
} |
1008 | 1010 |
|
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/AbstractCdmEditorPartE4.java | ||
---|---|---|
35 | 35 |
import eu.etaxonomy.cdm.model.description.Distribution; |
36 | 36 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
37 | 37 |
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship; |
38 |
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType; |
|
39 | 38 |
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap; |
40 | 39 |
import eu.etaxonomy.taxeditor.editor.IDistributionEditor; |
41 | 40 |
import eu.etaxonomy.taxeditor.editor.ITaxonEditor; |
... | ... | |
191 | 190 |
|
192 | 191 |
if (rels.iterator().hasNext()){ |
193 | 192 |
TaxonRelationship rel = rels.iterator().next(); |
194 |
if (rel.getType().equals(TaxonRelationshipType.MISAPPLIED_NAME_FOR()) && !rel.getFromTaxon().equals(((ITaxonEditor) part).getTaxon())){
|
|
193 |
if (rel.getType().isAnyMisappliedName() && !rel.getFromTaxon().equals(((ITaxonEditor) part).getTaxon())){
|
|
195 | 194 |
viewer.setInput(rel); |
196 | 195 |
|
197 | 196 |
return; |
... | ... | |
242 | 241 |
|
243 | 242 |
} |
244 | 243 |
} |
245 |
|
|
244 |
|
|
246 | 245 |
} |
247 | 246 |
selectionProvidingPart = null; |
248 | 247 |
if(thisPart!=null){ |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/details/DetailsViewerE4.java | ||
---|---|---|
51 | 51 |
import eu.etaxonomy.cdm.model.reference.Reference; |
52 | 52 |
import eu.etaxonomy.cdm.model.taxon.TaxonBase; |
53 | 53 |
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship; |
54 |
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType; |
|
55 | 54 |
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap; |
56 | 55 |
import eu.etaxonomy.taxeditor.editor.IDistributionEditor; |
57 | 56 |
import eu.etaxonomy.taxeditor.model.AbstractUtility; |
... | ... | |
152 | 151 |
detailsEnabled = true; |
153 | 152 |
} |
154 | 153 |
setInput(input); |
155 |
|
|
154 |
|
|
156 | 155 |
} |
157 | 156 |
// START HACK TO MAKE THE DERIVED UNIT FACADE WORK |
158 | 157 |
// since we are getting implementations of DerivedUnitBase from the bulk |
... | ... | |
338 | 337 |
} else if (input instanceof Group) { |
339 | 338 |
createGroupSection(rootElement); |
340 | 339 |
} else if (input instanceof TaxonRelationship && ((TaxonRelationship)input).getType()!=null |
341 |
&& ((TaxonRelationship)input).getType().equals(TaxonRelationshipType.MISAPPLIED_NAME_FOR())) {
|
|
340 |
&& ((TaxonRelationship)input).getType().isMisappliedNameOrInvalidDesignation()) {
|
|
342 | 341 |
createMisappliedNameSection(rootElement); |
343 | 342 |
}else if (input instanceof TaxonRelationship ) { |
344 | 343 |
createTaxonRelationshipSection(rootElement); |
... | ... | |
817 | 816 |
private void createMisappliedNameSection(RootElement parent) { |
818 | 817 |
destroySections(); |
819 | 818 |
|
820 |
TaxonRelationshipDetailSection taxonRelationshipDetailSection = formFactory.createTaxonRelationshipDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED); |
|
819 |
TaxonRelationshipDetailSection taxonRelationshipDetailSection = formFactory.createTaxonRelationshipDetailSection(getConversationHolder(), parent, this, |
|
820 |
ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED); |
|
821 |
addPart(taxonRelationshipDetailSection); |
|
821 | 822 |
|
822 | 823 |
formFactory.createHorizontalSeparator(parent, SWT.BORDER); |
823 | 824 |
|
824 |
addPart(taxonRelationshipDetailSection); |
|
825 | 825 |
|
826 | 826 |
NonViralNameDetailSection nonViralNameSection = formFactory |
827 | 827 |
.createNonViralNameDetailSection(getConversationHolder(), parent, this, true, |
Also available in: Unified diff
ref #7215: fix selection of type