From f2b7eea0178b54df2637aa30f40f68be94b7d23d Mon Sep 17 00:00:00 2001 From: Dmitry Batrak Date: Wed, 20 Dec 2017 10:31:11 +0300 Subject: [PATCH] IDEA-183951 IdeDocumentHistoryImpl concurrency issues --- .../openapi/fileEditor/impl/IdeDocumentHistoryImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/IdeDocumentHistoryImpl.java b/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/IdeDocumentHistoryImpl.java index a21e0706714d..03e26c82f8d1 100644 --- a/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/IdeDocumentHistoryImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/IdeDocumentHistoryImpl.java @@ -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); }