diff options
author | Andre Weinand | 2003-12-11 14:16:19 +0000 |
---|---|---|
committer | Andre Weinand | 2003-12-11 14:16:19 +0000 |
commit | 3338cc76f0f224c5bea035074e2ecb3cbba55dba (patch) | |
tree | 66d251251065a10123f5f71ecd2871c3aa320641 /bundles/org.eclipse.compare/compare | |
parent | 7c1110a9343d35a1b2ca3043806af68b0ddba737 (diff) | |
download | eclipse.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.java | 17 |
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; } |