diff --git a/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/annotation/valueprovider/EStructuralFeatureValueProviderBase.java b/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/annotation/valueprovider/EStructuralFeatureValueProviderBase.java index 64f07050ad144d370e80c20cd1d27c757938d59c..1967c708aefa0d4cdb638504eaa095c2d3a16fbd 100644 --- a/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/annotation/valueprovider/EStructuralFeatureValueProviderBase.java +++ b/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/annotation/valueprovider/EStructuralFeatureValueProviderBase.java @@ -23,6 +23,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EClassifier; @@ -121,10 +122,19 @@ public abstract class EStructuralFeatureValueProviderBase<T extends IAnnotatedSp structuralFeatureMap = new HashMap<String, EStructuralFeature>(); - for(EStructuralFeature structuralFeature : (inheritedFeatures - ? annotatedSpecificationEClass.getEAllStructuralFeatures() - : annotatedSpecificationEClass.getEStructuralFeatures())) { - structuralFeatureMap.put(structuralFeature.getName(), structuralFeature); + EList<EStructuralFeature> featureList; + if(inheritedFeatures) { + featureList = annotatedSpecificationEClass.getEAllStructuralFeatures(); + } else { + featureList = annotatedSpecificationEClass.getEStructuralFeatures(); + } + + if(featureList.size() == 1) { + structuralFeatureMap.put(DEFAULT_KEY, featureList.get(0)); + } else { + for(EStructuralFeature structuralFeature : featureList) { + structuralFeatureMap.put(structuralFeature.getName(), structuralFeature); + } } handlesMultipleEstructuralFeatures = true;