use of org.jkiss.dbeaver.model.virtual.DBVObject in project dbeaver by serge-rider.
the class ERDEditorEmbedded method doSave.
@Override
public void doSave(IProgressMonitor monitor) {
try {
// Save in virtual model as entity property.
DBVObject vObject = this.getVirtualObject();
if (vObject == null) {
return;
}
Map<String, Object> diagramStateMap = new LinkedHashMap<>();
vObject.setProperty(PROP_DIAGRAM_STATE, diagramStateMap);
String diagramState = DiagramLoader.serializeDiagram(RuntimeUtils.makeMonitor(monitor), getDiagramPart(), getDiagram(), false, true);
diagramStateMap.put(PROPS_DIAGRAM_SERIALIZED, diagramState);
vObject.persistConfiguration();
getCommandStack().markSaveLocation();
} catch (Exception e) {
log.error("Error saving diagram", e);
}
updateToolbarActions();
}
Aggregations