|
|
|
|
|
|
Re: Extend Ocl parser. [message #658498 is a reply to message #656361] |
Tue, 08 March 2011 18:09 |
Julien Deantoni Messages: 45 Registered: July 2009 |
Member |
|
|
Hello Ed,
I' continuing the work hardly started by my students...
I have now a working editor of my new grammar based on OCL and generated from Xtext.
As a first test we simply extended the completeOCL.ecore and its xtext grammar.
I still have a problem, and this problem appears even before the introduction of new metaclass in the ecore.
I'm not able to "import" any uml model and to have the completion. Before it was not my priority I didn't care but now, I'd like to finalize this part.
Have you got an OCL file compliant with the CompleteOCL syntax which import a uml or any other model file ?
Consider a simple model where a 'A' class contains some 'B' class instances by using the 'myB' association
I tried this :
import MyImport : 'Simple.uml'
context A
inv test:
self.myB.size() <> 0
What's wrong ?
Thanks in advance !
Regards,
Julien
[Updated on: Tue, 08 March 2011 18:10] Report message to a moderator
|
|
|
Re: Extend Ocl parser. [message #658506 is a reply to message #658498] |
Tue, 08 March 2011 18:47 |
Ed Willink Messages: 7655 Registered: July 2009 |
Senior Member |
|
|
Hi Julien
The UML support is work in progress.
I had hoped that with the underlying Pivot model being UML-based, that
the UML support would be much easier than the Ecore support. There is
support for pure UML, but any practical UML involves a profile, which is
not yet supported.
I'm hoping to get this in Indigo, but it will be touch and go.
You may be able to workaround the limitations by exporting your UML to
Ecore for now.
/org.eclipse.ocl.examples.xtext.tests/src/org/eclipse/ocl/ex amples/test/xtext/models/RoyalAndLoyal.ocl
(and sibling files) will provide you with an Ecore (and other) examples.
There is no completeOCL.ecore. Did you mean CompleteOCLCST.ecore?
Regards
Ed Willink
On 08/03/2011 18:09, Julien DeAntoni wrote:
> Hello Ed,
>
> I' continuing the work hardly started by my students...
>
> I have now a working editor of my new grammar based on OCL and
> generated from Xtext.
> As a first test we simply extended the completeOCL.ecore and its xtext
> grammar.
>
> I still have a problem, and this problem appears even before the
> introduction of new metaclass in the ecore.
>
> I'm not able to "import" any uml model and to have the completion.
> Before it was not my priority I didn't care but now, I'd like to
> finalize this part.
>
> Have you got an OCL file compliant with the CompleteOCL syntax which
> import a uml or any other model file ?
>
> Consider a simple model where a 'A' class contains some 'B' class
> instances by using the 'myB' association
>
> I tried this :
> import MyImport : 'Simple.uml'
> context A
> inv test:
> self.myB.size() <> 0
>
>
> What's wrong ? Thanks in advance !
>
> Regards,
>
> Julien
|
|
|
|
Powered by
FUDForum. Page generated in 0.02437 seconds