| [news.eclipse.modeling.gmf] Re: How to forbid changing an attribute value via property sheet? or How to intercept a SetCommand? |
Hi Alexander,
Best regards, Boris
Hello,
I want to forbid the setting of an attribute value via the property sheet depending on the state of my semantic model.
As far as I can see it is not possible to replace the SetCommand as it is working directly on the model. I tried to install an EditPolicy as EditPolicyRoles.PROPERTY_HANDLER_ROLE, EditPolicyRoles.SEMANTIC_ROLE or even EditPolicy.DIRECT_EDIT_ROLE. If I debug into the creation of the SetCommand it seems to be indepent of any EditPolicy.
What can I do now?
Why is using the PropertyView not calling the getBeforeSetCommand of an EditHelper for example?
Currently I have to adapt different startegies for implementing my dynamic constraints for every kind of command. Why is the edit helper offering all these methods if they aren't used? This is very annoying.
Cheers, Alexander