diff --git a/compiler/cli/src/org/jetbrains/jet/cli/js/K2JSCompiler.java b/compiler/cli/src/org/jetbrains/jet/cli/js/K2JSCompiler.java index 1218a626cbe..7e46e586e3a 100644 --- a/compiler/cli/src/org/jetbrains/jet/cli/js/K2JSCompiler.java +++ b/compiler/cli/src/org/jetbrains/jet/cli/js/K2JSCompiler.java @@ -89,13 +89,7 @@ public class K2JSCompiler extends CLICompiler fileNames = Iterables.transform(environmentForJS.getSourceFiles(), new Function() { - @Override - public String apply(@Nullable JetFile file) { - return file.getName(); - } - }); - System.out.println("Compiling source files: " + Joiner.on(", ").join(fileNames)); + reportCompiledSourcesList(messageCollector, environmentForJS); } String outputFile = arguments.outputFile; @@ -109,6 +103,19 @@ public class K2JSCompiler extends CLICompiler fileNames = Iterables.transform(environmentForJS.getSourceFiles(), new Function() { + @Override + public String apply(@Nullable JetFile file) { + assert file != null; + return file.getName(); + } + }); + messageCollector.report(CompilerMessageSeverity.LOGGING, "Compiling source files: " + Joiner.on(", ").join(fileNames), + CompilerMessageLocation.NO_LOCATION); + } + @NotNull private static ExitCode translateAndGenerateOutputFile(@NotNull MainCallParameters mainCall, @NotNull PrintingMessageCollector messageCollector, @@ -121,7 +128,6 @@ public class K2JSCompiler extends CLICompiler files, + public static void translateWithMainCallParametersAndSaveToFile(@NotNull MainCallParameters mainCall, + @NotNull List files, @NotNull String outputPath, - @NotNull Config config) throws Exception { - translateWithMainCallParametersAndSaveToFile(MainCallParameters.mainWithoutArguments(), files, outputPath, config); - } - - public static void translateWithMainCallParametersAndSaveToFile(MainCallParameters mainCall, - List files, - String outputPath, - Config config) throws TranslationException, IOException { + @NotNull Config config) throws TranslationException, IOException { K2JSTranslator translator = new K2JSTranslator(config); String programCode = translator.generateProgramCode(files, mainCall) + "\n"; writeCodeToFile(outputPath, programCode);