use of org.jboss.tools.hibernate.reddeer.console.EditConfigurationShell in project jbosstools-hibernate by jbosstools.
the class KnownConfigurationsView method addConfiguration.
/**
* Add configuration
*/
public EditConfigurationShell addConfiguration() {
open();
new ContextMenuItem("Add Configuration...").select();
return new EditConfigurationShell();
}
use of org.jboss.tools.hibernate.reddeer.console.EditConfigurationShell in project jbosstools-hibernate by jbosstools.
the class KnownConfigurationsView method openConsoleConfiguration.
/**
* Open console configuration
* @param name given console name
* @return shell of the console
*/
public EditConfigurationShell openConsoleConfiguration(String name) {
selectConsole(name);
String title = "Edit Configuration";
new ContextMenuItem(title).select();
return new EditConfigurationShell();
}
use of org.jboss.tools.hibernate.reddeer.console.EditConfigurationShell in project jbosstools-hibernate by jbosstools.
the class ConsoleConfigurationTest method prepareConsoleConfiguration.
public void prepareConsoleConfiguration(String hibernateVersion) {
KnownConfigurationsView v = new KnownConfigurationsView();
v.open();
EditConfigurationShell s = v.addConfiguration();
s.setName(CONSOLE_NAME);
EditConfigurationMainPage p = s.getMainPage();
p.setProject(prjName);
p.setDatabaseConnection(PredefinedConnection.HIBERNATE_CONFIGURED_CONNECTION);
p.setConfigurationFile("/" + prjName + "/" + HIBERNATE_CFG_FILE);
p.setHibernateVersion(hibernateVersion);
// ANY ERROR IN WIZARD ??
s.ok();
v.open();
EditConfigurationShell s2 = v.openConsoleConfiguration(CONSOLE_NAME);
s2.close();
v.open();
try {
v.selectNode(CONSOLE_NAME, "Database", "SAKILA.PUBLIC", "ACTOR");
} catch (WaitTimeoutExpiredException e) {
log.info("Wait timeout occured, try rebuilding console config");
v.selectConsole(CONSOLE_NAME);
new ContextMenuItem("Rebuild configuration").select();
new WaitWhile(new JobIsRunning());
v.selectNode(CONSOLE_NAME, "Database", "SAKILA.PUBLIC", "ACTOR");
}
}
use of org.jboss.tools.hibernate.reddeer.console.EditConfigurationShell in project jbosstools-hibernate by jbosstools.
the class CriteriaEditorCodeAssistTest method prepareMaven.
private void prepareMaven() {
prepareMvn(prj, hbVersion);
DatabaseConfiguration cfg = dbRequirement.getConfiguration();
ProjectConfigurationFactory.setProjectFacetForDB(prj, cfg, jpaVersion);
KnownConfigurationsView v = new KnownConfigurationsView();
v.open();
List<TreeItem> confs = v.getConsoleConfigurations();
if (confs != null) {
for (TreeItem i : confs) {
v.deleteConsoleConfiguration(i.getText());
}
}
EditConfigurationShell confShell = v.addConfiguration();
confShell.setName(prj);
EditConfigurationMainPage mainPage = confShell.getMainPage();
mainPage.setProject(prj);
mainPage.setType("JPA (jdk 1.5+)");
mainPage.setDatabaseConnection("[JPA Project Configured Connection]");
mainPage.setHibernateVersion(hbVersion);
confShell.ok();
}
use of org.jboss.tools.hibernate.reddeer.console.EditConfigurationShell in project jbosstools-hibernate by jbosstools.
the class CriteriaEditorTest method prepareMaven.
private void prepareMaven() {
prepareMvn(prj, hbVersion);
DatabaseConfiguration cfg = dbRequirement.getConfiguration();
ProjectConfigurationFactory.setProjectFacetForDB(prj, cfg, jpaVersion);
KnownConfigurationsView v = new KnownConfigurationsView();
v.open();
List<TreeItem> confs = v.getConsoleConfigurations();
if (confs != null) {
for (TreeItem i : confs) {
v.deleteConsoleConfiguration(i.getText());
}
}
EditConfigurationShell confShell = v.addConfiguration();
confShell.setName(prj);
EditConfigurationMainPage mainPage = confShell.getMainPage();
mainPage.setProject(prj);
mainPage.setType("JPA (jdk 1.5+)");
mainPage.setDatabaseConnection("[JPA Project Configured Connection]");
mainPage.setHibernateVersion(hbVersion);
confShell.ok();
}
Aggregations