|Re: Automatic validation. [message #633728 is a reply to message #633552]
||Tue, 19 October 2010 02:55
| Hallvard Traetteberg
Registered: July 2009
Location: Trondheim, Norway
On 18.10.10 13.42, Jose Miguel wrote:|
> I have tried call ValidateAction.runValidation(...) in the method
> doExecuteWithResult of my XXXCreateComand, XXXReorientedComand etc. but
> I don't know How can I get the View Object.
> I'll ask in the GMF newsgroup.
> Thanks you very much for you help Dimitrios.
GMF supports validating the model, so the question is how to trigger it.
A fairly generic solution is listening to changes to the command stack,
and then trigger the validation (that I think normally happens when you
save). Then you know that the command has completed, any model listeners
have reacted to model changes etc.
I think you can get hold of the command stack through the editing
domain. The EMF editor uses this technique to set the dirty flag of the
editor, so it should be fairly easy to find example code.
Powered by FUDForum
. Page generated in 0.02364 seconds