Revision: 5943
http://squirrel-sql.svn.sourceforge.net/squirrel-sql/?rev=5943&view=rev
Author: manningr
Date: 2010-10-30 18:04:58 +0000 (Sat, 30 Oct 2010)
Log Message:
-----------
Determine forward or backward path slashes not based on OS, but rather on the script name (On Windows, we fix both types of scripts now).
Modified Paths:
--------------
trunk/sql12/fw/src/main/java/net/sourceforge/squirrel_sql/fw/util/IOUtilitiesImpl.java
trunk/sql12/fw/src/main/java/net/sourceforge/squirrel_sql/fw/util/ScriptLineFixer.java
Modified: trunk/sql12/fw/src/main/java/net/sourceforge/squirrel_sql/fw/util/IOUtilitiesImpl.java
===================================================================
--- trunk/sql12/fw/src/main/java/net/sourceforge/squirrel_sql/fw/util/IOUtilitiesImpl.java 2010-10-30 18:04:09 UTC (rev 5942)
+++ trunk/sql12/fw/src/main/java/net/sourceforge/squirrel_sql/fw/util/IOUtilitiesImpl.java 2010-10-30 18:04:58 UTC (rev 5943)
@@ -381,7 +381,7 @@
{
for (ScriptLineFixer fixer : lineFixers)
{
- line = fixer.fixLine(line);
+ line = fixer.fixLine(filename, line);
}
}
lines.add(line);
Modified: trunk/sql12/fw/src/main/java/net/sourceforge/squirrel_sql/fw/util/ScriptLineFixer.java
===================================================================
--- trunk/sql12/fw/src/main/java/net/sourceforge/squirrel_sql/fw/util/ScriptLineFixer.java 2010-10-30 18:04:09 UTC (rev 5942)
+++ trunk/sql12/fw/src/main/java/net/sourceforge/squirrel_sql/fw/util/ScriptLineFixer.java 2010-10-30 18:04:58 UTC (rev 5943)
@@ -20,7 +20,10 @@
*/
/**
- * Interface for line fixer implementations.
+ * Interface for line fixer implementations. ScriptLineFixers are called upon to fix lines in scripts that are
+ * shipped in the installer. Since scripts can be modified by the installer at install time and end users
+ * after installation is complete, they cannot simply be overwritten during a software update. Instead, each
+ * line of the script is examined and transformed as required by the current release.
*/
public interface ScriptLineFixer
{
@@ -28,9 +31,11 @@
/**
* Fixes the line specified, returning the "fixed" version
*
+ * @param scriptFileName
+ * the filename of the script (may or may not include the absolute path)
* @param line
* the line that needs to be fixed
* @return the fixed line
*/
- String fixLine(String line);
+ String fixLine(String scriptFileName, String line);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|