Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » How to run a Validation Plugin?
How to run a Validation Plugin? [message #1452577] Sat, 25 October 2014 14:20 Go to next message
Luís de Sousa is currently offline Luís de SousaFriend
Messages: 214
Registered: July 2009
Senior Member
Dear all,

I am experimenting with DSML validation. I have done the following:

1. Created a profile including a few OCL constraints.

2. Applied the DSML Validation profile to the profile and the validationRule stereotype to the constraints.

3. Generated a EMF Validation Plugin from the profile and installed it.

This is where the Help ends, now the question is how to run this validation plug-in. Is it run automatically when Validation is called on a model with the profile applied on? Or is it run from some menu?

Thank you.
Re: How to run a Validation Plugin? [message #1453025 is a reply to message #1452577] Sun, 26 October 2014 08:27 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1206
Registered: July 2009
Location: Canada
Senior Member

Hi,

The constraints defined by that plug-in should be included
automatically in the validation of any model that has the profile
applied. That is just like any other constraint provider in the EMF
Validation Framework (which also provides help documentation).

So, just validate your model with the usual context-menu actions and
see what problems turn up.

HTH,

Christian


On 2014-10-25 14:20:33 +0000, Luís de Sousa said:

> Dear all,
>
> I am experimenting with DSML validation. I have done the following:
>
> 1. Created a profile including a few OCL constraints.
>
> 2. Applied the DSML Validation profile to the profile and the
> validationRule stereotype to the constraints.
>
> 3. Generated a EMF Validation Plugin from the profile and installed it.
>
> This is where the Help ends, now the question is how to run this
> validation plug-in. Is it run automatically when Validation is called
> on a model with the profile applied on? Or is it run from some menu?
>
> Thank you.
Re: How to run a Validation Plugin? [message #1453998 is a reply to message #1453025] Mon, 27 October 2014 20:38 Go to previous messageGo to next message
Luís de Sousa is currently offline Luís de SousaFriend
Messages: 214
Registered: July 2009
Senior Member
Christian W. Damus wrote on Sun, 26 October 2014 04:27

So, just validate your model with the usual context-menu actions and
see what problems turn up.


Thank you Chirstian for the clarification.

I created a simple profile to test this feature (Vehicles.svg). Then generated the validation plug-in and installed it. Afterwards I created a model and applied the profile to it (Bike.svg). Although the model does not respect the constraint defined in the profile, the validation shows no errors.

Is there any way to make sure the plug-in is being invoked?

Thank you.


  • Attachment: Vehicles.SVG
    (Size: 11.16KB, Downloaded 275 times)
  • Attachment: Bike.SVG
    (Size: 4.39KB, Downloaded 185 times)
Re: How to run a Validation Plugin? [message #1454639 is a reply to message #1453998] Tue, 28 October 2014 16:01 Go to previous message
Christian Damus is currently offline Christian DamusFriend
Messages: 1206
Registered: July 2009
Location: Canada
Senior Member

Hi,

The first thing to check is that the framework has found your
constraints at all: do they appear in the Validation preference page,
which allows the user to selectively disable constraints (exclude them
from validation)?

After that, if the generated plug-in includes an implementation of the
client selector protocol for a custom client context extension on the
constraintBindings extension point, you might put a breakpoint in it to
determine whether it is invoked and, if so, why it is not matching
elements of your profiled models. I'm not familiar enough with the
DSML Validation code generation to know whether this is something that
is generated that you can debug.

HTH,

Christian


On 2014-10-27 20:38:44 +0000, Luís de Sousa said:

> Christian W. Damus wrote on Sun, 26 October 2014 04:27
>> So, just validate your model with the usual context-menu actions and
>> see what problems turn up.
>
>
> Thank you Chirstian for the clarification.
>
> I created a simple profile to test this feature (Vehicles.svg). Then
> generated the validation plug-in and installed it. Afterwards I created
> a model and applied the profile to it (Bike.svg). Although the model
> does not respect the constraint defined in the profile, the validation
> shows no errors.
>
> Is there any way to make sure the plug-in is being invoked?
>
> Thank you.
>
>
>
> <image><image>
Previous Topic:how reverse engineering ?
Next Topic:Re: How to apply a profile to an Activity Diagram
Goto Forum:
  


Current Time: Mon Jul 06 18:34:16 GMT 2020

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

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

Back to the top