如何询问用户是否要始终显示欢迎页面?
在我的 RCP 应用程序中,我有一个介绍页面,其中有一些有关产品本身的说明。
但简介仅在第一次打开应用程序时显示。
有没有办法询问用户是否想要“启动时不再显示此内容”? 我的介绍内容:
<?xml version="1.0" encoding="utf-8" ?>
<introContent>
<page id="root" content="content/root.xhtml" />
<page id="concept1" content="content/concept1.xhtml" />
<page id="concept2" content="content/concept2.xhtml" />
<contentProvider id="awc"
class="org.eclipse.ui.intro.contentproviders.AlwaysWelcomeCheckbox"
pluginId="org.eclipse.ui.intro">
</contentProvider>
</introContent>
有什么想法吗?
提前致谢
In my RCP application, I have a intro page, which has a few explanations about the product itself.
But the intro only shows up on the first time that the application is opened.
Is there a way to ask user if he wants to 'never show this again on startup'?
my introContent:
<?xml version="1.0" encoding="utf-8" ?>
<introContent>
<page id="root" content="content/root.xhtml" />
<page id="concept1" content="content/concept1.xhtml" />
<page id="concept2" content="content/concept2.xhtml" />
<contentProvider id="awc"
class="org.eclipse.ui.intro.contentproviders.AlwaysWelcomeCheckbox"
pluginId="org.eclipse.ui.intro">
</contentProvider>
</introContent>
any ideas?
thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在
IWorkbenchPreferenceConstants
。如果这是true,则在启动期间打开介绍页面。您必须自己实现询问用户部分(例如,通过显示
MessageDialogWithToggle
(当 Intro 视图关闭时)。There's a workbench preference
SHOW_INTRO
defined inIWorkbenchPreferenceConstants
. If this is true then intro page is opened during startup.You would have to implement the asking the user part yourself (e.g. by showing a
MessageDialogWithToggle
when the Intro view is closed).我已经完成了以下操作:
这只是一个“alpha”版本,但它正在工作!谢谢你们
i've done the following:
it's just an 'alpha' version, but it's working! thank you guys