summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/plugins/PluginComponent.scala
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2013-07-25 19:52:15 -0700
committerSom Snytt <som.snytt@gmail.com>2013-08-21 17:03:03 -0700
commitf3731f9ace5d3d5e213ea786fe0027ea66c5358b (patch)
treefb068e41ba1e2aabf0cff642e1d3b47590ef4d12 /src/compiler/scala/tools/nsc/plugins/PluginComponent.scala
parent79d619127bb84ef858476252ace53b730d2e38cd (diff)
downloadscala-f3731f9ace5d3d5e213ea786fe0027ea66c5358b.tar.gz
scala-f3731f9ace5d3d5e213ea786fe0027ea66c5358b.tar.bz2
scala-f3731f9ace5d3d5e213ea786fe0027ea66c5358b.zip
SI-7622 Plugins can be not enabled
Plugins can interrogate options and declare themselves not enabled. The plugin itself can return false from its init if the options do not compute. A plugin phase component can declare itself not enabled, same as an internal phase. No one exploits this facility at this commit.
Diffstat (limited to 'src/compiler/scala/tools/nsc/plugins/PluginComponent.scala')
-rw-r--r--src/compiler/scala/tools/nsc/plugins/PluginComponent.scala6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/plugins/PluginComponent.scala b/src/compiler/scala/tools/nsc/plugins/PluginComponent.scala
index c6e1af7ea4..a6df08c331 100644
--- a/src/compiler/scala/tools/nsc/plugins/PluginComponent.scala
+++ b/src/compiler/scala/tools/nsc/plugins/PluginComponent.scala
@@ -15,12 +15,10 @@ package plugins
*/
abstract class PluginComponent extends SubComponent {
- /** Internal flag to tell external from internal phases */
+ /** By definition, plugin phases are externally provided. */
final override val internal = false
- /** Phases supplied by plugins should not have to supply the
- * runsRightAfter constraint, but can override it.
- */
+ /** Only plugins are granted a reprieve from specifying whether they follow. */
val runsRightAfter: Option[String] = None
/** Useful for -Xshow-phases. */