Programmatically redefine Eclipse Help file location

225 Views Asked by At

Adding Help to Eclipse plugin is as simple as 2 files:

plugin.xml

<extension
     point="org.eclipse.help.toc">
  <toc
        file="HelpToc.xml"
        primary="true">
  </toc>
</extension>

HelpToc.xml

<?xml version="1.0" encoding="UTF-8"?>
<?NLS TYPE="org.eclipse.help.toc"?>

<toc label="Enide Maven README" topic=".README.md.html">
</toc>

Then help .html is created with GFMV plugin in .md file:

Is there way to redefine help .html file file location programmatically?

The goal is to enable taking Help content from generated at runtime docs (e.g. JavaDocs .htmls)

2

There are 2 best solutions below

0
On

I haven't dug into it much, but have you checked out the tocProvider attribute of the org.eclipse.help.toc extension point?

1
On

An alternative is to have a help plugin that only defines anchors, then you can generate separate plugins with the help content you want and just hook into the anchors. That way you will also achieve separation between the actual table of contents and the help contents.