HEAD - Fix several issues
diff --git a/bundles/org.eclipse.test.performance.ui/performanceui.jar b/bundles/org.eclipse.test.performance.ui/performanceui.jar
index 019cc18..57ed0e2 100644
--- a/bundles/org.eclipse.test.performance.ui/performanceui.jar
+++ b/bundles/org.eclipse.test.performance.ui/performanceui.jar
Binary files differ
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/DB_Results.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/DB_Results.java
index 21f8322..427cd3d 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/DB_Results.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/DB_Results.java
@@ -166,14 +166,19 @@
* (see {@link IPerformancesConstants#NETWORK_DATABASE_LOCATION}).
*/
public static boolean updateDbConstants(boolean connected, int eclipseVersion, String databaseLocation) {
- shutdown();
- DB_CONNECTION = connected;
- DB_LOCATION = databaseLocation == null ? IPerformancesConstants.NETWORK_DATABASE_LOCATION : databaseLocation;
- DB_NAME = IPerformancesConstants.DATABASE_NAME_PREFIX + eclipseVersion;
- DB_VERSION = "v" + eclipseVersion;
- DB_VERSION_REF = "R-3." + (eclipseVersion % 10 - 1);
- if (connected) {
- return getDefault().fSQL != null;
+ if (DB_CONNECTION != connected ||
+ ((databaseLocation == null && DB_LOCATION != null && !DB_LOCATION.equals(IPerformancesConstants.NETWORK_DATABASE_LOCATION)) ||
+ !DB_LOCATION.equals(databaseLocation)) ||
+ !DB_NAME.equals(IPerformancesConstants.DATABASE_NAME_PREFIX + eclipseVersion)) {
+ shutdown();
+ DB_CONNECTION = connected;
+ DB_LOCATION = databaseLocation == null ? IPerformancesConstants.NETWORK_DATABASE_LOCATION : databaseLocation;
+ DB_NAME = IPerformancesConstants.DATABASE_NAME_PREFIX + eclipseVersion;
+ DB_VERSION = "v" + eclipseVersion;
+ DB_VERSION_REF = "R-3." + (eclipseVersion % 10 - 1);
+ if (connected) {
+ return getDefault().fSQL != null;
+ }
}
return true;
}
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/ConfigTab.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/ConfigTab.java
index 7c22519..37fa49d 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/ConfigTab.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/ConfigTab.java
@@ -300,10 +300,12 @@
* Dispose all SWT controls associated with the table.
*/
private void disposeTable() {
- Iterator cells = this.toolTips.keySet().iterator();
- while (cells.hasNext()) {
- ToolTip toolTip = (ToolTip) this.toolTips.get(cells.next());
- toolTip.dispose();
+ if (this.toolTips != null) {
+ Iterator cells = this.toolTips.keySet().iterator();
+ while (cells.hasNext()) {
+ ToolTip toolTip = (ToolTip) this.toolTips.get(cells.next());
+ toolTip.dispose();
+ }
}
this.table.dispose();
this.tableOrigin = null;
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/PerformanceResultsPreferencePage.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/PerformanceResultsPreferencePage.java
index c7b9861..081eaef 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/PerformanceResultsPreferencePage.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/PerformanceResultsPreferencePage.java
@@ -518,15 +518,13 @@
this.defaultDimensionCombo.setText(defaultDimension);
// Init generated dimensions
- int i = 0;
int count = this.resultsDimensionsList.getItemCount();
int[] indices = new int[count];
int n = 0;
- String resultsDimension = store.getString(PRE_RESULTS_DIMENSION + "." + i);
+ String resultsDimension = store.getString(PRE_RESULTS_DIMENSION + "." + n);
while (resultsDimension.length() > 0) {
indices[n++] = this.resultsDimensionsList.indexOf(resultsDimension);
- i++;
- resultsDimension = store.getString(PRE_RESULTS_DIMENSION + "." + i);
+ resultsDimension = store.getString(PRE_RESULTS_DIMENSION + "." + n);
}
if (n < count) {
System.arraycopy(indices, 0, indices = new int[n], 0, n);
@@ -708,8 +706,9 @@
IEclipsePreferences preferences = new InstanceScope().getNode(PLUGIN_ID);
preferences.flush();
BuildsView buildsView = (BuildsView) PerformancesView.getWorkbenchView("org.eclipse.test.internal.performance.results.ui.BuildsView");
- if (buildsView != null)
- buildsView.resetView();
+ if (buildsView != null) {
+ buildsView.resetView();
+ }
} catch (BackingStoreException e) {
e.printStackTrace();
return false;