Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [Xcore] Problems using opposite
[Xcore] Problems using opposite [message #885134] Tue, 12 June 2012 14:13 Go to next message
Jon Rustand is currently offline Jon RustandFriend
Messages: 13
Registered: September 2009
Location: Oslo, Norway
Junior Member
Hi,

I have a problem describing container reference opposite in Xcore.
Using the following example I get the errors :
from contains relation) : The opposite of the opposite may not be a reference different from this one
from container relation: Couldn't resolve reference to GenFeature 'versionOf'.
-----------

class Artifact <F extends ArtifactVersion>{
contains F [] versions opposite versionOf
}

class ArtifactVersion {
container Artifact<? extends ArtifactVersion> [1..1] versionOf opposite versions
}

-------------
It seems that opposites does not work in combination with generics .
I have tried this out in ECore, and it works fine.

Any help appreciated!

- Jon
Re: [Xcore] Problems using opposite [message #885174 is a reply to message #885134] Tue, 12 June 2012 14:58 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30350
Registered: July 2009
Senior Member
Jon,

I've never tried this. The scoping rules expect a reference to an
GenClass; they should take a reference to a GenTypeParameter into
account. Please open a bugzilla.


On 12/06/2012 4:13 PM, Jon Rustand wrote:
> Hi,
>
> I have a problem describing container reference opposite in Xcore.
> Using the following example I get the errors :
> from contains relation) : The opposite of the opposite may not be a reference different from this one
> from container relation: Couldn't resolve reference to GenFeature 'versionOf'.
> -----------
>
> class Artifact<F extends ArtifactVersion>{
> contains F [] versions opposite versionOf
> }
>
> class ArtifactVersion {
> container Artifact<? extends ArtifactVersion> [1..1] versionOf opposite versions
> }
>
> -------------
> It seems that opposites does not work in combination with generics .
> I have tried this out in ECore, and it works fine.
>
> Any help appreciated!
>
> - Jon
>
Previous Topic:[xcore] Two metamodels where one refers to the other
Next Topic:XPand - JMerge Protected Region
Goto Forum:
  


Current Time: Sat Aug 17 14:58:59 GMT 2019

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

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

Back to the top