Revision: 6660
http://squirrel-sql.svn.sourceforge.net/squirrel-sql/?rev=6660&view=rev
Author: gerdwagner
Date: 2012-09-21 20:24:35 +0000 (Fri, 21 Sep 2012)
Log Message:
-----------
Abbreviation/Auto-correction now works also if it is placed right after an opening bracket.
Modified Paths:
--------------
trunk/sql12/doc/src/main/resources/changes.txt
trunk/sql12/plugins/syntax/src/main/java/net/sourceforge/squirrel_sql/plugins/syntax/AutoCorrector.java
Modified: trunk/sql12/doc/src/main/resources/changes.txt
===================================================================
--- trunk/sql12/doc/src/main/resources/changes.txt 2012-09-17 18:36:01 UTC (rev 6659)
+++ trunk/sql12/doc/src/main/resources/changes.txt 2012-09-21 20:24:35 UTC (rev 6660)
@@ -6,6 +6,8 @@
Not yet released, available in our Subversion repository and in future snapshots and releases.
===============================================================================================
+Abbreviation/Auto-correction now works also if it is placed right after an opening bracket.
+
Added new default driver definition for Starschema BigQuery JDBC Driver.
Updated French translations. Thanks to Erwan Duroselle.
Modified: trunk/sql12/plugins/syntax/src/main/java/net/sourceforge/squirrel_sql/plugins/syntax/AutoCorrector.java
===================================================================
--- trunk/sql12/plugins/syntax/src/main/java/net/sourceforge/squirrel_sql/plugins/syntax/AutoCorrector.java 2012-09-17 18:36:01 UTC (rev 6659)
+++ trunk/sql12/plugins/syntax/src/main/java/net/sourceforge/squirrel_sql/plugins/syntax/AutoCorrector.java 2012-09-21 20:24:35 UTC (rev 6660)
@@ -61,7 +61,7 @@
if (' ' == insertChar.charAt(0))
{
- String autoCorrCandidate = getStringBeforeWhiteSpace(e.getOffset()).toUpperCase();
+ String autoCorrCandidate = getStringBeforeWhiteSpaceOrOpeningBraket(e.getOffset()).toUpperCase();
final String corr = _plugin.getAutoCorrectProviderImpl().getAutoCorrects().get(autoCorrCandidate);
if(null != corr)
{
@@ -93,7 +93,7 @@
}
}
- private String getStringBeforeWhiteSpace(int offset)
+ private String getStringBeforeWhiteSpaceOrOpeningBraket(int offset)
{
try
{
@@ -104,7 +104,7 @@
int begPos = text.length();
for(int i=text.length()-1; 0 <= i; --i)
{
- if(Character.isWhitespace(text.charAt(i)))
+ if(Character.isWhitespace(text.charAt(i)) || '(' == text.charAt(i))
{
break;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|