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: 233
Registered: July 2009
Senior Member
What is the best way of changing the behavior of an attribute in a

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

Thanks for providing me some insight.

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

Current Time: Mon Feb 17 13:21:13 GMT 2020

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

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

Back to the top