Bug 534395 - [content assist] Prefix autocompletion not work in async mode
Summary: [content assist] Prefix autocompletion not work in async mode
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.8   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.8 RC2   Edit
Assignee: Dawid Pakula CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 515576 (view as bug list)
Depends on:
Blocks: 458335
  Show dependency tree
 
Reported: 2018-05-04 17:53 EDT by Dawid Pakula CLA
Modified: 2018-06-14 07:52 EDT (History)
8 users (show)

See Also:
mistria: review+
akurtakov: review+
Lars.Vogel: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dawid Pakula CLA 2018-05-04 17:53:21 EDT
As in subject, prefix autocompletion doesn't work, It cause two problems:

1. With manual calls(ctrl+space), completion never shown because #incrementalComplete calls #computeProposals that mostly return empty list.
2. After auto assist when user use "ctrl+space" to change category, completion disappear due NPE.
java.lang.NullPointerException
	at org.eclipse.jface.text.contentassist.AsyncCompletionProposalPopup.computeFilteredProposals(AsyncCompletionProposalPopup.java:253)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup$1.run(CompletionProposalPopup.java:358)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:37)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4051)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3718)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:681)
	at org.eclipse.ui.internal.Workbench$$Lambda$24/1081836597.run(Unknown Source)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:595)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:656)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:592)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1498)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1471)

I think incrementalComplete, just like showProposals have to be reimplemented. I can take care of it after merge patches for bug 534310 and bug 534387.
Comment 1 Eclipse Genie CLA 2018-05-19 14:34:15 EDT
New Gerrit change created: https://git.eclipse.org/r/123000
Comment 2 Mickael Istria CLA 2018-05-22 08:13:59 EDT
@Lars @Andrey @Karsten: Could one of you also give a review to this one to hopefully make it reach RC2?
Comment 4 Mickael Istria CLA 2018-05-22 08:27:16 EDT
Thank you very much Dawid for this contribution.
I'm really happy to see you adopting the async completion and contributing to it. Your feedback and help there are very helpful!
Comment 5 Dawid Pakula CLA 2018-05-22 09:16:59 EDT
Thank you for review & merge. PHP Development Tools can now enable async completion by default in Photon.0 ;)
Comment 6 Andrey Loskutov CLA 2018-05-22 15:46:42 EDT
Mickael, I'm nearly offline for a week, Internet connection is very bad here.
Comment 7 Kalyan Prasad Tatavarthi CLA 2018-05-24 15:18:09 EDT
@Dawid: Please verify that this bug is fixed in the latest Eclipse I-Build.(http://download.eclipse.org/eclipse/downloads/index.html)
Comment 8 Dawid Pakula CLA 2018-06-07 08:05:12 EDT
Works fine on RC2
Comment 9 Mickael Istria CLA 2018-06-14 07:41:32 EDT
*** Bug 515576 has been marked as a duplicate of this bug. ***