Community
Participate
Working Groups
Build Identifier: 20110218-0911 Code completion in #include statements fails if done in a subfolder and the entered folder hierarchy descends to the the project's base folder (note: not to the workspace's base folder, merely to the project's base folder). Example: - In "project_base/folder/test1.h" code completion fails when typing: #include "../<ctrl-space> - In "project_base/folder/subfolder/test2.h" code completion works fine when typing: #include "../<ctrl-space> Reproducible: Always Steps to Reproduce: 1. Create a new C++ project 2. Add two folders A and B to the project 3. Create a header file in each folder, ex. a.h and b.h 4. Write #include "../ in a.h and invoke code completion (ctrl-space); this will now fail to list the possible folders A and B
Created attachment 191192 [details] InclusionProposalComputer project container patch container.getFolder(IPath) doesn't work for segments == 1, it needs to get a IProject instead.
Comment on attachment 191192 [details] InclusionProposalComputer project container patch This patch isn't quite right because you can type ../otherproject/ and get the wrong proposals.
Created attachment 191279 [details] InclusionProposalComputer project container patch New patch that fixes the wrong project issue.
Fixed in HEAD.
*** cdt cvs genie on behalf of mlaperle *** Bug 339931 - Code completion fails in #include statements [*] InclusionProposalComputer.java 1.7 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/InclusionProposalComputer.java?root=Tools_Project&r1=1.6&r2=1.7