Skip to content

Conversation

@seidewitz
Copy link
Member

This PR fixes a bug which caused the methods Definition::getVariant and EnumerationDefinition::getEnumeratedValue to always return the empty list for enumeration definitions, even if the enumeration definition did, in fact, have enumerated values.

Cause

The underlying cause was similar to the cause of the bug fixed in PR #712. The method getEnumeratedValue was implemented using a DerivedEObjectEList subsetting variant for elements that are EnumeationUsages'. However, the property enumeratedValueis a redefinition ofvariant, which prevented the dynamic get of variantin theDerivedEObjectEList` from working.

Changes

EnumerationDefinition_enumeratedValue_SettingDelegate – Revised to extend Definition_variant_SettingDelegate and explicitly filter the list produced for variant, rather than using DerivedEObjectEList.

Definition_directedUsage_SettingDelegate – Updated to use an implementation approach similar to that used in EnumerationDefinition_enumeratedValue_SettingDelegate (this is a revision to the approach implemented in PR #712).

Usage_directedUsage_SettingDelegate – Updated to also use an implementation approach similar to that used in EnumerationDefinition_enumeratedValue_SettingDelegate.

Test passes for getVariant on a variantion item def, but it fails for
and enum def.
Implemented an explicit filter on EnumerationUsage instead of using
DerivedEObjectEList.
Made the implementation consistent with each other and implementation of
EnumerationDefinition::enumeratedValue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

getOwnedEnumeration() returns null when we call it use some specific Definition elements.

2 participants