[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[News.eclipse.technology.gmf] Re: Audit Rule - Well Formedness Rules

Hi Madanagopal,

Audits allow you to define rules on domain meta-model elements and runtime 
notation meta-model of the visual diagram elements.
Such rules are mapped to EMFT Validation framework constraints during the 
diagram editor generation and involved in validation
in runtime. See org.eclipse.emf.validation.service.ModelValidationService.
GMF takes care of generating corresponding constraintProviders, categories, 
targets, contextBindings parts of the validation framework and
additionally, it can generate validation action, navigable problem markers 
for constraint violations, validation status decorators for visualized 
elements.
You can even define your constraints outside the GMF editor definition by 
direct use of EMFT Validation framework extension points or
simply provide your own org.eclipse.emf.ecore.EValidator implementation.
All these kinds of constraints get involved by the validation action 
generated by GMF.

In case you require firing of the constraint check different from the 
validate action in the diagram menu you can reuse
public static void ...ValidationProvider.validate(Diagram diagram)
operation of the validation provider generated in the diagram editor and 
invoke it using your own lanching mechanism.

Hope, this helps.

Regards,
/Radek

"Madanagopal" <madanagopal@xxxxxxxxx> wrote in message 
news:e9ehfv$njt$1@xxxxxxxxxxxxxxxxxxxx
> Hello,
>
> I would like to evaluate my diagram editor using OCL. I visualize it to be 
> an editor with the user using the components from Tools Pallete to draw 
> diagrams and to provide with a button on pressed that evaluates the 
> diagrams and write in the messages to the Error Log.
>
> I am writing constraints using OCL. My question is what is the need of 
> Audit Rule and does it satisfy my requirements that i have mentioned 
> above.
>
> I tested the Mindmap Example for the name.size() > 0 constraint. My editor 
> doesnt seems to work with this constraint inspite of implementing it.
>
> You Suggestions please,
>
> Regards,
> Madanagopal
>