void () { String text; if (!isRunning()) { text = ""; } else { text = getText(); double fraction = getFraction(); if (fraction > 0) { text += " " + (int)(fraction * 100 + 0.5) + "%"; } } String _text = text; if (!myScheduledStatusBarTextSave) { myScheduledStatusBarTextSave = true; SwingUtilities.invokeLater( () -> { if (ApplicationManager.getApplication().isDisposed()) return; WindowManager windowManager = WindowManager.getInstance(); if (windowManager == null) return; Project[] projects = ProjectManager.getInstance().getOpenProjects(); if (projects.length == 0) projects = new Project[]{null}; for (Project project : projects) { StatusBar statusBar = windowManager.getStatusBar(project); if (statusBar != null) { String info = notNull(statusBar.getInfo(), ""); myStatusBar2SavedText.put(statusBar, pair(info, info)); // initial value } } } ); } SwingUtilities.invokeLater( () -> { for (StatusBar statusBarEx : myStatusBar2SavedText.keySet()) { setStatusBarText(statusBarEx, _text); } } ); }