Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EContentAdapter on BPMN EMF model (Not getting notifications for modifying the name of Activity)
EContentAdapter on BPMN EMF model [message #652682] Sat, 05 February 2011 08:34 Go to next message
Nidhi  is currently offline Nidhi Friend
Messages: 92
Registered: December 2009
Member

Hi,

I am trying to integrate with the BPMN modeler. My domain model is also an EMF model.

I wanted to listen to changes in the BPMN EMF model and correspondingly make changes to my domain model.
I created my EContentAdapter to listen to these changes:

editor.getDiagram.getElement().eAdapters().add(myListener)

However whenever the name of an Activity (Task) is modified I dont get any notifications. I only get notifications on Add and Remove.

I am not sure why this is happening. What exactly am I missing?

Also I want to listen to changes on even those BPMN models (editor) that are already opened (from my previous run).
What would be the best way to achieve this.

Any help would be really appreciated.

Thanks a lot,
Nidhi

P.S: I was not sure whether to post this on the BPMN newsgrp or EMF newsgrp. Please do let me know in case this is not the right place.
Re: EContentAdapter on BPMN EMF model [message #652685 is a reply to message #652682] Sat, 05 February 2011 09:19 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
How does your EContentAdapter look like? Most errors i've seen is that
people are not not calling super when overloading the notify-method.

Tom

Am 05.02.11 09:34, schrieb Nidhi:
> Hi,
>
> I am trying to integrate with the BPMN modeler. My domain model is also
> an EMF model.
>
> I wanted to listen to changes in the BPMN EMF model and correspondingly
> make changes to my domain model.
> I created my EContentAdapter to listen to these changes:
>
> editor.getDiagram.getElement().eAdapters().add(myListener)
>
> However whenever the name of an Activity (Task) is modified I dont get
> any notifications. I only get notifications on Add and Remove.
>
> I am not sure why this is happening. What exactly am I missing?
>
> Also I want to listen to changes on even those BPMN models (editor) that
> are already opened (from my previous run). What would be the best way to
> achieve this.
>
> Any help would be really appreciated.
>
> Thanks a lot,
> Nidhi
>
> P.S: I was not sure whether to post this on the BPMN newsgrp or EMF
> newsgrp. Please do let me know in case this is not the right place.
Re: EContentAdapter on BPMN EMF model [message #652702 is a reply to message #652685] Sat, 05 February 2011 17:52 Go to previous messageGo to next message
Nidhi  is currently offline Nidhi Friend
Messages: 92
Registered: December 2009
Member

Hi Tom,

Awesome!!! this works.
I am just curious to know how did this worked!

For Add and Remove it works just fine, but for modifications it does not. Is it to do something with Add and Remove notifications coming from the parent. I need to dig deeper.

Thanks a lot Smile,
Nidhi
Re: EContentAdapter on BPMN EMF model [message #652704 is a reply to message #652702] Sat, 05 February 2011 18:06 Go to previous messageGo to next message
Nidhi  is currently offline Nidhi Friend
Messages: 92
Registered: December 2009
Member

Hi Tom,

Would you also have the answer to my second question:

Also I want to listen to changes on even those BPMN models (editor) that are already opened (from my previous run). What would be the best way to achieve this.

Thanks again,
Nidhi
Re: EContentAdapter on BPMN EMF model [message #652730 is a reply to message #652702] Sat, 05 February 2011 22:38 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
Nidhi,

If you don't call super, the adapter won't get attached to any child
objects.


Nidhi wrote:
> Hi Tom,
>
> Awesome!!! this works. I am just curious to know how did this worked!
>
> For Add and Remove it works just fine, but for modifications it does
> not. Is it to do something with Add and Remove notifications coming
> from the parent. I need to dig deeper.
>
> Thanks a lot :),
> Nidhi
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EContentAdapter on BPMN EMF model [message #652734 is a reply to message #652704] Sat, 05 February 2011 22:40 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
Nidhi,

You're asking how to access all the open PBMN editors to listen to
notifications from the models. There's an IPartListener that lets you
listen to things happening in the IWorkbench, but that's a general
Eclipse question best asked in the JFace or Platform newsgroup. Maybe
the editors themselves implement IEditingDomainProvider; it's best to
ask on the BPMN newsgroup about that.


Nidhi wrote:
> Hi Tom,
>
> Would you also have the answer to my second question:
>
> Also I want to listen to changes on even those BPMN models (editor)
> that are already opened (from my previous run). What would be the best
> way to achieve this.
> Thanks again,
> Nidhi
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EContentAdapter on BPMN EMF model [message #652751 is a reply to message #652734] Sun, 06 February 2011 10:46 Go to previous message
Nidhi  is currently offline Nidhi Friend
Messages: 92
Registered: December 2009
Member

Hi Ed,

Thanks for both the replies. As you advised I posted the second question to the BPMN group.
Though IPartListener is probably what I was looking for.

Best Regards,
Nidhi
Previous Topic:Not adding $ID$ to header
Next Topic:extend Ecore-Editor
Goto Forum:
  


Current Time: Tue Apr 16 21:03:20 GMT 2024

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

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

Back to the top