Skip to content
Snippets Groups Projects
Commit 49f2f200 authored by Simon Barner's avatar Simon Barner
Browse files

- Both EENumns and EReferences are not editable

refs 1841
parent 6034d10e
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,7 @@ package org.fortiss.tooling.base.ui.annotation.editingsupport; ...@@ -19,6 +19,7 @@ package org.fortiss.tooling.base.ui.annotation.editingsupport;
import java.util.Collection; import java.util.Collection;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EEnum; import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.ecore.EStructuralFeature;
...@@ -90,9 +91,14 @@ public class ComboBoxEditingSupport extends AnnotationEditingSupportBase { ...@@ -90,9 +91,14 @@ public class ComboBoxEditingSupport extends AnnotationEditingSupportBase {
Class<? extends IAnnotatedSpecification> clazz, IAnnotatedSpecification specification, Class<? extends IAnnotatedSpecification> clazz, IAnnotatedSpecification specification,
String instanceKey, EStructuralFeatureDescriptor eStructuralFeatureDescriptor) { String instanceKey, EStructuralFeatureDescriptor eStructuralFeatureDescriptor) {
// EENumns only of a set of possible choices, hence the are not 'editable' // EENumns and ERefernces are only of a set of possible choices, hence they are not
this(viewer, clazz, instanceKey, // 'editable'
!(eStructuralFeatureDescriptor.getEType(specification) instanceof EEnum)); this(
viewer,
clazz,
instanceKey,
!(eStructuralFeatureDescriptor.getEType(specification) instanceof EEnum || eStructuralFeatureDescriptor
.getEType(specification) instanceof EClass));
this.eStructuralFeatureDescriptor = eStructuralFeatureDescriptor; this.eStructuralFeatureDescriptor = eStructuralFeatureDescriptor;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment