Community
Participate
Working Groups
In theory completion run on separate thread, unfortunately is not possible to send signal to stop (for example by IProgressMonitor). So if user will run (manually or auto) any heavy CA (for example throw new | on large project), everything will froze until PDT finish his process.
Looks like Eclipse finally have ability to register async CA. Somebody played with new API?
Not yet, I have this on my todo list.
I did small research and to move to async CA we need: * change in SSE (bug 515454) but it will be the easiest step (of course if someone will merge patch) * most probably we need to stop using CompletionThread from Openable (DLTK) * we also need to cleanup CA computation to avoid 'invalid thread access' exceptions (DLTK + PDT)
Thanks for that! Whats wrong with DLTK Openable? Can we fix it?
> Whats wrong with DLTK Openable? Can we fix it? I'm still not sure why CompletionThread is messing here. In async CA this additional thread is useless so one way or another it would be good to avoid using it. Fixing this shouldn't be a big problem, we need to check if it will be easier to fix it in DLTK or reorganize code in PDT.
New Gerrit change created: https://git.eclipse.org/r/119672
Patch for WTP has been finally merged. When WTP Team publish new photon integration build I'll update PDT side. Problematic CompletionThread is still here, but might be fixed later.
Gerrit change https://git.eclipse.org/r/119672 was merged to [master]. Commit: http://git.eclipse.org/c/pdt/org.eclipse.pdt.git/commit/?id=a2f2da8ada21586e91e7c93f3e707c501a068a21
Great work Dawid :) I found just two small issues. One Use this snippet <?php echo strlen($string); Select strlen and press ctrl + space. the exception: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:4552) at org.eclipse.swt.SWT.error(SWT.java:4467) at org.eclipse.swt.SWT.error(SWT.java:4438) at org.eclipse.swt.widgets.Widget.error(Widget.java:503) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:441) at org.eclipse.swt.custom.StyledText.getSelectionRange(StyledText.java:4740) at org.eclipse.jface.text.TextViewer.getSelectedRange(TextViewer.java:2256) at org.eclipse.php.internal.ui.editor.templates.PHPTemplateCompletionProcessor.areMultipleLinesSelected(PHPTemplateCompletionProcessor.java:476) at org.eclipse.php.internal.ui.editor.templates.PHPTemplateCompletionProcessor.computeCompletionProposals(PHPTemplateCompletionProcessor.java:173) at org.eclipse.dltk.ui.text.completion.ScriptCompletionProposalComputer.computeTemplateCompletionProposals(ScriptCompletionProposalComputer.java:131) at org.eclipse.dltk.ui.text.completion.ScriptCompletionProposalComputer.computeCompletionProposals(ScriptCompletionProposalComputer.java:237) at org.eclipse.dltk.ui.text.completion.CompletionProposalComputerDescriptor.computeCompletionProposals(CompletionProposalComputerDescriptor.java:342) at org.eclipse.dltk.ui.text.completion.CompletionProposalCategory.computeCompletionProposals(CompletionProposalCategory.java:295) at org.eclipse.dltk.ui.text.completion.ContentAssistProcessor.collectProposals(ContentAssistProcessor.java:268) at org.eclipse.dltk.ui.text.completion.ContentAssistProcessor.computeCompletionProposals(ContentAssistProcessor.java:234) at org.eclipse.wst.sse.ui.internal.contentassist.CompoundContentAssistProcessor.computeCompletionProposals(CompoundContentAssistProcessor.java:127) at org.eclipse.jface.text.contentassist.AsyncCompletionProposalPopup.lambda$8(AsyncCompletionProposalPopup.java:341) Second I added something like this in larger code: throw new | I pressed ctrl + space in place of | and right away I pressed left arrow. the exception: java.lang.NullPointerException at org.eclipse.dltk.ui.text.completion.ContentAssistProcessor.getCategories(ContentAssistProcessor.java:432) at org.eclipse.dltk.ui.text.completion.ContentAssistProcessor.collectProposals(ContentAssistProcessor.java:266) at org.eclipse.dltk.ui.text.completion.ContentAssistProcessor.computeCompletionProposals(ContentAssistProcessor.java:234) at org.eclipse.wst.sse.ui.internal.contentassist.CompoundContentAssistProcessor.computeCompletionProposals(CompoundContentAssistProcessor.java:127) at org.eclipse.jface.text.contentassist.AsyncCompletionProposalPopup.lambda$8(AsyncCompletionProposalPopup.java:341) at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590) at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1582) at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) I will try find better way to reproduce second problem.
New Gerrit change created: https://git.eclipse.org/r/123211
New Gerrit change created: https://git.eclipse.org/r/123212
Gerrit change https://git.eclipse.org/r/123212 was merged to [master]. Commit: http://git.eclipse.org/c/pdt/org.eclipse.pdt.git/commit/?id=f8241706b53bb75d98e627c7b5a247ab0c68f759
I completely forgot about DLTK status syncExec. I used it in DLTK due bug #534402. Since this bug is fixed, we can safely use async call. Patch already uploaded, I merge and publish after couple minutes.
New Gerrit change created: https://git.eclipse.org/r/123487
Gerrit change https://git.eclipse.org/r/123487 was merged to [master]. Commit: http://git.eclipse.org/c/pdt/org.eclipse.pdt.git/commit/?id=139f22c7d3a8ccd33d22f0294fd31d4078927dbd
I'm working with Eclipse Version: Photon Release Candidate 1 (4.8.0RC1) - Build id: 20180524-1423 It seems that this specific fix broke the content assist feature on my end. It was commited on May 30, I updated following the nightlies this morning, on the May 31, content assist does not work anymore. I tried unchecking the "Async" checkbox, no change. Tried to clean up my projects, no changes either.
Please ignore my previous comment, it seems that my workspace was broken, after manually removing indexes, code assist works fine - for your information, I had to manually delete DLTK index after upgrade, and wait for a very long time for Eclipse to boot after.
(In reply to Pierre Rineau from comment #17) > Please ignore my previous comment, it seems that my workspace was broken, > after manually removing indexes, code assist works fine - for your > information, I had to manually delete DLTK index after upgrade, and wait for > a very long time for Eclipse to boot after. Recent PDT build require Photon RC2. If you install it into RC1 assist will not work correctly until you turn off async or prefix autocompletion.