Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [XCore] derived feature unimplemented
[XCore] derived feature unimplemented [message #1022244] Thu, 21 March 2013 14:34 Go to next message
Martin  odloucký is currently offline Martin odloucký
Messages: 49
Registered: July 2010
Member
Hi,

another problem with (the newest M6 milestone of) XCore. There are two xcore projects named 'base' and 'extender'. The 'base' project is generated from base.xcore:

package base

class Foo {}

class Bar {
	int x
	int y
	
	derived int sum get {
		return x + y
	}
}

class MyClass extends Foo, Bar {}


the 'extender' depends on 'base' and is genreated from extender.xcore:

package extender

import base.Foo
import base.Bar

class MyClass extends Foo, Bar {}


The result is that base.MyClassImpl is different than extender.MyClassImpl. The getSum() method from base.MyClassImpl is generated correctly. The same method in extender.MyClassImpl throws UnsupportedOperationException. Is it a bug or did I miss something? Both projects are attached in the ZIP file.
Re: [XCore] derived feature unimplemented [message #1022325 is a reply to message #1022244] Thu, 21 March 2013 17:09 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26089
Registered: July 2009
Senior Member
Martin,

That definitely sounds like a bug so given it's reproducible in M6---I
haven't the time to try because I'm preparing for EclipseCon---please
open a bugzilla. Of course you can change the order of the inheritance,
but your in real life code that might not be okay.


On 21/03/2013 3:34 PM, Martin odloucký wrote:
> Hi,
>
> another problem with (the newest M6 milestone of) XCore. There are two xcore projects named 'base' and 'extender'. The 'base' project is generated from base.xcore:
>
>
> package base
>
> class Foo {}
>
> class Bar {
> int x
> int y
>
> derived int sum get {
> return x + y
> }
> }
>
> class MyClass extends Foo, Bar {}
>
>
> the 'extender' depends on 'base' and is genreated from extender.xcore:
>
>
> package extender
>
> import base.Foo
> import base.Bar
>
> class MyClass extends Foo, Bar {}
>
>
> The result is that base.MyClassImpl is different than extender.MyClassImpl. The getSum() method from base.MyClassImpl is generated correctly. The same method in extender.MyClassImpl throws UnsupportedOperationException. Is it a bug or did I miss something? Both projects are attached in the ZIP file.
Re: [XCore] derived feature unimplemented [message #1023846 is a reply to message #1022325] Mon, 25 March 2013 09:46 Go to previous message
Martin  odloucký is currently offline Martin odloucký
Messages: 49
Registered: July 2010
Member
Ok, the bug is here

https://bugs.eclipse.org/bugs/show_bug.cgi?id=404061
Previous Topic:[xcore] xcore Editor crashes with xText 2.4
Next Topic:How to generate "@since" tags in JDoc?
Goto Forum:
  


Current Time: Thu Oct 02 10:27:29 GMT 2014

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

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