Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Zarna2011-09-30 08:59:02 +0000
committerTomasz Zarna2011-09-30 08:59:02 +0000
commit0c4b23bcd85390ad7154302177e1f2e7943fd85c (patch)
treee0298b842dd51ba663092a2e80850db3f58b7776 /bundles
parent5688f5941c56018778e89b1f2535d700542b5994 (diff)
downloadeclipse.platform.team-0c4b23bcd85390ad7154302177e1f2e7943fd85c.tar.gz
eclipse.platform.team-0c4b23bcd85390ad7154302177e1f2e7943fd85c.tar.xz
eclipse.platform.team-0c4b23bcd85390ad7154302177e1f2e7943fd85c.zip
bug 358392: Compare editor does not show author if opened fromI20110926-0800
Synchronize view (NPE)
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileRevision.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java12
2 files changed, 9 insertions, 7 deletions
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileRevision.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileRevision.java
index ee6b283bd..e211b7b40 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileRevision.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileRevision.java
@@ -35,7 +35,7 @@ public interface IFileRevision {
* the returned <code>IFile</code>.
* @param monitor a progress monitor
* @return IStorage containing file storage
- * @throws CoreException
+ * @throws CoreException if an error occurs
*/
public IStorage getStorage(IProgressMonitor monitor) throws CoreException;
@@ -126,7 +126,7 @@ public interface IFileRevision {
* Returns an {@link IFileRevision} with all supported properties present.
* @param monitor a monitor
* @return a complete version of this file revision or null
- * @throws CoreException
+ * @throws CoreException if an error occurs
*/
public IFileRevision withAllProperties(IProgressMonitor monitor) throws CoreException;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java
index 85b92b33c..f73254cad 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -367,7 +367,7 @@ public class LocalResourceTypedElement extends ResourceNode implements IAdaptabl
* @since 3.7
*/
public void fetchAuthor(IProgressMonitor monitor) throws CoreException {
- author= null;
+ author = null;
IFileHistoryProvider fileHistoryProvider= Utils.getHistoryProvider(getResource());
if (fileHistoryProvider == null)
@@ -377,10 +377,12 @@ public class LocalResourceTypedElement extends ResourceNode implements IAdaptabl
if (revision == null)
return;
- // NOTE: Must not check for revision#isPropertyMissing() as this will always return true for the workspace file revision
- revision= revision.withAllProperties(monitor);
+ author = revision.getAuthor();
- author= revision.getAuthor();
+ if (author == null && revision.isPropertyMissing()) {
+ IFileRevision other = revision.withAllProperties(monitor);
+ author = other.getAuthor();
+ }
}
/**

Back to the top