Search in sources :

Example 1 with EclipseConsoleConfigurationPreferences

use of org.hibernate.eclipse.console.EclipseConsoleConfigurationPreferences in project jbosstools-hibernate by jbosstools.

the class HibernateErrorsTest2 method setUp.

@Override
protected void setUp() throws Exception {
    this.project = createTestProject();
    waitForJobs();
    String prjName = getProject().getIProject().getName();
    EclipseConsoleConfigurationPreferences preferences = new EclipseConsoleConfigurationPreferences(prjName, ConfigurationMode.JPA, null, prjName, true, null, null, null, new IPath[0], new IPath[0], null, null, null, null);
    ccfg = KnownConfigurations.getInstance().addConfiguration(new EclipseConsoleConfiguration(preferences), false);
    assertTrue(ProjectUtils.toggleHibernateOnProject(getProject().getIProject(), true, prjName));
    ccfg.build();
    ccfg.buildSessionFactory();
}
Also used : EclipseConsoleConfigurationPreferences(org.hibernate.eclipse.console.EclipseConsoleConfigurationPreferences) EclipseConsoleConfiguration(org.hibernate.eclipse.console.EclipseConsoleConfiguration)

Example 2 with EclipseConsoleConfigurationPreferences

use of org.hibernate.eclipse.console.EclipseConsoleConfigurationPreferences in project jbosstools-hibernate by jbosstools.

the class GenerateInitWizardPage method createConsoleConfiguration.

private String createConsoleConfiguration() {
    ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
    String dialect = determineDialect();
    String ccName = launchManager.generateLaunchConfigurationName(HibernateConsoleMessages.AddConfigurationAction_hibernate);
    ConsoleConfigurationPreferences prefs = new EclipseConsoleConfigurationPreferences(ccName, ConfigurationMode.JPA, getHibernateVersion(), jpaProject.getName(), true, null, null, null, new IPath[0], new IPath[0], null, null, getConnectionProfileName(), dialect);
    ConsoleConfiguration cc = new ConsoleConfiguration(prefs);
    KnownConfigurations.getInstance().addConfiguration(cc, false);
    return ccName;
}
Also used : EclipseConsoleConfigurationPreferences(org.hibernate.eclipse.console.EclipseConsoleConfigurationPreferences) ConsoleConfiguration(org.hibernate.console.ConsoleConfiguration) ConsoleConfigurationPreferences(org.hibernate.console.preferences.ConsoleConfigurationPreferences) EclipseConsoleConfigurationPreferences(org.hibernate.eclipse.console.EclipseConsoleConfigurationPreferences) ILaunchManager(org.eclipse.debug.core.ILaunchManager)

Example 3 with EclipseConsoleConfigurationPreferences

use of org.hibernate.eclipse.console.EclipseConsoleConfigurationPreferences in project jbosstools-hibernate by jbosstools.

the class HQLQueryValidatorTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    String prjName = getProject().getIProject().getName();
    EclipseConsoleConfigurationPreferences preferences = new EclipseConsoleConfigurationPreferences(prjName, ConfigurationMode.JPA, "3.5", prjName, true, null, null, null, new IPath[0], new IPath[0], null, null, null, null);
    ccfg = KnownConfigurations.getInstance().addConfiguration(new EclipseConsoleConfiguration(preferences), false);
    assertTrue(ProjectUtils.toggleHibernateOnProject(getProject().getIProject(), true, prjName));
    ccfg.build();
    ccfg.buildSessionFactory();
}
Also used : EclipseConsoleConfigurationPreferences(org.hibernate.eclipse.console.EclipseConsoleConfigurationPreferences) EclipseConsoleConfiguration(org.hibernate.eclipse.console.EclipseConsoleConfiguration)

Aggregations

EclipseConsoleConfigurationPreferences (org.hibernate.eclipse.console.EclipseConsoleConfigurationPreferences)3 EclipseConsoleConfiguration (org.hibernate.eclipse.console.EclipseConsoleConfiguration)2 ILaunchManager (org.eclipse.debug.core.ILaunchManager)1 ConsoleConfiguration (org.hibernate.console.ConsoleConfiguration)1 ConsoleConfigurationPreferences (org.hibernate.console.preferences.ConsoleConfigurationPreferences)1