Search in sources :

Example 1 with LaunchConfigurationsDialog

use of org.jboss.tools.hibernate.reddeer.dialog.LaunchConfigurationsDialog in project jbosstools-hibernate by jbosstools.

the class CodeGenerationKeyWordsTest method createAndRunHibernateGenerationConfiguration.

private void createAndRunHibernateGenerationConfiguration(boolean reveng, String src) {
    if (reveng) {
        createRevengFile();
    }
    LaunchConfigurationsDialog dlg = new LaunchConfigurationsDialog();
    dlg.open();
    dlg.createNewConfiguration();
    dlg.selectConfiguration(prj);
    dlg.setOutputDir("/" + prj + "/" + src);
    dlg.setPackage("org.gen");
    dlg.setReverseFromJDBC(true);
    if (reveng)
        dlg.setRevengFile(prj, "hibernate.reveng.xml");
    new DefaultShell(LaunchConfigurationsDialog.DIALOG_TITLE).setFocus();
    dlg.selectExporter(0);
    dlg.selectExporter(1);
    dlg.apply();
    dlg.run();
}
Also used : DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) LaunchConfigurationsDialog(org.jboss.tools.hibernate.reddeer.dialog.LaunchConfigurationsDialog)

Example 2 with LaunchConfigurationsDialog

use of org.jboss.tools.hibernate.reddeer.dialog.LaunchConfigurationsDialog in project jbosstools-hibernate by jbosstools.

the class CodeGenerationConfigurationTest method createHibernateGenerationConfiguration.

private void createHibernateGenerationConfiguration(boolean reveng, String src) {
    if (reveng) {
        createRevengFile();
    }
    LaunchConfigurationsDialog dlg = new LaunchConfigurationsDialog();
    dlg.open();
    dlg.createNewConfiguration();
    dlg.selectConfiguration(prj);
    dlg.setOutputDir("/" + prj + "/" + src);
    dlg.setPackage("org.gen");
    dlg.setReverseFromJDBC(true);
    if (reveng)
        dlg.setRevengFile(prj, "hibernate.reveng.xml");
    new DefaultShell(LaunchConfigurationsDialog.DIALOG_TITLE);
    dlg.selectExporter(0);
    dlg.selectExporter(1);
    dlg.apply();
    dlg.run();
    checkGeneratedEntities(src);
}
Also used : DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) LaunchConfigurationsDialog(org.jboss.tools.hibernate.reddeer.dialog.LaunchConfigurationsDialog)

Example 3 with LaunchConfigurationsDialog

use of org.jboss.tools.hibernate.reddeer.dialog.LaunchConfigurationsDialog in project jbosstools-hibernate by jbosstools.

the class AntFileExportTest method testAntFilenameExport.

@Test
public void testAntFilenameExport() {
    HibernatePerspective p = new HibernatePerspective();
    p.open();
    LaunchConfigurationsDialog launchDialog = new LaunchConfigurationsDialog();
    launchDialog.open();
    launchDialog.selectHibernateCodeGeneration(GEN_NAME);
    launchDialog.selectConfiguration(PRJ);
    launchDialog.apply();
    launchDialog.close();
    PackageExplorerPart pe = new PackageExplorerPart();
    pe.open();
    pe.selectProjects(PRJ);
    ExportAntCodeGenWizard w = new ExportAntCodeGenWizard();
    w.open();
    ExportAntCodeGenWizardPage page = new ExportAntCodeGenWizardPage(w);
    page.setHibernateGenConfiguration(GEN_NAME);
    page.setAntFileName(ANTFILE_NAME);
    w.finish();
    pe.open();
    pe.getProject(PRJ).getProjectItem(ANTFILE_NAME).open();
    assertTrue("Ant file cannot be ampty", new TextEditor(ANTFILE_NAME).getText().length() > 0);
}
Also used : ExportAntCodeGenWizardPage(org.jboss.tools.hibernate.reddeer.codegen.ExportAntCodeGenWizardPage) TextEditor(org.eclipse.reddeer.workbench.impl.editor.TextEditor) HibernatePerspective(org.jboss.tools.hibernate.reddeer.perspective.HibernatePerspective) ExportAntCodeGenWizard(org.jboss.tools.hibernate.reddeer.codegen.ExportAntCodeGenWizard) PackageExplorerPart(org.eclipse.reddeer.eclipse.jdt.ui.packageview.PackageExplorerPart) LaunchConfigurationsDialog(org.jboss.tools.hibernate.reddeer.dialog.LaunchConfigurationsDialog) Test(org.junit.Test)

Aggregations

LaunchConfigurationsDialog (org.jboss.tools.hibernate.reddeer.dialog.LaunchConfigurationsDialog)3 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)2 PackageExplorerPart (org.eclipse.reddeer.eclipse.jdt.ui.packageview.PackageExplorerPart)1 TextEditor (org.eclipse.reddeer.workbench.impl.editor.TextEditor)1 ExportAntCodeGenWizard (org.jboss.tools.hibernate.reddeer.codegen.ExportAntCodeGenWizard)1 ExportAntCodeGenWizardPage (org.jboss.tools.hibernate.reddeer.codegen.ExportAntCodeGenWizardPage)1 HibernatePerspective (org.jboss.tools.hibernate.reddeer.perspective.HibernatePerspective)1 Test (org.junit.Test)1