Revision: 7186
http://languagetool.svn.sourceforge.net/languagetool/?rev=7186&view=rev
Author: milek_pl
Date: 2012-06-02 20:05:48 +0000 (Sat, 02 Jun 2012)
Log Message:
-----------
fix another hidden bug...
Modified Paths:
--------------
trunk/JLanguageTool/src/java/org/languagetool/rules/patterns/Element.java
Modified:
trunk/JLanguageTool/src/java/org/languagetool/rules/patterns/Element.java
===================================================================
--- trunk/JLanguageTool/src/java/org/languagetool/rules/patterns/Element.java
2012-06-02 19:40:18 UTC (rev 7185)
+++ trunk/JLanguageTool/src/java/org/languagetool/rules/patterns/Element.java
2012-06-02 20:05:48 UTC (rev 7186)
@@ -789,10 +789,23 @@
testWhitespace = true;
}
- public final void setExceptionSpaceBefore(final boolean isWhite) {
- if (exceptionList != null) {
- exceptionList.get(exceptionList.size() - 1).setWhitespaceBefore(isWhite);
- }
+ /**
+ * Sets the attribute on the exception that determines matching of patterns
+ * that depends on whether there was a space before the token matching the
exception
+ * or not.
+ *
+ * The same procedure is used for tokens that are valid for previous or
current tokens.
+ *
+ * @param isWhite If true, the space before exception is required.
+ */
+ public final void setExceptionSpaceBefore(final boolean isWhite) {
+ if (previousExceptionList != null && exceptionValidPrevious) {
+ previousExceptionList.get(previousExceptionList.size() -
1).setWhitespaceBefore(isWhite);
+ } else {
+ if (exceptionList != null) {
+ exceptionList.get(exceptionList.size() -
1).setWhitespaceBefore(isWhite);
+ }
+ }
}
public final boolean isWhitespaceBefore(final AnalyzedToken token) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Languagetool-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-cvs