void () { if (project.isDisposed()) { return; } for (final LogFile logFile : new ArrayList<>(myLogFiles)) { ProcessHandler process = logFile.getProcess(); if (process != null && process.isProcessTerminated()) { myLogFiles.remove(logFile); continue; } final Set<String> oldPaths = logFile.getPaths(); final Set<String> newPaths = logFile.getOptions().getPaths(); // should not be called in UI thread logFile.setPaths(newPaths); final Set<String> obsoletePaths = new HashSet<>(oldPaths); obsoletePaths.removeAll(newPaths); try { SwingUtilities.invokeAndWait(() -> { if (project.isDisposed()) { return; } addConfigurationConsoles(logFile.getOptions(), file -> !oldPaths.contains(file), newPaths, logFile.getConfiguration()); for (String each : obsoletePaths) { myManager.removeLogConsole(each); } }); } catch (InterruptedException | InvocationTargetException ignored) { } } if (!myLogFiles.isEmpty()) { myUpdateAlarm.cancelAndRequest(); } }