package eu.etaxonomy.taxeditor.ui.section.description;
import java.util.Arrays;
+import java.util.stream.Collectors;
import org.eclipse.jface.util.PropertyChangeEvent;
import eu.etaxonomy.cdm.model.description.DescriptionBase;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractIdentifiableEntityDetailElement;
/**
public class DescriptionDetailElement extends AbstractIdentifiableEntityDetailElement<DescriptionBase> {
// private EntitySelectionElement<FeatureTree> selection_featureTree;
+ private TextWithLabelElement txtDescriptionTypes;
public DescriptionDetailElement(CdmFormFactory cdmFormFactory,
ICdmFormElement formElement, int style) {
// 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);
+ txtDescriptionTypes.setEnabled(false);
}
@Override
super.updateContent();
toggleable_cache.setEnabled(getEntity().isProtectedTitleCache());
setIrrelevant(toggleable_cache.getState(),
- Arrays.asList(new Object[] { toggleable_cache}));
+ Arrays.asList(new Object[] { txtDescriptionTypes, toggleable_cache}));
}
@Override