|
Re: Validation Plugin, Contraint not executed [message #1828825 is a reply to message #1828708] |
Fri, 19 June 2020 10:50 |
|
Hi, Christoph,
Have you tried running your scenario with the org.eclipse.emf.validation debug tracing options enabled in your launch config? That may help to indicate what is going wrong.
But looking at your plugin.xml, I see two possible problems:
- your category binding references the context by ID "context". It has been a long time, so I don't recall really, but it could be that the framework automatically qualifies your context ID declaration with the bundle symbolic name, so you may have to reference it as "org.eclipse.emf.validation.opcua.context" (assuming that org.eclipse.emf.validation.opcua is your bundle name, which it shouldn't be because it's in the EMF namespace)
- but more significant is that you may need to bind your constraints to Papyrus's client-context. Hopefully the debug tracing will show if that's a problem, or else you can step through ClientContextManager::getClientContextsFor(EObject) to see what contexts are detected for the selection that you're validating in Papyrus
HTH,
Christian
|
|
|
|
Re: Validation Plugin, Contraint not executed [message #1828870 is a reply to message #1828867] |
Sat, 20 June 2020 14:22 |
|
Hi, Christoph,
Indeed, I see that the tracing seems not to include anything useful about constraint bindings and client contexts. That could be a nice contribution to the framework.
Anyways, I don't find a Papyrus-specific client-context, either. There is a PapyrusClientSelector that matches objects contained in a ModelSet, but if it had ever been used before, it isn't now.
The only plausible contexts that I see are:
- org.eclipse.papyrus.uml.profile.clientContext seems to be for editing profiles
- org.eclipse.papyrus.emf.facet.custom.sdk.core.validation.context seems to be enabled unconditionally. I don't know what its purpose is
But I suspect that either the integration of this validation framework in Papyrus is broken or it just doesn't define its own application-specific context, so it is up to you to implement it. I'm not sure what else to say except to step through the ClientContextManager in the debugger as I suggested before.
Sorry,
Christian
|
|
|
|
Powered by
FUDForum. Page generated in 0.05201 seconds