Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [EVL live validation not done](Live validation rule in generated diagram editor is not trigerred when saving the diagram.)
[EVL live validation not done] [message #1734719] Fri, 10 June 2016 15:43 Go to next message
Alexandre Honorat is currently offline Alexandre HonoratFriend
Messages: 8
Registered: February 2016
Junior Member
Hi all,

I'm new to Epsilon tool suite, so I'm sorry is the solution is obvious ! (I've been trying to use directly GMF first, and then Sirius, and then I've tried Eugenia + EVL which seems pretty easy to use).

So I've created an EVL validation plugin but the rule is not applied or not shown (the well-known red icon is not displayed on the unnamed eclass): the rule simply is the constraint example to check if an attribute is set. The provided filesystem example is working fine, so I probably missed something in the configuration of my own validator or in the genmodel/gmfgen. I've attached all the relevant files (validator plugin.xml, validator evl file, ecore file, genmodel file and gmfgen file). Particularly notice that:
- "Decoration" editor's attribute is set to "Live" in .genmodel
- "Live Validation UI Feedback", "Validation Decorators" and "Validation Enabled" are all set to true (Diagram's attributes of Gen Diagram GraphEditPart) in .gmfgen
- Ns URI is "adfgGraphModel" everywhere
- validation evl file is well included in the binary build (file not attached).

So any idea of what I miss to set ? (or what I set wrong ...) Thanks for your help !

PS: I'm using Epsilon with eclipse modeling mars, but it's probably not the cause since the filesystem example works fine
Re: [EVL live validation not done] [message #1734971 is a reply to message #1734719] Tue, 14 June 2016 09:54 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 1501
Registered: July 2009
Location: York, UK
Senior Member

Hi Alexandre,

If you haven't already figured this out, could you please attach a compressed Eclipse project I can import in my workspace, as per [1]?

Cheers,
Dimitris

[1] https://www.eclipse.org/epsilon/doc/articles/minimal-examples/
Re: [EVL live validation not done] [message #1734990 is a reply to message #1734971] Tue, 14 June 2016 13:42 Go to previous messageGo to next message
Alexandre Honorat is currently offline Alexandre HonoratFriend
Messages: 8
Registered: February 2016
Junior Member
Hi,

the problem is still there, I've joined the archive with the ecore/emf/gmf project and the validator module . The Epsilon version I use is : 1.3.0.201602270002 .

I originally have generated the gmfgen file with Eugenia, but I've slightly modified it (for the variables I mentioned in my previous post), same thing for the genmodel file. So I do not generate the code with Eugenia: I only generate the gmf files; then I generate the code from the gmfgen file.

Some explanations on what the project is about: the ecore define a directed graph with Actors and Channels to modelize processes and communications. I'd like to check if names (and later some other properties) are indeed defined in order to tell the user: ok your model is correct, I can transform it. It works fine with the ecore editor (which detects if the Name attribute is absent, and if a unique ID key is present more than once). I would like to have the same validation for the diagram, and currently I've tried for Name definition with EVL, but no error is shown when creating an Actor/Channel without Name.

I think I've simply wrongly set some parameters but, as a beginner, I don't know which ones ... Thanks for your help !
Re: [EVL live validation not done] [message #1735598 is a reply to message #1734990] Tue, 21 June 2016 11:31 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 1501
Registered: July 2009
Location: York, UK
Senior Member

Hi Alexandre,

Apologies for the slow response. I deleted all intermediate GMF models, (only kept the Emfatic version of your metamodel), re-generated all the code using Eugenia, and validation seems to be working fine. If you'd like to make changes to any of the intermediate models, my recommendation would be to do this programmatically [1] so that it's reproducible; comparing .gmfgen models is not fun Smile

Cheers,
Dimitris

[1] https://www.eclipse.org/epsilon/doc/articles/eugenia-polishing/
Re: [EVL live validation not done] [message #1735641 is a reply to message #1735598] Tue, 21 June 2016 14:22 Go to previous messageGo to next message
Alexandre Honorat is currently offline Alexandre HonoratFriend
Messages: 8
Registered: February 2016
Junior Member
Hi,

ok thanks, actually I was not using the correct "Validate" button ! Some non related plugin provides me a "Validate" button on the package explorer right click (for every files ...), which is not the good one. By the way the right "Validate" button location is specified here ! http://www.eclipse.org/epsilon/doc/articles/evl-gmf-integration/ but it seems that the following sentence is outdated: "To validate this we go to the Diagram menu and select Validate (if you are running Galileo, the Validate option is under the Edit menu instead).", since the button is still in the Edit menu.

So it works fine now, I've just a question concerning the epsilon validation rules scope: is it possible to reduce the scope only to the diagram editor (instead of the diagram and the model editor) ? Currently my evl rules are detected in the ecore model and in the ecore diagram, although in the evl filesystem example they are detected only in the diagram.

Thanks, and sorry for my stupid error ...

Re: [EVL live validation not done] [message #1735644 is a reply to message #1735641] Tue, 21 June 2016 14:45 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 1501
Registered: July 2009
Location: York, UK
Senior Member

Hi Alexandre,

> it seems that the following sentence is outdated

Thanks. I've fixed this now.

> is it possible to reduce the scope only to the diagram editor

I don't think that this is possible. EVL actually integrates with the EMF validation framework so the integration with GMF comes almost for free.

Cheers,
Dimitris
Previous Topic:XML creation during ETL
Next Topic:Create new objects in transformation
Goto Forum:
  


Current Time: Wed Jan 24 10:10:18 GMT 2018

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

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