Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Aniszczyk2011-02-09 12:23:36 -0500
committerCode Review2011-02-09 12:23:36 -0500
commit8d825964dc6c6899087a74dcd521a580aa82a9dd (patch)
tree5e3fcfe916f4f236c60df7ef617b4f99fc1d953b
parent1e4befdc69876383c51fb26e703482e4e0ec9764 (diff)
parent47f3a978c9107b7b7336be2fec8e2b1ef12257cf (diff)
downloadegit-8d825964dc6c6899087a74dcd521a580aa82a9dd.tar.gz
egit-8d825964dc6c6899087a74dcd521a580aa82a9dd.tar.xz
egit-8d825964dc6c6899087a74dcd521a580aa82a9dd.zip
Merge "Avoid ClassCastException in Repositories View" into stable-0.11
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesView.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesView.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesView.java
index b09621f06..0262a6c21 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesView.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesView.java
@@ -74,6 +74,7 @@ import org.eclipse.ui.commands.ICommandService;
import org.eclipse.ui.handlers.IHandlerService;
import org.eclipse.ui.navigator.CommonNavigator;
import org.eclipse.ui.navigator.CommonViewer;
+import org.eclipse.ui.part.IPage;
import org.eclipse.ui.part.ShowInContext;
import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
import org.eclipse.ui.views.properties.IPropertySheetPage;
@@ -454,11 +455,11 @@ public class RepositoriesView extends CommonNavigator {
IViewPart part = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getActivePage()
.findView(IPageLayout.ID_PROP_SHEET);
- if (part != null) {
+ if (part instanceof PropertySheet) {
PropertySheet sheet = (PropertySheet) part;
- PropertySheetPage page = (PropertySheetPage) sheet
- .getCurrentPage();
- page.refresh();
+ IPage page = sheet.getCurrentPage();
+ if (page instanceof PropertySheetPage)
+ ((PropertySheetPage) page).refresh();
}
if (traceActive)
GitTraceLocation

Back to the top