[jbosstools-commits] JBoss Tools SVN: r22509 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Thu Jun 3 08:20:24 EDT 2010


Author: vyemialyanchyk
Date: 2010-06-03 08:20:23 -0400 (Thu, 03 Jun 2010)
New Revision: 22509

Modified:
   trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewConfigurationWizard.java
Log:
https://jira.jboss.org/browse/JBIDE-6142 - fixed

Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewConfigurationWizard.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewConfigurationWizard.java	2010-06-03 10:56:31 UTC (rev 22508)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewConfigurationWizard.java	2010-06-03 12:20:23 UTC (rev 22509)
@@ -22,17 +22,13 @@
 package org.hibernate.eclipse.console.wizards;
 
 import java.io.ByteArrayInputStream;
-import java.io.IOException;
 import java.io.InputStream;
 import java.io.StringWriter;
 import java.io.UnsupportedEncodingException;
-import java.lang.reflect.InvocationTargetException;
 import java.util.Properties;
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.wizard.IWizardPage;
@@ -92,7 +88,7 @@
 	 * Adding the page to the wizard.
 	 */
 	public void addPages() {
-        cPage = new ExtendedWizardNewFileCreationPage( "Ccfgxml", (IStructuredSelection) selection ) {
+        cPage = new ExtendedWizardNewFileCreationPage( "Ccfgxml", (IStructuredSelection) selection ) { //$NON-NLS-1$
         	protected InputStream getInitialContents() {
         		final Properties props = new Properties();
                 putIfNotNull(props, Environment.SESSION_FACTORY_NAME, connectionInfoPage.getSessionFactoryName() );
@@ -105,10 +101,11 @@
                 putIfNotNull(props, Environment.DEFAULT_SCHEMA, connectionInfoPage.getDefaultSchema() );
         		return openContentStream(props);
         	}
-        }; //$NON-NLS-1$
+        };
         cPage.setTitle( HibernateConsoleMessages.NewConfigurationWizard_create_hibernate_cfg_file );
         cPage.setDescription( HibernateConsoleMessages.NewConfigurationWizard_create_new_hibernate_cfg_xml );
         cPage.setFileName("hibernate.cfg.xml"); //$NON-NLS-1$
+        cPage.setFileExtension("cfg.xml"); //$NON-NLS-1$
         addPage( cPage );
 
 



More information about the jbosstools-commits mailing list