Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » how to include help plugin for RCP application
how to include help plugin for RCP application [message #176953] Fri, 27 October 2006 10:03 Go to next message
Eclipse UserFriend
Originally posted by: udupa.sku.gmail.com

Hi all,
I am in trouble. Please help!!!!!

Actually i have a stand alone RCP application. I have also created a help
plugin. Now i want to launch the help when the user presses a perticular
button.

How can i achive this??
Re: how to include help plugin for RCP application [message #176998 is a reply to message #176953] Fri, 27 October 2006 13:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wayne.beaton._NOSPAM_eclipse.org

sku wrote:
> Hi all, I am in trouble. Please help!!!!!
> Actually i have a stand alone RCP application. I have also created a
> help plugin. Now i want to launch the help when the user presses a
> perticular button.
> How can i achive this??

I assume that you mean context-sensitive help. When the user has the
cursor in a field and hits "F1" (or other platform equivalent), you want
to display help for that field.

This is all captured in chapter 13 of "Eclipse Rich Client Platform" by
Jeff McAffer and Jean-Michel Lemieux.

Here's the short version:

Step 1 (add the "PlatformUI" line to your code, substituting the widget
you want F1 help to work in).

private void createSubjectText(Composite parent) {
...
subjectText = new Text(parent, SWT.BORDER);
...
PlatformUI.getWorkbench().getHelpSystem()
.setHelp(subjectText, "org.eclipse.organizer.task.ui.subjectField");
}

In this case, "subjectText" is the widget. The second parameter is the
contextId. This is the combination of the plug-in id and the name of
context in a contexts.xml file (in the project root) like below:

<contexts>
<context id="subjectField">
<description>Capture the subject of the task in this
field.
</description>
<topic
label="Subject Field"
href="html/tasks/editor.html#subjectField"/>
</context>
</contexts>

As you can see, my plug-in id is "org.eclipse.organizer.task.ui".

The help file that is displayed is found in "html/tasks" in the project
root.

Finally, you need to add an extension to your plugin.xml file:

<extension
point="org.eclipse.help.contexts">
<contexts file="contexts.xml"/>
</extension>

You'll have to add org.eclipse.help to your project's dependencies.

Hope this helps,

Wayne
Re: how to include help plugin for RCP application [message #177303 is a reply to message #176998] Mon, 30 October 2006 03:52 Go to previous message
Eclipse UserFriend
Originally posted by: udupa.sku.gmail.com

Thanks a lot.
Previous Topic:Multi-Line Search and Replace
Next Topic:Debuggers help needed
Goto Forum:
  


Current Time: Wed Apr 24 23:47:29 GMT 2024

Powered by FUDForum. Page generated in 0.07696 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top