Show the monitor dialog.If called outside the EDT this method will switch
to the UI thread using
<code>SwingUtilities.invokeAndWait(Runnable)</code>.
349664
public final void show() {
		if (firstTime) {
			firstTime = false;
			if (SwingUtilities.isEventDispatchThread()) {
				showIntern();
			} else {
				try {
					SwingUtilities.invokeAndWait(new Runnable() {
						public void run() {
							showIntern();
						}
					});
				} catch (final Exception ex) {
					ignore();
				}
			}
		} else {
			throw new IllegalStateException("This object cannot be reused!");
		}
	}
103274
def gui_call(self, method, *args, **kwdargs):
        
        my_id = thread.get_ident()
        if my_id == self.gui_thread_id:
            return method(*args, **kwdargs)
        else:
            future = self.gui_do(method, *args, **kwdargs)
            return future.wait()
334420
public void viewDebugMenuClick(int index, Object value, boolean isToggled) {
		System.out.println(index + ":" + value + ":" + isToggled);
		switch (index) {
		case 0:
			displayFps = isToggled;
			app.setDisplayFps(isToggled);
			break;
		case 1:
			app.setDisplayStatView(isToggled);
			break;
		}
	}
1197152
private void showPopup() {

        updateFromTextBox(true);
        m_box.setPreventShowError(true);
        m_popup.showRelativeTo(m_box);
        if (m_previewHandlerRegistration != null) {
            m_previewHandlerRegistration.removeHandler();
        }
        m_previewHandlerRegistration = Event.addNativePreviewHandler(new CloseEventPreviewHandler());
    }
