/** Do the work (import text) */ public void run() { isInProgress = true; try { final String text = getGameInfo(); if (!isInProgress) { return; } // see if game is registered if (text.length() == 0 || text.indexOf(NOT_REGISTERED) >= 0) { fic.flocImportUnregistered(); return; } // game is registered if (fic.flocTextImportComplete(text)) { // now, process into a World object fic.flocImportMessage(Utils.getLocalString(CREATING_WORLD)); JudgeImport ji = new JudgeImport(orderFactory, new StringReader(text), null); if (!isInProgress) { return; } fic.flocWorldImportComplete(ji.getWorld()); } } catch (IOException e) { fic.flocImportException(e); } catch (Exception e) { // do nothing (catches any thread-abort errors) } } // run()