| Summary: | [Content Assist] Context-specifics are not considered when completion list is requested | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | James Ciesielski <jciesiel> |
| Component: | cdt-parser | Assignee: | John Camelon <john.camelon> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | aniefer |
| Version: | 2.0 | ||
| Target Milestone: | 2.0 | ||
| Hardware: | PC | ||
| OS: | Windows 2000 | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 50807, 57692, 57898 | ||
Agreed, this is happening because we are passing back an IASTTypeSpecifier as the context rather than the actual raw type of the object ... an IASTAbstactDeclaration (with pointer modifiers). Update summary to add [Content Assist] tag for easy searching. Andrew, I will fix the factory/parser to return the right IASTNode ... but I also think that this may require some updates to ASTNode.lookup() : I'll assign it your way if that is the case. Consider yourself forewarned! This has been fixed in HEAD. This is verified on Eclipse build 20040603 and CDT build 200406030301, and it passes. Pixy. marking it verified |
Eclipse 3.0M6 CDT Build 2.0.0.0031 Sun JDK 1.4.2_02 Test case: 1. Create a managed make C++ project. 2. Add a file, call it main.cpp. 3. Insert the following code into main.cpp: class CMine { public: CMine() {} int getMyInt() { return m_nMyInt; } private: int m_nMyInt; }; int main(int argc, char **argv) { CMine cm; cm->[^SPC]; // ** (A) ** } 4. Execute Content Assist on line (A) using the prefix "cm" and the "->" reference. Expected: I expected to receive a message indicating that the refernce "->" was being used incorrectly. Instead the "getMyInt()" method was inserted, leaving the user with code that will generate a compilation error.