Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Changing attribute behavior in subclasses
Changing attribute behavior in subclasses [message #687337] Tue, 31 May 2011 20:04
Alain Picard is currently offline Alain PicardFriend
Messages: 223
Registered: July 2009
Senior Member
What is the best way of changing the behavior of an attribute in a
sub-class.

Let's take an easy and common example with EMF itself. EMF defines a
ENamedElement that has a "name" attribute. Now let's imagine that some
of its subclasses need this name to be marked as required and others
don't. Since the behavior is not universal, we can't mark the attribute
as "required" at the level of ENamedElement, but how could we then mark
it as "required" for let's say, EClass.

We can surely have a validation, probably OCL to check this, but this
doesn't make it a formal definition according to our meta-model. Here we
would like EEF to read this "value" and make our field bold since it is
required (w/o any other manual intervention and at the model level for
validation).

Thanks for providing me some insight.

Alain
Previous Topic:(no subject)
Next Topic:(no subject)
Goto Forum:
  


Current Time: Sat Sep 21 01:06:02 GMT 2019

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

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

Back to the top