Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Emfatic] Assign attribute in inheritance
[Emfatic] Assign attribute in inheritance [message #1251036] Wed, 19 February 2014 21:26 Go to next message
Brian Tost is currently offline Brian TostFriend
Messages: 4
Registered: April 2013
Junior Member
I have an emfatic file with textual notation from a metamodel:

class Element {
  attr int[1] min;
  attr int[1] max;
}

class SubElement extends Element {
}


I want that the class SubElement automatically assign a value to the variable min and max in the emfatic file.

I've tried:

class SubElement extends Element {
    min = 0;
    max = 1;
}


And this:

class SubElement extends Element {
    Element.min = 0;
    Element.max = 1;
}


Or:

class SubElement extends Element { 
    super.min = 0; super.max = 1; 
}


But without success. How can I fix this?
Re: [Emfatic] Assign attribute in inheritance [message #1251334 is a reply to message #1251036] Thu, 20 February 2014 05:21 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Fabio,

Better to ask about Emfatic on the eclipse.epsilon forum. I doubt what
you're showing can work because Ecore itself doesn't allow you to
override feature defaults in a derived class.

On 19/02/2014 10:26 PM, fabio soares wrote:
> I have an emfatic file with textual notation from a metamodel:
>
> class Element {
> attr int[1] min;
> attr int[1] max;
> }
>
> class SubElement extends Element {
> }
>
> I want that the class SubElement automatically assign a value to the
> variable min and max in the emfatic file.
>
> I've tried:
>
> class SubElement extends Element {
> min = 0;
> max = 1;
> }
>
> And this:
>
> class SubElement extends Element {
> Element.min = 0;
> Element.max = 1;
> }
>
> Or:
> class SubElement extends Element { super.min = 0; super.max = 1; }
>
> But without success. How can I fix this?


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[Teneo] How to get the audit history of a deleted entity?
Next Topic:TENEO LONGTEXT DATATYPE
Goto Forum:
  


Current Time: Thu Apr 25 21:14:01 GMT 2024

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

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

Back to the top