Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Modeling (top-level project) » Modeling with existing super classes
Modeling with existing super classes [message #619744] Wed, 28 July 2010 10:06 Go to next message
Benjamin Bihler is currently offline Benjamin Bihler
Messages: 20
Registered: July 2009
Junior Member
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 #619745 is a reply to message #619744] Wed, 28 July 2010 11:43 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25919
Registered: July 2009
Senior Member
Benjamin,

comments below.

Benjamin Bihler wrote:
> 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.
It's easy to model interfaces and then generate implementations for
them, but existing classes (as opposed to interfaces) won't be able to
(easily) act as EObjects...
> 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 as far as I understood the implementations of my model classes
> have to be derived from some certain classes like "EObjectImpl".
Certainly if you want fine grained access to the structure within such
objects. EDataType are generally best for simple immutable values that
can be converted to or from a String representation.
>
> Is this true? Is modeling only useful with basic classes derived from
> Object?
Yes and no.
> Or how can I modify my model to create classes derived from classes
> that are not contained in my model?
As I mentioned, you can model interfaces and generate implementations,
but values of existing classes will need to be wrapped as data types.
>
> Thank you very much for your answers.
>
>
> Benjamin
Previous Topic:EJB 3.0 UML Profile in Eclipse
Next Topic:Modeling with existing super classes
Goto Forum:
  


Current Time: Sat Jul 26 09:21:19 EDT 2014

Powered by FUDForum. Page generated in 0.02443 seconds