GMF+EVL problems [message #1816282] |
Fri, 25 October 2019 10:59 |
|
Hello guys,
We have been trying to use the GMF integration of EVL for our assurance case project.
Whilst I have tested that the EVL script we use actually ran, the error markers are never added to the diagram.
I have been through the plugin: org.eclipse.epsilon.evl.emf.validation, it seems that line 163 of class EVLValidator keeps continuing the loop and therefore the markers for the validation results are never added to the diagram. May I ask what are the purposes of line 162-164?
Cheers,
Will
Research Associate
Department of Computer Science
University of York
|
|
|
Re: GMF+EVL problems [message #1816451 is a reply to message #1816282] |
Tue, 29 October 2019 15:39 |
|
Hi Will,
Just had a look at the code. That loop is not relevant to you, I think: it's for issues detected in models outside that of your object.
The relevant validate(...) call is in line 156. That would update the results field with the detected issues, and the call to addMarkers in line 172 should create the markers. Have you tried stepping into the call in line 172 and seeing what happens with the markers?
Cheers,
Antonio
|
|
|
Re: GMF+EVL problems [message #1816674 is a reply to message #1816451] |
Mon, 04 November 2019 17:53 |
|
Hi Antonio,
I think the loop is problematic, usually the 'validate' function is called within a GMF diagram to validate its contents, therefore the 'key' and the 'eObject' should share the same resource. In this if() statement, it does the opposite.
Maybe I missed something? Once I have commented out the check everything worked, well, for my case.
Cheers,
Will
Research Associate
Department of Computer Science
University of York
|
|
|
Re: GMF+EVL problems [message #1818032 is a reply to message #1816674] |
Wed, 04 December 2019 14:20 |
|
Hi Will,
Sorry for the delay. A bit more digging shows that actually, I wrote this code in 2012! :-D
https://bugs.eclipse.org/bugs/show_bug.cgi?id=368586
I think the idea for those lines was to avoid duplicating markers, one from line 168 and another from line 172. I'm not entirely sure if EMF Validation will call validate(...) once per resource, or once per EObject. It seems my assumption at the time was that it'd be called once per EObject. Will, could you verify which situation we are in?
If it's only being called once per root EObject in each Resource, then we could probably change the code to something like:
if (eObject.eContainer() == null) {
validate(eObject.eResource(), context);
// ...
} else {
addMarkers("", eObject, diagnostics);}
}
Of course, we'd need to re-run the example in that bug report, to see if we may be introducing a regression by mistake...
Cheers,
Antonio
|
|
|
Re: GMF+EVL problems [message #1818080 is a reply to message #1818032] |
Thu, 05 December 2019 10:32 |
|
Hi Antonio,
I think the EMF validation is called upon the resource, not individual EObject, I am reasonably certain of this. Please let me know of your changes and I can test them on my end.
Cheers~
Will
Research Associate
Department of Computer Science
University of York
|
|
|
Powered by
FUDForum. Page generated in 0.03470 seconds