Adjust the update of the Dashboard for Gerrit 2.4

Change-Id: Idabb6b7c09e075d36f24cdc937b0aa167e535db8
Signed-off-by: jbouthillie <lmcbout@gmail.com>
diff --git a/org.eclipse.mylyn.reviews.r4e-gerrit.ui/src/org/eclipse/mylyn/reviews/r4egerrit/ui/views/R4EGerritTableView.java b/org.eclipse.mylyn.reviews.r4e-gerrit.ui/src/org/eclipse/mylyn/reviews/r4egerrit/ui/views/R4EGerritTableView.java
index 77e24bc..91fc8dd 100644
--- a/org.eclipse.mylyn.reviews.r4e-gerrit.ui/src/org/eclipse/mylyn/reviews/r4egerrit/ui/views/R4EGerritTableView.java
+++ b/org.eclipse.mylyn.reviews.r4e-gerrit.ui/src/org/eclipse/mylyn/reviews/r4egerrit/ui/views/R4EGerritTableView.java
@@ -728,7 +728,7 @@
                 catch (R4EQueryException e) {
                     status = e.getStatus();
                     R4EGerritPlugin.Ftracer.traceWarning(status.toString());
-                    UIUtils.showErrorDialog(e.getMessage(), status.toString());
+//                    UIUtils.showErrorDialog(e.getMessage(), status.toString());
                 }
 
 				aMonitor.done();
@@ -835,6 +835,20 @@
     	// Start the long-running synchronized query; the individual review details
         // are handled by ITaskListChangeListener.containersChanged()
         GerritConnector connector = GerritCorePlugin.getDefault().getConnector();
+        Version version = getlastGerritServerVersion ();
+        if (version != null && version.getMajor() >= 2) {
+        	if (version.getMinor() < 5) {
+        		//We are in Gerrit server 2.4 and lower, need a resynch
+                Job job = null;
+                try {
+                    job = TasksUiInternal.synchronizeQuery(connector, query, null, true);
+        		} catch (Exception e) {
+        			if (job != null) {
+        				job.cancel();
+        			}
+        		}
+        	}
+        }
         Job job = null;
         //JB test temp, remove the long query
 //        try {