diff options
Diffstat (limited to 'docs/examples/plugintemplate/src/plugintemplate/standalone/Main.scala')
-rw-r--r-- | docs/examples/plugintemplate/src/plugintemplate/standalone/Main.scala | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/docs/examples/plugintemplate/src/plugintemplate/standalone/Main.scala b/docs/examples/plugintemplate/src/plugintemplate/standalone/Main.scala deleted file mode 100644 index 0bfcbf53c7..0000000000 --- a/docs/examples/plugintemplate/src/plugintemplate/standalone/Main.scala +++ /dev/null @@ -1,44 +0,0 @@ -package plugintemplate.standalone - -import plugintemplate.PluginProperties -import scala.tools.nsc.CompilerCommand -import scala.tools.nsc.Settings - -/** An object for running the plugin as standalone application. - * - * @todo: print, parse and apply plugin options !!! - * ideally re-use the TemplatePlugin (-> runsAfter, optionsHelp, - * processOptions, components, annotationChecker) instead of - * duplicating it here and in PluginRunner. - */ -object Main { - def main(args: Array[String]) { - val settings = new Settings - - val command = new CompilerCommand(args.toList, settings) { - /** The command name that will be printed in the usage message. - * This is automatically set to the value of 'plugin.commandname' in the - * file build.properties. - */ - override val cmdName = PluginProperties.pluginCommand - } - - if (!command.ok) - return() - - /** The version number of this plugin is read from the properties file - */ - if (settings.version.value) { - println(command.cmdName +" version "+ PluginProperties.versionString) - return() - } - if (settings.help.value) { - println(command.usageMsg) - return() - } - - val runner = new PluginRunner(settings) - val run = new runner.Run - run.compile(command.files) - } -} |