Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 393602

Summary: Problem hover - Link text cut at end for some OSes / fonts
Product: [Eclipse Project] Platform Reporter: John Koumarelas <John.Koumarel>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED NOT_ECLIPSE QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, i-lite, james+eclipse, ljelinek, markus.kell.r, Sergei.Vatshekin, shr31223
Version: 4.2.1   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Combined hover - values missing and ctrl-1 hover - everything is ok
none
Dialog font
none
Problem across font families
none
Font Files
none
Ubuntu (13.10) Font none

Description John Koumarelas CLA 2012-11-05 15:16:56 EST
Created attachment 223196 [details]
Combined hover - values missing and ctrl-1 hover - everything is ok

Hello, I have Arch Linux x64, KDE. 

The problem that appeared is that when I hover over a problem, e.g. a class that isn't imported, the combined hover appears but some values are not present. If I press ctrl+1, everything appears fine.

This happens to: "import", "create class", "change to" etc.

I attach an example (2 pictures)
Comment 1 Dani Megert CLA 2012-11-06 04:33:40 EST
This is expected. The hover shows the error/warning along with the possible quick fixes for that problem. Ctrl+1 shows the Quick Fixes plus Quick Assists which are not related to the error/warning. Hence Ctrl+1 can show more entries.
Comment 2 John Koumarelas CLA 2012-11-06 04:49:06 EST
(In reply to comment #1)
> This is expected. The hover shows the error/warning along with the possible
> quick fixes for that problem. Ctrl+1 shows the Quick Fixes plus Quick
> Assists which are not related to the error/warning. Hence Ctrl+1 can show
> more entries.

Dani it is my fault, I didn't explain it correctly. The "sentences" are not completed fully.

e.g. Instead of showing: 
import 'IOException' (java.io)

it only shows

import

There are several packages where this happens, and it not only happens in imports, but on "create class", "change to" etc. The sentences/phrases are not completed. When I press ctrl-1 the same sentences that were not completed in the combined hover, are fine.
Comment 3 John Koumarelas CLA 2012-11-06 04:51:12 EST
...so it's not completed yet. (changing status to REOPENED)
Comment 4 John Koumarelas CLA 2012-11-06 05:02:03 EST
To be even more precise, if you look at the attachment picture:

You can look at the following mapping: (ctrl+1 --> combined hover)

Create class 'IOException' --> Create class
Change to 'IndirectionException' --> Change to
Change to 'InvalidKeyException' (java.security) --> Change to
Change to 'InvalidKeyException' (javax.management.openmbean) --> Change to
Comment 5 Dani Megert CLA 2012-11-06 06:19:45 EST
What is your dialog font (Preferences > Appearance > Colors and Fonts)?
Comment 6 Dani Megert CLA 2012-11-06 06:20:00 EST
.
Comment 7 John Koumarelas CLA 2012-11-06 06:37:28 EST
Created attachment 223223 [details]
Dialog font

Actually I played with a different font Daniel and the problem disappeared! We're close...
Comment 8 John Koumarelas CLA 2012-11-06 06:58:02 EST
Created attachment 223224 [details]
Problem across font families

After a bit of experimenting, the problem seems a bit weird. The (DejaVu) Sans and (DejaVu) Serif fonts are problematic but the (DejaVu) monospace are not. (All monospace fonts show correct entries/sentences.
Comment 9 Dani Megert CLA 2012-11-06 07:26:19 EST
We should not use WRAP style when creating our links. I've fixed that in
http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=ce590e50a4d315a2ad4d37a7a3899361e7fed928

However, on my Ubuntu box those fonts render correctly, so I suspect that your fonts are not correct and hence we get wrong font metrics.

Moving to SWT for comment.

Can you attach one of the font files for further investigation?
Comment 10 John Koumarelas CLA 2012-11-06 08:28:44 EST
Created attachment 223233 [details]
Font Files

Attached Fonts: DejaVu Sans, Serif and Mono (Monospace must be SansMono file).
Thank you for your help!
Comment 11 Dani Megert CLA 2012-12-17 05:04:36 EST
*** Bug 396458 has been marked as a duplicate of this bug. ***
Comment 12 Dani Megert CLA 2013-05-02 03:32:19 EDT
*** Bug 406978 has been marked as a duplicate of this bug. ***
Comment 13 Dani Megert CLA 2013-07-11 09:10:28 EDT
*** Bug 412665 has been marked as a duplicate of this bug. ***
Comment 14 Markus Keller CLA 2013-07-11 10:45:09 EDT
*** Bug 412021 has been marked as a duplicate of this bug. ***
Comment 15 Markus Keller CLA 2013-07-11 10:54:28 EDT
I found bug 151322 and bug 169698 about the same problem in Link#computeSize().

I've released a workaround in JDT Text (master for 4.4) that will make the full label visible when the hover is wide enough:
http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=74d3083d8b588e19d7f3591440137762008d2487
Comment 16 Dani Megert CLA 2013-11-01 10:12:28 EDT
*** Bug 420872 has been marked as a duplicate of this bug. ***
Comment 17 James Bodkin CLA 2013-11-01 10:29:28 EDT
Created attachment 237128 [details]
Ubuntu (13.10) Font
Comment 18 James Bodkin CLA 2013-11-01 10:30:08 EDT
Eclipse on Ubuntu uses the above font at size 11.
Comment 19 Alexander Kurtakov CLA 2018-08-31 03:59:52 EDT
Is this still reproducible with latest version?