mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56: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.IResource;
|
||||||
import org.eclipse.core.resources.IResourceProxy;
|
import org.eclipse.core.resources.IResourceProxy;
|
||||||
import org.eclipse.core.resources.IResourceProxyVisitor;
|
import org.eclipse.core.resources.IResourceProxyVisitor;
|
||||||
|
import org.eclipse.core.resources.ResourcesPlugin;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
|
@ -289,8 +290,10 @@ public class InclusionProposalComputer implements ICompletionProposalComputer {
|
||||||
}
|
}
|
||||||
if (prefixPath.segmentCount() > 0) {
|
if (prefixPath.segmentCount() > 0) {
|
||||||
IPath parentPath = parent.getFullPath().append(prefixPath);
|
IPath parentPath = parent.getFullPath().append(prefixPath);
|
||||||
if (parentPath.segmentCount() > 0) {
|
if (parentPath.segmentCount() > 1) {
|
||||||
parent = parent.getFolder(prefixPath);
|
parent = parent.getFolder(prefixPath);
|
||||||
|
} else if (parentPath.segmentCount() == 1) {
|
||||||
|
parent = ResourcesPlugin.getWorkspace().getRoot().getProject(parentPath.lastSegment());
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue