Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 327064

Summary: Content assist within member-initializer does not work.
Product: [Tools] CDT Reporter: Vasiliy Dybala <dibalavs>
Component: cdt-parserAssignee: Markus Schorn <mschorn.eclipse>
Status: RESOLVED FIXED QA Contact: Mike Kucera <mikekucera>
Severity: normal    
Priority: P3    
Version: 8.0   
Target Milestone: 8.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
testcase + fix mschorn.eclipse: iplog-

Description Vasiliy Dybala CLA 2010-10-06 02:53:35 EDT
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.
Comment 1 Markus Schorn CLA 2010-10-06 05:03:47 EDT
Most likely a parser problem.
Comment 2 Markus Schorn CLA 2010-10-07 04:53:21 EDT
Created attachment 180398 [details]
testcase + fix
Comment 3 Markus Schorn CLA 2010-10-07 04:55:12 EDT
Fixed in 8.0 > 20101007.
Comment 6 Vasiliy Dybala CLA 2010-10-08 03:45:05 EDT
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>) {}
};
Comment 7 Markus Schorn CLA 2010-10-11 05:04:23 EDT
(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.