From 7aed8216c5f82937a39c4d197afe7efa46fb0a86 Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 5 Feb 2015 12:36:42 +0100 Subject: [PATCH] SchemesManagerImpl write action: don't disturb daemon --- .../openapi/options/SchemesManagerImpl.java | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/options/SchemesManagerImpl.java b/platform/platform-impl/src/com/intellij/openapi/options/SchemesManagerImpl.java index beb2a87ff11a..deab5db8adca 100644 --- a/platform/platform-impl/src/com/intellij/openapi/options/SchemesManagerImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/options/SchemesManagerImpl.java @@ -561,20 +561,19 @@ public class SchemesManagerImpl() { - @Override - public Object compute() throws IOException { - OutputStream out = finalFile.getOutputStream(this); - try { - byteOut.writeTo(out); - } - finally { - out.close(); - } - return null; + AccessToken token = ApplicationManager.getApplication().acquireWriteActionLock(DocumentRunnable.IgnoreDocumentRunnable.class); + try { + OutputStream out = file.getOutputStream(this); + try { + byteOut.writeTo(out); } - }); + finally { + out.close(); + } + } + finally { + token.finish(); + } } else if (renamed) { myFilesToDelete.add(currentFileNameWithoutExtension);