String unitClass = "";
String unitClass;
    public static String formatUnit(Entity entity, boolean blindDrop) {        String value = "";        // Reset the tree strings.        String strTreeSet = ""; //$NON-NLS-1$        String strTreeView = ""; //$NON-NLS-1$        // Set the tree strings based on C3 settings for the unit.        if (entity.hasC3i()) {            if (entity.calculateFreeC3Nodes() == 5)                strTreeSet = "**"; //$NON-NLS-1$            strTreeView = " (" + entity.getC3NetId() + ")"; //$NON-NLS-1$ //$NON-NLS-2$        } else if (entity.hasC3()) {            if (entity.getC3Master() == null) {                if (entity.hasC3S())                    strTreeSet = "***"; //$NON-NLS-1$                else                    strTreeSet = "*"; //$NON-NLS-1$            } else if (!entity.C3MasterIs(entity)) {                strTreeSet = ">"; //$NON-NLS-1$                if (entity.getC3Master().getC3Master() != null                        && !entity.getC3Master().C3MasterIs(entity.getC3Master()))                    strTreeSet = ">>"; //$NON-NLS-1$                strTreeView = " -> " + entity.getC3Master().getDisplayName(); //$NON-NLS-1$            }        }        int crewAdvCount = entity.getCrew().countAdvantages();        if (blindDrop) {            String unitClass = ""; //$NON-NLS-1$            if (entity instanceof Infantry) {                unitClass = Messages.getString("ChatLounge.0"); //$NON-NLS-1$            } else if (entity instanceof Protomech) {                unitClass = Messages.getString("ChatLounge.1"); //$NON-NLS-1$            } else if (entity instanceof GunEmplacement) {                unitClass = Messages.getString("ChatLounge.2"); //$NON-NLS-1$            } else {                unitClass = entity.getWeightClassName();                if (entity instanceof Tank) {                    unitClass += Messages.getString("ChatLounge.6"); //$NON-NLS-1$                }            }            value = Messages.getString("ChatLounge.EntityListEntry1", new Object[]{//$NON-NLS-1$                entity.getOwner().getName(),                new Integer(entity.getCrew().getGunnery()),                new Integer(entity.getCrew().getPiloting()),                (crewAdvCount > 0 ? " <" + crewAdvCount + Messages.getString("ChatLounge.advs") : ""), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$                unitClass,                ((entity.isOffBoard()) ? Messages.getString("ChatLounge.deploysOffBoard") : ""), //$NON-NLS-1$ //$NON-NLS-2$                ((entity.getDeployRound() > 0) ? Messages.getString("ChatLounge.deploysAfterRound") + entity.getDeployRound() : "")}); //$NON-NLS-1$ //$NON-NLS-2$        } else {            value = strTreeSet                    + Messages.getString("ChatLounge.EntityListEntry2", new Object[]{//$NON-NLS-1$                        entity.getDisplayName(),                        new Integer(entity.getCrew().getGunnery()),                        new Integer(entity.getCrew().getPiloting()),                        (crewAdvCount > 0 ? " <" + crewAdvCount + Messages.getString("ChatLounge.advs") : ""), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$                        new Integer(entity.calculateBattleValue()),                        strTreeView,                        ((entity.isOffBoard()) ? Messages.getString("ChatLounge.deploysOffBoard") : ""), //$NON-NLS-1$ //$NON-NLS-2$                        ((entity.getDeployRound() > 0) ? Messages.getString("ChatLounge.deploysAfterRound") + entity.getDeployRound() : ""), //$NON-NLS-1$ //$NON-NLS-2$                        (entity.isDesignValid() ? "" : Messages.getString("ChatLounge.invalidDesign"))}); //$NON-NLS-1$ //$NON-NLS-2$        }        return value;    }