|
From: <caw...@us...> - 2007-05-01 18:09:20
|
Revision: 2414
http://svn.sourceforge.net/rubyeclipse/?rev=2414&view=rev
Author: cawilliams
Date: 2007-05-01 11:09:19 -0700 (Tue, 01 May 2007)
Log Message:
-----------
Fix Trac # 4251 - Delete Next Word causes NPE: deleting the last code inside an RHMTL ruby snippet could cause us to try and grab bad locatiosn the dcument and not properly reset our lexerSource object inside the parser which caused NPEs. Now if we get a abd lcoation , just set lexerSource to an empty string to avoid the NPE
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-05-01 17:38:57 UTC (rev 2413)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/RubyTokenScanner.java 2007-05-01 18:09:19 UTC (rev 2414)
@@ -297,7 +297,8 @@
lexerSource = new LexerSource("filename", new StringReader(contents));
lexer.setSource(lexerSource);
} catch (BadLocationException e) {
- RubyPlugin.log(e);
+ lexerSource = new LexerSource("filename", new StringReader(""));
+ lexer.setSource(lexerSource);
}
origOffset = offset;
origLength = length;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|