Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Treggiari2005-05-20 03:22:26 +0000
committerLeo Treggiari2005-05-20 03:22:26 +0000
commitd4afd6293a57bb87495acebccd8629b42620791d (patch)
treed86a6c8fe577be2f33cdc444baffdac34042d7bf /build/org.eclipse.cdt.managedbuilder.ui.tests/src
parentfb302ff5d6a90949febff11e6a150a5b28c8440c (diff)
downloadorg.eclipse.cdt-d4afd6293a57bb87495acebccd8629b42620791d.tar.gz
org.eclipse.cdt-d4afd6293a57bb87495acebccd8629b42620791d.tar.xz
org.eclipse.cdt-d4afd6293a57bb87495acebccd8629b42620791d.zip
Page navigation tests for custom wizard pages
Diffstat (limited to 'build/org.eclipse.cdt.managedbuilder.ui.tests/src')
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/TestCustomPageManager.java746
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/suite/AllManagedBuildUITests.java38
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/testplugin/TestsPlugin.java95
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/util/TestToolchain.java240
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/AlwaysPresentWizardPage.java133
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/NatureAWizardPage.java125
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/NatureBWizardPage.java125
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ProjectTypeDWizardPage.java125
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ProjectTypeEWizardPage.java125
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ToolchainCWizardPage.java125
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ToolchainFWizardPage.java125
11 files changed, 2002 insertions, 0 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/TestCustomPageManager.java b/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/TestCustomPageManager.java
new file mode 100644
index 00000000000..d10ad7696c8
--- /dev/null
+++ b/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/TestCustomPageManager.java
@@ -0,0 +1,746 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Texas Instruments Incorporated and others.
+ * 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:
+ * Texas Instruments - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.ui.tests;
+
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.managedbuilder.ui.wizards.*;
+import org.eclipse.cdt.managedbuilder.ui.tests.util.TestToolchain;
+
+/**
+ * This class is respnsible for testing the functionality of the custom page manager (MBSCustomPageManager)
+ * that manages custom wizard pages that are provided by ISVs to supplement the pages in the New Project wizards
+ * for Managed Build.
+ *
+ * The idea behind the test plan is pretty simple.
+ *
+ * There are seven custom wizard pages specified by this plugin. One page has no restrictions placed upon it and
+ * thus should always be present. There are two pages which are constrained by different natures respectively,
+ * two constrained by different toolchains, and two constrained by different project types. The goal is to
+ * change around what options (i.e. nature, project type, toolchain) a hypothetical user would set, and then
+ * check to see if the proper pages are displayed in the proper order.
+ */
+public class TestCustomPageManager extends TestCase
+{
+
+ private static final String alwaysPresentPageName = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.AlwaysPresentWizardPage";
+ private static final String natureAPageName = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.NatureAWizardPage";
+ private static final String natureBPageName = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.NatureBWizardPage";
+ private static final String toolchainCPageName = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ToolchainCWizardPage";
+ private static final String projectTypeDPageName = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ProjectTypeDWizardPage";
+ private static final String projectTypeEPageName = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ProjectTypeEWizardPage";
+ private static final String toolchainFPageName = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ToolchainFWizardPage";
+
+ public void setUp() throws Exception
+ {
+ MBSCustomPageManager.init();
+
+ MBSCustomPageManager.loadExtensions();
+ }
+
+ /**
+ * Test with a setup such that only an unconstrained page should show up.
+ */
+ public void testOneVisiblePage()
+ {
+ // set the project type to be "X"
+ MBSCustomPageManager.addPageProperty(CProjectPlatformPage.PAGE_ID, CProjectPlatformPage.PROJECT_TYPE, "X");
+
+ // set the toolchain to "Y"
+ Set toolchainSet = new LinkedHashSet();
+ TestToolchain toolchain = new TestToolchain();
+ toolchain.setID("Y");
+ toolchainSet.add(toolchain);
+ MBSCustomPageManager.addPageProperty(CProjectPlatformPage.PAGE_ID, CProjectPlatformPage.TOOLCHAIN, toolchainSet);
+
+ // set the nature to "Z"
+ MBSCustomPageManager.addPageProperty(CProjectPlatformPage.PAGE_ID, CProjectPlatformPage.NATURE, "Z");
+
+ // check each of the pages
+
+ // this page should always be visible
+ if(!MBSCustomPageManager.isPageVisible(alwaysPresentPageName))
+ {
+ fail("AlwaysPresentWizardPage should be visible");
+ }
+
+ // next page for this page should be null
+ if(MBSCustomPageManager.getNextPage(alwaysPresentPageName) != null)
+ {
+ fail("AlwaysPresentWizardPage should not have a next page.");
+ }
+
+ // the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(natureAPageName))
+ {
+ fail("NatureAWizardPage should not be visible");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(natureBPageName))
+ {
+ fail("NatureBWizardPage should not be visible");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(toolchainCPageName))
+ {
+ fail("ToolChainCWizardPage should not be visible");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(projectTypeDPageName))
+ {
+ fail("ProjectTypeDWizardPage should not be visible");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(projectTypeEPageName))
+ {
+ fail("ProjectTypeEWizardPage should not be visible");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(toolchainFPageName))
+ {
+ fail("ToolchainFWizardPage should not be visible");
+ }
+ }
+
+
+ /**
+ * Set the nature to "A". Only pages with no contraints or natures set to "A" should show up.
+ */
+ public void testNatureA()
+ {
+// set the project type to be "X"
+ MBSCustomPageManager.addPageProperty(CProjectPlatformPage.PAGE_ID, CProjectPlatformPage.PROJECT_TYPE, "X");
+
+ // set the toolchain to "Y"
+ Set toolchainSet = new LinkedHashSet();
+ TestToolchain toolchain = new TestToolchain();
+ toolchain.setID("Y");
+ toolchainSet.add(toolchain);
+ MBSCustomPageManager.addPageProperty(CProjectPlatformPage.PAGE_ID, CProjectPlatformPage.TOOLCHAIN, toolchainSet);
+
+ // set the nature to "A"
+ MBSCustomPageManager.addPageProperty(CProjectPlatformPage.PAGE_ID, CProjectPlatformPage.NATURE, "A");
+
+ // check each of the pages
+
+ // this page should always be visible
+ if(!MBSCustomPageManager.isPageVisible(alwaysPresentPageName))
+ {
+ fail("AlwaysPresentWizardPage should be visible");
+ }
+
+ // next page for this page should be the page for Nature A
+ if(MBSCustomPageManager.getNextPage(alwaysPresentPageName) != MBSCustomPageManager.getPageData(natureAPageName).getWizardPage())
+ {
+ fail("AlwaysPresentWizardPage's next page should be NatureAWizardPage");
+ }
+
+ // Nature A page's previous page should be the always present page
+ if(MBSCustomPageManager.getPreviousPage(natureAPageName) != MBSCustomPageManager.getPageData(alwaysPresentPageName).getWizardPage())
+ {
+ fail("NatureAWizardPage's next page should be AlwaysPresentWizardPage");
+ }
+
+ // Nature A page should be visible
+ if(!MBSCustomPageManager.isPageVisible(natureAPageName))
+ {
+ fail("NatureAWizardPage should be visible");
+ }
+
+ // Nature A page's next page should be null
+ if(MBSCustomPageManager.getNextPage(natureAPageName) != null)
+ {
+ fail("NatureAWizardPage should not have a next page.");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(natureBPageName))
+ {
+ fail("NatureBWizardPage should not be visible");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(toolchainCPageName))
+ {
+ fail("ToolChainCWizardPage should not be visible");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(projectTypeDPageName))
+ {
+ fail("ProjectTypeDWizardPage should not be visible");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(projectTypeEPageName))
+ {
+ fail("ProjectTypeEWizardPage should not be visible");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(toolchainFPageName))
+ {
+ fail("ToolchainFWizardPage should not be visible");
+ }
+ }
+
+ /**
+ * Set the nature to "B". Only pages with no contraints or natures set to "B" should show up.
+ */
+ public void testNatureB()
+ {
+// set the project type to be "X"
+ MBSCustomPageManager.addPageProperty(CProjectPlatformPage.PAGE_ID, CProjectPlatformPage.PROJECT_TYPE, "X");
+
+ // set the toolchain to "Y"
+ Set toolchainSet = new LinkedHashSet();
+ TestToolchain toolchain = new TestToolchain();
+ toolchain.setID("Y");
+ toolchainSet.add(toolchain);
+ MBSCustomPageManager.addPageProperty(CProjectPlatformPage.PAGE_ID, CProjectPlatformPage.TOOLCHAIN, toolchainSet);
+
+ // set the nature to "B"
+ MBSCustomPageManager.addPageProperty(CProjectPlatformPage.PAGE_ID, CProjectPlatformPage.NATURE, "B");
+
+ // check each of the pages
+
+ // this page should always be visible
+ if(!MBSCustomPageManager.isPageVisible(alwaysPresentPageName))
+ {
+ fail("AlwaysPresentWizardPage should be visible");
+ }
+
+ // next page for this page should be the page for Nature B
+ if(MBSCustomPageManager.getNextPage(alwaysPresentPageName) != MBSCustomPageManager.getPageData(natureBPageName).getWizardPage())
+ {
+ fail("AlwaysPresentWizardPage's next page should be NatureBWizardPage");
+ }
+
+ // Nature B page's previous page should be the always present page
+ if(MBSCustomPageManager.getPreviousPage(natureBPageName) != MBSCustomPageManager.getPageData(alwaysPresentPageName).getWizardPage())
+ {
+ fail("NatureBWizardPage's next page should be AlwaysPresentWizardPage");
+ }
+
+ // Nature B page should be visible
+ if(!MBSCustomPageManager.isPageVisible(natureBPageName))
+ {
+ fail("NatureBWizardPage should be visible");
+ }
+
+ // Nature B page's next page should be null
+ if(MBSCustomPageManager.getNextPage(natureBPageName) != null)
+ {
+ fail("NatureBWizardPage should not have a next page.");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(natureAPageName))
+ {
+ fail("NatureAWizardPage should not be visible");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(toolchainCPageName))
+ {
+ fail("ToolChainCWizardPage should not be visible");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(projectTypeDPageName))
+ {
+ fail("ProjectTypeDWizardPage should not be visible");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(projectTypeEPageName))
+ {
+ fail("ProjectTypeEWizardPage should not be visible");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(toolchainFPageName))
+ {
+ fail("ToolchainFWizardPage should not be visible");
+ }
+ }
+
+ /**
+ * Set the toolchain to "C". Only pages with no contraints or toolchains set to "C" should show up.
+ */
+ public void testToolchainC()
+ {
+// set the project type to be "X"
+ MBSCustomPageManager.addPageProperty(CProjectPlatformPage.PAGE_ID, CProjectPlatformPage.PROJECT_TYPE, "X");
+
+ // set the toolchain to "C"
+ Set toolchainSet = new LinkedHashSet();
+ TestToolchain toolchain = new TestToolchain();
+ toolchain.setID("C");
+ toolchainSet.add(toolchain);
+ MBSCustomPageManager.addPageProperty(CProjectPlatformPage.PAGE_ID, CProjectPlatformPage.TOOLCHAIN, toolchainSet);
+
+ // set the nature to "Z"
+ MBSCustomPageManager.addPageProperty(CProjectPlatformPage.PAGE_ID, CProjectPlatformPage.NATURE, "Z");
+
+ // check each of the pages
+
+ // this page should always be visible
+ if(!MBSCustomPageManager.isPageVisible(alwaysPresentPageName))
+ {
+ fail("AlwaysPresentWizardPage should be visible");
+ }
+
+ // next page for this page should be the page for toolchain C
+ if(MBSCustomPageManager.getNextPage(alwaysPresentPageName) != MBSCustomPageManager.getPageData(toolchainCPageName).getWizardPage())
+ {
+ fail("AlwaysPresentWizardPage's next page should be ToolchainCWizardPage");
+ }
+
+ // toolchain C page's previous page should be the always present page
+ if(MBSCustomPageManager.getPreviousPage(toolchainCPageName) != MBSCustomPageManager.getPageData(alwaysPresentPageName).getWizardPage())
+ {
+ fail("ToolchainCWizardPage's previous page should be AlwaysPresentWizardPage");
+ }
+
+ // Toolchain C page should be visible
+ if(!MBSCustomPageManager.isPageVisible(toolchainCPageName))
+ {
+ fail("ToolchainCWizardPage should be visible");
+ }
+
+ // Toolchain C page's next page should be null
+ if(MBSCustomPageManager.getNextPage(toolchainCPageName) != null)
+ {
+ fail("ToolchainCWizardPage should not have a next page.");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(natureAPageName))
+ {
+ fail("NatureAWizardPage should not be visible");
+ }
+
+ // the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(natureBPageName))
+ {
+ fail("NatureBWizardPage should not be visible");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(projectTypeDPageName))
+ {
+ fail("ProjectTypeDWizardPage should not be visible");
+ }
+
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(projectTypeEPageName))
+ {
+ fail("ProjectTypeEWizardPage should not be visible");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(toolchainFPageName))
+ {
+ fail("ToolchainFWizardPage should not be visible");
+ }
+ }
+
+
+ /**
+ * Set the project type to "D". Only pages with no contraints or project types set to "D" should show up.
+ */
+ public void testProjectTypeD()
+ {
+// set the project type to be "D"
+ MBSCustomPageManager.addPageProperty(CProjectPlatformPage.PAGE_ID, CProjectPlatformPage.PROJECT_TYPE, "D");
+
+ // set the toolchain to "Y"
+ Set toolchainSet = new LinkedHashSet();
+ TestToolchain toolchain = new TestToolchain();
+ toolchain.setID("Y");
+ toolchainSet.add(toolchain);
+ MBSCustomPageManager.addPageProperty(CProjectPlatformPage.PAGE_ID, CProjectPlatformPage.TOOLCHAIN, toolchainSet);
+
+ // set the nature to "Z"
+ MBSCustomPageManager.addPageProperty(CProjectPlatformPage.PAGE_ID, CProjectPlatformPage.NATURE, "Z");
+
+ // check each of the pages
+
+ // this page should always be visible
+ if(!MBSCustomPageManager.isPageVisible(alwaysPresentPageName))
+ {
+ fail("AlwaysPresentWizardPage should be visible");
+ }
+
+ // next page for this page should be the page for project type D
+ if(MBSCustomPageManager.getNextPage(alwaysPresentPageName) != MBSCustomPageManager.getPageData(projectTypeDPageName).getWizardPage())
+ {
+ fail("AlwaysPresentWizardPage's next page should be ProjectTypeDWizardPage");
+ }
+
+ // Project type D page's previous page should be the always present page
+ if(MBSCustomPageManager.getPreviousPage(projectTypeDPageName) != MBSCustomPageManager.getPageData(alwaysPresentPageName).getWizardPage())
+ {
+ fail("ProjectTypeDWizardPage's next page should be AlwaysPresentWizardPage");
+ }
+
+ // Project type D page should be visible
+ if(!MBSCustomPageManager.isPageVisible(projectTypeDPageName))
+ {
+ fail("ProjectTypeDWizardPage should be visible");
+ }
+
+ // Project type D page's next page should be null
+ if(MBSCustomPageManager.getNextPage(projectTypeDPageName) != null)
+ {
+ fail("ProjectTypeDWizardPage should not have a next page.");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(natureAPageName))
+ {
+ fail("NatureAWizardPage should not be visible");
+ }
+
+ // the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(natureBPageName))
+ {
+ fail("NatureBWizardPage should not be visible");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(toolchainCPageName))
+ {
+ fail("ToolChainCWizardPage should not be visible");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(projectTypeEPageName))
+ {
+ fail("ProjectTypeEWizardPage should not be visible");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(toolchainFPageName))
+ {
+ fail("ToolchainFWizardPage should not be visible");
+ }
+
+ }
+
+
+
+ /**
+ * Set the project type to "E". Only pages with no contraints or project types set to "E" should show up.
+ */
+ public void testProjectTypeE()
+ {
+// set the project type to be "E"
+ MBSCustomPageManager.addPageProperty(CProjectPlatformPage.PAGE_ID, CProjectPlatformPage.PROJECT_TYPE, "E");
+
+ // set the toolchain to "Y"
+ Set toolchainSet = new LinkedHashSet();
+ TestToolchain toolchain = new TestToolchain();
+ toolchain.setID("Y");
+ toolchainSet.add(toolchain);
+ MBSCustomPageManager.addPageProperty(CProjectPlatformPage.PAGE_ID, CProjectPlatformPage.TOOLCHAIN, toolchainSet);
+
+ // set the nature to "Z"
+ MBSCustomPageManager.addPageProperty(CProjectPlatformPage.PAGE_ID, CProjectPlatformPage.NATURE, "Z");
+
+ // check each of the pages
+
+ // this page should always be visible
+ if(!MBSCustomPageManager.isPageVisible(alwaysPresentPageName))
+ {
+ fail("AlwaysPresentWizardPage should be visible");
+ }
+
+ // next page for this page should be the page for project type D
+ if(MBSCustomPageManager.getNextPage(alwaysPresentPageName) != MBSCustomPageManager.getPageData(projectTypeEPageName).getWizardPage())
+ {
+ fail("AlwaysPresentWizardPage's next page should be ProjectTypeEWizardPage");
+ }
+
+ // Project type E page's previous page should be the always present page
+ if(MBSCustomPageManager.getPreviousPage(projectTypeEPageName) != MBSCustomPageManager.getPageData(alwaysPresentPageName).getWizardPage())
+ {
+ fail("ProjectTypeDWizardPage's next page should be AlwaysPresentWizardPage");
+ }
+
+ // Project type E page should be visible
+ if(!MBSCustomPageManager.isPageVisible(projectTypeEPageName))
+ {
+ fail("ProjectTypeDWizardPage should be visible");
+ }
+
+ // Project type D page's next page should be null
+ if(MBSCustomPageManager.getNextPage(projectTypeEPageName) != null)
+ {
+ fail("ProjectTypeEWizardPage should not have a next page.");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(natureAPageName))
+ {
+ fail("NatureAWizardPage should not be visible");
+ }
+
+ // the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(natureBPageName))
+ {
+ fail("NatureBWizardPage should not be visible");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(toolchainCPageName))
+ {
+ fail("ToolChainCWizardPage should not be visible");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(projectTypeDPageName))
+ {
+ fail("ProjectTypeDWizardPage should not be visible");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(toolchainFPageName))
+ {
+ fail("ToolchainFWizardPage should not be visible");
+ }
+
+ }
+
+ /**
+ * Set the toolchain to "F". Only pages with no contraints or toolchains set to "F" should show up.
+ */
+ public void testToolchainF()
+ {
+// set the project type to be "X"
+ MBSCustomPageManager.addPageProperty(CProjectPlatformPage.PAGE_ID, CProjectPlatformPage.PROJECT_TYPE, "X");
+
+ // set the toolchain to "F"
+ Set toolchainSet = new LinkedHashSet();
+ TestToolchain toolchain = new TestToolchain();
+ toolchain.setID("F");
+ toolchainSet.add(toolchain);
+ MBSCustomPageManager.addPageProperty(CProjectPlatformPage.PAGE_ID, CProjectPlatformPage.TOOLCHAIN, toolchainSet);
+
+ // set the nature to "Z"
+ MBSCustomPageManager.addPageProperty(CProjectPlatformPage.PAGE_ID, CProjectPlatformPage.NATURE, "Z");
+
+ // check each of the pages
+
+ // this page should always be visible
+ if(!MBSCustomPageManager.isPageVisible(alwaysPresentPageName))
+ {
+ fail("AlwaysPresentWizardPage should be visible");
+ }
+
+ // next page for this page should be the page for toolchain F
+ if(MBSCustomPageManager.getNextPage(alwaysPresentPageName) != MBSCustomPageManager.getPageData(toolchainFPageName).getWizardPage())
+ {
+ fail("AlwaysPresentWizardPage's next page should be ToolchainFWizardPage");
+ }
+
+ // toolchain F page's previous page should be the always present page
+ if(MBSCustomPageManager.getPreviousPage(toolchainFPageName) != MBSCustomPageManager.getPageData(alwaysPresentPageName).getWizardPage())
+ {
+ fail("ToolchainFWizardPage's previous page should be AlwaysPresentWizardPage");
+ }
+
+ // Toolchain C page should be visible
+ if(!MBSCustomPageManager.isPageVisible(toolchainFPageName))
+ {
+ fail("ToolchainFWizardPage should be visible");
+ }
+
+ // Toolchain F page's next page should be null
+ if(MBSCustomPageManager.getNextPage(toolchainFPageName) != null)
+ {
+ fail("ToolchainCWizardPage should not have a next page.");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(natureAPageName))
+ {
+ fail("NatureAWizardPage should not be visible");
+ }
+
+ // the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(natureBPageName))
+ {
+ fail("NatureBWizardPage should not be visible");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(projectTypeDPageName))
+ {
+ fail("ProjectTypeDWizardPage should not be visible");
+ }
+
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(projectTypeEPageName))
+ {
+ fail("ProjectTypeEWizardPage should not be visible");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(toolchainCPageName))
+ {
+ fail("ToolchainCWizardPage should not be visible");
+ }
+ }
+
+ /**
+ * Set nature to A, toolchain to C, project type to D. We should have several pages with different constraints appearing.
+ */
+ public void testMultiplePages()
+ {
+// set the project type to be "D"
+ MBSCustomPageManager.addPageProperty(CProjectPlatformPage.PAGE_ID, CProjectPlatformPage.PROJECT_TYPE, "D");
+
+ // set the toolchain to "C"
+ Set toolchainSet = new LinkedHashSet();
+ TestToolchain toolchain = new TestToolchain();
+ toolchain.setID("C");
+ toolchainSet.add(toolchain);
+ MBSCustomPageManager.addPageProperty(CProjectPlatformPage.PAGE_ID, CProjectPlatformPage.TOOLCHAIN, toolchainSet);
+
+ // set the nature to "A"
+ MBSCustomPageManager.addPageProperty(CProjectPlatformPage.PAGE_ID, CProjectPlatformPage.NATURE, "A");
+
+ // check each of the pages
+
+ // this page should always be visible
+ if(!MBSCustomPageManager.isPageVisible(alwaysPresentPageName))
+ {
+ fail("AlwaysPresentWizardPage should be visible");
+ }
+
+ // next page for this page should be the page for Nature A
+ if(MBSCustomPageManager.getNextPage(alwaysPresentPageName) != MBSCustomPageManager.getPageData(natureAPageName).getWizardPage())
+ {
+ fail("AlwaysPresentWizardPage's next page should be NatureAWizardPage");
+ }
+
+ // Nature A page's previous page should be the always present page
+// next page for this page should be the page for Nature A
+ if(MBSCustomPageManager.getPreviousPage(natureAPageName) != MBSCustomPageManager.getPageData(alwaysPresentPageName).getWizardPage())
+ {
+ fail("NatureAWizardPage's next page should be AlwaysPresentWizardPage");
+ }
+
+ // Nature A page should be visible
+ if(!MBSCustomPageManager.isPageVisible(natureAPageName))
+ {
+ fail("NatureAWizardPage should be visible");
+ }
+
+ // next page for this page should be the page for toolchain C
+ if(MBSCustomPageManager.getNextPage(natureAPageName) != MBSCustomPageManager.getPageData(toolchainCPageName).getWizardPage())
+ {
+ fail("NatureAWizardPage's next page should be ToolchainCWizardPage");
+ }
+
+ // Toolchain C page's previous page should be NatureAWizardPage
+ if(MBSCustomPageManager.getPreviousPage(toolchainCPageName) != MBSCustomPageManager.getPageData(natureAPageName).getWizardPage())
+ {
+ fail("ToolchainCWizardPage's previous page should be NatureAWizardPage");
+ }
+
+ // Toolchain C page should be visible
+ if(!MBSCustomPageManager.isPageVisible(toolchainCPageName))
+ {
+ fail("ToolchainCWizardPage should be visible");
+ }
+
+ // next page for this page should be the page for project type D
+ if(MBSCustomPageManager.getNextPage(toolchainCPageName) != MBSCustomPageManager.getPageData(projectTypeDPageName).getWizardPage())
+ {
+ fail("ToolchainCWizardPage's next page should be ProjectTypeDWizardPage");
+ }
+
+ // Project type D page's previous page should be the toolchain C page
+ if(MBSCustomPageManager.getPreviousPage(projectTypeDPageName) != MBSCustomPageManager.getPageData(toolchainCPageName).getWizardPage())
+ {
+ fail("ProjectTypeDWizardPage's previous page should be toolchainCPageName");
+ }
+
+ // Project type D page should be visible
+ if(!MBSCustomPageManager.isPageVisible(projectTypeDPageName))
+ {
+ fail("ProjectTypeDWizardPage should be visible");
+ }
+
+ // Project type D page's next page should be null
+ if(MBSCustomPageManager.getNextPage(projectTypeDPageName) != null)
+ {
+ fail("ProjectTypeDWizardPage should not have a next page.");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(natureBPageName))
+ {
+ fail("NatureBWizardPage should not be visible");
+ }
+
+ // the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(projectTypeEPageName))
+ {
+ fail("ProjectTypeEWizardPage should not be visible");
+ }
+
+// the rest of the pages should be invisible
+ if(MBSCustomPageManager.isPageVisible(toolchainFPageName))
+ {
+ fail("ToolchainFWizardPage should not be visible");
+ }
+ }
+
+
+ public TestCustomPageManager(String name)
+ {
+
+ super(name);
+ }
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite(TestCustomPageManager.class.getName());
+
+ suite.addTest(new TestCustomPageManager("testOneVisiblePage"));
+ suite.addTest(new TestCustomPageManager("testNatureA"));
+ suite.addTest(new TestCustomPageManager("testNatureB"));
+ suite.addTest(new TestCustomPageManager("testToolchainC"));
+ suite.addTest(new TestCustomPageManager("testProjectTypeD"));
+ suite.addTest(new TestCustomPageManager("testProjectTypeE"));
+ suite.addTest(new TestCustomPageManager("testToolchainF"));
+ suite.addTest(new TestCustomPageManager("testMultiplePages"));
+
+ return suite;
+ }
+
+}
diff --git a/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/suite/AllManagedBuildUITests.java b/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/suite/AllManagedBuildUITests.java
new file mode 100644
index 00000000000..7dbe26bd0ea
--- /dev/null
+++ b/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/suite/AllManagedBuildUITests.java
@@ -0,0 +1,38 @@
+/**********************************************************************
+ * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.cdt.managedbuilder.ui.tests.suite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.managedbuilder.ui.tests.TestCustomPageManager;
+
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ *
+ */
+public class AllManagedBuildUITests {
+ public static void main(String[] args) {
+ CCorePlugin.getDefault().getCoreModel().getIndexManager().reset();
+ junit.textui.TestRunner.run(AllManagedBuildUITests.suite());
+ }
+ public static Test suite() {
+ TestSuite suite = new TestSuite(
+ "Test for org.eclipse.cdt.managedbuilder.ui.tests");
+ //$JUnit-BEGIN$
+// TODO uncoment this
+ suite.addTest(TestCustomPageManager.suite());
+
+ //$JUnit-END$
+ return suite;
+ }
+}
diff --git a/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/testplugin/TestsPlugin.java b/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/testplugin/TestsPlugin.java
new file mode 100644
index 00000000000..b7db5905b13
--- /dev/null
+++ b/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/testplugin/TestsPlugin.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Texas Instruments Incorporated and others.
+ * 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:
+ * Texas Instruments - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.ui.tests.testplugin;
+
+import org.eclipse.ui.plugin.*;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.osgi.framework.BundleContext;
+import java.util.*;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class TestsPlugin extends AbstractUIPlugin {
+ //The shared instance.
+ private static TestsPlugin plugin;
+ //Resource bundle.
+ private ResourceBundle resourceBundle;
+
+ /**
+ * The constructor.
+ */
+ public TestsPlugin() {
+ super();
+ plugin = this;
+ }
+
+ /**
+ * This method is called upon plug-in activation
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /**
+ * This method is called when the plug-in is stopped
+ */
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+ plugin = null;
+ resourceBundle = null;
+ }
+
+ /**
+ * Returns the shared instance.
+ */
+ public static TestsPlugin getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Returns the string from the plugin's resource bundle,
+ * or 'key' if not found.
+ */
+ public static String getResourceString(String key) {
+ ResourceBundle bundle = TestsPlugin.getDefault().getResourceBundle();
+ try {
+ return (bundle != null) ? bundle.getString(key) : key;
+ } catch (MissingResourceException e) {
+ return key;
+ }
+ }
+
+ /**
+ * Returns the plugin's resource bundle,
+ */
+ public ResourceBundle getResourceBundle() {
+ try {
+ if (resourceBundle == null)
+ resourceBundle = ResourceBundle.getBundle("org.eclipse.cdt.managedbuilder.ui.tests.TestsPluginResources");
+ } catch (MissingResourceException x) {
+ resourceBundle = null;
+ }
+ return resourceBundle;
+ }
+
+ /**
+ * Returns an image descriptor for the image file at the given
+ * plug-in relative path.
+ *
+ * @param path the path
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getImageDescriptor(String path) {
+ return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.cdt.managedbuilder.ui.tests", path);
+ }
+}
diff --git a/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/util/TestToolchain.java b/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/util/TestToolchain.java
new file mode 100644
index 00000000000..e90ae037eac
--- /dev/null
+++ b/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/util/TestToolchain.java
@@ -0,0 +1,240 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Texas Instruments Incorporated and others.
+ * 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:
+ * Texas Instruments - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.ui.tests.util;
+
+import org.eclipse.cdt.managedbuilder.core.IBuilder;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IOutputType;
+import org.eclipse.cdt.managedbuilder.core.ITargetPlatform;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.IToolChain;
+import org.eclipse.cdt.managedbuilder.envvar.IConfigurationEnvironmentVariableSupplier;
+import org.eclipse.cdt.managedbuilder.macros.IConfigurationBuildMacroSupplier;
+
+public class TestToolchain implements IToolChain {
+
+ public IConfigurationBuildMacroSupplier getBuildMacroSupplier() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public IConfiguration getParent() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ITargetPlatform createTargetPlatform(ITargetPlatform superClass,
+ String Id, String name, boolean isExtensionElement) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ITargetPlatform getTargetPlatform() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void removeLocalTargetPlatform() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public String getVersionsSupported() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getConvertToId() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setVersionsSupported(String versionsSupported) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setConvertToId(String convertToId) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public IBuilder createBuilder(IBuilder superClass, String Id, String name,
+ boolean isExtensionElement) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void removeLocalBuilder() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public IBuilder getBuilder() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ITool createTool(ITool superClass, String Id, String name,
+ boolean isExtensionElement) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ITool[] getTools() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ITool getTool(String id) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public IToolChain getSuperClass() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean isAbstract() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void setIsAbstract(boolean b) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public String getUnusedChildren() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String[] getOSList() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setOSList(String[] OSs) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public String[] getArchList() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setArchList(String[] archs) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public String getErrorParserIds() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getErrorParserIds(IConfiguration config) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String[] getErrorParserList() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setErrorParserIds(String ids) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public String getScannerConfigDiscoveryProfileId() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setScannerConfigDiscoveryProfileId(String profileId) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public String getTargetToolIds() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setTargetToolIds(String targetToolIds) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public String[] getTargetToolList() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public IOutputType[] getSecondaryOutputs() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setSecondaryOutputs(String ids) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public boolean isDirty() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void setDirty(boolean isDirty) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public boolean isExtensionElement() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isSupported() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public IConfigurationEnvironmentVariableSupplier getEnvironmentVariableSupplier() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getId() {
+ return id;
+
+ }
+
+ public String getName() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ private String id = null;
+
+ public void setID(String id)
+ {
+ this.id = id;
+ }
+
+}
diff --git a/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/AlwaysPresentWizardPage.java b/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/AlwaysPresentWizardPage.java
new file mode 100644
index 00000000000..6f473b6f608
--- /dev/null
+++ b/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/AlwaysPresentWizardPage.java
@@ -0,0 +1,133 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Texas Instruments Incorporated and others.
+ * 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:
+ * Texas Instruments - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.ui.tests.wizardPages;
+
+import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPage;
+import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPageManager;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.SWT;
+
+public class AlwaysPresentWizardPage extends MBSCustomPage
+{
+
+ private Composite composite;
+
+ public AlwaysPresentWizardPage()
+ {
+ pageID = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.AlwaysPresentWizardPage";
+ }
+
+ public boolean canFlipToNextPage()
+ {
+
+ return (MBSCustomPageManager.getNextPage(pageID) != null);
+ }
+
+ public String getName()
+ {
+ return new String("Always Present Page");
+ }
+
+
+ public void createControl(Composite parent)
+ {
+
+ composite = new Composite(parent, SWT.NULL);
+ composite.setLayout(new GridLayout());
+ composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ Text pageText = new Text(composite, SWT.CENTER);
+ pageText.setBounds(composite.getBounds());
+ pageText.setText("always present");
+ pageText.setVisible(true);
+
+ }
+
+ public void dispose()
+ {
+ composite.dispose();
+
+ }
+
+ public Control getControl()
+ {
+ return composite;
+ }
+
+ public String getDescription()
+ {
+ return new String("My description");
+ }
+
+ public String getErrorMessage()
+ {
+ return new String("My error msg");
+ }
+
+ public Image getImage()
+ {
+ return wizard.getDefaultPageImage();
+ }
+
+ public String getMessage()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getTitle()
+ {
+ return new String("My Title");
+ }
+
+ public void performHelp()
+ {
+ // do nothing
+
+ }
+
+ public void setDescription(String description)
+ {
+ // do nothing
+
+ }
+
+ public void setImageDescriptor(ImageDescriptor image)
+ {
+ // do nothing
+
+ }
+
+ public void setTitle(String title)
+ {
+ // do nothing
+
+ }
+
+ public void setVisible(boolean visible)
+ {
+ composite.setVisible(visible);
+
+ }
+
+ protected boolean isCustomPageComplete()
+ {
+ return true;
+ }
+
+}
diff --git a/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/NatureAWizardPage.java b/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/NatureAWizardPage.java
new file mode 100644
index 00000000000..627adac4fed
--- /dev/null
+++ b/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/NatureAWizardPage.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Texas Instruments Incorporated and others.
+ * 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:
+ * Texas Instruments - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.ui.tests.wizardPages;
+
+import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPage;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.SWT;
+
+public class NatureAWizardPage extends MBSCustomPage
+{
+
+ private Composite composite;
+
+ public NatureAWizardPage()
+ {
+ pageID = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.NatureAWizardPage";
+ }
+
+ public String getName()
+ {
+ return new String("Nature A Wizard Page");
+ }
+
+ public void createControl(Composite parent)
+ {
+
+ composite = new Composite(parent, SWT.NULL);
+ composite.setLayout(new GridLayout());
+ composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ Text pageText = new Text(composite, SWT.CENTER);
+ pageText.setBounds(composite.getBounds());
+ pageText.setText("Nature A Wizard Page");
+ pageText.setVisible(true);
+
+ }
+
+ public void dispose()
+ {
+ composite.dispose();
+
+ }
+
+ public Control getControl()
+ {
+ return composite;
+ }
+
+ public String getDescription()
+ {
+ return new String("My description");
+ }
+
+ public String getErrorMessage()
+ {
+ return new String("My error msg");
+ }
+
+ public Image getImage()
+ {
+ return wizard.getDefaultPageImage();
+ }
+
+ public String getMessage()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getTitle()
+ {
+ return new String("My Title");
+ }
+
+ public void performHelp()
+ {
+ // do nothing
+
+ }
+
+ public void setDescription(String description)
+ {
+ // do nothing
+
+ }
+
+ public void setImageDescriptor(ImageDescriptor image)
+ {
+ // do nothing
+
+ }
+
+ public void setTitle(String title)
+ {
+ // do nothing
+
+ }
+
+ public void setVisible(boolean visible)
+ {
+ composite.setVisible(visible);
+
+ }
+
+ protected boolean isCustomPageComplete()
+ {
+ return true;
+ }
+
+}
diff --git a/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/NatureBWizardPage.java b/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/NatureBWizardPage.java
new file mode 100644
index 00000000000..614d0317b99
--- /dev/null
+++ b/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/NatureBWizardPage.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Texas Instruments Incorporated and others.
+ * 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:
+ * Texas Instruments - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.ui.tests.wizardPages;
+
+import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPage;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.SWT;
+
+public class NatureBWizardPage extends MBSCustomPage
+{
+
+ private Composite composite;
+
+ public NatureBWizardPage()
+ {
+ pageID = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.NatureBWizardPage";
+ }
+
+ public String getName()
+ {
+ return new String("Nature B Wizard Page");
+ }
+
+ public void createControl(Composite parent)
+ {
+
+ composite = new Composite(parent, SWT.NULL);
+ composite.setLayout(new GridLayout());
+ composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ Text pageText = new Text(composite, SWT.CENTER);
+ pageText.setBounds(composite.getBounds());
+ pageText.setText("Nature B Wizard Page");
+ pageText.setVisible(true);
+
+ }
+
+ public void dispose()
+ {
+ composite.dispose();
+
+ }
+
+ public Control getControl()
+ {
+ return composite;
+ }
+
+ public String getDescription()
+ {
+ return new String("My description");
+ }
+
+ public String getErrorMessage()
+ {
+ return new String("My error msg");
+ }
+
+ public Image getImage()
+ {
+ return wizard.getDefaultPageImage();
+ }
+
+ public String getMessage()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getTitle()
+ {
+ return new String("My Title");
+ }
+
+ public void performHelp()
+ {
+ // do nothing
+
+ }
+
+ public void setDescription(String description)
+ {
+ // do nothing
+
+ }
+
+ public void setImageDescriptor(ImageDescriptor image)
+ {
+ // do nothing
+
+ }
+
+ public void setTitle(String title)
+ {
+ // do nothing
+
+ }
+
+ public void setVisible(boolean visible)
+ {
+ composite.setVisible(visible);
+
+ }
+
+ protected boolean isCustomPageComplete()
+ {
+ return true;
+ }
+
+}
diff --git a/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ProjectTypeDWizardPage.java b/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ProjectTypeDWizardPage.java
new file mode 100644
index 00000000000..f1c69b5499e
--- /dev/null
+++ b/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ProjectTypeDWizardPage.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Texas Instruments Incorporated and others.
+ * 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:
+ * Texas Instruments - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.ui.tests.wizardPages;
+
+import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPage;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.SWT;
+
+public class ProjectTypeDWizardPage extends MBSCustomPage
+{
+
+ private Composite composite;
+
+ public ProjectTypeDWizardPage()
+ {
+ pageID = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ProjectTypeDWizardPage";
+ }
+
+ public String getName()
+ {
+ return new String("Project Type D WizardPage");
+ }
+
+ public void createControl(Composite parent)
+ {
+
+ composite = new Composite(parent, SWT.NULL);
+ composite.setLayout(new GridLayout());
+ composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ Text pageText = new Text(composite, SWT.CENTER);
+ pageText.setBounds(composite.getBounds());
+ pageText.setText("Project Type D WizardPage");
+ pageText.setVisible(true);
+
+ }
+
+ public void dispose()
+ {
+ composite.dispose();
+
+ }
+
+ public Control getControl()
+ {
+ return composite;
+ }
+
+ public String getDescription()
+ {
+ return new String("My description");
+ }
+
+ public String getErrorMessage()
+ {
+ return new String("My error msg");
+ }
+
+ public Image getImage()
+ {
+ return wizard.getDefaultPageImage();
+ }
+
+ public String getMessage()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getTitle()
+ {
+ return new String("My Title");
+ }
+
+ public void performHelp()
+ {
+ // do nothing
+
+ }
+
+ public void setDescription(String description)
+ {
+ // do nothing
+
+ }
+
+ public void setImageDescriptor(ImageDescriptor image)
+ {
+ // do nothing
+
+ }
+
+ public void setTitle(String title)
+ {
+ // do nothing
+
+ }
+
+ public void setVisible(boolean visible)
+ {
+ composite.setVisible(visible);
+
+ }
+
+ protected boolean isCustomPageComplete()
+ {
+ return true;
+ }
+
+}
diff --git a/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ProjectTypeEWizardPage.java b/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ProjectTypeEWizardPage.java
new file mode 100644
index 00000000000..3aa7be64888
--- /dev/null
+++ b/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ProjectTypeEWizardPage.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Texas Instruments Incorporated and others.
+ * 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:
+ * Texas Instruments - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.ui.tests.wizardPages;
+
+import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPage;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.SWT;
+
+public class ProjectTypeEWizardPage extends MBSCustomPage
+{
+
+ private Composite composite;
+
+ public ProjectTypeEWizardPage()
+ {
+ pageID = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ProjectTypeEWizardPage";
+ }
+
+ public String getName()
+ {
+ return new String("Project Type E WizardPage");
+ }
+
+ public void createControl(Composite parent)
+ {
+
+ composite = new Composite(parent, SWT.NULL);
+ composite.setLayout(new GridLayout());
+ composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ Text pageText = new Text(composite, SWT.CENTER);
+ pageText.setBounds(composite.getBounds());
+ pageText.setText("Project Type E WizardPage");
+ pageText.setVisible(true);
+
+ }
+
+ public void dispose()
+ {
+ composite.dispose();
+
+ }
+
+ public Control getControl()
+ {
+ return composite;
+ }
+
+ public String getDescription()
+ {
+ return new String("My description");
+ }
+
+ public String getErrorMessage()
+ {
+ return new String("My error msg");
+ }
+
+ public Image getImage()
+ {
+ return wizard.getDefaultPageImage();
+ }
+
+ public String getMessage()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getTitle()
+ {
+ return new String("My Title");
+ }
+
+ public void performHelp()
+ {
+ // do nothing
+
+ }
+
+ public void setDescription(String description)
+ {
+ // do nothing
+
+ }
+
+ public void setImageDescriptor(ImageDescriptor image)
+ {
+ // do nothing
+
+ }
+
+ public void setTitle(String title)
+ {
+ // do nothing
+
+ }
+
+ public void setVisible(boolean visible)
+ {
+ composite.setVisible(visible);
+
+ }
+
+ protected boolean isCustomPageComplete()
+ {
+ return true;
+ }
+
+}
diff --git a/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ToolchainCWizardPage.java b/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ToolchainCWizardPage.java
new file mode 100644
index 00000000000..efb45aac551
--- /dev/null
+++ b/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ToolchainCWizardPage.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Texas Instruments Incorporated and others.
+ * 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:
+ * Texas Instruments - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.ui.tests.wizardPages;
+
+import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPage;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.SWT;
+
+public class ToolchainCWizardPage extends MBSCustomPage
+{
+
+ private Composite composite;
+
+ public ToolchainCWizardPage()
+ {
+ pageID = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ToolchainCWizardPage";
+ }
+
+ public String getName()
+ {
+ return new String("Toolchain C Wizard Page");
+ }
+
+ public void createControl(Composite parent)
+ {
+
+ composite = new Composite(parent, SWT.NULL);
+ composite.setLayout(new GridLayout());
+ composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ Text pageText = new Text(composite, SWT.CENTER);
+ pageText.setBounds(composite.getBounds());
+ pageText.setText("Toolchain C Wizard Page");
+ pageText.setVisible(true);
+
+ }
+
+ public void dispose()
+ {
+ composite.dispose();
+
+ }
+
+ public Control getControl()
+ {
+ return composite;
+ }
+
+ public String getDescription()
+ {
+ return new String("My description");
+ }
+
+ public String getErrorMessage()
+ {
+ return new String("My error msg");
+ }
+
+ public Image getImage()
+ {
+ return wizard.getDefaultPageImage();
+ }
+
+ public String getMessage()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getTitle()
+ {
+ return new String("My Title");
+ }
+
+ public void performHelp()
+ {
+ // do nothing
+
+ }
+
+ public void setDescription(String description)
+ {
+ // do nothing
+
+ }
+
+ public void setImageDescriptor(ImageDescriptor image)
+ {
+ // do nothing
+
+ }
+
+ public void setTitle(String title)
+ {
+ // do nothing
+
+ }
+
+ public void setVisible(boolean visible)
+ {
+ composite.setVisible(visible);
+
+ }
+
+ protected boolean isCustomPageComplete()
+ {
+ return true;
+ }
+
+}
diff --git a/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ToolchainFWizardPage.java b/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ToolchainFWizardPage.java
new file mode 100644
index 00000000000..00ffc5455e6
--- /dev/null
+++ b/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ToolchainFWizardPage.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Texas Instruments Incorporated and others.
+ * 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:
+ * Texas Instruments - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.ui.tests.wizardPages;
+
+import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPage;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.SWT;
+
+public class ToolchainFWizardPage extends MBSCustomPage
+{
+
+ private Composite composite;
+
+ public ToolchainFWizardPage()
+ {
+ pageID = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ToolchainFWizardPage";
+ }
+
+ public String getName()
+ {
+ return new String("Toolchain F Wizard Page");
+ }
+
+ public void createControl(Composite parent)
+ {
+
+ composite = new Composite(parent, SWT.NULL);
+ composite.setLayout(new GridLayout());
+ composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ Text pageText = new Text(composite, SWT.CENTER);
+ pageText.setBounds(composite.getBounds());
+ pageText.setText("Toolchain F Wizard Page");
+ pageText.setVisible(true);
+
+ }
+
+ public void dispose()
+ {
+ composite.dispose();
+
+ }
+
+ public Control getControl()
+ {
+ return composite;
+ }
+
+ public String getDescription()
+ {
+ return new String("My description");
+ }
+
+ public String getErrorMessage()
+ {
+ return new String("My error msg");
+ }
+
+ public Image getImage()
+ {
+ return wizard.getDefaultPageImage();
+ }
+
+ public String getMessage()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getTitle()
+ {
+ return new String("My Title");
+ }
+
+ public void performHelp()
+ {
+ // do nothing
+
+ }
+
+ public void setDescription(String description)
+ {
+ // do nothing
+
+ }
+
+ public void setImageDescriptor(ImageDescriptor image)
+ {
+ // do nothing
+
+ }
+
+ public void setTitle(String title)
+ {
+ // do nothing
+
+ }
+
+ public void setVisible(boolean visible)
+ {
+ composite.setVisible(visible);
+
+ }
+
+ protected boolean isCustomPageComplete()
+ {
+ return true;
+ }
+
+}

Back to the top