如何在RAP应用程序中打开messagedialog

时间:2015-10-25 11:07:36

标签: java swt eclipse-rcp rcp eclipse-rap

我正在尝试使用此代码在RAP应用程序中打开messagedialog

MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Test","Testtitle");

我的问题是,我无法获得正确的shell引用。 我是rap的新手,刚刚编辑了eclipse提供的“hello world”示例。 我需要采取哪些步骤才能使其发挥作用?

1 个答案:

答案 0 :(得分:0)

MessageDialog.openInformation(getSite().getShell(), "Message", 
                            "Message");