From 72152b011120e8ffd977d2debb8482b7ebe7b754 Mon Sep 17 00:00:00 2001 From: Philippe Suter <philippe.suter@gmail.com> Date: Mon, 4 Jul 2011 17:44:56 +0000 Subject: [PATCH] more --- plugintest/src/main/resources/scalac-plugin.xml | 4 ++++ plugintest/src/main/scala/plugintest/Plugin.scala | 11 ++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 plugintest/src/main/resources/scalac-plugin.xml diff --git a/plugintest/src/main/resources/scalac-plugin.xml b/plugintest/src/main/resources/scalac-plugin.xml new file mode 100644 index 000000000..ffaddb558 --- /dev/null +++ b/plugintest/src/main/resources/scalac-plugin.xml @@ -0,0 +1,4 @@ +<plugin> + <name>plugintest</name> + <classname>plugintest.TestPlugin</classname> +</plugin> diff --git a/plugintest/src/main/scala/plugintest/Plugin.scala b/plugintest/src/main/scala/plugintest/Plugin.scala index 0df83947c..a6ac054ae 100644 --- a/plugintest/src/main/scala/plugintest/Plugin.scala +++ b/plugintest/src/main/scala/plugintest/Plugin.scala @@ -13,7 +13,7 @@ class TestPlugin(val global : Global) extends Plugin { override val optionsHelp : Option[String] = None val components = List[PluginComponent](new Component(global)) - val descriptions : List[String]("tests with ``MyAny''") + val descriptions : List[String] = List("tests with ``MyAny''") } class Component(val global : Global) extends PluginComponent { @@ -25,10 +25,11 @@ class Component(val global : Global) extends PluginComponent { val phaseName = "test!" def newPhase(previous : Phase) = new PluginPhase(previous) -} -class PluginPhase(previous : Phase) extends StdPhase(previous) { - def apply(unit : CompilationUnit) : Unit = { - println("Phase ran !") + class PluginPhase(previous : Phase) extends StdPhase(previous) { + def apply(unit : CompilationUnit) : Unit = { + println("Phase ran !") + } } } + -- GitLab