Bug 159713 - [content assist] Content assist broken in 3.2.1
Summary: [content assist] Content assist broken in 3.2.1
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Dani Megert CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on: 159699
Blocks:
  Show dependency tree
 
Reported: 2006-10-04 08:33 EDT by Andreas Goetz CLA
Modified: 2007-06-22 10:04 EDT (History)
4 users (show)

See Also:


Attachments
Fix for problem 1) (2.79 KB, patch)
2006-10-09 03:32 EDT, Dani Megert CLA
no flags Details | Diff
Improved patch for problem 1) (4.27 KB, patch)
2006-10-09 04:12 EDT, Dani Megert CLA
no flags Details | Diff
Preferences (235.72 KB, text/plain)
2006-10-09 06:03 EDT, Andreas Goetz CLA
no flags Details
Previous patch plus some cleanup (5.21 KB, patch)
2006-10-10 04:50 EDT, Dani Megert CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Goetz CLA 2006-10-04 08:33:25 EDT
After upgrading to 3.2.1, content assist (ctrl-space) is broken. No inline popup list of possible completions appears. The following message is found in the log file:


!ENTRY org.eclipse.ui 4 4 2006-10-04 14:33:44.144
!MESSAGE Unhandled event loop exception

!ENTRY org.eclipse.ui 4 0 2006-10-04 14:33:44.144
!MESSAGE Failed to execute runnable (org.eclipse.jface.text.Assert$AssertionFailedException: null argument;)
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.jface.text.Assert$AssertionFailedException: null argument;)
	at org.eclipse.swt.SWT.error(SWT.java:3374)
	at org.eclipse.swt.SWT.error(SWT.java:3297)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:126)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3325)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:589)
	at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
	at org.eclipse.core.launcher.Main.run(Main.java:977)
	at org.eclipse.core.launcher.Main.main(Main.java:952)
Caused by: org.eclipse.jface.text.Assert$AssertionFailedException: null argument;
	at org.eclipse.jface.text.Assert.isNotNull(Assert.java:157)
	at org.eclipse.jface.text.Assert.isNotNull(Assert.java:133)
	at org.eclipse.jface.text.contentassist.ContentAssistant.setRepeatedInvocationTrigger(ContentAssistant.java:2125)
	at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor$2.assistSessionStarted(ContentAssistProcessor.java:163)
	at org.eclipse.jface.text.contentassist.ContentAssistant.fireSessionBeginEvent(ContentAssistant.java:1992)
	at org.eclipse.jface.text.contentassist.ContentAssistant.prepareToShowCompletions(ContentAssistant.java:1469)
	at org.eclipse.jface.text.contentassist.ContentAssistant.access$6(ContentAssistant.java:1462)
	at org.eclipse.jface.text.contentassist.ContentAssistant$2.run(ContentAssistant.java:345)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
	... 20 more
Comment 1 David Audel CLA 2006-10-04 09:15:10 EDT
I cannot reproduce the problem with 3.2.1.

The stack trace doesn't show a class related to JDT/Core.
I move this bug to JDT/Text

Comment 2 Andreas Goetz CLA 2006-10-04 09:19:19 EDT
Running on jdk 1.6- anything I could do to provide better debug info?
Comment 3 Dani Megert CLA 2006-10-09 03:20:06 EDT
*** Bug 160045 has been marked as a duplicate of this bug. ***
Comment 4 Dani Megert CLA 2006-10-09 03:21:16 EDT
- what is short cut do you use to invoke code assist?
- what short cut is shown for 'Default' in the menu Edit > Content Assist?
- please attach your preferences to this bug report (File > Export...)

Can you provide steps? It works for me using these steps:
1. download Eclipse SDK 3.2.1 and install into empty directory
2. start with fresh workspace
3. create Java project 'P' with class 'Foo'
4. use Ctrl+Space to invoke code assist inside the class

