package org.karaffe.compiler;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

public class CompilerContext {
    private String[] rawArgs;
    private List<String> outputs = new ArrayList<>();

    public String[] getRawArgs() {
        return rawArgs;
    }

    public void setRawArgs(String[] rawArgs) {
        this.rawArgs = Objects.requireNonNull(rawArgs);
    }

    public void addOutputs(String line) {
        this.outputs.add(Objects.requireNonNull(line));
    }

    public String getOutputText() {
        return String.join("\n", outputs);
    }
}

@@ -35,27 +35,129 @@
 ort 
-java.util.ArrayList
+org.karaffe.compiler.util.KaraffeSource;%0A%0Aimport java.nio.file.Path;%0Aimport java.util.ArrayList;%0Aimport java.util.HashMap
 ;%0Aim
@@ -173,24 +173,46 @@
 .util.List;%0A
+import java.util.Map;%0A
 import java.
@@ -289,58 +289,196 @@
 Args
-;%0A    private List%3CString%3E outputs = new ArrayList
+ = new String%5B0%5D;%0A    private List%3CKaraffeSource%3E sources = new ArrayList%3C%3E();%0A    private List%3CString%3E outputs = new ArrayList%3C%3E();%0A    private Map%3CPath, byte%5B%5D%3E outputFiles = new HashMap
 %3C%3E()
@@ -845,11 +845,658 @@
 );%0A    %7D
+%0A%0A    public boolean hasNoOutputText() %7B%0A        return this.outputs.isEmpty();%0A    %7D%0A%0A    public void addSource(KaraffeSource source) %7B%0A        this.sources.add(Objects.requireNonNull(source));%0A    %7D%0A%0A    public List%3CKaraffeSource%3E getSources() %7B%0A        return this.sources;%0A    %7D%0A%0A    public void addOutputFile(Path target, byte%5B%5D content) %7B%0A        this.outputFiles.put(Objects.requireNonNull(target), Objects.requireNonNull(content));%0A    %7D%0A%0A    public Map%3CPath, byte%5B%5D%3E getOutputFiles() %7B%0A        return outputFiles;%0A    %7D%0A%0A    public boolean requireShowUsage() %7B%0A        return this.rawArgs.length == 0 && this.getSources().isEmpty();%0A    %7D
 %0A%7D%0A

Add some methods to CompilerContext