Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [XCore] GenModel-Importer cannot handle cyclic package imports
[XCore] GenModel-Importer cannot handle cyclic package imports [message #972562] Mon, 05 November 2012 13:27 Go to next message
Christian Fuss is currently offline Christian Fuss
Messages: 1
Registered: November 2012
Junior Member
When creating a GenModel with the XCore-Importer for an XCore-Model consisting of two packages with cyclic dependencies, the GenModel is invalid, because the package PkgA.xcore#/EPackage has the same URI as the package A.ecore#/

Because most EMF tools (e.g. creatign a schema for the model) do not support XCore directly yet, I use the feature of creating a GenModel from the XCore quite often. Now my XCore-models tend to become bigger and more complex so I would like to structure them with packages. These often contain cyclic dependencies (often from "opposite" relations).

Is there a way to overcome these problems?
  • Attachment: PkgB.xcore
    (Size: 0.06KB, Downloaded 29 times)
  • Attachment: PkgA.xcore
    (Size: 0.05KB, Downloaded 24 times)
Re: [XCore] GenModel-Importer cannot handle cyclic package imports [message #973194 is a reply to message #972562] Tue, 06 November 2012 01:16 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25910
Registered: July 2009
Senior Member
Christian,

This example is particularly poor because the package name and the name
of the class it contains are both upper case, so the generate code is
confused whether "B" should denote a package or should denote an interface.

It's never been the case that separate *.genmodels support cyclic
dependencies but it should work to create a single GenModel for such
co-dependent EPackages, though a quick tests indeed indicates there are
problems with this, so please open a bugzilla with this example (fixing
the package names to be lower case), and I'll have a look at what it
takes to fix the problem.

Note that last week I committed changes to Ecore Tools so that it
directly supports diagrams for Xcore-based models; such diagrams are
editable, but the underlying models are not editable, so it's useful for
creating nice diagrams, but not for actually modifying the Xcore model,
which must be done in the Xcore editor.

Please also open a bugzilla to request support for Export Model... for
Xcore models. It should be relatively easy to make all the existing
exporters work with Xcore.

What else are you needing a *.genmodel for? In all cases, you should
request the provider of the service (via bugzilla) to support
Xcore-based models. It's generally as easy as supporting the *.xcore
extension wherever the *.ecore/*.genmodel extensions are supported, and
changing any code that assumes the GenModel or EPackage is the first
child of a Resource.getContents.


On 05/11/2012 8:30 PM, Christian Fuss wrote:
> When creating a GenModel with the XCore-Importer for an XCore-Model consisting of two packages with cyclic dependencies, the GenModel is invalid, because the package PkgA.xcore#/EPackage has the same URI as the package A.ecore#/
>
> Because most EMF tools (e.g. creatign a schema for the model) do not support XCore directly yet, I use the feature of creating a GenModel from the XCore quite often. Now my XCore-models tend to become bigger and more complex so I would like to structure them with packages. These often contain cyclic dependencies (often from "opposite" relations).
>
> Is there a way to overcome these problems?
Previous Topic:Problem concurrently resolving proxies to same resource
Next Topic:Is it not possibile to use instance of eclass as map key?
Goto Forum:
  


Current Time: Wed Jul 23 02:03:49 EDT 2014

Powered by FUDForum. Page generated in 0.03184 seconds