IDEA-212235 merge: do not access Swing components on pooled thread

GitOrigin-RevId: 773b8bc167559b5e30840162421c36b0e7d49bc1
This commit is contained in:
Aleksey Pivovarov
2019-05-07 16:07:18 +03:00
committed by intellij-monorepo-bot
parent 8ffec214be
commit 0b14159f9f
@@ -290,17 +290,20 @@ public abstract class MergeRequestProcessor implements Disposable {
}
private void showInvalidRequestNotification() {
if (!myNotificationPanel.isNull()) return;
ApplicationManager.getApplication().invokeLater(() -> {
if (myDisposed) return;
if (!myNotificationPanel.isNull()) return;
EditorNotificationPanel notification = new EditorNotificationPanel(LightColors.RED);
notification.setText("Conflict is not valid and no longer can be resolved.");
notification.createActionLabel("Abort Resolve", () -> {
applyRequestResult(MergeResult.CANCEL);
closeDialog();
});
myNotificationPanel.setContent(notification);
myMainPanel.validate();
myMainPanel.repaint();
EditorNotificationPanel notification = new EditorNotificationPanel(LightColors.RED);
notification.setText("Conflict is not valid and no longer can be resolved.");
notification.createActionLabel("Abort Resolve", () -> {
applyRequestResult(MergeResult.CANCEL);
closeDialog();
});
myNotificationPanel.setContent(notification);
myMainPanel.validate();
myMainPanel.repaint();
}, ModalityState.stateForComponent(myPanel));
}
@Override