I used the following VM:
java version "1.6.0-beta2"
Java(TM) SE Runtime Environment (build 1.6.0-beta2-b86)
Java HotSpot(TM) Client VM (build 1.6.0-beta2-b86, mixed mode)
Comment 5 Dani Megert CLA 2006-10-09 03:28:44 EDT
I can reproduce the bug if I manually remove the key binding for the content assist command.

I see two bugs here
1) we do not handle the case where no key binding is assigned
   ==> this needs to be fixed for 3.2.2
2) some how the key binding got lost or cannot be found (see also bug 160045)
Comment 6 Dani Megert CLA 2006-10-09 03:32:57 EDT
Created attachment 51617 [details]
Fix for problem 1)

This patch fixes problem 1 but is not yet released in order to get more info, especially to see whether the tests will fail again.
Comment 7 Dani Megert CLA 2006-10-09 04:12:40 EDT
Created attachment 51618 [details]
Improved patch for problem 1)
Comment 8 Dani Megert CLA 2006-10-09 04:28:27 EDT
*** Bug 159699 has been marked as a duplicate of this bug. ***
Comment 9 Andreas Goetz CLA 2006-10-09 05:47:49 EDT
I've found that I already see the error when typing foo<dot>. I was not able to reproduce the problem with a clean 3.2.1 install.
Comment 10 Dani Megert CLA 2006-10-09 05:51:25 EDT
Do you have the unclean install so that you can answer the questions from comment 4?
Comment 11 Andreas Goetz CLA 2006-10-09 06:02:40 EDT
Sorry- too many updates. Here are the answers for comment 4:

> what is short cut do you use to invoke code assist?
Ctrl-Space. However, logfile exception occurs even before Ctrl-Space. No further exception when Ctrl-Space hit.

> what short cut is shown for 'Default' in the menu Edit > Content Assist?
None

> please attach your preferences to this bug report (File > Export...)
prefs.txt

>I used the following VM: java version "1.6.0-beta2"
Same
Comment 12 Andreas Goetz CLA 2006-10-09 06:03:35 EDT
Created attachment 51632 [details]
Preferences
Comment 13 Dani Megert CLA 2006-10-09 06:08:26 EDT
>> what is short cut do you use to invoke code assist?
>Ctrl-Space. However, logfile exception occurs even before Ctrl-Space. No
>further exception when Ctrl-Space hit.
Don't type (which might cause auto-activation). Simply place the caret and try Ctrl+Space. I guess nothing (not even an exception) will happen since there is no key binding.




>> what short cut is shown for 'Default' in the menu Edit > Content Assist?
>None
OK, that explains it. Did you remove it manually or can you remember having installed a plug-in (e.g. Mylar) that could have removed the key binding?
Comment 14 Andreas Goetz CLA 2006-10-09 06:19:31 EDT
a) no exception, correct
b) mylar- yes. didn't make the connection though. would you open a new bug against mylar?
Comment 15 Dani Megert CLA 2006-10-09 06:24:03 EDT
>b) mylar- yes. didn't make the connection though. would you open a new bug
>against mylar?
Well, only if you are sure it was Mylar that did this. I am aware that they install their own processors but not that they modify the key binding short cuts.

Can you try this:
1. have a clean version
2. install Mylar
3. start your workspace again with the clean version (no Mylar)
4. check whether the key binding is still there
Comment 16 Andreas Goetz CLA 2006-10-09 06:47:03 EDT
Cannot reproduce issue with Mylar on clean install. Installed Mylar Task List, Focused UI, Bugzilla and WebConnector from Sandbox. Restarted. Key binding still there.
Comment 17 Dani Megert CLA 2006-10-10 04:50:56 EDT
Created attachment 51664 [details]
Previous patch plus some cleanup
Comment 18 Dani Megert CLA 2006-10-10 06:22:15 EDT
This problem will no longer appear once bug 159699 has been fixed.

I'm setting this one to REMIND until we get more details on how the key binding got lost.
Comment 19 Dani Megert CLA 2007-06-22 09:59:35 EDT
Get rid of deprecated state.
Comment 20 Dani Megert CLA 2007-06-22 10:04:46 EDT
.