|
From: <caw...@us...> - 2007-04-26 15:28:45
|
Revision: 2374
http://svn.sourceforge.net/rubyeclipse/?rev=2374&view=rev
Author: cawilliams
Date: 2007-04-26 08:28:42 -0700 (Thu, 26 Apr 2007)
Log Message:
-----------
toggle the lastWasComment boolean in nextToken, not in getTokenLength or getTokenOffset since we can't guarantee the order those are called (but it is a little safer to assume that we can toggel it on next call to nextToken() ).
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/RubyTokenScanner.java
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/RubyTokenScanner.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/RubyTokenScanner.java 2007-04-26 13:11:18 UTC (rev 2373)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/RubyTokenScanner.java 2007-04-26 15:28:42 UTC (rev 2374)
@@ -76,7 +76,6 @@
public int getTokenLength() {
if (lastWasComment) {
- lastWasComment = false;
return tokenLength;
}
if (fSavedLength != -1) {
@@ -100,6 +99,9 @@
}
public IToken nextToken() {
+ if (lastWasComment) {
+ lastWasComment = false;
+ }
if (fSavedToken != null) {
IToken returnToken = fSavedToken;
fSavedToken = null;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|