Project

General

Profile

« Previous | Next » 

Revision 3e72f342

Added by Patrick Plitzner over 5 years ago

ref #7887 USe idInVocabulary and kindOfUuid of DTO

View differences:

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.common.CdmUtils;
21 22
import eu.etaxonomy.cdm.persistence.dto.AbstractTermDto;
23
import eu.etaxonomy.cdm.persistence.dto.TermDto;
22 24
import eu.etaxonomy.cdm.persistence.dto.TermVocabularyDto;
23 25
import eu.etaxonomy.cdm.remote.l10n.TermRepresentation_L10n;
24 26

  
......
53 55
        if (element instanceof TermVocabularyDto && text != null) {
54 56
            styler = getVocabularyStyler();
55 57
        }
56
        //TODO: add kindOf UUID to TermDto
57
//        else if(element instanceof TermDto && ((TermDto) element).getKindOf()!=null){
58
//            styler = getKindOfStyler();
59
//        }
58
        else if(element instanceof TermDto && ((TermDto) element).getKindOfUuid()!=null){
59
            styler = getKindOfStyler();
60
        }
60 61
        if(styler!=null){
61 62
            StyledString styledString = new StyledString(text, styler);
62 63
            StyleRange[] styleRanges;
......
73 74
            termDto.localize(new TermRepresentation_L10n());
74 75
            label = termDto.getRepresentation_L10n();
75 76

  
76
                //TODO: add idInVocabulary to TermDto
77
//                label = CdmUtils.concat(" : ", termDto.getIdInVocabulary(), label);
77
            if(element instanceof TermDto && ((TermDto) termDto).getIdInVocabulary()!=null){
78
                label = CdmUtils.concat(" : ", Integer.toString(((TermDto) termDto).getIdInVocabulary()), label);
79
            }
78 80
        }
79 81
        // TODO add fallback for label
80 82
        if(label==null){

Also available in: Unified diff