Revision 2887

tmp/org.txm.core/src/java/org/txm/Toolbox.java (revision 2887)
38 38
import java.text.DateFormat;
39 39
import java.text.SimpleDateFormat;
40 40
import java.util.Arrays;
41
import java.util.HashSet;
41 42
import java.util.LinkedHashMap;
42 43
import java.util.Locale;
44
import java.util.Set;
43 45
import java.util.logging.Level;
44 46

  
45 47
import org.apache.commons.lang.StringUtils;
......
64 66
import org.txm.objects.Workspace;
65 67
import org.txm.utils.BundleUtils;
66 68
import org.txm.utils.DeleteDir;
69
import org.txm.utils.LogMonitor;
67 70
import org.txm.utils.OSDetector;
68 71
import org.txm.utils.io.FileCopy;
69 72
import org.txm.utils.logger.Log;
......
214 217
	 * @throws Exception
215 218
	 */
216 219
	public static boolean initialize(Class preferencesStore) throws Exception {
217
		return initialize(preferencesStore, null);
220
		return initialize(preferencesStore, new LogMonitor("initializing Toolbox"));
218 221
	}
219 222

  
220 223
	/**
......
569 572
		if (enginesManagers.size() == 0) return true;
570 573

  
571 574
		boolean result = true;
572
		for (EngineType et : enginesManagers.keySet()) {
575
		HashSet<EngineType> ets = new HashSet<EngineType>();
576
		ets.addAll(enginesManagers.keySet());
577
		for (EngineType et : ets) {
573 578
			EnginesManager<?> enginesManager = enginesManagers.get(et);
574 579
			Log.finest(enginesManager.getClass().getSimpleName() + ": stopping " + enginesManager.getEngines().size() + " " + enginesManager.getEnginesDescription() + " engine(s)...");
575 580
			result = result && enginesManager.stopEngines();
576
			removeEngineManager(enginesManager); // remove the engines manager anyway
581
			removeEngineManager(enginesManager); // remove the engine manager anyway
577 582
		}
578 583

  
579 584
		return true;

Also available in: Unified diff