mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Patch by ashish for Bug 161529 - Open Include from the Outline view does not automatically resolve the include file
This commit is contained in:
parent
b916d1065e
commit
28b8e38cb1
1 changed files with 5 additions and 1 deletions
|
@ -207,7 +207,11 @@ public class OpenIncludeAction extends Action {
|
|||
|
||||
public boolean visit(IResourceProxy proxy) throws CoreException {
|
||||
if (proxy.getType() == IResource.FILE && proxy.getName().equalsIgnoreCase(name.lastSegment())) {
|
||||
list.add(proxy.requestResource().getLocation());
|
||||
IPath rPath = proxy.requestResource().getLocation();
|
||||
int numSegToRemove = rPath.segmentCount() - name.segmentCount();
|
||||
IPath sPath = rPath.removeFirstSegments(numSegToRemove);
|
||||
if (sPath.equals(name))
|
||||
list.add(rPath);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue