Revision: 3328
Author: silva.josemanuel1
Date: Tue Feb 23 09:59:29 2010
Log: Fixed implementation of Liquibase DLL generation for CompareDM
http://code.google.com/p/power-architect/source/detail?r=3328

Modified:
 /trunk/src/ca/sqlpower/architect/swingui/CompareDMFormatter.java
 /trunk/src/ca/sqlpower/architect/swingui/CompareDMPanel.java

=======================================
--- /trunk/src/ca/sqlpower/architect/swingui/CompareDMFormatter.java Mon Feb 22 13:39:16 2010 +++ /trunk/src/ca/sqlpower/architect/swingui/CompareDMFormatter.java Tue Feb 23 09:59:29 2010
@@ -154,6 +154,8 @@
gen.setTargetSchema(sch == null ? null : sch.getPhysicalName()); } else if (dmSetting.getOutputFormat().equals(CompareDMSettings.OutputFormat.LIQUIBASE)) {
                                gen = new LiquibaseDDLGenerator();
+                       } else {
+ throw new IllegalStateException("Don't know what kind of SQL script to generate");
                        }

List<DiffChunk<SQLObject>> addRelationships = new ArrayList<DiffChunk<SQLObject>>();
=======================================
--- /trunk/src/ca/sqlpower/architect/swingui/CompareDMPanel.java Tue Feb 23 09:40:54 2010 +++ /trunk/src/ca/sqlpower/architect/swingui/CompareDMPanel.java Tue Feb 23 09:59:29 2010
@@ -1304,14 +1304,17 @@
                         return;
                     }
                                        logger.debug("cleanup starts"); 
//$NON-NLS-1$
- CompareDMFormatter dmFormat = new CompareDMFormatter(session, parentDialog, session.getCompareDMSettings()); - if (session.getCompareDMSettings().getOutputFormat() == CompareDMSettings.OutputFormat.SQL) { - dmFormat.formatForSQLOutput((List<DiffChunk<SQLObject>>) diff, - (List<DiffChunk<SQLObject>>) diff1, left, right); - } else if (session.getCompareDMSettings().getOutputFormat() == CompareDMSettings.OutputFormat.ENGLISH) { + CompareDMFormatter dmFormat = new CompareDMFormatter(session, parentDialog, session.getCompareDMSettings()); + switch (session.getCompareDMSettings().getOutputFormat()) {
+                    case SQL:
+                    case LIQUIBASE:
+ dmFormat.formatForSQLOutput(diff, diff1, left, right);
+                        break;
+                    case ENGLISH:
dmFormat.formatForEnglishOutput(diff, diff1, left, right);
-                    } else {
- throw new IllegalStateException("Don't know what type of output to make");
+                        break;
+                    default:
+ throw new IllegalStateException("Don't know what type of output to make");
                     }
                     logger.debug("cleanup finished"); //$NON-NLS-1$
                                }

Reply via email to