Revision eec20175
Added by Katja Luther almost 2 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/RepresentationElement.java | ||
---|---|---|
29 | 29 |
import eu.etaxonomy.cdm.model.term.Representation; |
30 | 30 |
import eu.etaxonomy.cdm.model.term.TermBase; |
31 | 31 |
import eu.etaxonomy.cdm.model.term.TermType; |
32 |
import eu.etaxonomy.cdm.persistence.dto.AbstractTermDto; |
|
32 | 33 |
import eu.etaxonomy.cdm.persistence.dto.TermDto; |
33 | 34 |
import eu.etaxonomy.taxeditor.model.DefaultTermComparator; |
34 | 35 |
import eu.etaxonomy.taxeditor.model.ImageResources; |
... | ... | |
50 | 51 |
|
51 | 52 |
protected Representation selectedRepresentation; |
52 | 53 |
protected TermBase term; |
53 |
protected TermDto termDto; |
|
54 |
protected AbstractTermDto termDto;
|
|
54 | 55 |
|
55 | 56 |
private Button removeRepresentation; |
56 | 57 |
|
... | ... | |
77 | 78 |
createRepresentationEditingElements(formElement, style); |
78 | 79 |
} |
79 | 80 |
setTerm(term, fill); |
80 |
if(representation!=null){ |
|
81 |
//if(representation!=null){
|
|
81 | 82 |
setSelectedRepresentation(representation); |
82 |
}
|
|
83 |
//}
|
|
83 | 84 |
|
84 | 85 |
} |
85 | 86 |
|
86 | 87 |
public RepresentationElement(CdmFormFactory formFactory, |
87 |
ICdmFormElement formElement, Representation representation, TermDto term, |
|
88 |
ICdmFormElement formElement, Representation representation, AbstractTermDto term,
|
|
88 | 89 |
Integer textHeight, int style, boolean fill) { |
89 | 90 |
super(formFactory, formElement); |
90 | 91 |
|
... | ... | |
101 | 102 |
if(representation!=null){ |
102 | 103 |
setSelectedRepresentation(representation); |
103 | 104 |
} |
105 |
|
|
104 | 106 |
|
105 | 107 |
} |
106 | 108 |
|
... | ... | |
147 | 149 |
term.addRepresentation(rep); |
148 | 150 |
} |
149 | 151 |
|
150 |
if (selectedRepresentation != null) { |
|
151 |
combo_language.setTerms(getLanguages()); |
|
152 |
|
|
153 |
} else{ |
|
154 |
setEnabledControls(false); |
|
155 |
if (PreferencesUtil.isMultilanguageTextEditingCapability()) { |
|
156 |
removeRepresentation.setEnabled(false); |
|
157 |
} |
|
158 |
} |
|
152 |
// if (selectedRepresentation != null) {
|
|
153 |
// combo_language.setTerms(getLanguages());
|
|
154 |
// |
|
155 |
// } else{
|
|
156 |
// setEnabledControls(false);
|
|
157 |
// if (PreferencesUtil.isMultilanguageTextEditingCapability()) {
|
|
158 |
// removeRepresentation.setEnabled(false);
|
|
159 |
// }
|
|
160 |
// }
|
|
159 | 161 |
if (update){ |
160 | 162 |
updateControls(); |
161 | 163 |
} |
162 | 164 |
} |
163 | 165 |
|
164 | 166 |
public void setTermDto( |
165 |
TermDto term, boolean update) {
|
|
167 |
AbstractTermDto term, boolean update) {
|
|
166 | 168 |
this.termDto = term; |
167 | 169 |
if (term.getRepresentations().isEmpty()){ |
168 | 170 |
//if the term has no representation at all, create a default one. |
... | ... | |
173 | 175 |
if (selectedRepresentation != null) { |
174 | 176 |
combo_language.setTerms(getLanguages()); |
175 | 177 |
|
176 |
} else{ |
|
177 |
setEnabledControls(false); |
|
178 |
if (PreferencesUtil.isMultilanguageTextEditingCapability()) { |
|
179 |
removeRepresentation.setEnabled(false); |
|
180 |
} |
|
181 |
} |
|
178 |
} |
|
179 |
// else if (!term.getRepresentations().isEmpty()){ |
|
180 |
// setEnabledControls(false); |
|
181 |
// if (PreferencesUtil.isMultilanguageTextEditingCapability()) { |
|
182 |
// removeRepresentation.setEnabled(false); |
|
183 |
// } |
|
184 |
// } |
|
182 | 185 |
if (update){ |
183 | 186 |
updateControls(); |
184 | 187 |
} |
... | ... | |
234 | 237 |
public TermBase getTerm() { |
235 | 238 |
return term; |
236 | 239 |
} |
240 |
public AbstractTermDto getTermDto() { |
|
241 |
return termDto; |
|
242 |
} |
|
237 | 243 |
|
238 | 244 |
@Override |
239 | 245 |
public void propertyChange(PropertyChangeEvent event) { |
... | ... | |
278 | 284 |
|
279 | 285 |
Language selectedLanguage = combo_language.getSelection(); |
280 | 286 |
if (selectedLanguage != null) { |
281 |
selectedRepresentation = getTerm().getRepresentation(selectedLanguage); |
|
287 |
if (getTerm() != null){ |
|
288 |
selectedRepresentation = getTerm().getRepresentation(selectedLanguage); |
|
289 |
}else{ |
|
290 |
selectedRepresentation = getTermDto().getRepresentation(selectedLanguage); |
|
291 |
} |
|
282 | 292 |
if (selectedRepresentation == null){ |
283 | 293 |
selectedRepresentation = Representation.NewInstance("", "", "", selectedLanguage); |
284 | 294 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/TranslatableRepresentationElement.java | ||
---|---|---|
16 | 16 |
|
17 | 17 |
import eu.etaxonomy.cdm.model.term.Representation; |
18 | 18 |
import eu.etaxonomy.cdm.model.term.TermBase; |
19 |
import eu.etaxonomy.cdm.persistence.dto.AbstractTermDto; |
|
19 | 20 |
import eu.etaxonomy.cdm.persistence.dto.TermDto; |
20 | 21 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
21 | 22 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
... | ... | |
46 | 47 |
} |
47 | 48 |
|
48 | 49 |
public TranslatableRepresentationElement(CdmFormFactory formFactory, ICdmFormElement formElement, |
49 |
Representation representation, TermDto term, Integer textHeight, int style, boolean fill) { |
|
50 |
Representation representation, AbstractTermDto term, Integer textHeight, int style, boolean fill) {
|
|
50 | 51 |
super(formFactory, formElement, representation, term, textHeight, style, fill); |
51 | 52 |
|
52 | 53 |
|
... | ... | |
82 | 83 |
@Override |
83 | 84 |
public void widgetSelected(SelectionEvent e) { |
84 | 85 |
TermBase term = getTerm(); |
86 |
AbstractTermDto termDto = getTermDto(); |
|
87 |
|
|
85 | 88 |
|
86 |
if (term == null){ |
|
89 |
if (term == null && termDto == null){
|
|
87 | 90 |
MessagingUtils.warningDialog("No term to translate", getClass(), "The term is empty and therefore can not be translated"); |
88 | 91 |
} |
89 |
|
|
90 |
TermTranslationWizard wizard = new TermTranslationWizard(term); |
|
92 |
TermTranslationWizard wizard; |
|
93 |
if (term != null) { |
|
94 |
wizard = new TermTranslationWizard(term); |
|
95 |
}else { |
|
96 |
wizard = new TermTranslationWizard(termDto); |
|
97 |
} |
|
91 | 98 |
WizardDialog dialog = new WizardDialog(getLayoutComposite() |
92 | 99 |
.getShell(), wizard); |
93 | 100 |
|
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/feature/TermTreeDetailElement.java | ||
---|---|---|
10 | 10 |
|
11 | 11 |
import org.eclipse.swt.widgets.Label; |
12 | 12 |
|
13 |
import eu.etaxonomy.cdm.model.common.Language; |
|
14 |
import eu.etaxonomy.cdm.model.term.Representation; |
|
13 | 15 |
import eu.etaxonomy.cdm.persistence.dto.TermTreeDto; |
14 | 16 |
import eu.etaxonomy.taxeditor.event.EventUtility; |
15 | 17 |
import eu.etaxonomy.taxeditor.event.WorkbenchEventConstants; |
16 | 18 |
import eu.etaxonomy.taxeditor.model.ColorResources; |
17 | 19 |
import eu.etaxonomy.taxeditor.preference.Resources; |
20 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
|
18 | 21 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
19 | 22 |
import eu.etaxonomy.taxeditor.ui.element.CheckboxElement; |
20 | 23 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
24 |
import eu.etaxonomy.taxeditor.ui.element.RepresentationElement; |
|
21 | 25 |
import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement; |
22 | 26 |
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement; |
23 | 27 |
|
... | ... | |
31 | 35 |
private CheckboxElement orderRelevant; |
32 | 36 |
private CheckboxElement isFlat; |
33 | 37 |
|
34 |
private TextWithLabelElement titleCacheText; |
|
38 |
//private TextWithLabelElement titleCacheText; |
|
39 |
protected RepresentationElement element_Representation; |
|
35 | 40 |
|
36 | 41 |
public TermTreeDetailElement(CdmFormFactory formFactory, |
37 | 42 |
ICdmFormElement formElement) { |
... | ... | |
46 | 51 |
lblStructureText.setText(entity.getTermType().getLabel()); |
47 | 52 |
lblStructureText.setForeground(ColorResources.getColor(Resources.BLACK)); |
48 | 53 |
|
49 |
titleCacheText = formFactory.createTextWithLabelElement( |
|
50 |
formElement, "Title Cache", entity.getTitleCache(), style); |
|
51 |
|
|
54 |
// titleCacheText = formFactory.createTextWithLabelElement(
|
|
55 |
// formElement, "Title Cache", entity.getTitleCache(), style);
|
|
56 |
element_Representation = formFactory.createTranslatableRepresentationElementDto(formElement, entity.getPreferredRepresentation(CdmStore.getDefaultLanguage()),entity, 100, style, true); |
|
52 | 57 |
allowDuplicates = formFactory.createCheckbox(formElement, "Allow duplicates", entity.isAllowDuplicate(), style); |
53 | 58 |
if (entity.isContainsDuplicates() && entity.isAllowDuplicate()){ |
54 | 59 |
allowDuplicates.setEnabled(false); |
... | ... | |
68 | 73 |
|
69 | 74 |
@Override |
70 | 75 |
public void handleEvent(Object eventSource) { |
71 |
if (eventSource == titleCacheText) { |
|
72 |
getEntity().setTitleCache(titleCacheText.getText()); |
|
76 |
if (eventSource == element_Representation) { |
|
77 |
// getEntity().setTitleCache(titleCacheText.getText()); |
|
78 |
Representation selectedRepresentation = element_Representation.getSelectedRepresentation(); |
|
79 |
if(selectedRepresentation!=null){ |
|
80 |
Language representationLanguage = selectedRepresentation.getLanguage(); |
|
81 |
if(representationLanguage==null){ |
|
82 |
representationLanguage = Language.getDefaultLanguage(); |
|
83 |
} |
|
84 |
// getEntity().setLabel(selectedRepresentation.getLabel(), representationLanguage); |
|
85 |
Representation rep = getEntity().getRepresentation(representationLanguage); |
|
86 |
if (rep == null){ |
|
87 |
rep = new Representation(selectedRepresentation.getDescription(), selectedRepresentation.getLabel(), selectedRepresentation.getAbbreviatedLabel(), representationLanguage); |
|
88 |
getEntity().addRepresentation(rep); |
|
89 |
}else{ |
|
90 |
getEntity().getRepresentation(representationLanguage).setLabel(selectedRepresentation.getLabel()); |
|
91 |
getEntity().getRepresentation(representationLanguage).setAbbreviatedLabel(selectedRepresentation.getAbbreviatedLabel()); |
|
92 |
getEntity().getRepresentation(representationLanguage).setText(selectedRepresentation.getDescription()); |
|
93 |
} |
|
94 |
} |
|
95 |
getEntity().setTitleCache(null); |
|
73 | 96 |
} |
74 | 97 |
else |
75 | 98 |
if (eventSource == allowDuplicates) { |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/feature/TermTreeDetailElementForNode.java | ||
---|---|---|
10 | 10 |
|
11 | 11 |
import org.eclipse.swt.widgets.Label; |
12 | 12 |
|
13 |
import eu.etaxonomy.cdm.model.common.Language; |
|
14 |
import eu.etaxonomy.cdm.model.term.Representation; |
|
13 | 15 |
import eu.etaxonomy.cdm.model.term.TermTree; |
14 | 16 |
import eu.etaxonomy.taxeditor.model.AbstractUtility; |
15 | 17 |
import eu.etaxonomy.taxeditor.model.ColorResources; |
16 | 18 |
import eu.etaxonomy.taxeditor.preference.Resources; |
19 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
|
17 | 20 |
import eu.etaxonomy.taxeditor.termtree.e4.ICharacterEditor; |
18 | 21 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
19 | 22 |
import eu.etaxonomy.taxeditor.ui.element.CheckboxElement; |
20 | 23 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
24 |
import eu.etaxonomy.taxeditor.ui.element.RepresentationElement; |
|
21 | 25 |
import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement; |
22 | 26 |
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement; |
23 | 27 |
|
... | ... | |
31 | 35 |
private CheckboxElement orderRelevant; |
32 | 36 |
private CheckboxElement isFlat; |
33 | 37 |
|
34 |
private TextWithLabelElement titleCacheText; |
|
38 |
// private TextWithLabelElement titleCacheText; |
|
39 |
protected RepresentationElement element_Representation; |
|
35 | 40 |
|
36 | 41 |
public TermTreeDetailElementForNode(CdmFormFactory formFactory, |
37 | 42 |
ICdmFormElement formElement) { |
... | ... | |
48 | 53 |
lblStructureText.setText(entity.getTermType().getLabel()); |
49 | 54 |
lblStructureText.setForeground(ColorResources.getColor(Resources.BLACK)); |
50 | 55 |
|
51 |
titleCacheText = formFactory.createTextWithLabelElement( |
|
52 |
formElement, "Title Cache", entity.getTitleCache(), style); |
|
53 |
|
|
56 |
// titleCacheText = formFactory.createTextWithLabelElement(
|
|
57 |
// formElement, "Title Cache", entity.getTitleCache(), style);
|
|
58 |
element_Representation = formFactory.createTranslatableRepresentationElement(formElement, entity.getPreferredRepresentation(CdmStore.getDefaultLanguage()),entity, 100, style, true); |
|
54 | 59 |
|
55 | 60 |
allowDuplicates = formFactory.createCheckbox(formElement, "Allow duplicates", entity.isAllowDuplicates(), style); |
56 | 61 |
orderRelevant = formFactory.createCheckbox(formElement, "Order relevant", entity.isOrderRelevant(), style); |
57 | 62 |
isFlat = formFactory.createCheckbox(formElement, "Is flat", entity.isFlat(), style); |
58 | 63 |
if (AbstractUtility.getActivePart() instanceof ICharacterEditor){ |
59 |
titleCacheText.setEnabled(false);
|
|
64 |
element_Representation.setEnabled(false);
|
|
60 | 65 |
allowDuplicates.setEnabled(false); |
61 | 66 |
orderRelevant.setEnabled(false); |
62 | 67 |
isFlat.setEnabled(false); |
... | ... | |
72 | 77 |
|
73 | 78 |
@Override |
74 | 79 |
public void handleEvent(Object eventSource) { |
75 |
if (eventSource == titleCacheText) { |
|
76 |
getEntity().setTitleCache(titleCacheText.getText());; |
|
80 |
if (eventSource == element_Representation) { |
|
81 |
Representation selectedRepresentation = element_Representation.getSelectedRepresentation(); |
|
82 |
if(selectedRepresentation!=null){ |
|
83 |
Language representationLanguage = selectedRepresentation.getLanguage(); |
|
84 |
if(representationLanguage==null){ |
|
85 |
representationLanguage = Language.getDefaultLanguage(); |
|
86 |
} |
|
87 |
getEntity().setLabel(selectedRepresentation.getLabel(), representationLanguage); |
|
88 |
getEntity().getRepresentation(representationLanguage).setAbbreviatedLabel(selectedRepresentation.getAbbreviatedLabel()); |
|
89 |
getEntity().getRepresentation(representationLanguage).setText(selectedRepresentation.getDescription()); |
|
90 |
} |
|
91 |
getEntity().setTitleCache(null); |
|
77 | 92 |
} |
78 | 93 |
else |
79 | 94 |
if (eventSource == allowDuplicates) { |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/TermTranslationWizard.java | ||
---|---|---|
13 | 13 |
import eu.etaxonomy.cdm.common.CdmUtils; |
14 | 14 |
import eu.etaxonomy.cdm.model.term.Representation; |
15 | 15 |
import eu.etaxonomy.cdm.model.term.TermBase; |
16 |
import eu.etaxonomy.cdm.persistence.dto.AbstractTermDto; |
|
16 | 17 |
import eu.etaxonomy.taxeditor.ui.translation.TermTranslationWizardPage; |
17 | 18 |
|
18 | 19 |
/** |
... | ... | |
23 | 24 |
public class TermTranslationWizard extends Wizard { |
24 | 25 |
private TermTranslationWizardPage page; |
25 | 26 |
|
26 |
private final TermBase term; |
|
27 |
private TermBase term; |
|
28 |
private AbstractTermDto termDto; |
|
27 | 29 |
|
28 | 30 |
public TermTranslationWizard(TermBase term) { |
29 | 31 |
setWindowTitle("Translation Editor"); |
30 | 32 |
this.term = term; |
31 | 33 |
setNeedsProgressMonitor(true); |
32 | 34 |
} |
35 |
|
|
36 |
public TermTranslationWizard(AbstractTermDto termDto) { |
|
37 |
setWindowTitle("Translation Editor"); |
|
38 |
this.termDto = termDto; |
|
39 |
setNeedsProgressMonitor(true); |
|
40 |
} |
|
33 | 41 |
|
34 | 42 |
@Override |
35 | 43 |
public void addPages() { |
36 |
page = new TermTranslationWizardPage(term); |
|
44 |
if (term != null) { |
|
45 |
page = new TermTranslationWizardPage(term); |
|
46 |
}else { |
|
47 |
page = new TermTranslationWizardPage(termDto); |
|
48 |
} |
|
37 | 49 |
addPage(page); |
38 | 50 |
} |
39 | 51 |
|
... | ... | |
48 | 60 |
|| CdmUtils.isNotBlank(representation.getLabel()) |
49 | 61 |
|| CdmUtils.isNotBlank(representation.getAbbreviatedLabel()) |
50 | 62 |
|| CdmUtils.isNotBlank(representation.getPlural())){ |
51 |
term.addRepresentation(representation); |
|
63 |
if (term != null) { |
|
64 |
term.addRepresentation(representation); |
|
65 |
}else if (termDto != null){ |
|
66 |
termDto.addRepresentation(representation); |
|
67 |
} |
|
52 | 68 |
} |
53 | 69 |
|
54 | 70 |
return true; |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/translation/TermTranslationWizardPage.java | ||
---|---|---|
17 | 17 |
import eu.etaxonomy.cdm.model.common.Language; |
18 | 18 |
import eu.etaxonomy.cdm.model.term.Representation; |
19 | 19 |
import eu.etaxonomy.cdm.model.term.TermBase; |
20 |
import eu.etaxonomy.cdm.persistence.dto.AbstractTermDto; |
|
20 | 21 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
21 | 22 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
22 | 23 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
... | ... | |
35 | 36 |
|
36 | 37 |
private static int TEXT_HEIGHT = 200; |
37 | 38 |
|
38 |
private final TermBase term;
|
|
39 |
private TermBase term; |
|
39 | 40 |
|
41 |
private AbstractTermDto termDto; |
|
40 | 42 |
private MultilanguageTextElement source; |
41 | 43 |
|
42 | 44 |
private final CdmFormFactory formFactory; |
... | ... | |
54 | 56 |
formFactory.addPropertyChangeListener(this); |
55 | 57 |
setPageComplete(false); |
56 | 58 |
} |
59 |
|
|
60 |
public TermTranslationWizardPage(AbstractTermDto termDto) { |
|
61 |
super("TranslationWizardPage"); |
|
62 |
//Assert.isNotNull(multilanguageText, "Multilanguage text may not be null"); |
|
63 |
setTitle("Add or edit translations."); |
|
64 |
this.termDto = termDto; |
|
65 |
formFactory = new CdmFormFactory(Display.getCurrent()); |
|
66 |
formFactory.addPropertyChangeListener(this); |
|
67 |
setPageComplete(false); |
|
68 |
} |
|
57 | 69 |
|
58 | 70 |
@Override |
59 | 71 |
public void createControl(Composite parent) { |
... | ... | |
81 | 93 |
} |
82 | 94 |
|
83 | 95 |
private void setSource(Language language) { |
84 |
Representation preferredRepresentation =term.getPreferredRepresentation(language); |
|
85 |
if(preferredRepresentation != null){ |
|
86 |
text_source.setSelectedRepresentation(preferredRepresentation); |
|
87 |
} |
|
96 |
Representation preferredRepresentation ; |
|
97 |
if (term != null) { |
|
98 |
preferredRepresentation =term.getPreferredRepresentation(language); |
|
99 |
}else { |
|
100 |
preferredRepresentation =termDto.getPreferredRepresentation(language); |
|
101 |
} |
|
102 |
if(preferredRepresentation != null){ |
|
103 |
text_source.setSelectedRepresentation(preferredRepresentation); |
|
104 |
} |
|
88 | 105 |
} |
89 | 106 |
|
90 | 107 |
private void createLeftControls(ICdmFormElement element){ |
91 |
Representation preferredRepresentation= term.getPreferredRepresentation(PreferencesUtil.getGlobalLanguage()); |
|
92 |
|
|
93 |
text_source = formFactory.createRepresentationElement(element, preferredRepresentation,term, TEXT_HEIGHT, SWT.NULL, true); |
|
94 |
text_source.setTerm(term, true); |
|
108 |
Representation preferredRepresentation; |
|
109 |
if (term != null) { |
|
110 |
preferredRepresentation = term.getPreferredRepresentation(PreferencesUtil.getGlobalLanguage()); |
|
111 |
text_source = formFactory.createRepresentationElement(element, preferredRepresentation,term, TEXT_HEIGHT, SWT.NULL, true); |
|
112 |
text_source.setTerm(term, true); |
|
113 |
}else { |
|
114 |
preferredRepresentation = termDto.getPreferredRepresentation(PreferencesUtil.getGlobalLanguage()); |
|
115 |
text_source = formFactory.createRepresentationElement(element, preferredRepresentation,termDto, TEXT_HEIGHT, SWT.NULL, true); |
|
116 |
text_source.setTermDto(termDto, true); |
|
117 |
} |
|
118 |
|
|
119 |
|
|
95 | 120 |
|
96 | 121 |
} |
97 | 122 |
|
98 | 123 |
private void createRightControls(ICdmFormElement element){ |
99 |
text_target = formFactory.createRepresentationElement(element, null, term, TEXT_HEIGHT, SWT.NULL, false); |
|
124 |
if (term != null) { |
|
125 |
text_target = formFactory.createRepresentationElement(element, null, term, TEXT_HEIGHT, SWT.NULL, false); |
|
126 |
}else { |
|
127 |
text_target = formFactory.createRepresentationElement(element, null, termDto, TEXT_HEIGHT, SWT.NULL, false); |
|
128 |
} |
|
100 | 129 |
} |
101 | 130 |
|
102 | 131 |
@Override |
... | ... | |
113 | 142 |
if (event.getSource() == text_target){ |
114 | 143 |
getWizard().getContainer().updateButtons(); |
115 | 144 |
} |
145 |
|
|
116 | 146 |
} |
117 | 147 |
} |
Also available in: Unified diff
ref #10033: vocabulary representation should be editable in taxeditor