Wednesday, October 28, 2009

What did I learn today - Invoking help from Welcome Screen in Eclipse RCP

I wanted to know how to launch help window from the welcome screen. From the welcome screen, either we could link to other html pages or we could link to help content. Since the help content topics are already in help, it makes more sense not to duplicate it, but to link to it. Basically, when I click on "How to do feature X?" link in welcome screen, I want my Help window to open up and go to that topic directly. Very similar to context sensitive help, but from welcome screen.

After some fight, I got it working. If you want to link from the intro content xml file, you can add this within the page.

<page id="root" style="content/root.css" style-id="page">
<group id="Introduction">
<link label="Getting started" url="http://org.eclipse.ui.intro/showHelpTopic?id=/my.test.plugin.help/html/intro1.html" id="intro1">
</link>
</group>
</page>

Or, if you need to launch help topic from within the html or xhtml welcome screen pages, you could use this:

<body>
<div id="header">
<h1>My Application</h1>
</div>
<div id="content">
<li>
<a href="http://org.eclipse.ui.intro/showHelpTopic?id=/my.test.plugin.help/html/intro1.html" id="intro1">
Getting started with my application.
</a>
</li>
</div>
</body>

Here my.test.plugin.help is the id of my help plugin.


No comments: