1 11 package org.eclipse.debug.internal.ui.actions; 12 13 import org.eclipse.debug.core.ILaunchConfiguration; 14 import org.eclipse.debug.ui.DebugUITools; 15 import org.eclipse.jface.action.Action; 16 import org.eclipse.jface.resource.ImageDescriptor; 17 18 import com.ibm.icu.text.MessageFormat; 19 20 26 public class LaunchConfigurationAction extends Action { 27 28 private ILaunchConfiguration fConfig; 29 private String fMode; 30 31 36 public LaunchConfigurationAction(ILaunchConfiguration config, String mode, String text, ImageDescriptor image, int accelerator) { 37 super(MessageFormat.format(ActionMessages.LaunchConfigurationAction_0, new String [] {Integer.toString(accelerator), text}), image); 38 fConfig = config; 39 fMode = mode; 40 } 41 42 46 public ILaunchConfiguration getLaunchConfiguration() { 47 return fConfig; 48 } 49 50 53 public void run() { 54 DebugUITools.launch(fConfig, fMode); 55 } 56 57 } 58 | Popular Tags |