/**
   * 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);
  }
 /**
  * Open the internal frame for the given {@link BuildOutput} (or bring it to the front, if it is
  * already open)
  *
  * @param buildOutput The {@link BuildOutput}
  */
 private void openBuildOutputFrame(BuildOutput buildOutput) {
   JInternalFrame buildOutputFrame = openedBuildOutputFrames.get(buildOutput);
   if (buildOutputFrame != null) {
     buildOutputFrame.toFront();
     return;
   }
   buildOutputFrame = new JInternalFrame(buildOutput.getProjectName(), true, true, true, true);
   openedBuildOutputFrames.put(buildOutput, buildOutputFrame);
   buildOutputFrame.addInternalFrameListener(
       new InternalFrameAdapter() {
         @Override
         public void internalFrameClosed(InternalFrameEvent e) {
           openedBuildOutputFrames.remove(buildOutput);
         }
       });
   buildOutputFrame.getContentPane().add(new BuildOutputPanel(buildOutput));
   desktopPane.add(buildOutputFrame);
   buildOutputFrame.setLocation(0, 0);
   buildOutputFrame.setSize(desktopPane.getSize());
   buildOutputFrame.setVisible(true);
 }