return componentSet;
}
private void write(SortedMap<String, List<ArtemisTypeMapping>> mappedSystems, ColumnIndexMapping columnIndices) {
Theme theme = new Theme();
Chunk chunk = theme.makeChunk("matrix");
List<ArtemisTypeMapping> mapping = new ArrayList<ArtemisTypeMapping>();
for (Entry<String,List<ArtemisTypeMapping>> entry : mappedSystems.entrySet()) {
mapping.add(new ArtemisTypeMapping(entry.getKey()));
mapping.addAll(entry.getValue());
}
chunk.set("longestName", findLongestClassName(mappedSystems).replaceAll(".", "_") + "______");
chunk.set("systems", mapping);
chunk.set("headersComponents", columnIndices.componentColumns);
chunk.set("componentCount", columnIndices.componentColumns.size());
chunk.set("headersManagers", columnIndices.managerColumns);
chunk.set("managerCount", columnIndices.managerColumns.size());
chunk.set("headersSystems", columnIndices.systemColumns);
chunk.set("systemCount", columnIndices.systemColumns.size());
chunk.set("project", projectName);
BufferedWriter out = null;
try {
out = new BufferedWriter(new FileWriter(output));
chunk.render(out);
} catch (IOException e) {
e.printStackTrace();
} finally {
if (out != null) try {
out.close();