Search in sources :

Example 1 with ReverseEngineeringEditor

use of org.jboss.tools.hibernate.reddeer.mapper.editors.ReverseEngineeringEditor in project jbosstools-hibernate by jbosstools.

the class CodeGenerationConfigurationTest method createRevengFile.

private void createRevengFile() {
    ProjectExplorer pe = new ProjectExplorer();
    pe.open();
    pe.selectProjects(prj);
    NewReverseEngineeringFileWizard wizard = new NewReverseEngineeringFileWizard();
    wizard.open();
    wizard.next();
    TableFilterWizardPage page = new TableFilterWizardPage(wizard);
    page.setConsoleConfiguration(prj);
    page.refreshDatabaseSchema();
    page.pressInclude();
    wizard.finish();
    EditorHandler.getInstance().closeAll(false);
    pe.open();
    pe.getProject(prj).getProjectItem("hibernate.reveng.xml").open();
    new DefaultEditor("Hibernate Reverse Engineering Editor").activate();
    ReverseEngineeringEditor re = new ReverseEngineeringEditor();
    re.activateDesignTab();
    re.activateOverviewTab();
    re.activateTableFiltersTab();
    re.activateTypeMappingsTab();
    re.activateTableAndColumnsTab();
    try {
        re.selectAllTables("SAKILA.PUBLIC");
    } catch (WaitTimeoutExpiredException e) {
        fail("Cannot add tables - known issue(s) - JBIDE-19443");
    }
    re.activateSourceTab();
    re.save();
}
Also used : ProjectExplorer(org.eclipse.reddeer.eclipse.ui.navigator.resources.ProjectExplorer) WaitTimeoutExpiredException(org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException) ReverseEngineeringEditor(org.jboss.tools.hibernate.reddeer.mapper.editors.ReverseEngineeringEditor) NewReverseEngineeringFileWizard(org.jboss.tools.hibernate.reddeer.console.wizards.NewReverseEngineeringFileWizard) TableFilterWizardPage(org.jboss.tools.hibernate.reddeer.console.wizards.TableFilterWizardPage) DefaultEditor(org.eclipse.reddeer.workbench.impl.editor.DefaultEditor)

Example 2 with ReverseEngineeringEditor

use of org.jboss.tools.hibernate.reddeer.mapper.editors.ReverseEngineeringEditor in project jbosstools-hibernate by jbosstools.

the class CodeGenerationKeyWordsTest method createRevengFile.

private void createRevengFile() {
    ProjectExplorer pe = new ProjectExplorer();
    pe.open();
    pe.selectProjects(prj);
    NewReverseEngineeringFileWizard wizard = new NewReverseEngineeringFileWizard();
    wizard.open();
    wizard.next();
    TableFilterWizardPage page = new TableFilterWizardPage(wizard);
    page.setConsoleConfiguration(prj);
    page.refreshDatabaseSchema();
    page.pressInclude();
    wizard.finish();
    ReverseEngineeringEditor re = new ReverseEngineeringEditor();
    re.activateSourceTab();
    DefaultStyledText ds = new DefaultStyledText();
    ds.selectPosition(ds.getPositionOfText("</hibernate-reverse-engineering>"));
    ds.insertText("<table catalog=\"SAKILA\" schema=\"PUBLIC\" name=\"ACTOR\">" + "<column name=\"FIRST_NAME\" property=\"implements\" type=\"string\" /></table>");
    re.save();
}
Also used : ProjectExplorer(org.eclipse.reddeer.eclipse.ui.navigator.resources.ProjectExplorer) DefaultStyledText(org.eclipse.reddeer.swt.impl.styledtext.DefaultStyledText) ReverseEngineeringEditor(org.jboss.tools.hibernate.reddeer.mapper.editors.ReverseEngineeringEditor) NewReverseEngineeringFileWizard(org.jboss.tools.hibernate.reddeer.console.wizards.NewReverseEngineeringFileWizard) TableFilterWizardPage(org.jboss.tools.hibernate.reddeer.console.wizards.TableFilterWizardPage)

Example 3 with ReverseEngineeringEditor

use of org.jboss.tools.hibernate.reddeer.mapper.editors.ReverseEngineeringEditor in project jbosstools-hibernate by jbosstools.

the class RevengFileTest method testCreateRevengFile.

@Test
public void testCreateRevengFile() {
    ProjectExplorer pe = new ProjectExplorer();
    pe.open();
    pe.selectProjects(PROJECT_NAME);
    NewReverseEngineeringFileWizard wizard = new NewReverseEngineeringFileWizard();
    wizard.open();
    wizard.next();
    TableFilterWizardPage page = new TableFilterWizardPage(wizard);
    page.setConsoleConfiguration(PROJECT_NAME);
    page.refreshDatabaseSchema();
    page.pressInclude();
    wizard.finish();
    ReverseEngineeringEditor re = new ReverseEngineeringEditor();
    re.activateDesignTab();
    re.activateOverviewTab();
    re.activateSourceTab();
    re.activateTableFiltersTab();
    re.activateTypeMappingsTab();
}
Also used : ProjectExplorer(org.eclipse.reddeer.eclipse.ui.navigator.resources.ProjectExplorer) ReverseEngineeringEditor(org.jboss.tools.hibernate.reddeer.mapper.editors.ReverseEngineeringEditor) NewReverseEngineeringFileWizard(org.jboss.tools.hibernate.reddeer.console.wizards.NewReverseEngineeringFileWizard) TableFilterWizardPage(org.jboss.tools.hibernate.reddeer.console.wizards.TableFilterWizardPage) Test(org.junit.Test)

Aggregations

ProjectExplorer (org.eclipse.reddeer.eclipse.ui.navigator.resources.ProjectExplorer)3 NewReverseEngineeringFileWizard (org.jboss.tools.hibernate.reddeer.console.wizards.NewReverseEngineeringFileWizard)3 TableFilterWizardPage (org.jboss.tools.hibernate.reddeer.console.wizards.TableFilterWizardPage)3 ReverseEngineeringEditor (org.jboss.tools.hibernate.reddeer.mapper.editors.ReverseEngineeringEditor)3 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)1 DefaultStyledText (org.eclipse.reddeer.swt.impl.styledtext.DefaultStyledText)1 DefaultEditor (org.eclipse.reddeer.workbench.impl.editor.DefaultEditor)1 Test (org.junit.Test)1