Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to add context sensitive help to Import Wizard(How can I add an Help button in a standard import dialog/wizard? Or how to add the context sensitive help system to a predefined import dialog/wizard?)
How to add context sensitive help to Import Wizard [message #933149] Thu, 04 October 2012 19:38
David Ip is currently offline David IpFriend
Messages: 1
Registered: June 2012
Junior Member
How can I add an Help button in a standard import dialog/wizard? Or how to add the context sensitive help system to a predefined import dialog/wizard?

I extended the "org.eclipse.ui.menus" to add an import button in the toolbar. I also extended the "org.eclipse.ui.importWizards" to add an wizard id = "com.company.product.module.ui.wizards.ABCWizard" under the category id = "com.company.product.module.ui.myresources".

By doing all these I am able to see an import button in the toolbar. When I click on it an import dialog/wizard appears and it shows "My Resources" category and followed with "Import ABC resource". If I select "Import ABC resource" and click Next, it will go to my wizard page. The codes are below.

<plugin>
<extension point="org.eclipse.ui.menus">
<menuContribution
allPopups="false"
locationURI="toolbar:org.eclipse.ui.main.toolbar">
<toolbar
id="com.company.product.module.rcp.toolbar">
<command
commandId="org.eclipse.ui.file.import"
label="Import"
style="push">
</command>
</toolbar>
</menuContribution>
</extension>
<extension
point="org.eclipse.ui.importWizards">
<category
id="com.company.product.module.ui.myresources"
name="My Resources">
</category>
<wizard
category="com.company.product.module.ui.myresources"
class="com.company.product.module.ui.wizards.ABCWizard"
id="com.company.product.module.ui.wizards.ABCWizard"
name="Import ABC resource">
<description>Import ABC resource.</description>
</wizard>
</plugin>

Then I set up a contextId in the contexts.xml file for my wizard page and add a function named performHelp() in my wizard page class. So when the import dialog/wizard shows my wizard and I press CONTROL/F1 (Linux machine) a help page appeared on the right. So far so good. But when I pressed the Back button and Next again Eclipse throws an exception.

Thanks.

[Updated on: Thu, 04 October 2012 19:56]

Report message to a moderator

Previous Topic:Quick Context View from Navigate Menu
Next Topic:Bundle Resolved before Fragment
Goto Forum:
  


Current Time: Fri Apr 26 01:17:47 GMT 2024

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

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

Back to the top