private void showAnalysis() {
List<UnitTable.Parameters> params = new ArrayList<>();
FormationType ft = FormationType.getFormationType(getFormation());
Parameters p = new UnitTable.Parameters(getFaction(),
getUnitType(), ratGenYear, (String)cbRating.getSelectedItem(),
IntStream.rangeClosed(ft.getMinWeightClass(), ft.getMaxWeightClass())
.mapToObj(Integer::valueOf).collect(Collectors.toList()),
ModelRecord.NETWORK_NONE, EnumSet.noneOf(EntityMovementMode.class),
ft.getMissionRoles(),
2, getFaction());
params.add(p);
int numUnits = getNumUnits();
if (getOtherUnitType() >= 0) {
p = p.copy();
p.setUnitType(getOtherUnitType());
params.add(p);
numUnits += numOtherUnits();
}
AnalyzeFormationDialog afd = new AnalyzeFormationDialog(null,
generatedUnits,
FormationType.getFormationType(getFormation()),
params, numUnits, getNetwork());
afd.setVisible(true);
}