Bug 119844 - javadoc extraction: type comment
Summary: javadoc extraction: type comment
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.2 RC1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-08 06:48 EST by Tom Hofmann CLA
Modified: 2006-04-13 09:40 EDT (History)
2 users (show)

See Also:


Attachments
Picture with Javadoc from source (4.66 KB, image/png)
2006-04-03 05:21 EDT, Dani Megert CLA
no flags Details
Possible look of Javadoc from attached Javadoc (11.16 KB, image/png)
2006-04-03 05:22 EDT, Dani Megert CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Hofmann CLA 2005-12-08 06:48:31 EST
I20051206

Extraction of javadoc from HTML attachments works great for methods, but when hovering over a type, the comment is preceded by the type's hierarchy.

This means that the javadoc hover shown for types does not contain any usable information. The user has to press F2 and scroll down to get to the comment text.

I assume that cutting out the hierarchy is non-trivial since the javadoc format differs between doclets and there is no pseudo-tag (as the JavadocConstants) after the hierarchy. IMO it would still be worth having some special code (in jdt-core or jdt-ui land) that deals with this situation.
Comment 1 Philipe Mulet CLA 2006-03-16 04:05:15 EST
Olivier - could you investigate detecting the end of non interesting material ?
A heuristic is all we are looking for I believe.
Comment 2 Philipe Mulet CLA 2006-03-16 04:06:28 EST
When removing src attachment on rt.jar, and hover on List, the hover shows:

java.util 
Interface List<E>
All Superinterfaces: 
Collection<E>, Iterable<E> 
All Known Implementing Classes: 
AbstractList, AbstractSequentialList, ArrayList, AttributeList, CopyOnWriteArrayList, LinkedList, RoleList, RoleUnresolvedList, Stack, Vector 

--------------------------------------------------------------------------------

public interface List<E>extends Collection<E>

An ordered collection (also known as a sequence
java.util 
Interface List<E>
All Superinterfaces: 
Collection<E>, Iterable<E> 
All Known Implementing Classes: 
AbstractList, AbstractSequentialList, ArrayList, AttributeList, CopyOnWriteArrayList, LinkedList, RoleList, RoleUnresolvedList, Stack, Vector 

--------------------------------------------------------------------------------

public interface List<E>extends Collection<E>

An ordered collection (also known as a sequence ...
Comment 3 Olivier Thomann CLA 2006-03-16 08:47:39 EST
I will investigate.
Comment 4 Olivier Thomann CLA 2006-03-31 20:15:23 EST
What are you expecting to be cut out?
The hierarchy? And you want to keep the class description?
Comment 5 Dani Megert CLA 2006-04-03 05:20:39 EDT
>What are you expecting to be cut out?
>The hierarchy? And you want to keep the class description?
Yes, just the hierarchy - basically that it looks similar to the Javadoc which is constructed from attached source (see attached example).
Comment 6 Dani Megert CLA 2006-04-03 05:21:19 EDT
Created attachment 37492 [details]
Picture with Javadoc from source
Comment 7 Dani Megert CLA 2006-04-03 05:22:05 EDT
Created attachment 37493 [details]
Possible look of Javadoc from attached Javadoc
Comment 8 Dani Megert CLA 2006-04-03 05:25:03 EDT
The problem/question is whether it is OK to always cut it off, e.g. I could imagine to show the hierarchy in the Javadoc view but not in the hover. Maybe we can control this via flag in 3.3 and cut it off for now.
Comment 9 Olivier Thomann CLA 2006-04-04 10:19:15 EDT
If you don't want to remove the hierarchy all the time, then you should implement the workaround at the UI level. If I do it at the CORE level, then it will be always cut off or always there.
I don't have a way to find out that it should be included or not without changing the API.
Any thought?
Comment 10 Tom Hofmann CLA 2006-04-04 10:24:08 EDT
(In reply to comment #9)

IMO, the goal should be to get as close as possible to what the user gets when he has source attached. In this case, the hierarchy should be removed. If we find out that we want the hierarchy at some point, we can always ask for additional API for that.
Comment 11 Olivier Thomann CLA 2006-04-04 11:08:16 EDT
A patch is released. Please let me know if this fits your need.
Use JDT/Core HEAD to run.
Comment 12 Tom Hofmann CLA 2006-04-04 11:15:36 EDT
This looks exactly like what I would expect.
Comment 13 Olivier Thomann CLA 2006-04-04 11:17:13 EDT
Ok, closing as FIXED.
Comment 14 Dani Megert CLA 2006-04-04 11:38:27 EDT
looks good.
Comment 15 David Audel CLA 2006-04-13 09:40:02 EDT
Verified for 3.2 RC1 using build I20060413-0010