Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Baron2009-06-23 12:03:21 -0400
committerElliott Baron2009-06-23 12:03:21 -0400
commitea0f316ba66d4526fbba628d8f53ca4f29ace83a (patch)
tree1524df2d1a51631ff4e19d3994107eebb5cabd62
parent686ae7223c85a2ca633277e3505e3a50fd0e1d1a (diff)
downloadorg.eclipse.linuxtools-ea0f316ba66d4526fbba628d8f53ca4f29ace83a.tar.gz
org.eclipse.linuxtools-ea0f316ba66d4526fbba628d8f53ca4f29ace83a.tar.xz
org.eclipse.linuxtools-ea0f316ba66d4526fbba628d8f53ca4f29ace83a.zip
Chart Export feature and Minimum version check. Simplified test suite code.
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/ChangeLog10
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/src/org/eclipse/linuxtools/valgrind/cachegrind/tests/AbstractCachegrindTest.java6
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/src/org/eclipse/linuxtools/valgrind/cachegrind/tests/CachegrindTestToolPage.java89
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/src/org/eclipse/linuxtools/valgrind/cachegrind/tests/LaunchConfigTabTest.java18
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.cachegrind/ChangeLog17
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.cachegrind/src/org/eclipse/linuxtools/valgrind/cachegrind/CachegrindToolPage.java56
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch/ChangeLog32
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/ValgrindExportWizardPage.java16
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/ValgrindLaunchConfigurationDelegate.java2
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/ValgrindLaunchPlugin.java17
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/ValgrindOptionsTab.java61
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/messages.properties1
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif.tests/ChangeLog13
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif.tests/META-INF/MANIFEST.MF2
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/AbstractMassifTest.java6
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/AllTests.java1
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/ChartExportTest.java66
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/ExportWizardTest.java12
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/LaunchConfigTabTest.java10
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/MassifTestToolPage.java65
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif/ChangeLog26
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif/META-INF/MANIFEST.MF3
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif/icons/chart-save.pngbin0 -> 694 bytes
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/MassifLaunchDelegate.java22
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/MassifToolPage.java44
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/MassifViewPart.java36
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/birt/ChartControl.java2
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/birt/ChartSVG.java113
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/birt/HeapChart.java1
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/messages.properties2
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/ChangeLog11
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/valgrind/memcheck/tests/AbstractMemcheckTest.java6
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/valgrind/memcheck/tests/AllTests.java1
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/valgrind/memcheck/tests/LaunchConfigTabTest.java28
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/valgrind/memcheck/tests/MemcheckTestToolPage.java56
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/valgrind/memcheck/tests/MinVersionTest.java89
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.memcheck/ChangeLog11
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/valgrind/memcheck/MemcheckToolPage.java40
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.tests/ChangeLog16
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/valgrind/tests/AbstractValgrindTest.java28
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/valgrind/tests/ValgrindTestExportWizard.java25
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/valgrind/tests/ValgrindTestExportWizardPage.java47
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/valgrind/tests/ValgrindTestLaunchDelegate.java8
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/valgrind/tests/ValgrindTestLaunchPlugin.java86
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/valgrind/tests/ValgrindTestOptionsTab.java87
45 files changed, 727 insertions, 561 deletions
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/ChangeLog b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/ChangeLog
index de81e9e920..4f05c4acc2 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/ChangeLog
+++ b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/ChangeLog
@@ -1,3 +1,13 @@
+2009-06-23 Elliott Baron <ebaron@redhat.com>
+
+ * CachegrindTestToolPage.java: Removed.
+ * AbstractCachegrindTest.java: Remove reference to TestToolPage.
+ * LaunchConfigTabTest.java (setUp): Use actual ToolPage.
+ (testD1Cache): Fire selection event.
+ (testI1Cache): Likewise.
+ (testL2Cache): Likewise.
+ (initConfig): Use actual ToolPage.
+
2009-04-30 Elliott Baron <ebaron@redhat.com>
* MultiProcessTest.java: Delete referenced project.
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/src/org/eclipse/linuxtools/valgrind/cachegrind/tests/AbstractCachegrindTest.java b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/src/org/eclipse/linuxtools/valgrind/cachegrind/tests/AbstractCachegrindTest.java
index 56ce69b3a6..daa30ec207 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/src/org/eclipse/linuxtools/valgrind/cachegrind/tests/AbstractCachegrindTest.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/src/org/eclipse/linuxtools/valgrind/cachegrind/tests/AbstractCachegrindTest.java
@@ -14,7 +14,6 @@ import org.eclipse.linuxtools.valgrind.cachegrind.CachegrindPlugin;
import org.eclipse.linuxtools.valgrind.cachegrind.model.CachegrindFile;
import org.eclipse.linuxtools.valgrind.cachegrind.model.CachegrindFunction;
import org.eclipse.linuxtools.valgrind.cachegrind.model.CachegrindOutput;
-import org.eclipse.linuxtools.valgrind.launch.IValgrindToolPage;
import org.eclipse.linuxtools.valgrind.tests.AbstractValgrindTest;
import org.osgi.framework.Bundle;
@@ -30,11 +29,6 @@ public abstract class AbstractCachegrindTest extends AbstractValgrindTest {
return CachegrindPlugin.TOOL_ID;
}
- @Override
- protected IValgrindToolPage getToolPage() {
- return new CachegrindTestToolPage();
- }
-
protected CachegrindFile getFileByName(CachegrindOutput output, String name) {
CachegrindFile file = null;
for (CachegrindFile f : output.getFiles()) {
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/src/org/eclipse/linuxtools/valgrind/cachegrind/tests/CachegrindTestToolPage.java b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/src/org/eclipse/linuxtools/valgrind/cachegrind/tests/CachegrindTestToolPage.java
deleted file mode 100644
index 81dad89825..0000000000
--- a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/src/org/eclipse/linuxtools/valgrind/cachegrind/tests/CachegrindTestToolPage.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Elliott Baron <ebaron@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.valgrind.cachegrind.tests;
-
-import org.eclipse.linuxtools.valgrind.cachegrind.CachegrindToolPage;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Spinner;
-
-public class CachegrindTestToolPage extends CachegrindToolPage {
-
- public Button getCacheButton() {
- return cacheButton;
- }
-
- public Button getBranchButton() {
- return branchButton;
- }
-
- public Spinner getI1SizeSpinner() {
- return i1SizeSpinner;
- }
-
- public Spinner getI1AssocSpinner() {
- return i1AssocSpinner;
- }
-
- public Spinner getI1LineSizeSpinner() {
- return i1LineSizeSpinner;
- }
-
- public Button getI1Button() {
- return i1Button;
- }
-
- public Spinner getD1SizeSpinner() {
- return d1SizeSpinner;
- }
-
- public Spinner getD1AssocSpinner() {
- return d1AssocSpinner;
- }
-
- public Spinner getD1LineSizeSpinner() {
- return d1LineSizeSpinner;
- }
-
- public Button getD1Button() {
- return d1Button;
- }
-
- public Spinner getL2SizeSpinner() {
- return l2SizeSpinner;
- }
-
- public Spinner getL2AssocSpinner() {
- return l2AssocSpinner;
- }
-
- public Spinner getL2LineSizeSpinner() {
- return l2LineSizeSpinner;
- }
-
- public Button getL2Button() {
- return l2Button;
- }
-
- @Override
- public void checkI1Enablement() {
- super.checkI1Enablement();
- }
-
- @Override
- public void checkD1Enablement() {
- super.checkD1Enablement();
- }
-
- @Override
- public void checkL2Enablement() {
- super.checkL2Enablement();
- }
-}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/src/org/eclipse/linuxtools/valgrind/cachegrind/tests/LaunchConfigTabTest.java b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/src/org/eclipse/linuxtools/valgrind/cachegrind/tests/LaunchConfigTabTest.java
index 5905478108..0d8d6780ab 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/src/org/eclipse/linuxtools/valgrind/cachegrind/tests/LaunchConfigTabTest.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind.tests/src/org/eclipse/linuxtools/valgrind/cachegrind/tests/LaunchConfigTabTest.java
@@ -19,7 +19,9 @@ import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.model.IProcess;
import org.eclipse.debug.ui.ILaunchConfigurationTab;
import org.eclipse.linuxtools.valgrind.cachegrind.CachegrindPlugin;
-import org.eclipse.linuxtools.valgrind.tests.ValgrindTestOptionsTab;
+import org.eclipse.linuxtools.valgrind.cachegrind.CachegrindToolPage;
+import org.eclipse.linuxtools.valgrind.launch.ValgrindOptionsTab;
+import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
@@ -28,8 +30,8 @@ public class LaunchConfigTabTest extends AbstractCachegrindTest {
protected ILaunchConfiguration config;
protected Shell testShell;
- protected ValgrindTestOptionsTab tab;
- protected CachegrindTestToolPage dynamicTab;
+ protected ValgrindOptionsTab tab;
+ protected CachegrindToolPage dynamicTab;
@Override
protected void setUp() throws Exception {
@@ -40,7 +42,7 @@ public class LaunchConfigTabTest extends AbstractCachegrindTest {
testShell = new Shell(Display.getDefault());
testShell.setLayout(new GridLayout());
- tab = new ValgrindTestOptionsTab();
+ tab = new ValgrindOptionsTab();
}
@Override
@@ -59,7 +61,7 @@ public class LaunchConfigTabTest extends AbstractCachegrindTest {
int ix = Arrays.asList(tab.getTools()).indexOf(CachegrindPlugin.TOOL_ID);
tab.getToolsCombo().select(ix);
ILaunchConfigurationTab dynamicTab = tab.getDynamicTab();
- this.dynamicTab = (CachegrindTestToolPage) dynamicTab;
+ this.dynamicTab = (CachegrindToolPage) dynamicTab;
return wc;
}
@@ -132,7 +134,7 @@ public class LaunchConfigTabTest extends AbstractCachegrindTest {
assertFalse(dynamicTab.getI1SizeSpinner().isEnabled());
dynamicTab.getI1Button().setSelection(true);
- dynamicTab.checkI1Enablement();
+ dynamicTab.getI1Button().notifyListeners(SWT.Selection, null);
assertTrue(dynamicTab.getI1SizeSpinner().isEnabled());
dynamicTab.getI1SizeSpinner().setSelection(16384);
@@ -158,7 +160,7 @@ public class LaunchConfigTabTest extends AbstractCachegrindTest {
assertFalse(dynamicTab.getD1SizeSpinner().isEnabled());
dynamicTab.getD1Button().setSelection(true);
- dynamicTab.checkD1Enablement();
+ dynamicTab.getD1Button().notifyListeners(SWT.Selection, null);
assertTrue(dynamicTab.getD1SizeSpinner().isEnabled());
dynamicTab.getD1SizeSpinner().setSelection(16384);
@@ -184,7 +186,7 @@ public class LaunchConfigTabTest extends AbstractCachegrindTest {
assertFalse(dynamicTab.getL2SizeSpinner().isEnabled());
dynamicTab.getL2Button().setSelection(true);
- dynamicTab.checkL2Enablement();
+ dynamicTab.getL2Button().notifyListeners(SWT.Selection, null);
assertTrue(dynamicTab.getL2SizeSpinner().isEnabled());
dynamicTab.getL2SizeSpinner().setSelection(16384);
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/ChangeLog b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/ChangeLog
index db3321fd90..44ebc05d56 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/ChangeLog
+++ b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/ChangeLog
@@ -1,3 +1,20 @@
+2009-06-23 Elliott Baron <ebaron@redhat.com>
+
+ * CachegrindToolPage.java (getD1LineSizeSpinner): Created getter.
+ (getI1SizeSpinner): Likewise.
+ (getBranchButton): Likewise.
+ (getI1AssocSpinner): Likewise.
+ (getD1Button): Likewise.
+ (getD1AssocSpinner): Likewise.
+ (getL2Button): Likewise.
+ (getL2LineSizeSpinner): Likewise.
+ (getL2AssocSpinner): Likewise.
+ (getD1SizeSpinner): Likewise.
+ (getL2SizeSpinner): Likewise.
+ (getI1Button): Likewise.
+ (getCacheButton): Likewise.
+ (getI1LineSizeSpinner): Likewise.
+
2009-04-30 Elliott Baron <ebaron@redhat.com>
* CachegrindParser.java: Pull up constants.
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/src/org/eclipse/linuxtools/valgrind/cachegrind/CachegrindToolPage.java b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/src/org/eclipse/linuxtools/valgrind/cachegrind/CachegrindToolPage.java
index 8746c723e3..92e6785b7f 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/src/org/eclipse/linuxtools/valgrind/cachegrind/CachegrindToolPage.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.cachegrind/src/org/eclipse/linuxtools/valgrind/cachegrind/CachegrindToolPage.java
@@ -320,4 +320,60 @@ public class CachegrindToolPage extends AbstractLaunchConfigurationTab
l2AssocSpinner.setEnabled(checked);
l2LineSizeSpinner.setEnabled(checked);
}
+
+ public Button getCacheButton() {
+ return cacheButton;
+ }
+
+ public Button getBranchButton() {
+ return branchButton;
+ }
+
+ public Spinner getI1SizeSpinner() {
+ return i1SizeSpinner;
+ }
+
+ public Spinner getI1AssocSpinner() {
+ return i1AssocSpinner;
+ }
+
+ public Spinner getI1LineSizeSpinner() {
+ return i1LineSizeSpinner;
+ }
+
+ public Button getI1Button() {
+ return i1Button;
+ }
+
+ public Spinner getD1SizeSpinner() {
+ return d1SizeSpinner;
+ }
+
+ public Spinner getD1AssocSpinner() {
+ return d1AssocSpinner;
+ }
+
+ public Spinner getD1LineSizeSpinner() {
+ return d1LineSizeSpinner;
+ }
+
+ public Button getD1Button() {
+ return d1Button;
+ }
+
+ public Spinner getL2SizeSpinner() {
+ return l2SizeSpinner;
+ }
+
+ public Spinner getL2AssocSpinner() {
+ return l2AssocSpinner;
+ }
+
+ public Spinner getL2LineSizeSpinner() {
+ return l2LineSizeSpinner;
+ }
+
+ public Button getL2Button() {
+ return l2Button;
+ }
}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch/ChangeLog b/valgrind/org.eclipse.linuxtools.valgrind.launch/ChangeLog
index c70658d906..16aa69a68b 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.launch/ChangeLog
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch/ChangeLog
@@ -1,3 +1,35 @@
+2009-06-23 Elliott Baron <ebaron@redhat.com>
+
+ * ValgrindExportWizardPage.java (getSelectAllButton): Created getter.
+ (getViewer): Likewise.
+ (getDeselectAllButton): Likewise.
+ (getDestText): Likewise.
+ * src/org/eclipse/linuxtools/valgrind/launch/ValgrindLaunchPlugin.java (getValgrindCommand):
+ (setValgrindCommand):
+ * src/org/eclipse/linuxtools/valgrind/launch/ValgrindOptionsTab.java (getMainStackSizeButton): Created getter.
+ (getMaxStackFrameSpinner): Likewise.
+ (getNumCallersSpinner): Likewise.
+ (loadDynamicTab): Renamed from getDynamicTab.
+ (getShowBelowMainButton): Created getter.
+ (loadDynamicArea): Call loadDynamicTab.
+ (getTraceChildrenButton): Created getter.
+ (getRunFreeresButton): Likewise.
+ (getErrorLimitButton): Likewise.
+ (getTools): Likewise.
+ (getToolsCombo): Likewise.
+ (getMainStackSizeSpinner): Likewise.
+ (getDemangleButton): Likewise.
+ (getChildSilentButton): Likewise.
+ (getSuppFileText): Likewise.
+ (getDynamicTab): Likewise.
+
+2009-06-22 Elliott Baron <ebaron@redhat.com>
+
+ * messages.properties: New key.
+ * ValgrindLaunchConfigurationDelegate.java (launch): Perform version check.
+ * ValgrindLaunchPlugin.java (getValgrindVersion): Compare installed Valgrind
+ version to minimum supported version.
+
2009-05-28 Elliott Baron <ebaron@redhat.com>
* ValgrindLaunchPlugin.java (findValgrindVersion): Call findValgrindLocation first if necessary.
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/ValgrindExportWizardPage.java b/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/ValgrindExportWizardPage.java
index b9765586f9..15fdc0de7c 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/ValgrindExportWizardPage.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/ValgrindExportWizardPage.java
@@ -218,4 +218,20 @@ public class ValgrindExportWizardPage extends WizardPage implements IWizardPage
return ValgrindLaunchPlugin.getDefault();
}
+ public CheckboxTableViewer getViewer() {
+ return viewer;
+ }
+
+ public Text getDestText() {
+ return destText;
+ }
+
+ public Button getSelectAllButton() {
+ return selectAllButton;
+ }
+
+ public Button getDeselectAllButton() {
+ return deselectAllButton;
+ }
+
}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/ValgrindLaunchConfigurationDelegate.java b/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/ValgrindLaunchConfigurationDelegate.java
index e21c78f23f..d6986be439 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/ValgrindLaunchConfigurationDelegate.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/ValgrindLaunchConfigurationDelegate.java
@@ -104,6 +104,8 @@ public class ValgrindLaunchConfigurationDelegate extends AbstractCLaunchDelegate
// find Valgrind binary if not already done
IPath valgrindLocation = getPlugin().getValgrindLocation();
+ // also ensure Valgrind version is usable
+ getPlugin().getValgrindVersion();
monitor.worked(1);
IPath exePath = verifyProgramPath(config);
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/ValgrindLaunchPlugin.java b/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/ValgrindLaunchPlugin.java
index 376cbb600a..cdc77bf5d8 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/ValgrindLaunchPlugin.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/ValgrindLaunchPlugin.java
@@ -56,11 +56,13 @@ public class ValgrindLaunchPlugin extends AbstractUIPlugin {
public static final Version VER_3_3_1 = new Version(3, 3, 1);
public static final Version VER_3_4_0 = new Version(3, 4, 0);
public static final Version VER_3_4_1 = new Version(3, 4, 1);
+ private static final Version MIN_VER = VER_3_3_0;
private static final String VERSION_PREFIX = "valgrind-"; //$NON-NLS-1$
private static final char VERSION_DELIMITER = '-';
protected HashMap<String, IConfigurationElement> toolMap;
+ private ValgrindCommand valgrindCommand;
private IPath valgrindLocation;
private Version valgrindVersion;
private ILaunchConfiguration config;
@@ -117,6 +119,10 @@ public class ValgrindLaunchPlugin extends AbstractUIPlugin {
if (valgrindVersion == null) {
findValgrindVersion();
}
+ // check for minimum supported version
+ if (valgrindVersion.compareTo(MIN_VER) < 0) {
+ throw new CoreException(new Status(IStatus.ERROR, PLUGIN_ID, NLS.bind(Messages.getString("ValgrindLaunchPlugin.Error_min_version"), valgrindVersion.toString(), MIN_VER.toString()))); //$NON-NLS-1$
+ }
return valgrindVersion;
}
@@ -155,9 +161,16 @@ public class ValgrindLaunchPlugin extends AbstractUIPlugin {
throw new CoreException(status);
}
}
-
+
+ public void setValgrindCommand(ValgrindCommand command) {
+ valgrindCommand = command;
+ }
+
protected ValgrindCommand getValgrindCommand() {
- return new ValgrindCommand();
+ if (valgrindCommand == null) {
+ valgrindCommand = new ValgrindCommand();
+ }
+ return valgrindCommand;
}
public String[] getRegisteredToolIDs() {
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/ValgrindOptionsTab.java b/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/ValgrindOptionsTab.java
index 3ba5c452b7..6cf887c283 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/ValgrindOptionsTab.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/ValgrindOptionsTab.java
@@ -384,7 +384,7 @@ public class ValgrindOptionsTab extends AbstractLaunchConfigurationTab {
child.dispose();
}
- dynamicTab = getDynamicTab();
+ loadDynamicTab();
if (dynamicTab == null) {
throw new CoreException(new Status(IStatus.ERROR, ValgrindLaunchPlugin.PLUGIN_ID, Messages.getString("ValgrindOptionsTab.No_options_tab_found") + tool)); //$NON-NLS-1$
}
@@ -394,8 +394,12 @@ public class ValgrindOptionsTab extends AbstractLaunchConfigurationTab {
dynamicTabHolder.layout(true);
}
- protected IValgrindToolPage getDynamicTab() throws CoreException {
- return getPlugin().getToolPage(tool);
+ private void loadDynamicTab() throws CoreException {
+ dynamicTab = getPlugin().getToolPage(tool);
+ }
+
+ public IValgrindToolPage getDynamicTab() {
+ return dynamicTab;
}
protected ValgrindLaunchPlugin getPlugin() {
@@ -577,4 +581,55 @@ public class ValgrindOptionsTab extends AbstractLaunchConfigurationTab {
mainStackSizeSpinner.setEnabled(mainStackSizeButton.getSelection());
}
+ public Button getTraceChildrenButton() {
+ return traceChildrenButton;
+ }
+
+ public Button getChildSilentButton() {
+ return childSilentButton;
+ }
+
+ public Button getRunFreeresButton() {
+ return runFreeresButton;
+ }
+
+ public Button getDemangleButton() {
+ return demangleButton;
+ }
+
+ public Spinner getNumCallersSpinner() {
+ return numCallersSpinner;
+ }
+
+ public Button getErrorLimitButton() {
+ return errorLimitButton;
+ }
+
+ public Button getShowBelowMainButton() {
+ return showBelowMainButton;
+ }
+
+ public Spinner getMaxStackFrameSpinner() {
+ return maxStackFrameSpinner;
+ }
+
+ public Button getMainStackSizeButton() {
+ return mainStackSizeButton;
+ }
+
+ public Spinner getMainStackSizeSpinner() {
+ return mainStackSizeSpinner;
+ }
+
+ public Text getSuppFileText() {
+ return suppFileText;
+ }
+
+ public Combo getToolsCombo() {
+ return toolsCombo;
+ }
+
+ public String[] getTools() {
+ return tools;
+ }
}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/messages.properties b/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/messages.properties
index 1505c49f7f..4a9c1e2e0e 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/messages.properties
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/valgrind/launch/messages.properties
@@ -26,6 +26,7 @@ ValgrindLaunchPlugin.Cannot_retrieve_delegate=Cannot retrieve delegate from exte
ValgrindLaunchPlugin.Cannot_retrieve_page=Cannot retrieve page from extension
ValgrindLaunchPlugin.Please_ensure_Valgrind=Please ensure Valgrind is installed and in your path.
ValgrindLaunchPlugin.Couldn't_determine_version=Couldn't determine version of Valgrind located at {0}.
+ValgrindLaunchPlugin.Error_min_version=The installed Valgrind ({0}) is older than the minimum supported version ({1}).
ValgrindOptionsTab.Basic_Options=Basic Options
ValgrindOptionsTab.child_silent=Child silent after fork
ValgrindOptionsTab.demangle=Demangle C++ names
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/ChangeLog b/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/ChangeLog
index fdbf074f6b..466a24b83d 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/ChangeLog
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/ChangeLog
@@ -1,3 +1,16 @@
+2009-06-23 Elliott Baron <ebaron@redhat.com>
+
+ * MassifTestToolPage.java: Removed.
+ * AbstractMassifTest.java: Remove reference to TestToolPage.
+ * ExportWizardTest.java (createWizard): Use actual ExportWizard.
+ * LaunchConfigTabTest.java: Use actual ToolPage.
+
+2009-06-22 Elliott Baron <ebaron@redhat.com>
+
+ * ChartExportTest.java: New file.
+ * META-INF/MANIFEST.MF: New deps.
+ * AllTests.java (suite): Added ChartExportTest.
+
2009-04-30 Elliott Baron <ebaron@redhat.com>
* MultiProcessTest.java: Delete referenced project.
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/META-INF/MANIFEST.MF b/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/META-INF/MANIFEST.MF
index 0c1ff83a61..dac565276c 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/META-INF/MANIFEST.MF
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/META-INF/MANIFEST.MF
@@ -21,6 +21,8 @@ Import-Package: org.eclipse.birt.chart.computation,
org.eclipse.debug.core,
org.eclipse.debug.core.model,
org.eclipse.debug.ui,
+ org.eclipse.emf.common,
+ org.eclipse.emf.ecore,
org.eclipse.jface.text,
org.eclipse.linuxtools.profiling.tests,
org.eclipse.linuxtools.valgrind.core,
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/AbstractMassifTest.java b/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/AbstractMassifTest.java
index 4b7b56ae53..935a912758 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/AbstractMassifTest.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/AbstractMassifTest.java
@@ -16,7 +16,6 @@ import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.jface.text.TextSelection;
import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.linuxtools.valgrind.launch.IValgrindToolPage;
import org.eclipse.linuxtools.valgrind.massif.MassifHeapTreeNode;
import org.eclipse.linuxtools.valgrind.massif.MassifPlugin;
import org.eclipse.linuxtools.valgrind.tests.AbstractValgrindTest;
@@ -40,11 +39,6 @@ public abstract class AbstractMassifTest extends AbstractValgrindTest {
return MassifPlugin.TOOL_ID;
}
- @Override
- protected IValgrindToolPage getToolPage() {
- return new MassifTestToolPage();
- }
-
protected void checkFile(IProject proj, MassifHeapTreeNode node) {
IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
IEditorInput input = editor.getEditorInput();
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/AllTests.java b/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/AllTests.java
index 47c3bbf7a6..92d5ee17a5 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/AllTests.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/AllTests.java
@@ -28,6 +28,7 @@ public class AllTests {
suite.addTestSuite(MultiProcessTest.class);
suite.addTestSuite(ExpandCollapseTest.class);
suite.addTestSuite(SortTest.class);
+ suite.addTestSuite(ChartExportTest.class);
//$JUnit-END$
return suite;
}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/ChartExportTest.java b/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/ChartExportTest.java
new file mode 100644
index 0000000000..50af8b1052
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/ChartExportTest.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Elliott Baron <ebaron@redhat.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.valgrind.massif.tests;
+
+import java.io.File;
+
+import org.eclipse.birt.chart.model.Chart;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.linuxtools.valgrind.massif.birt.ChartEditorInput;
+import org.eclipse.linuxtools.valgrind.massif.birt.ChartSVG;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.PlatformUI;
+
+public class ChartExportTest extends AbstractMassifTest {
+ private IPath svgPath;
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ proj = createProjectAndBuild("alloctest"); //$NON-NLS-1$
+
+ svgPath = ResourcesPlugin.getWorkspace().getRoot().getLocation();
+ assertNotNull(svgPath);
+ svgPath = svgPath.append("alloctest").append("chart.svg"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ File chartFile = svgPath.toFile();
+ if (chartFile.exists()) {
+ chartFile.delete();
+ }
+
+ deleteProject(proj);
+ super.tearDown();
+ }
+
+ public void testNumSnapshots() throws Exception {
+ ILaunchConfiguration config = createConfiguration(proj.getProject());
+ doLaunch(config, "testDefaults"); //$NON-NLS-1$
+
+ IEditorInput input = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor().getEditorInput();
+ if (input instanceof ChartEditorInput) {
+ Chart chart = ((ChartEditorInput) input).getChart();
+
+ ChartSVG svg = new ChartSVG(chart);
+ svg.renderSVG(svgPath);
+
+ File chartFile = svgPath.toFile();
+ assertTrue(chartFile.exists());
+ assertTrue(chartFile.length() > 0);
+ } else {
+ fail();
+ }
+ }
+
+}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/ExportWizardTest.java b/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/ExportWizardTest.java
index 6263a90023..e368e4b21d 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/ExportWizardTest.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/ExportWizardTest.java
@@ -17,15 +17,15 @@ import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.model.IProcess;
import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.linuxtools.valgrind.tests.ValgrindTestExportWizard;
-import org.eclipse.linuxtools.valgrind.tests.ValgrindTestExportWizardPage;
+import org.eclipse.linuxtools.valgrind.launch.ValgrindExportWizard;
+import org.eclipse.linuxtools.valgrind.launch.ValgrindExportWizardPage;
import org.eclipse.ui.PlatformUI;
public class ExportWizardTest extends AbstractMassifTest {
- protected ValgrindTestExportWizard wizard;
+ protected ValgrindExportWizard wizard;
protected WizardDialog dialog;
- protected ValgrindTestExportWizardPage page;
+ protected ValgrindExportWizardPage page;
@Override
protected void setUp() throws Exception {
@@ -177,7 +177,7 @@ public class ExportWizardTest extends AbstractMassifTest {
}
protected void createWizard() {
- wizard = new ValgrindTestExportWizard();
+ wizard = new ValgrindExportWizard();
wizard.init(PlatformUI.getWorkbench(), null);
dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard);
@@ -186,7 +186,7 @@ public class ExportWizardTest extends AbstractMassifTest {
assertFalse(wizard.canFinish());
- page = (ValgrindTestExportWizardPage) wizard.getPages()[0];
+ page = (ValgrindExportWizardPage) wizard.getPages()[0];
assertFalse(page.isPageComplete());
}
}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/LaunchConfigTabTest.java b/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/LaunchConfigTabTest.java
index 58cb8a2efd..18584379eb 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/LaunchConfigTabTest.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/LaunchConfigTabTest.java
@@ -18,17 +18,17 @@ import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.model.IProcess;
import org.eclipse.debug.ui.ILaunchConfigurationTab;
+import org.eclipse.linuxtools.valgrind.launch.ValgrindOptionsTab;
import org.eclipse.linuxtools.valgrind.massif.MassifPlugin;
import org.eclipse.linuxtools.valgrind.massif.MassifToolPage;
-import org.eclipse.linuxtools.valgrind.tests.ValgrindTestOptionsTab;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
public class LaunchConfigTabTest extends AbstractMassifTest {
- protected ValgrindTestOptionsTab tab;
- protected MassifTestToolPage dynamicTab;
+ protected ValgrindOptionsTab tab;
+ protected MassifToolPage dynamicTab;
protected ILaunchConfiguration config;
protected Shell testShell;
@@ -41,7 +41,7 @@ public class LaunchConfigTabTest extends AbstractMassifTest {
testShell = new Shell(Display.getDefault());
testShell.setLayout(new GridLayout());
- tab = new ValgrindTestOptionsTab();
+ tab = new ValgrindOptionsTab();
}
@Override
@@ -60,7 +60,7 @@ public class LaunchConfigTabTest extends AbstractMassifTest {
int ix = Arrays.asList(tab.getTools()).indexOf(MassifPlugin.TOOL_ID);
tab.getToolsCombo().select(ix);
ILaunchConfigurationTab dynamicTab = tab.getDynamicTab();
- this.dynamicTab = (MassifTestToolPage) dynamicTab;
+ this.dynamicTab = (MassifToolPage) dynamicTab;
return wc;
}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/MassifTestToolPage.java b/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/MassifTestToolPage.java
deleted file mode 100644
index 09c00c8292..0000000000
--- a/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/valgrind/massif/tests/MassifTestToolPage.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Elliott Baron <ebaron@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.valgrind.massif.tests;
-
-import org.eclipse.linuxtools.valgrind.massif.MassifToolPage;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.List;
-import org.eclipse.swt.widgets.Spinner;
-
-public class MassifTestToolPage extends MassifToolPage {
-
- public Button getHeapButton() {
- return heapButton;
- }
-
- public Spinner getHeapAdminSpinner() {
- return heapAdminSpinner;
- }
-
- public Button getStacksButton() {
- return stacksButton;
- }
-
- public Spinner getDepthSpinner() {
- return depthSpinner;
- }
-
- public List getAllocFnList() {
- return allocFnList;
- }
-
- public Spinner getThresholdSpinner() {
- return thresholdSpinner;
- }
-
- public Spinner getPeakInaccuracySpinner() {
- return peakInaccuracySpinner;
- }
-
- public Combo getTimeUnitCombo() {
- return timeUnitCombo;
- }
-
- public Spinner getDetailedFreqSpinner() {
- return detailedFreqSpinner;
- }
-
- public Spinner getMaxSnapshotsSpinner() {
- return maxSnapshotsSpinner;
- }
-
- public Spinner getAlignmentSpinner() {
- return alignmentSpinner;
- }
-
-}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif/ChangeLog b/valgrind/org.eclipse.linuxtools.valgrind.massif/ChangeLog
index a1f7349a3e..6d0f164f0f 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.massif/ChangeLog
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif/ChangeLog
@@ -1,3 +1,29 @@
+2009-06-23 Elliott Baron <ebaron@redhat.com>
+
+ * MassifToolPage.java (getMaxSnapshotsSpinner): Added getter.
+ (getHeapAdminSpinner): Likewise.
+ (getAllocFnList): Likewise.
+ (getStacksButton): Likewise.
+ (getDepthSpinner): Likewise.
+ (getHeapButton): Likewise.
+ (getTimeUnitCombo): Likewise.
+ (getAlignmentSpinner): Likewise.
+ (getDetailedFreqSpinner): Likewise.
+ (getThresholdSpinner): Likewise.
+ (getPeakInaccuracySpinner): Likewise.
+
+2009-06-22 Elliott Baron <ebaron@redhat.com>
+
+ * icons/chart-save.png: New file.
+ * src/org/eclipse/linuxtools/valgrind/massif/birt/ChartSVG.java: New file.
+ * META-INF/MANIFEST.MF: New deps.
+ * birt/ChartControl.java (paintControl): Fix comment typo.
+ * birt/HeapChart.java (HeapChart): Remove suppress warnings for unchecked casts,
+ fixed with BIRT 2.5.
+ * MassifLaunchDelegate.java: Cleanup unused code.
+ * MassifViewPart.java: Add action for chart export.
+ * messages.properties: New key.
+
2009-06-04 Elliott Baron <ebaron@redhat.com>
* META-INF/MANIFEST.MF: Removing birt.chart plugin from dependencies.
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif/META-INF/MANIFEST.MF b/valgrind/org.eclipse.linuxtools.valgrind.massif/META-INF/MANIFEST.MF
index 550aa1113f..8b41b8778c 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.massif/META-INF/MANIFEST.MF
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif/META-INF/MANIFEST.MF
@@ -10,7 +10,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.birt.chart.device.swt;bundle-version="2.3.1",
org.eclipse.birt.chart.device.extension;bundle-version="2.3.1",
org.eclipse.birt.chart.engine;bundle-version="2.3.1",
- org.eclipse.birt.chart.engine.extension;bundle-version="2.3.1"
+ org.eclipse.birt.chart.engine.extension;bundle-version="2.3.1",
+ org.eclipse.birt.chart.device.svg;bundle-version="2.3.1"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif/icons/chart-save.png b/valgrind/org.eclipse.linuxtools.valgrind.massif/icons/chart-save.png
new file mode 100644
index 0000000000..358429abcc
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif/icons/chart-save.png
Binary files differ
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/MassifLaunchDelegate.java b/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/MassifLaunchDelegate.java
index 24212355cc..7c3c4468fc 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/MassifLaunchDelegate.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/MassifLaunchDelegate.java
@@ -104,26 +104,4 @@ implements IValgrindLaunchDelegate {
return opts.toArray(new String[opts.size()]);
}
-
-// public void restoreState(HistoryEntry entry) throws CoreException {
-// try {
-// Map<?, ?> config = entry.getAttributes();
-// MassifPlugin.getDefault().setConfig(config);
-//
-// // retrieve or create sourceLocator
-// ILaunch launch = new Launch(config, ILaunchManager.PROFILE_MODE, null);
-// setDefaultSourceLocator(launch, config);
-// MassifPlugin.getDefault().setSourceLocator(launch.getSourceLocator());
-//
-// File[] massifOutputs = entry.getDatadir().listFiles(MASSIF_FILTER);
-// parseOutput(massifOutputs);
-// } catch (IOException e) {
-// e.printStackTrace();
-// abort(Messages.getString("MassifLaunchDelegate.Error_parsing_output"), e, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR); //$NON-NLS-1$
-// }
-// }
-//
-// public void saveState(HistoryEntry entry) throws CoreException {
-// }
-
}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/MassifToolPage.java b/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/MassifToolPage.java
index 27950f44aa..5718b25c04 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/MassifToolPage.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/MassifToolPage.java
@@ -347,4 +347,48 @@ public class MassifToolPage extends AbstractLaunchConfigurationTab
}
}
+ public Button getHeapButton() {
+ return heapButton;
+ }
+
+ public Spinner getHeapAdminSpinner() {
+ return heapAdminSpinner;
+ }
+
+ public Button getStacksButton() {
+ return stacksButton;
+ }
+
+ public Spinner getDepthSpinner() {
+ return depthSpinner;
+ }
+
+ public List getAllocFnList() {
+ return allocFnList;
+ }
+
+ public Spinner getThresholdSpinner() {
+ return thresholdSpinner;
+ }
+
+ public Spinner getPeakInaccuracySpinner() {
+ return peakInaccuracySpinner;
+ }
+
+ public Combo getTimeUnitCombo() {
+ return timeUnitCombo;
+ }
+
+ public Spinner getDetailedFreqSpinner() {
+ return detailedFreqSpinner;
+ }
+
+ public Spinner getMaxSnapshotsSpinner() {
+ return maxSnapshotsSpinner;
+ }
+
+ public Spinner getAlignmentSpinner() {
+ return alignmentSpinner;
+ }
+
}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/MassifViewPart.java b/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/MassifViewPart.java
index 0ea30dd45e..a6ce319b9b 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/MassifViewPart.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/MassifViewPart.java
@@ -14,6 +14,7 @@ import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.core.runtime.Path;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.resource.JFaceResources;
@@ -32,6 +33,7 @@ import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.linuxtools.valgrind.massif.MassifSnapshot.SnapshotType;
import org.eclipse.linuxtools.valgrind.massif.birt.ChartEditorInput;
+import org.eclipse.linuxtools.valgrind.massif.birt.ChartSVG;
import org.eclipse.linuxtools.valgrind.massif.birt.HeapChart;
import org.eclipse.linuxtools.valgrind.ui.IValgrindToolView;
import org.eclipse.linuxtools.valgrind.ui.ValgrindUIPlugin;
@@ -46,6 +48,8 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.ui.IEditorInput;
@@ -75,6 +79,8 @@ public class MassifViewPart extends ViewPart implements IValgrindToolView {
+ ".chartAction"; //$NON-NLS-1$
public static final String PID_ACTION = MassifPlugin.PLUGIN_ID
+ ".pidAction"; //$NON-NLS-1$
+ public static final String SAVE_CHART_ACTION = MassifPlugin.PLUGIN_ID
+ + ".saveChartAction"; //$NON-NLS-1$
protected MassifOutput output;
protected Integer pid;
@@ -90,6 +96,7 @@ public class MassifViewPart extends ViewPart implements IValgrindToolView {
protected Action treeAction;
protected Action chartAction;
protected MassifPidMenuAction pidAction;
+ protected Action saveChartAction;
protected List<ChartEditorInput> chartInputs;
@@ -237,6 +244,22 @@ public class MassifViewPart extends ViewPart implements IValgrindToolView {
chartAction.setToolTipText(Messages
.getString("MassifViewPart.Display_Heap_Allocation")); //$NON-NLS-1$
+ saveChartAction = new Action(Messages.getString("MassifViewPart.Save_Chart"), IAction.AS_PUSH_BUTTON) { //$NON-NLS-1$
+ @Override
+ public void run() {
+ ChartEditorInput currentInput = getChartInput(pid);
+ String path = getChartSavePath(currentInput.getName());
+ if (path != null) {
+ ChartSVG renderer = new ChartSVG(currentInput.getChart());
+ renderer.renderSVG(Path.fromOSString(path));
+ }
+ }
+ };
+ saveChartAction.setId(SAVE_CHART_ACTION);
+ saveChartAction.setImageDescriptor(MassifPlugin.imageDescriptorFromPlugin(
+ MassifPlugin.PLUGIN_ID, "icons/chart-save.png")); //$NON-NLS-1$
+ saveChartAction.setToolTipText(Messages.getString("MassifViewPart.Save_Chart")); //$NON-NLS-1$
+
treeAction = new Action(
Messages.getString("MassifViewPart.Show_Heap_Tree"), IAction.AS_CHECK_BOX) { //$NON-NLS-1$
@Override
@@ -256,7 +279,18 @@ public class MassifViewPart extends ViewPart implements IValgrindToolView {
treeAction.setToolTipText(Messages
.getString("MassifViewPart.Show_Heap_Tree")); //$NON-NLS-1$
- return new IAction[] { pidAction, chartAction, treeAction };
+ return new IAction[] { pidAction, chartAction, saveChartAction, treeAction };
+ }
+
+ protected String getChartSavePath(String defaultName) {
+ Shell parent = new Shell(Display.getDefault());
+ FileDialog dialog = new FileDialog(parent, SWT.SAVE);
+ dialog.setText(Messages.getString("MassifViewPart.Save_chart_dialog_title")); //$NON-NLS-1$
+ dialog.setOverwrite(true);
+ dialog.setFilterExtensions(new String[] { ".svg" }); //$NON-NLS-1$
+ dialog.setFileName(defaultName);
+
+ return dialog.open();
}
protected void createChart(MassifSnapshot[] snapshots) {
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/birt/ChartControl.java b/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/birt/ChartControl.java
index 30812ed60b..6c6ef2d3ab 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/birt/ChartControl.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/birt/ChartControl.java
@@ -174,7 +174,7 @@ public class ChartControl extends Canvas implements PaintListener, ControlListen
GC gcImage = new GC(buffer);
- // fill default backgournd as white.
+ // fill default background as white.
gcImage.setForeground(Display.getDefault().getSystemColor(
SWT.COLOR_WHITE));
gcImage.fillRectangle(buffer.getBounds());
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/birt/ChartSVG.java b/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/birt/ChartSVG.java
new file mode 100644
index 0000000000..fb68a10ade
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/birt/ChartSVG.java
@@ -0,0 +1,113 @@
+/***********************************************************************
+ * Copyright (c) 2004, 2005 Actuate Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Actuate Corporation - initial API and implementation
+ * Elliott Baron <ebaron@redhat.com> - Modified implementation
+ ***********************************************************************/
+package org.eclipse.linuxtools.valgrind.massif.birt;
+
+import org.eclipse.birt.chart.computation.DataPointHints;
+import org.eclipse.birt.chart.device.ICallBackNotifier;
+import org.eclipse.birt.chart.device.IDeviceRenderer;
+import org.eclipse.birt.chart.event.WrappedStructureSource;
+import org.eclipse.birt.chart.exception.ChartException;
+import org.eclipse.birt.chart.factory.GeneratedChartState;
+import org.eclipse.birt.chart.factory.Generator;
+import org.eclipse.birt.chart.factory.RunTimeContext;
+import org.eclipse.birt.chart.model.Chart;
+import org.eclipse.birt.chart.model.attribute.Bounds;
+import org.eclipse.birt.chart.model.attribute.CallBackValue;
+import org.eclipse.birt.chart.model.attribute.impl.BoundsImpl;
+import org.eclipse.birt.chart.util.PluginSettings;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.linuxtools.valgrind.massif.MassifSnapshot;
+import org.eclipse.linuxtools.valgrind.massif.MassifViewPart;
+import org.eclipse.linuxtools.valgrind.ui.ValgrindUIPlugin;
+import org.eclipse.swt.events.MouseEvent;
+
+public class ChartSVG implements ICallBackNotifier {
+
+ protected Chart cm = null;
+
+ protected GeneratedChartState state = null;
+
+ protected IDeviceRenderer deviceRenderer = null;
+
+ public ChartSVG(Chart chart) {
+ cm = chart;
+ }
+
+ public void renderSVG(IPath svgPath) {
+ try {
+ RunTimeContext rtc = new RunTimeContext();
+
+ deviceRenderer = PluginSettings.instance().getDevice("dv.SVG"); //$NON-NLS-1$
+ Generator gr = Generator.instance();
+ Bounds bo = BoundsImpl.create(0, 0, 800, 600);
+ state = gr.build(deviceRenderer.getDisplayServer(), cm, bo, null,
+ rtc, null);
+ deviceRenderer.setProperty(IDeviceRenderer.FILE_IDENTIFIER, svgPath
+ .toOSString());
+ deviceRenderer.setProperty(IDeviceRenderer.UPDATE_NOTIFIER, this);
+
+ gr.render(deviceRenderer, state);
+ } catch (ChartException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void callback(Object event, Object source, CallBackValue value) {
+ // give Valgrind view focus
+ ValgrindUIPlugin.getDefault().showView();
+ MouseEvent mEvent = (MouseEvent) event;
+
+ DataPointHints point = ((DataPointHints)((WrappedStructureSource)source).getSource());
+ MassifViewPart view = (MassifViewPart) ValgrindUIPlugin.getDefault().getView().getDynamicView();
+ // select the corresponding snapshot in the TableViewer
+ TableViewer viewer = view.getTableViewer();
+ view.setTopControl(viewer.getControl());
+
+ MassifSnapshot snapshot = (MassifSnapshot) viewer.getElementAt(point.getIndex());
+
+ switch (mEvent.count) {
+ case 1: // single click
+ viewer.setSelection(new StructuredSelection(snapshot));
+ break;
+ case 2: // double click
+// if (snapshot.isDetailed()) {
+// ChartLocationsDialog dialog = new ChartLocationsDialog(getShell());
+// dialog.setInput(snapshot);
+//
+// if (dialog.open() == Window.OK) {
+// dialog.openEditorForResult();
+// }
+// }
+ }
+ }
+
+ public Chart getDesignTimeModel() {
+ return cm;
+ }
+
+ public Chart getRunTimeModel() {
+ return state.getChartModel();
+ }
+
+ public Object peerInstance() {
+ return this;
+ }
+
+ public void regenerateChart() {
+ }
+
+ public void repaintChart() {
+ }
+
+}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/birt/HeapChart.java b/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/birt/HeapChart.java
index be0364da3a..4f8dbc1358 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/birt/HeapChart.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/birt/HeapChart.java
@@ -79,7 +79,6 @@ public class HeapChart extends ChartWithAxesImpl {
protected String xUnits;
protected String yUnits;
- @SuppressWarnings("unchecked")
public HeapChart(MassifSnapshot[] snapshots) {
TimeUnit timeUnit = snapshots[0].getUnit();
long xScaling = getXScaling(snapshots, timeUnit);
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/messages.properties b/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/messages.properties
index 23e70a488c..4589ec5ea3 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/messages.properties
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/messages.properties
@@ -28,6 +28,8 @@ MassifToolPage.Remove=Rem&ove
MassifToolPage.time_unit=time unit:
MassifViewPart.Display_Heap_Allocation=Display Heap Allocation Graph
MassifViewPart.Extra_Heap=Extra Heap (B)
+MassifViewPart.Save_Chart=Save Chart As SVG
+MassifViewPart.Save_chart_dialog_title=Save Chart
MassifViewPart.Show_Heap_Tree=Show Heap Tree
MassifViewPart.Snapshot=Snapshot
MassifViewPart.Stacks=Stacks (B)
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/ChangeLog b/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/ChangeLog
index 5876a4bf42..816cd713e9 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/ChangeLog
+++ b/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/ChangeLog
@@ -1,3 +1,14 @@
+2009-06-23 Elliott Baron <ebaron@redhat.com>
+
+ * MemcheckTestToolPage.java: Removed.
+ * AbstractMemcheckTest.java: Remove reference to TestToolPage.
+ * LaunchConfigTabTest.java: Use real ToolPage.
+
+2009-06-22 Elliott Baron <ebaron@redhat.com>
+
+ * MinVersionTest.java: New file.
+ * AllTests.java (suite): Added MinVersionTest.
+
2009-05-27 Elliott Baron <ebaron@redhat.com>
* LaunchConfigTabTest.java: Changed for restructuring of findValgrindVersion.
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/valgrind/memcheck/tests/AbstractMemcheckTest.java b/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/valgrind/memcheck/tests/AbstractMemcheckTest.java
index 9fffcb448a..84bb02b3cc 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/valgrind/memcheck/tests/AbstractMemcheckTest.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/valgrind/memcheck/tests/AbstractMemcheckTest.java
@@ -10,7 +10,6 @@
*******************************************************************************/
package org.eclipse.linuxtools.valgrind.memcheck.tests;
-import org.eclipse.linuxtools.valgrind.launch.IValgrindToolPage;
import org.eclipse.linuxtools.valgrind.memcheck.MemcheckPlugin;
import org.eclipse.linuxtools.valgrind.tests.AbstractValgrindTest;
import org.osgi.framework.Bundle;
@@ -26,9 +25,4 @@ public abstract class AbstractMemcheckTest extends AbstractValgrindTest {
return MemcheckPlugin.TOOL_ID;
}
- @Override
- protected IValgrindToolPage getToolPage() {
- return new MemcheckTestToolPage();
- }
-
}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/valgrind/memcheck/tests/AllTests.java b/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/valgrind/memcheck/tests/AllTests.java
index b80336a526..4cade48e79 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/valgrind/memcheck/tests/AllTests.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/valgrind/memcheck/tests/AllTests.java
@@ -29,6 +29,7 @@ public class AllTests {
suite.addTestSuite(ExpandCollapseTest.class);
suite.addTestSuite(ShortcutTest.class);
suite.addTestSuite(SignalTest.class);
+ suite.addTestSuite(MinVersionTest.class);
// $JUnit-END$
return suite;
}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/valgrind/memcheck/tests/LaunchConfigTabTest.java b/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/valgrind/memcheck/tests/LaunchConfigTabTest.java
index f554dd19a7..2f82704bc7 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/valgrind/memcheck/tests/LaunchConfigTabTest.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/valgrind/memcheck/tests/LaunchConfigTabTest.java
@@ -23,9 +23,10 @@ import org.eclipse.debug.core.model.IProcess;
import org.eclipse.debug.ui.ILaunchConfigurationTab;
import org.eclipse.linuxtools.valgrind.core.IValgrindMessage;
import org.eclipse.linuxtools.valgrind.launch.ValgrindLaunchPlugin;
+import org.eclipse.linuxtools.valgrind.launch.ValgrindOptionsTab;
import org.eclipse.linuxtools.valgrind.memcheck.MemcheckLaunchConstants;
import org.eclipse.linuxtools.valgrind.memcheck.MemcheckPlugin;
-import org.eclipse.linuxtools.valgrind.tests.ValgrindTestOptionsTab;
+import org.eclipse.linuxtools.valgrind.memcheck.MemcheckToolPage;
import org.eclipse.linuxtools.valgrind.ui.ValgrindUIPlugin;
import org.eclipse.linuxtools.valgrind.ui.ValgrindViewPart;
import org.eclipse.swt.SWT;
@@ -36,11 +37,10 @@ import org.osgi.framework.Version;
public class LaunchConfigTabTest extends AbstractMemcheckTest {
- protected ValgrindTestOptionsTab tab;
- protected MemcheckTestToolPage dynamicTab;
+ protected ValgrindOptionsTab tab;
+ protected MemcheckToolPage dynamicTab;
protected ILaunchConfiguration config;
protected Shell testShell;
- //private boolean consoleFinished;
@Override
protected void setUp() throws Exception {
@@ -51,7 +51,7 @@ public class LaunchConfigTabTest extends AbstractMemcheckTest {
testShell = new Shell(Display.getDefault());
testShell.setLayout(new GridLayout());
- tab = new ValgrindTestOptionsTab();
+ tab = new ValgrindOptionsTab();
}
@Override
@@ -70,7 +70,7 @@ public class LaunchConfigTabTest extends AbstractMemcheckTest {
int ix = Arrays.asList(tab.getTools()).indexOf(MemcheckPlugin.TOOL_ID);
tab.getToolsCombo().select(ix);
ILaunchConfigurationTab dynamicTab = tab.getDynamicTab();
- this.dynamicTab = (MemcheckTestToolPage) dynamicTab;
+ this.dynamicTab = (MemcheckToolPage) dynamicTab;
return wc;
}
@@ -418,15 +418,15 @@ public class LaunchConfigTabTest extends AbstractMemcheckTest {
}
}
- public void testMainStackFrame() throws Exception {
+ public void testMainStackSize() throws Exception {
ILaunchConfigurationWorkingCopy wc = initConfig();
Version ver = ValgrindLaunchPlugin.getDefault().getValgrindVersion();
if (ver.compareTo(ValgrindLaunchPlugin.VER_3_4_0) >= 0) {
- assertFalse(tab.getMainStackFrameSpinner().isEnabled());
- tab.getMainStackFrameButton().setSelection(true);
- tab.getMainStackFrameButton().notifyListeners(SWT.Selection, null);
- assertTrue(tab.getMainStackFrameSpinner().isEnabled());
- tab.getMainStackFrameSpinner().setSelection(2048);
+ assertFalse(tab.getMainStackSizeSpinner().isEnabled());
+ tab.getMainStackSizeButton().setSelection(true);
+ tab.getMainStackSizeButton().notifyListeners(SWT.Selection, null);
+ assertTrue(tab.getMainStackSizeSpinner().isEnabled());
+ tab.getMainStackSizeSpinner().setSelection(2048);
ILaunch launch = saveAndLaunch(wc, "testMainStackFrame"); //$NON-NLS-1$
IProcess[] p = launch.getProcesses();
if (p.length > 0) {
@@ -439,8 +439,8 @@ public class LaunchConfigTabTest extends AbstractMemcheckTest {
}
}
else {
- assertNull(tab.getMainStackFrameButton());
- assertNull(tab.getMainStackFrameSpinner());
+ assertNull(tab.getMainStackSizeButton());
+ assertNull(tab.getMainStackSizeSpinner());
}
}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/valgrind/memcheck/tests/MemcheckTestToolPage.java b/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/valgrind/memcheck/tests/MemcheckTestToolPage.java
deleted file mode 100644
index b139d3d490..0000000000
--- a/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/valgrind/memcheck/tests/MemcheckTestToolPage.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Elliott Baron <ebaron@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.valgrind.memcheck.tests;
-
-import org.eclipse.linuxtools.valgrind.memcheck.MemcheckToolPage;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Spinner;
-
-public class MemcheckTestToolPage extends MemcheckToolPage {
- public Combo getLeakResCombo() {
- return leakResCombo;
- }
-
-
- public Button getShowReachableButton() {
- return showReachableButton;
- }
-
-
- public Spinner getFreelistSpinner() {
- return freelistSpinner;
- }
-
-
- public Button getPartialLoadsButton() {
- return partialLoadsButton;
- }
-
-
- public Button getUndefValueButton() {
- return undefValueButton;
- }
-
-
- public Button getGccWorkaroundButton() {
- return gccWorkaroundButton;
- }
-
-
- public Spinner getAlignmentSpinner() {
- return alignmentSpinner;
- }
-
- public Button getTrackOriginsButton() {
- return trackOriginsButton;
- }
-}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/valgrind/memcheck/tests/MinVersionTest.java b/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/valgrind/memcheck/tests/MinVersionTest.java
new file mode 100644
index 0000000000..b21f841fad
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/valgrind/memcheck/tests/MinVersionTest.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Elliott Baron <ebaron@redhat.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.valgrind.memcheck.tests;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.linuxtools.valgrind.launch.ValgrindLaunchPlugin;
+import org.eclipse.linuxtools.valgrind.launch.ValgrindOptionsTab;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.osgi.framework.Version;
+
+public class MinVersionTest extends AbstractMemcheckTest {
+ private static final Version VER_3_2_1 = new Version(3, 2, 1);
+ private Version verSave;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ proj = createProjectAndBuild("basicTest"); //$NON-NLS-1$
+
+ saveVersion();
+ }
+
+ private void saveVersion() throws CoreException {
+ verSave = ValgrindLaunchPlugin.getDefault().getValgrindVersion();
+ ValgrindLaunchPlugin.getDefault().setValgrindVersion(VER_3_2_1);
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ restoreVersion();
+
+ deleteProject(proj);
+ super.tearDown();
+ }
+
+ private void restoreVersion() {
+ ValgrindLaunchPlugin.getDefault().setValgrindVersion(verSave);
+ }
+
+ public void testLaunchBadVersion() throws Exception {
+ // Put this back so we can make a valid config
+ restoreVersion();
+ ILaunchConfiguration config = createConfiguration(proj.getProject());
+ // For some reason we downgraded
+ saveVersion();
+
+ CoreException ce = null;
+ try {
+ doLaunch(config, "testDefaults"); //$NON-NLS-1$
+ } catch (CoreException e) {
+ ce = e;
+ }
+
+ assertNotNull(ce);
+ }
+
+ public void testTabsBadVersion() throws Exception {
+ Shell testShell = new Shell(Display.getDefault());
+ testShell.setLayout(new GridLayout());
+ ValgrindOptionsTab tab = new ValgrindOptionsTab();
+
+ ILaunchConfiguration config = getLaunchConfigType().newInstance(null, getLaunchManager()
+ .generateUniqueLaunchConfigurationNameFrom(
+ proj.getProject().getName()));
+ ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
+ tab.setDefaults(wc);
+ tab.createControl(testShell);
+ tab.initializeFrom(config);
+ tab.performApply(wc);
+
+ assertFalse(tab.isValid(config));
+ assertNotNull(tab.getErrorMessage());
+
+ testShell.dispose();
+ }
+
+}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.memcheck/ChangeLog b/valgrind/org.eclipse.linuxtools.valgrind.memcheck/ChangeLog
index 146358c8b4..602570f6ff 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.memcheck/ChangeLog
+++ b/valgrind/org.eclipse.linuxtools.valgrind.memcheck/ChangeLog
@@ -1,3 +1,14 @@
+2009-06-23 Elliott Baron <ebaron@redhat.com>
+
+ * MemcheckToolPage.java (getGccWorkaroundButton): Added getter.
+ (getShowReachableButton): Likewise.
+ (getLeakResCombo): Likewise.
+ (getUndefValueButton): Likewise.
+ (getAlignmentSpinner): Likewise.
+ (getTrackOriginsButton): Likewise.
+ (getFreelistSpinner): Likewise.
+ (getPartialLoadsButton): Likewise.
+
2009-05-27 Elliott Baron <ebaron@redhat.com>
* MemcheckLaunchDelegate.java: Changed for restructuring of findValgrindLocation.
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/valgrind/memcheck/MemcheckToolPage.java b/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/valgrind/memcheck/MemcheckToolPage.java
index dd0f6e70d3..fdb37ed099 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/valgrind/memcheck/MemcheckToolPage.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.memcheck/src/org/eclipse/linuxtools/valgrind/memcheck/MemcheckToolPage.java
@@ -247,4 +247,44 @@ public class MemcheckToolPage extends AbstractLaunchConfigurationTab implements
}
}
+
+ public Combo getLeakResCombo() {
+ return leakResCombo;
+ }
+
+
+ public Button getShowReachableButton() {
+ return showReachableButton;
+ }
+
+
+ public Spinner getFreelistSpinner() {
+ return freelistSpinner;
+ }
+
+
+ public Button getPartialLoadsButton() {
+ return partialLoadsButton;
+ }
+
+
+ public Button getUndefValueButton() {
+ return undefValueButton;
+ }
+
+
+ public Button getGccWorkaroundButton() {
+ return gccWorkaroundButton;
+ }
+
+
+ public Spinner getAlignmentSpinner() {
+ return alignmentSpinner;
+ }
+
+
+ public Button getTrackOriginsButton() {
+ return trackOriginsButton;
+ }
+
}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.tests/ChangeLog b/valgrind/org.eclipse.linuxtools.valgrind.tests/ChangeLog
index 54e6c43932..c9047d8500 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.tests/ChangeLog
+++ b/valgrind/org.eclipse.linuxtools.valgrind.tests/ChangeLog
@@ -1,3 +1,19 @@
+2009-06-23 Elliott Baron <ebaron@redhat.com>
+
+ * ValgrindTestExportWizard.java: Removed.
+ * ValgrindTestExportWizardPage.java: Removed.
+ * ValgrindTestLaunchPlugin.java: Removed.
+ * ValgrindTestOptionsTab.java: Removed.
+ * AbstractValgrindTest.java: Set ValgrindStubCommand explicitly.
+ * ValgrindTestLaunchDelegate.java: Remove reference to TestLaunchPlugin.
+
+2009-06-22 Elliott Baron <ebaron@redhat.com>
+
+ * ValgrindTestLaunchPlugin.java (setValgrindLocation): Act as proxy for real plugin.
+ (getValgrindLocation): Likewise.
+ (setValgrindVersion): Likewise.
+ (getValgrindVersion): Likewise.
+
2009-05-27 Elliott Baron <ebaron@redhat.com>
* AbstractValgrindTest.java (setUp): Retrieve stub location and version and explicitly
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/valgrind/tests/AbstractValgrindTest.java b/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/valgrind/tests/AbstractValgrindTest.java
index dd9a448ce8..bcb901ef67 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/valgrind/tests/AbstractValgrindTest.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/valgrind/tests/AbstractValgrindTest.java
@@ -38,11 +38,10 @@ import org.eclipse.debug.core.Launch;
import org.eclipse.debug.ui.ILaunchConfigurationTab;
import org.eclipse.linuxtools.profiling.tests.AbstractTest;
import org.eclipse.linuxtools.valgrind.core.LaunchConfigurationConstants;
-import org.eclipse.linuxtools.valgrind.launch.IValgrindToolPage;
+import org.eclipse.linuxtools.valgrind.core.ValgrindCommand;
import org.eclipse.linuxtools.valgrind.launch.ValgrindLaunchPlugin;
import org.eclipse.linuxtools.valgrind.launch.ValgrindOptionsTab;
import org.osgi.framework.Bundle;
-import org.osgi.framework.Version;
public abstract class AbstractValgrindTest extends AbstractTest {
@@ -62,25 +61,13 @@ public abstract class AbstractValgrindTest extends AbstractTest {
private static final String SEARCH_STRING_BL = "YYYYYYYYYYYY"; //$NON-NLS-1$
private List<ILaunch> launches;
-
- public AbstractValgrindTest() {
- getPlugin().setTestBundle(getBundle());
- getPlugin().setToolPage(getToolPage());
- }
-
- protected ValgrindTestLaunchPlugin getPlugin() {
- return ValgrindTestLaunchPlugin.getDefault();
- }
@Override
protected void setUp() throws Exception {
launches = new ArrayList<ILaunch>();
- // Substitute Valgrind location and version
- IPath path = getPlugin().getValgrindLocation();
- Version ver = getPlugin().getValgrindVersion();
- ValgrindLaunchPlugin.getDefault().setValgrindLocation(path);
- ValgrindLaunchPlugin.getDefault().setValgrindVersion(ver);
+ // Substitute Valgrind command line interaction
+ ValgrindLaunchPlugin.getDefault().setValgrindCommand(getValgrindCommand());
super.setUp();
}
@@ -203,6 +190,13 @@ public abstract class AbstractValgrindTest extends AbstractTest {
protected abstract String getToolID();
- protected abstract IValgrindToolPage getToolPage();
+ private ValgrindCommand getValgrindCommand() {
+ if (!ValgrindTestsPlugin.RUN_VALGRIND) {
+ return new ValgrindStubCommand();
+ }
+ else {
+ return new ValgrindCommand();
+ }
+ }
} \ No newline at end of file
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/valgrind/tests/ValgrindTestExportWizard.java b/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/valgrind/tests/ValgrindTestExportWizard.java
deleted file mode 100644
index fe04b5171e..0000000000
--- a/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/valgrind/tests/ValgrindTestExportWizard.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Elliott Baron <ebaron@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.valgrind.tests;
-
-import org.eclipse.linuxtools.valgrind.launch.ExportWizardConstants;
-import org.eclipse.linuxtools.valgrind.launch.Messages;
-import org.eclipse.linuxtools.valgrind.launch.ValgrindExportWizard;
-import org.eclipse.linuxtools.valgrind.launch.ValgrindExportWizardPage;
-
-public class ValgrindTestExportWizard extends ValgrindExportWizard {
-
- @Override
- protected ValgrindExportWizardPage getWizardPage() {
- return new ValgrindTestExportWizardPage(Messages.getString("ValgrindExportWizard.Page_name"), ExportWizardConstants.WIZARD_TITLE, null); //$NON-NLS-1$
- }
-
-}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/valgrind/tests/ValgrindTestExportWizardPage.java b/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/valgrind/tests/ValgrindTestExportWizardPage.java
deleted file mode 100644
index 2e8014b55f..0000000000
--- a/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/valgrind/tests/ValgrindTestExportWizardPage.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Elliott Baron <ebaron@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.valgrind.tests;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.linuxtools.valgrind.launch.ValgrindExportWizardPage;
-import org.eclipse.linuxtools.valgrind.launch.ValgrindLaunchPlugin;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Text;
-
-public class ValgrindTestExportWizardPage extends ValgrindExportWizardPage {
-
- protected ValgrindTestExportWizardPage(String pageName, String title,
- ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- }
-
- public CheckboxTableViewer getViewer() {
- return viewer;
- }
-
- public Text getDestText() {
- return destText;
- }
-
- public Button getSelectAllButton() {
- return selectAllButton;
- }
-
- public Button getDeselectAllButton() {
- return deselectAllButton;
- }
-
- @Override
- protected ValgrindLaunchPlugin getPlugin() {
- return ValgrindTestLaunchPlugin.getDefault();
- }
-}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/valgrind/tests/ValgrindTestLaunchDelegate.java b/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/valgrind/tests/ValgrindTestLaunchDelegate.java
index b36302eb3e..f52987b6b6 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/valgrind/tests/ValgrindTestLaunchDelegate.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/valgrind/tests/ValgrindTestLaunchDelegate.java
@@ -21,7 +21,6 @@ import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.model.IProcess;
import org.eclipse.linuxtools.valgrind.core.ValgrindCommand;
import org.eclipse.linuxtools.valgrind.launch.ValgrindLaunchConfigurationDelegate;
-import org.eclipse.linuxtools.valgrind.launch.ValgrindLaunchPlugin;
public class ValgrindTestLaunchDelegate extends ValgrindLaunchConfigurationDelegate {
@@ -77,12 +76,7 @@ public class ValgrindTestLaunchDelegate extends ValgrindLaunchConfigurationDeleg
}
super.handleValgrindError();
}
-
- @Override
- protected ValgrindLaunchPlugin getPlugin() {
- return ValgrindTestLaunchPlugin.getDefault();
- }
-
+
private void writeErrorCode() throws IOException {
FileWriter fw = null;
try {
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/valgrind/tests/ValgrindTestLaunchPlugin.java b/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/valgrind/tests/ValgrindTestLaunchPlugin.java
deleted file mode 100644
index 714a7eee70..0000000000
--- a/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/valgrind/tests/ValgrindTestLaunchPlugin.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Elliott Baron <ebaron@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.valgrind.tests;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.linuxtools.valgrind.core.ValgrindCommand;
-import org.eclipse.linuxtools.valgrind.launch.IValgrindToolPage;
-import org.eclipse.linuxtools.valgrind.launch.ValgrindLaunchPlugin;
-import org.osgi.framework.Bundle;
-
-public class ValgrindTestLaunchPlugin extends ValgrindLaunchPlugin {
-
- protected Bundle testBundle;
- protected IValgrindToolPage toolPage;
-
- private static ValgrindTestLaunchPlugin instance;
-
- public ValgrindTestLaunchPlugin() {
- instance = this;
- }
-
- public static ValgrindTestLaunchPlugin getDefault() {
- if (instance == null) {
- instance = new ValgrindTestLaunchPlugin();
- }
- return instance;
- }
-
- public void setTestBundle(Bundle testBundle) {
- this.testBundle = testBundle;
- }
-
- public Bundle getTestBundle() {
- return testBundle;
- }
-
- public void setToolPage(IValgrindToolPage toolPage) {
- this.toolPage = toolPage;
- }
-
- @Override
- public ILaunch getCurrentLaunch() {
- return ValgrindLaunchPlugin.getDefault().getCurrentLaunch();
- }
-
- @Override
- public void setCurrentLaunch(ILaunch launch) {
- ValgrindLaunchPlugin.getDefault().setCurrentLaunch(launch);
- }
-
- @Override
- public ILaunchConfiguration getCurrentLaunchConfiguration() {
- return ValgrindLaunchPlugin.getDefault().getCurrentLaunchConfiguration();
- }
-
- @Override
- public void setCurrentLaunchConfiguration(ILaunchConfiguration config) {
- ValgrindLaunchPlugin.getDefault().setCurrentLaunchConfiguration(config);
- }
-
- @Override
- public IValgrindToolPage getToolPage(String id) throws CoreException {
- return toolPage;
- }
-
- @Override
- protected ValgrindCommand getValgrindCommand() {
- if (!ValgrindTestsPlugin.RUN_VALGRIND) {
- return new ValgrindStubCommand();
- }
- else {
- return super.getValgrindCommand();
- }
- }
-
-}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/valgrind/tests/ValgrindTestOptionsTab.java b/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/valgrind/tests/ValgrindTestOptionsTab.java
deleted file mode 100644
index 54d72df76c..0000000000
--- a/valgrind/org.eclipse.linuxtools.valgrind.tests/src/org/eclipse/linuxtools/valgrind/tests/ValgrindTestOptionsTab.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Elliott Baron <ebaron@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.valgrind.tests;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.linuxtools.valgrind.launch.IValgrindToolPage;
-import org.eclipse.linuxtools.valgrind.launch.ValgrindLaunchPlugin;
-import org.eclipse.linuxtools.valgrind.launch.ValgrindOptionsTab;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Spinner;
-import org.eclipse.swt.widgets.Text;
-
-public class ValgrindTestOptionsTab extends ValgrindOptionsTab {
- protected ValgrindTestLaunchPlugin launchPlugin;
-
- @Override
- protected ValgrindLaunchPlugin getPlugin() {
- return ValgrindTestLaunchPlugin.getDefault();
- }
-
- public String[] getTools() {
- return tools;
- }
-
- @Override
- public IValgrindToolPage getDynamicTab() throws CoreException {
- return super.getDynamicTab();
- }
-
- public Button getTraceChildrenButton() {
- return traceChildrenButton;
- }
-
- public Button getChildSilentButton() {
- return childSilentButton;
- }
-
- public Button getRunFreeresButton() {
- return runFreeresButton;
- }
-
- public Button getDemangleButton() {
- return demangleButton;
- }
-
- public Spinner getNumCallersSpinner() {
- return numCallersSpinner;
- }
-
- public Button getErrorLimitButton() {
- return errorLimitButton;
- }
-
- public Button getShowBelowMainButton() {
- return showBelowMainButton;
- }
-
- public Spinner getMaxStackFrameSpinner() {
- return maxStackFrameSpinner;
- }
-
- public Text getSuppFileText() {
- return suppFileText;
- }
-
- public Combo getToolsCombo() {
- return toolsCombo;
- }
-
- // 3.4.0 specific
- public Button getMainStackFrameButton() {
- return mainStackSizeButton;
- }
-
- public Spinner getMainStackFrameSpinner() {
- return mainStackSizeSpinner;
- }
-}

Back to the top