use of org.eclipse.sapphire.ui.diagram.editor.DiagramNodeAddEvent in project liferay-ide by liferay.
the class WorkflowDefinitionLayoutPersistenceService method _handleDiagramNodeEvent.
private void _handleDiagramNodeEvent(DiagramNodeEvent event) {
DiagramNodePart nodePart = event.part();
if (event instanceof DiagramNodeAddEvent) {
_read(nodePart);
} else if (event instanceof DiagramNodeDeleteEvent) {
_refreshDirtyState();
} else if (event instanceof DiagramNodeMoveEvent) {
DiagramNodeBounds nodeBounds = nodePart.getNodeBounds();
if (nodeBounds.isAutoLayout()) {
/*
* need to add the node bounds to the persistence cache so that
* "revert" could work
*/
_addNodeToPersistenceCache(nodePart);
_refreshDirtyState();
} else if (!nodeBounds.isDefaultPosition()) {
DiagramNodePart diagramNodePart = event.part();
_write(diagramNodePart);
}
}
}
Aggregations