final Project project = ActionUtil.getProject(e);
if (project != null) {
new BackgroundTask(project, "Loading database source code", false, true) {
@Override
protected void execute(@NotNull ProgressIndicator progressIndicator) throws InterruptedException {
SourceCodeFile virtualFile = getSourcecodeFile(e);
Editor editor = getEditor(e);
if (virtualFile != null && editor != null) {
String content = editor.getDocument().getText();
virtualFile.setContent(content);
DBSchemaObject object = virtualFile.getObject();
if (object != null) {
try {
SourceCodeManager sourceCodeManager = SourceCodeManager.getInstance(project);
String referenceText = sourceCodeManager.loadSourceCodeFromDatabase(object, virtualFile.getContentType());
if (!progressIndicator.isCanceled()) {
openDiffWindow(e, referenceText, "Database version", "Local version vs. database version");
}
} catch (SQLException e1) {