Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 322556 - [hovering] Quick Fix hover cuts message
Summary: [hovering] Quick Fix hover cuts message
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.8 M7   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 365961
Blocks:
  Show dependency tree
 
Reported: 2010-08-12 11:55 EDT by Markus Keller CLA
Modified: 2012-04-12 17:56 EDT (History)
3 users (show)

See Also:


Attachments
Screenshot (8.80 KB, image/png)
2010-08-12 11:55 EDT, Markus Keller CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2010-08-12 11:55:49 EDT
Created attachment 176481 [details]
Screenshot

I20100810-0800

Quick Fix hover cuts message on the constructor invocation: 

package xy;

class InfixExpression { }
class ASTNode { }
class AssociativeInfixExpressionFragment {
    AssociativeInfixExpressionFragment() {
        InfixExpression ie= null;
        java.util.List<ASTNode> list= null;
        Object o= new AssociativeInfixExpressionFragment(ie, list);
    }
}
Comment 1 Dani Megert CLA 2010-08-13 02:16:48 EDT
Hover cutting was always a problem, even when back in the days where we had the simple hover (see bug 171047).
Comment 2 Markus Keller CLA 2010-08-13 09:14:33 EDT
Bug 171047 is about completely different code and about a non-default font. The relationship to this bug is quite far-fetched. The fact that the old code also had bugs does not make this minor. In the example, the message makes no sense.
Comment 3 Markus Keller CLA 2012-03-08 05:53:07 EST
Even after bug 365961 is fixed, the hover still looks bad in this case ("Incomplete 'switch' cases on enum" set to Warning):

    void foo(Thread.State state) {
        switch (state) {
            case BLOCKED:
                System.out.println("Hi");
                break;
            case NEW:
                System.out.println("Ho");
                break;
//            default:
//                System.out.println("No");
//                break;
        }
        System.out.println("Go");
    }

Problem is that Shell#computeSize(..) adds trims to the given wHint, so the result is always larger than requested.

Fixed with http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=7e3d7066d9916b05de7e57fdd20a355cd1a0b82e
Comment 4 Markus Keller CLA 2012-04-12 17:56:21 EDT
Works fine now.