3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
11 package eu
.etaxonomy
.taxeditor
.featuretree
;
13 import org
.eclipse
.jface
.viewers
.LabelProvider
;
15 import eu
.etaxonomy
.cdm
.model
.description
.Feature
;
16 import eu
.etaxonomy
.cdm
.model
.description
.FeatureNode
;
17 import eu
.etaxonomy
.cdm
.model
.description
.FeatureTree
;
20 * <p>FeatureTreeLabelProvider class.</p>
23 * @created Aug 5, 2010
26 public class FeatureTreeLabelProvider
extends LabelProvider
{
28 private Feature feature
;
32 public String
getText(Object element
) {
33 if(element
instanceof FeatureTree
){
34 return ((FeatureTree
) element
).getTitleCache();
35 }else if(element
instanceof FeatureNode
){
36 feature
= ((FeatureNode
) element
).getFeature();
39 return feature
.getTitleCache();
42 return "No label provided";
46 * <p>Getter for the field <code>feature</code>.</p>
48 * @return a {@link eu.etaxonomy.cdm.model.description.Feature} object.
50 public Feature
getFeature(){