Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsHow to run a Validation Plugin?
https://www.eclipse.org/forums/index.php/mv/msg/837737/1452577/#msg_1452577
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.]]>Luís de Sousa2014-10-25T14:20:32-00:00Re: How to run a Validation Plugin?
https://www.eclipse.org/forums/index.php/mv/msg/837737/1453025/#msg_1453025
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.]]>Christian Damus2014-10-26T08:27:35-00:00Re: How to run a Validation Plugin?
https://www.eclipse.org/forums/index.php/mv/msg/837737/1453998/#msg_1453998
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.
]]>Luís de Sousa2014-10-27T20:38:43-00:00Re: How to run a Validation Plugin?
https://www.eclipse.org/forums/index.php/mv/msg/837737/1454639/#msg_1454639
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>]]>Christian Damus2014-10-28T16:01:16-00:00