Revision 3470949e
Added by Katja Luther about 3 years ago
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/ChangeAcceptedTaxonToSynonymHandlerE4.java | ||
---|---|---|
124 | 124 |
Set<UUID> excludeTaxa = new HashSet<>(); |
125 | 125 |
Set<UUID> secUuids = new HashSet<>(); |
126 | 126 |
Set<UUID> nodeUuids = new HashSet<>(); |
127 |
boolean published = true; |
|
128 | 127 |
|
129 | 128 |
for (TaxonNodeDto oldNode:oldTaxonNodes){ |
130 | 129 |
excludeTaxa.add(oldNode.getTaxonUuid()); |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/common/ExternalLinksElement.java | ||
---|---|---|
11 | 11 |
import org.eclipse.swt.events.SelectionListener; |
12 | 12 |
|
13 | 13 |
import eu.etaxonomy.cdm.model.media.ExternalLink; |
14 |
import eu.etaxonomy.cdm.model.media.ExternalLinkType; |
|
15 |
import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement; |
|
16 | 14 |
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection; |
17 | 15 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
18 | 16 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
... | ... | |
32 | 30 |
private SelectionArbitrator selectionArbitrator; |
33 | 31 |
|
34 | 32 |
private UriWithLabelElement externalLinkUriText; |
35 |
private EnumComboElement<ExternalLinkType> combo_linkType; |
|
36 | 33 |
private MultilanguageTextElement description; |
37 |
private boolean isWithTypeAndDescription = true;
|
|
34 |
private boolean isShowDescription = true;
|
|
38 | 35 |
|
39 | 36 |
|
40 | 37 |
|
... | ... | |
67 | 64 |
if(formFactory.getSelectionProvider() != null){ |
68 | 65 |
selectionArbitrator = formFactory.createSelectionArbitrator(this); |
69 | 66 |
} |
70 |
this.isWithTypeAndDescription = isWithTypeAndDesc;
|
|
67 |
this.isShowDescription = isWithTypeAndDesc;
|
|
71 | 68 |
|
72 | 69 |
} |
73 | 70 |
|
... | ... | |
82 | 79 |
if (entity.getUri() != null){ |
83 | 80 |
externalLinkUriText.setText(entity.getUri().toString()); |
84 | 81 |
} |
85 |
if (entity.getLinkType() != null && combo_linkType != null){ |
|
86 |
combo_linkType.setSelection(entity.getLinkType()); |
|
87 |
} |
|
82 |
|
|
88 | 83 |
if (entity.getDescription() != null && description != null) { |
89 | 84 |
description.setMultilanguageText(entity.getDescription()); |
90 | 85 |
// description.setText(entity.getDescription().get( |
... | ... | |
95 | 90 |
@Override |
96 | 91 |
public void createControls(ICdmFormElement element, int style) { |
97 | 92 |
externalLinkUriText = formFactory.createUriWithLabelElement(element, "URI", null, style); |
98 |
if(isWithTypeAndDescription){ |
|
99 |
combo_linkType = formFactory.createEnumComboElement(ExternalLinkType.class, element, style); |
|
93 |
if(isShowDescription){ |
|
100 | 94 |
description = formFactory.createMultiLanguageTextElement(element, "Description", null, 50, style); |
101 | 95 |
} |
102 | 96 |
} |
... | ... | |
105 | 99 |
public void handleEvent(Object eventSource) { |
106 | 100 |
if (eventSource.equals(externalLinkUriText)){ |
107 | 101 |
getEntity().setUri(externalLinkUriText.parseText()); |
108 |
}else if (eventSource.equals(combo_linkType)){ |
|
109 |
getEntity().setLinkType(combo_linkType.getSelection()); |
|
110 | 102 |
}else if (eventSource.equals(description)){ |
111 | 103 |
description.getMultilanguageText().values() |
112 | 104 |
.forEach(languageString -> getEntity().putDescription(languageString)); |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/common/ExternalLinksSection.java | ||
---|---|---|
30 | 30 |
|
31 | 31 |
private String emptySectionString = "No external link yet."; |
32 | 32 |
|
33 |
private boolean isAdvanced = true;
|
|
33 |
private boolean isShowDescription = true;
|
|
34 | 34 |
|
35 | 35 |
|
36 | 36 |
|
... | ... | |
54 | 54 |
public ExternalLinksSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, |
55 | 55 |
ICdmFormElement parentElement, boolean isAdvanced, String string, int style) { |
56 | 56 |
super(cdmFormFactory, conversation, parentElement, string, style); |
57 |
this.isAdvanced = isAdvanced;
|
|
57 |
this.isShowDescription = isAdvanced;
|
|
58 | 58 |
} |
59 | 59 |
|
60 | 60 |
|
... | ... | |
163 | 163 |
|
164 | 164 |
|
165 | 165 |
public boolean isAdvanced() { |
166 |
return isAdvanced;
|
|
166 |
return isShowDescription;
|
|
167 | 167 |
} |
168 | 168 |
|
169 | 169 |
|
170 | 170 |
public void setAdvanced(boolean isAdvanced) { |
171 |
this.isAdvanced = isAdvanced;
|
|
171 |
this.isShowDescription = isAdvanced;
|
|
172 | 172 |
} |
173 | 173 |
|
174 | 174 |
} |
Also available in: Unified diff
fix #9545: remove external link type