void (@NotNull final DocumentEvent e) { if (!myInsideChange) { UndoManager undoManager = UndoManager.getInstance(getProject()); alarm.cancelAllRequests(); alarm.addRequest(new MySynchronizeRequest(undoManager.isUndoOrRedoInProgress()), 100/*any arbitrary delay*/, ModalityState.stateForComponent(GuiEditor.this)); } }