Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » How to validate multiple depending ecore models
How to validate multiple depending ecore models [message #780823] Thu, 19 January 2012 14:13 Go to next message
Jack Sleuters is currently offline Jack SleutersFriend
Messages: 6
Registered: January 2012
Junior Member
Hi,

I'm trying the following on 4 large ecore files, but for sake of simplicity I will explain the problem with a small example.


I've created two ecore files which depend on each other:

ecore2 depends on ecore1

To be able to reference elements of ecore1 from ecore2, in ecore2 I used "Load resource...". The ecore models look as follows:

ecore1.ecore:
ecore1 (namespaceURI ecore1)
    EClass ecore1


ecore2.ecore:
ecore2 (namespaceURI ecore2)
    EClass ecore2
    EClass system
        EReference ecore1: Ecore1 (0 to many, containment true)
        EReference ecore2: Ecore2 (0 to many, containment true)


I created genmodels for both ecore files and generated all model, edit, and editor code for both genmodels.

I also created a new plugin project for the validation part. In the manifest, I added "org.eclipse.epsilon.evl.emf.validation (0.9.1)" and "org.eclipse.ui.ide (3.7.0)". Furthermore, I added an "org.eclipse.epsilon.ev.emf.validation" extension with a "constraintsBinding". I set the namespaceURI to "ecore2" because that contains all elements of both ecore models (remember: ecore2 depends on ecore1). The "constraints" point to a .evl file in which, for each EClass in both ecores, a critique with a "check : false" is stated.

After that I run as an eclipse application and create the following model:

System (from ecore2)
    Ecore1 (from ecore1)
    Ecore2 (from ecore2)


Now, I right click the "System" node and choose "validate". The "Validation Problems" dialog is shown and I only see the critique for Ecore2 being shown. I expected to also see the critique for Ecore1.


I already tried the following:

1. In the "Extension Element Details" of the "constraintsBinding" element, I changed the namespaceURI to ecore1 and run as eclipse application. Right click "System" and press validate. This time a NullPointerException is raised at EvlValidator.java:76)

2. In the "All Extensions" add another "constraintsBinding" this time with namespaceURI "ecore1" using the same constraints file. Run as an eclipse appplication, right click "System" and press validate. This time again NullPointerException is raised at EvlValidator.java:76).

3. I created two validation plugin projects one for ecore1 and one for ecore2. However, again the same NullPointerException was raised.



So finally my question: How do I get this to work?



I added my example code as an attachment.


Thanks,
Jack


Re: How to validate multiple depending ecore models [message #780922 is a reply to message #780823] Thu, 19 January 2012 22:56 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 919
Registered: July 2009
Senior Member
Hi Jack,

Unfortunately, this appears to be a bug. Could you please file a bug report using the following link and post the link here?

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=GMT&component=Epsilon

Cheers,
Dimitris
Re: How to validate multiple depending ecore models [message #781527 is a reply to message #780922] Sat, 21 January 2012 14:40 Go to previous messageGo to next message
Snakebyte Missing name is currently offline Snakebyte Missing nameFriend
Messages: 130
Registered: November 2011
Senior Member
I think this is the same issue as mentioned here.

http://www.eclipse.org/forums/index.php/t/275288/

By the way, can somebody say something about the status of this bug ?
Just need to know if i can count on a fix or not ..
Re: How to validate multiple depending ecore models [message #782294 is a reply to message #780922] Mon, 23 January 2012 13:28 Go to previous message
Jack Sleuters is currently offline Jack SleutersFriend
Messages: 6
Registered: January 2012
Junior Member
Entered Bugnr: 369383
Previous Topic:[EGL] How to set XMLResrouce options
Next Topic:[Epsilon] Aspects
Goto Forum:
  


Current Time: Mon Dec 22 22:56:25 GMT 2014

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

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