在Eclipse中的RCP应用程序如果要想在设置完成或者单击按钮后实现从新启动RCP程序,如下代码就可实现:
MessageDialog confrim = new MessageDialog(Display.getDefault()
.getActiveShell(), "确认信息", null, "需要重启应用程序才能生效!"
, MessageDialog.QUESTION, new String[] {IDialogConstants.OK_LABEL,IDialogConstants.CANCEL_LABEL },0);
if (confrim.open() == 0) {
PlatformUI.getWorkbench().restart();
}