Bug 19686 - hover help stops working after mousing over end of file
Summary: hover help stops working after mousing over end of file
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: Kai-Uwe Maetzel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-07 17:42 EDT by Amy Wu CLA
Modified: 2009-05-04 04:16 EDT (History)
6 users (show)

See Also:


Attachments
patch for TextViewerHoverManager (2.67 KB, patch)
2002-06-26 03:57 EDT, Kai-Uwe Maetzel CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Amy Wu CLA 2002-06-07 17:42:03 EDT
From Stable F2 Build

In a java file in Java Editor.  Move the mouse to the whitespace at the end of 
the file..like the lower-right-most region of the java file.  Stay there for 
about 3 secs or so, then mouse over some text in the java file where you would 
expect hover help.  The hover help no longer works for the file.  I tried 
toggling the hover help button on/off/on, switching to other editors then back, 
none of those methods seem to bring the hoverhelp back on.  I need to close and 
reopen the file to get hover help back.
Comment 1 Erich Gamma CLA 2002-06-09 14:44:49 EDT
can reproduce. 
JUnit setup
1) create CU T.java
package junit.framework;

public class T {
	TestCase t;
	
}

2) move the mouse cursor after the close brace of the class as described below.
Comment 2 Kai-Uwe Maetzel CLA 2002-06-10 13:29:11 EDT
Reviewed by Erich.
Comment 3 Amy Wu CLA 2002-06-10 13:57:50 EDT
I added the hover help capability to my own custom-made source editor/viewer.  
In general, whenever I hover over any whitespace, not just the end of the file, 
I noticed hoverhelp stopped working.  (My hover help used to work before F2)  
Will this fix probably fix that problem as well?  If so, could you describe the 
fix and is this a fix that can be made into a patch for F2?  (I would like to 
stay on the F2 base and provide a temporary patch till moving up to F3)  Thanks.
Comment 4 Dirk Baeumer CLA 2002-06-13 07:56:49 EDT
Verified. TB, but leaving as resolved fixed for further discussion
Comment 5 Amy Wu CLA 2002-06-17 18:47:09 EDT
Nevermind, I'm going to move up to F3, and it looks like my hover help problems 
were fixed with this fix.  Thanks.
Comment 6 Amy Wu CLA 2002-06-25 18:45:36 EDT
Just moved up to GM1 build, and this bug is back again!
Comment 7 Kai-Uwe Maetzel CLA 2002-06-26 03:56:21 EDT
Within F3, bug has been "resolved" by an improper implementation that has been 
fixed for F4. This was (almost) undetectable. Thus, the problem is back.
I don't think the fix will make it into 2.0
Comment 8 Kai-Uwe Maetzel CLA 2002-06-26 03:57:08 EDT
Created attachment 1597 [details]
patch for TextViewerHoverManager
Comment 9 Amy Wu CLA 2002-06-26 14:32:46 EDT
i wanted to add another case where hover help fails (that is related to this 
defect/fix)  there was a bugzilla defect #19719 stating that hover help stopped 
working after you turned it on then off.  This problem also came back.  If you 
turn hoverhelp off, hover over text in the file, then turn hoverhelp back on, 
hoverhelp still doesn't work.
Comment 10 Amy Wu CLA 2002-06-26 18:11:10 EDT
I had originally discovered this problem because my ITextHover stopped working 
every time I hovered over whitespace, not just at the end of the file, like 
Java's hover, so this defect was more detectable for me.  Since I can only 
build off of eclipse's stable builds, I cannot put in your patch for 
TextViewerHoverManager.  I have, however, come up with a workaround.  
   I noticed that hoverhelp would stop working when I returned null in 
ITextHover.getHoverRegion(viewer, offset), which is what I return when hovering 
over whitespace.  As a workaround, rather than returning null, I will instead 
return a region where offset=offset & length=0 in ITextHover.getHoverRegion(..)

Questions:
1. Does my workaround sound good?

2. I am concerned about decreased performance due to the call to 
TextHoverManager.computeArea(..) after checking ITextHover.getHoverRegion(..) !
= null.  Is there some better solution/workaround?

3. Should I open a new defect or continue discussion in this defect since it 
sounds like the fix for this defect will be different than it was before?

4. Is it still very likely that your fix will not make it into v2.0?

Thanks.
Comment 11 Kai-Uwe Maetzel CLA 2002-08-12 06:25:52 EDT
Patch applied in the 2.0.1 and the 2.1 stream.
Comment 12 Andre Weinand CLA 2002-08-22 06:35:57 EDT
verified on 2.0.1 build 20020821