Community
Participate
Working Groups
Created attachment 278837 [details] Java class which reproduces the problem We heavily use nested lambdas in our code base and I ran into problems with content assist. Either it does not show any proposals or it shows a popup "Problems During Content Assist". The following reproduces the problem in Eclipse 2019.03: static class X { public X child(Consumer<X> c) { return this; } } void bad(X x) { new Runnable() { @Override public void run() { x.child(_1 -> _1 .child(_2 -> _2 // . CTRL-SPACE does not work here .child(_3 -> {}) ) ); } }; new Runnable() { @Override public void run() { x.child(_1 -> _1 .child(_2 -> _2 // . CTRL-SPACE results in NullPointerException and popup .child(new Consumer<X>() { @Override public void accept(X x) { } }) ) ); } }; } I get the following exception stacktrace in the log: !ENTRY org.eclipse.jdt.ui 2 0 2019-06-06 14:38:43.891 !MESSAGE The 'org.eclipse.jdt.ui.JavaAllCompletionProposalComputer' proposal computer from the 'org.eclipse.jdt.ui' plug-in did not complete normally. The extension has thrown a runtime exception. !STACK 0 java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.getAnonymousConstructorBinding(QualifiedAllocationExpression.java:659) at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.resolveTypeForQualifiedAllocationExpression(QualifiedAllocationExpression.java:553) at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.resolveType(QualifiedAllocationExpression.java:303) at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:730) at org.eclipse.jdt.internal.compiler.ast.ReturnStatement.resolve(ReturnStatement.java:333) at org.eclipse.jdt.internal.compiler.ast.LambdaExpression.resolveType(LambdaExpression.java:453) at org.eclipse.jdt.internal.compiler.ast.ASTNode.resolvePolyExpressionArguments(ASTNode.java:705) at org.eclipse.jdt.internal.compiler.ast.MessageSend.findMethodBinding(MessageSend.java:961) at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:775) at org.eclipse.jdt.internal.compiler.ast.Expression.resolve(Expression.java:1034) at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:641) at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:316) at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:551) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1229) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1329) at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.getAnonymousConstructorBinding(QualifiedAllocationExpression.java:662) at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.resolveTypeForQualifiedAllocationExpression(QualifiedAllocationExpression.java:553) at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.resolveType(QualifiedAllocationExpression.java:303) at org.eclipse.jdt.internal.compiler.ast.Expression.resolve(Expression.java:1034) at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:641) at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:316) at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:551) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1229) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1354) at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:652) at org.eclipse.jdt.internal.codeassist.CompletionEngine.complete(CompletionEngine.java:2250) at org.eclipse.jdt.internal.core.Openable.codeComplete(Openable.java:136) at org.eclipse.jdt.internal.core.CompilationUnit.codeComplete(CompilationUnit.java:368) at org.eclipse.jdt.internal.core.CompilationUnit.codeComplete(CompilationUnit.java:358) at org.eclipse.jdt.internal.ui.text.java.JavaCompletionProposalComputer.internalComputeCompletionProposals(JavaCompletionProposalComputer.java:253) at org.eclipse.jdt.internal.ui.text.java.JavaCompletionProposalComputer.computeCompletionProposals(JavaCompletionProposalComputer.java:215) at org.eclipse.jdt.internal.ui.text.java.JavaTypeCompletionProposalComputer.computeCompletionProposals(JavaTypeCompletionProposalComputer.java:66) at org.eclipse.jdt.internal.ui.text.java.CompletionProposalComputerDescriptor.computeCompletionProposals(CompletionProposalComputerDescriptor.java:336) at org.eclipse.jdt.internal.ui.text.java.CompletionProposalCategory.computeCompletionProposals(CompletionProposalCategory.java:340) at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor.collectProposals(ContentAssistProcessor.java:334) at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor.computeCompletionProposals(ContentAssistProcessor.java:291) at org.eclipse.jface.text.contentassist.ContentAssistant$2.lambda$0(ContentAssistant.java:2014) at java.util.Collections$SingletonSet.forEach(Collections.java:4767) at org.eclipse.jface.text.contentassist.ContentAssistant$2.run(ContentAssistant.java:2013) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:2010) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:573) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.lambda$0(CompletionProposalPopup.java:503) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:72) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:498) at org.eclipse.jface.text.contentassist.ContentAssistant$AutoAssistListener.lambda$0(ContentAssistant.java:380) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3919) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3550) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156) at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:636) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:563) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:151) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) 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:498) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:595) at org.eclipse.equinox.launcher.Main.run(Main.java:1501) The following are small variations of the code above where content assist works as expected: void good(X x) { new Runnable() { @Override public void run() { x.child(_1 -> _1 .child(_2 -> _2 // . CTRL-SPACE works here .child(_3 -> _3.hashCode()) ) ); } }; Runnable r = () -> { x.child(_1 -> _1 .child(_2 -> _2// . CTRL-SPACE works here .child(_3 -> {}) ) ); }; new Runnable() { @Override public void run() { x.child(new Consumer<X>() { @Override public void accept(X x) { x.child(_2 -> _2 // . CTRL-SPACE works here .child(_3 -> {}) ); } }); } }; }
I can't reproduce your NPE with Eclipse 4.12 RC1. I've tried to invoke content assist on lines with comments placing cursor after the "dot". However I see CCE errors while code completion inside "void" keyword and full UI hangup (100% CPU load) on line 30 on completion inside "accept" name, both coming from e4 tools proposal computer.
(In reply to Andrey Loskutov from comment #1) > I can't reproduce your NPE with Eclipse 4.12 RC1. > > I've tried to invoke content assist on lines with comments placing cursor > after the "dot". > > However I see CCE errors while code completion inside "void" keyword and > full UI hangup (100% CPU load) on line 30 on completion inside "accept" > name, both coming from e4 tools proposal computer. Here are the stacks (I had to kill IDE): The "regular" error: java.lang.ClassCastException: class org.eclipse.jdt.internal.compiler.ast.TypeDeclaration cannot be cast to class org.eclipse.jdt.internal.compiler.ast.AbstractVariableDeclaration (org.eclipse.jdt.internal.compiler.ast.TypeDeclaration and org.eclipse.jdt.internal.compiler.ast.AbstractVariableDeclaration are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @4b9dc62f) at org.eclipse.jdt.internal.compiler.parser.Parser.consumeExitVariableWithoutInitialization(Parser.java:4026) at org.eclipse.jdt.internal.codeassist.complete.CompletionParser.consumeExitVariableWithoutInitialization(CompletionParser.java:2833) at org.eclipse.jdt.internal.compiler.parser.Parser.consumeRule(Parser.java:6850) at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:11999) at org.eclipse.jdt.internal.codeassist.impl.AssistParser.parseBlockStatements(AssistParser.java:2029) at org.eclipse.jdt.internal.codeassist.impl.AssistParser.parseBlockStatements(AssistParser.java:1869) at org.eclipse.jdt.internal.codeassist.impl.Engine.parseBlockStatements(Engine.java:349) at org.eclipse.jdt.internal.codeassist.impl.Engine.parseBlockStatements(Engine.java:312) at org.eclipse.jdt.internal.codeassist.CompletionEngine.complete(CompletionEngine.java:2250) at org.eclipse.jdt.internal.core.Openable.codeComplete(Openable.java:136) at org.eclipse.jdt.internal.core.CompilationUnit.codeComplete(CompilationUnit.java:368) at org.eclipse.jdt.internal.core.CompilationUnit.codeComplete(CompilationUnit.java:363) at org.eclipse.jdt.internal.core.CompilationUnit.codeComplete(CompilationUnit.java:353) at org.eclipse.jdt.ui.text.java.JavaContentAssistInvocationContext.computeKeywordsAndContext(JavaContentAssistInvocationContext.java:301) at org.eclipse.jdt.ui.text.java.JavaContentAssistInvocationContext.getCoreContext(JavaContentAssistInvocationContext.java:177) at org.eclipse.e4.internal.tools.jdt.templates.E4TemplateCompletionProposalComputer.computeCompletionEngine(E4TemplateCompletionProposalComputer.java:166) at org.eclipse.jdt.internal.ui.text.java.AbstractTemplateCompletionProposalComputer.computeCompletionProposals(AbstractTemplateCompletionProposalComputer.java:65) at org.eclipse.jdt.internal.ui.text.java.CompletionProposalComputerDescriptor.computeCompletionProposals(CompletionProposalComputerDescriptor.java:336) at org.eclipse.jdt.internal.ui.text.java.CompletionProposalCategory.computeCompletionProposals(CompletionProposalCategory.java:340) at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor.collectProposals(ContentAssistProcessor.java:334) at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor.computeCompletionProposals(ContentAssistProcessor.java:291) at org.eclipse.jface.text.contentassist.ContentAssistant$2.lambda$0(ContentAssistant.java:2014) The endless loop case: Stack Trace at org.eclipse.jdt.internal.compiler.parser.Scanner.<init>(Scanner.java:202) at org.eclipse.jdt.internal.compiler.parser.Scanner.<init>(Scanner.java:303) at org.eclipse.jdt.internal.codeassist.complete.CompletionScanner.<init>(CompletionScanner.java:56) at org.eclipse.jdt.internal.codeassist.complete.CompletionParser.initializeScanner(CompletionParser.java:5203) at org.eclipse.jdt.internal.compiler.parser.Parser.<init>(Parser.java:963) at org.eclipse.jdt.internal.codeassist.impl.AssistParser.<init>(AssistParser.java:134) at org.eclipse.jdt.internal.codeassist.complete.CompletionParser.<init>(CompletionParser.java:190) at org.eclipse.jdt.internal.codeassist.complete.CompletionParser.createSnapShotParser(CompletionParser.java:5544) at org.eclipse.jdt.internal.codeassist.complete.CompletionParser.updateRecoveryState(CompletionParser.java:5701) at org.eclipse.jdt.internal.compiler.parser.Parser.resumeOnSyntaxError(Parser.java:13325) at org.eclipse.jdt.internal.codeassist.complete.CompletionParser.resumeOnSyntaxError(CompletionParser.java:5585) at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:11905) at org.eclipse.jdt.internal.codeassist.impl.AssistParser.parseBlockStatements(AssistParser.java:2029) at org.eclipse.jdt.internal.codeassist.impl.AssistParser.parseBlockStatements(AssistParser.java:1869) at org.eclipse.jdt.internal.codeassist.impl.Engine.parseBlockStatements(Engine.java:349) at org.eclipse.jdt.internal.codeassist.impl.Engine.parseBlockStatements(Engine.java:312) at org.eclipse.jdt.internal.codeassist.CompletionEngine.complete(CompletionEngine.java:2250) at org.eclipse.jdt.internal.core.Openable.codeComplete(Openable.java:136) at org.eclipse.jdt.internal.core.CompilationUnit.codeComplete(CompilationUnit.java:368) at org.eclipse.jdt.internal.core.CompilationUnit.codeComplete(CompilationUnit.java:363) at org.eclipse.jdt.internal.core.CompilationUnit.codeComplete(CompilationUnit.java:353) at org.eclipse.jdt.ui.text.java.JavaContentAssistInvocationContext.computeKeywordsAndContext(JavaContentAssistInvocationContext.java:301) at org.eclipse.jdt.ui.text.java.JavaContentAssistInvocationContext.getCoreContext(JavaContentAssistInvocationContext.java:177) at org.eclipse.e4.internal.tools.jdt.templates.E4TemplateCompletionProposalComputer.computeCompletionEngine(E4TemplateCompletionProposalComputer.java:166) at org.eclipse.jdt.internal.ui.text.java.AbstractTemplateCompletionProposalComputer.computeCompletionProposals(AbstractTemplateCompletionProposalComputer.java:65) at org.eclipse.jdt.internal.ui.text.java.CompletionProposalComputerDescriptor.computeCompletionProposals(CompletionProposalComputerDescriptor.java:336) at org.eclipse.jdt.internal.ui.text.java.CompletionProposalCategory.computeCompletionProposals(CompletionProposalCategory.java:340) at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor.collectProposals(ContentAssistProcessor.java:334) at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor.computeCompletionProposals(ContentAssistProcessor.java:291) at org.eclipse.jface.text.contentassist.ContentAssistant$2.lambda$0(ContentAssistant.java:2014) at org.eclipse.jface.text.contentassist.ContentAssistant$2$$Lambda$1350/0x0000000841253440.accept(Unknown Source) at java.base@11.0.2/java.util.Collections$SingletonSet.forEach(Collections.java:4795) at org.eclipse.jface.text.contentassist.ContentAssistant$2.run(ContentAssistant.java:2013) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:2010) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:575) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.lambda$0(CompletionProposalPopup.java:505) at org.eclipse.jface.text.contentassist.CompletionProposalPopup$$Lambda$1349/0x0000000841253c40.run(Unknown Source) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:72) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:500) at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions(ContentAssistant.java:1824) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer.doOperation(CompilationUnitEditor.java:189) at org.eclipse.ui.texteditor.ContentAssistAction.lambda$0(ContentAssistAction.java:85) at org.eclipse.ui.texteditor.ContentAssistAction$$Lambda$1490/0x00000008405acc40.run(Unknown Source) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:72) at org.eclipse.ui.texteditor.ContentAssistAction.run(ContentAssistAction.java:84)
To clarify. In all of the samples I added a "dot" directly after "_2 -> _2" like "_2 -> _2." and then hit Ctrl-Space.
While content assist is invoked, the whole expression is invalid (two "dot" tokens in a row).
(In reply to Markus Gaisbauer from comment #3) > To clarify. In all of the samples I added a "dot" directly after "_2 -> _2" > like "_2 -> _2." and then hit Ctrl-Space. OK, thanks, I can reproduce this now. I've also disabled e4 proposals, still same problem, here the fresh stack from 4.12 RC2: eclipse.buildId=4.12.0.I20190605-1800 java.version=11.0.2 java.vendor=Oracle Corporation BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US Command-line arguments: -os linux -ws gtk -arch x86_64 org.eclipse.jdt.ui Warning Thu Jun 06 16:11:14 CEST 2019 The 'org.eclipse.jdt.ui.JavaAllCompletionProposalComputer' proposal computer from the 'org.eclipse.jdt.ui' plug-in did not complete normally. The extension has thrown a runtime exception. java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.getAnonymousConstructorBinding(QualifiedAllocationExpression.java:659) at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.resolveTypeForQualifiedAllocationExpression(QualifiedAllocationExpression.java:553) at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.resolveType(QualifiedAllocationExpression.java:303) at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:729) at org.eclipse.jdt.internal.compiler.ast.ReturnStatement.resolve(ReturnStatement.java:310) at org.eclipse.jdt.internal.compiler.ast.LambdaExpression.resolveType(LambdaExpression.java:453) at org.eclipse.jdt.internal.compiler.ast.ASTNode.resolvePolyExpressionArguments(ASTNode.java:708) at org.eclipse.jdt.internal.compiler.ast.MessageSend.findMethodBinding(MessageSend.java:960) at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:774) at org.eclipse.jdt.internal.compiler.ast.Expression.resolve(Expression.java:1066) at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:641) at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:316) at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:551) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1280) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1380) at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.getAnonymousConstructorBinding(QualifiedAllocationExpression.java:662) at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.resolveTypeForQualifiedAllocationExpression(QualifiedAllocationExpression.java:553) at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.resolveType(QualifiedAllocationExpression.java:303) at org.eclipse.jdt.internal.compiler.ast.Expression.resolve(Expression.java:1066) at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:641) at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:316) at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:551) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1280) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1405) at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:652) at org.eclipse.jdt.internal.codeassist.CompletionEngine.complete(CompletionEngine.java:2255) at org.eclipse.jdt.internal.core.Openable.codeComplete(Openable.java:136) at org.eclipse.jdt.internal.core.CompilationUnit.codeComplete(CompilationUnit.java:368) at org.eclipse.jdt.internal.core.CompilationUnit.codeComplete(CompilationUnit.java:358) at org.eclipse.jdt.internal.ui.text.java.JavaCompletionProposalComputer.internalComputeCompletionProposals(JavaCompletionProposalComputer.java:253) at org.eclipse.jdt.internal.ui.text.java.JavaCompletionProposalComputer.computeCompletionProposals(JavaCompletionProposalComputer.java:215) at org.eclipse.jdt.internal.ui.text.java.JavaTypeCompletionProposalComputer.computeCompletionProposals(JavaTypeCompletionProposalComputer.java:66) at org.eclipse.jdt.internal.ui.text.java.CompletionProposalComputerDescriptor.computeCompletionProposals(CompletionProposalComputerDescriptor.java:336) at org.eclipse.jdt.internal.ui.text.java.CompletionProposalCategory.computeCompletionProposals(CompletionProposalCategory.java:340) at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor.collectProposals(ContentAssistProcessor.java:334) at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor.computeCompletionProposals(ContentAssistProcessor.java:291) at org.eclipse.jface.text.contentassist.ContentAssistant$2.lambda$0(ContentAssistant.java:2014) at java.base/java.util.Collections$SingletonSet.forEach(Collections.java:4795) at org.eclipse.jface.text.contentassist.ContentAssistant$2.run(ContentAssistant.java:2013) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:2010) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:575) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.lambda$0(CompletionProposalPopup.java:505) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:72) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:500) at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions(ContentAssistant.java:1824) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer.doOperation(CompilationUnitEditor.java:189) at org.eclipse.ui.texteditor.ContentAssistAction.lambda$0(ContentAssistAction.java:85)
(In reply to Markus Gaisbauer from comment #4) > While content assist is invoked, the whole expression is invalid (two "dot" > tokens in a row). No need in second dot, just hit Ctrl+Space with cursor right after "_2" and you will see the error.
Correct. But without the dot I would not hit Ctrl-Space because I already know that the proposal list is empty :) E.g. also directly after "_1 -> _1".
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.