Author: aniedbala
Date: Tue Nov 25 15:07:00 2008
New Revision: 2848
Modified:
trunk/src/ca/sqlpower/architect/swingui/action/ExportDDLAction.java
Log:
Fixed a bug where the user could create multiple ExportDDLDialogs by
clicking on the Forward Engineer button multiple times.
Modified:
trunk/src/ca/sqlpower/architect/swingui/action/ExportDDLAction.java
==============================================================================
--- trunk/src/ca/sqlpower/architect/swingui/action/ExportDDLAction.java
(original)
+++ trunk/src/ca/sqlpower/architect/swingui/action/ExportDDLAction.java Tue
Nov 25 15:07:00 2008
@@ -60,15 +60,12 @@
private static final String GENDDL_WARNINGS_EXPLANATION =
Messages.getString("ExportDDLAction.errorsInstructions");
//$NON-NLS-1$
-
- public ExportDDLAction(ArchitectSwingSession session) {
- super(session, Messages.getString("ExportDDLAction.name"),
Messages.getString("ExportDDLAction.description"), "fwdSQL"); //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$
- }
-
+
private JDialog d;
- public void actionPerformed(ActionEvent e) {
-
+ public ExportDDLAction(final ArchitectSwingSession session) {
+ super(session, Messages.getString("ExportDDLAction.name"),
Messages.getString("ExportDDLAction.description"), "fwdSQL"); //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$
+
final DDLExportPanel ddlPanel = new DDLExportPanel(session);
Callable<Boolean> okCall, cancelCall;
@@ -168,7 +165,7 @@
}
break;
}
- }
+ } // end of main while loop
}
SQLDatabase ppdb = new
SQLDatabase(ddlPanel.getTargetDB());
@@ -199,8 +196,6 @@
}
};
-
-
cancelCall = new Callable<Boolean>() {
public Boolean call() {
ddlPanel.discardChanges();
@@ -214,7 +209,10 @@
okCall, cancelCall);
d.pack();
- d.setLocationRelativeTo(frame);
+ d.setLocationRelativeTo(frame);
+ }
+
+ public void actionPerformed(ActionEvent e) {
d.setVisible(true);
}