merged with Andrey's changes

This commit is contained in:
James Strachan
2012-03-29 16:40:44 +01:00
parent beedd36456
commit d76454ce08
2 changed files with 3 additions and 6 deletions
@@ -165,14 +165,10 @@ public class KotlinCompiler {
environment.setStubs(arguments.stubs);
if (arguments.docOutputDir != null) {
KDocLoader.install(arguments.docOutputDir, environment.getMyEnvironment());
}
// install any compiler plugins
List<CompilerPlugin> plugins = arguments.getCompilerPlugins();
if (plugins != null) {
environment.getMyEnvironment().getCompilerPlugins().addAll(plugins);
environment.getEnvironment().getCompilerPlugins().addAll(plugins);
}
if (arguments.stdlib != null) {
@@ -221,8 +221,9 @@ public class CompileSession {
List<CompilerPlugin> plugins = environment.getCompilerPlugins();
if (!module) {
if (plugins != null) {
CompilerPluginContext context = new CompilerPluginContext(project, bindingContext.getBindingContext(), getSourceFileNamespaces());
for (CompilerPlugin plugin : plugins) {
plugin.processFiles(bindingContext.getBindingContext(), getSourceFileNamespaces());
plugin.processFiles(context);
}
}
}