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

EMF Views virtualize filtered in elements when classes share the same parent class (SuperType) #13

Open
jameswpm opened this issue Mar 7, 2023 · 0 comments

Comments

@jameswpm
Copy link
Contributor

jameswpm commented Mar 7, 2023

Eclipse version: Eclipse Modeling Tools Version: 2022-12 (4.26.0)

EMF Views version: 0.4.0

Branch (when relevant): AIDOaRt

Repeatable: Always

Problem description
This issue aims to document a specific behavior of the EMF Views when dealing with inherited attributes that can lead the users to get unexpected filtered attributes. This is not a bug and usually is not problematic, but it's registered to enable possible enhancements in future versions of the EMF Views,

Used metamodels/models (when relevant)
The following metamodel was used to reproduce the problem. It can be downloaded in the examples repository together with a simple instance used in the view definition.

2023-03-07_14-24

To Reproduce

  1. Create the following VPDL file
create view example_filter as

select inherited.B[allCs, attr1],
       inherited.C.description,

from 'http://inherited' as inherited,

The view created from this VPDL file should filter out all elements of B, except for the attribute attr1 and the containment relation "allCs" (mandatory to virtualize the C objects of the model)
2. Create the .eview file with the following content

viewpoint=../src-gen/example_filter.eviewpoint
contributingModels=inherited::../../Resources/models/Issue/my_model.xmi
  1. Open the view using the MoDisco model browser

  2. The view includes the filtered elements and the B.description elements that should be filtered out according to the VPDL file.

Expected behavior
A view that includes only the attr1 and allCs relation. C elements that include only the "description" attribute

Screenshots
View including B.description
2023-03-07_14-41

Additional context
It happens because the virtualization mechanism of the EMF Views is actually virtualizing the attribute A.descriptioon, a common attribute between B and C classes, creating a shared virtual element. As previously mentioned, this is not a bug but can lead to security problems, depending on the context.

IMPORTANT NOTE: This is valid only for the version compiled directly from the AIDOaRt branch and not for the main version in the master branch. If the changes were propagated, the issue will be appropriately updated when valid for the main branch.

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

No branches or pull requests

1 participant