[jbosstools-commits] JBoss Tools SVN: r22547 - 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
Fri Jun 4 11:10:24 EDT 2010


Author: vyemialyanchyk
Date: 2010-06-04 11:10:24 -0400 (Fri, 04 Jun 2010)
New Revision: 22547

Modified:
   trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewConfigurationWizard.java
Log:
https://jira.jboss.org/browse/JBIDE-6419 - 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-04 14:49:45 UTC (rev 22546)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewConfigurationWizard.java	2010-06-04 15:10:24 UTC (rev 22547)
@@ -108,7 +108,7 @@
                 	setMessage(NLS.bind(HibernateConsoleMessages.NewConfigurationWizardPage_fileshould_pass_configuration,
                 			fileName), WARNING);
                 }
-        		IPath path = getContainerFullPath();
+        		IPath path = getContainerFullPath().append(getFileName());
         		IContainer container = ResourcesPlugin.getWorkspace().getRoot().getFolder(path);
         		
         		try {
@@ -259,13 +259,13 @@
 		throws CoreException {
 		// create a sample file
 		monitor.beginTask(HibernateConsoleMessages.NewConfigurationWizard_creating + file.getName(), 2);
+		InputStream stream = openContentStream(props);
+		if (file.exists() ) {
+            file.setContents(stream, true, true, monitor);
+		} else {
+			file.create(stream, true, monitor);
+		}
 		try {
-			InputStream stream = openContentStream(props);
-			if (file.exists() ) {
-                file.setContents(stream, true, true, monitor);
-			} else {
-				file.create(stream, true, monitor);
-			}
 			stream.close();
 		} catch (IOException e) {
 		}



More information about the jbosstools-commits mailing list