| Summary: | Missing content assist proposals at global scope in combination with using declarations in separate header file | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Jens Elmenthaler <jens.elmenthaler> | ||||
| Component: | cdt-parser | Assignee: | Markus Schorn <mschorn.eclipse> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Markus Schorn <mschorn.eclipse> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | cdtdoug | ||||
| Version: | 7.0 | ||||||
| Target Milestone: | 8.0 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 184332 [details]
testcase + fix
The using declarations obtained from the index need to be expanded by the parser. Fixed in 8.0 > 20101202. *** cdt cvs genie on behalf of mschorn *** Bug 331056: Content assist for involving using declarations. [*] CompletionTests.java 1.53 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.52&r2=1.53 [*] CPPSemantics.java 1.196 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java?root=Tools_Project&r1=1.195&r2=1.196 [*] CPPScope.java 1.61 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPScope.java?root=Tools_Project&r1=1.60&r2=1.61 |
Build Identifier: HAED Create the following files: // content_assist.hpp namespace A { class Reference { public: }; } namespace B { using ::A::Reference; } // content_assist.cpp #include "content_assist.hpp" using namespace ::B; // Start typign "Ref" here and press Ctrl-Space No proposal is available. Adding "using namespace ::A;" in the cpp file does not help without removing the "using namespace ::B;". Also, the using declaration for ::A::Reference must be in a separate header file. Reproducible: Always