-
Notifications
You must be signed in to change notification settings - Fork 3
Description
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.
To Reproduce
- 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-
Open the view using the MoDisco model browser
-
The view includes the filtered elements and the
B.descriptionelements 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

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.
