1 11 package org.eclipse.jdt.internal.debug.ui; 12 13 14 import com.ibm.icu.text.MessageFormat; 15 16 import org.eclipse.core.runtime.CoreException; 17 import org.eclipse.core.runtime.IStatus; 18 import org.eclipse.debug.core.IStatusHandler; 19 import org.eclipse.jdt.debug.core.IJavaThread; 20 import org.eclipse.jface.dialogs.ErrorDialog; 21 import org.eclipse.swt.widgets.Display; 22 23 public class SuspendTimeoutStatusHandler implements IStatusHandler { 24 25 28 public Object handleStatus(IStatus status, Object source) throws CoreException { 29 IJavaThread thread= (IJavaThread) source; 30 final ErrorDialog dialog= new ErrorDialog(JDIDebugUIPlugin.getActiveWorkbenchShell(), DebugUIMessages.SuspendTimeoutHandler_suspend, MessageFormat.format(DebugUIMessages.SuspendTimeoutHandler_timeout_occurred, new String [] {thread.getName()}), status, IStatus.WARNING | IStatus.ERROR | IStatus.INFO); Display display= JDIDebugUIPlugin.getStandardDisplay(); 32 display.syncExec(new Runnable () { 33 public void run() { 34 dialog.open(); 35 } 36 }); 37 return null; 38 } 39 } 40 | Popular Tags |