mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
add javadoc to PlatformTestUtil.dispatch* methods (IDEA-CR-18810)
This commit is contained in:
@@ -302,6 +302,10 @@ public class PlatformTestUtil {
|
||||
UIUtil.dispatchAllInvocationEvents();
|
||||
}
|
||||
|
||||
/**
|
||||
* Dispatch all pending invocation events (if any) in the {@link IdeEventQueue}.
|
||||
* Should only be invoked in Swing thread (asserted inside {@link IdeEventQueue#dispatchEvent(AWTEvent)})
|
||||
*/
|
||||
@TestOnly
|
||||
public static void dispatchAllInvocationEventsInIdeEventQueue() throws InterruptedException {
|
||||
IdeEventQueue eventQueue = IdeEventQueue.getInstance();
|
||||
@@ -315,6 +319,10 @@ public class PlatformTestUtil {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Dispatch all pending events (if any) in the {@link IdeEventQueue}.
|
||||
* Should only be invoked in Swing thread (asserted inside {@link IdeEventQueue#dispatchEvent(AWTEvent)})
|
||||
*/
|
||||
@TestOnly
|
||||
public static void dispatchAllEventsInIdeEventQueue() throws InterruptedException {
|
||||
IdeEventQueue eventQueue = IdeEventQueue.getInstance();
|
||||
@@ -322,6 +330,10 @@ public class PlatformTestUtil {
|
||||
while (dispatchNextEventIfAny(eventQueue) != null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Dispatch one pending event (if any) in the {@link IdeEventQueue}.
|
||||
* Should only be invoked in Swing thread (asserted inside {@link IdeEventQueue#dispatchEvent(AWTEvent)})
|
||||
*/
|
||||
@TestOnly
|
||||
public static AWTEvent dispatchNextEventIfAny(@NotNull IdeEventQueue eventQueue) throws InterruptedException {
|
||||
assert SwingUtilities.isEventDispatchThread() : Thread.currentThread();
|
||||
|
||||
Reference in New Issue
Block a user