Merged
Conversation
Fix ResourceSetModelLibraryProvider Implementation to take into account the root namespace Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
seidewitz
reviewed
Jun 17, 2026
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes the
ResourceSetModelLibraryProviderImplementation to take into account the root namespace.Background
The standalone
ResourceSetModelLibraryProviderdid not correctly resolve qualified names for elements stored in standard SysML/KerML model library resources when those resources followed the structure required by the SysML/KerML specification. The previous implementation attempted to resolve a qualified name such asBase::Anythingby matching the first segment (Base) directly against each root object contained in an EMF Resource. This worked only if the named library package itself was the direct root object of the resource. However, this is not the structure defined by the specification for model interchange and model libraries.According to KerML and SysML, a model interchange file represents a single root namespace. This root namespace is implicit, unnamed, and has no owner. The actual model elements, including top-level library packages such as Base, are owned members of that root namespace.
Therefore, in a conforming resource, the structure is:
The old lookup logic expected this instead:
As a result, resolving
Base::Anythingfailed for correctly structured resources, because the provider comparedBasewith the unnamed root namespace and stopped before inspecting the root namespace memberships.Instead,
Base::Anythingmust be resolved by entering the resource root namespace, then matchingBaseamong its owned memberships, then matchingAnythinginside theBasenamespace.Changes
The model library provider now treats the resource root objects as root namespaces, not as named elements to be matched against the first qualified name segment.
The lookup algorithm: