Skip to main content



      Home
Home » Modeling » EMF » [Xcore] Defining get on derived features using reflective feature delegation
[Xcore] Defining get on derived features using reflective feature delegation [message #990824] Fri, 14 December 2012 06:04 Go to next message
Eclipse UserFriend
Hello

is it possible to define get for features when reflective (or dynamic) feature delegation is used?

Example:
@GenModel(featureDelegation="Reflective")
class MyClass {
	String name
	String firstName
	derived String fullName get {
		name + ", " + firstName
	}
}

My tests show that this is not implemented using EMF 2.8.1 and Xcore 1.0.1. Are there any plans to support this?

Greetings
Christoph
Re: [Xcore] Defining get on derived features using reflective feature delegation [message #990829 is a reply to message #990824] Fri, 14 December 2012 06:20 Go to previous messageGo to next message
Eclipse UserFriend
Christoph,

Yes, this problem is related to
https://bugs.eclipse.org/bugs/show_bug.cgi?id=385634. The guards for
when to emit the body verses what's generated otherwise is a little too
far down in the template. Perhaps you can append this example to that
bug to remind me that it needs attention; it shouldn't be too hard to fix...


On 14/12/2012 12:04 PM, Christoph Keimel wrote:
> @GenModel(featureDelegation="Reflective")
> class MyClass {
> String name
> String firstName
> derived String fullName get {
> name + ", " + firstName
> }
> }
Re: [Xcore] Defining get on derived features using reflective feature delegation [message #1721295 is a reply to message #990829] Tue, 26 January 2016 06:56 Go to previous messageGo to next message
Eclipse UserFriend
Hi Ed,

I have Xcore (1.2) model with a derived attribute that has a custom getter. When I set feature delegation to Dynamic (as recommended for CDO), the generated code has an eGet method calling the generated getX method. However, the latter calls eDynamicGet, and does not have the custom code from the Xcore model as I would have expected (note that I only get the custom code emitted when I set feature delegation to None or Reflective).

What setting do I need to have to get the custom code in xcore to be emitted with Dynamic delegation? Thanks.

Maged

[Updated on: Tue, 26 January 2016 06:57] by Moderator

Re: [Xcore] Defining get on derived features using reflective feature delegation [message #1721297 is a reply to message #1721295] Tue, 26 January 2016 07:06 Go to previous messageGo to next message
Eclipse UserFriend
Maged,

That sounds like a bug. Please open a Bugzilla.

On 26.01.2016 12:56, Maged Elaasar wrote:
> Hi Ed,
>
> I have Xcore (1.2) model with a derived attribute that has a custom
> getter. When I set feature delegation to Dynamic (as recommended for
> CDO), the generated code has an eGet method calling the generated getX
> method. However, the latter calls eDynamicGet, and does not have the
> custom code from the Xcore model as I would have expected (note that I
> only get the custom code emitted when I set feature delegation to None
> or Reflective).
>
> What setting do I need to have to get the custom code in xcore to be
> edited with Dynamic delegation? Thanks.
>
> Maged
Re: [Xcore] Defining get on derived features using reflective feature delegation [message #1721361 is a reply to message #1721297] Tue, 26 January 2016 15:09 Go to previous message
Eclipse UserFriend
Here it is: https://bugs.eclipse.org/bugs/show_bug.cgi?id=486601

Thanks Ed.
Previous Topic:Thanks for the version management tool
Next Topic:[CDO] Missing class when running CDOServer
Goto Forum:
  


Current Time: Wed Jul 23 02:21:54 EDT 2025

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

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

Back to the top