|
From: David C. <dc...@us...> - 2005-10-02 22:32:04
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8784/src/org/rubypeople/rdt/internal/core Modified Files: RubyScriptProblemFinder.java RubyScript.java Log Message: Refactored RubyBuilder into several smaller classes. Wrote UTs for a few of them. Began work on a SymbolIndex. Index: RubyScript.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScript.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** RubyScript.java 18 Sep 2005 15:17:54 -0000 1.15 --- RubyScript.java 1 Oct 2005 23:01:01 -0000 1.16 *************** *** 113,117 **** try { RubyParser parser = new RubyParser(); ! Node node = parser.parse(getElementName(), new CharArrayReader(contents)); RubyScriptStructureBuilder visitor = new RubyScriptStructureBuilder(this, unitInfo, newElements); if (node != null) node.accept(visitor); --- 113,117 ---- try { RubyParser parser = new RubyParser(); ! Node node = parser.parse(underlyingFile, new CharArrayReader(contents)); RubyScriptStructureBuilder visitor = new RubyScriptStructureBuilder(this, unitInfo, newElements); if (node != null) node.accept(visitor); *************** *** 161,165 **** * @see IRubyElement */ ! public IResource getUnderlyingResource() throws RubyModelException { if (isWorkingCopy() && !isPrimary()) return null; return underlyingFile; --- 161,165 ---- * @see IRubyElement */ ! public IResource getUnderlyingResource() { if (isWorkingCopy() && !isPrimary()) return null; return underlyingFile; Index: RubyScriptProblemFinder.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScriptProblemFinder.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** RubyScriptProblemFinder.java 6 Aug 2005 12:55:10 -0000 1.5 --- RubyScriptProblemFinder.java 1 Oct 2005 23:01:01 -0000 1.6 *************** *** 9,12 **** --- 9,13 ---- import java.util.List; + import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.preferences.IEclipsePreferences; *************** *** 26,29 **** --- 27,31 ---- public class RubyScriptProblemFinder { + // DSC convert to ImmediateWarnings public static void process(RubyScript script, char[] charContents, IProblemRequestor problemRequestor, IProgressMonitor pm) { RdtWarnings warnings = new RdtWarnings(); *************** *** 31,35 **** String contents = new String(charContents); try { ! parser.parse(script.getElementName(), new StringReader(contents)); } catch (SyntaxException e) { problemRequestor.acceptProblem(new Error(e.getPosition(), "Syntax Error")); --- 33,37 ---- String contents = new String(charContents); try { ! parser.parse((IFile) script.getUnderlyingResource(), new StringReader(contents)); } catch (SyntaxException e) { problemRequestor.acceptProblem(new Error(e.getPosition(), "Syntax Error")); |