Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 322097 - [hovering] Tooltips are not sized according to their contents
Summary: [hovering] Tooltips are not sized according to their contents
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-08 20:21 EDT by Q.S. Wang CLA
Modified: 2010-08-23 05:25 EDT (History)
3 users (show)

See Also:


Attachments
Screen shot (12.09 KB, image/png)
2010-08-08 20:21 EDT, Q.S. Wang CLA
no flags Details
Screen shot1 (11.83 KB, image/png)
2010-08-19 20:02 EDT, Q.S. Wang CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Q.S. Wang CLA 2010-08-08 20:21:19 EDT
Attached the screen shot.

Also the screen shots of pdt issue 320709.
Comment 1 Q.S. Wang CLA 2010-08-08 20:21:57 EDT
Created attachment 176122 [details]
Screen shot
Comment 2 Thomas Schindl CLA 2010-08-09 02:05:02 EDT
I don't think JDT is useing JFace-Tooltips but their own implementation.
Comment 3 Q.S. Wang CLA 2010-08-09 02:16:15 EDT
Hi Tom,
Thanks for the comment.

Looks in the org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover class, the org.eclipse.jface.internal.text.html.BrowserInformationControl is imported.  Not sure if this is the tool tip implementation of JDT, as I didn't really trace the code there.

But the pdt uses the JFace BrowserInformationControl, so the issue is there any way.
Comment 4 Eric Moffatt CLA 2010-08-17 14:45:43 EDT
Passing to JDT for a look...punt it back if this is a generic issue with the JFace browser implementation.
Comment 5 Dani Megert CLA 2010-08-18 03:23:30 EDT
>Created an attachment (id=176122) [details] [diff]
>Screen shot
Looks OK on my system but it's always possible that some parts get cut off, especially when mixed font (styles) are used which makes the size computation very complicated. You can always move the mouse into the hover to enrich it which allows to resize it or scroll.

Markus, I suggest to close as WONTFIX.


>But the pdt uses the JFace BrowserInformationControl,
I hope you noticed the *internal* in the name which means it can change anytime.
Comment 6 Markus Keller CLA 2010-08-18 10:31:20 EDT
The size calculation is wrong right after you've changed the dialog font, but this problem is fixed when you close and reopen the open editors (we have no plans to work on that).

The Browser widget does not allow us to calculate the required size (bug 232501), so we have to calculate the size manually, which is based on non-perfect heuristics (bug 232501).

But the attached screenshot is strange, since the Javadoc of CoreException renders correctly for me in various fonts. Which dialog font did you use to produce this?
Comment 7 Glen A. CLA 2010-08-18 14:20:19 EDT
(In reply to comment #6)
> Which dialog font did you use to produce this?
Might be Trebuchet MS, just a guess though.
Comment 8 Dani Megert CLA 2010-08-19 01:35:39 EDT
>Might be Trebuchet MS, just a guess though.
Still works for me. Please reopen if you can provide an example including full font information.
Comment 9 Glen A. CLA 2010-08-19 04:20:09 EDT
(In reply to comment #8)
> Still works for me. Please reopen if you can provide an example including full
> font information.
I'm not the reporter.

Qiang, which font were you using?
Comment 10 Q.S. Wang CLA 2010-08-19 20:02:19 EDT
I think the font is the default dialog font. I traced the code and it looks the font name is "Segoe UI". 

But the weird thing is that the dialog looks all right in a run-time environment.  I.e. if I run a new time workspace against current eclipse development host environment, the tool tip looks like the screen shot 1. 

But the tool tips have different see also information. The Screen shot (truncated one) has the see also "IStatus", but the screen shot1(good one) has the see as "IStatus,Serialized Form".

Hope this is helpful.
Comment 11 Q.S. Wang CLA 2010-08-19 20:02:44 EDT
Created attachment 177059 [details]
Screen shot1
Comment 12 Dani Megert CLA 2010-08-20 05:48:29 EDT
Sorry, but we need detailed steps. I just tried again using different sizes of "Segoe UI" and it works fine.

So, please only reopen if you can provide the steps.
Comment 13 Markus Keller CLA 2010-08-23 05:25:52 EDT
(In reply to comment #10)
> But the tool tips have different see also information. The Screen shot
> (truncated one) has the see also "IStatus", but the screen shot1(good one) has
> the see as "IStatus,Serialized Form".

That's because in comment 1 the source of CoreException was available, but in comment 11, the Javadoc has been extracted from the attached Javadoc.