Author: ljelinko
Date: 2011-11-21 08:08:49 -0500 (Mon, 21 Nov 2011)
New Revision: 36486
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/CompositeSWTTask.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/wizard/WizardFillingTask.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/wizard/web/DynamicWebProjectCreationTask.java
Log:
refactored setting of inner tasks
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/CompositeSWTTask.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/CompositeSWTTask.java 2011-11-21
13:08:26 UTC (rev 36485)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/CompositeSWTTask.java 2011-11-21
13:08:49 UTC (rev 36486)
@@ -36,8 +36,8 @@
// hook up method
}
- public void addTask(T task){
- tasks.add(task);
+ public void setTasks(List<T> tasks) {
+ this.tasks = tasks;
}
public List<T> getTasks() {
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/wizard/WizardFillingTask.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/wizard/WizardFillingTask.java 2011-11-21
13:08:26 UTC (rev 36485)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/wizard/WizardFillingTask.java 2011-11-21
13:08:49 UTC (rev 36486)
@@ -1,5 +1,8 @@
package org.jboss.tools.portlet.ui.bot.test.task.wizard;
+import java.util.ArrayList;
+import java.util.List;
+
import org.jboss.tools.portlet.ui.bot.test.task.CompositeSWTTask;
/**
@@ -12,12 +15,24 @@
*/
public class WizardFillingTask extends CompositeSWTTask<WizardPageFillingTask>{
+ private List<WizardPageFillingTask> wizardPages;
+
+ public WizardFillingTask() {
+ super();
+ wizardPages = new ArrayList<WizardPageFillingTask>();
+ }
+
@Override
public void perform() {
+ super.setTasks(wizardPages);
super.perform();
getBot().button("Finish").click();
}
+ public void addWizardPage(WizardPageFillingTask task){
+ wizardPages.add(task);
+ }
+
@Override
protected void beforeTask(WizardPageFillingTask task) {
if (!isFirst(task)){
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/wizard/web/DynamicWebProjectCreationTask.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/wizard/web/DynamicWebProjectCreationTask.java 2011-11-21
13:08:26 UTC (rev 36485)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/wizard/web/DynamicWebProjectCreationTask.java 2011-11-21
13:08:49 UTC (rev 36486)
@@ -4,7 +4,6 @@
import org.jboss.tools.portlet.ui.bot.test.task.facet.FacetsSelectionTask;
import org.jboss.tools.portlet.ui.bot.test.task.wizard.WizardFillingTask;
import org.jboss.tools.portlet.ui.bot.test.task.wizard.WizardOpeningTask;
-import org.jboss.tools.portlet.ui.bot.test.task.wizard.WizardPageFillingTask;
/**
* Creates a new dynamic web project using the wizard.
@@ -16,26 +15,19 @@
private DynamicWebProjectWizardPageFillingTask firstPage;
- private WizardFillingTask wizardFillingTask;
-
public DynamicWebProjectCreationTask() {
super();
firstPage = new DynamicWebProjectWizardPageFillingTask();
- wizardFillingTask = new WizardFillingTask();
- wizardFillingTask.addTask(firstPage);
+ addWizardPage(firstPage);
}
@Override
public void perform() {
performInnerTask(new WizardOpeningTask("Dynamic Web Project",
"Web"));
- performInnerTask(wizardFillingTask);
+ super.perform();
performInnerTask(new AssociatedPerspectiveDialogClosingTask(false));
}
- public void addWizardPage(WizardPageFillingTask page){
- wizardFillingTask.addTask(page);
- }
-
public void setProjectName(String projectName) {
firstPage.setProjectName(projectName);
}
Show replies by date