mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 01:36:01 +02:00
Bug 339931 - Code completion fails in #include statements
This commit is contained in:
parent
0605ef71f9
commit
bffecbbf9b
1 changed files with 5 additions and 2 deletions
|
@ -23,6 +23,7 @@ import org.eclipse.core.resources.IProject;
|
|||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.resources.IResourceProxy;
|
||||
import org.eclipse.core.resources.IResourceProxyVisitor;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
|
@ -289,8 +290,10 @@ public class InclusionProposalComputer implements ICompletionProposalComputer {
|
|||
}
|
||||
if (prefixPath.segmentCount() > 0) {
|
||||
IPath parentPath = parent.getFullPath().append(prefixPath);
|
||||
if (parentPath.segmentCount() > 0) {
|
||||
parent= parent.getFolder(prefixPath);
|
||||
if (parentPath.segmentCount() > 1) {
|
||||
parent = parent.getFolder(prefixPath);
|
||||
} else if (parentPath.segmentCount() == 1) {
|
||||
parent = ResourcesPlugin.getWorkspace().getRoot().getProject(parentPath.lastSegment());
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue