Skip to content
Snippets Groups Projects
Commit 7232ef34 authored by Denis Zhidkikh's avatar Denis Zhidkikh :horse:
Browse files

IDEA: Fix JUnit dependency not being added in time

parent fa370302
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,6 @@ import com.intellij.psi.PsiManager ...@@ -20,7 +20,6 @@ import com.intellij.psi.PsiManager
import fi.jyu.intellij.comtest.common.util.Notifier import fi.jyu.intellij.comtest.common.util.Notifier
import fi.jyu.intellij.comtest.common.util.runWithRefresh import fi.jyu.intellij.comtest.common.util.runWithRefresh
import fi.jyu.intellij.comtest.idea.ComTestRunner import fi.jyu.intellij.comtest.idea.ComTestRunner
import org.jetbrains.concurrency.await
/** /**
* Action to run ComTest on the currently selected/open Java file. * Action to run ComTest on the currently selected/open Java file.
...@@ -46,10 +45,8 @@ abstract class ComTestGenerateJavaFileActionBase : AnAction() { ...@@ -46,10 +45,8 @@ abstract class ComTestGenerateJavaFileActionBase : AnAction() {
false false
} }
if (!hasJUnit) { if (!hasJUnit) {
suspend { JavaProjectModelModificationService.getInstance(proj)
JavaProjectModelModificationService.getInstance(proj) .addDependency(fileModule, JUnitExternalLibraryDescriptor.JUNIT4)
.addDependency(fileModule, JUnitExternalLibraryDescriptor.JUNIT4).await()
}
} }
return true return true
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment