如何通过命令在RCP应用程序中打开启动配置对话框(如在项目上按mouse_right - 运行 - 运行配置)?或任何其他方式,但命令首选.
如果您ALT+SHIFT+F1
在'创建,管理和运行配置'上键入' ',插件Spy会告诉您它是一个LaunchConfigurationsDialog
在Eclipse源代码中快速搜索表明它是通过一个 DebugUITools.openLaunchConfigurationDialogOnGroup()
final int[] result = new int[1]; Runnable JavaDoc r = new Runnable JavaDoc() { /** * @see java.lang.Runnable#run() */ public void run() { LaunchConfigurationsDialog dialog = (LaunchConfigurationsDialog) LaunchConfigurationsDialog.getCurrentlyVisibleLaunchConfigurationDialog(); if (dialog != null) { dialog.setInitialSelection(selection); dialog.doInitialTreeSelection(); if (status != null) { dialog.handleStatus(status); } result[0] = Window.OK; } else { dialog = new LaunchConfigurationsDialog(shell, DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchGroup(groupIdentifier)); dialog.setOpenMode(LaunchConfigurationsDialog.LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_SELECTION); dialog.setInitialSelection(selection); dialog.setInitialStatus(status); result[0] = dialog.open(); } } }; BusyIndicator.showWhile(DebugUIPlugin.getStandardDisplay(), r); return result[0];
这应该给你足够的材料来开始.
http://help.eclipse.org/stable/topic/org.eclipse.platform.doc.isv/guide/images/lcd.png