Throwable: Synchronous execution on EDT on PsiFile.delete() why is this happening, how can I prevent this ?


Dear Support,

first of all happy new year to you ;) I wish you guys the same success like you had during all these years :)

my issue : 

on my plugin I try deleting a psiFile then add another psiFile with the same name (but of course with a different content) in the same psiDirectory (maybe there is a smarter way to replace a file ? )


It is woking but somehow I get following exception


java.lang.Throwable: Synchronous execution on EDT: svn --config-dir C:\Users\XXX\AppData\Roaming\Subversion info --depth empty E:\workspace_intellij\preview\XXX --xml --non-interactive
at com.intellij.openapi.diagnostic.Logger.error(
at com.intellij.execution.process.OSProcessHandler.checkEdtAndReadAction(
at com.intellij.execution.process.OSProcessHandler.waitFor(
at org.jetbrains.idea.svn.commandLine.CommandExecutor.waitFor(
at org.jetbrains.idea.svn.commandLine.CommandRuntime.runWithAuthenticationAttempt(
at org.jetbrains.idea.svn.api.BaseSvnClient.execute(
at org.jetbrains.idea.svn.api.BaseSvnClient.execute(
at org.jetbrains.idea.svn.api.BaseSvnClient.execute(
at org.jetbrains.idea.svn.SvnVcs.getInfo(
at org.jetbrains.idea.svn.SvnVcs.getInfo(
at org.jetbrains.idea.svn.SvnUtil.isSvnVersioned(
at org.jetbrains.idea.svn.SvnFileSystemListener.delete(
at com.intellij.openapi.vfs.impl.local.LocalFileSystemBase.auxDelete(
at com.intellij.openapi.vfs.impl.local.LocalFileSystemBase.deleteFile(
at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.deleteFile(
at com.intellij.openapi.vfs.newvfs.impl.VirtualFileSystemEntry.delete(
at com.intellij.psi.impl.file.PsiFileImplUtil.doDelete(
at com.intellij.psi.impl.source.PsiFileImpl.delete(
at com.swissas.dialog.DtoGeneratorForm.saveFiles(



here a small portion of my code 

PsiFile existingFile = dtoDir.findFile(this.dtoFile.getName());
if (existingFile != null) {
existingFile.delete(); //this line seems to be the source of the exception



any advise how to get rid of the exception ?
Thanks in advance for your help.

1 comment
Comment actions Permalink

Please try com.intellij.openapi.editor.Document#replaceString on the Document from the original psiFile for replacing text directly.


Please sign in to leave a comment.