Use EObject for Behavioral Extensions [message #423818] |
Tue, 07 October 2008 09:46  |
Eclipse User |
|
|
|
Hi,
Is it possible to use EMF models for the behavioral extensions? There seems
to be a restriction on the fact that an adapter must inherit from
AdapterImpl, that prevents it to be also an EObject.
For instance, I have two ecore models: model1 and model2, and I would like
to adapt some objects in model1 with objects of model2. How would I do that?
Thanks,
David
|
|
|
Re: Use EObject for Behavioral Extensions [message #423820 is a reply to message #423818] |
Tue, 07 October 2008 10:15  |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
--------------090806080304000100060108
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
David,
Comments below.
David Michonneau wrote:
> Hi,
>
> Is it possible to use EMF models for the behavioral extensions? There seems
> to be a restriction on the fact that an adapter must inherit from
> AdapterImpl, that prevents it to be also an EObject.
>
You only need something that implements Adapter (and optionally
Adapter.Internal).
> For instance, I have two ecore models: model1 and model2, and I would like
> to adapt some objects in model1 with objects of model2. How would I do that?
>
SDO does this:
public class ETypeImpl extends EObjectImpl implements EType, Adapter
> Thanks,
>
> David
>
>
>
--------------090806080304000100060108
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
David,<br>
<br>
Comments below.<br>
<br>
<br>
David Michonneau wrote:
<blockquote cite="mid:gcfp70$qhv$1@build.eclipse.org" type="cite">
<pre wrap="">Hi,
Is it possible to use EMF models for the behavioral extensions? There seems
to be a restriction on the fact that an adapter must inherit from
AdapterImpl, that prevents it to be also an EObject.
</pre>
</blockquote>
You only need something that implements Adapter (and optionally
Adapter.Internal).<br>
<blockquote cite="mid:gcfp70$qhv$1@build.eclipse.org" type="cite">
<pre wrap="">
For instance, I have two ecore models: model1 and model2, and I would like
to adapt some objects in model1 with objects of model2. How would I do that?
</pre>
</blockquote>
<br>
SDO does this:<br>
<blockquote>public class ETypeImpl extends EObjectImpl implements
EType, Adapter<br>
</blockquote>
<blockquote cite="mid:gcfp70$qhv$1@build.eclipse.org" type="cite">
<pre wrap="">
Thanks,
David
</pre>
</blockquote>
</body>
</html>
--------------090806080304000100060108--
|
|
|
Powered by
FUDForum. Page generated in 0.04518 seconds