Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Changed the Scala library/compiler version check

It know checks at the major/minor level, not lower. And logs an error if
it cannot find a match.

Fix #1000793
(cherry picked from commit 8112072)
  • Loading branch information...
commit 06d2a99fb6810e28dafa06b6b04007ec90f47569 1 parent cd52824
Luc Bourlier authored December 09, 2011
7  org.scala-ide.sdt.core/src/scala/tools/eclipse/ScalaPlugin.scala
@@ -131,10 +131,11 @@ class ScalaPlugin extends AbstractUIPlugin with IResourceChangeListener with IEl
131 131
   //lazy val sbtScalaCompiler = pathInBundle(sbtCompilerBundle, "/lib/scala-" + shortScalaVer + "/lib/scala-compiler.jar")
132 132
   
133 133
   val scalaLibBundle = {
134  
-    val bundles = Option(Platform.getBundles(ScalaPlugin.plugin.libraryPluginId, scalaCompilerBundleVersion.toString())).getOrElse(Array[Bundle]())
  134
+    // all library bundles
  135
+    val bundles = Option(Platform.getBundles(ScalaPlugin.plugin.libraryPluginId, null)).getOrElse(Array[Bundle]())
135 136
     logger.debug("[scalaLibBundle] Found %d bundles: %s".format(bundles.size, bundles.toList.mkString(", ")))
136  
-    bundles.find(_.getVersion() == scalaCompilerBundleVersion).getOrElse {
137  
-      logger.warning("Couldnt find a match for %s in %s. Using default.".format(scalaCompilerBundleVersion, bundles.toList.mkString(", ")))
  137
+    bundles.find(b => b.getVersion().getMajor() == scalaCompilerBundleVersion.getMajor() && b.getVersion().getMinor() == scalaCompilerBundleVersion.getMinor()).getOrElse {
  138
+      logger.error("Could not find a match for %s in %s. Using default.".format(scalaCompilerBundleVersion, bundles.toList.mkString(", ")), null)
138 139
       Platform.getBundle(ScalaPlugin.plugin.libraryPluginId)
139 140
     }
140 141
   }

0 notes on commit 06d2a99

Please sign in to comment.
Something went wrong with that request. Please try again.