Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350828 - CDT doc bundles should include a pre-built help index
Summary: CDT doc bundles should include a pre-built help index
Status: VERIFIED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-doc (show other bugs)
Version: 8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 8.0.2   Edit
Assignee: Marc-André Laperle CLA
QA Contact: Doug Schaefer CLA
URL:
Whiteboard:
Keywords:
Depends on: 366319
Blocks:
  Show dependency tree
 
Reported: 2011-06-30 09:39 EDT by Martin Oberhuber CLA
Modified: 2012-05-22 15:55 EDT (History)
3 users (show)

See Also:


Attachments
Patch providing a prebuilt doc index (13.98 KB, patch)
2011-06-30 09:39 EDT, Martin Oberhuber CLA
cdtdoug: iplog+
Details | Diff
Patch (8.85 KB, patch)
2011-12-18 12:21 EST, Marc-André Laperle CLA
malaperle: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Oberhuber CLA 2011-06-30 09:39:58 EDT
Created attachment 198911 [details]
Patch providing a prebuilt doc index

When searching Eclipse Help for the first time, a search index has to be built. The speed of doing so can be drastically improved when the doc plugin ships a prebuilt help index. 

CDT help should include such an index, such that adopters can search docs faster.

Attached patch adds the pre-built index to the docs when building them.
Please consider for inclusion.
Comment 1 Martin Oberhuber CLA 2011-07-29 12:35:42 EDT
Ping, could my patch be considered ?
Comment 2 Martin Oberhuber CLA 2011-08-09 08:01:28 EDT
Ping, could the patch be considered ?

The patch looks larger than it actually is, because it includes the customBuildCallbacks.xml template (which is unchanged from PDE). The actual hooking-in is minor (couple of one-liners).
Comment 3 Martin Oberhuber CLA 2011-09-07 05:29:50 EDT
Ping, could this change be considered or is it a problem since CDT builds with Tycho now?

Even if building with Tycho, attached patch should be committed as a first step. Tycho support can be added then, as per the suggestion in bug 350861 comment 3 .
Comment 4 Doug Schaefer CLA 2011-09-12 14:44:15 EDT
Patch applied. Thanks Martin.
Comment 5 CDT Genie CLA 2011-09-12 15:23:08 EDT
*** cdt git genie on behalf of Doug Schaefer ***

    Bug 350828 - Prebuild indexes for docs.

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=11f79103687f8fffa3ab829f20070dc0d2defbbd
Comment 6 Martin Oberhuber CLA 2011-09-29 13:50:42 EDT
CQ:WIND00308331

As of Indigo SR1, the index is not shipped in the cdt.doc.user plugin - leading to following message in the error log:

Error
Thu Sep 29 08:31:02 EDT 2011
Help index declared, but missing for plugin org.eclipse.cdt.doc.user.

