From 160d7bf3a470cd18b60f407c6e760b1e519e76a4 Mon Sep 17 00:00:00 2001 From: cperkonig Date: Sun, 28 Mar 2004 08:39:47 +0000 Subject: [PATCH] changes for VariableHover --- .../phpdt/internal/debug/ui/PHPDebugUiPlugin.java | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/net.sourceforge.phpeclipse.debug.ui/src/net/sourceforge/phpdt/internal/debug/ui/PHPDebugUiPlugin.java b/net.sourceforge.phpeclipse.debug.ui/src/net/sourceforge/phpdt/internal/debug/ui/PHPDebugUiPlugin.java index 340563e..16f59ce 100644 --- a/net.sourceforge.phpeclipse.debug.ui/src/net/sourceforge/phpdt/internal/debug/ui/PHPDebugUiPlugin.java +++ b/net.sourceforge.phpeclipse.debug.ui/src/net/sourceforge/phpdt/internal/debug/ui/PHPDebugUiPlugin.java @@ -11,6 +11,7 @@ import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.plugin.AbstractUIPlugin; import org.eclipse.swt.widgets.Shell; import org.eclipse.jface.dialogs.ErrorDialog; +import org.eclipse.swt.widgets.Display; public class PHPDebugUiPlugin extends AbstractUIPlugin { public static final String PLUGIN_ID = "net.sourceforge.phpeclipse.debug.ui"; //$NON-NLS-1$ @@ -50,7 +51,20 @@ public class PHPDebugUiPlugin extends AbstractUIPlugin { return PLUGIN_ID; } return getDefault().getDescriptor().getUniqueIdentifier(); - } + } + + /** + * Returns the standard display to be used. The method first checks, if + * the thread calling this method has an associated display. If so, this + * display is returned. Otherwise the method returns the default display. + */ + public static Display getStandardDisplay() { + Display display; + display= Display.getCurrent(); + if (display == null) + display= Display.getDefault(); + return display; + } /** * Returns the active workbench shell or null if none -- 1.7.1