Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Dos/Don'ts for OCLinEcore/Pivot?(Every time I try extend my metamodel, seems that the new classes conflicts with old ones)
Dos/Don'ts for OCLinEcore/Pivot? [message #1248811] Mon, 17 February 2014 17:37 Go to next message
Ricardo CaWal is currently offline Ricardo CaWal
Messages: 20
Registered: January 2013
Junior Member
Hey, guys!

May I ask you if there is some kind of "best practices guide" ou a "don't EVER do this: the companion book" to using OCLinEcore/Pivot within an Ecore model?

I'm having a lot of problems with properties derivations and model validation every time I try to add an instance of a new class into a model.
As my Ecore model has a lot of inheritance and overriden methods (and even a lot of multiple inheritance), so maybe I'm doing something wrong.

Just to illustrate one of the problems: when I add an instance of a new class into the model, derivations of atributtes of instances of other classes (that were working so far) just stop working. Even the Xtext OCL Console retunrs some error like "OCL evaluation result of '1.0::oboroeditor::Relationship.relatedElement' is invalid // Failed to evaluate 1.0::oboroeditor::Relationship.relatedElements() // null". And this problem seems to happen in the evaluation of derived attributes that were/should be overwriten in specialized classes.


In time: Yesterday I'have found this bug ticket (https://bugs.eclipse.org/bugs/show_bug.cgi?id=339952#c4) that talks about "if/oclIsKindOf cascades". I didn't find anything about it, but I think maybe it's related to my problem. Where I can find more of it?
Re: Dos/Don'ts for OCLinEcore/Pivot? [message #1248819 is a reply to message #1248811] Mon, 17 February 2014 17:46 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4046
Registered: July 2009
Senior Member
Hi

I'm not clear whether you are discussing ergonomic or language issues,
so I cannot offer any real advice to such vague problems. Some ergonomic
problems require an editor restart.

I'm not sure why a dynamic dispatch issue is relevant.

Regards

Ed Willink


On 17/02/2014 17:37, Ricardo CaWal wrote:
> Hey, guys!
>
> May I ask you if there is some kind of "best practices guide" ou a
> "don't EVER do this: the companion book" to using OCLinEcore/Pivot
> within an Ecore model?
> I'm having a lot of problems with properties derivations and model
> validation every time I try to add an instance of a new class into a
> model. As my Ecore model has a lot of inheritance and overriden
> methods (and even a lot of multiple inheritance), so maybe I'm doing
> something wrong.
> Just to illustrate one of the problems: when I add an instance of a
> new class into the model, derivations of atributtes of instances of
> other classes (that were working so far) just stop working. Even the
> Xtext OCL Console retunrs some error like "OCL evaluation result of
> '1.0::oboroeditor::Relationship.relatedElement' is invalid // Failed
> to evaluate 1.0::oboroeditor::Relationship.relatedElements() // null".
> And this problem seems to happen in the evaluation of derived
> attributes that were/should be overwriten in specialized classes.
>
>
> In time: Yesterday I'have found this bug ticket
> (https://bugs.eclipse.org/bugs/show_bug.cgi?id=339952#c4) that talks
> about "if/oclIsKindOf cascades". I didn't find anything about it, but
> I think maybe it's related to my problem. Where I can find more of it?
Re: Dos/Don'ts for OCLinEcore/Pivot? [message #1248842 is a reply to message #1248819] Mon, 17 February 2014 18:10 Go to previous messageGo to next message
Ricardo CaWal is currently offline Ricardo CaWal
Messages: 20
Registered: January 2013
Junior Member
Hi, Ed!

I'm not sure if the issue is relevant to, but it mimics (or at least is a symptom) the general problem: the error does not occurs before the new instance is added to the model, and happens everytime the instance is added.

I'm sorry I don't recall what is a ergonomic problem, but after the problem also I need to restart the editor to have the OCL frameworking working again.

Is there something I should explain better in order to help with the discussion?
Re: Dos/Don'ts for OCLinEcore/Pivot? [message #1248846 is a reply to message #1248842] Mon, 17 February 2014 18:16 Go to previous messageGo to next message
Ricardo CaWal is currently offline Ricardo CaWal
Messages: 20
Registered: January 2013
Junior Member
(I've found now that seems that a Ctrl+z, undoing the addition to the model, can avoid the need to restart the editor.)
Re: Dos/Don'ts for OCLinEcore/Pivot? [message #1248856 is a reply to message #1248846] Mon, 17 February 2014 18:34 Go to previous messageGo to next message
Ricardo CaWal is currently offline Ricardo CaWal
Messages: 20
Registered: January 2013
Junior Member
(But the issue still occurs...)
Re: Dos/Don'ts for OCLinEcore/Pivot? [message #1248923 is a reply to message #1248856] Mon, 17 February 2014 20:09 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4046
Registered: July 2009
Senior Member
Hi

Without a clearer description and preferably a precise reproduction, it
is difficult to help.

I recall finding an embarrassingly bad editor update bug a few months
ago, so you might see if the Muna M5 release (which should be
installable on Kepler) is better.

http://www.eclipse.org/modeling/download.php?file=/modeling/mdt/ocl/downloads/drops/5.0.0/S201401270935/mdt-ocl-Update-5.0.0M5.zip

Regards

Ed Willink


On 17/02/2014 18:34, Ricardo CaWal wrote:
> (But the issue still occurs...)
Re: Dos/Don'ts for OCLinEcore/Pivot? [message #1249929 is a reply to message #1248923] Tue, 18 February 2014 19:30 Go to previous message
Ricardo CaWal is currently offline Ricardo CaWal
Messages: 20
Registered: January 2013
Junior Member
Hi, Ed!

Thank you for the hint. I think it's alright now:
I've upgraded Eclipse and added a new redefinition
for some operations in each subclass that were showing the issue. Now all
classes doesn't conflict with each other when I add a new instance.

And thank you for the recommendations. Next time I'll try to give a reproducible example. Wink
Previous Topic:ecore & ocl: dependencies
Next Topic:Pivot Setting Deletegate and oclIsKindOf operation problem
Goto Forum:
  


Current Time: Fri Sep 19 03:47:22 GMT 2014

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

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