Community
Participate
Working Groups
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.
Olivier - could you investigate detecting the end of non interesting material ? A heuristic is all we are looking for I believe.
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 ...
I will investigate.
What are you expecting to be cut out? The hierarchy? And you want to keep the class description?
>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).
Created attachment 37492 [details] Picture with Javadoc from source
Created attachment 37493 [details] Possible look of Javadoc from attached Javadoc
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.
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?
(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.
A patch is released. Please let me know if this fits your need. Use JDT/Core HEAD to run.
This looks exactly like what I would expect.
Ok, closing as FIXED.
looks good.
Verified for 3.2 RC1 using build I20060413-0010