Eclipse plugin Eclipse RCP-如何打开启动配置对话框
如何通过命令在RCP应用程序中打开启动配置对话框(如在项目-运行方式-运行配置上按鼠标右键)?或任何其他方式,但命令首选。如果您在“创建、管理和运行配置”上键入“Eclipse plugin Eclipse RCP-如何打开启动配置对话框,eclipse-plugin,eclipse-rcp,Eclipse Plugin,Eclipse Rcp,如何通过命令在RCP应用程序中打开启动配置对话框(如在项目-运行方式-运行配置上按鼠标右键)?或任何其他方式,但命令首选。如果您在“创建、管理和运行配置”上键入“ALT+SHIFT+F1”,将告诉您它是 在Eclipse源代码中快速搜索表明它是通过 这应该给你足够的材料开始 (来源:)根据VonC的回答,我做了以下操作,config只是我的ILaunchConfigurationWorkingCopy的实例,模式是“运行”: 我是说如何称呼这个对话?谢谢,它很有帮助。我找到了LaunchCon
ALT+SHIFT+F1
”,将告诉您它是
在Eclipse源代码中快速搜索表明它是通过
这应该给你足够的材料开始
(来源:)根据VonC的回答,我做了以下操作,
config
只是我的ILaunchConfigurationWorkingCopy
的实例,模式是“运行”
:
我是说如何称呼这个对话?谢谢,它很有帮助。我找到了LaunchConfigurationsDialog甚至OpenLaunchConfigurationsDialogGroup,但无法理解它的参数。源代码清楚地说明了这一点。妈的,我离得太近了。。。
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];
DebugUITools.openLaunchConfigurationDialog(
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
config,
DebugUITools.getLaunchGroup(savedConfig, mode).getIdentifier(),
null);