Community
Participate
Working Groups
Build Identifier: 201009242334 1. Write next code: class B { public: B(int, char, int){} }; class D : public B { public: D() : B(<Ctrl + Space>) {} }; 2. press Ctrl + Space inside B(), content assist doesn't show anything. I found similar bug (https://bugs.eclipse.org/bugs/show_bug.cgi?id=90126), but it has been fixed more then 5 years ago. Reproducible: Always Steps to Reproduce: 1. launch eclipse 2. write code 3. press Ctrl + Space inside initialization list.
Most likely a parser problem.
Created attachment 180398 [details] testcase + fix
Fixed in 8.0 > 20101007.
*** cdt cvs genie on behalf of mschorn *** Bug 327064 - Content assist within member initializer. [*] CPPASTConstructorChainInitializer.java 1.20 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTConstructorChainInitializer.java?root=Tools_Project&r1=1.19&r2=1.20 [*] CompletionTestBase.java 1.11 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/prefix/CompletionTestBase.java?root=Tools_Project&r1=1.10&r2=1.11 [*] BasicCompletionTest.java 1.27 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/prefix/BasicCompletionTest.java?root=Tools_Project&r1=1.26&r2=1.27
*** cdt cvs genie on behalf of mschorn *** Bug 327064: Update testcase. [*] CompletionTests.java 1.51 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTests.java?root=Tools_Project&r1=1.50&r2=1.51
Will this fix work for non constructors initialization? Or this is separate bug? For example: class B { public: B(int, char, int){} }; class D { B b; public: D() : b(<Ctrl + Cpace>) {} };
(In reply to comment #6) This is similar to bug 223660. I will fix that bug and add your example as a testcase. If you are interested, you are welcome to contribute testcases. This can help to eliminate more bugs within content assist. A good place to look at would be ParameterHintTests and CompletionTests in package org.eclipse.cdt.ui.tests.text.contentassist2.