Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Use EObject for Behavioral Extensions
Use EObject for Behavioral Extensions [message #423818] Tue, 07 October 2008 13:46 Go to next message
David Michonneau is currently offline David MichonneauFriend
Messages: 85
Registered: July 2009
Member
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 14:15 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31478
Registered: July 2009
Senior Member
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--


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:EMF Stand-alone main application
Next Topic:[CDO]: IHTTPConnector is present in 2 bundles!
Goto Forum:
  


Current Time: Thu Sep 24 12:35:13 GMT 2020

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

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

Back to the top