Revision ae137b34
Added by Patrick Plitzner about 7 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyLabelProvider.java | ||
---|---|---|
19 | 19 |
import eu.etaxonomy.cdm.model.description.KeyStatement; |
20 | 20 |
import eu.etaxonomy.cdm.model.description.PolytomousKey; |
21 | 21 |
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode; |
22 |
import eu.etaxonomy.taxeditor.editor.Messages; |
|
22 | 23 |
import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship; |
23 | 24 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
24 | 25 |
|
... | ... | |
31 | 32 |
class PolytomousKeyLabelProvider extends LabelProvider implements |
32 | 33 |
IEntityStyleProvider { |
33 | 34 |
|
34 |
public static final String LEAF_BUT_NO_TAXON = "leaf but no taxon";
|
|
35 |
public static final String NO_NODE_NUMBER = "No node number set";
|
|
36 |
public static final String EMPTY = ""; |
|
35 |
public static final String LEAF_BUT_NO_TAXON = Messages.PolytomousKeyLabelProvider_LEAF_BUT_NO_TAXON;
|
|
36 |
public static final String NO_NODE_NUMBER = Messages.PolytomousKeyLabelProvider_NO_NODE_NUMBER_SET;
|
|
37 |
public static final String EMPTY = ""; //$NON-NLS-1$
|
|
37 | 38 |
|
38 | 39 |
@Override |
39 | 40 |
public String getText(Object element) { |
... | ... | |
50 | 51 |
} |
51 | 52 |
|
52 | 53 |
if (keyNode.getNodeNumber() != null) { |
53 |
String statementLabel = ""; |
|
54 |
String statementLabel = ""; //$NON-NLS-1$
|
|
54 | 55 |
String nodeNumber = keyNode.getNodeNumber().toString(); |
55 | 56 |
|
56 | 57 |
KeyStatement question = keyNode.getQuestion(); |
57 | 58 |
|
58 | 59 |
if (question != null) { |
59 |
statementLabel += " " |
|
60 |
statementLabel += " " //$NON-NLS-1$
|
|
60 | 61 |
+ question.getLabelText(CdmStore |
61 | 62 |
.getDefaultLanguage()); |
62 | 63 |
} |
63 | 64 |
|
64 |
return String.format("%s. %s", nodeNumber, statementLabel); |
|
65 |
return String.format("%s. %s", nodeNumber, statementLabel); //$NON-NLS-1$
|
|
65 | 66 |
} else { |
66 | 67 |
return NO_NODE_NUMBER; |
67 | 68 |
} |
Also available in: Unified diff
ref #4611 some l10n for taxeditor and taxeditor.editor plugin