aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Megert2012-01-13 05:43:24 (EST)
committerDaniel Megert2012-01-13 05:43:24 (EST)
commit8f6eb35661ca7c32696e436c34270e8586249d3d (patch)
tree7582ee140d4d586262abb817bab86f61c001f294
parent599becb922caa662ea97d02429c16128d2ba9823 (diff)
downloadegit-8f6eb35661ca7c32696e436c34270e8586249d3d.zip
egit-8f6eb35661ca7c32696e436c34270e8586249d3d.tar.gz
egit-8f6eb35661ca7c32696e436c34270e8586249d3d.tar.bz2
Fix ClassCastException in GitHistoryPagerefs/changes/50/4950/1
Bug 368526 Change-Id: I8ae10f46a492b516e0ce1eecc986d394a4ecc74a Signed-off-by: Daniel Megert <daniel_megert@ch.ibm.com>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
index bf79cf5..50e596c 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
@@ -4,6 +4,7 @@
* Copyright (c) 2010, Stefan Lay <stefan.lay@sap.com>
* Copyright (C) 2010, Mathias Kinzler <mathias.kinzler@sap.com>
* Copyright (C) 2010-2011, Matthias Sohn <matthias.sohn@sap.com>
+ * Copyright (C) 2012, Daniel megert <daniel_megert@ch.ibm.com>
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -597,8 +598,7 @@ public class GitHistoryPage extends HistoryPage implements RefsChangedListener {
public void propertyChange(PropertyChangeEvent event) {
if (UIPreferences.RESOURCEHISTORY_SHOW_RELATIVE_DATE.equals(event
.getProperty()))
- if (graph.setRelativeDate(((Boolean) event.getNewValue())
- .booleanValue()))
+ if (graph.setRelativeDate(isShowingRelativeDates()))
graph.getTableView().refresh();
}
};
@@ -709,8 +709,7 @@ public class GitHistoryPage extends HistoryPage implements RefsChangedListener {
graphDetailSplit);
graph = new CommitGraphTable(graphDetailSplit, getSite(), popupMgr);
- graph.setRelativeDate(Activator.getDefault().getPreferenceStore()
- .getBoolean(UIPreferences.RESOURCEHISTORY_SHOW_RELATIVE_DATE));
+ graph.setRelativeDate(isShowingRelativeDates());
Activator.getDefault().getPreferenceStore()
.addPropertyChangeListener(listener);
@@ -1865,4 +1864,8 @@ public class GitHistoryPage extends HistoryPage implements RefsChangedListener {
job = null;
}
}
+
+ private boolean isShowingRelativeDates() {
+ return Activator.getDefault().getPreferenceStore().getBoolean(UIPreferences.RESOURCEHISTORY_SHOW_RELATIVE_DATE);
+ }
}