public int showChanges(boolean allowSave)
    {
        DBECommandContext commandContext = getCommandContext();
        if (commandContext == null) {
            return IDialogConstants.CANCEL_ID;
        }
        Collection<? extends DBECommand> commands = commandContext.getFinalCommands();
        if (CommonUtils.isEmpty(commands)) {
            return IDialogConstants.IGNORE_ID;
        }
        StringBuilder script = new StringBuilder();

        try {
            saveInProgress = true;
            UIUtils.runInProgressService(monitor -> {
                monitor.beginTask("Generate SQL script", commands.size());
                Map<String, Object> validateOptions = new HashMap<>();
                for (DBECommand command : commands) {
                    monitor.subTask(command.getTitle());
                    try {
                        command.validateCommand(monitor, validateOptions);
                    } catch (final DBException e) {
                        throw new InvocationTargetException(e);
                    }
                    Map<String, Object> options = new HashMap<>();
                    options.put(DBPScriptObject.OPTION_OBJECT_SAVE, true);

                    DBPDataSource dataSource = getDatabaseObject().getDataSource();
                    try {
                        DBEPersistAction[] persistActions = command.getPersistActions(monitor, getExecutionContext(), options);
                        script.append(SQLUtils.generateScript(
                            dataSource,
                            persistActions,
                            false));
                    } catch (DBException e) {
                        throw new InvocationTargetException(e);
                    }
                    monitor.worked(1);
                }
                monitor.done();
            });
        } catch (InterruptedException e) {
            return IDialogConstants.CANCEL_ID;
        } catch (InvocationTargetException e) {
            log.error(e);
            DBWorkbench.getPlatformUI().showError("Script generate error", "Couldn't generate alter script", e.getTargetException());
            return IDialogConstants.CANCEL_ID;
        } finally {
            saveInProgress = false;
        }

        if (script.length() == 0) {
            return IDialogConstants.PROCEED_ID;
        }
        ChangesPreviewer changesPreviewer = new ChangesPreviewer(script, allowSave);
        UIUtils.syncExec(changesPreviewer);
        return changesPreviewer.getResult();
    }
Saves data in all nested editors
@param monitor progress monitor
plugins/org.jkiss.dbeaver.ui.navigator/src/org/jkiss/dbeaver/ui/editors/entity/EntityEditor.java