Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 89125

Summary: [content assist] Code assist dismissed itself when summoned after auto-import
Product: [Eclipse Project] JDT Reporter: Jared Burns <jared_burns>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:

Description Jared Burns CLA 2005-03-25 14:43:26 EST
Build 20050323
Linux-GTK

When you do a code assist immediately after doing an operation that adds an
import, the pop-up appears and then quickly dismisses itself. A reproducible
test case I found is:

1. Make sure you don't have "org.eclipse.swt.Display" currently in your list of
imports.
2. Code assist on the word "Display" to add the import automatically.
3. Type "." and press ctrl+space again to view the list of methods
(getCurrent(), getDefault(), etc.).
4. The pop-up disappears about 1/2 second after it appeared.

The key thing here is that the first code-assist has to add an import. If the
import is already there, things will work correctly.
Comment 1 Dani Megert CLA 2005-03-28 14:31:01 EST
Tom, please check for M6 whether this is a regression by latest changes. If so,
please fix.
Comment 2 Tom Hofmann CLA 2005-03-29 05:52:46 EST
Cannot reproduce.

Could it be that your manual invocation of code assist interferes with the
automatic popup you might get after typing the dot? I.e. do you have
Java>Editor>Code Assist>Auto Activation turned on?

Jared, what GTK version are you using?

removing milestone as I can't reproduce.
Comment 3 Jared Burns CLA 2005-03-29 16:06:02 EST
Just tested again and I can't reproduce the problem on the 20050324 build. So
either it was fixed between the 23rd and 24th (unlikely?) or there are more
variables involved than I realized.
Comment 4 Jared Burns CLA 2005-03-29 16:08:27 EST
All I notice now is that the text ("Display.") flashes about a half-second after
I bring up the code assist now. The timing looks the same as the dismissal;
could the source of this flashing have been causing the dialog to go away?
Comment 5 Jared Burns CLA 2005-05-11 13:35:53 EDT
I'm seeing this bug again in recent builds. There's definitely something here.
Comment 6 Tom Hofmann CLA 2006-08-14 10:08:26 EDT
My guess is that the auto-activated code assist and the manually invoked one interfered. The interaction with auto-activation has been fixed for 3.2 to correct the cylcling mode assist. I cannot reproduce, Jared, please reopen if you still see this with 3.2.
Comment 7 Tom Hofmann CLA 2006-08-14 10:08:47 EDT
Marking as works for me.