Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Camelon2008-02-13 19:04:52 +0000
committerJohn Camelon2008-02-13 19:04:52 +0000
commit616efbbdbe5dd990e24fe0b1c7962a16a154ef92 (patch)
treee6cd567dbdadcc85990534a021b131fa90d5cd3a /core/org.eclipse.cdt.core/parser
parentc099d478d29b717296fa3ea6da553518164da9d9 (diff)
downloadorg.eclipse.cdt-616efbbdbe5dd990e24fe0b1c7962a16a154ef92.tar.gz
org.eclipse.cdt-616efbbdbe5dd990e24fe0b1c7962a16a154ef92.tar.xz
org.eclipse.cdt-616efbbdbe5dd990e24fe0b1c7962a16a154ef92.zip
Bug 215566 - PDOM#getFileName() returns null for non-standard EFS implementations
Diffstat (limited to 'core/org.eclipse.cdt.core/parser')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMName.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMName.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMName.java
index fc5b2a26394..58845120f54 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMName.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMName.java
@@ -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);

Back to the top