Summary: | [hovering] Javadoc hover's trigger region exceeds right side | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Christof Marti <christof_marti> | ||||
Component: | Text | Assignee: | Dani Megert <daniel_megert> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | daniel_megert, david_audel, philippe_mulet | ||||
Version: | 3.1 | ||||||
Target Milestone: | 3.2 RC2 | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Christof Marti
2005-05-11 09:59:18 EDT
Created attachment 20962 [details]
Screenshot of type hover
That is, when using a large font.
I've debugged this: ICodeAssist.codeSelect(...) returns a type even if the offset is pointing to the space after the type *** Bug 81129 has been marked as a duplicate of this bug. *** This makes hyperlinking look ugly, especially when using upcoming builds (>N20060425-0010) where we fixed some text measuring issues. I assume the fix is quite simple. Could this be addressed for 3.2? Test Case using N20060426-0010 or newer: 1. select a large Java editor font (e.g. 20pt) 2. add a CU with only the following text: /** String */ 3. Ctrl+Move the mouse from the right side towards the 'String' ==> we get the hand cursor one offset too early. The fix seems easy. I just need to replace 'scanner.startPosition <= selectionStart && selectionStart <= scanner.currentPosition' by 'scanner.startPosition <= selectionStart && selectionStart < scanner.currentPosition' in SelectionEngine#checkSelection(...) But if i do that the following test case will not work 1) class X implements Runnable {} 2) put the caret just after Runnable 'class X implements Runnable| {}' 3) do F3 Currently code select return the Runnable element. But if i apply the fix, code select will return nothing in this case. It's not possible two have both behaviors in JDT/Core (unless we add a new API). Daniel - Do you think it is possible to have both behaviors by changing something on your side ? Feels like a contract change in our layer if we do what is asked here. Discussed with David: we mention this case in the Javadoc (improve it) and leave codeSelect(...) as is. Now that we know the contract we can adjust the UI where appropriate. I will update the Javadoc to describe this contract. I entered a bug for that (bug 138432) Move to JDT/Text Just a corner case: ABC DEF (one space in between) Is the hover going to show info for DEF as soon as escaping from ABC ? (when hovering in space area) >Is the hover going to show info for DEF as soon as escaping from ABC ? (when
>hovering in space area)
No, it should dismiss the hover.
Fixed hovering and hyperlinking in HEAD. Available in builds > N20060425-0010. Verified in 3.2RC3 |