|
From: David C. <dc...@us...> - 2005-10-13 01:00:45
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3497/src/org/rubypeople/rdt/internal/core/builder Modified Files: RdtCompiler.java IndexUpdater.java Log Message: Partial support for opening classes from Test::Unit failure. Index: RdtCompiler.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder/RdtCompiler.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RdtCompiler.java 1 Oct 2005 23:01:00 -0000 1.1 --- RdtCompiler.java 13 Oct 2005 01:00:35 -0000 1.2 *************** *** 11,14 **** --- 11,15 ---- import org.jruby.ast.Node; import org.jruby.lexer.yacc.SyntaxException; + import org.rubypeople.rdt.core.RubyCore; import org.rubypeople.rdt.internal.core.parser.ImmediateWarnings; import org.rubypeople.rdt.internal.core.parser.RubyParser; *************** *** 20,24 **** public RdtCompiler(IMarkerManager markerManager) { ! this(markerManager, new RubyParser(new ImmediateWarnings(markerManager)), new IndexUpdater(null)); } --- 21,25 ---- public RdtCompiler(IMarkerManager markerManager) { ! this(markerManager, new RubyParser(new ImmediateWarnings(markerManager)), new IndexUpdater(((RubyCore) RubyCore.getPlugin()).getSymbolIndex())); } *************** *** 33,37 **** try { Node rootNode = parser.parse(file, reader); ! // indexUpdater.update(file, rootNode); } catch (SyntaxException e) { markerManager.createSyntaxError(file, e); --- 34,38 ---- try { Node rootNode = parser.parse(file, reader); ! indexUpdater.update(file, rootNode); } catch (SyntaxException e) { markerManager.createSyntaxError(file, e); Index: IndexUpdater.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder/IndexUpdater.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IndexUpdater.java 9 Oct 2005 22:14:06 -0000 1.2 --- IndexUpdater.java 13 Oct 2005 01:00:35 -0000 1.3 *************** *** 14,18 **** public class IndexUpdater { ! private final SymbolIndex index; private Stack scopeStack = new Stack(); --- 14,18 ---- public class IndexUpdater { ! // TODO Build Index on startup private final SymbolIndex index; private Stack scopeStack = new Stack(); *************** *** 36,40 **** scopeStack.push(name); if (node instanceof ClassNode) ! index.add(new ClassSymbol(name), file, node.getPosition()); } --- 36,40 ---- scopeStack.push(name); if (node instanceof ClassNode) ! index.add(new ClassSymbol(name), file, classNode.getCPath().getPosition()); } |