import org.eclipse.jface.util.PropertyChangeEvent;
import eu.etaxonomy.cdm.model.description.DescriptionBase;
+import eu.etaxonomy.cdm.model.description.DescriptionType;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
// it is similar to a FeatureTree (you can get this information from a feature tree) but not the same.
// Please correct this once it is clear what descriptive system will be used for in CDM
// selection_featureTree = formFactory.createSelectionElement(FeatureTree.class, getConversationHolder(), formElement, "Feature Tree", null, EntitySelectionElement.ALL, style);
- txtDescriptionTypes = formFactory.createTextWithLabelElement(formElement, "Types", entity.getTypes().stream().map(type->type.toString()).collect(Collectors.joining(",")), style);
+
+ Object typesString = entity.getTypes().stream().filter(type->type instanceof DescriptionType)
+ .map(type->((DescriptionType)type).getMessage())
+ .collect(Collectors.joining(","));
+ txtDescriptionTypes = formFactory.createTextWithLabelElement(formElement, "Types", typesString, style);
txtDescriptionTypes.setEnabled(false);
}