1 11 package org.eclipse.debug.internal.ui.launchConfigurations; 12 13 import org.eclipse.core.runtime.CoreException; 14 import org.eclipse.core.runtime.IStatus; 15 import org.eclipse.core.runtime.Status; 16 import org.eclipse.debug.core.ILaunchConfiguration; 17 import org.eclipse.debug.core.IStatusHandler; 18 import org.eclipse.debug.internal.ui.DebugUIPlugin; 19 import org.eclipse.debug.ui.DebugUITools; 20 import org.eclipse.swt.widgets.Shell; 21 22 28 public class LaunchDelegateNotAvailableHandler implements IStatusHandler { 29 30 33 public Object handleStatus(IStatus status, Object source) throws CoreException { 34 if(source instanceof Object []) { 35 Object [] infos = (Object []) source; 36 if(infos.length == 2) { 37 final ILaunchConfiguration config = (ILaunchConfiguration) infos[0]; 38 final String mode = (String ) infos[1]; 39 final Shell shell = DebugUIPlugin.getShell(); 40 Runnable runnable = new Runnable () { 41 public void run() { 42 DebugUITools.openLaunchConfigurationDialog(shell, config, DebugUITools.getLaunchGroup(config, mode).getIdentifier(), null); 43 } 44 }; 45 DebugUIPlugin.getStandardDisplay().asyncExec(runnable); 46 } 47 } 48 return Status.OK_STATUS; 49 } 50 } 51 | Popular Tags |