Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Model Validation and Stereotypes
Model Validation and Stereotypes [message #1699783] Fri, 26 June 2015 14:56 Go to next message
Nicholas Pacini is currently offline Nicholas PaciniFriend
Messages: 24
Registered: June 2014
Junior Member
Hello all,

I'd like to report an unexpected behavior that i get when performing Model Validation on elements with applied stereotypes.

For example, if I apply the "Resource" stereotype (from MARTE::GRM) to a Component and then run the validation, I get several errors in the Model Validation View such as: "The required feature 'MARTE::GRM::Resource::base_Property' of 'Resource' must be set."
Which of course cannot be set in this case as the 'base_Classifier' property is set instead.

I've recently tried the latest Papyrus version (1.1.0 on Eclipse Mars 4.5), but I've noticed the same behavior on previous version as well. Moreover this seems to happen also on other stereotypes and profiles (even custom ones) as long as a stereotype can be applied to different UML elements.

Is this the expected behavior of the Model Validation? Could anyone check it?
I've attached a really small Papyrus Model to reproduce what i've reported.

Regards,
Nicholas
  • Attachment: Test.zip
    (Size: 2.60KB, Downloaded 62 times)
Re: Model Validation and Stereotypes [message #1699786 is a reply to message #1699783] Fri, 26 June 2015 15:00 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 926
Registered: February 2011
Senior Member
Hi Nicholas,

The validation is valid, but most Profiles are invalid. When a Stereotype extends multiple metaclasses, the multiplicity of the base_X property should be [0..1] instead of [1].

I suppose we should check this in Papyrus when creating the Profile, to avoid publishing Profiles that can't have valid instances.

Regards,
Camille


Camille Letavernier
Re: Model Validation and Stereotypes [message #1699789 is a reply to message #1699786] Fri, 26 June 2015 15:12 Go to previous messageGo to next message
Nicholas Pacini is currently offline Nicholas PaciniFriend
Messages: 24
Registered: June 2014
Junior Member
Hi Camille,

many thanks for the quick reply!

I agree with you that the validation is ok, but with several application of stereotypes in the model you'll probably get an awful lot of errors in the result view.
Checking the multiplicity of the base_X properties when creating the Profile would be great.

As a workaround, Is there some way to add a filter or a constraint to avoid seeing all these errors?

thanks again,
Nicholas
Re: Model Validation and Stereotypes [message #1699790 is a reply to message #1699789] Fri, 26 June 2015 15:15 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 926
Registered: February 2011
Senior Member
Hi,

This is an EMF Structural constraint, I'm afraid there's nothing you can do on the Model side. Only fixing the profile(s) will help.

I'm not sure how such constraints can be overridden or disabled

Camille


Camille Letavernier
Re: Model Validation and Stereotypes [message #1699792 is a reply to message #1699790] Fri, 26 June 2015 15:35 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6758
Registered: July 2009
Senior Member
Hi

The new safe-navigation OCL constraints are very disconcerting for
'unsafe' models and so I was forced to add a per-constraint-group
severity analoguous to JDT problem severities. A more generic EMF
Diagnostician could provide similar lookup of severity (and message).
Yet another WIBNIF for the validation rework.

Regards

Ed Willink


On 26/06/2015 16:15, Camille Letavernier wrote:
> Hi,
>
> This is an EMF Structural constraint, I'm afraid there's nothing you
> can do on the Model side. Only fixing the profile(s) will help.
>
> I'm not sure how such constraints can be overridden or disabled
>
> Camille
Previous Topic:In braces view on packages, not shown 'inside' tab
Next Topic:Customizing UML Class Diagram
Goto Forum:
  


Current Time: Sun Jul 05 11:22:34 GMT 2020

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

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

Back to the top