Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Import Ecore packages into EVL
Import Ecore packages into EVL [message #1759555] Thu, 13 April 2017 00:47 Go to next message
Sara Rosa is currently offline Sara RosaFriend
Messages: 24
Registered: March 2017
Junior Member
Hi all,

I'm adding extra metamodel validation with EVL, however, I'm trying to reach an EPackage that is inside the main EPackage Ecore but nothing seems to work.

How can I reach the ContextModeling EPackage (for example)? Should I import that EPackage into the EVL file? If yes, how can I do that?

Thank you for your help,
Sara
  • Attachment: EVLCM.png
    (Size: 18.23KB, Downloaded 74 times)

[Updated on: Thu, 13 April 2017 00:49]

Report message to a moderator

Re: Import Ecore packages into EVL [message #1759562 is a reply to message #1759555] Thu, 13 April 2017 06:56 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 1550
Registered: July 2009
Location: York, UK
Senior Member

Hi Sara,

In general, nested EPackages should be avoided in Ecore [1]. In any event, could you please provide a minimal example [2] we can use to reproduce this?

Cheers,
Dimitris

[1] http://eclipsesource.com/blogs/2013/03/19/emf-dos-and-don%C2%B4ts-5/
[2] https://www.eclipse.org/epsilon/doc/articles/minimal-examples/
Re: Import Ecore packages into EVL [message #1759578 is a reply to message #1759562] Thu, 13 April 2017 12:17 Go to previous messageGo to next message
Sara Rosa is currently offline Sara RosaFriend
Messages: 24
Registered: March 2017
Junior Member
Hi Dimitris,

First of all thank you for your help.
Here are the steps to reproduce the problem. Let me know if you have any problems reproducing it.

Reproducing the problem:

Eclipse Modeling Tools - version: Neon.3 Release (4.6.3)
Epsilon Core - version 1.4.0

1. Import into your Model Explorer

'pt.fct.unl.novalincs.useme.model'
'pt.fct.unl.novalincs.useme.model.edit'
'pt.fct.unl.novalincs.useme.model.editor'
'pt.fct.unl.novalincs.useme.model.tests'

2. Both Ecore and EVL file are located under the 'model' folder

3. To run the project just right click on the 'pt.fct.unl.novalincs.useme.model' > Run as > Eclipse Application

4. Import into your Runtime Environment

'Example'
'pt.fct.unl.novalincs.useme.sirius.design' (I think you don't need to import this one)

5. On 'Example' open the Example.useme file, and Validate

6. You will get the error 'Cannot find meta-class "ContextModeling" in model " '

Thank you,

Cheers,
Sara
Re: Import Ecore packages into EVL [message #1759579 is a reply to message #1759578] Thu, 13 April 2017 12:29 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 1550
Registered: July 2009
Location: York, UK
Senior Member

Hi Sara,

Constraint contexts in EVL need to be EClass names. "ContextModeling" is the name of an EPackage in your metamodel.

Cheers,
Dimitris

Re: Import Ecore packages into EVL [message #1759580 is a reply to message #1759579] Thu, 13 April 2017 12:34 Go to previous messageGo to next message
Sara Rosa is currently offline Sara RosaFriend
Messages: 24
Registered: March 2017
Junior Member
Hi Dimitris,

There was an error there on the EVL file is ContextModel (class inside ContextModeling EPackage) not ContextModeling, sorry. When I validate it nothing happens... And it should because the check is always false.

Thank you,
Cheers, Sara

[Updated on: Thu, 13 April 2017 12:35]

Report message to a moderator

Re: Import Ecore packages into EVL [message #1759581 is a reply to message #1759580] Thu, 13 April 2017 12:38 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 1550
Registered: July 2009
Location: York, UK
Senior Member

Hi Sara,

I suspect that this is due to sub-packages. You'll probably need to add org.eclipse.epsilon.evl.emf.validation extensions in your plugin.xml for the URIs of all sub-packages.

Cheers,
Dimitris
Re: Import Ecore packages into EVL [message #1759583 is a reply to message #1759581] Thu, 13 April 2017 13:02 Go to previous messageGo to next message
Sara Rosa is currently offline Sara RosaFriend
Messages: 24
Registered: March 2017
Junior Member
Hi Dimitris,

I follow your instructions and added a new org.eclipse.epsilon.evl.emf.validation with the package URI, but still doesn't work...

Thank you,

Cheers,
Sara
Re: Import Ecore packages into EVL [message #1759598 is a reply to message #1759583] Thu, 13 April 2017 16:21 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 1550
Registered: July 2009
Location: York, UK
Senior Member

Hi Sara,

This appears to be a bug in the EVL-EMF integration, which assumes that all elements in a model are instances of EClasses that belong to the same EPackage. We'll try to fix this [1] but, as mentioned in a previous message, you're likely to find out that there are other cases where EMF-based tools don't play well with sub-packages so my recommendation would be to consider flattening your metamodel.

Cheers,
Dimitris

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=515262
Re: Import Ecore packages into EVL [message #1759606 is a reply to message #1759598] Thu, 13 April 2017 18:50 Go to previous messageGo to next message
Sara Rosa is currently offline Sara RosaFriend
Messages: 24
Registered: March 2017
Junior Member
Hi Dimitris,

Thank you for your help. I'll keep track of the bug.

Cheers,
Sara
Re: Import Ecore packages into EVL [message #1759638 is a reply to message #1759606] Fri, 14 April 2017 10:34 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 1550
Registered: July 2009
Location: York, UK
Senior Member

Hi Sara,

Sure - feel free to add yourself to the CC list of the bug to receive updates. If this is a blocker for your work, I would recommend considering the proposed workaround as it's unlikely that we'll be able to look at this within the next few weeks, due to other commitments.

Cheers,
Dimitris
Previous Topic:Quick fixes customization
Next Topic:ETL
Goto Forum:
  


Current Time: Sun Jun 24 07:37:51 GMT 2018

Powered by FUDForum. Page generated in 0.02019 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top