Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Register adapters
Register adapters [message #723831] Fri, 09 September 2011 15:34 Go to next message
Xavier Seignard is currently offline Xavier SeignardFriend
Messages: 52
Registered: June 2010
Member
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 15:53 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
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


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Register adapters [message #724007 is a reply to message #723836] Sat, 10 September 2011 10:18 Go to previous messageGo to next message
Xavier Seignard is currently offline Xavier SeignardFriend
Messages: 52
Registered: June 2010
Member
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 10:18 Go to previous messageGo to next message
Xavier Seignard is currently offline Xavier SeignardFriend
Messages: 52
Registered: June 2010
Member
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 15:33 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
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


Ed Merks
Professional Support: https://www.macromodeling.com/
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: Fri Apr 19 00:37:05 GMT 2024

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

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

Back to the top