提交 e019048e 编写于 作者: S serge-rider

Entity editor fix: save metadata changes before nested editors

上级 92249632
......@@ -914,27 +914,29 @@ public class EntityEditor extends MultiPageDatabaseEditor
@Override
protected IStatus run(DBRProgressMonitor monitor) {
try {
{
final DBECommandContext commandContext = getCommandContext();
if (commandContext != null && commandContext.isDirty()) {
success = saveCommandContext(monitor);
} else {
success = true;
}
if (success) {
// Save nested editors
ProxyProgressMonitor proxyMonitor = new ProxyProgressMonitor(monitor);
for (IEditorPart editor : editorMap.values()) {
editor.doSave(proxyMonitor);
if (monitor.isCanceled()) {
success = false;
return Status.CANCEL_STATUS;
}
}
if (proxyMonitor.isCanceled()) {
success = false;
return Status.CANCEL_STATUS;
}
}
final DBECommandContext commandContext = getCommandContext();
if (commandContext != null && commandContext.isDirty()) {
success = saveCommandContext(monitor);
} else {
success = true;
}
return success ? Status.OK_STATUS : Status.CANCEL_STATUS;
} catch (Throwable e) {
success = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册