Only show "Change Type" when more than one type is available #5565
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / description / DescriptionDetailElement.java
index 669a80f441a19832b0eee334b0b4d770f537dcb6..f522ca645165522c7cc5e170c466dcfacef1a18c 100644 (file)
@@ -47,14 +47,16 @@ public class DescriptionDetailElement extends AbstractCdmDetailElement<Descripti
        /** {@inheritDoc} */
        @Override
        protected void createControls(ICdmFormElement formElement, DescriptionBase entity, int style) {
-               detailDescription = formFactory.createMultilineTextWithLabel(this, "Label", 50, SWT.WRAP);
+               detailDescription = formFactory.createMultiLineTextWithLabel(this, "Label", 50, SWT.WRAP);
                detailDescription.setText(entity.getTitleCache());
                
-               //selection_featureTree = (EntitySelectionElement<FeatureTree>) formFactory.createSelectionElement(FeatureTree.class, getConversationHolder(), formElement, "Feature Tree", null, style, 1);
-               selection_featureTree = formFactory.createSelectionElement(FeatureTree.class, getConversationHolder(), formElement, "Feature Tree", null, EntitySelectionElement.ALL, style);
-                               
+               // TODO I initially thought that we can handle the entity's descriptive system with a feature tree 
+               // Since descriptiveSystem is a Set of Features that are present or allowed for the current description, 
+               // 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);
        }
-       
+               
        /** {@inheritDoc} */
        @Override
        public void handleEvent(Object eventSource) {
@@ -63,7 +65,8 @@ public class DescriptionDetailElement extends AbstractCdmDetailElement<Descripti
                }
                else if(eventSource == selection_featureTree){
                        FeatureTree featureTree = selection_featureTree.getSelection();
-                       getEntity().setDescriptiveSystem(featureTree.getDistinctFeatures());
+                       //descriptive system is not available anymore since v3.3 
+//                     getEntity().setDescriptiveSystem(featureTree.getDistinctFeatures());
                }
        }
 }