Show Eclipse RCP's welcome page at every startup
Is there a way to force an RCP product to show a welcome page every time it the RCP was stared? (By default, the Welcome page is only shown for the first time the RCP is stared.)
I tried org.eclipse.ui/SHOW_INTRO=true
in plugin_customization.ini, but it did not do the tr开发者_StackOverflow中文版ick...
Thanks, Frank
Alternatively you can set this programmatically, e.g. in your WorkbenchAdvisor's initialize Method.
PrefUtil.getAPIPreferenceStore().setValue(
IWorkbenchPreferenceConstants.SHOW_INTRO, true);
PrefUtil.saveAPIPrefs();
But since PrefUtil is an internal class this is only recommended if you can't set this property in your xml (e.g. you have an intro which is not based on the Standard Intro page)
PS: The problem you have is that as the intro appears, the preference property you have set via plugin.customization is set to false, and plugin_customization only sets preference store default values, as soon as as any component sets the value, the default value becomes obsolete. With this two-liner you're setting this preference key to true on every startup and the intro will appear.
In your intro xml you can have something like
<contentProvider id="awc" class="org.eclipse.ui.intro.contentproviders.AlwaysWelcomeCheckbox" pluginId="org.eclipse.ui.intro">
<text></text>
</contentProvider>
that allows the user to chose whether the intro page is shown every time. It displays a small checkbox wherever you place it. Don't know if it is possible to have it enabled by default.
If you don't want this, you could probably have it defined somehow in your workbench.xml
and explicitly load the intro screen when you restore the RCP session.
Remove the -showsplash
"intro" element has an attribute "contentDetector".
contentDetector - a fully qualified name of a class extending org.eclipse.ui.intro.IntroContentDetector. This optional class is used to detect newly added introduction content. If new content is available, the view showing the introduction will be opened again.
http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fextension-points%2Forg_eclipse_ui_intro.html
精彩评论