private void showSourceDiffDialog(final String databaseContent, final SourceCodeFile virtualFile, final Editor editor) {
new SimpleLaterInvocator() {
public void execute() {
DiffRequestFactory diffRequestFactory = new DiffRequestFactoryImpl();
MergeRequest mergeRequest = diffRequestFactory.createMergeRequest(
databaseContent,
virtualFile.getContent(),
virtualFile.getLastSavedContent(),
virtualFile,
virtualFile.getProject(),
ActionButtonPresentation.APPLY,
ActionButtonPresentation.CANCEL_WITH_PROMPT);
mergeRequest.setVersionTitles(new String[]{"Database version", "Merge result", "Your version"});
final DBSchemaObject object = virtualFile.getObject();
mergeRequest.setWindowTitle("Version conflict resolution for " + object.getQualifiedNameWithType());
DiffManager.getInstance().getDiffTool().show(mergeRequest);
int result = mergeRequest.getResult();
if (result == 0) {
doUpdateSourceToDatabase(object, virtualFile, editor);
//sourceCodeEditor.afterSave();
} else if (result == 1) {
new WriteActionRunner() {