Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 407915

Summary: New Javadoc problems in E4 APIs (doesn't find org.osgi.service.event.* etc.)
Product: [Eclipse Project] Platform Reporter: Markus Keller <markus.kell.r>
Component: DocAssignee: Markus Keller <markus.kell.r>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: john.arthorne, markus.kell.r, Michael_Rennie, tjwatson
Version: 4.3Flags: tjwatson: review+
Target Milestone: 4.3 RC1   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 407201    
Bug Blocks:    
Attachments:
Description Flags
proposed fix none

Description Markus Keller CLA 2013-05-13 12:23:09 EDT
Created attachment 230883 [details]
proposed fix

After most problems from bug 406780 had been fixed, new problems appeared in http://download.eclipse.org/eclipse/downloads/drops4/I20130508-2000/compilelogs/platform.doc.isv.javadoc.txt , e.g.:

../../../eclipse.platform.runtime/bundles/org.eclipse.e4.core.services/src/org/eclipse/e4/core/services/events/IEventBroker.java:16: error: package org.osgi.service.event does not exist
import org.osgi.service.event.EventHandler;
                             ^

platformOptions.txt contains this entry, which probably never worked:

;${rt.equinox.framework.bundles}/org.eclipse.osgi.services/${dot.classes}

In the CBI build, ${dot.classes} expands to "target/classes", which doesn't exist since the repo already contains pre-compiled class files. The

-link http://www.osgi.org/javadoc/r5/core

already provides link targets for packages like org.osgi.framework. However, things like EventHandler, Event, HttpService, etc. are only available in http://www.osgi.org/javadoc/r5/enterprise/ . I don't quite understand why they are not taken from the outdated http://www.osgi.org/javadoc/r4v42/ (which should be removed anyway).

I guess the right solution is to drop the org.eclipse.osgi.services bundle from Javadoc generation and add the r5/enterprise as link.

Alternative would be to turn the -classpath reference for org.eclipse.osgi.services into a -sourcepath entry, but that would also mean we would need to generate Javadoc for that bundle. But that would be the first bundle with org.osgi.** packages for which we generate Javadoc.
Comment 1 Markus Keller CLA 2013-05-13 12:24:05 EDT
Tom, does that look OK?
Comment 2 Thomas Watson CLA 2013-05-13 14:25:57 EDT
(In reply to comment #0)
> Created attachment 230883 [details]
> proposed fix
> 
> After most problems from bug 406780 had been fixed, new problems appeared in
> http://download.eclipse.org/eclipse/downloads/drops4/I20130508-2000/
> compilelogs/platform.doc.isv.javadoc.txt , e.g.:
> 
> ../../../eclipse.platform.runtime/bundles/org.eclipse.e4.core.services/src/
> org/eclipse/e4/core/services/events/IEventBroker.java:16: error: package
> org.osgi.service.event does not exist
> import org.osgi.service.event.EventHandler;
>                              ^
> 
> platformOptions.txt contains this entry, which probably never worked:
> 
> ;${rt.equinox.framework.bundles}/org.eclipse.osgi.services/${dot.classes}

Not sure but this could have started to fail with us trying to fix bug 407201.

> 
> In the CBI build, ${dot.classes} expands to "target/classes", which doesn't
> exist since the repo already contains pre-compiled class files. The
> 
> -link http://www.osgi.org/javadoc/r5/core
> 
> already provides link targets for packages like org.osgi.framework. However,
> things like EventHandler, Event, HttpService, etc. are only available in
> http://www.osgi.org/javadoc/r5/enterprise/ . I don't quite understand why
> they are not taken from the outdated http://www.osgi.org/javadoc/r4v42/
> (which should be removed anyway).

I agree we should update the URL, perhaps the javadoc is not continuing its search after failing to find it in the org.eclipse.osgi.services location.  Seems hard to believe though.

> 
> I guess the right solution is to drop the org.eclipse.osgi.services bundle
> from Javadoc generation and add the r5/enterprise as link.

It is worth a try.  I would opt for an r5/cmpn link, but the R5 compendium specification has not been released just yet.

> 
> Alternative would be to turn the -classpath reference for
> org.eclipse.osgi.services into a -sourcepath entry, but that would also mean
> we would need to generate Javadoc for that bundle. But that would be the
> first bundle with org.osgi.** packages for which we generate Javadoc.

I worry about this option since the org.eclipse.osgi.services project already is giving us other headaches.  For luna I want to attempt to get this project to be built properly instead of just using binary classes we get from OSGi.
Comment 4 Markus Keller CLA 2013-05-14 08:04:33 EDT
The .class files still need to be on the -classpath, even if a proper -link is specified. Now that bug 407201 comment 28 has reverted the changes in org.eclipse.osgi.services, we can use this -classpath entry again:

;${rt.equinox.framework.bundles}/org.eclipse.osgi.services/${dot.classes}

Depending on further changes for bug 407201, this reference needs to be adapted again to point to the actual location of the .class files. Right now, it would also work without the final "${dot.classes}".

Fixed with http://git.eclipse.org/c/platform/eclipse.platform.common.git/commit/?id=eeeda8bc425ffc3164519a9b5f58b2585949beaf
Comment 5 Markus Keller CLA 2013-05-17 07:04:06 EDT
Verified in I20130516-2200.