|Re: Avoiding 'import' in CompleteOclEditor using OCL Registry? [message #839725 is a reply to message #839646]
||Mon, 09 April 2012 05:23
| Ed Willink
Registered: July 2009
The OCL (formerly QVTd, formerly UMLX) Model Registry
was introduced initially to solve the model location problem for models
that have only a nickname. The Registry additionally solved a dynamic
URI mapping problem as well.
I now regard the nickname only access of OCL, QVT Core and QVT
Relational as language bugs. Using a separate meta-data repository just
hides the problem. The new editors therefore prototype proposed language
I now regard problems with URI resolution as tooling issues. EMF has
flexible support through registered URIs such as 'http:....', and
normalized URIs such as 'platform:/resource/....' and
'platform:/plugin/....'. There are few difficulties using this support
within Eclipse, and the difficulties of using this support in a
standalone environment seem to be due to a missing EMF helper class (see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=361063) and UML2 support
An attempt to make the OCL Model Registry of general use as an EMF Model
Registry did not find favour as the problem did not seem to be a problem
to other modeling tools.
The OCL Model Registry therefore seems to be the wrong solution and is
likely to be terminated rather than promoted.
On 09/04/2012 03:25, Jörn Guy Sü Missing name wrote:
> This is probably a real beginners question, so please bear with me...
> I have a piece of OCL source code to type-check against an Ecore
> metamodel. I have opened the file in the text-based Complete OCL
> editor. The editor obviously cannot resolve the types, so it grumbles
> at me.
> It seems that I can fix this using the non-standard 'import'
> directive, and here is my issue:
> My metamodel is defined in a different plugin, and I would like to
> include the types from there. The only larger CompleteOCL example
> (RoyalAndLoyal) solves this with a relative URL and has the ecore in
> the same package. Other examples pass the package programmatically. I
> do not want to use either approach. Ideally, I would like to avoid
> 'import' completely.
> I have found the OCL model registry in the properties of the file and
> assume that the models registered (defined for) a source code file
> would provide its type checking context. But there is no documentation
> for the registry and I do not find its use self-evident...
> So here is the question:
> Can the model registry be used to make the type space of an Ecore
> model available in the Complete OCL Editor?
> If so, how is this done? (sample code)
> I assume this question may be common, as the editor has become the
> default for .ocl files...
Powered by FUDForum
. Page generated in 0.03005 seconds