use of org.eclipse.sapphire.ui.diagram.editor.DiagramNodeBounds in project liferay-ide by liferay.
the class WorkflowDefinitionLayoutPersistenceService method _save.
private void _save() {
_refreshPersistedPartsCache();
/*
* For nodes that are placed using default node positions and connection
* bend points that are calculated using connection router, we don't
* modify the corresponding model properties in order to allow "revert"
* in source editor to work correctly. So we need to do an explicit save
* of the node bounds and connection bend points here.
*/
_removeWorkflowNodeListeners();
_removeBendpointListeners();
for (DiagramNodePart nodePart : _part().getNodes()) {
Element modelElement = nodePart.getLocalModelElement();
WorkflowNode workflowNode = (WorkflowNode) modelElement;
if (!workflowNode.disposed()) {
_writeWorkflowNodeBoundsToMetaData(workflowNode, nodePart);
DiagramNodeBounds nodePartBounds = nodePart.getNodeBounds();
nodePartBounds.setAutoLayout(false);
nodePart.setNodeBounds(nodePartBounds);
}
}
for (DiagramConnectionPart connPart : _part().getConnections()) {
Element modelElement = connPart.getLocalModelElement();
Transition transition = (Transition) modelElement;
if (!transition.disposed()) {
_writeTransitionBendPoints(transition, connPart);
}
}
_addWorkflowNodeListeners();
_addBendpointListeners();
}
Aggregations