use of org.eclipse.reddeer.swt.impl.button.PushButton in project jbosstools-hibernate by jbosstools.
the class HibernateRedDeerTest method importMavenProject.
public static void importMavenProject(String prjName) {
try {
Path sourceFolder = new File("resources/prj/" + prjName).toPath();
File dir = new File("target/" + prjName);
if (dir.exists()) {
deleteDir(dir);
}
Path destFolder = dir.toPath();
Files.walkFileTree(sourceFolder, new SimpleFileVisitor<Path>() {
@Override
public FileVisitResult preVisitDirectory(final Path dir, final BasicFileAttributes attrs) throws IOException {
Files.createDirectories(destFolder.resolve(sourceFolder.relativize(dir)));
return FileVisitResult.CONTINUE;
}
@Override
public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs) throws IOException {
Files.copy(file, destFolder.resolve(sourceFolder.relativize(file)));
return FileVisitResult.CONTINUE;
}
});
MavenImportWizard wizard = new MavenImportWizard();
wizard.open();
wizard.getWizardPage().setRootDirectory("target/" + prjName);
wizard.getWizardPage().refresh();
wizard.getWizardPage().waitUntilProjectIsLoaded(TimePeriod.LONG);
Shell shell = new DefaultShell("Import Maven Projects");
new PushButton("Finish").click();
new WaitWhile(new ShellIsAvailable(shell), TimePeriod.DEFAULT);
new WaitUntil(new JobIsRunning(), TimePeriod.DEFAULT, false);
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
} catch (IOException e) {
fail("Unable to find pom " + prjName);
}
// TODO check error log for errors
}
use of org.eclipse.reddeer.swt.impl.button.PushButton in project jbosstools-hibernate by jbosstools.
the class TableFilterWizardPage method refreshDatabaseSchema.
/**
* Refreshes database schema
*/
public void refreshDatabaseSchema() {
new PushButton(referencedComposite, "Refresh").click();
DefaultGroup group = new DefaultGroup(referencedComposite, "Database schema:");
DefaultTree tree = new DefaultTree(group);
new WaitUntil(new TreeHasChildren(tree));
}
use of org.eclipse.reddeer.swt.impl.button.PushButton in project jbosstools-hibernate by jbosstools.
the class LaunchConfigurationsDialog method setRevengFile.
/**
* Select reveng file
* @param path path to existing reveng file
*/
public void setRevengFile(String... path) {
new PushButton(this, "Setup...").click();
org.eclipse.reddeer.swt.api.Shell setupShell = new DefaultShell("Setup reverse engineering");
new PushButton(setupShell, "Use existing...").click();
org.eclipse.reddeer.swt.api.Shell selectShell = new DefaultShell("Select reverse engineering settings file");
new DefaultTreeItem(new DefaultTree(selectShell), path).select();
new OkButton(selectShell).click();
new WaitWhile(new ShellIsAvailable(selectShell));
new WaitWhile(new ShellIsAvailable(setupShell));
}
use of org.eclipse.reddeer.swt.impl.button.PushButton in project jbosstools-hibernate by jbosstools.
the class LaunchConfigurationsDialog method apply.
/**
* Click apply
*/
public void apply() {
new PushButton(this, "Apply").click();
new WaitWhile(new JobIsRunning());
}
use of org.eclipse.reddeer.swt.impl.button.PushButton in project jbosstools-hibernate by jbosstools.
the class EditConfigurationShell method ok.
/**
* Click ok on Hibernate Configuration Console shell
*/
public void ok() {
new PushButton(this, "OK").click();
new WaitWhile(new ShellIsAvailable(this));
new WaitWhile(new JobIsRunning());
}
Aggregations