public class LaterInvocator
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
addModalityStateListener(ModalityStateListener listener,
Disposable parentDisposable) |
static void |
dispatchPendingFlushes() |
static boolean |
ensureFlushRequested()
There might be some requests in the queue, but ourFlushQueueRunnable might not be scheduled yet.
|
static void |
enterModal(java.lang.Object modalEntity) |
static void |
enterModal(java.lang.Object modalEntity,
ModalityStateEx appendedState) |
static void |
enterModal(Project project,
java.awt.Dialog dialog) |
static java.lang.Object [] |
getCurrentModalEntities() |
static ModalityStateEx |
getCurrentModalityState() |
static java.util.Collection<com.intellij.openapi.application.impl.FlushQueue.RunnableInfo> |
getLaterInvocatorEdtQueue() |
static java.util.Collection<com.intellij.openapi.application.impl.FlushQueue.RunnableInfo> |
getLaterInvocatorWtQueue() |
static boolean |
isInModalContext() |
static boolean |
isInModalContextForProject(Project project) |
static void |
leaveAllModals() |
static void |
leaveModal(java.lang.Object modalEntity) |
static void |
leaveModal(Project project,
java.awt.Dialog dialog) |
static void |
markTransparent(ModalityState state)
Marks the given modality state (not
any() } as transparent, i.e. |
static void |
pollWriteThreadEventsOnce() |
static void |
purgeExpiredItems() |
public static void addModalityStateListener(ModalityStateListener listener, Disposable parentDisposable)
public static void enterModal(java.lang.Object modalEntity)
public static void enterModal(java.lang.Object modalEntity, ModalityStateEx appendedState)
public static void enterModal(Project project, java.awt.Dialog dialog)
public static void markTransparent(ModalityState state)
any()
} as transparent, i.e. invokeLater
calls with its "parent" modality state
will also be executed within it. NB: this will cause all VFS/PSI/etc events be executed inside your modal dialog, so you'll need
to handle them appropriately, so please consider making the dialog non-modal instead of using this API.public static void leaveModal(Project project, java.awt.Dialog dialog)
public static void leaveModal(java.lang.Object modalEntity)
public static void leaveAllModals()
public static java.lang.Object [] getCurrentModalEntities()
public static ModalityStateEx getCurrentModalityState()
public static boolean isInModalContextForProject(Project project)
public static boolean isInModalContext()
public static void pollWriteThreadEventsOnce()
public static boolean ensureFlushRequested()
EventQueue.peekEvent()
default implementation would return null, and UIUtil.dispatchAllInvocationEvents()
would
stop processing events too early and lead to spurious test failures.IdeEventQueue#peekEvent()
public static java.util.Collection<com.intellij.openapi.application.impl.FlushQueue.RunnableInfo> getLaterInvocatorEdtQueue()
public static java.util.Collection<com.intellij.openapi.application.impl.FlushQueue.RunnableInfo> getLaterInvocatorWtQueue()
public static void purgeExpiredItems()
public static void dispatchPendingFlushes()