[jbosstools-commits] JBoss Tools SVN: r6965 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Mon Mar 17 11:01:27 EDT 2008


Author: dgeraskov
Date: 2008-03-17 11:01:26 -0400 (Mon, 17 Mar 2008)
New Revision: 6965

Modified:
   trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterFactory.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1845

Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterFactory.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterFactory.java	2008-03-17 14:59:59 UTC (rev 6964)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterFactory.java	2008-03-17 15:01:26 UTC (rev 6965)
@@ -177,20 +177,15 @@
 		exporter.setProperties(props);
 		exporter.setArtifactCollector(collector);
 		
-		exporter.setOutputDirectory(new File(defaultOutputDirectory));
 		String outputPath = defaultOutputDirectory;
 		if(props.containsKey("outputdir")) {
 			outputPath = props.getProperty("outputdir");
 			props.remove("outputdir"); // done to avoid validation check in hibernate tools templates	
 		}
 		
-		if (outputPath == null){
-			throw new HibernateConsoleRuntimeException("Output directory is not specified in " + getExporterDefinition().getDescription() );
-		}
-		
 		String resolvedOutputDir = resolve(outputPath);
 		String loc = PathHelper.getLocationAsStringPath(resolvedOutputDir);
-		if(loc==null) {
+		if(outputPath != null && loc == null) {
 			throw new HibernateConsoleRuntimeException("Output directory '" + resolvedOutputDir + "' in " + getExporterDefinition().getDescription() + " does not exist.");
 		}
 				




More information about the jbosstools-commits mailing list