Abstract classes and attributes [message #414609] |
Wed, 14 November 2007 22:40 |
Eclipse User |
|
|
|
Originally posted by: s9145896.mail.inf.tu-dresden.de
Hi all,
how can I set the attribute values of an abstract class in the implementing
classes?
For example, if I have abstract class A with attribute aType and a class B
extending A.
In B I want to say which value aType has, but in the EMF-editor I don't know
how to do this. if I create an attribute for class B then the validation
says, that there are two features with the same name. i also tried to set
derived = true, but it didn't help.
Has anybody got an idea?
Thanks,
Beata
|
|
|
|
Re: Abstract classes and attributes [message #414612 is a reply to message #414611] |
Thu, 15 November 2007 00:45 |
Eclipse User |
|
|
|
Originally posted by: s9145896.mail.inf.tu-dresden.de
Hello Ed,
thank you for your quick answer. I'll try Your suggestion.
Beata
"Ed Merks" schrieb
> Beata,
>
> There's really no support for defining a different default in derived
> classes. You could define EOperations with the same signature as you'd
> get for a features accessors in the base class and then define the
> actual features with different defaults in each derived class.
>
>
> Beata wrote:
>> Hi all,
>>
>> how can I set the attribute values of an abstract class in the
>> implementing classes?
>> For example, if I have abstract class A with attribute aType and a
>> class B extending A.
>> In B I want to say which value aType has, but in the EMF-editor I
>> don't know how to do this. if I create an attribute for class B then
>> the validation says, that there are two features with the same name. i
>> also tried to set derived = true, but it didn't help.
>>
>> Has anybody got an idea?
>>
>> Thanks,
>> Beata
|
|
|
Powered by
FUDForum. Page generated in 0.03023 seconds