1279796
private void showDialog(@Nullable final Bundle dialogState) {
        AbstractButtonBarDialogBuilder<?, ?> dialogBuilder = createDialogBuilder(dialogTheme);
        dialogBuilder.setFullscreen(isDialogFullscreen());
        dialogBuilder.setMaxWidth(getDialogMaxWidth());
        dialogBuilder.setMaxHeight(getDialogMaxHeight());
        dialogBuilder.setMargin(getDialogLeftMargin(), getDialogTopMargin(), getDialogRightMargin(),
                getDialogBottomMargin());
        dialogBuilder
                .setPadding(getDialogPaddingLeft(), getDialogPaddingTop(), getDialogPaddingRight(),
                        getDialogPaddingBottom());
        dialogBuilder.setFitsSystemWindows(isDialogFitsSystemWindowsLeft(),
                isDialogFitsSystemWindowsTop(), isDialogFitsSystemWindowsRight(),
                isDialogFitsSystemWindowsBottom());
        dialogBuilder.setTitle(getDialogTitle());
        dialogBuilder.setMessage(getDialogMessage());
        dialogBuilder.setPositiveButton(getPositiveButtonText(), this);
        dialogBuilder.setNegativeButton(getNegativeButtonText(), this);
        dialogBuilder.showHeader(isDialogHeaderShown());
        dialogBuilder.showButtonBarDivider(isDialogButtonBarDividerShown());
        dialogBuilder.showDividersOnScroll(areDialogDividersShownOnScroll());
        dialogBuilder.setShowAnimation(getDialogShowAnimation());
        dialogBuilder.setDismissAnimation(getDialogDismissAnimation());
        dialogBuilder.setCancelAnimation(getDialogCancelAnimation());
        dialogBuilder.setIconTintList(getDialogIconTintList());
        dialogBuilder.setIconTintMode(getDialogIconTintMode());
        dialogBuilder.setHeaderIconTintList(getDialogHeaderIconTintList());
        dialogBuilder.setHeaderIconTintMode(getDialogHeaderIconTintMode());

        if (dialogScrollableArea != null) {
            dialogBuilder.setScrollableArea(dialogScrollableArea.getTopScrollableArea(),
                    dialogScrollableArea.getBottomScrollableArea());
        }

        if (dialogIconId != -1) {
            dialogBuilder.setIcon(dialogIconId);
        } else {
            dialogBuilder.setIcon(dialogIconBitmap);
        }

        if (dialogBackgroundId != -1) {
            dialogBuilder.setBackground(dialogBackgroundId);
        } else if (dialogBackgroundColor != -1) {
            dialogBuilder.setBackgroundColor(dialogBackgroundColor);
        } else if (dialogBackgroundBitmap != null) {
            dialogBuilder.setBackground(dialogBackgroundBitmap);
        }

        if (dialogWindowBackgroundId != -1) {
            dialogBuilder.setWindowBackground(dialogWindowBackgroundId);
        } else if (dialogWindowBackgroundBitmap != null) {
            dialogBuilder.setBackground(dialogWindowBackgroundBitmap);
        }

        if (dialogHeaderBackgroundId != -1) {
            dialogBuilder.setHeaderBackground(dialogHeaderBackgroundId);
        } else if (dialogHeaderBackgroundColor != -1) {
            dialogBuilder.setHeaderBackgroundColor(dialogHeaderBackgroundColor);
        } else if (dialogHeaderBackgroundBitmap != null) {
            dialogBuilder.setHeaderBackground(dialogHeaderBackgroundBitmap);
        }

        if (dialogHeaderIconId != -1) {
            dialogBuilder.setHeaderIcon(dialogHeaderIconId);
        } else {
            dialogBuilder.setHeaderIcon(dialogHeaderIconBitmap);
        }

        if (getDialogGravity() != -1) {
            dialogBuilder.setGravity(getDialogGravity());
        }

        if (getDialogWidth() != 0) {
            dialogBuilder.setWidth(getDialogWidth());
        }

        if (getDialogHeight() != 0) {
            dialogBuilder.setHeight(getDialogHeight());
        }

        if (getDialogTitleColor() != -1) {
            dialogBuilder.setTitleColor(getDialogTitleColor());
        }

        if (getDialogTitleTypeface() != null) {
            dialogBuilder.setTitleTypeface(getDialogTitleTypeface());
        }

        if (getDialogMessageColor() != -1) {
            dialogBuilder.setMessageColor(getDialogMessageColor());
        }

        if (getDialogMessageTypeface() != null) {
            dialogBuilder.setMessageTypeface(getDialogMessageTypeface());
        }

        if (getDialogButtonTextColor() != null) {
            dialogBuilder.setButtonTextColor(getDialogButtonTextColor());
        }

        if (getDialogButtonTypeface() != null) {
            dialogBuilder.setButtonTypeface(getDialogButtonTypeface());
        }

        if (getDialogDividerColor() != -1) {
            dialogBuilder.setDividerColor(getDialogDividerColor());
        }

        if (customDialogTitleView != null) {
            dialogBuilder.setCustomTitle(customDialogTitleView);
        }

        if (customDialogTitleViewId != -1) {
            dialogBuilder.setCustomTitle(customDialogTitleViewId);
        }

        if (customDialogMessageView != null) {
            dialogBuilder.setCustomMessage(customDialogMessageView);
        }

        if (customDialogMessageViewId != -1) {
            dialogBuilder.setCustomMessage(customDialogMessageViewId);
        }

        if (customDialogButtonBarView != null) {
            dialogBuilder.setCustomButtonBar(customDialogButtonBarView);
        }

        if (customDialogButtonBarViewId != -1) {
            dialogBuilder.setCustomButtonBar(customDialogButtonBarViewId);
        }

        if (customDialogHeaderView != null) {
            dialogBuilder.setCustomHeader(customDialogHeaderView);
        }

        if (customDialogHeaderViewId != -1) {
            dialogBuilder.setCustomHeader(customDialogHeaderViewId);
        }

        onPrepareDialog(dialogBuilder);
        dialog = createDialog(dialogBuilder);
        dialog.setOnShowListener(this);
        dialog.setOnDismissListener(this);
        dialog.setOnCancelListener(this);
        dialog.setOnKeyListener(this);

        if (dialogState != null) {
            dialog.onRestoreInstanceState(dialogState);
        }

        requestInputMode();
        dialogResultPositive = false;
        dialog.show();
    }
