/*.................................................................................................................*/ public Object doCommand(String commandName, String arguments, CommandChecker checker) { if (checker.compare( this.getClass(), "Sets the username", "[username]", commandName, "setUsername")) { username = parser.getFirstToken(arguments); } return null; }
public void readTabbedTranslationFile(String translationList) { Parser parser = new Parser(); parser.setString(translationList); Parser subParser = new Parser(); String line = parser.getRawNextDarkLine(); numCodes = 0; while (!StringUtil.blank(line)) { numCodes++; line = parser.getRawNextDarkLine(); } if (numCodes == 0) { MesquiteMessage.discreetNotifyUser("File is empty."); return; } initializeArrays(numCodes); int count = -1; parser.setPosition(0); subParser.setPunctuationString("\t"); line = parser.getRawNextDarkLine(); String token = ""; while (!StringUtil.blank(line)) { count++; subParser.setString(line); token = subParser.getFirstToken(); if (StringUtil.notEmpty(token)) { originalSampleCodes[count] = token; token = subParser.getNextToken(); if (StringUtil.notEmpty(token)) { translatedSampleCodes[count] = token; } } line = parser.getRawNextDarkLine(); } }