Search in sources :

Example 6 with DefaultEditor

use of org.eclipse.reddeer.workbench.impl.editor.DefaultEditor in project jbosstools-hibernate by jbosstools.

the class JPAEntityGenerationTest method testEntityGeneration.

private void testEntityGeneration(boolean useHibernateConsole) {
    prepare();
    DatabaseConfiguration cfg = dbRequirement.getConfiguration();
    EntityGenerationFactory.generateJPAEntities(cfg, prj, "org.gen", hbVersion, useHibernateConsole);
    PackageExplorerPart pe = new PackageExplorerPart();
    pe.open();
    try {
        new WaitUntil(new EntityIsGenerated(prj, "src/main/java", "org.gen", "Actor.java"));
        pe.getProject(prj).getProjectItem("src/main/java", "org.gen", "Actor.java").open();
    } catch (RedDeerException e) {
        e.printStackTrace();
        fail("Entities not generated, possible cause https://issues.jboss.org/browse/JBIDE-19175");
    }
    new DefaultEditor("Actor.java");
}
Also used : RedDeerException(org.eclipse.reddeer.common.exception.RedDeerException) EntityIsGenerated(org.jboss.tools.hibernate.reddeer.condition.EntityIsGenerated) DatabaseConfiguration(org.eclipse.reddeer.requirements.db.DatabaseConfiguration) PackageExplorerPart(org.eclipse.reddeer.eclipse.jdt.ui.packageview.PackageExplorerPart) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) DefaultEditor(org.eclipse.reddeer.workbench.impl.editor.DefaultEditor)

Example 7 with DefaultEditor

use of org.eclipse.reddeer.workbench.impl.editor.DefaultEditor in project jbosstools-hibernate by jbosstools.

the class ConsoleConfigurationFileTest method checkFile.

private void checkFile(boolean generateConsole) {
    PackageExplorerPart pe = new PackageExplorerPart();
    pe.open();
    pe.getProject(prjName).getProjectItem("src", HIBERNATE_CFG_FILE).open();
    new DefaultEditor(HIBERNATE_CFG_FILE);
    if (generateConsole) {
        KnownConfigurationsView v = new KnownConfigurationsView();
        v.selectConsole(prjName);
    }
}
Also used : KnownConfigurationsView(org.jboss.tools.hibernate.reddeer.console.views.KnownConfigurationsView) PackageExplorerPart(org.eclipse.reddeer.eclipse.jdt.ui.packageview.PackageExplorerPart) DefaultEditor(org.eclipse.reddeer.workbench.impl.editor.DefaultEditor)

Aggregations

DefaultEditor (org.eclipse.reddeer.workbench.impl.editor.DefaultEditor)7 PackageExplorerPart (org.eclipse.reddeer.eclipse.jdt.ui.packageview.PackageExplorerPart)4 RedDeerException (org.eclipse.reddeer.common.exception.RedDeerException)3 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)2 ProjectExplorer (org.eclipse.reddeer.eclipse.ui.navigator.resources.ProjectExplorer)2 DatabaseConfiguration (org.eclipse.reddeer.requirements.db.DatabaseConfiguration)2 EntityIsGenerated (org.jboss.tools.hibernate.reddeer.condition.EntityIsGenerated)2 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)1 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)1 AutoBuildingRequirement (org.eclipse.reddeer.requirements.autobuilding.AutoBuildingRequirement)1 AutoBuilding (org.eclipse.reddeer.requirements.autobuilding.AutoBuildingRequirement.AutoBuilding)1 ShellMenuItem (org.eclipse.reddeer.swt.impl.menu.ShellMenuItem)1 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)1 KnownConfigurationsView (org.jboss.tools.hibernate.reddeer.console.views.KnownConfigurationsView)1 NewConfigurationFirstPage (org.jboss.tools.hibernate.reddeer.console.wizards.NewConfigurationFirstPage)1 NewConfigurationWizard (org.jboss.tools.hibernate.reddeer.console.wizards.NewConfigurationWizard)1 NewConfigurationWizardPage (org.jboss.tools.hibernate.reddeer.console.wizards.NewConfigurationWizardPage)1 NewReverseEngineeringFileWizard (org.jboss.tools.hibernate.reddeer.console.wizards.NewReverseEngineeringFileWizard)1 TableFilterWizardPage (org.jboss.tools.hibernate.reddeer.console.wizards.TableFilterWizardPage)1 ReverseEngineeringEditor (org.jboss.tools.hibernate.reddeer.mapper.editors.ReverseEngineeringEditor)1