Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Load Complete OCL Resource Automatically
Load Complete OCL Resource Automatically [message #1060590] Mon, 27 May 2013 08:12 Go to next message
Jack Xiang is currently offline Jack Xiang
Messages: 2
Registered: May 2013
Junior Member
Hi all,

I have build up an uml model and written an ocl file to add constraints on that model.
Actually, I can manually click the 'Load Complete OCL Resource' and drag the ocl file to that message box,
then click the 'validate' button to find if my model fulfills those constraints.
That's what presented in the Eclipse Juno's Help Contents.

And now, I want to write a plug-in to automatically do this procedure.
For example, it will check the models in a specific folder when I save or create some ocl files in another specific folder.

Is there any instructions for me to do that? Which API I can use to do the 'validate' procedure of uml models.

Thanks for you help.
Re: Load Complete OCL Resource Automatically [message #1060647 is a reply to message #1060590] Mon, 27 May 2013 13:04 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 4093
Registered: July 2009
Senior Member
Hi

GIT\org.eclipse.ocl\tests\org.eclipse.ocl.examples.xtext.tests\src\org\eclipse\ocl\examples\test\xtext\ValidateTests.java

may be helpful.

In the previous thread, Cedric noted some deficiences in the Complete
OCL handling that I'm currently fixing, hopefully for Kepler RC2 on
Wednesday.

Fundamentally you need to

Load the UML model
Add the CompleteOCLEObjectValidator to externd the UML model
Use the standard validation of a UML model

Regards

Ed Willink

On 27/05/2013 13:34, Jack Xiang wrote:
> Hi all,
>
> I have build up an uml model and written an ocl file to add
> constraints on that model.
> Actually, I can manually click the 'Load Complete OCL Resource' and
> drag the ocl file to that message box,
> then click the 'validate' button to find if my model fulfills those
> constraints.
> That's what presented in the Eclipse Juno's Help Contents.
>
> And now, I want to write a plug-in to automatically do this procedure.
> For example, it will check the models in a specific folder when I save
> or create some ocl files in another specific folder.
>
> Is there any instructions for me to do that? Which API I can use to do
> the 'validate' procedure of uml models.
>
> Thanks for you help.
Previous Topic:Global Variables in OCL
Next Topic:[OCLinEcore] Load complete OCL resource not always working as expected
Goto Forum:
  


Current Time: Thu Oct 23 00:04:37 GMT 2014

Powered by FUDForum. Page generated in 0.01724 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software