Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Platform - User Assistance (UA) » Generating a ToC at run-time
Generating a ToC at run-time [message #475694] Mon, 20 July 2009 16:26 Go to next message
Peter Saunders is currently offline Peter SaundersFriend
Messages: 30
Registered: July 2009
Member
Hi

I am displaying a set of external HTML help files from a local filesystem
within
the Eclipse help system as follows:

docDir = getDocDirPreference();
href = "file:" + docDir + "/myhelp.html";
PlatformUI.getWorkbench().getHelpSystem().displayHelpResourc e(href);

The location of the directory containing the external help files is
configurable at run-time and this may affect the precise set of help files
available so I am unable to provide a static Table of Contents file when I
build my plug-in.

If I generated a ToC programatically at run-time, how could I add this to
the help system? Is there an API for this?

Thanks

Peter Saunders
Re: Generating a ToC at run-time [message #475695 is a reply to message #475694] Mon, 20 July 2009 17:20 Go to previous messageGo to next message
Chris Goldthorpe is currently offline Chris GoldthorpeFriend
Messages: 815
Registered: July 2009
Senior Member
Yes, there is an API, see the tocProvider element in the extension point
org.eclipse.help.toc - see
http://help.eclipse.org/galileo/topic/org.eclipse.platform.d oc.isv/reference/extension-points/org_eclipse_help_toc.html

You will probably also want to use the org.eclipse.help.contentProducer
extension point to read the content.

Peter Saunders wrote:
> Hi
>
> I am displaying a set of external HTML help files from a local
> filesystem within
> the Eclipse help system as follows:
>
> docDir = getDocDirPreference();
> href = "file:" + docDir + "/myhelp.html";
> PlatformUI.getWorkbench().getHelpSystem().displayHelpResourc e(href);
>
> The location of the directory containing the external help files is
> configurable at run-time and this may affect the precise set of help
> files available so I am unable to provide a static Table of Contents
> file when I build my plug-in.
>
> If I generated a ToC programatically at run-time, how could I add this
> to the help system? Is there an API for this?
>
> Thanks
>
> Peter Saunders
>
Re: Generating a ToC at run-time [message #475699 is a reply to message #475695] Tue, 21 July 2009 10:03 Go to previous messageGo to next message
Peter Saunders is currently offline Peter SaundersFriend
Messages: 30
Registered: July 2009
Member
Chris Goldthorpe wrote:

> Yes, there is an API, see the tocProvider element in the extension point
> org.eclipse.help.toc - see
>
http://help.eclipse.org/galileo/topic/org.eclipse.platform.d oc.isv/reference/extension-points/org_eclipse_help_toc.html

The AbstractTocProvider class looks useful. Thanks for the pointer.

> You will probably also want to use the org.eclipse.help.contentProducer
> extension point to read the content.

I tried this earlier but the getInputStream() method in my
IHelpContentProducer implementation was never called. Perhaps it is only
called when the plug-in provides corresponding ToC entries.

Peter Saunders
Re: Generating a ToC at run-time [message #475701 is a reply to message #475695] Tue, 21 July 2009 14:18 Go to previous messageGo to next message
Peter Saunders is currently offline Peter SaundersFriend
Messages: 30
Registered: July 2009
Member
Chris Goldthorpe wrote:

> Yes, there is an API, see the tocProvider element in the extension point
> org.eclipse.help.toc - see
>
http://help.eclipse.org/galileo/topic/org.eclipse.platform.d oc.isv/reference/extension-points/org_eclipse_help_toc.html

I've tried implementing a tocProvider based on the example code at:

http://www.eclipse.org/eclipse/platform-ua/documents/provide rs_api.html

but this code does not build for Galileo without modification. When I add
the
missing methods, the "Hello World" ToC contribution does not appear.

I've also looked at the adapting code from the RoboHelp ToC contributor at:

http://tinyurl.com/mws4cn

but that doesn't build for Galileo either.

I note that other developers have also struggled with this. Does anyone
have
an example for Galileo based on the AbstractTocProvider class?

Peter Saunders
Re: Generating a ToC at run-time [message #479420 is a reply to message #475701] Mon, 10 August 2009 23:31 Go to previous message
Chris Goldthorpe is currently offline Chris GoldthorpeFriend
Messages: 815
Registered: July 2009
Senior Member
>
> I note that other developers have also struggled with this. Does anyone
> have
> an example for Galileo based on the AbstractTocProvider class?
>
> Peter Saunders
>

There is an attachment to
https://bugs.eclipse.org/bugs/show_bug.cgi?id=272850 which is a plug-in
which generates a toc.
Re: Generating a ToC at run-time [message #623441 is a reply to message #475694] Mon, 20 July 2009 17:20 Go to previous message
Chris Goldthorpe is currently offline Chris GoldthorpeFriend
Messages: 815
Registered: July 2009
Senior Member
Yes, there is an API, see the tocProvider element in the extension point
org.eclipse.help.toc - see
http://help.eclipse.org/galileo/topic/org.eclipse.platform.d oc.isv/reference/extension-points/org_eclipse_help_toc.html

You will probably also want to use the org.eclipse.help.contentProducer
extension point to read the content.

Peter Saunders wrote:
> Hi
>
> I am displaying a set of external HTML help files from a local
> filesystem within
> the Eclipse help system as follows:
>
> docDir = getDocDirPreference();
> href = "file:" + docDir + "/myhelp.html";
> PlatformUI.getWorkbench().getHelpSystem().displayHelpResourc e(href);
>
> The location of the directory containing the external help files is
> configurable at run-time and this may affect the precise set of help
> files available so I am unable to provide a static Table of Contents
> file when I build my plug-in.
>
> If I generated a ToC programatically at run-time, how could I add this
> to the help system? Is there an API for this?
>
> Thanks
>
> Peter Saunders
>
Re: Generating a ToC at run-time [message #623443 is a reply to message #475695] Tue, 21 July 2009 10:03 Go to previous message
Peter Saunders is currently offline Peter SaundersFriend
Messages: 30
Registered: July 2009
Member
Chris Goldthorpe wrote:

> Yes, there is an API, see the tocProvider element in the extension point
> org.eclipse.help.toc - see
>
http://help.eclipse.org/galileo/topic/org.eclipse.platform.d oc.isv/reference/extension-points/org_eclipse_help_toc.html

The AbstractTocProvider class looks useful. Thanks for the pointer.

> You will probably also want to use the org.eclipse.help.contentProducer
> extension point to read the content.

I tried this earlier but the getInputStream() method in my
IHelpContentProducer implementation was never called. Perhaps it is only
called when the plug-in provides corresponding ToC entries.

Peter Saunders
Re: Generating a ToC at run-time [message #623444 is a reply to message #475695] Tue, 21 July 2009 14:18 Go to previous message
Peter Saunders is currently offline Peter SaundersFriend
Messages: 30
Registered: July 2009
Member
Chris Goldthorpe wrote:

> Yes, there is an API, see the tocProvider element in the extension point
> org.eclipse.help.toc - see
>
http://help.eclipse.org/galileo/topic/org.eclipse.platform.d oc.isv/reference/extension-points/org_eclipse_help_toc.html

I've tried implementing a tocProvider based on the example code at:

http://www.eclipse.org/eclipse/platform-ua/documents/provide rs_api.html

but this code does not build for Galileo without modification. When I add
the
missing methods, the "Hello World" ToC contribution does not appear.

I've also looked at the adapting code from the RoboHelp ToC contributor at:

http://tinyurl.com/mws4cn

but that doesn't build for Galileo either.

I note that other developers have also struggled with this. Does anyone
have
an example for Galileo based on the AbstractTocProvider class?

Peter Saunders
Re: Generating a ToC at run-time [message #623455 is a reply to message #475701] Mon, 10 August 2009 23:31 Go to previous message
Chris Goldthorpe is currently offline Chris GoldthorpeFriend
Messages: 815
Registered: July 2009
Senior Member
>
> I note that other developers have also struggled with this. Does anyone
> have
> an example for Galileo based on the AbstractTocProvider class?
>
> Peter Saunders
>

There is an attachment to
https://bugs.eclipse.org/bugs/show_bug.cgi?id=272850 which is a plug-in
which generates a toc.
Previous Topic:Is it possible to replace a forms title with StyledText?
Next Topic:Some index terms using path to href instead of title
Goto Forum:
  


Current Time: Tue Mar 19 05:02:04 GMT 2024

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

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

Back to the top