Custom Validation Rules Output [message #1772469] |
Mon, 11 September 2017 02:49  |
Eclipse User |
|
|
|
Hi,
I have a diagram in Sirius with validation rules, and i want to put the output of these in a text file every time the user validates the diagram. Something like a report feature with a resume of the actual state of the validation of the model.
Is this posible? maybe with some code in java or acceleo somewhere? is there an alternative or something similar with sirius out there?
Im new to Sirius and im a bit lost here, i really need something like this.
Thank you in advance,
Felipe
|
|
|
Re: Custom Validation Rules Output [message #1772617 is a reply to message #1772469] |
Wed, 13 September 2017 03:47  |
Eclipse User |
|
|
|
Hi,
There's no direct support for something like this, but any validation error or warning will produce and Eclipse marker (visible in the Problems view), and you can access those programmatically:
* either after the validation, using something like IResource.findMarkers() to get all the markers on a specific file/folder/project (or even the whole workspace).
* or "live" when they are created, by registering a listener with IWorkspace.addResourceChangeListener(IResourceChangeListener, int) and using IResourceChangeEvent.findMarkerDeltas(String, boolean) on the events you receive to detect the creation of validation markers of interest to you.
Regards,
Pierre-Charles
|
|
|
Powered by
FUDForum. Page generated in 0.05232 seconds