1204366
private int externalAwaitDone() {
        boolean interrupted = false;
        int s;
        while ((s = status) >= 0) {
            if (U.compareAndSwapInt(this, STATUS, s, s | SIGNAL)) {
                synchronized (this) {
                    if (status >= 0) {
                        try {
                            wait();
                        } catch (InterruptedException ie) {
                            interrupted = true;
                        }
                    }
                    else
                        notifyAll();
                }
            }
        }
        if (interrupted)
            Thread.currentThread().interrupt();
        return s;
    }
910590
public static void invokeSwingAction(final Runnable runnable) {
        if (SwingUtilities.isEventDispatchThread()) {
            runnable.run();
        } else {
            SwingUtilities.invokeLater(runnable);
        }
    }
402349
public int showDialog(boolean showRoot, String panel) {
    	this.getJSplitPane().showDialog(showRoot, panel);
        this.setVisible(true);
    	return this.exitResult;
    }
1260021
def monitor(self):
        
        # NOTE: This blocks; it is up to the calling code to call it
        #       in a separate thread.

        # Sleep for however long we should be waiting.
        time.sleep(self._settings.max_latency)

        _LOGGER.debug("Monitor is waking up")
        return self._commit()
130382
public void enterDebugger(Context ctxt)
	{
		ISchedulableThread th = BasicSchedulableThread.getThread(Thread.currentThread());

		if (th != null)
		{
			th.suspendOthers();
		}

		if (Settings.usingDBGP)
		{
			ctxt.threadState.dbgp.stopped(ctxt, this);
		}
		else
		{
			new DebuggerReader(Interpreter.getInstance(), this, ctxt).run();
		}
	}
1261177
def show_and_run(self):
        """"""
        self.display_widget = gtk.Window()
        self.display_widget.add(self.widget)
        self.display_widget.show()
        BaseDelegate.show_and_run(self)
1123816
public void showDialog(final Class<?> dialogControllerClass) {
        if (currentController != null) {
            dialogControllers.get(dialogControllerClass).show(currentController.getStage());
        }
    }
410348
protected void hideProgressDialog() {
		// do nothing if the dialog is already being displayed
		synchronized ( lockProgress ) {
			if( progressDialog == null )
				return;
		}

		if (Looper.getMainLooper().getThread() == Thread.currentThread()) {
			// if inside the UI thread just dismiss the dialog and avoid a potential locking condition
			synchronized ( lockProgress ) {
				progressDialog.dismiss();
				progressDialog = null;
			}
		} else {
			runOnUiThread(new Runnable() {
				public void run() {
					synchronized ( lockProgress ) {
						progressDialog.dismiss();
						progressDialog = null;
					}
				}});

			// block until dialog has been dismissed
			while( progressDialog != null  ) {
				Thread.yield();
			}
		}
	}
1316561
public void show(boolean animated) {
        if (animated) {
            if (visibilityChangeListener != null) {
                visibilityChangeListener.onAlertAppearStarted(this);
            }
            startAnimation(fadeInAnimation);
        }
        else {
            setVisibility(VISIBLE);
        }
    }
747565
public void showSpiderDialog(Target target) {
		if (spiderDialog == null) {
			spiderDialog = new SpiderDialog(this, View.getSingleton().getMainFrame(), new Dimension(700, 430));
		}
		if (spiderDialog.isVisible()) {
			// Its behind you! Actually not needed no the window is alwaysOnTop, but keeping in case we change that ;)
			spiderDialog.toFront();
			return;
		}
		if (target != null) {
			spiderDialog.init(target);
		} else {
			// Keep the previous target
			spiderDialog.init(null);
		}
		spiderDialog.setVisible(true);
	}
1257328
void invokeAndWait(final Runnable r) {
        final CountDownLatch latch = new CountDownLatch(1);
        queue.postRunnable(() -> {
            try {
                r.run();
            } finally {
                latch.countDown();
            }
        });
        try {
            latch.await();
        } catch (InterruptedException e) { }
    }
275454
public int showDialog(Component parent) {
        dialogResultValue = ERROR_OPTION;
        JDialog dialog = createDialog(parent);
        dialog.addWindowListener(new WindowAdapter() {

            @Override
            public void windowClosing(WindowEvent e) {
                dialogResultValue = CANCEL_OPTION;
            }
        });

        dialog.setVisible(true);
        dialog.dispose();
        dialog = null;

        return dialogResultValue;
    }