Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SessionWrapperContentProvider does not support non-model intermediary view objects #401

Open
flatombe opened this issue May 24, 2024 · 0 comments

Comments

@flatombe
Copy link
Contributor

By default EMF represents model in a tree structure based on containment relations.
Section 19.2.3 of the EMF book explains how to add additional "virtual" nodes in the tree structure. This is particularly useful for model elements with several containment relations: by default all children are represented under the parent and it can be difficult to know through which containment a child is contained. Adding these virtual nodes improves the UI without polluting the semantic model underneath.

The way EMF supports this is by having ItemProvider.getChildren(Object) return a collection made not only of semantic elements (EObjects) but also of custom ItemProviders.

It seems to me that org.eclipse.sirius.ui.tools.internal.views.common.SessionWrapperContentProvider does not support this use case, because in doGetChildren(Object), ItemProviders do not fall in any of the expected cases, so we end up never calling them to retrieve their children.

I think a fix might be to move line 143:
result.addAll(getWrappedChildren(parentElement));
outside of the current conditional, because the call to getWrappedChildren(Object) does not require an EObject.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant