Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Ferrazzutti2014-04-25 14:05:37 +0000
committerAlexander Kurtakov2014-04-26 05:35:49 +0000
commit9f5e0ed5dfda7ac2bf14f4b59228135bdbcb6a10 (patch)
tree6460ae9326e2948a1c746798febd00f82321f638 /perf/org.eclipse.linuxtools.perf.swtbot.tests
parentfe48cecc1b6ba671cf0a70014e760413dae4cce9 (diff)
downloadorg.eclipse.linuxtools-9f5e0ed5dfda7ac2bf14f4b59228135bdbcb6a10.tar.gz
org.eclipse.linuxtools-9f5e0ed5dfda7ac2bf14f4b59228135bdbcb6a10.tar.xz
org.eclipse.linuxtools-9f5e0ed5dfda7ac2bf14f4b59228135bdbcb6a10.zip
Change tabs to spaces; elim trailing whitespace.
To comply with Sonar style requirements, replace all tab characters with four whitespace characters/spaces, and remove all trailing whitespace. Perform this change to all Java and XML files. Also replace tabs with "\t" in test strings that require tabs, and edit STPIndenterTest so that it doesn't rely on indented comments. Change-Id: I48c3c5449a58fe5310967d998a05df1a28fbcbb0 Signed-off-by: Andrew Ferrazzutti <aferrazz@redhat.com> Reviewed-on: https://git.eclipse.org/r/25561 Reviewed-by: Alexander Kurtakov <akurtako@redhat.com> Tested-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'perf/org.eclipse.linuxtools.perf.swtbot.tests')
-rw-r--r--perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/AbstractSWTBotTest.java498
-rw-r--r--perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/AbstractStyledTextViewTest.java50
-rw-r--r--perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/AllPerfTests.java8
-rw-r--r--perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/ReportComparisonViewTest.java26
-rw-r--r--perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/SourceDisassemblyViewTest.java50
-rw-r--r--perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/StatComparisonViewTest.java38
-rw-r--r--perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/StatViewTest.java58
7 files changed, 364 insertions, 364 deletions
diff --git a/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/AbstractSWTBotTest.java b/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/AbstractSWTBotTest.java
index aeb0266d48..0b1a3d438c 100644
--- a/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/AbstractSWTBotTest.java
+++ b/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/AbstractSWTBotTest.java
@@ -53,253 +53,253 @@ import org.osgi.framework.FrameworkUtil;
*/
@RunWith(SWTBotJunit4ClassRunner.class)
public abstract class AbstractSWTBotTest extends AbstractTest {
- private static final String PROJ_NAME = "fibTest";
- private static SWTBotView projectExplorer;
-
- private static class NodeAvailableAndSelect extends DefaultCondition {
-
- private SWTBotTree tree;
- private String parent;
- private String node;
-
- /**
- * Wait for a tree node (with a known parent) to become visible, and select it
- * when it does. Note that this wait condition should only be used after having
- * made an attempt to reveal the node.
- * @param tree The SWTBotTree that contains the node to select.
- * @param parent The text of the parent node that contains the node to select.
- * @param node The text of the node to select.
- */
- NodeAvailableAndSelect(SWTBotTree tree, String parent, String node){
- this.tree = tree;
- this.node = node;
- this.parent = parent;
- }
-
- @Override
- public boolean test() {
- try {
- SWTBotTreeItem parentNode = tree.getTreeItem(parent);
- parentNode.getNode(node).select();
- return true;
- } catch (WidgetNotFoundException e) {
- return false;
- }
- }
-
- @Override
- public String getFailureMessage() {
- return "Timed out waiting for " + node; //$NON-NLS-1$
- }
- }
-
- @BeforeClass
- public static void setUpWorkbench() throws Exception {
- SWTWorkbenchBot bot = new SWTWorkbenchBot();
- try {
- bot.viewByTitle("Welcome").close();
- // hide Subclipse Usage stats popup if present/installed
- bot.shell("Subclipse Usage").activate();
- bot.button("Cancel").click();
- } catch (WidgetNotFoundException e) {
- // ignore
- }
-
- // Set C/C++ perspective.
- bot.perspectiveByLabel("C/C++").activate();
- bot.sleep(500);
- for (SWTBotShell sh : bot.shells()) {
- if (sh.getText().startsWith("C/C++")) {
- sh.activate();
- bot.sleep(500);
- break;
- }
- }
-
- // Turn off automatic building by default to avoid timing issues
- SWTBotMenu windowsMenu = bot.menu("Window");
- windowsMenu.menu("Preferences").click();
- SWTBotShell shell = bot.shell("Preferences");
- shell.activate();
- bot.text().setText("Workspace");
- bot.waitUntil(new NodeAvailableAndSelect(bot.tree(), "General", "Workspace"));
- SWTBotCheckBox buildAuto = bot.checkBox("Build automatically");
- if (buildAuto != null && buildAuto.isChecked()) {
- buildAuto.click();
- }
- bot.sleep(1000);
- bot.button("Apply").click();
- bot.button("OK").click();
- bot.waitUntil(shellCloses(shell));
-
- projectExplorer = bot.viewByTitle("Project Explorer");
- }
-
- @AfterClass
- public static void resetExplorerState() {
- exitProjectFolder(new SWTWorkbenchBot());
- }
-
- @Test
- public void runPerfViewTest() throws Exception {
- SWTWorkbenchBot bot = new SWTWorkbenchBot();
-
- /*
- * - Method returns when the build is complete -
- * AbstractTest#createProjectAndBuild builds a single executable binary
- * under "Binaries".
- */
- proj = createProjectAndBuild(FrameworkUtil.getBundle(this.getClass()), PROJ_NAME);
- try {
- runPerfViewTestActions(bot);
- } catch (Exception e) {
- throw e;
- } finally {
- deleteProject(proj);
- }
- }
-
- private void runPerfViewTestActions(SWTWorkbenchBot bot) throws Exception {
- projectExplorer.bot().tree().select(PROJ_NAME);
- final Shell shellWidget = bot.activeShell().widget;
-
- // Open profiling configurations dialog
- UIThreadRunnable.asyncExec(new VoidResult() {
- @Override
- public void run() {
- DebugUITools.openLaunchConfigurationDialogOnGroup(shellWidget,
- (StructuredSelection) PlatformUI.getWorkbench().getWorkbenchWindows()[0].
- getSelectionService().getSelection(), "org.eclipse.debug.ui.launchGroup.profilee");
- }
- });
- bot.shell("Profiling Tools Configurations").activate();
-
- // Create new Perf configuration
- SWTBotTree profilingConfigs = bot.tree();
- SWTBotTree perfNode = profilingConfigs.select("Profile with Perf");
- perfNode.contextMenu("New").click();
-
- // Activate options tab
- bot.cTabItem("Perf Options").activate();
-
- setPerfOptions(bot);
-
- bot.button("Apply").click();
-
- if (PerfCore.checkPerfInPath(null)) {
- bot.button("Profile").click();
-
- } else {
- bot.button("Close").click();
- openStubView();
- }
-
- testPerfView();
- }
-
- /**
- * Compare The selected items in PROJ_NAME with each other
- * @param The name of a tree item to select
- * @param The name of a second tree item to select
- */
- public void compareWithEachOther (String first, String second) {
- SWTWorkbenchBot bot = new SWTWorkbenchBot();
- enterProjectFolder(bot);
-
- // Refresh and Select
- SWTBotTree treeBot = projectExplorer.bot().tree();
- treeBot.contextMenu("Refresh").click();
- treeBot.select(new String [] {first, second});
-
- // Workaround for context menu on multiple selections
- click(ContextMenuHelper.contextMenu(treeBot, "Compare With", "Each Other"));
- exitProjectFolder(bot);
- }
-
- /**
- * Enter the project folder so as to avoid expanding trees later
- */
- private static SWTBotView enterProjectFolder(SWTWorkbenchBot bot) {
- projectExplorer.bot().tree().select(PROJ_NAME).
- contextMenu("Go Into").click();
- bot.waitUntil(waitForWidget(WidgetMatcherFactory.withText(
- PROJ_NAME), projectExplorer.getWidget()));
- return projectExplorer;
- }
-
- /**
- * Exit from the project tree.
- */
- private static void exitProjectFolder(SWTWorkbenchBot bot) {
- try {
- SWTBotToolbarButton forwardButton = projectExplorer.toolbarPushButton("Forward");
- projectExplorer.toolbarPushButton("Back to Workspace").click();
- bot.waitUntil(widgetIsEnabled(forwardButton));
- } catch (WidgetNotFoundException e) {
- // Already exited from project folder
- }
- }
-
- /**
- * Click specfied menu item.
- *
- * @param menuItem
- * menu item to click
- */
- public static void click(final MenuItem menuItem) {
- final Event event = new Event();
- event.time = (int) System.currentTimeMillis();
- event.widget = menuItem;
- event.display = menuItem.getDisplay();
- event.type = SWT.Selection;
-
- UIThreadRunnable.asyncExec(menuItem.getDisplay(), new VoidResult() {
- @Override
- public void run() {
- menuItem.notifyListeners(SWT.Selection, event);
- }
- });
- }
-
- @Override
- protected ILaunchConfigurationType getLaunchConfigType() {
- return null;
- }
-
- @Override
- protected void setProfileAttributes(ILaunchConfigurationWorkingCopy wc) {
- }
-
- /**
- * Set Perf launch options.
- *
- * @param bot SWTWorkbenchBot bot focused in Perf options tab.
- */
- protected abstract void setPerfOptions(SWTWorkbenchBot bot);
-
- /**
- * Open view with fake data. To be used when perf is not installed.
- */
- protected abstract void openStubView();
-
- /**
- * Test perf view.
- */
- protected abstract void testPerfView();
-
- /**
- * Stub data for use in case the Perf tool is not installed.
- */
- protected static class StubPerfData implements IPerfData {
- @Override
- public String getPerfData() {
- return "stub_perf_data";
- }
-
- @Override
- public String getTitle() {
- return "stub_perf_title";
- }
-
- }
+ private static final String PROJ_NAME = "fibTest";
+ private static SWTBotView projectExplorer;
+
+ private static class NodeAvailableAndSelect extends DefaultCondition {
+
+ private SWTBotTree tree;
+ private String parent;
+ private String node;
+
+ /**
+ * Wait for a tree node (with a known parent) to become visible, and select it
+ * when it does. Note that this wait condition should only be used after having
+ * made an attempt to reveal the node.
+ * @param tree The SWTBotTree that contains the node to select.
+ * @param parent The text of the parent node that contains the node to select.
+ * @param node The text of the node to select.
+ */
+ NodeAvailableAndSelect(SWTBotTree tree, String parent, String node){
+ this.tree = tree;
+ this.node = node;
+ this.parent = parent;
+ }
+
+ @Override
+ public boolean test() {
+ try {
+ SWTBotTreeItem parentNode = tree.getTreeItem(parent);
+ parentNode.getNode(node).select();
+ return true;
+ } catch (WidgetNotFoundException e) {
+ return false;
+ }
+ }
+
+ @Override
+ public String getFailureMessage() {
+ return "Timed out waiting for " + node; //$NON-NLS-1$
+ }
+ }
+
+ @BeforeClass
+ public static void setUpWorkbench() throws Exception {
+ SWTWorkbenchBot bot = new SWTWorkbenchBot();
+ try {
+ bot.viewByTitle("Welcome").close();
+ // hide Subclipse Usage stats popup if present/installed
+ bot.shell("Subclipse Usage").activate();
+ bot.button("Cancel").click();
+ } catch (WidgetNotFoundException e) {
+ // ignore
+ }
+
+ // Set C/C++ perspective.
+ bot.perspectiveByLabel("C/C++").activate();
+ bot.sleep(500);
+ for (SWTBotShell sh : bot.shells()) {
+ if (sh.getText().startsWith("C/C++")) {
+ sh.activate();
+ bot.sleep(500);
+ break;
+ }
+ }
+
+ // Turn off automatic building by default to avoid timing issues
+ SWTBotMenu windowsMenu = bot.menu("Window");
+ windowsMenu.menu("Preferences").click();
+ SWTBotShell shell = bot.shell("Preferences");
+ shell.activate();
+ bot.text().setText("Workspace");
+ bot.waitUntil(new NodeAvailableAndSelect(bot.tree(), "General", "Workspace"));
+ SWTBotCheckBox buildAuto = bot.checkBox("Build automatically");
+ if (buildAuto != null && buildAuto.isChecked()) {
+ buildAuto.click();
+ }
+ bot.sleep(1000);
+ bot.button("Apply").click();
+ bot.button("OK").click();
+ bot.waitUntil(shellCloses(shell));
+
+ projectExplorer = bot.viewByTitle("Project Explorer");
+ }
+
+ @AfterClass
+ public static void resetExplorerState() {
+ exitProjectFolder(new SWTWorkbenchBot());
+ }
+
+ @Test
+ public void runPerfViewTest() throws Exception {
+ SWTWorkbenchBot bot = new SWTWorkbenchBot();
+
+ /*
+ * - Method returns when the build is complete -
+ * AbstractTest#createProjectAndBuild builds a single executable binary
+ * under "Binaries".
+ */
+ proj = createProjectAndBuild(FrameworkUtil.getBundle(this.getClass()), PROJ_NAME);
+ try {
+ runPerfViewTestActions(bot);
+ } catch (Exception e) {
+ throw e;
+ } finally {
+ deleteProject(proj);
+ }
+ }
+
+ private void runPerfViewTestActions(SWTWorkbenchBot bot) throws Exception {
+ projectExplorer.bot().tree().select(PROJ_NAME);
+ final Shell shellWidget = bot.activeShell().widget;
+
+ // Open profiling configurations dialog
+ UIThreadRunnable.asyncExec(new VoidResult() {
+ @Override
+ public void run() {
+ DebugUITools.openLaunchConfigurationDialogOnGroup(shellWidget,
+ (StructuredSelection) PlatformUI.getWorkbench().getWorkbenchWindows()[0].
+ getSelectionService().getSelection(), "org.eclipse.debug.ui.launchGroup.profilee");
+ }
+ });
+ bot.shell("Profiling Tools Configurations").activate();
+
+ // Create new Perf configuration
+ SWTBotTree profilingConfigs = bot.tree();
+ SWTBotTree perfNode = profilingConfigs.select("Profile with Perf");
+ perfNode.contextMenu("New").click();
+
+ // Activate options tab
+ bot.cTabItem("Perf Options").activate();
+
+ setPerfOptions(bot);
+
+ bot.button("Apply").click();
+
+ if (PerfCore.checkPerfInPath(null)) {
+ bot.button("Profile").click();
+
+ } else {
+ bot.button("Close").click();
+ openStubView();
+ }
+
+ testPerfView();
+ }
+
+ /**
+ * Compare The selected items in PROJ_NAME with each other
+ * @param The name of a tree item to select
+ * @param The name of a second tree item to select
+ */
+ public void compareWithEachOther (String first, String second) {
+ SWTWorkbenchBot bot = new SWTWorkbenchBot();
+ enterProjectFolder(bot);
+
+ // Refresh and Select
+ SWTBotTree treeBot = projectExplorer.bot().tree();
+ treeBot.contextMenu("Refresh").click();
+ treeBot.select(new String [] {first, second});
+
+ // Workaround for context menu on multiple selections
+ click(ContextMenuHelper.contextMenu(treeBot, "Compare With", "Each Other"));
+ exitProjectFolder(bot);
+ }
+
+ /**
+ * Enter the project folder so as to avoid expanding trees later
+ */
+ private static SWTBotView enterProjectFolder(SWTWorkbenchBot bot) {
+ projectExplorer.bot().tree().select(PROJ_NAME).
+ contextMenu("Go Into").click();
+ bot.waitUntil(waitForWidget(WidgetMatcherFactory.withText(
+ PROJ_NAME), projectExplorer.getWidget()));
+ return projectExplorer;
+ }
+
+ /**
+ * Exit from the project tree.
+ */
+ private static void exitProjectFolder(SWTWorkbenchBot bot) {
+ try {
+ SWTBotToolbarButton forwardButton = projectExplorer.toolbarPushButton("Forward");
+ projectExplorer.toolbarPushButton("Back to Workspace").click();
+ bot.waitUntil(widgetIsEnabled(forwardButton));
+ } catch (WidgetNotFoundException e) {
+ // Already exited from project folder
+ }
+ }
+
+ /**
+ * Click specfied menu item.
+ *
+ * @param menuItem
+ * menu item to click
+ */
+ public static void click(final MenuItem menuItem) {
+ final Event event = new Event();
+ event.time = (int) System.currentTimeMillis();
+ event.widget = menuItem;
+ event.display = menuItem.getDisplay();
+ event.type = SWT.Selection;
+
+ UIThreadRunnable.asyncExec(menuItem.getDisplay(), new VoidResult() {
+ @Override
+ public void run() {
+ menuItem.notifyListeners(SWT.Selection, event);
+ }
+ });
+ }
+
+ @Override
+ protected ILaunchConfigurationType getLaunchConfigType() {
+ return null;
+ }
+
+ @Override
+ protected void setProfileAttributes(ILaunchConfigurationWorkingCopy wc) {
+ }
+
+ /**
+ * Set Perf launch options.
+ *
+ * @param bot SWTWorkbenchBot bot focused in Perf options tab.
+ */
+ protected abstract void setPerfOptions(SWTWorkbenchBot bot);
+
+ /**
+ * Open view with fake data. To be used when perf is not installed.
+ */
+ protected abstract void openStubView();
+
+ /**
+ * Test perf view.
+ */
+ protected abstract void testPerfView();
+
+ /**
+ * Stub data for use in case the Perf tool is not installed.
+ */
+ protected static class StubPerfData implements IPerfData {
+ @Override
+ public String getPerfData() {
+ return "stub_perf_data";
+ }
+
+ @Override
+ public String getTitle() {
+ return "stub_perf_title";
+ }
+
+ }
}
diff --git a/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/AbstractStyledTextViewTest.java b/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/AbstractStyledTextViewTest.java
index 1f1e766009..5752f67e40 100644
--- a/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/AbstractStyledTextViewTest.java
+++ b/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/AbstractStyledTextViewTest.java
@@ -26,29 +26,29 @@ import org.hamcrest.Matcher;
*/
public abstract class AbstractStyledTextViewTest extends AbstractSWTBotTest {
- @Override
- protected void testPerfView() {
- SWTWorkbenchBot bot = new SWTWorkbenchBot();
-
- Matcher<IViewReference> withPartName = withPartName(getViewId());
- SWTBotView view = bot.view(withPartName);
- assertNotNull(view);
-
- view.setFocus();
- SWTBotStyledText text = bot.styledText();
- assertNotNull(text);
- assertEquals(getExpectedText(), text.getText());
- }
-
- /**
- * Get unique test view identifier.
- * @return String unique identifier of view part to test.
- */
- protected abstract String getViewId();
-
- /**
- * Get exptected text of <code>StyledText</code> widget contained in this view.
- * @return String expected text of view.
- */
- protected abstract String getExpectedText();
+ @Override
+ protected void testPerfView() {
+ SWTWorkbenchBot bot = new SWTWorkbenchBot();
+
+ Matcher<IViewReference> withPartName = withPartName(getViewId());
+ SWTBotView view = bot.view(withPartName);
+ assertNotNull(view);
+
+ view.setFocus();
+ SWTBotStyledText text = bot.styledText();
+ assertNotNull(text);
+ assertEquals(getExpectedText(), text.getText());
+ }
+
+ /**
+ * Get unique test view identifier.
+ * @return String unique identifier of view part to test.
+ */
+ protected abstract String getViewId();
+
+ /**
+ * Get exptected text of <code>StyledText</code> widget contained in this view.
+ * @return String expected text of view.
+ */
+ protected abstract String getExpectedText();
}
diff --git a/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/AllPerfTests.java b/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/AllPerfTests.java
index b7e97d0caf..4220f2a37f 100644
--- a/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/AllPerfTests.java
+++ b/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/AllPerfTests.java
@@ -15,9 +15,9 @@ import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({
- StatViewTest.class,
- SourceDisassemblyViewTest.class,
- StatComparisonViewTest.class,
- ReportComparisonViewTest.class})
+ StatViewTest.class,
+ SourceDisassemblyViewTest.class,
+ StatComparisonViewTest.class,
+ ReportComparisonViewTest.class})
public class AllPerfTests {
}
diff --git a/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/ReportComparisonViewTest.java b/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/ReportComparisonViewTest.java
index 2a8f586871..98b00e49d8 100644
--- a/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/ReportComparisonViewTest.java
+++ b/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/ReportComparisonViewTest.java
@@ -20,20 +20,20 @@ import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
*/
public class ReportComparisonViewTest extends AbstractSWTBotTest {
- @Override
- protected void setPerfOptions(SWTWorkbenchBot bot) {
- SWTBotCheckBox chkBox = bot.checkBox("Show Source Disassembly View");
- assertNotNull(chkBox);
- chkBox.select();
- }
+ @Override
+ protected void setPerfOptions(SWTWorkbenchBot bot) {
+ SWTBotCheckBox chkBox = bot.checkBox("Show Source Disassembly View");
+ assertNotNull(chkBox);
+ chkBox.select();
+ }
- @Override
- protected void openStubView() {
- }
+ @Override
+ protected void openStubView() {
+ }
- @Override
- protected void testPerfView() {
- compareWithEachOther("perf_old.data", "perf_new.data");
- }
+ @Override
+ protected void testPerfView() {
+ compareWithEachOther("perf_old.data", "perf_new.data");
+ }
}
diff --git a/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/SourceDisassemblyViewTest.java b/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/SourceDisassemblyViewTest.java
index a2f7978e6e..2a503ee3c7 100644
--- a/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/SourceDisassemblyViewTest.java
+++ b/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/SourceDisassemblyViewTest.java
@@ -22,29 +22,29 @@ import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
*/
public class SourceDisassemblyViewTest extends AbstractStyledTextViewTest {
- @Override
- protected void setPerfOptions(SWTWorkbenchBot bot) {
- SWTBotCheckBox chkBox = bot.checkBox("Show Source Disassembly View");
- assertNotNull(chkBox);
- chkBox.select();
- }
-
- @Override
- protected void openStubView() {
- PerfPlugin.getDefault().setSourceDisassemblyData(new StubPerfData());
- SourceDisassemblyView.refreshView();
-
- }
-
- @Override
- protected String getViewId() {
- // supply secondary id
- return "Perf Source Disassembly";
-
- }
-
- @Override
- protected String getExpectedText() {
- return PerfPlugin.getDefault().getSourceDisassemblyData().getPerfData();
- }
+ @Override
+ protected void setPerfOptions(SWTWorkbenchBot bot) {
+ SWTBotCheckBox chkBox = bot.checkBox("Show Source Disassembly View");
+ assertNotNull(chkBox);
+ chkBox.select();
+ }
+
+ @Override
+ protected void openStubView() {
+ PerfPlugin.getDefault().setSourceDisassemblyData(new StubPerfData());
+ SourceDisassemblyView.refreshView();
+
+ }
+
+ @Override
+ protected String getViewId() {
+ // supply secondary id
+ return "Perf Source Disassembly";
+
+ }
+
+ @Override
+ protected String getExpectedText() {
+ return PerfPlugin.getDefault().getSourceDisassemblyData().getPerfData();
+ }
}
diff --git a/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/StatComparisonViewTest.java b/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/StatComparisonViewTest.java
index 245980837f..bb0d078dd1 100644
--- a/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/StatComparisonViewTest.java
+++ b/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/StatComparisonViewTest.java
@@ -21,24 +21,24 @@ import org.eclipse.swtbot.swt.finder.widgets.SWTBotSpinner;
*/
public class StatComparisonViewTest extends AbstractSWTBotTest {
- @Override
- protected void setPerfOptions(SWTWorkbenchBot bot) {
- SWTBotCheckBox chkBox = bot.checkBox("Show Stat View");
- assertNotNull(chkBox);
- chkBox.select();
-
- SWTBotSpinner spinner = bot.spinner();
- assertNotNull(spinner);
- spinner.setSelection(3);
- }
-
- @Override
- protected void testPerfView() {
- compareWithEachOther("perf_old.stat", "perf_new.stat");
- }
-
- @Override
- protected void openStubView() {
- }
+ @Override
+ protected void setPerfOptions(SWTWorkbenchBot bot) {
+ SWTBotCheckBox chkBox = bot.checkBox("Show Stat View");
+ assertNotNull(chkBox);
+ chkBox.select();
+
+ SWTBotSpinner spinner = bot.spinner();
+ assertNotNull(spinner);
+ spinner.setSelection(3);
+ }
+
+ @Override
+ protected void testPerfView() {
+ compareWithEachOther("perf_old.stat", "perf_new.stat");
+ }
+
+ @Override
+ protected void openStubView() {
+ }
}
diff --git a/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/StatViewTest.java b/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/StatViewTest.java
index d221c1779c..a51d2d6c83 100644
--- a/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/StatViewTest.java
+++ b/perf/org.eclipse.linuxtools.perf.swtbot.tests/src/org/eclipse/linuxtools/internal/perf/swtbot/tests/StatViewTest.java
@@ -22,33 +22,33 @@ import org.eclipse.swtbot.swt.finder.widgets.SWTBotSpinner;
* SWTBot test for StatView.
*/
public class StatViewTest extends AbstractStyledTextViewTest {
- private static final int STAT_RUNS = 3;
-
- @Override
- protected void setPerfOptions(SWTWorkbenchBot bot) {
- SWTBotCheckBox chkBox = bot.checkBox("Show Stat View");
- assertNotNull(chkBox);
- chkBox.select();
-
- SWTBotSpinner spinner = bot.spinner();
- assertNotNull(spinner);
- spinner.setSelection(STAT_RUNS);
-
- }
-
- @Override
- protected void openStubView() {
- PerfPlugin.getDefault().setStatData(new StubPerfData());
- StatView.refreshView();
- }
-
- @Override
- protected String getViewId() {
- return "Perf Statistics";
- }
-
- @Override
- protected String getExpectedText() {
- return PerfPlugin.getDefault().getStatData().getPerfData();
- }
+ private static final int STAT_RUNS = 3;
+
+ @Override
+ protected void setPerfOptions(SWTWorkbenchBot bot) {
+ SWTBotCheckBox chkBox = bot.checkBox("Show Stat View");
+ assertNotNull(chkBox);
+ chkBox.select();
+
+ SWTBotSpinner spinner = bot.spinner();
+ assertNotNull(spinner);
+ spinner.setSelection(STAT_RUNS);
+
+ }
+
+ @Override
+ protected void openStubView() {
+ PerfPlugin.getDefault().setStatData(new StubPerfData());
+ StatView.refreshView();
+ }
+
+ @Override
+ protected String getViewId() {
+ return "Perf Statistics";
+ }
+
+ @Override
+ protected String getExpectedText() {
+ return PerfPlugin.getDefault().getStatData().getPerfData();
+ }
}

Back to the top