IDEA-183951 IdeDocumentHistoryImpl concurrency issues

This commit is contained in:
Dmitry Batrak
2017-12-20 10:31:11 +03:00
parent dc103dc0b4
commit f2b7eea017
@@ -1,4 +1,6 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
/*
* Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
*/
package com.intellij.openapi.fileEditor.impl;
import com.intellij.ide.ui.UISettings;
@@ -180,6 +182,7 @@ public class IdeDocumentHistoryImpl extends IdeDocumentHistory implements Projec
Document document = e.getDocument();
final VirtualFile file = getFileDocumentManager().getFile(document);
if (file != null && !(file instanceof LightVirtualFile) && !ApplicationManager.getApplication().hasWriteAction(ExternalChangeAction.class)) {
if (!ApplicationManager.getApplication().isDispatchThread()) LOG.error("Document update for physical file not in EDT: " + file);
myCurrentCommandHasChanges = true;
myChangedFilesInCurrentCommand.add(file);
}