|
From: <caw...@us...> - 2007-08-22 21:05:33
|
Revision: 3047
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3047&view=rev
Author: cawilliams
Date: 2007-08-22 14:05:06 -0700 (Wed, 22 Aug 2007)
Log Message:
-----------
update to latest JRuby. Also fix ITypeHierarchy interface to refer to modules and not interfaces
Modified Paths:
--------------
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/NodeProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/formatsource/PreviewGeneratorImpl.java
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/NodeProvider.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/NodeProvider.java 2007-08-22 21:04:58 UTC (rev 3046)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/NodeProvider.java 2007-08-22 21:05:06 UTC (rev 3047)
@@ -64,10 +64,9 @@
import org.jruby.lexer.yacc.LexerSource;
import org.jruby.lexer.yacc.SyntaxException;
import org.jruby.parser.DefaultRubyParser;
-import org.jruby.parser.RubyParserConfiguration;
+import org.jruby.parser.ParserConfiguration;
import org.jruby.parser.RubyParserPool;
import org.jruby.parser.RubyParserResult;
-//import org.jruby.parser.postprocessor.DefaultCommentPlacer;
import org.rubypeople.rdt.refactoring.nodewrapper.AttrAccessorNodeWrapper;
import org.rubypeople.rdt.refactoring.nodewrapper.FieldNodeWrapper;
import org.rubypeople.rdt.refactoring.nodewrapper.MethodCallNodeWrapper;
@@ -104,8 +103,9 @@
DefaultRubyParser parser;
parser = RubyParserPool.getInstance().borrowParser();
parser.setWarnings(new NullWarnings());
- LexerSource lexerSource = new LexerSource(fileName, reader, 1, true);
- RubyParserConfiguration parserConfig = new RubyParserConfiguration(false);
+
+ ParserConfiguration parserConfig = new ParserConfiguration(1, true, false);
+ LexerSource lexerSource = LexerSource.getSource(fileName, reader, null, parserConfig);
// parserConfig.addPostProcessor(new DefaultCommentPlacer());
RubyParserResult result = parser.parse(parserConfig, lexerSource);
return (RootNode) result.getAST();
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/formatsource/PreviewGeneratorImpl.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/formatsource/PreviewGeneratorImpl.java 2007-08-22 21:04:58 UTC (rev 3046)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/formatsource/PreviewGeneratorImpl.java 2007-08-22 21:05:06 UTC (rev 3047)
@@ -39,9 +39,8 @@
import org.jruby.common.NullWarnings;
import org.jruby.lexer.yacc.LexerSource;
import org.jruby.parser.DefaultRubyParser;
-import org.jruby.parser.RubyParserConfiguration;
+import org.jruby.parser.ParserConfiguration;
import org.jruby.parser.RubyParserPool;
-//import org.jruby.parser.postprocessor.DefaultCommentPlacer;
public class PreviewGeneratorImpl implements PreviewGenerator {
@@ -58,9 +57,9 @@
DefaultRubyParser parser = RubyParserPool.getInstance().borrowParser();
parser.setWarnings(new NullWarnings());
- LexerSource lexerSource = new LexerSource("", new StringReader(source), 1, true); //$NON-NLS-1$
- ReWriteVisitor visitor = factory.createReWriteVisitor();
- RubyParserConfiguration parserConfig = new RubyParserConfiguration(false);
+ ParserConfiguration parserConfig = new ParserConfiguration(1, true, false);
+ LexerSource lexerSource = LexerSource.getSource("", new StringReader(source), null, parserConfig); //$NON-NLS-1$
+ ReWriteVisitor visitor = factory.createReWriteVisitor();
// parserConfig.addPostProcessor(new DefaultCommentPlacer());
parser.parse(parserConfig, lexerSource).getAST().accept(visitor);
visitor.flushStream();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|