Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Weinand2003-12-11 14:16:19 +0000
committerAndre Weinand2003-12-11 14:16:19 +0000
commit3338cc76f0f224c5bea035074e2ecb3cbba55dba (patch)
tree66d251251065a10123f5f71ecd2871c3aa320641 /bundles/org.eclipse.compare/compare
parent7c1110a9343d35a1b2ca3043806af68b0ddba737 (diff)
downloadeclipse.platform.team-3338cc76f0f224c5bea035074e2ecb3cbba55dba.tar.gz
eclipse.platform.team-3338cc76f0f224c5bea035074e2ecb3cbba55dba.tar.xz
eclipse.platform.team-3338cc76f0f224c5bea035074e2ecb3cbba55dba.zip
fixed #47866
Diffstat (limited to 'bundles/org.eclipse.compare/compare')
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/ResourceNode.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/ResourceNode.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/ResourceNode.java
index e82d480af..4c08c8111 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/ResourceNode.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/ResourceNode.java
@@ -177,8 +177,21 @@ public class ResourceNode extends BufferedContent
* @exception CoreException if the contents of this storage could not be accessed
*/
protected InputStream createStream() throws CoreException {
- if (fResource instanceof IStorage)
- return new BufferedInputStream(((IStorage)fResource).getContents());
+ if (fResource instanceof IStorage) {
+ InputStream is= null;
+ IStorage storage= (IStorage) fResource;
+ try {
+ is= storage.getContents();
+ } catch (CoreException e) {
+ if (e.getStatus().getCode() == IResourceStatus.OUT_OF_SYNC_LOCAL) {
+ fResource.refreshLocal(IResource.DEPTH_INFINITE, null);
+ is= storage.getContents();
+ } else
+ throw e;
+ }
+ if (is != null)
+ return new BufferedInputStream(is);
+ }
return null;
}

Back to the top