Author: max.andersen(a)jboss.com
Date: 2007-10-29 10:22:54 -0400 (Mon, 29 Oct 2007)
New Revision: 4556
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java
Log:
JBIDE-1201 code formatter does not run if you regenerate from existing entities
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java 2007-10-29
13:47:28 UTC (rev 4555)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java 2007-10-29
14:22:54 UTC (rev 4556)
@@ -133,13 +133,7 @@
ExporterFactory[] exporters = (ExporterFactory[]) exporterFactories.toArray( new
ExporterFactory[exporterFactories.size()] );
ArtifactCollector collector = runExporters(attributes, exporters,
outputDirectories, monitor);
- if(collector!=null) {
- formatGeneratedCode( monitor, collector );
- }
-
-
-
- Iterator iterator = outputDirectories.iterator();
+ Iterator iterator = outputDirectories.iterator();
while (iterator.hasNext()) {
String path = (String) iterator.next();
refreshOutputDir( path );
@@ -147,6 +141,12 @@
RefreshTab.refreshResources(configuration, monitor);
+ // code formatting needs to happen *after* refresh to make sure eclipse will format
the uptodate files!
+ if(collector!=null) {
+ formatGeneratedCode( monitor, collector );
+ }
+
+
} catch(Exception e) {
throw new CoreException(HibernateConsolePlugin.throwableToStatus(e, 666));
} catch(NoClassDefFoundError e) {
Show replies by date