mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 379492 - IBFile should account for EFS external files
This commit is contained in:
parent
5be405cf35
commit
3fc1ce92e7
1 changed files with 6 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
|
* Copyright (c) 2006, 2012 Wind River Systems, Inc. and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -7,6 +7,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Markus Schorn - initial API and implementation
|
* Markus Schorn - initial API and implementation
|
||||||
|
* IBM Corporation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.cdt.internal.ui.includebrowser;
|
package org.eclipse.cdt.internal.ui.includebrowser;
|
||||||
|
@ -37,7 +38,10 @@ public class IBFile {
|
||||||
|
|
||||||
public IBFile(ICProject preferredProject, IIndexFileLocation location) throws CModelException {
|
public IBFile(ICProject preferredProject, IIndexFileLocation location) throws CModelException {
|
||||||
fLocation= location;
|
fLocation= location;
|
||||||
fTU= CoreModelUtil.findTranslationUnitForLocation(location, preferredProject);
|
ITranslationUnit TU = CoreModelUtil.findTranslationUnitForLocation(location, preferredProject);
|
||||||
|
if (TU == null) //for EFS file that might not be on this filesystem
|
||||||
|
TU = CoreModelUtil.findTranslationUnitForLocation(location.getURI(), preferredProject);
|
||||||
|
fTU = TU;
|
||||||
String name= fLocation.getURI().getPath();
|
String name= fLocation.getURI().getPath();
|
||||||
fName= name.substring(name.lastIndexOf('/')+1);
|
fName= name.substring(name.lastIndexOf('/')+1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue