Thank you for SQuirreL. It is a cool and useful tool. This is my first patch I ever created. So please be patient and give me hints when I did something wrong.
The SQL Script Plugin has a global Preference "Qualify table names in generated scripts with the schema name", which is active.
When I enter "select * from test.table" in the SQL Tab and create a data script from this sql, I get "insert into table ..." without the schema-name. This is not ok.
When create data script is chosen on a table in CreateDataScriptCommand the line String sTable = ScriptUtil.getTableName(ti); sets the correct table name. In the class CreateDataScriptOfCurrentSQLCommand, which is used in the SQL Tab, the table name is taken from the JDBC object ResultSetMetaData (String sTable = metaData.getTableName(1);).
In the patch attached in the CreateDataScriptOfCurrentSQLCommand class I create a TableInfo from the ResulSetMetaData and also use the ScriptUtil.GetTableName Method.