Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAnton Leherbauer2008-04-17 06:37:23 -0400
committerAnton Leherbauer2008-04-17 06:37:23 -0400
commitc14f495a344dac4c5159d483337cbf1a5db60224 (patch)
treeb0720ce86fd8db4990980c17a777be8b1c9e4e4c /core
parent477fe21a1393a7c2751fee3dd81baa6cd872872c (diff)
downloadorg.eclipse.cdt-c14f495a344dac4c5159d483337cbf1a5db60224.tar.gz
org.eclipse.cdt-c14f495a344dac4c5159d483337cbf1a5db60224.tar.xz
org.eclipse.cdt-c14f495a344dac4c5159d483337cbf1a5db60224.zip
Fix regression of bug 217727
Diffstat (limited to 'core')
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/EditorUtility.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/EditorUtility.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/EditorUtility.java
index dfcd8b81d44..ab6c6565d29 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/EditorUtility.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/EditorUtility.java
@@ -14,6 +14,7 @@
*******************************************************************************/
package org.eclipse.cdt.internal.ui.util;
+import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.net.URI;
@@ -157,7 +158,7 @@ public class EditorUtility {
}
private static IEditorPart openInEditor(IFile file, boolean activate) throws PartInitException {
- if (file == null)
+ if (file == null)
return null;
if (!file.getProject().isAccessible()) {
closedProject(file.getProject());
@@ -712,7 +713,7 @@ public class EditorUtility {
try {
IBuffer buffer = bin.getBuffer();
if (buffer != null) {
- store = new EFSFileStorage (bin.getLocationURI());
+ store = new FileStorage (new ByteArrayInputStream(buffer.getContents().getBytes()), bin.getPath());
}
} catch (CModelException e) {
// nothing;
@@ -720,10 +721,6 @@ public class EditorUtility {
return store;
}
- public static IStorage getStorage(ITranslationUnit tu) {
- return new EFSFileStorage (tu.getLocationURI());
- }
-
/**
* Returns the C project for a given editor input or <code>null</code> if no corresponding
* C project exists.

Back to the top