Skip to main content



      Home
Home » Modeling » EMF » Changing attribute behavior in subclasses
Changing attribute behavior in subclasses [message #687337] Tue, 31 May 2011 16:04
Eclipse UserFriend
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: Mon Jul 07 12:46:39 EDT 2025

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

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

Back to the top