Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320983 - [hovering] Javadoc does not display properly on classes with a generic type that's also an HTML element name
Summary: [hovering] Javadoc does not display properly on classes with a generic type t...
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 M1   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-27 04:41 EDT by Jorn Hertsig CLA
Modified: 2010-08-02 14:31 EDT (History)
2 users (show)

See Also:


Attachments
Screenshot showing the bug (33.80 KB, image/png)
2010-07-27 04:42 EDT, Jorn Hertsig CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jorn Hertsig CLA 2010-07-27 04:41:54 EDT
Build Identifier: M20090917-0800

Using the following code:

public abstract class Test<T> {
	public static void main(String[] args) {
		new Test<Button>() {
			void foo() {
			}
		};
		new Test<Strike>() {
			void foo() {
			}
		};
	}
}

When you hover over the name of either foo() method, the Javadoc rendering that shows is wrong: The first one displays an HTML button element containing everything after the class name, the second one strikes through that text. See attached screenshot.

Reproducible: Always

Steps to Reproduce:
1. Create an anonymous instance of a class with a generic type
2. Implement a method in that class
3. View the javadoc on that method
Comment 1 Jorn Hertsig CLA 2010-07-27 04:42:41 EDT
Created attachment 175295 [details]
Screenshot showing the bug
Comment 2 Prakash Rangaraj CLA 2010-07-27 05:15:00 EDT
Moving to JDT
Comment 3 Aaron Digulla CLA 2010-07-27 05:30:11 EDT
JavaDoc display seems to be broken in 3.6. For example when I select java.util.Pattern, I get some output which is truncated, unformatted and overall weird. Can someone else confirm this? Is this the same bug or should I open a new one?
Comment 4 Markus Keller CLA 2010-07-27 09:26:24 EDT
(In reply to comment #3)
> JavaDoc display seems to be broken in 3.6. For example when I select
> java.util.Pattern, I get some output which is truncated, unformatted and
> overall weird. Can someone else confirm this? Is this the same bug or should I
> open a new one?

That is a separate issue. I guess you meant Javadoc of java.util.regex.Pattern (which renders fine for me). Aaron, if you're on Linux and SWT can't find a browser, we fall back to a text-only hover, which is known to have some bugs. If http://www.eclipse.org/swt/faq.php#browserlinux doesn't help, please open a new bug and attach a screenshot there.
Comment 5 Aaron Digulla CLA 2010-07-27 09:53:41 EDT
(In reply to comment #4)

> That is a separate issue. I guess you meant Javadoc of java.util.regex.Pattern
> (which renders fine for me). Aaron, if you're on Linux and SWT can't find a
> browser, we fall back to a text-only hover, which is known to have some bugs.
> If http://www.eclipse.org/swt/faq.php#browserlinux doesn't help, please open a
> new bug and attach a screenshot there.

That in fact solved the problem for me. I'll open an enhancement request to make this easier to find.
Comment 6 Markus Keller CLA 2010-08-02 14:31:40 EDT
Only happened for members of parameterized anonymous types.
Fixed in JavaElementLabelComposer by cutting off the type arguments.

(In reply to comment #5)
The "no browser widget on Linux"-issue is bug 321016.