Revision 9f7d1f40
Added by Patrick Plitzner over 5 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermDtoLabelProvider.java | ||
---|---|---|
18 | 18 |
import org.eclipse.swt.graphics.TextStyle; |
19 | 19 |
import org.eclipse.swt.widgets.Display; |
20 | 20 |
|
21 |
import eu.etaxonomy.cdm.model.common.TermVocabulary;
|
|
22 |
import eu.etaxonomy.cdm.persistence.dto.TermDto; |
|
21 |
import eu.etaxonomy.cdm.persistence.dto.AbstractTermDto;
|
|
22 |
import eu.etaxonomy.cdm.persistence.dto.TermVocabularyDto;
|
|
23 | 23 |
import eu.etaxonomy.cdm.remote.l10n.TermRepresentation_L10n; |
24 | 24 |
|
25 | 25 |
/** |
... | ... | |
50 | 50 |
cell.setText(text); |
51 | 51 |
|
52 | 52 |
Styler styler = null; |
53 |
if (element instanceof TermVocabulary && text != null) { |
|
53 |
if (element instanceof TermVocabularyDto && text != null) {
|
|
54 | 54 |
styler = getVocabularyStyler(); |
55 | 55 |
} |
56 | 56 |
//TODO: add kindOf UUID to TermDto |
... | ... | |
68 | 68 |
|
69 | 69 |
public String getText(Object element) { |
70 | 70 |
String label = null; |
71 |
if(element instanceof TermVocabulary){ |
|
72 |
|
|
73 |
} |
|
74 |
else if(element instanceof TermDto){ |
|
75 |
TermDto termDto = (TermDto)element; |
|
71 |
if(element instanceof AbstractTermDto){ |
|
72 |
AbstractTermDto termDto = (AbstractTermDto)element; |
|
76 | 73 |
termDto.localize(new TermRepresentation_L10n()); |
77 | 74 |
label = termDto.getRepresentation_L10n(); |
78 | 75 |
|
Also available in: Unified diff
ref #7887 Use DTOs in term editor (experimental)