diff options
author | michelou <michelou@epfl.ch> | 2009-03-10 11:39:04 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2009-03-10 11:39:04 +0000 |
commit | 40f8fa94026d482f8318481bb64ae0245a39acbc (patch) | |
tree | f5f6cd4423ee49f9c77f5222cb6ae4de62fbc461 /src/compiler/scala/tools/nsc/plugins | |
parent | 5e2dd3850dd6da531b4e9ba7075081aae65a1502 (diff) | |
download | scala-40f8fa94026d482f8318481bb64ae0245a39acbc.tar.gz scala-40f8fa94026d482f8318481bb64ae0245a39acbc.tar.bz2 scala-40f8fa94026d482f8318481bb64ae0245a39acbc.zip |
removed deprecated warning, updated svn props, ...
removed deprecated warning, updated svn props, cleaned up code
Diffstat (limited to 'src/compiler/scala/tools/nsc/plugins')
-rw-r--r-- | src/compiler/scala/tools/nsc/plugins/Plugin.scala | 6 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/plugins/Plugins.scala | 11 |
2 files changed, 6 insertions, 11 deletions
diff --git a/src/compiler/scala/tools/nsc/plugins/Plugin.scala b/src/compiler/scala/tools/nsc/plugins/Plugin.scala index 4ebc83daa2..bce4876c41 100644 --- a/src/compiler/scala/tools/nsc/plugins/Plugin.scala +++ b/src/compiler/scala/tools/nsc/plugins/Plugin.scala @@ -81,7 +81,7 @@ object Plugin { val jar = new JarFile(jarfile) try { val ent = jar.getEntry("scalac-plugin.xml") - if(ent == null) return None + if (ent == null) return None val inBytes = jar.getInputStream(ent) val packXML = XML.load(inBytes) @@ -92,7 +92,7 @@ object Plugin { jar.close() } } catch { - case _:ZipException => None + case _: ZipException => None } } @@ -132,7 +132,7 @@ object Plugin { dir <- dirs if dir.isDirectory entries = dir.listFiles if entries ne null - entry <- entries.toList.sort((f1, f2) => f1.getName <= f2.getName) + entry <- entries.toList.sort(_.getName <= _.getName) if entry.toString.toLowerCase endsWith ".jar" pdesc <- loadDescription(entry) if !(ignoring contains pdesc.name) diff --git a/src/compiler/scala/tools/nsc/plugins/Plugins.scala b/src/compiler/scala/tools/nsc/plugins/Plugins.scala index cd457dfec1..812bfd7ce8 100644 --- a/src/compiler/scala/tools/nsc/plugins/Plugins.scala +++ b/src/compiler/scala/tools/nsc/plugins/Plugins.scala @@ -20,7 +20,8 @@ trait Plugins { self: Global => /** Load a rough list of the plugins. For speed, it * does not instantiate a compiler run. Therefore it cannot * test for same-named phases or other problems that are - * filtered from the final list of plugins. */ + * filtered from the final list of plugins. + */ protected def loadRoughPluginsList(): List[Plugin] = { val jars = settings.plugin.value.map(new File(_)) val dirs = @@ -41,7 +42,6 @@ trait Plugins { self: Global => roughPluginsListCache.get } - /** Load all available plugins. Skips plugins that * either have the same name as another one, or which * define a phase name that another one does. @@ -117,7 +117,6 @@ trait Plugins { self: Global => plugs } - private var pluginsCache: Option[List[Plugin]] = None def plugins: List[Plugin] = { @@ -126,7 +125,6 @@ trait Plugins { self: Global => pluginsCache.get } - /** A description of all the plugins that are loaded */ def pluginDescriptions: String = { val messages = @@ -140,10 +138,7 @@ trait Plugins { self: Global => * @see phasesSet */ protected def computePluginPhases() { - - var plugPhases = plugins.flatMap(_.components) - - // Add all phases supplied by plugins to the phasesSet + val plugPhases = plugins.flatMap(_.components) for (pPhase <- plugPhases) { phasesSet += pPhase } |