Skip to main content



      Home
Home » Modeling » OCL » Customize EssentialOCL editor
Customize EssentialOCL editor [message #872050] Tue, 15 May 2012 07:32 Go to next message
Eclipse UserFriend
Hi,

I've successfully integrated the EssentialOCL xtext editor using org.eclipse.xtext.ui.editor.embedded.EmbeddedEditor in an example application. I use org.eclipse.ocl.examples.xtext.essentialocl.ui.model.BaseDocument.setContext(...) to define the classifier context of the OCL expression.

Everything is working fine except that I only can use classes, attributes and operations coming from the same EPackage the classifier context is contained in. The content assist doesn't show elements from other registered EPackages and when I try to use such elements in the OCL expression I get "Unresolved namespace" and "Unresolved property" errors.

Is there a way to register the contents of other EPackages?

I'm using MDT OCL 3.1.2a and XText 2.2.1

Regards,

Matthias Erche

[Updated on: Tue, 15 May 2012 07:34] by Moderator

Re: Customize EssentialOCL editor [message #873181 is a reply to message #872050] Thu, 17 May 2012 12:29 Go to previous message
Eclipse UserFriend
Hi

Yes.

Just like Java, you must qualify such names.

Just like Java, you can import or locally qualify.

If using OCLinEcore or Complete OCL you can use an import statement.

If using Java, you need to instruct the metaModelManager to
loadResource(); searcg the source code for examples.

If using EssentialOCL you can use URI qualification: _'myURI'::... ;
this has a bug fix in M7.

Regards

Ed Willink

On 15/05/2012 12:32, Matthias Erche wrote:
> Hi,
>
> I've successfully integrated the EssentialOCL xtext editor using
> org.eclipse.xtext.ui.editor.embedded.EmbeddedEditor in an example
> application. I use
> org.eclipse.ocl.examples.xtext.essentialocl.ui.model.BaseDocument.setContext(...)
> to define the classifier context of the OCL expression.
>
> Everything is working fine except that I only can use classes,
> attributes and operations coming from the same EPackage the classifier
> context is contained in. The content assist doesn't show elements from
> other registered EPackages and when I try to use such elements in the
> OCL expression I get "Unresolved namespace" and "Unresolved property"
> errors.
>
> Is there a way to register the contents of other EPackages?
>
> Regards,
>
> Matthias Erche
Previous Topic:[Doubt]OCL integration EMF
Next Topic:[Announce] Eclipse OCL 4.0.0 (Juno) RC1 is now available
Goto Forum:
  


Current Time: Sat Apr 26 11:49:53 EDT 2025

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

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

Back to the top