mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 215566 - PDOM#getFileName() returns null for non-standard EFS implementations
This commit is contained in:
parent
c099d478d2
commit
616efbbdbe
1 changed files with 5 additions and 0 deletions
|
@ -11,6 +11,7 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.core.pdom.dom;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URI;
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
@ -23,6 +24,7 @@ import org.eclipse.cdt.internal.core.index.IIndexFragment;
|
|||
import org.eclipse.cdt.internal.core.index.IIndexFragmentName;
|
||||
import org.eclipse.cdt.internal.core.pdom.PDOM;
|
||||
import org.eclipse.cdt.internal.core.pdom.db.Database;
|
||||
import org.eclipse.core.filesystem.EFS;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
|
||||
/**
|
||||
|
@ -280,6 +282,9 @@ public final class PDOMName implements IIndexFragmentName, IASTFileLocation {
|
|||
URI uri = file.getLocation().getURI();
|
||||
if ("file".equals(uri.getScheme())) //$NON-NLS-1$
|
||||
return uri.getSchemeSpecificPart();
|
||||
File f = EFS.getStore(uri).toLocalFile(0, null);
|
||||
if( f != null )
|
||||
return f.getAbsolutePath();
|
||||
}
|
||||
} catch (CoreException e) {
|
||||
CCorePlugin.log(e);
|
||||
|
|
Loading…
Add table
Reference in a new issue