Author: dgeraskov
Date: 2008-11-11 06:06:29 -0500 (Tue, 11 Nov 2008)
New Revision: 11662
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateInitWizardPage.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2740
dialect option added.
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateInitWizardPage.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateInitWizardPage.java 2008-11-11
11:06:25 UTC (rev 11661)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateInitWizardPage.java 2008-11-11
11:06:29 UTC (rev 11662)
@@ -251,38 +251,13 @@
private String createConsoleConfiguration(){
ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
-
String dialect = determineDialect();
- IPath propPath = null;
- if (dialect != null) {
- OutputStream out = null;
- try{
- String propName = HibernateConsoleMessages.AddConfigurationAction_hibernate +
".properties";
- propPath = HibernateJptUIPlugin.getDefault().getStateLocation().append(propName);
- File file = propPath.toFile();
- file.createNewFile();
- out = new FileOutputStream(file);
- Properties p = new Properties();
- p.setProperty(BasicHibernateProperties.HIBERNATE_DIALECT, determineDialect());
- p.store(out, null);
- } catch(IOException e){
-
- } finally {
- if (out != null){
- try {
- out.close();
- } catch (IOException e) {
- }
- }
- }
- }
-
String ccName =
launchManager.generateUniqueLaunchConfigurationNameFrom(HibernateConsoleMessages.AddConfigurationAction_hibernate);
ConsoleConfigurationPreferences prefs = new
EclipseConsoleConfigurationPreferences(ccName,
ConfigurationMode.JPA, jpaProject.getName(), true,
- null, null, propPath,
+ null, null, null,
new IPath[0], new IPath[0], null, null,
- getConnectionProfileName(), true);
+ getConnectionProfileName(), dialect);
ConsoleConfiguration cc = new ConsoleConfiguration(prefs);
KnownConfigurations.getInstance().addConfiguration(cc, false);