Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mdt-ocl.dev] Import statement and obsolete examples plugins

Hi

Xtext is very keen on import statements and provides good support for them.

The lack of an import statement in CompleteOCL and QVTc and QVTr was my motivation for the two level name resolution supported by the Model Registry. I am finally coming round to Ed Merks' thinking that this problem is a bug in CompleteOCL and QVTd.

An import (meta-model) and include (more CompleteOCL) issue is pending at OMG as Issue 14599.

The new Xtext CompleteOCL and OCLinEcore editors uses an import statement. If you're using plugins then it's

    import ecore : 'http://www.eclipse.org/emf/2002/Ecore'

if you're just developing it's

    import mine : 'platform:/resource/MyMetaModel'

This gives us the slightly embarrassing situation that CompleteOCL developed with the Xtext editor and using an import statement, cannot be parsed as an OCL document by the LPG parser.

Currently it is a user responsibility to define the EMF registry of a CompleteOCL parse to resolve needed meta-models and unfortunately the way this is done is different for Ecore and UML.

I see three options:

a) Do nothing. Xtext is only an example. It is not fully integrated.

b) Add parsing that ignores an import statement to the LPG parser. A bit close to M7, but it only affects the CompleteOCL grammar. Users still need to configure the LPG environment.

c) Fully support an import statement in the LPG parser. As above, but we also need to load the registry, eliminating the need for users to configure registries externally.

I favour b), creeping to c) if time allows, with an intent to have c) in 3.0.1.

----------------

Elimination of the IMP editors renders the org.eclipse.ocl.examples.parser.* plugins redundant, which in turn leaves the org.eclipse.ocl.examples.modelregistry.* plugins redundant, and if OCL (and QVTd) has an import statement there is limited motivation to reintroduce it.

QVTd has not yet migrated to exploit the OCL Model Registry and I would be amazed if anyone else has. QVTo is not affected.

I favour dropping the org.eclipse.ocl.examples.editor.*, org.eclipse.ocl.examples.parser.* and org.eclipse.ocl.examples.modelregistry.* plugins.

    Regards

        Ed Willink






Back to the top