Skip to content
Snippets Groups Projects
Commit 45731c46 authored by Simon Barner's avatar Simon Barner
Browse files

MessageUtilsExtended.askQuestion() -> askQuestionInUIThread()

* Fix infinite recursion caused by erroneous static import of
  MessageUtils.askQuestion()

Issue-Ref: 3574
Issue-Url: https://af3-developer.fortiss.org/issues/3574



Signed-off-by: default avatarSimon Barner <barner@fortiss.org>
parent ca4f28ca
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ DragAndDropUtils.java 7aab91518aa12d76533a345bf6ed0be9ac7ff0e5 GREEN
EObjectSelectionUtils.java 128cf8f96c6b9478171dff3deda662d5934f5f44 GREEN
HierarchicalNameViewerComparator.java 199d82e392d4e437810cc65c0fc521dab52038e0 GREEN
KernelUIUtils.java 46d3279ef3523b104f89a6c526109f72d36f72f2 GREEN
MessageUtilsExtended.java 67693ff5473d0b85081d273fc5f00612fdc8bfee GREEN
MessageUtilsExtended.java a08055b2f0005eebfa91662374d9ec4ce4f78aab GREEN
ObservableUtils.java 34abfd1dfaf9c0acbb31caf1f525e7b39416c116 GREEN
PropertiesConstantUtils.java 59b1a1e4d594bb98db3aa396f2ff6474ba405920 GREEN
SelectionUtils.java 33aec7cccccb28e5568140cf8e5443ce0f9f59f7 GREEN
......
......@@ -15,6 +15,7 @@
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.ui.util;
import static org.conqat.ide.commons.ui.dialog.MessageUtils.askQuestion;
import static org.conqat.ide.commons.ui.dialog.MessageUtils.showError;
import static org.conqat.ide.commons.ui.dialog.MessageUtils.showInfo;
import static org.conqat.ide.commons.ui.dialog.MessageUtils.showWarning;
......@@ -32,28 +33,23 @@ public class MessageUtilsExtended {
/** Temporary result for the asked question. */
private static boolean tempQuestionResult;
/** Asks question in the UI thread. */
public static boolean askQuestion(final String title, final String message) {
syncExec(new Runnable() {
@Override
public void run() {
tempQuestionResult = askQuestion(title, message);
}
});
/** Asks question in the UI thread (and block). */
public static boolean askQuestionInUIThread(final String title, final String message) {
syncExec(() -> tempQuestionResult = askQuestion(title, message));
return tempQuestionResult;
}
/** Opens a error dialog in the UI thread. */
/** Opens a error dialog in the UI thread (and block). */
public static void showErrorInUIThread(final String title, final String message) {
syncExec(() -> showError(title, message));
}
/** Opens a warning dialog in the UI thread. */
/** Opens a warning dialog in the UI thread (and block). */
public static void showWarningInUIThread(final String title, final String message) {
syncExec(() -> showWarning(title, message));
}
/** Opens an info dialog in the UI thread. */
/** Opens an info dialog in the UI thread (and block). */
public static void showInfoInUIThread(final String title, final String message) {
syncExec(() -> showInfo(title, message));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment