/** * Set the {@link BuildOutput}s that should be shown in this panel. A copy of the given collection * will be stored internally. If the collection is <code>null</code>, then an empty list will be * stored. * * @param buildOutputs The {@link BuildOutput}s */ void setBuildOutputs(Collection<? extends BuildOutput> buildOutputs) { if (buildOutputs == null) { this.buildOutputs = Collections.emptyList(); } else { this.buildOutputs = new ArrayList<BuildOutput>(buildOutputs); } projectsTableModel.setRowCount(0); for (BuildOutput buildOutput : buildOutputs) { String projectName = buildOutput.getProjectName(); boolean skipped = buildOutput.isSkippedBuild(); List<CompilerMessage> compilerWarnings = buildOutput.getCompilerWarnings(); int numCompilerWarnings = compilerWarnings.size(); List<CompilerMessage> compilerErrors = buildOutput.getCompilerErrors(); int numCompilerErrors = compilerErrors.size(); List<LinkerMessage> linkerWarnings = buildOutput.getLinkerWarnings(); int numLinkerWarnings = linkerWarnings.size(); List<LinkerMessage> linkerErrors = buildOutput.getLinkerErrors(); int numLinkerErrors = linkerErrors.size(); boolean hasIncludes = !buildOutput.getIncludes().isEmpty(); projectsTableModel.addRow( new Object[] { projectName, skipped, numCompilerWarnings, numCompilerErrors, numLinkerWarnings, numLinkerErrors, hasIncludes }); } JTables.adjustColumnWidths(projectsTable, Short.MAX_VALUE); }