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

Bug 520996

Summary: [9] JavaDocLocations should support module doc
Product: [Eclipse Project] JDT Reporter: Stephan Herrmann <stephan.herrmann>
Component: UIAssignee: Kalyan Prasad Tatavarthi <kalyan_prasad>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: noopur_gupta
Version: 4.7   
Target Milestone: BETA J9   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/103352
https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=4cbf353213edb3646ac7f750fadb500503154cee
https://bugs.eclipse.org/bugs/show_bug.cgi?id=539684
Whiteboard:
Bug Depends on: 521256    
Bug Blocks:    

Description Stephan Herrmann CLA 2017-08-15 16:54:10 EDT
We should be able to show module summaries like

http://cr.openjdk.java.net/~mr/jigsaw/spec/api/java.base-summary.html

For this, JavaDocLocations needs a new method appendModulePath(), to be called from getJavadocLocation()
Comment 1 Noopur Gupta CLA 2017-08-18 05:51:18 EDT
Kalyan, please have a look.
Comment 2 Eclipse Genie CLA 2017-08-21 04:26:14 EDT
New Gerrit change created: https://git.eclipse.org/r/103352
Comment 3 Kalyan Prasad Tatavarthi CLA 2017-08-21 04:48:01 EDT
The Gerrit patch adds a new appendModulePath() method to JavaDocLocations and the module summaries will be shown like

http://download.java.net/java/jdk9/docs/api/java.base-summary.html
Comment 4 Noopur Gupta CLA 2017-08-22 07:42:43 EDT
Stephan, could you please help with a quick initial review for this patch?
Comment 5 Stephan Herrmann CLA 2017-08-22 10:00:40 EDT
(In reply to Noopur Gupta from comment #4)
> Stephan, could you please help with a quick initial review for this patch?

I've dropped a comment in gerrit, but found the feature to be blocked by required changes in JDT/Core : bug 521256
Comment 6 Stephan Herrmann CLA 2017-08-22 10:22:13 EDT
For testing please fetch the preliminary Core fix from  https://git.eclipse.org/r/103463

In my experiments I noticed that all links in Java 9 javadoc open in a browser instead of staying/opening in the hover. Can this be fixed in UI or are more fixes needed in Core?
Comment 7 Kalyan Prasad Tatavarthi CLA 2017-08-23 07:24:41 EDT
(In reply to Stephan Herrmann from comment #6)
> For testing please fetch the preliminary Core fix from 
> https://git.eclipse.org/r/103463
> 
> In my experiments I noticed that all links in Java 9 javadoc open in a
> browser instead of staying/opening in the hover. Can this be fixed in UI or
> are more fixes needed in Core?

I have updated the Gerrit Patch as per stephan's comments.

I have seen that If the source is added for the Java 9, then the links in Java 9 javadoc open in hover. Else they open in the browser. This behavior is same for Java 8. If you are seeing a different behavior , please provide the steps to reproduce.

One observation is that, if the Source is added for Java9, then the Module javadoc is fetched from module-info.java file for the module and not from the javadoc link.
Comment 8 Stephan Herrmann CLA 2017-08-23 17:37:34 EDT
(In reply to Kalyan Prasad Tatavarthi from comment #7)
> I have seen that If the source is added for the Java 9, then the links in
> Java 9 javadoc open in hover. Else they open in the browser. This behavior
> is same for Java 8. If you are seeing a different behavior , please provide
> the steps to reproduce.
> 
> One observation is that, if the Source is added for Java9, then the Module
> javadoc is fetched from module-info.java file for the module and not from
> the javadoc link.

You're right, I just never noticed this difference. So all seems well with this change. Thanks.
Comment 10 Stephan Herrmann CLA 2017-08-23 17:54:41 EDT
(In reply to Eclipse Genie from comment #9)
> Gerrit change https://git.eclipse.org/r/103352 was merged to [BETA_JAVA9].
> Commit:
> http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=4cbf353213edb3646ac7f750fadb500503154cee
> 

rebased then released.
Comment 11 Noopur Gupta CLA 2017-08-24 01:50:48 EDT
Thanks, Kalyan and Stephan.