Author: [email protected]
Date: Wed Jun 10 15:49:38 2009
New Revision: 3085

Modified:
   trunk/src/ca/sqlpower/architect/swingui/DDLExportPanel.java

Log:
Make schema and catalog fields optional (empty values allowed) for forward engineering

Modified: trunk/src/ca/sqlpower/architect/swingui/DDLExportPanel.java
==============================================================================
--- trunk/src/ca/sqlpower/architect/swingui/DDLExportPanel.java (original)
+++ trunk/src/ca/sqlpower/architect/swingui/DDLExportPanel.java Wed Jun 10 15:49:38 2009
@@ -223,24 +223,16 @@
                        ddlg.setAllowConnection(false);
                }

-               if (catalogField.isEnabled()) {
- if (catalogField.getText() == null || catalogField.getText().trim().length() == 0) {
-                               JOptionPane.showMessageDialog
- (panel, Messages.getString("DDLExportPanel.provideValidCatalog")); //$NON-NLS-1$
-                               return false;
-                       } else {        
-                               ddlg.setTargetCatalog(catalogField.getText());
-                       }
+               if (catalogField.isEnabled() &&
+ catalogField.getText() != null & catalogField.getText().trim().length()
0) {
+                       
+                       ddlg.setTargetCatalog(catalogField.getText().trim());
                }
                
-               if (schemaField.isEnabled()) {
- if (schemaField.getText() == null || schemaField.getText().trim().length() == 0) {
-                               JOptionPane.showMessageDialog
- (panel, Messages.getString("DDLExportPanel.provideValidSchema")); //$NON-NLS-1$
-                               return false;
-                       } else {        
-                               ddlg.setTargetSchema(schemaField.getText());
-                       }
+               if (schemaField.isEnabled() &&
+ schemaField.getText() != null && schemaField.getText().trim().length()
0) {
+
+                       ddlg.setTargetSchema(schemaField.getText().trim());
                }
                        
                return true;

Reply via email to