How to open Launch Configuration dialog (like when press mouse_right on project - run as - run configurations) in RCP app via command? or any other way, but command preferred.
If you type 'ALT+SHIFT+F1
' on an 'Create, manage and run configurations', the plug-in Spy will tell you it is a LaunchConfigurationsDialog
A quick search in the Eclipse sources indicates it is created through an 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];
That should give you enough material to get started.
(source: eclipse.org)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With