Bug 165183 - Add index content to Plug-in with sample help content
Summary: Add index content to Plug-in with sample help content
Status: CLOSED WONTFIX
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: bugday, contributed
Depends on:
Blocks:
 
Reported: 2006-11-20 12:24 EST by Chris Goldthorpe CLA
Modified: 2019-11-14 03:37 EST (History)
6 users (show)

See Also:


Attachments
patch to add ability to create a help index (5.46 KB, patch)
2008-01-06 12:37 EST, Les Jones CLA
no flags Details | Diff
Storing for historic purposes (26.28 KB, patch)
2008-01-07 05:22 EST, Les Jones CLA
no flags Details | Diff
Help index that's created using the wizard options (24.34 KB, patch)
2008-01-07 05:32 EST, Les Jones CLA
no flags Details | Diff
Help index that's created using the wizard options (7.02 KB, patch)
2008-01-07 05:36 EST, Les Jones CLA
no flags Details | Diff
Recreate patch (43.26 KB, patch)
2008-01-07 11:23 EST, Les Jones CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Goldthorpe CLA 2006-11-20 12:24:16 EST
If you use the PDE to create a "Plug-in with sample help content" you get some help pages with a sample TOC. A useful addition would be to add some help index content.
Comment 1 Chris Aniszczyk CLA 2006-12-11 23:32:39 EST
do you have a sample of how these indexes would look like? More particularly, how to generate an index.
Comment 2 Chris Goldthorpe CLA 2006-12-13 13:01:33 EST
I'm working on finding a good example. As soon as I have I will attach it.
Comment 3 Chris Goldthorpe CLA 2007-01-26 12:50:04 EST
Sorry for the delay, here's a simple index for use with the sample content. It's not too interesting because the sample content itself is not very interesting but it does illustrate how to create top level and child nodes. Note that it should be possible to include anchors in the index hrefs but see Bug 171725 if you want to reference anchors.

<?xml version="1.0" encoding="UTF-8"?>
<index>
   <entry keyword="main topic">
      <topic href="html/maintopic.html"/>
   </entry>
   <entry keyword="sub topic">
      <topic href="html/subtopic.html"/>
   </entry>
   <entry keyword="enter">
       <entry keyword="enter main topic">
          <topic href="html/maintopic.html"/>
       </entry>
       <entry keyword="enter sub topic">
          <topic href="html/subtopic.html"/>
       </entry>
   </entry>
</index>

Here's the plugin.xml contribution

<extension
         point="org.eclipse.help.index">
      <index
            file="index.xml">
      </index>
 </extension>

Comment 4 Chris Aniszczyk CLA 2007-12-11 14:13:54 EST
set target to 3.4
Comment 5 Chris Aniszczyk CLA 2007-12-11 14:14:21 EST
reassign to inbox, tag bugday
Comment 6 Les Jones CLA 2008-01-06 12:37:02 EST
Created attachment 86275 [details]
patch to add ability to create a help index

Patch optionally creates a help index.

Note: this version of the template will have an invalid index if the concepts, getting started or tasks TOC sections are unticked - that's because it's pages from those sections I've included in the index. (Doesn't go *bang* - just has a index page not found error in the running help - so may well be acceptable?)
Comment 7 Les Jones CLA 2008-01-06 12:45:55 EST
Ahh... just spotted that the "org.eclipse.help.index" extension point doesn't exist in Eclipse 3.0 - need to redo this template for a later Eclipse version. Do you agree zx?  If so, in which templates directory - templates_3.3?  Also, is it worth trying to build up the index.xml file a little more dynamically so that we don't get the missing page issue if the user unticks one of the TOC sections?
Comment 8 Les Jones CLA 2008-01-07 05:22:31 EST
Created attachment 86298 [details]
Storing for historic purposes

Storing some of the work to try to get this template to recognise when it should allow the index to be used. This does not work properly and should not be used!!! (It is being stored for historic reasons incase we want to pick this up again. Development performed against 3.4M4 - i.e. pde.ui v20071213-1300 and pde.ui.templates v20071113-0800)
Comment 9 Les Jones CLA 2008-01-07 05:32:25 EST
Created attachment 86299 [details]
Help index that's created using the wizard options

This patch supercedes the previous one in that the index is now created based on the options selected by the user.
Comment 10 Les Jones CLA 2008-01-07 05:36:40 EST
Created attachment 86300 [details]
Help index that's created using the wizard options

Apologies - the previous patch still had a few left over items from the work on trying to target 3.2 and later. This patch is clean.
Comment 11 Les Jones CLA 2008-01-07 05:40:03 EST
The patch attached now implements the index functionality, but will do this regardless of the target platform. This would cause a problem for users who select the index and are targeting versions prior to 3.2 since the index extension point didn't exist back then.

I'm currently at a loss as to the best way to proceed with getting the template to do exactly what I want, partly due to the issues described in bug 214465. 

Any thoughts on a good way to proceed?
Comment 12 Chris Aniszczyk CLA 2008-01-07 10:46:37 EST
Les, how about moving the help template to templates_3.2 and making sure it only appears in 3.2+ now? I think this is a fair move since we will be discouraging people from creating 3.0 projects soon with 3.1 following eventually. The user base of people that still are on the older versions is small and most people who download 3.4 won't be creating 3.0 or 3.1 projects.

Also, with the latest patch, I can't get it to apply cleanly.

Other than that, nice work. It was very straightforward and easy to read (besides the conflict ;p)
Comment 13 Chris Aniszczyk CLA 2008-01-07 10:47:15 EST
assigning to Les :)
Comment 14 Les Jones CLA 2008-01-07 10:54:47 EST
I'm happy with moving the templates over to the 3.2 directory; certainly the simplest approach.

I wonder if the problem with the re-apply is because the latest CVS version label on the templates is quite old (v20071113-0800). Next time I release the patch I'll do it from HEAD.
Comment 15 Les Jones CLA 2008-01-07 11:23:10 EST
Created attachment 86322 [details]
Recreate patch

Reapplied the changes against HEAD and moved resources to templates_3.2. 

The template still always appears though (even against a 3.0 target) - not sure if I'm missing something obvious?
Comment 16 Brian Bauman CLA 2008-01-07 19:17:46 EST
> The template still always appears though (even against a 3.0 target) - not sure
> if I'm missing something obvious?

I don't know if there is a way to disable a template for a certain version.  What I have been trying to do instead is unchecking/disabling the index option if the user is targeting < 3.2.  I still need to play with this to see if I can do it some way without using internal calls.

Comment 17 Chris Aniszczyk CLA 2008-01-07 19:29:34 EST
I don't think there's anyway to filter out by Eclipse version number. How about updating the template schema to include this information and then we can properly filter out the templates?

In the past, we simply generated code for whatever version you targeted within the templates. The templates were smart enough to deal with this case.

So in reality, I think we need an enhancement here against the PDE template framework.
Comment 18 Brian Bauman CLA 2008-01-09 16:42:48 EST
One possible way to fix this is to promote getTargetVersion() from AbstractFieldData to IFieldData.  This way we could call it from the section to see if we are targeting 3.2+.

Before I forget, this patch does not reference pde.ui so we don't need to apply this one before we reformat the pde.ui plugin.
Comment 19 Lars Vogel CLA 2019-11-14 03:37:19 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.