import eu.etaxonomy.cdm.api.service.ITermService;
import eu.etaxonomy.cdm.model.term.DefinedTermBase;
+import eu.etaxonomy.cdm.model.term.TermType;
+import eu.etaxonomy.cdm.persistence.dto.FeatureDto;
import eu.etaxonomy.cdm.persistence.dto.TermNodeDto;
import eu.etaxonomy.taxeditor.event.EventUtility;
import eu.etaxonomy.taxeditor.event.WorkbenchEventConstants;
@Override
protected void createControls(ICdmFormElement formElement, TermNodeDto entity, int style) {
-
-
- sectionInapplicableIf = formFactory.createInapplicableIfEntityCollectionSection(
- formElement, StoreUtil.getSectionStyle(InapplicableIfEntityCollectionSection.class, getEntity().getClass().getCanonicalName()));
- sectionInapplicableIf.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
- sectionInapplicableIf.setEntity(getEntity());
- sectionOnlyApplicableIf = formFactory.createOnlyApplicableIfEntityCollectionSection(
- formElement, StoreUtil.getSectionStyle(OnlyApplicableIfEntityCollectionSection.class, getEntity().getClass().getCanonicalName()));
- sectionOnlyApplicableIf.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
- sectionOnlyApplicableIf.setEntity(getEntity());
-
+
+ if (entity.getType().equals(TermType.Feature)) {
+ sectionInapplicableIf = formFactory.createInapplicableIfEntityCollectionSection(
+ formElement, StoreUtil.getSectionStyle(InapplicableIfEntityCollectionSection.class, getEntity().getClass().getCanonicalName()));
+ sectionInapplicableIf.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
+ sectionInapplicableIf.setEntity(getEntity());
+ sectionOnlyApplicableIf = formFactory.createOnlyApplicableIfEntityCollectionSection(
+ formElement, StoreUtil.getSectionStyle(OnlyApplicableIfEntityCollectionSection.class, getEntity().getClass().getCanonicalName()));
+ sectionOnlyApplicableIf.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
+ sectionOnlyApplicableIf.setEntity(getEntity());
+ }
DefinedTermBase term = CdmStore.getService(ITermService.class).load(getEntity().getTerm().getUuid());
AbstractCdmDetailElement termDetailElement = formFactory.createDefinedTermDetailElement(term.getClass(), formElement, style);