From a29ebefeeddb9a1b0853ed6d668e3c1d9a306331 Mon Sep 17 00:00:00 2001 From: Iulian Dragos Date: Tue, 10 Mar 2015 17:32:45 -0700 Subject: [PATCH] Closes #47 --- .../scalatest/launching/ScalaTestLaunchShortcut.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/org.scala-ide.sdt.scalatest/src/scala/tools/eclipse/scalatest/launching/ScalaTestLaunchShortcut.scala b/org.scala-ide.sdt.scalatest/src/scala/tools/eclipse/scalatest/launching/ScalaTestLaunchShortcut.scala index f90f017..ef8745f 100644 --- a/org.scala-ide.sdt.scalatest/src/scala/tools/eclipse/scalatest/launching/ScalaTestLaunchShortcut.scala +++ b/org.scala-ide.sdt.scalatest/src/scala/tools/eclipse/scalatest/launching/ScalaTestLaunchShortcut.scala @@ -76,6 +76,7 @@ import scala.reflect.NameTransformer import org.scalaide.core.compiler.IScalaPresentationCompiler import org.scalaide.core.compiler.IScalaPresentationCompiler.Implicits._ import scala.reflect.internal.util.BatchSourceFile +import scala.concurrent.duration._ class ScalaTestFileLaunchShortcut extends ILaunchShortcut { @@ -203,7 +204,9 @@ object ScalaTestLaunchShortcut { case Some(_) => true case None => - classDef.symbol.annotations.exists(aInfo => aInfo.atp.toString == "org.scalatest.WrapWith") + compiler.asyncExec { + classDef.symbol.annotations.exists(aInfo => aInfo.atp.toString == "org.scalatest.WrapWith") + }.getOrElse(false)(500.millis) } case _ => false } match {