Skip to main content


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ýFriend
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.
  • Attachment: workspace.zip
    (Size: 27.04KB, Downloaded 178 times)
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 MerksFriend
Messages: 33133
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.


Ed Merks
Professional Support: https://www.macromodeling.com/
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ýFriend
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: Tue Apr 16 19:06:21 GMT 2024

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

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

Back to the top