kframework/k — pull request #385 by osa1 (2014-04-16 09:04:35+00:00)
Title: use AnsiConsole.systemInstall and remove AnsiConsole.out calls

As discussed at #379 , I removed `AnsiConsole.out` calls and instead called `AnsiConsole.systemInstall` at K entry point. This should ensure that colorful printing will work on all platforms without any other changes.(e.g. `System.out....` calls should just handle colorful printing throughout the entire framework)

Note that this patch assumes that K tools are only called using `k3.jar`(`org.kframework.main.Main`) and not by using `main` methods of some other classes(like `krun.main`, `ktest.main` etc.) Calling other `main` methods bypasses `AnsiConsole.systemInstall` call and thus prints color codes even when printing to non-ANSI terminals.

After this patch, `AnsiConsole` will only be used in entry point of the framework:

```
➜ k git:(jansi_refactoring) ack --java AnsiConsole
src/javasources/KTool/src/org/kframework/main/Main.java
8:import org.fusesource.jansi.AnsiConsole;
42: AnsiConsole.systemInstall();
➜ k git:(jansi_refactoring)
```