Skip to content

Commit

Permalink
Do not use write locking access when running in background (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcinVaadin authored Oct 23, 2024
1 parent 74a7e6f commit f1d15de
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.vaadin.plugin.actions
import com.intellij.debugger.DebuggerManagerEx
import com.intellij.debugger.ui.HotSwapUI
import com.intellij.ide.actionsOnSave.impl.ActionsOnSaveFileDocumentManagerListener
import com.intellij.openapi.application.WriteIntentReadAction
import com.intellij.openapi.application.ReadAction
import com.intellij.openapi.diagnostic.Logger
import com.intellij.openapi.editor.Document
import com.intellij.openapi.fileEditor.FileDocumentManager
Expand Down Expand Up @@ -43,7 +43,7 @@ class VaadinCompileOnSaveAction : ActionsOnSaveFileDocumentManagerListener.Actio
val session = DebuggerManagerEx.getInstanceEx(project).context.debuggerSession
if (session != null) {
LOG.info("${vfsFile.name} compiling...")
WriteIntentReadAction.run { HotSwapUI.getInstance(project).compileAndReload(session, vfsFile) }
ReadAction.run<Exception> { HotSwapUI.getInstance(project).compileAndReload(session, vfsFile) }
}
}
}
Expand Down

0 comments on commit f1d15de

Please sign in to comment.