Modeling with existing super classes [message #549940] |
Wed, 28 July 2010 10:06  |
Eclipse User |
|
|
|
Hi there,
I am currently trying to evaluate the possibilities and advantages of model driven software development (I am an absolute beginner with this topic). Therefore I tried to create a simple ecore model of some existing classes in a certain package of my application.
I realized that the model implementation classes are not easily interchangeable with the original classes. The problem is that the original classes represent threads or SWING gui elements and are therefore derived from classes in different libraries. But as far as I understood the implementations of my model classes have to be derived from some certain classes like "EObjectImpl".
Is this true? Is modeling only useful with basic classes derived from Object? Or how can I modify my model to create classes derived from classes that are not contained in my model?
Thank you very much for your answers.
Benjamin
|
|
|
|
|
Re: Modeling with existing super classes [message #550206 is a reply to message #550107] |
Thu, 29 July 2010 10:10  |
Eclipse User |
|
|
|
Benjamin,
Comments below.
Benjamin Bihler wrote:
>>> The problem is that the original classes represent threads or SWING
>>> gui elements and are therefore derived from classes in different
>>> libraries.
>> You can wrap such things as EDataTypes.
>
> But than I have to aggregate the classes, haven't I?
Not sure what that means.
> I have to add the thread for example as EAttribute and write some
> delegation code. True?
Yes, though I'm not sure what the purpose of the delegation would be.
You could have an attribute for the thread and someone could call
getThread and then work directly with the thread. Of course I'm not
sure how it makes sense for a thread value to be persistent, so likely
such a thing needs to be transient...
>
> Thanks!
|
|
|
Re: Modeling with existing super classes [message #619926 is a reply to message #549981] |
Thu, 29 July 2010 03:31  |
Eclipse User |
|
|
|
>> The problem is that the original classes represent threads or SWING
>> gui elements and are therefore derived from classes in different
>> libraries.
>You can wrap such things as EDataTypes.
But than I have to aggregate the classes, haven't I? I have to add the thread for example as EAttribute and write some delegation code. True?
Thanks!
|
|
|
Re: Modeling with existing super classes [message #619927 is a reply to message #550107] |
Thu, 29 July 2010 10:10  |
Eclipse User |
|
|
|
Benjamin,
Comments below.
Benjamin Bihler wrote:
>>> The problem is that the original classes represent threads or SWING
>>> gui elements and are therefore derived from classes in different
>>> libraries.
>> You can wrap such things as EDataTypes.
>
> But than I have to aggregate the classes, haven't I?
Not sure what that means.
> I have to add the thread for example as EAttribute and write some
> delegation code. True?
Yes, though I'm not sure what the purpose of the delegation would be.
You could have an attribute for the thread and someone could call
getThread and then work directly with the thread. Of course I'm not
sure how it makes sense for a thread value to be persistent, so likely
such a thing needs to be transient...
>
> Thanks!
|
|
|
Powered by
FUDForum. Page generated in 0.03647 seconds