Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » How to get model instance from other Plugin?
How to get model instance from other Plugin? [message #430723] Fri, 05 June 2009 08:50 Go to next message
lancel lau is currently offline lancel lauFriend
Messages: 31
Registered: July 2009
Member
Hi,

There exists already a EMF model with its editor. i want to get the
Notification of changes to this model. but i can not change their code.
how can i get the model instance in my plugin? then maybe i can add an
adaptor to it.
thanks for your help!

regards
Re: How to get model instance from other Plugin? [message #430728 is a reply to message #430723] Fri, 05 June 2009 10:10 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Lancel,

EMF generated editors implement IEditingDomainProvider which allows you
to get at the EditingDomain, and hence the ResourceSet containing all
the model's Resources.


lancel lau wrote:
> Hi,
>
> There exists already a EMF model with its editor. i want to get the
> Notification of changes to this model. but i can not change their
> code. how can i get the model instance in my plugin? then maybe i can
> add an adaptor to it.
> thanks for your help!
>
> regards
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to get model instance from other Plugin? [message #430877 is a reply to message #430728] Mon, 15 June 2009 12:12 Go to previous messageGo to next message
lancel lau is currently offline lancel lauFriend
Messages: 31
Registered: July 2009
Member
thanks for your reply.
how can i get this editingDomain? i need to do this in the Plugin´s
Activator. what i got is only the bundlecontext.
Re: How to get model instance from other Plugin? [message #430884 is a reply to message #430877] Mon, 15 June 2009 22:05 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Lancel,

I don't think the question you're asking makes sense. There can be 1000
editors, say, yet a plugin's activator is only activated once, so I
can't see how it makes sense to want to get an some editor(s) editing
domain at that time...


lancel lau wrote:
> thanks for your reply.
> how can i get this editingDomain? i need to do this in the
> Plugin´s Activator. what i got is only the bundlecontext.
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to get model instance from other Plugin? [message #430889 is a reply to message #430884] Tue, 16 June 2009 10:53 Go to previous messageGo to next message
lancel lau is currently offline lancel lauFriend
Messages: 31
Registered: July 2009
Member
Hi,

i see, you mean one editor corresponds with one editingdomain. what i need
to do is to add my adaptor to other's existing model. perhaps we do not
need to focus on editors, but models. Any advices?

regards
Re: How to get model instance from other Plugin? [message #430903 is a reply to message #430889] Tue, 16 June 2009 21:59 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Lancel,

I just don't know what you're trying to accomplish, but generally
editors don't have to and well might not provide you access to the
underlying model and there's no way to get at the model by some indirect
means...


lancel lau wrote:
> Hi,
>
> i see, you mean one editor corresponds with one editingdomain. what i
> need to do is to add my adaptor to other's existing model. perhaps we
> do not need to focus on editors, but models. Any advices?
>
> regards
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to get model instance from other Plugin? [message #430909 is a reply to message #430903] Wed, 17 June 2009 08:09 Go to previous messageGo to next message
lancel lau is currently offline lancel lauFriend
Messages: 31
Registered: July 2009
Member
Hi

thanks for all your reply. in the eclipse bpel project there is a
Extension Point "Modellistener". by extending it in your plugin you can
get notification of changes in the bpel model instance. whatever text
editor or graphic editor. i just want to know if anything similar exists
in the wsdl model. or i can get the notification of changes in the wsdl
model instance by adding a adapter. this is two way i try to accomplish my
work. if they are dead end, i will try something else like change the
source code of wsdl model. sorry for my bad expressions.

regards
Re: How to get model instance from other Plugin? [message #430910 is a reply to message #430909] Wed, 17 June 2009 08:21 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Lancel,

Comments below.

lancel lau wrote:
> Hi
>
> thanks for all your reply. in the eclipse bpel project there is a
> Extension Point "Modellistener". by extending it in your plugin you
> can get notification of changes in the bpel model instance. whatever
> text editor or graphic editor. i just want to know if anything similar
> exists in the wsdl model. or i can get the notification of changes in
> the wsdl model instance by adding a adapter.
That's up to the WSDL model to provide if they so choose. EMF doesn't
generally enable injecting listeners into any particular model, because
any given model can be used for many different purposes, not just as the
target instance of some editors.
> this is two way i try to accomplish my work. if they are dead end, i
> will try something else like change the source code of wsdl model.
> sorry for my bad expressions.
That doesn't sound like a very promising approach...
>
> regards
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Teneo: Id collision on mysql
Next Topic:Reference from one model to another?
Goto Forum:
  


Current Time: Thu Apr 25 23:24:46 GMT 2024

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

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

Back to the top