Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2003-09-12 09:10:32 -0400
committerJean Michel-Lemieux2003-09-12 09:10:32 -0400
commit9ca6e050e4dc48da4247bbdc79db869b55776a57 (patch)
tree78685fa12cb5b8f70815a007a51bbeda6a131975
parentc4d4c2f8c746d994cb405fe8821efecffc30c9f6 (diff)
downloadeclipse.platform.team-9ca6e050e4dc48da4247bbdc79db869b55776a57.tar.gz
eclipse.platform.team-9ca6e050e4dc48da4247bbdc79db869b55776a57.tar.xz
eclipse.platform.team-9ca6e050e4dc48da4247bbdc79db869b55776a57.zip
Bug 42980 NPE trying to get the annotation of a file on cvs server over extssh
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AnnotateView.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AnnotateView.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AnnotateView.java
index aabc68028..8917530db 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AnnotateView.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AnnotateView.java
@@ -16,6 +16,7 @@ import java.lang.reflect.InvocationTargetException;
import java.util.Collection;
import java.util.Iterator;
+import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
@@ -143,8 +144,13 @@ public class AnnotateView extends ViewPart implements ISelectionChangedListener
setTitle(Policy.bind("CVSAnnotateView.showFileAnnotation", new Object[] {cvsResource.getName()})); //$NON-NLS-1$
try {
- setTitleToolTip(cvsResource.getIResource().getFullPath().toString());
- } catch (CVSException e1) {
+ IResource localResource = cvsResource.getIResource();
+ if (localResource != null) {
+ setTitleToolTip(localResource.getFullPath().toString());
+ } else {
+ setTitleToolTip(cvsResource.getName());
+ }
+ } catch (CVSException e) {
setTitleToolTip(cvsResource.getName());
}
@@ -272,7 +278,9 @@ public class AnnotateView extends ViewPart implements ISelectionChangedListener
// Select the revision in the history view.
- historyView.selectRevision(listSelection.getRevision());
+ if(historyView != null) {
+ historyView.selectRevision(listSelection.getRevision());
+ }
lastSelectionWasText = false;
}

Back to the top