OCL constraints creation [message #669837] |
Wed, 11 May 2011 14:27  |
Eclipse User |
|
|
|
Hi everyone,
I am creating a UML profile with papyrus and I don't understand how to attach OCL constraints to the model stereotypes. I am looking for information but I haven't found any.
I now how to attach a constraint element to the model but I can't understand how to fill the fields in the "Properties View" in order the validation of the constraints works correctly in the later process of profile application.
If anyone knows about any documentation which can helps me or he/she can help me yourself, please let me know.
Thanks in advance!
Natalia
|
|
|
|
|
|
Re: OCL constraints creation [message #672455 is a reply to message #672402] |
Sat, 21 May 2011 00:58   |
Eclipse User |
|
|
|
HI Sebastien
Yes. As a first pass, just 'borrow' the Validate button from the UML
Model editor. This will give a pop-up that at least reports the
problems. Just possible for Indigo. At least the infrastructure would be
there, facilitating enhancement in Indigo SR1. Even if Papyrus is
perfect, I think I can promise at least a minor issue with the OCL.
Then, support visual feedback; little red/yellow error/warning
decorations on the icons of all offending blocks, and on the centre of
each offending line. I did this in GEF for the UMLX editor and it looks
really good. But it does require an icon per symbol to decorate, which
is what the Ecore Diagram and UML2 Tools visual styles provide. See the
last figure in
http://www.eclipse.org/gmt/umlx/doc/GT-VMT2006/GTVMT2006.pdf or
http://www.eclipse.org/gmt/umlx/doc/GraMoT2006/GraMoT2006.pdf.
(Frightening, 5 years on and I'm still working on the infrastructure to
get UMLX working properly.)
And also, but it might happen for free, navigation from the problem view
markers back to the relevant diagram element.
Regards
Ed Willink
On 20/05/2011 23:28, Sebastien Gerard wrote:
> HI,
>
> The xtext editor of authoring UML constraint in OCL has been committed
> in Papyrus.
> Now, we need to have this validate button as mentioned by Ed. Ed, an
> idea on how to do it?
>
> Sébastien.
|
|
|
|
Re: OCL constraints creation [message #672521 is a reply to message #672481] |
Sat, 21 May 2011 11:08  |
Eclipse User |
|
|
|
Hi Sebastien
Excellent, you've already done the hard bits. Just need an interactive
menu button to invoke it. I think the EssentialOCL validation might just
work.
If you want to facilitate Complete OCL documents too, you would need to
maintain a list of *.ocl resource names and install each for use by
constructing a UML variant of CompleteOCLEObjectValidator for each list
entry. If you're able to do the name list, I could provide the UML variant.
Regards
Ed Willinkl
On 21/05/2011 10:03, Sebastien Gerard wrote:
> Ok, I will look at that next week. however, we aleaready enable to use
> emf validation within Papyrus and have associated makers in both the
> model browser and diagram editor.
|
|
|
Powered by
FUDForum. Page generated in 0.04594 seconds