The reason for this could either be that Tycho doesn't call the correct PDE Build ant hook for generating the index; or, that the index is not declared in the build.properties file.
Comment 7 Martin Oberhuber CLA 2011-11-16 15:16:13 EST
Ping, gentle reminder that this is still an issue for our product.
Indigo SR 2 is approaching fast ...
Comment 8 Marc-André Laperle CLA 2011-11-19 20:02:34 EST
(In reply to comment #3)
> Ping, could this change be considered or is it a problem since CDT builds with
> Tycho now?
> 
> Even if building with Tycho, attached patch should be committed as a first
> step. Tycho support can be added then, as per the suggestion in bug 350861
> comment 3 .

CDT builds with Tycho so it is a problem. I tried to make it run with plain Ant but ran into a NPE because the BundleContext is missing. Like you mentioned in bug 350861 comment 3, we need to figure out a way to execute antRunner from Tycho.

Also, note that the patch was only applied to 8.0.x, it needs to be applied to the master branch (for the Juno release and beyond).
Comment 9 Martin Oberhuber CLA 2011-11-21 11:45:41 EST
(In reply to comment #8)
> I tried to make it run with plain Ant but ran into a NPE

Thanks for working on this.

> Like you mentioned in bug 350861 comment 3, we need to figure out a way to
> execute antRunner from Tycho.

The commandline in bug 350861 comment 3 is being used successfully in my company to generate pre-built indexes from a Linux commandline. So I'd suppose it should work from within Tycho as well ?
Comment 10 Marc-André Laperle CLA 2011-11-26 15:44:21 EST
(In reply to comment #9)
> The commandline in bug 350861 comment 3 is being used successfully in my
> company to generate pre-built indexes from a Linux commandline. So I'd suppose
> it should work from within Tycho as well ?

Sorry for the delay, a lot of this is new to me. Here's the progress I've done:

As far as I can tell, Tycho doesn't provide a "standard" Eclipse installation, so
$ECLIPSE_HOME/plugins/org.eclipse.equinox.launcher_*.jar
needs a replacement. Using 
.m2\repository\p2\osgi\bundle\org.eclipse.equinox.launcher
doesn't quite work since it can't find the osgi framework. This is because there is no config.ini that points to it. Using $ECLIPSE_HOME/plugins/org.eclipse.equinox.launcher_*.jar worked because it actually uses the config.ini from the $ECLIPSE_HOME\configuration folder.

Tycho runs plugin tests by executing a Maven Mojo in tycho-surefire-plugin and it generates the config.ini file that includes a list of all the required bundles. I think building the help index should work the same way: it should be a Maven Mojo that creates an Eclipse installation (config.ini) and executes the right command using that installation. I made a prototype of such Mojo and it does indeed work. Now I just need to clean it up a bit and publish it somewhere (Tycho?).
Comment 11 Martin Oberhuber CLA 2011-11-28 08:45:27 EST
Whow... this sounds harder than I expected. Thanks for the hard work!
Comment 12 Martin Oberhuber CLA 2011-12-09 05:27:20 EST
Ping, is this progressing ? Can I help somehow ? 

It sounds a bit like the code you're creating now for making this happen for CDT should really be a Tycho plugin eventually such that all projects can benefit ...
Comment 13 Andrey Loskutov CLA 2011-12-09 07:49:12 EST
Just for the record: 2 (not one!) CDT plugins are missing index:

Help index declared, but missing for plugin org.eclipse.cdt.doc.user.
Help index declared, but missing for plugin org.eclipse.cdt.doc.isv.
Comment 14 Igor Fedorenko CLA 2011-12-09 09:57:36 EST
(In reply to comment #12)
> Ping, is this progressing ? Can I help somehow ? 
> 
> It sounds a bit like the code you're creating now for making this happen for
> CDT should really be a Tycho plugin eventually such that all projects can
> benefit ...

I am certainly interested in adding documentation index generation to Tycho. I am not sure if this should be done as a generic "execute eclipse application" goal or something specific for documentation, but we can discuss this on tycho-dev mailing list.
Comment 15 Marc-André Laperle CLA 2011-12-18 12:21:24 EST
Created attachment 208527 [details]
Patch

We will wait for Tycho 0.14 to be released before making the changes.
Comment 16 Marc-André Laperle CLA 2012-01-07 21:40:48 EST
Sorry, it's unlikely that this will make it in 8.0.2. At this point, I don't see us moving to Tycho 0.14 even it releases before SR2, it'll be too close. Now targeting Juno.
Comment 17 Martin Oberhuber CLA 2012-01-09 04:12:39 EST
Hm... that's bad for our product.

If I'm not mistaken, your original solution had been working with Tycho 0.13 ... so while it's clear that an ideal solution comes with Tycho, isn't there a chance to do what you alrady did with the older Tycho too ?
Comment 18 Marc-André Laperle CLA 2012-01-09 11:51:31 EST
(In reply to comment #17)
> Hm... that's bad for our product.
> 
> If I'm not mistaken, your original solution had been working with Tycho 0.13
> ... so while it's clear that an ideal solution comes with Tycho, isn't there a
> chance to do what you alrady did with the older Tycho too ?

I can make a version of the plugin that works with Tycho 0.13 but it needs to be published somewhere. 

Igor, would https://oss.sonatype.org be an appropriate place for this?
Comment 19 Igor Fedorenko CLA 2012-01-09 11:54:27 EST
(In reply to comment #18)
> (In reply to comment #17)
> > Hm... that's bad for our product.
> > 
> > If I'm not mistaken, your original solution had been working with Tycho 0.13
> > ... so while it's clear that an ideal solution comes with Tycho, isn't there a
> > chance to do what you alrady did with the older Tycho too ?
> 
> I can make a version of the plugin that works with Tycho 0.13 but it needs to
> be published somewhere. 
> 
> Igor, would https://oss.sonatype.org be an appropriate place for this?

I don't really have an opinion, as long as the plugin does not use org.eclipse.tycho* groupId.
Comment 20 Marc-André Laperle CLA 2012-01-15 04:04:05 EST
Fixed in 8.0.2 and master > 2012-01-15.

For a version of the plugin compatible with Tycho 0.13, see
http://code.google.com/a/eclipselabs.org/p/tycho-eclipserun-plugin/

groupId is com.google.code.tycho-eclipserun-plugin
Comment 21 Marc-André Laperle CLA 2012-01-21 22:47:30 EST
Verified in 8.0.2 RC1. I don't see the error message anymore.
Comment 22 CDT Genie CLA 2012-02-29 13:21:23 EST
*** cdt git genie on behalf of Marc-Andre Laperle ***

    Bug 350828 - CDT doc bundles should include a pre-built help index.
    Also restore building javadoc and extension documentation.

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=661184df67cdc65bfcbbd294f333c8e641ef4577
Comment 23 CDT Genie CLA 2012-02-29 13:21:27 EST
*** cdt git genie on behalf of Marc-Andre Laperle ***

    Bug 350828 - CDT doc bundles should include a pre-built help index.
    Also restore building javadoc and extension documentation.

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=43c82a33663c4f1cf77def92739241a0a4addf7e
Comment 24 CDT Genie CLA 2012-02-29 13:21:28 EST
*** cdt git genie on behalf of Doug Schaefer ***

    Bug 350828 - Prebuild indexes for docs.

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=d81d0b24e75afe2e5463a81d8b1049059ceadca4