Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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