creating a nested table of contents structure [message #648256] |
Wed, 12 January 2011 00:54  |
Eclipse User |
|
|
|
Hi.
I am attempting to create a nested toc structure in my help plugin. I want my main toc.xml bring in the nested, modular toc.xml files that exist within the structure of my plugin directory tree.
In my top-level toc.xml I have this:
<topic label="Reference" >
<topic label="my-lib">
<topic label="Version X" href="html/reference/my-lib/version-x/index.html">
<link toc="html/reference/my-lib/version-x/toc.xml"></link>
</topic>
<topic label="Version Y" href="html/reference/my-lib/version-y/index.html">
<link toc="html/reference/my-lib/version-y/toc.xml"></link>
</topic>
</topic>
</topic>
Then, the nested toc.xml files look like this (for example, Version X):
<toc label="Version X">
<topic label="foo function" href="html/reference/my-lib/version-x/foo.html"/>
...
</toc>
(there are more <topic> elements, too many to include here.)
The help table of contents does show the structure correctly down to Reference/my-lib/Version X, but instead of making Version X into a book with subtopics from its linked toc.xml, it only shows Version X as a single topic page (i.e. a page icon), with nothing underneath. When I click on Version X in the tree it does locate the index.html specified in its href attribute. (Same behavior goes for Version Y.)
So it looks like the <link> elements don't do anything. There is no error logged when the help loads.
I have seen this working in a different help plugin. The toc was not nested as deeply, but the mechanism and directory structure is exactly the same.
What are some probable causes for <link> to fail, or at least not work as I'm expecting it to in this case? Is there someplace else to look for debugging output besides the error log?
Thanks for any assistance,
John
|
|
|
|
Re: creating a nested table of contents structure [message #648461 is a reply to message #648436] |
Wed, 12 January 2011 19:29   |
Eclipse User |
|
|
|
Hi Chris thanks for the help..
I think you are right, it must be the paths. But in the plugin where this nesting mechanism works, I have the paths expressed in the same way as they are in the "broken" plugin.
Sooo...you said:
Quote: |
The topics in the child toc have a path of html/reference/my-lib/version-x/foo.html relative to the child toc, or html/reference/my-lib/version-x/html/reference/my-lib/versio n-x/foo.html relative to bundle.
|
Which way are the paths in the child toc supposed to be? I thought all the paths in a toc.xml (even in a linked toc.xml that resides in a subdirectory) were supposed to be specified from the root of the bundle, so in my case that would be:
html/reference/my-lib/version-x/foo.html
Likewise, the <link> element in my top-level toc.xml (which resides at the root of the plugin) has:
html/reference/my-lib/version-x/toc.xml
Note the actual directory structure for the html looks like this:
html/reference/my-lib/version-x
NOT like this:
html/reference/my-lib/version-x/html/reference/my-lib/version-x
When I use Eclipse to edit these toc.xml files, I can browse to the location of each topic. The path Eclipse itself puts in is exactly like I have it (but note, the linked toc still does not display properly).
Incidentally, when I package this help plugin up as a jar file instead of a plain directory, my table of contents doesn't show up in the help at all..
Tracing did not show any other information that could help.
Thanks again...
|
|
|
|
|
Re: creating a nested table of contents structure [message #648678 is a reply to message #648674] |
Thu, 13 January 2011 18:57   |
Eclipse User |
|
|
|
Chris, this whole thing is getting weirder and weirder.
I have the plugin exported to a directory. Today I dropped it into the Eclipse plugins folder and when Eclipse started, I had this error in the log:
!ENTRY org.eclipse.equinox.p2.engine 4 4 2011-01-13 14:20:07.929
!MESSAGE An error occurred while installing the items
!SUBENTRY 1 org.eclipse.equinox.p2.engine 4 0 2011-01-13 14:20:07.929
!MESSAGE session context was:(profile=SDKProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Install, operand=null --> [R]net.mycompany.myplugin 11.1.0.1, action=org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction).
!SUBENTRY 1 org.eclipse.equinox.p2.touchpoint.eclipse 4 0 2011-01-13 14:20:07.929
!MESSAGE The artifact file for osgi.bundle,net.mycompany.myplugin,11.1.0.1 was not found.
I don't even know what this means. What is an artifact file?
So I shut down Eclipse, and I removed the plugin from the Eclipse installation (by deleting the directory). Launched Eclipse with just the basics, and started the help. Alls well, my help isn't in there. There is some sanity in the world. Or is there?
I then took the exact same plugin directory, and copied it again into the same Eclipse installation. Start Eclipse and...whoa what's this? NO ERROR in the log. AND, the table of contents now works perfectly.
I know I sound like a crazy person who has tons of issues but here are the facts: I started eclipse with my plugin installed and got an error in the log. I shut down Eclipse. I removed the plugin. I recopied the exact same, unchanged plugin back into Eclipse. I restart Eclipse and this time it works.
So I still have no idea what caused the original problem, and it looks like it's some kind of spurious unreproducible star alignment conundrum. Utterly bizarre.
Thanks again,
John
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04039 seconds