setEditDomain(new DefaultEditDomain(this));
this.part.attach
(
new Listener()
{
@Override
public void handle( final Event event )
{
if( event instanceof SelectionChangedEvent )
{
isSelectionFromPagePart = true;
selectParts(part.getSelections());
isSelectionFromPagePart = false;
}
else if ( event instanceof DiagramPageEvent )
{
handleDiagramPageEvent((DiagramPageEvent)event);
}
else if ( event instanceof DiagramDirectEditPartEvent )
{
selectAndDirectEditPart(((DiagramDirectEditPartEvent)event).part());
}
}
}
);
this.layoutPersistenceServiceListener = new Listener()
{
@Override
public void handle( final Event event )
{
if( event instanceof DiagramLayoutPersistenceService.DirtyStateEvent )
{
final DiagramLayoutPersistenceService.DirtyStateEvent evt = (DiagramLayoutPersistenceService.DirtyStateEvent) event;
if( evt.after() == true )
{
markEditorDirty();
}
else
{
markEditorClean();
}
}
}
};
this.layoutPersistenceService.attach(this.layoutPersistenceServiceListener);
this.diagramEditorPagePartListener = new Listener()
{
@Override
public void handle( final Event event )
{
if( event instanceof PageHeaderTextEvent )