private void processUnitAlphaStrikeConverter() { if (getToken() == TOK_LITERAL) { filename = getTokenValue(); nextToken();
private void processUnitBattleForceConverter() { if (getToken() == TOK_LITERAL) { filename = getTokenValue(); nextToken();
@SuppressWarnings("nls") private void processUnitExporter(boolean officialUnitList) { String filename; if ((getToken() == TOK_LITERAL) || officialUnitList) { if (officialUnitList) { filename = MechFileParser.FILENAME_OFFICIAL_UNITS;
if (getToken() == TOK_LITERAL) { filename = getTokenValue(); nextToken();
if ((getToken() == TOK_OPTION) && getTokenValue().equals(OPTION_LOG)) { nextToken(); parseLog(); if ((getToken() == TOK_OPTION) && getTokenValue().equals(OPTION_EQUIPMENT_DB)) { nextToken(); if ((getToken() == TOK_OPTION) && getTokenValue().equals(OPTION_EQUIPMENT_EXTENDED_DB)) { nextToken(); processExtendedEquipmentDb(); if ((getToken() == TOK_OPTION) && getTokenValue().equals(OPTION_DATADIR)) { nextToken(); processDataDir(); if ((getToken() == TOK_OPTION) && getTokenValue().equals(OPTION_UNIT_VALIDATOR)) { nextToken(); if ((getToken() == TOK_OPTION) && getTokenValue().equals(OPTION_UNIT_EXPORT)) { nextToken(); if ((getToken() == TOK_OPTION) && getTokenValue().equals(OPTION_OFFICAL_UNIT_LIST)) {
private void parseLog() throws ParseException { if (getToken() == TOK_LITERAL) { logFilename = getTokenValue(); nextToken(); } else { error("log file name expected"); //$NON-NLS-1$ } }
private void processDataDir() throws ParseException { String dataDirName; if (getToken() == TOK_LITERAL) { dataDirName = getTokenValue(); nextToken(); Configuration.setDataDir(new File(dataDirName)); } else { error("directory name expected"); // $NON-NLS-1$ } }
private void processExtendedEquipmentDb() throws ParseException { String filename; if (getToken() == TOK_LITERAL) { filename = getTokenValue(); nextToken(); megamek.common.EquipmentType .writeEquipmentExtendedDatabase(new File(filename)); } else { error("file name expected"); //$NON-NLS-1$ } System.exit(0); }
private void parseGUI() throws ParseException { if (getToken() == TOK_LITERAL) { guiName = getTokenValue(); nextToken(); } else { error("GUI name expected"); //$NON-NLS-1$ } }
private void processEquipmentDb() throws ParseException { String filename; if (getToken() == TOK_LITERAL) { filename = getTokenValue(); nextToken(); megamek.common.EquipmentType.writeEquipmentDatabase(new File( filename)); } else { error("file name expected"); //$NON-NLS-1$ } System.exit(0); }