EA-40102 - assert: LaterInvocator.getCurrentModalEntities

This commit is contained in:
Dmitry Avdeev
2013-04-19 12:48:32 +04:00
parent 3b1b909eb4
commit 45ec4d31b0
@@ -28,6 +28,7 @@ import com.intellij.openapi.project.ProjectManager;
import com.intellij.openapi.util.Key;
import com.intellij.openapi.util.NotNullLazyValue;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -73,17 +74,22 @@ public class EditorNotifications extends AbstractProjectComponent {
}
public void updateNotifications(final VirtualFile file) {
ApplicationManager.getApplication().runReadAction(new Runnable() {
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
public void run() {
if (myProject.isDisposed()) return;
FileEditor[] editors = myFileEditorManager.getAllEditors(file);
for (FileEditor editor : editors) {
for (Provider<?> provider : PROVIDERS.getValue()) {
JComponent component = provider.createNotificationPanel(file, editor);
Key<? extends JComponent> key = provider.getKey();
updateNotification(editor, key, component);
ApplicationManager.getApplication().runReadAction(new Runnable() {
public void run() {
if (myProject.isDisposed()) return;
FileEditor[] editors = myFileEditorManager.getAllEditors(file);
for (FileEditor editor : editors) {
for (Provider<?> provider : PROVIDERS.getValue()) {
JComponent component = provider.createNotificationPanel(file, editor);
Key<? extends JComponent> key = provider.getKey();
updateNotification(editor, key, component);
}
}
}
}
});
}
});
}