mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 09:46:02 +02:00
Removed workaround for bug 261457, which has been fixed in the platform.
This commit is contained in:
parent
c5c0fc6d24
commit
2ef51ed6f7
4 changed files with 10 additions and 32 deletions
|
@ -345,16 +345,14 @@ public class IndexTypeInfo implements ITypeInfo, IFunctionInfo {
|
|||
if (fullPath != null) {
|
||||
IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(fullPath));
|
||||
if (file != null) {
|
||||
return new IndexTypeReference(
|
||||
binding, file, file.getProject(), indexName.getNodeOffset(), indexName.getNodeLength()
|
||||
);
|
||||
return new IndexTypeReference(binding, file, file.getProject(), indexName.getNodeOffset(),
|
||||
indexName.getNodeLength());
|
||||
}
|
||||
} else {
|
||||
IPath path = URIUtil.toPath(ifl.getURI());
|
||||
if (path != null) {
|
||||
return new IndexTypeReference(
|
||||
binding, path, null, indexName.getNodeOffset(), indexName.getNodeLength()
|
||||
);
|
||||
return new IndexTypeReference(binding, path, null, indexName.getNodeOffset(),
|
||||
indexName.getNodeLength());
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
|
|
@ -12,20 +12,16 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.index;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URI;
|
||||
|
||||
import org.eclipse.cdt.core.model.ICProject;
|
||||
import org.eclipse.cdt.core.model.ITranslationUnit;
|
||||
import org.eclipse.cdt.internal.core.index.IndexFileLocation;
|
||||
import org.eclipse.cdt.internal.core.resources.ResourceLookup;
|
||||
import org.eclipse.core.filesystem.EFS;
|
||||
import org.eclipse.core.filesystem.IFileStore;
|
||||
import org.eclipse.core.filesystem.URIUtil;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
|
||||
|
@ -65,21 +61,7 @@ public class IndexLocationFactory {
|
|||
* if the location is not a filesystem path.
|
||||
*/
|
||||
public static IPath getAbsolutePath(IIndexFileLocation location) {
|
||||
IPath path = URIUtil.toPath(location.getURI());
|
||||
// Workaround for platform bug http://bugs.eclipse.org/bugs/show_bug.cgi?id=261457
|
||||
if (path == null) {
|
||||
try {
|
||||
IFileStore store = EFS.getStore(location.getURI());
|
||||
if (store == null)
|
||||
return null;
|
||||
File file = store.toLocalFile(EFS.NONE, null);
|
||||
if (file == null)
|
||||
return null;
|
||||
path = new Path(file.getAbsolutePath());
|
||||
} catch (CoreException e) {
|
||||
}
|
||||
}
|
||||
return path;
|
||||
return URIUtil.toPath(location.getURI());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -48,14 +48,12 @@ public class EFSFileStorage extends PlatformObject implements IStorage {
|
|||
IFileStore fileStore = EFS.getStore(locationURI);
|
||||
|
||||
if (fileStore != null) {
|
||||
|
||||
inputStream = fileStore.openInputStream(EFS.NONE,
|
||||
new NullProgressMonitor());
|
||||
}
|
||||
}
|
||||
|
||||
return inputStream;
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
Loading…
Add table
Reference in a new issue