From b80923d64fe2a09140821c81daa4b84d48bda212 Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Mon, 8 Sep 2014 20:20:13 +0400 Subject: [PATCH] javadoc --- .../util/src/com/intellij/util/ui/UIUtil.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/platform/util/src/com/intellij/util/ui/UIUtil.java b/platform/util/src/com/intellij/util/ui/UIUtil.java index aec2a356ded0..28c95b80763c 100644 --- a/platform/util/src/com/intellij/util/ui/UIUtil.java +++ b/platform/util/src/com/intellij/util/ui/UIUtil.java @@ -2085,7 +2085,7 @@ public class UIUtil { * Invoke and wait in the event dispatch thread * or in the current thread if the current thread * is event queue thread. - * + * DO NOT INVOKE THIS METHOD FROM UNDER READ ACTION. * @param runnable a runnable to invoke * @see #invokeAndWaitIfNeeded(com.intellij.util.ThrowableRunnable) */ @@ -2103,6 +2103,14 @@ public class UIUtil { } } + /** + * Invoke and wait in the event dispatch thread + * or in the current thread if the current thread + * is event queue thread. + * DO NOT INVOKE THIS METHOD FROM UNDER READ ACTION. + * @param computable a runnable to invoke + * @see #invokeAndWaitIfNeeded(com.intellij.util.ThrowableRunnable) + */ public static T invokeAndWaitIfNeeded(@NotNull final Computable computable) { final Ref result = Ref.create(); invokeAndWaitIfNeeded(new Runnable() { @@ -2114,6 +2122,14 @@ public class UIUtil { return result.get(); } + /** + * Invoke and wait in the event dispatch thread + * or in the current thread if the current thread + * is event queue thread. + * DO NOT INVOKE THIS METHOD FROM UNDER READ ACTION. + * @param runnable a runnable to invoke + * @see #invokeAndWaitIfNeeded(com.intellij.util.ThrowableRunnable) + */ public static void invokeAndWaitIfNeeded(@NotNull final ThrowableRunnable runnable) throws Throwable { if (SwingUtilities.isEventDispatchThread()) { runnable.run(); @@ -2890,6 +2906,7 @@ public class UIUtil { new Thread(new Runnable() { // The wrapper thread is unnecessary, unless it blocks on the // Clip finishing; see comments. + @Override public void run() { try { Clip clip = AudioSystem.getClip();