Revision: 6291
http://squirrel-sql.svn.sourceforge.net/squirrel-sql/?rev=6291&view=rev
Author: wis775
Date: 2011-06-05 13:27:09 +0000 (Sun, 05 Jun 2011)
Log Message:
-----------
Using the script "Store result of SQL in table" twice, then I get the cancel dialog in a unusable state. This occurs only on my Ubuntu 10.10 with Java 1.6.0_24. On my Windows system, it works fine. This small sleep does the job.
Modified Paths:
--------------
trunk/sql12/plugins/sqlscript/src/main/java/net/sourceforge/squirrel_sql/plugins/sqlscript/table_script/CreateTableOfCurrentSQLCommand.java
Modified: trunk/sql12/plugins/sqlscript/src/main/java/net/sourceforge/squirrel_sql/plugins/sqlscript/table_script/CreateTableOfCurrentSQLCommand.java
===================================================================
--- trunk/sql12/plugins/sqlscript/src/main/java/net/sourceforge/squirrel_sql/plugins/sqlscript/table_script/CreateTableOfCurrentSQLCommand.java 2011-06-04 15:27:27 UTC (rev 6290)
+++ trunk/sql12/plugins/sqlscript/src/main/java/net/sourceforge/squirrel_sql/plugins/sqlscript/table_script/CreateTableOfCurrentSQLCommand.java 2011-06-05 13:27:09 UTC (rev 6291)
@@ -77,12 +77,23 @@
final boolean dropTable = ctrl.isDropTable();
-
+
_session.getApplication().getThreadPool().addTask(new Runnable()
{
public void run()
{
-
+ /*
+ * Ok, this sleep is a hack. (Stefan)
+ * On my system (Ubuntu 10.10 Java 1.6.0_24), I get the cancel dialog in a unusable state.
+ * On my Windows system, this problem doesn't occurs.
+ * This small sleep does the tick, where synchronization fails :-(
+ *
+ */
+ try {
+ Thread.sleep(50);
+ } catch (InterruptedException e) {
+ // nothing to do
+ }
doCreateTableOfCurrentSQL(sTable, scriptOnly, dropTable);
}
});
@@ -95,6 +106,7 @@
final StringBuffer sbScript = new StringBuffer();
try
{
+// Thread.sleep(100);
ISQLPanelAPI api =
FrameWorkAcessor.getSQLPanelAPI(_session, _plugin);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|