|
|
|
Re: Validation problems [message #1834887 is a reply to message #1834880] |
Thu, 19 November 2020 19:54 |
Ed Willink Messages: 7670 Registered: July 2009 |
Senior Member |
|
|
Hi
You omit the packaging but I presume you are referring to org.eclipse.ocl.pivot.uml.internal.labels.SlotLabelGenerator which is part of the OCL support and so might confuse the Papyrus developers.
While a null check could be added to the code, this is not really what validation is about.
Validation is intended amongst other things to gain insight into a defective model. A stack trace is absolutely not the user-friendly response. Even worse as here for the stack trace to be produced while attempting to report an earlier failure.
Unfortunately the EMF API is that validation never fails to diagnose, but any non-trivial validation code given a bad model may crash and it is infeasible to code for every possible defective model, let alone recode every called EMF routine on the off chance that it might be tripped up by the defect, therefore it is the responsibility of the outer level validation (probably org.eclipse.papyrus.uml.service.validation.internal.UMLDiagnostician.validate) to catch the Exception convert it to an error wrt the defective model element and continue validation for the rest of the model. Consequently the validation dialog details should show the stack trace along with all the other problems which will probably show that a diagnostic had already been created for the bad definingFeature.. The EMF dialog was recently improved to ensure that these details are now more consistently available.
Regards
Ed Willink
[Updated on: Thu, 19 November 2020 19:57] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03771 seconds