Author: ljelinko
Date: 2011-11-21 08:07:04 -0500 (Mon, 21 Nov 2011)
New Revision: 36482
Added:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/wizard/web/jboss/PortletCreationTask.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/wizard/web/jboss/PortletWizardPageFillingTask.java
Log:
created
Added:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/wizard/web/jboss/PortletCreationTask.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/wizard/web/jboss/PortletCreationTask.java
(rev 0)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/wizard/web/jboss/PortletCreationTask.java 2011-11-21
13:07:04 UTC (rev 36482)
@@ -0,0 +1,47 @@
+package org.jboss.tools.portlet.ui.bot.test.task.wizard.web.jboss;
+
+import org.jboss.tools.portlet.ui.bot.test.task.wizard.WizardFillingTask;
+import org.jboss.tools.portlet.ui.bot.test.task.wizard.WizardOpeningTask;
+
+/**
+ * Creates a new portlet using a JBoss wizard.
+ *
+ * @author Lucia Jelinkova
+ *
+ */
+public class PortletCreationTask extends WizardFillingTask {
+
+ private PortletWizardPageFillingTask firstPage;
+
+ public PortletCreationTask() {
+ super();
+ firstPage = new PortletWizardPageFillingTask();
+ addWizardPage(firstPage);
+ }
+
+ @Override
+ public void perform() {
+ performInnerTask(new WizardOpeningTask("Java Portlet", "JBoss Tools
Web/Portlet"));
+ super.perform();
+ }
+
+ public void setProject(String project) {
+ firstPage.setProject(project);
+ }
+
+ public void setSourceFolder(String sourceFolder) {
+ firstPage.setSourceFolder(sourceFolder);
+ }
+
+ public void setPackageName(String packageName) {
+ firstPage.setPackageName(packageName);
+ }
+
+ public void setClassName(String className) {
+ firstPage.setClassName(className);
+ }
+
+ public void setSuperclass(String superclass) {
+ firstPage.setSuperclass(superclass);
+ }
+}
Added:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/wizard/web/jboss/PortletWizardPageFillingTask.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/wizard/web/jboss/PortletWizardPageFillingTask.java
(rev 0)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/wizard/web/jboss/PortletWizardPageFillingTask.java 2011-11-21
13:07:04 UTC (rev 36482)
@@ -0,0 +1,60 @@
+package org.jboss.tools.portlet.ui.bot.test.task.wizard.web.jboss;
+
+import org.jboss.tools.portlet.ui.bot.test.task.AbstractSWTTask;
+import org.jboss.tools.portlet.ui.bot.test.task.wizard.WizardPageFillingTask;
+
+public class PortletWizardPageFillingTask extends AbstractSWTTask implements
WizardPageFillingTask {
+
+ private String project;
+
+ private String sourceFolder;
+
+ private String packageName;
+
+ private String className;
+
+ private String superclass;
+
+ @Override
+ public void perform() {
+ if (project != null){
+ getBot().comboBoxWithLabel("Project:").setSelection(project);
+ }
+
+ if (sourceFolder != null){
+ getBot().textWithLabel("Source folder:").setText(sourceFolder);
+ }
+
+ if (packageName != null){
+ getBot().textWithLabel("Java package:").setText(packageName);
+ }
+
+ if (className != null){
+ getBot().textWithLabel("Class name:").setText(className);
+ }
+
+ if (superclass != null){
+ getBot().textWithLabel("Superclass:").setText(superclass);
+ }
+ }
+
+ public void setProject(String project) {
+ this.project = project;
+ }
+
+ public void setSourceFolder(String sourceFolder) {
+ this.sourceFolder = sourceFolder;
+ }
+
+ public void setPackageName(String packageName) {
+ this.packageName = packageName;
+ }
+
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+ public void setSuperclass(String superclass) {
+ this.superclass = superclass;
+ }
+}
Show replies by date