Skip to main content



      Home
Home » Modeling » EMF » Register adapters
Register adapters [message #723831] Fri, 09 September 2011 11:34 Go to next message
Eclipse UserFriend
Hello,
I would like to create a plugin in which I have some EContentAdapters which listen changes on my model (the metamodel plugin is an other one).

I can't understand how to do it.

What I would like to do is create a plugin project which depends on my metamodel project.
And develop my EContentAdapter and make it listen any models conforming my metamodel.

So how to achieve the last part (i.e make it listen any models conforming my metamodel)?

Best regards,

Xavier
Re: Register adapters [message #723836 is a reply to message #723831] Fri, 09 September 2011 11:53 Go to previous messageGo to next message
Eclipse UserFriend
Xavier,

It sounds like you've decide that an EContentAdapter will solve some
specific problem for you but I'm not totally sure that's the case.
Could you explain what problem you're solving and how you think an
EContentAdapter will help solve it?


On 09/09/2011 8:34 AM, Xavier Seignard wrote:
> Hello,
> I would like to create a plugin in which I have some EContentAdapters
> which listen changes on my model (the metamodel plugin is an other one).
>
> I can't understand how to do it.
>
> What I would like to do is create a plugin project which depends on my
> metamodel project.
> And develop my EContentAdapter and make it listen any models
> conforming my metamodel.
>
> So how to achieve the last part (i.e make it listen any models
> conforming my metamodel)?
>
> Best regards,
>
> Xavier
Re: Register adapters [message #724007 is a reply to message #723836] Sat, 10 September 2011 06:18 Go to previous messageGo to next message
Eclipse UserFriend
Ed,
Thanks for your answer. Maybe EContentAdapter is not the right solution.

The problem I want to solve is the following :
- I have a metamodel, metamodel.edit and two editors plugins
- I want to create a new plugin which will listen changes to any model conforming to my metamodel and launch specific actions. So when this plugin is loaded, some behavior is added to my metamodel.

So what would be the steps to achieve that (what kind of adapter, adapter factory, how to register the adapter, which extension point I need to declare)?

Thanks for your future advices,

Best regards,

Xavier
(no subject) [message #724015 is a reply to message #723836] Sat, 10 September 2011 06:18 Go to previous messageGo to next message
Eclipse UserFriend
Ed,
Thanks for your answer. Maybe EContentAdapter is not the right solution.

The problem I want to solve is the following :
- I have a metamodel, metamodel.edit and two editors plugins
- I want to create a new plugin which will listen changes to any model conforming to my metamodel and launch specific actions. So when this plugin is loaded, some behavior is added to my metamodel.

So what would be the steps to achieve that (what kind of adapter, adapter factory, how to register the adapter, which extension point I need to declare)?

Thanks for your future advices,

Best regards,

Xavier
Re: Register adapters [message #724064 is a reply to message #724015] Sat, 10 September 2011 11:33 Go to previous message
Eclipse UserFriend
Xavier,

An EContentAdapter is maybe appropriate for that. You can add it to the
resource set's eAdapters list and it will listen to every resource and
every object within that resource. There's no extension point for
doing this. You'd have to define one yourself specific to your editor.


On 10/09/2011 3:18 AM, Xavier Seignard wrote:
> Ed,
> Thanks for your answer. Maybe EContentAdapter is not the right solution.
>
> The problem I want to solve is the following :
> - I have a metamodel, metamodel.edit and two editors plugins
> - I want to create a new plugin which will listen changes to any model
> conforming to my metamodel and launch specific actions. So when this
> plugin is loaded, some behavior is added to my metamodel.
>
> So what would be the steps to achieve that (what kind of adapter,
> adapter factory, how to register the adapter, which extension point I
> need to declare)?
>
> Thanks for your future advices,
>
> Best regards,
>
> Xavier
Previous Topic:Customizing javadoc for emf's autogenerated classes/methods
Next Topic:concurrent modification issue using OPTION_USE_XML_NAME_TO_FEATURE_MAP in conjunction with OPTION_US
Goto Forum:
  


Current Time: Wed Jul 09 09:34:41 EDT 2025

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

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

Back to the top