Bug 425802 - [hovering] Javadoc hover/view: Improve header rendering for monster methods
Summary: [hovering] Javadoc hover/view: Improve header rendering for monster methods
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-15 13:48 EST by Markus Keller CLA
Modified: 2024-04-06 05:47 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2014-01-15 13:48:04 EST
Javadoc hover/view: Improve header rendering for monster methods with a huge signature.

Example:

In java.lang.reflect.AnnotatedElement#getDeclaredAnnotationsByType(Class<T>), show Javadoc for the invocation of Collectors.toMap(...).

The hover shows a breathtaking header:

<Annotation, Class<? extends Annotation>, Object, Map<Class<? extends Annotation>, Object>> Collector<Annotation, ?, Map<Class<? extends Annotation>, Object>> java.util.stream.Collectors.toMap(Function<? super Annotation, ? extends Class<? extends Annotation>> keyMapper, Function<? super Annotation, ? extends Object> valueMapper, BinaryOperator<Object> mergeFunction, Supplier<Map<Class<? extends Annotation>, Object>> mapSupplier)

For method headers of a certain length ( > 2 lines?), we should switch to a format like this, where line breaks and indentation help identify the structure:

<Annotation, Class<? extends Annotation>, Object, Map<Class<? extends Annotation>, Object>>
Collector<Annotation, ?, Map<Class<? extends Annotation>, Object>> java.util.stream.Collectors.toMap(
    Function<? super Annotation, ? extends Class<? extends Annotation>> keyMapper,
    Function<? super Annotation, ? extends Object> valueMapper,
    BinaryOperator<Object> mergeFunction,
    Supplier<Map<Class<? extends Annotation>, Object>> mapSupplier)

The implementation in JavaElementLinkedLabelComposer could use a special FlexibleBuffer that records positions for optional "<br>" and "<br>\t", and then decides in toString() whether to insert the optional formatting or not.

We should also check how it looks if we render types non-bold. Or maybe all types except those in the method name qualifier.
Comment 1 Eclipse Genie CLA 2019-07-12 04:16:39 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Dani Megert CLA 2019-07-13 05:48:08 EDT
Still a problem with 4.13 M1.
Comment 3 Eclipse Genie CLA 2021-07-03 12:51:08 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 4 Eclipse Genie CLA 2023-06-24 12:10:46 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.