Re: How to Show the standalone Help at a specific contextid topic. [message #589077] |
Thu, 25 October 2007 19:44 |
Eric Rizzo Messages: 3070 Registered: July 2009 |
Senior Member |
|
|
Drew Frantz wrote:
> For certain pieces of online help I want to display the standalone help
> sytem instead of the dynamic help window embedded in the workbench.
> Unforuneately all I have is the context Id and there does not seem to be a
> way to convert the context id into the URL I need to call
> displayHelpResource. is there a way to display the standalon help given a
> contextId? Also note this is an RCP app, and the static HelpSystem class is
> not available for my RCP app.
> IWorkbenchHelpSystem theHelp = PlatformUI.getWorkbench().getHelpSystem();
>
> theHelp.displayHelpResource(sAll_I_Have_is_a_ContextId_Not_a n_href);
Why is HelpSystem not available? Is there some reason that your RCP app
can't include the org.eclipse.help plugin?
I use a helper method (no pun intended) like this:
public static String resolveHelpHref(String contextID) {
String result = null;
IContext context = HelpSystem.getContext(contextID);
if (context != null) {
IHelpResource[] topics = context.getRelatedTopics();
if (topics.length > 0) {
result = topics[0].getHref();
}
}
return result;
}
Also, you might get more response to questions like this on the
eclipse.platform.ua newsgroup instead - I've added it to this thread.
Hope this helps,
Eric
|
|
|
Powered by
FUDForum. Page generated in 0.03071 seconds