Revision 953c844d
Added by Alex Theys almost 12 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/UsesLabelProvider.java | ||
---|---|---|
1 |
/** |
|
2 |
* Copyright (C) 2007 EDIT |
|
3 |
* European Distributed Institute of Taxonomy |
|
4 |
* http://www.e-taxonomy.eu |
|
5 |
* |
|
6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
8 |
*/ |
|
1 | 9 |
package eu.etaxonomy.taxeditor.editor.view.uses; |
2 | 10 |
|
3 |
|
|
4 |
|
|
5 | 11 |
import java.util.Arrays; |
6 | 12 |
import java.util.List; |
7 | 13 |
|
... | ... | |
9 | 15 |
import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider; |
10 | 16 |
import org.eclipse.jface.viewers.StyledString; |
11 | 17 |
|
12 |
import eu.etaxonomy.cdm.api.service.DefaultCategoricalDescriptionBuilder; |
|
13 |
import eu.etaxonomy.cdm.api.service.DescriptionBuilder; |
|
14 | 18 |
import eu.etaxonomy.cdm.model.common.Language; |
15 | 19 |
import eu.etaxonomy.cdm.model.common.LanguageString; |
16 | 20 |
import eu.etaxonomy.cdm.model.description.CategoricalData; |
... | ... | |
22 | 26 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
23 | 27 |
|
24 | 28 |
/** |
25 |
* The context manager mediates context start/stop and workbench shutdowns to all registered listeners. |
|
26 |
* |
|
29 |
* UsesLabelProvider Class |
|
27 | 30 |
* @author a.theys |
28 | 31 |
* @created mar 13, 2012 |
29 | 32 |
* @version 1.0 |
... | ... | |
31 | 34 |
public class UsesLabelProvider extends ColumnLabelProvider implements |
32 | 35 |
IStyledLabelProvider { |
33 | 36 |
|
37 |
/** {@inheritDoc} */ |
|
34 | 38 |
public String getText(Object element) { |
35 | 39 |
String text = ""; |
36 | 40 |
|
... | ... | |
112 | 116 |
return text; |
113 | 117 |
} |
114 | 118 |
|
115 |
|
|
119 |
/** Function dertmining which vocabulary is the term part of |
|
120 |
* |
|
121 |
* @param term |
|
122 |
* @param vocabularyExpected |
|
123 |
* @return |
|
124 |
*/ |
|
116 | 125 |
private boolean GetVocabularyType(Modifier term, String vocabularyExpected) { |
117 | 126 |
if ((term.getPartOf() != null) && (term.getPartOf().getTitleCache().equals(vocabularyExpected))) { |
118 | 127 |
return true; |
... | ... | |
125 | 134 |
} |
126 | 135 |
return false; |
127 | 136 |
} |
137 |
|
|
138 |
/** {@inheritDoc} */ |
|
128 | 139 |
@Override |
129 | 140 |
public StyledString getStyledText(Object element) { |
130 | 141 |
return new StyledString(this.getText(element), |
Also available in: Unified diff
AT: committing changes to the TaxEditor Post second round of code review