diff --git a/plugins/org.eclipse.reddeer.eclipse/src/org/eclipse/reddeer/eclipse/jdt/ui/wizards/CanImplement.java b/plugins/org.eclipse.reddeer.eclipse/src/org/eclipse/reddeer/eclipse/jdt/ui/wizards/CanImplement.java index e2e8f140cc..08b5d3d7a9 100644 --- a/plugins/org.eclipse.reddeer.eclipse/src/org/eclipse/reddeer/eclipse/jdt/ui/wizards/CanImplement.java +++ b/plugins/org.eclipse.reddeer.eclipse/src/org/eclipse/reddeer/eclipse/jdt/ui/wizards/CanImplement.java @@ -18,6 +18,7 @@ import org.eclipse.reddeer.common.matcher.RegexMatcher; import org.eclipse.reddeer.common.wait.TimePeriod; import org.eclipse.reddeer.common.wait.WaitUntil; +import org.eclipse.reddeer.common.wait.WaitWhile; import org.eclipse.reddeer.core.matcher.WithTextMatcher; import org.eclipse.reddeer.swt.api.TableItem; import org.eclipse.reddeer.swt.condition.TableHasRows; @@ -44,6 +45,7 @@ public default void addExtendedInterface(String interfaceName) { new DefaultShell(new WithTextMatcher(new RegexMatcher("[Extended|Implemented].*Interfaces Selection"))); new DefaultText(0).setText(interfaceName); new WaitUntil(new JobIsRunning(), TimePeriod.MEDIUM, false); + new WaitWhile(new JobIsRunning(), TimePeriod.MEDIUM, false); new WaitUntil(new TableHasRows(new DefaultTable(0)), TimePeriod.DEFAULT, false); switch (new DefaultTable(0).getItems().size()) { diff --git a/plugins/org.eclipse.reddeer.eclipse/src/org/eclipse/reddeer/eclipse/jdt/ui/wizards/NewClassWizardPage.java b/plugins/org.eclipse.reddeer.eclipse/src/org/eclipse/reddeer/eclipse/jdt/ui/wizards/NewClassWizardPage.java index abfa58bc78..93833aadd2 100644 --- a/plugins/org.eclipse.reddeer.eclipse/src/org/eclipse/reddeer/eclipse/jdt/ui/wizards/NewClassWizardPage.java +++ b/plugins/org.eclipse.reddeer.eclipse/src/org/eclipse/reddeer/eclipse/jdt/ui/wizards/NewClassWizardPage.java @@ -13,6 +13,7 @@ import org.eclipse.reddeer.core.reference.ReferencedComposite; import org.eclipse.reddeer.swt.impl.button.CheckBox; +import org.eclipse.reddeer.swt.impl.button.LabeledCheckBox; import org.eclipse.reddeer.swt.impl.text.LabeledText; /** diff --git a/plugins/org.eclipse.reddeer.eclipse/src/org/eclipse/reddeer/eclipse/jdt/ui/wizards/NewJavaProjectWizardPageOne.java b/plugins/org.eclipse.reddeer.eclipse/src/org/eclipse/reddeer/eclipse/jdt/ui/wizards/NewJavaProjectWizardPageOne.java index f85f238e21..c8ec5e50ba 100644 --- a/plugins/org.eclipse.reddeer.eclipse/src/org/eclipse/reddeer/eclipse/jdt/ui/wizards/NewJavaProjectWizardPageOne.java +++ b/plugins/org.eclipse.reddeer.eclipse/src/org/eclipse/reddeer/eclipse/jdt/ui/wizards/NewJavaProjectWizardPageOne.java @@ -111,5 +111,18 @@ public NewJavaProjectWizardPageOne createModuleInfoFile(boolean check) { box.toggle(check); return this; } + + /** + * Sets module name + * @param String name + * sets default module name labeled text input. + * @return + */ + public NewJavaProjectWizardPageOne setModuleInfoFileName(String name) { + LabeledText moduleInput = new LabeledText(this, "Module name:"); + log.debug("Setting 'Module name:' to " + name); + moduleInput.setText(name); + return this; + } } diff --git a/tests/org.eclipse.reddeer.eclipse.test/src/org/eclipse/reddeer/eclipse/test/jdt/ui/junit/JUnitRunTest.java b/tests/org.eclipse.reddeer.eclipse.test/src/org/eclipse/reddeer/eclipse/test/jdt/ui/junit/JUnitRunTest.java index 174c9bb6b3..37c069288c 100644 --- a/tests/org.eclipse.reddeer.eclipse.test/src/org/eclipse/reddeer/eclipse/test/jdt/ui/junit/JUnitRunTest.java +++ b/tests/org.eclipse.reddeer.eclipse.test/src/org/eclipse/reddeer/eclipse/test/jdt/ui/junit/JUnitRunTest.java @@ -52,7 +52,9 @@ public class JUnitRunTest { public static void createTestProject() { JavaProjectWizard projectWizard = new JavaProjectWizard(); projectWizard.open(); - new NewJavaProjectWizardPageOne(projectWizard).setProjectName(PROJECT_NAME); + NewJavaProjectWizardPageOne page = new NewJavaProjectWizardPageOne(projectWizard); + page.setProjectName(PROJECT_NAME); + page.createModuleInfoFile(false); projectWizard.finish(); NewClassCreationWizard classWizard = new NewClassCreationWizard(); diff --git a/tests/org.eclipse.reddeer.eclipse.test/src/org/eclipse/reddeer/eclipse/test/jdt/ui/wizards/JavaProjectWizardTest.java b/tests/org.eclipse.reddeer.eclipse.test/src/org/eclipse/reddeer/eclipse/test/jdt/ui/wizards/JavaProjectWizardTest.java index bbd4df3118..13bb20b201 100644 --- a/tests/org.eclipse.reddeer.eclipse.test/src/org/eclipse/reddeer/eclipse/test/jdt/ui/wizards/JavaProjectWizardTest.java +++ b/tests/org.eclipse.reddeer.eclipse.test/src/org/eclipse/reddeer/eclipse/test/jdt/ui/wizards/JavaProjectWizardTest.java @@ -111,6 +111,7 @@ public void testJavaProjectWizardCreateInfoModule() { new WaitUntil(new JobIsRunning(), TimePeriod.MEDIUM, false); new WaitWhile(new JobIsRunning(), TimePeriod.MEDIUM, false); pageOne.createModuleInfoFile(true); + pageOne.setModuleInfoFileName(JAVA_MODULE_NAME); dialog.finish(true, JAVA_MODULE_NAME); @@ -137,7 +138,7 @@ public void testJavaProjectWizardCreateInfoModuleDefaultName() { explorer.open(); assertTrue(explorer.containsProject(JAVA_PROJECT)); - assertTrue(!explorer.getProject(JAVA_PROJECT).containsResource("src", JAVA_MODULE_INFO, JAVA_PROJECT)); + assertTrue(explorer.getProject(JAVA_PROJECT).containsResource("src", JAVA_MODULE_INFO, JAVA_PROJECT)); } @Test diff --git a/tests/org.eclipse.reddeer.eclipse.test/src/org/eclipse/reddeer/eclipse/test/ui/problems/ProblemsViewTest.java b/tests/org.eclipse.reddeer.eclipse.test/src/org/eclipse/reddeer/eclipse/test/ui/problems/ProblemsViewTest.java index 2213421f5b..dfac4a0cd1 100644 --- a/tests/org.eclipse.reddeer.eclipse.test/src/org/eclipse/reddeer/eclipse/test/ui/problems/ProblemsViewTest.java +++ b/tests/org.eclipse.reddeer.eclipse.test/src/org/eclipse/reddeer/eclipse/test/ui/problems/ProblemsViewTest.java @@ -108,6 +108,7 @@ public void setUp() { dialog.open(); NewJavaProjectWizardPageOne page1 = new NewJavaProjectWizardPageOne(dialog); page1.setProjectName(PROJECT_NAME); + page1.createModuleInfoFile(false); dialog.finish(TimePeriod.LONG, false, null); new WaitUntil(new ProjectExists(PROJECT_NAME), TimePeriod.DEFAULT, false); }