| Summary: | [hovering] Quick Fix hover cuts message | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Markus Keller <markus.kell.r> | ||||
| Component: | Text | Assignee: | Markus Keller <markus.kell.r> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | daniel_megert, deepakazad, markus.kell.r | ||||
| Version: | 3.7 | ||||||
| Target Milestone: | 3.8 M7 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | 365961 | ||||||
| Bug Blocks: | |||||||
| Attachments: |
|
||||||
Hover cutting was always a problem, even when back in the days where we had the simple hover (see bug 171047). 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. 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 Works fine now. |
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); } }