@Override
    public int promptToSaveOnClose()
    {
        List<String> changedSubEditors = new ArrayList<>();
        final DBECommandContext commandContext = getCommandContext();
        if (commandContext != null && commandContext.isDirty()) {
            changedSubEditors.add(UINavigatorMessages.registry_entity_editor_descriptor_name);
        }

        for (IEditorPart editor : editorMap.values()) {
            if (editor.isDirty()) {

                EntityEditorDescriptor editorDescriptor = EntityEditorsRegistry.getInstance().getEntityEditor(editor);
                if (editorDescriptor != null) {
                    changedSubEditors.add(editorDescriptor.getName());
                }
            }
        }

        String subEditorsString = changedSubEditors.isEmpty() ? "" : "(" + String.join(", ", changedSubEditors) + ")";
        final int result = ConfirmationDialog.confirmAction(
            getSite().getShell(),
            NavigatorPreferences.CONFIRM_ENTITY_EDIT_CLOSE,
            ConfirmationDialog.QUESTION_WITH_CANCEL,
            getEditorInput().getNavigatorNode().getNodeDisplayName(),
            subEditorsString);
        if (result == IDialogConstants.YES_ID) {
//            getWorkbenchPart().getSite().getPage().saveEditor(this, false);
            return ISaveablePart2.YES;
        } else if (result == IDialogConstants.NO_ID) {
            return ISaveablePart2.NO;
        } else {
            return ISaveablePart2.CANCEL;
        }
    }
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