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

Inherited classes do not virtualize all attributes from the parent class #12

Open
jameswpm opened this issue Mar 7, 2023 · 1 comment
Assignees
Labels

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): master

Repeatable: Always

Problem description
When the metamodel includes some inheritance, selecting attributes from parent classes for virtualization is impossible. The problem arises both in the autocomplete function of VPDL language and when using the "*" operator that should virtualize everything from the class (including inherited attributes)

Used metamodels/models (when relevant)
The metamodel used to reproduce the problem is adapted from the one used in the EMF Views examples but includes the mentioned inheritance.
It is published in the examples repository for download if needed.

To Reproduce
Steps to reproduce the behavior:

  1. Create the VPDL file like the one below:
create view getJournal as

select publications.Journal.desc,
          publications.Publications.journals,

from 'http://publications' as publications,
  1. The VPDL file will raise the error indicating the inexistence of the "desc" attribute and will not generate the viewpoint. Trying publications.Publication.desc will work fine, meaning the problem with the inherited class "Journal."

  2. Another option to show the problem is to try to use publications.Journal.*, which will not raise errors in the VPDL and viewpoint generation

  3. See the error (screenshot below) when opening the view within MoDisco Browser. The Journal element is correctly virtualized but contains no attribute from the parent class.

Expected behavior
The view should include parent class attributes, allowing users to navigate in the view like it happens in the original model.

Screenshots

Metamodel used in the example
2023-03-07_09-49

VPDL file with the error when trying to access inherited attributes
2023-03-07_09-45

MoDisco browser showing only Journal attributes without the attributes from parent Publication class
2023-03-07_09-46

@jameswpm jameswpm added the bug label Mar 7, 2023
@jameswpm jameswpm self-assigned this Mar 7, 2023
@jameswpm
Copy link
Contributor Author

jameswpm commented Mar 7, 2023

The problem is solved in the AIDOaRt branch

The issue will be closed when changes are merged into the master branch.

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

No branches or pull requests

1 participant