Skip to main content



      Home
Home » Modeling » OCL » import nested packages in CompleteOCL for use with XText(OCL XText import)
import nested packages in CompleteOCL for use with XText [message #1800996] Thu, 10 January 2019 14:57 Go to next message
Eclipse UserFriend
The CompleteOCL doc defines the 'import' keyword and examples show it used with http: URIs. XText does not support the use of http: URIs for accessing nested packages in an ecore model. Instead, see https://sdqweb.ipd.kit.edu/wiki/Importing_nested_EPackages_in_Xtext . When adding CompleteOCL for XText editor content validation, where the OCL references an ecore model with nested packages, should the same approach (using 'platform' based URIs) be used? In particular, should this be done if the 'platform' approach has already been used to import the nested packagesfor use by XText?
Re: import nested packages in CompleteOCL for use with XText [message #1800997 is a reply to message #1800996] Thu, 10 January 2019 15:13 Go to previous messageGo to next message
Eclipse UserFriend
Hi

I think you may be confusing two issues.

The OCL tooling, that happens to use Xtext behind the scenes, supports conventional EMF imports, preferably of model elements via a fragment URI, but also of the whole model via an nsURI. OCL tooling does not use any Xtext indexing/scoping mechaisms; the IScope functionality is re-implemented to respect OCL semantics.

Xtext, although it also uses EMF, has a magic index that obfuscates and sometimes even corrupts the simple process of wanting something and referencing it. However within an Xtext grammar it is once again possible to use platform:/resource references provided you set the project Xtext preferences to allow it. This ensures that an Xtext grammar can be used as n ordinary Ecore model of a grammar.

Regards

Ed Willink
Re: import nested packages in CompleteOCL for use with XText [message #1801002 is a reply to message #1800997] Thu, 10 January 2019 16:16 Go to previous messageGo to next message
Eclipse UserFriend
If I understand you correctly, that means that even though I import the ecore nested EPackages in my XText grammar via 'platform' URIs, I would import the same nested EPackages in my OCL via 'http' URIs. Is that correct?
Re: import nested packages in CompleteOCL for use with XText [message #1801014 is a reply to message #1801002] Fri, 11 January 2019 01:18 Go to previous message
Eclipse UserFriend
Hi

You clearly have a problem that I do not understand. Comparison with Xtext is not helpful.

The OCL tooling allows you to use the form of references that suit you.

platform: references can be good if you want to be semi-explicit about the location in a potentially development environment,
nsURI references can be good if you want to use what an installed environment provides.
if really really necessary file: references can be absolutely explicit.

Regards

Ed Willink
Previous Topic:Use OCL to validate non-Ecore objects at runtime
Next Topic:Standalone compiled OCL
Goto Forum:
  


Current Time: Thu Jun 19 13:04:59 EDT 2025

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

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

Back to the top