Bug 94106 - [content assist] context info popup stack not cleaned up correctly
Summary: [content assist] context info popup stack not cleaned up correctly
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0.2   Edit
Hardware: PC Windows 2000
: P3 minor (vote)
Target Milestone: 4.15 M1   Edit
Assignee: Stephan Wahlbrink CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 538943
  Show dependency tree
 
Reported: 2005-05-09 08:44 EDT by Florian Georg CLA
Modified: 2020-01-06 05:23 EST (History)
2 users (show)

See Also:


Attachments
screenshot (step1) (1.44 KB, image/png)
2005-05-09 09:13 EDT, Florian Georg CLA
no flags Details
screenshot (step 2) (1.25 KB, image/png)
2005-05-09 09:15 EDT, Florian Georg CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Georg CLA 2005-05-09 08:44:36 EDT
Using the content assist (SourceViewer inside a view/CellEditor, not editor)
gives some dubious behaviour while dealing with the context info popups:
If I leave the text control by TAB there might be more than one ContextFrame
instance on the fContextFrameStack for whatever reason (class
org.eclipse.jface.text.contentassist.ContextInformationPopup, line 433ff).
The problem is that only the last one is pop()ed from the stack, resulting in
the previous one showing up again.
I think traversing out of the control to which the content assist is connected
should always hide *all* remaining context info popups - by now I can only think
of an IContextInformationValidator that looks wheter the TextViewer is no longer
the focus control.
Or am I missing something?
Comment 1 Dani Megert CLA 2005-05-09 08:49:00 EDT
Build id?

Can you provide an example / test case that shows the bug?
Comment 2 Florian Georg CLA 2005-05-09 09:13:40 EDT
Created attachment 20829 [details]
screenshot (step1)
Comment 3 Florian Georg CLA 2005-05-09 09:15:35 EDT
Created attachment 20830 [details]
screenshot (step 2)

After leaving the control (via TAB). Note that the rightmost control has the
focus, but still an obsolete context popup is showing.
Comment 4 Florian Georg CLA 2005-05-09 09:16:00 EDT
Build id: 200503110845
Comment 5 Florian Georg CLA 2005-05-09 09:39:29 EDT
Please note that popup#1 != popup#2. It's not that obvious on the images ;-)
Comment 6 Stephan Wahlbrink CLA 2017-03-16 15:07:09 EDT
This bug also occurs in a common editor, e.g. Java editor of JDT:

Stack two or more context information popups and leave the editor.
At moment it just hides the last popup and shows the previous (make no sense at all). But it should hide all popups.

Also the Javadoc of ContentAssistant.hide clearly says that it should hide "any open pop-ups."
Comment 7 Eclipse Genie CLA 2017-10-02 15:27:16 EDT
New Gerrit change created: https://git.eclipse.org/r/106115
Comment 8 Mickael Istria CLA 2019-12-03 03:24:00 EST
@Stephan: thanks a lot for that patch. However, as it's not a regression from latest development stream, it cannot be merged in RC2. We'll consider it soon when 4.15 development stream opens (should be in ~2 weeks). Feel free to ping on the bug in January if no progress has happened by then.
Comment 10 Mickael Istria CLA 2020-01-06 05:23:38 EST
Thanks Stephan!