|
From: <caw...@us...> - 2007-08-22 21:05:02
|
Revision: 3046
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3046&view=rev
Author: cawilliams
Date: 2007-08-22 14:04:58 -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.ui/src/org/rubypeople/rdt/internal/corext/util/MethodOverrideTester.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/corext/util/RubyModelUtil.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/RubyPartitionScanner.java
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/typehierarchy/TraditionalHierarchyViewer.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/typehierarchy/TypeHierarchyContentProvider.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/OverrideIndicatorLabelDecorator.java
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/corext/util/MethodOverrideTester.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/corext/util/MethodOverrideTester.java 2007-08-22 16:40:08 UTC (rev 3045)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/corext/util/MethodOverrideTester.java 2007-08-22 21:04:58 UTC (rev 3046)
@@ -122,7 +122,7 @@
}
}
if (!overriding.isConstructor()) {
- IType[] interfaces= fHierarchy.getSuperInterfaces(type);
+ IType[] interfaces= fHierarchy.getSuperModules(type);
for (int i= 0; i < interfaces.length; i++) {
IMethod res= findOverriddenMethodInHierarchy(interfaces[i], overriding);
if (res != null) {
@@ -154,7 +154,7 @@
}
}
if (!overriding.isConstructor()) {
- IType[] superInterfaces= fHierarchy.getSuperInterfaces(type);
+ IType[] superInterfaces= fHierarchy.getSuperModules(type);
for (int i= 0; i < superInterfaces.length; i++) {
IMethod res= findOverriddenMethodInHierarchy(superInterfaces[i], overriding);
if (res != null) {
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/corext/util/RubyModelUtil.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/corext/util/RubyModelUtil.java 2007-08-22 16:40:08 UTC (rev 3045)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/corext/util/RubyModelUtil.java 2007-08-22 21:04:58 UTC (rev 3046)
@@ -188,7 +188,7 @@
return true;
}
if (Flags.isModule(hierarchy.getCachedFlags(possibleSuperType))) {
- IType[] superInterfaces= hierarchy.getSuperInterfaces(type);
+ IType[] superInterfaces= hierarchy.getSuperModules(type);
for (int i= 0; i < superInterfaces.length; i++) {
IType curr= superInterfaces[i];
if (possibleSuperType.equals(curr) || isSuperType(hierarchy, possibleSuperType, curr)) {
@@ -250,7 +250,7 @@
}
}
if (!isConstructor) {
- IType[] superInterfaces= hierarchy.getSuperInterfaces(type);
+ IType[] superInterfaces= hierarchy.getSuperModules(type);
for (int i= 0; i < superInterfaces.length; i++) {
IMethod res= findMethodInHierarchy(hierarchy, superInterfaces[i], name, paramTypes, false);
if (res != null) {
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/RubyPartitionScanner.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/RubyPartitionScanner.java 2007-08-22 16:40:08 UTC (rev 3045)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/RubyPartitionScanner.java 2007-08-22 21:04:58 UTC (rev 3046)
@@ -20,8 +20,8 @@
import org.jruby.lexer.yacc.LexerSource;
import org.jruby.lexer.yacc.RubyYaccLexer;
import org.jruby.lexer.yacc.SyntaxException;
+import org.jruby.parser.ParserConfiguration;
import org.jruby.parser.ParserSupport;
-import org.jruby.parser.RubyParserConfiguration;
import org.jruby.parser.RubyParserResult;
import org.jruby.parser.Tokens;
import org.rubypeople.rdt.internal.core.util.ASTUtil;
@@ -90,7 +90,7 @@
public RubyPartitionScanner() {
lexer = new RubyYaccLexer();
parserSupport = new ParserSupport();
- parserSupport.setConfiguration(new RubyParserConfiguration(false));
+ parserSupport.setConfiguration(new ParserConfiguration(0, false));
result = new RubyParserResult();
parserSupport.setResult(result);
lexer.setParserSupport(parserSupport);
@@ -107,12 +107,13 @@
length += diff;
}
if (myOffset == -1) myOffset = 0;
+ ParserConfiguration config = new ParserConfiguration(0, true, false);
try {
- fContents = document.get(myOffset, length);
- lexerSource = new LexerSource("filename", new StringReader(fContents), 0, true);
+ fContents = document.get(myOffset, length);
+ lexerSource = LexerSource.getSource("filename", new StringReader(fContents), null, config);
lexer.setSource(lexerSource);
} catch (BadLocationException e) {
- lexerSource = new LexerSource("filename", new StringReader(""), 0, true);
+ lexerSource = LexerSource.getSource("filename", new StringReader(""), null, config);
lexer.setSource(lexerSource);
}
origOffset = myOffset;
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-08-22 16:40:08 UTC (rev 3045)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/RubyTokenScanner.java 2007-08-22 21:04:58 UTC (rev 3046)
@@ -14,8 +14,8 @@
import org.jruby.lexer.yacc.LexerSource;
import org.jruby.lexer.yacc.RubyYaccLexer;
import org.jruby.lexer.yacc.SyntaxException;
+import org.jruby.parser.ParserConfiguration;
import org.jruby.parser.ParserSupport;
-import org.jruby.parser.RubyParserConfiguration;
import org.jruby.parser.RubyParserResult;
import org.jruby.parser.Tokens;
import org.rubypeople.rdt.internal.ui.RubyPlugin;
@@ -61,7 +61,7 @@
super(manager, store);
lexer = new RubyYaccLexer();
parserSupport = new ParserSupport();
- parserSupport.setConfiguration(new RubyParserConfiguration(false));
+ parserSupport.setConfiguration(new ParserConfiguration(0, true, false));
result = new RubyParserResult();
parserSupport.setResult(result);
lexer.setParserSupport(parserSupport);
@@ -252,12 +252,13 @@
lexer.setState(LexState.EXPR_BEG);
parserSupport.initTopLocalVariables();
isInSymbol = false;
+ ParserConfiguration config = new ParserConfiguration(0, true, false);
try {
- fContents = document.get(offset, length);
- lexerSource = new LexerSource("filename", new StringReader(fContents), 0, true);
+ fContents = document.get(offset, length);
+ lexerSource = LexerSource.getSource("filename", new StringReader(fContents), null, config);
lexer.setSource(lexerSource);
} catch (BadLocationException e) {
- lexerSource = new LexerSource("filename", new StringReader(""), 0, true);
+ lexerSource = LexerSource.getSource("filename", new StringReader(""), null, config);
lexer.setSource(lexerSource);
}
origOffset = offset;
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/typehierarchy/TraditionalHierarchyViewer.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/typehierarchy/TraditionalHierarchyViewer.java 2007-08-22 16:40:08 UTC (rev 3045)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/typehierarchy/TraditionalHierarchyViewer.java 2007-08-22 21:04:58 UTC (rev 3046)
@@ -106,7 +106,7 @@
for (int i= 0; i < classes.length; i++) {
res.add(classes[i]);
}
- IType[] interfaces= hierarchy.getRootInterfaces();
+ IType[] interfaces= hierarchy.getRootModules();
for (int i= 0; i < interfaces.length; i++) {
res.add(interfaces[i]);
}
@@ -114,7 +114,7 @@
if (Flags.isModule(hierarchy.getCachedFlags(input))) {
res.add(input);
} else if (isAnonymousFromInterface(input)) {
- res.add(hierarchy.getSuperInterfaces(input)[0]);
+ res.add(hierarchy.getSuperModules(input)[0]);
} else {
IType[] roots= hierarchy.getRootClasses();
for (int i= 0; i < roots.length; i++) {
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/typehierarchy/TypeHierarchyContentProvider.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/typehierarchy/TypeHierarchyContentProvider.java 2007-08-22 16:40:08 UTC (rev 3045)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/typehierarchy/TypeHierarchyContentProvider.java 2007-08-22 21:04:58 UTC (rev 3046)
@@ -343,7 +343,7 @@
}
protected final boolean isAnonymousFromInterface(IType type) {
- return isAnonymous(type) && fTypeHierarchy.getHierarchy().getSuperInterfaces(type).length != 0;
+ return isAnonymous(type) && fTypeHierarchy.getHierarchy().getSuperModules(type).length != 0;
}
protected final boolean isObject(IType type) {
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/OverrideIndicatorLabelDecorator.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/OverrideIndicatorLabelDecorator.java 2007-08-22 16:40:08 UTC (rev 3045)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/OverrideIndicatorLabelDecorator.java 2007-08-22 21:04:58 UTC (rev 3046)
@@ -189,7 +189,7 @@
return RubyElementImageDescriptor.OVERRIDES;
}
}
- IType[] interfaces= hierarchy.getSuperInterfaces(type);
+ IType[] interfaces= hierarchy.getSuperModules(type);
for (int i= 0; i < interfaces.length; i++) {
IMethod res= RubyModelUtil.findMethodInHierarchy(hierarchy, interfaces[i], name, paramTypes, false);
if (res != null) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|