Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BPMN Modeler » Listening to changes in the BPMN Diagram(Task name modifications do not send notifications to listener)
Listening to changes in the BPMN Diagram [message #652680] Sat, 05 February 2011 03:18 Go to next message
Nidhi  is currently offline Nidhi
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
Re: Listening to changes in the BPMN Diagram [message #754335 is a reply to message #652680] Wed, 02 November 2011 04:28 Go to previous message
karthick9686@gmail.com Missing name
Messages: 41
Registered: July 2011
Member
/**
* @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#activate()
*/
@Override
public void activate()
{
add the following code in your root editpart so that all your models get registered for model changes and correspondingly call your refrshvisuals


if( !isActive() )
{
super.activate();
getTarget().eAdapters().add( this );
}
}

/**
* @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#deactivate()
*/
@Override
public void deactivate()
{
if( isActive() )
{
super.deactivate();
getTarget().eAdapters().remove( this );
}
}
Previous Topic:Yaoqiang BPMN Editor
Next Topic:Removing a palette entry from Palette?
Goto Forum:
  


Current Time: Tue Sep 02 13:03:56 EDT 2014

Powered by FUDForum. Page generated in 0.02380 seconds