You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(41) |
Apr
(9) |
May
|
Jun
|
Jul
(39) |
Aug
(38) |
Sep
(135) |
Oct
(220) |
Nov
(75) |
Dec
(74) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(44) |
Feb
(160) |
Mar
(49) |
Apr
(69) |
May
(40) |
Jun
(52) |
Jul
(47) |
Aug
(51) |
Sep
(19) |
Oct
(22) |
Nov
(36) |
Dec
(76) |
| 2007 |
Jan
(154) |
Feb
(165) |
Mar
(186) |
Apr
(143) |
May
(175) |
Jun
(133) |
Jul
(203) |
Aug
(177) |
Sep
(136) |
Oct
|
Nov
|
Dec
|
|
From: David C. <dc...@us...> - 2005-10-02 23:31:19
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31655 Modified Files: plugin.xml Log Message: Eliminate old keybindings for comment/uncomment that weren't really bound anyway. Index: plugin.xml =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/plugin.xml,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** plugin.xml 2 Oct 2005 17:18:53 -0000 1.62 --- plugin.xml 2 Oct 2005 23:31:11 -0000 1.63 *************** *** 219,227 **** name="%ActionDefinition.comment.name"> </command> - <keyBinding - scope="org.rubypeople.rdt.ui.rubyEditorScope" - command="org.rubypeople.rdt.ui.edit.text.ruby.comment" - configuration="org.eclipse.ui.defaultAcceleratorConfiguration"> - </keyBinding> <command category="org.rubypeople.rdt.ui.category.source" --- 219,222 ---- *************** *** 231,239 **** name="%ActionDefinition.uncomment.name"> </command> - <keyBinding - scope="org.rubypeople.rdt.ui.rubyEditorScope" - command="org.rubypeople.rdt.ui.edit.text.ruby.uncomment" - configuration="org.eclipse.ui.defaultAcceleratorConfiguration"> - </keyBinding> <command category="org.rubypeople.rdt.ui.category.source" --- 226,229 ---- |
|
From: David C. <dc...@us...> - 2005-10-02 23:27:44
|
Update of /cvsroot/rubyeclipse/org.rubypeople.eclipse.shams In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8707 Modified Files: .classpath plugin.xml Log Message: Refactored RubyBuilder into several smaller classes. Wrote UTs for a few of them. Began work on a SymbolIndex. Index: .classpath =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.eclipse.shams/.classpath,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** .classpath 28 Mar 2004 18:45:01 -0000 1.8 --- .classpath 1 Oct 2005 23:00:50 -0000 1.9 *************** *** 2,7 **** <classpath> <classpathentry kind="src" path="src"/> - <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="output" path="bin"/> </classpath> --- 2,7 ---- <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="output" path="bin"/> </classpath> Index: plugin.xml =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.eclipse.shams/plugin.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** plugin.xml 26 Mar 2005 11:35:57 -0000 1.6 --- plugin.xml 1 Oct 2005 23:00:50 -0000 1.7 *************** *** 19,22 **** --- 19,23 ---- <import plugin="org.eclipse.ui"/> <import plugin="org.eclipse.debug.core"/> + <import plugin="org.junit"/> </requires> |
|
From: David C. <dc...@us...> - 2005-10-02 23:24:46
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12388/src/org/rubypeople/rdt/internal/ui/rubyeditor/templates Modified Files: RubyContext.java Log Message: Cleanup a whole bunch of 'unused warnings" Index: RubyContext.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/templates/RubyContext.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RubyContext.java 26 Nov 2004 18:57:26 -0000 1.1 --- RubyContext.java 1 Oct 2005 23:10:44 -0000 1.2 *************** *** 23,31 **** public class RubyContext extends DocumentTemplateContext { - private RubyModel fAntModel; public RubyContext(TemplateContextType type, IDocument document, RubyModel model, int completionOffset, int completionLength) { super(type, document, completionOffset, completionLength); - fAntModel= model; } --- 23,29 ---- |
|
From: David C. <dc...@us...> - 2005-10-02 23:24:45
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/dialogs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12388/src/org/rubypeople/rdt/internal/ui/dialogs Modified Files: StatusDialog.java Log Message: Cleanup a whole bunch of 'unused warnings" Index: StatusDialog.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/dialogs/StatusDialog.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** StatusDialog.java 2 Mar 2005 00:54:29 -0000 1.2 --- StatusDialog.java 1 Oct 2005 23:10:44 -0000 1.3 *************** *** 28,33 **** private Image fImage; - private boolean fStatusLineAboveButtons; - /** * Creates an instane of a status dialog. --- 28,31 ---- *************** *** 35,39 **** public StatusDialog(Shell parent) { super(parent); - fStatusLineAboveButtons= false; } --- 33,36 ---- *************** *** 46,50 **** */ public void setStatusLineAboveButtons(boolean aboveButtons) { - fStatusLineAboveButtons= aboveButtons; } --- 43,46 ---- |
|
From: David C. <dc...@us...> - 2005-10-02 23:24:45
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/resourcesview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12388/src/org/rubypeople/rdt/internal/ui/resourcesview Modified Files: RubyFilesOnlyFilterAction.java Log Message: Cleanup a whole bunch of 'unused warnings" Index: RubyFilesOnlyFilterAction.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/resourcesview/RubyFilesOnlyFilterAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RubyFilesOnlyFilterAction.java 5 Mar 2005 16:02:38 -0000 1.2 --- RubyFilesOnlyFilterAction.java 1 Oct 2005 23:10:44 -0000 1.3 *************** *** 16,24 **** import org.eclipse.ui.views.navigator.ResourceNavigatorAction; import org.rubypeople.rdt.internal.ui.RubyUIMessages; - import org.rubypeople.rdt.internal.ui.RubyViewerFilter; public class RubyFilesOnlyFilterAction extends ResourceNavigatorAction { - private RubyViewerFilter rubyViewerFilter; public RubyFilesOnlyFilterAction(IResourceNavigator navigator, boolean sortByType) { --- 16,22 ---- |
|
From: David C. <dc...@us...> - 2005-10-02 23:15:11
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12550/src/org/rubypeople/rdt/internal/debug/ui/actions Modified Files: ManageBreakpointRulerAction.java Log Message: Cleanup a whole bunch of 'unused warnings" Index: ManageBreakpointRulerAction.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/actions/ManageBreakpointRulerAction.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ManageBreakpointRulerAction.java 28 Mar 2005 23:22:39 -0000 1.6 --- ManageBreakpointRulerAction.java 1 Oct 2005 23:11:01 -0000 1.7 *************** *** 41,45 **** private IVerticalRulerInfo fRuler; private ITextEditor fTextEditor; - private String fMarkerType; private List fMarkers; --- 41,44 ---- *************** *** 56,60 **** fRuler = ruler; fTextEditor = editor; - fMarkerType = IBreakpoint.BREAKPOINT_MARKER; fAddLabel = "Add Breakpoint"; fRemoveLabel = "Remove Breakpoint"; --- 55,58 ---- |
|
From: David C. <dc...@us...> - 2005-10-02 23:08:45
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12449/src/org/rubypeople/rdt/internal/launching Modified Files: EvaluateRubyProcessOutput.java TC_RunnerLaunching.java Log Message: Cleanup a whole bunch of 'unused warnings" Index: TC_RunnerLaunching.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TC_RunnerLaunching.java 1 Oct 2005 22:58:02 -0000 1.1 --- TC_RunnerLaunching.java 1 Oct 2005 23:10:47 -0000 1.2 *************** *** 9,13 **** import junit.framework.TestCase; - import org.eclipse.core.boot.BootLoader; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; --- 9,12 ---- *************** *** 25,32 **** import org.rubypeople.eclipse.shams.debug.core.ShamLaunchConfigurationType; import org.rubypeople.eclipse.testutils.ResourceTools; - import org.rubypeople.rdt.internal.launching.DebuggerRunner; - import org.rubypeople.rdt.internal.launching.RubyInterpreter; - import org.rubypeople.rdt.internal.launching.RubyLaunchConfigurationAttribute; - import org.rubypeople.rdt.internal.launching.RubyRuntime; public class TC_RunnerLaunching extends TestCase { --- 24,27 ---- Index: EvaluateRubyProcessOutput.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/EvaluateRubyProcessOutput.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EvaluateRubyProcessOutput.java 1 Oct 2005 22:58:02 -0000 1.1 --- EvaluateRubyProcessOutput.java 1 Oct 2005 23:10:47 -0000 1.2 *************** *** 55,62 **** errReadThread.start(); } - private void processEnded(int exitValue) { - // Handle process end.. - //handler.processEnded(exitValue); - } private void processNewInput(String input) { // Handle process new input.. --- 55,58 ---- |
|
From: David C. <dc...@us...> - 2005-10-02 23:08:35
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12550/src/org/rubypeople/rdt/internal/debug/ui Modified Files: RdtDebugUiPlugin.java Log Message: Cleanup a whole bunch of 'unused warnings" Index: RdtDebugUiPlugin.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/RdtDebugUiPlugin.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** RdtDebugUiPlugin.java 7 Mar 2005 20:52:44 -0000 1.13 --- RdtDebugUiPlugin.java 1 Oct 2005 23:11:01 -0000 1.14 *************** *** 5,9 **** import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Platform; - import org.eclipse.core.runtime.Preferences; import org.eclipse.core.runtime.Status; import org.eclipse.ui.IWorkbenchPage; --- 5,8 ---- |
|
From: David C. <dc...@us...> - 2005-10-02 23:07:52
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12527/src/org/rubypeople/rdt/internal/core/builder Modified Files: TC_RdtCompiler.java Log Message: Cleanup a whole bunch of 'unused warnings" Index: TC_RdtCompiler.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/builder/TC_RdtCompiler.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TC_RdtCompiler.java 1 Oct 2005 23:00:54 -0000 1.1 --- TC_RdtCompiler.java 1 Oct 2005 23:10:58 -0000 1.2 *************** *** 8,12 **** import org.jruby.lexer.yacc.SyntaxException; import org.rubypeople.eclipse.shams.resources.ShamFile; - import org.rubypeople.rdt.internal.core.symbols.SymbolIndex; public class TC_RdtCompiler extends TestCase { --- 8,11 ---- |
|
From: David C. <dc...@us...> - 2005-10-02 23:00:48
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/ast In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8616/src/org/rubypeople/rdt/internal/core/ast Log Message: Directory /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/ast added to the repository |
|
From: David C. <dc...@us...> - 2005-10-02 23:00:46
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8616/src/org/rubypeople/rdt/internal/core/builder Log Message: Directory /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/builder added to the repository |
|
From: David C. <dc...@us...> - 2005-10-02 23:00:33
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/ast In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12527/src/org/rubypeople/rdt/internal/core/ast Modified Files: DumpAst.java Log Message: Cleanup a whole bunch of 'unused warnings" Index: DumpAst.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/ast/DumpAst.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DumpAst.java 1 Oct 2005 23:00:54 -0000 1.1 --- DumpAst.java 1 Oct 2005 23:10:58 -0000 1.2 *************** *** 7,11 **** import org.jruby.ast.Node; - import org.jruby.ast.visitor.DefaultIteratorVisitor; import org.jruby.ast.visitor.NodeVisitor; import org.rubypeople.eclipse.shams.resources.ShamFile; --- 7,10 ---- |
|
From: David C. <dc...@us...> - 2005-10-02 22:57:25
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12672/src/org/rubypeople/rdt/internal/core Modified Files: RubyProject.java Log Message: Cleanup a whole bunch of 'unused warnings" Index: RubyProject.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyProject.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** RubyProject.java 18 Sep 2005 15:17:54 -0000 1.14 --- RubyProject.java 1 Oct 2005 23:11:12 -0000 1.15 *************** *** 46,50 **** * Value of project's resolved loadpath while it is being resolved */ - private static final ILoadpathEntry[] RESOLUTION_IN_PROGRESS = new ILoadpathEntry[0]; public RubyProject() { --- 46,49 ---- |
|
From: David C. <dc...@us...> - 2005-10-02 22:57:02
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/symbols In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8784/src/org/rubypeople/rdt/internal/core/symbols Added Files: Location.java SymbolIndex.java ClassSymbol.java Log Message: Refactored RubyBuilder into several smaller classes. Wrote UTs for a few of them. Began work on a SymbolIndex. --- NEW FILE: ClassSymbol.java --- package org.rubypeople.rdt.internal.core.symbols; public class ClassSymbol { private final String className; public ClassSymbol(String className) { this.className = className; } public boolean equals(Object obj) { if (!(obj instanceof ClassSymbol)) return false; ClassSymbol that = (ClassSymbol) obj; return that.className.equals(this.className); } public int hashCode() { return className.hashCode(); } } --- NEW FILE: Location.java --- package org.rubypeople.rdt.internal.core.symbols; import org.eclipse.core.runtime.Path; public class Location { private final Path sourcePath; private final int line; private final int column; public Location(Path sourcePath, int line, int column) { this.sourcePath = sourcePath; this.line = line; this.column = column; } public String toString() { return sourcePath+": " + line + "("+column+")"; } public boolean forSource(Path path) { return sourcePath.equals(path); } } --- NEW FILE: SymbolIndex.java --- package org.rubypeople.rdt.internal.core.symbols; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Set; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.IPath; import org.jruby.lexer.yacc.ISourcePosition; public class SymbolIndex { private Map index = new HashMap(); public void add(ClassSymbol symbol, Location location) { Set locations = (Set) index.get(symbol); if (locations == null) { locations = new HashSet(); index.put(symbol, locations); } locations.add(location); } public Set find(ClassSymbol symbol) { Set locations = (Set) index.get(symbol); if (locations == null) return Collections.EMPTY_SET; return Collections.unmodifiableSet(locations); } public void flush(IPath foo_path) { // flush only relevant bits for (Iterator indexIter = index.entrySet().iterator(); indexIter.hasNext();) { Map.Entry entry = (Map.Entry) indexIter.next(); Set locations = (Set) entry.getValue(); for (Iterator locationIter = locations.iterator(); locationIter.hasNext();) { Location location = (Location) locationIter.next(); locationIter.remove(); } if (locations.isEmpty()) indexIter.remove(); } } // DSC DO public void add(ClassSymbol symbol, IFile file, ISourcePosition position) { // TODO Auto-generated method stub } } |
|
From: David C. <dc...@us...> - 2005-10-02 22:49:09
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8784/src/org/rubypeople/rdt/internal/core/builder Modified Files: RubyBuilder.java Added Files: SingleFileCompiler.java IFileFinder.java TaskCompiler.java MarkerManager.java ProjectFileFinder.java IoUtils.java RubyCompiler.java RdtCompiler.java IndexUpdater.java IMarkerManager.java IncrementalFileFinder.java Removed Files: WorkQueue.java Log Message: Refactored RubyBuilder into several smaller classes. Wrote UTs for a few of them. Began work on a SymbolIndex. --- WorkQueue.java DELETED --- --- NEW FILE: IFileFinder.java --- /** * */ package org.rubypeople.rdt.internal.core.builder; import java.util.List; import org.eclipse.core.runtime.CoreException; interface IFileFinder { public List findFiles() throws CoreException; } Index: RubyBuilder.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder/RubyBuilder.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** RubyBuilder.java 21 Sep 2005 18:58:37 -0000 1.12 --- RubyBuilder.java 1 Oct 2005 23:01:00 -0000 1.13 *************** *** 1,34 **** - /** - * - */ package org.rubypeople.rdt.internal.core.builder; - import java.io.IOException; - import java.io.InputStream; - import java.io.InputStreamReader; - import java.io.Reader; - import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Map; - import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; - import org.eclipse.core.resources.IResource; - import org.eclipse.core.resources.IResourceDelta; - import org.eclipse.core.resources.IResourceProxy; - import org.eclipse.core.resources.IResourceProxyVisitor; import org.eclipse.core.resources.IncrementalProjectBuilder; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; - import org.eclipse.core.runtime.OperationCanceledException; - import org.eclipse.core.runtime.preferences.IEclipsePreferences; - import org.jruby.lexer.yacc.SyntaxException; - import org.rubypeople.rdt.core.IRubyModelMarker; import org.rubypeople.rdt.core.RubyCore; - import org.rubypeople.rdt.internal.core.parser.MarkerUtility; - import org.rubypeople.rdt.internal.core.parser.RdtWarnings; - import org.rubypeople.rdt.internal.core.parser.RubyParser; - import org.rubypeople.rdt.internal.core.parser.TaskParser; /** --- 1,13 ---- *************** *** 38,288 **** public class RubyBuilder extends IncrementalProjectBuilder { ! private static final boolean DEBUG = false; ! private static final int MAX_AT_ONCE = 1000; ! private IProject currentProject; ! private int totalWork = 10000; ! private WorkQueue workQueue; ! private boolean compiledAllAtOnce; ! private int percentPerUnit = 0; ! private int grandTotal = 0; ! private RdtWarnings warnings; ! private RubyParser parser; ! private TaskParser taskParser; ! ! public RubyBuilder() { ! this.workQueue = new WorkQueue(); ! warnings = new RdtWarnings(); ! parser = new RubyParser(warnings); ! IEclipsePreferences preferences = RubyCore.getInstancePreferences(); ! taskParser = new TaskParser(preferences); ! } - /* - * (non-Javadoc) - * - * @see org.eclipse.core.resources.IncrementalProjectBuilder#build(int, - * java.util.Map, org.eclipse.core.runtime.IProgressMonitor) - */ protected IProject[] build(int kind, Map args, IProgressMonitor monitor) throws CoreException { ! monitor.beginTask("build", totalWork); IProject[] returnProjects = new IProject[0]; ! this.currentProject = getProject(); ! if (currentProject == null || !currentProject.isAccessible()) return returnProjects; ! ! checkCancel(monitor); ! if (kind == INCREMENTAL_BUILD || kind == AUTO_BUILD) { ! if (DEBUG) System.out.println("INCREMENTAL build..."); ! workQueue.clear(); ! IResourceDelta delta = getDelta(currentProject); ! List files = getAffectedFiles(delta.getAffectedChildren()); ! IFile[] fileArray = new IFile[files.size()]; ! System.arraycopy(files.toArray(), 0, fileArray, 0, fileArray.length); ! compile(fileArray, monitor); ! cleanUp(); ! return returnProjects; ! } ! build(monitor); ! cleanUp(); ! // FIXME Get the required projects as in JavaBuilder ! if (DEBUG) System.out.println("Finished build of " + currentProject.getName() //$NON-NLS-1$ ! + " @ " + new Date(System.currentTimeMillis())); //$NON-NLS-1$ return returnProjects; } ! private void cleanUp() { ! workQueue.clear(); ! percentPerUnit = 0; ! warnings.clear(); ! taskParser.clear(); ! } ! ! /** ! * Check whether the build has been canceled. ! * ! * @param monitor ! */ ! public void checkCancel(IProgressMonitor monitor) { ! if (monitor != null && monitor.isCanceled()) throw new OperationCanceledException(); ! } ! ! private List getAffectedFiles(IResourceDelta[] deltas) { ! List files = new ArrayList(); ! for (int i = 0; i < deltas.length; i++) { ! IResourceDelta curDelta = deltas[i]; ! // Skip removals, we don't want to parse those ! if (curDelta.getKind() == IResourceDelta.REMOVED) continue; ! IResource resource = curDelta.getResource(); ! if (resource.getType() == IResource.FOLDER || resource.getType() == IResource.PROJECT) { ! files.addAll(getAffectedFiles(curDelta.getAffectedChildren())); ! continue; ! } ! if (resource.getType() != IResource.FILE) continue; ! // FIXME This uses the Util class to check if teh filename looks like a ruby file, use behavior like RubyFileMatcher ! if (!org.rubypeople.rdt.internal.core.util.Util.isRubyLikeFileName(resource.getName())) continue; ! files.add(resource); ! } ! return files; ! } ! ! private void build(IProgressMonitor monitor) { ! if (DEBUG) System.out.println("FULL build"); //$NON-NLS-1$ ! ! try { ! RubyBuilder.removeProblemsAndTasksFor(currentProject); ! ! ArrayList sourceFiles = new ArrayList(33); ! addAllSourceFiles(sourceFiles); ! ! if (sourceFiles.size() > 0) { ! IFile[] allSourceFiles = new IFile[sourceFiles.size()]; ! sourceFiles.toArray(allSourceFiles); ! workQueue.clear(); ! workQueue.addAll(allSourceFiles); ! compile(allSourceFiles, monitor); ! } ! ! } catch (CoreException e) { ! // throw internalException(e); ! throw new RuntimeException(e); ! } ! } ! ! public static void removeProblemsAndTasksFor(IResource resource) { ! try { ! if (resource != null && resource.exists()) { ! resource.deleteMarkers(IRubyModelMarker.RUBY_MODEL_PROBLEM_MARKER, false, IResource.DEPTH_INFINITE); ! resource.deleteMarkers(IRubyModelMarker.TASK_MARKER, false, IResource.DEPTH_INFINITE); ! } ! } catch (CoreException e) { ! // assume there were no problems ! } ! } ! ! protected void addAllSourceFiles(final ArrayList sourceFiles) throws CoreException { ! currentProject.accept(new IResourceProxyVisitor() { ! ! public boolean visit(IResourceProxy proxy) throws CoreException { ! IResource resource = null; ! switch (proxy.getType()) { ! case IResource.FILE: ! if (org.rubypeople.rdt.internal.core.util.Util.isRubyLikeFileName(proxy.getName())) { ! if (resource == null) resource = proxy.requestResource(); ! sourceFiles.add(resource); ! } ! return false; ! } ! return true; ! } ! }, IResource.NONE); ! } ! ! /* ! * Compile the given elements, adding more elements to the work queue if ! * they are affected by the changes. ! */ ! protected void compile(IFile[] units, IProgressMonitor monitor) { ! if (units == null) return; ! int unitsLength = units.length; ! grandTotal = unitsLength; ! if (unitsLength == 0) return; ! percentPerUnit = totalWork / unitsLength; ! ! this.compiledAllAtOnce = unitsLength <= MAX_AT_ONCE; ! if (this.compiledAllAtOnce) { ! // do them all now ! doCompile(units, monitor); ! } else { ! int i = 0; ! boolean compilingFirstGroup = true; ! while (i < unitsLength) { ! int doNow = unitsLength < MAX_AT_ONCE ? unitsLength : MAX_AT_ONCE; ! int index = 0; ! IFile[] toCompile = new IFile[doNow]; ! while (i < unitsLength && index < doNow) { ! // Although it needed compiling when this method was called, ! // it may have ! // already been compiled when it was referenced by another ! // unit. ! IFile unit = units[i++]; ! if (compilingFirstGroup || workQueue.isWaiting(unit)) { ! toCompile[index++] = unit; ! } ! } ! if (index < doNow) System.arraycopy(toCompile, 0, toCompile = new IFile[index], 0, index); ! IFile[] additionalUnits = new IFile[unitsLength - i]; ! System.arraycopy(units, i, additionalUnits, 0, additionalUnits.length); ! compilingFirstGroup = false; ! doCompile(toCompile, monitor); ! } ! } ! } ! ! /* ! * Compile the given elements, adding more elements to the work queue if ! * they are affected by the changes. ! */ ! protected void doCompile(IFile[] units, IProgressMonitor monitor) { ! int unitsLength = units.length; ! if (unitsLength == 0) { ! monitor.worked(unitsLength * percentPerUnit); ! return; ! } ! ! // do them all now ! for (int i = 0; i < unitsLength; i++) { ! checkCancel(monitor); ! Reader reader = null; ! try { ! IFile file = units[i]; ! if (DEBUG) System.out.println("About to compile " + file); //$NON-NLS-1$ ! String name = file.getFullPath().makeRelative().toString(); ! monitor.subTask(name + ": (" + i + " of " + grandTotal + ")"); ! ! removeProblemsAndTasksFor(file); ! reader = new InputStreamReader(file.getContents()); ! try { ! parser.parse(units[i].getName(), reader); ! } catch (SyntaxException e) { ! MarkerUtility.createSyntaxError(file, e); ! } ! MarkerUtility.createProblemMarkers(file, warnings.getWarnings()); ! createTasks(file); ! monitor.worked(percentPerUnit); ! } catch (CoreException e) { ! RubyCore.log(e); ! } catch (IOException e) { ! RubyCore.log(e); ! } finally { ! try { ! reader.close(); ! } catch (IOException e) { ! e.printStackTrace(); ! } ! } ! warnings.clear(); ! } ! checkCancel(monitor); ! } ! private void createTasks(IFile file) throws CoreException, IOException { ! InputStream contents = file.getContents(); ! try { ! taskParser.clear(); ! taskParser.parse(new InputStreamReader(contents)); ! MarkerUtility.createTasks(file, taskParser.getTasks()); ! taskParser.clear(); ! } finally { ! closeSilently(contents); ! } ! } ! private void closeSilently(InputStream contents) { ! try { ! contents.close(); ! } catch (IOException e) { ! } ! } ! } --- 17,62 ---- public class RubyBuilder extends IncrementalProjectBuilder { ! private static final int TOTAL_WORK = 10000; ! private IProject currentProject; protected IProject[] build(int kind, Map args, IProgressMonitor monitor) throws CoreException { ! this.currentProject = getProject(); ! monitor.beginTask("build", TOTAL_WORK); IProject[] returnProjects = new IProject[0]; ! if (currentProject == null || !currentProject.isAccessible()) ! return returnProjects; ! ! RubyCore.trace("Started " + buildType(kind) + " build of " + buildDescription()); //$NON-NLS-1$ ! MarkerManager rubyMarkerManager = new MarkerManager(); ! if (!isPartialBuild(kind)) ! rubyMarkerManager.removeProblemsAndTasksFor(currentProject); ! ! List files = createFileFinder(kind).findFiles(); ! doCompile(files, monitor); ! RubyCore.trace("Finished build of " + buildDescription()); //$NON-NLS-1$ return returnProjects; } + private String buildType(int kind) { + return isPartialBuild(kind) ? "Incremental" : "Full"; + } + + private IFileFinder createFileFinder(int kind) { + if (isPartialBuild(kind)) + return new IncrementalFileFinder(getDelta(currentProject)); + return new ProjectFileFinder(currentProject); + } ! private String buildDescription() { ! return currentProject.getName() + " @ " + new Date(System.currentTimeMillis()); ! } ! private boolean isPartialBuild(int kind) { ! return kind == INCREMENTAL_BUILD || kind == AUTO_BUILD; ! } ! protected void doCompile(List files, IProgressMonitor monitor) { ! new RubyCompiler(TOTAL_WORK/files.size()).compile(files, monitor); ! }} --- NEW FILE: SingleFileCompiler.java --- /** * */ package org.rubypeople.rdt.internal.core.builder; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.CoreException; interface SingleFileCompiler { public void compileFile(IFile file) throws CoreException; } --- NEW FILE: MarkerManager.java --- package org.rubypeople.rdt.internal.core.builder; import java.util.List; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; import org.jruby.lexer.yacc.SyntaxException; import org.rubypeople.rdt.core.IRubyModelMarker; import org.rubypeople.rdt.internal.core.parser.MarkerUtility; import org.rubypeople.rdt.internal.core.parser.RdtPosition; import org.rubypeople.rdt.internal.core.parser.Warning; class MarkerManager implements IMarkerManager { public void removeProblemsAndTasksFor(IResource resource) { try { if (resource != null && resource.exists()) { resource.deleteMarkers(IRubyModelMarker.RUBY_MODEL_PROBLEM_MARKER, false, IResource.DEPTH_INFINITE); resource.deleteMarkers(IRubyModelMarker.TASK_MARKER, false, IResource.DEPTH_INFINITE); } } catch (CoreException e) { // assume there were no problems } } public void createSyntaxError(IFile file, SyntaxException e) { MarkerUtility.createSyntaxError(file, e); } public void createTasks(IFile file, List tasks) throws CoreException { MarkerUtility.createTasks(file, tasks); } public void addWarning(IFile file, String message) { addWarning(file,message, 1, 0, 0); } public void addWarning(IFile file, String message, int startLine, int startOffset, int endOffset) { MarkerUtility.createProblemMarker(file, new Warning(new RdtPosition(startLine, startOffset, endOffset), message)); } } --- NEW FILE: TaskCompiler.java --- /** * */ package org.rubypeople.rdt.internal.core.builder; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.CoreException; import org.rubypeople.rdt.core.RubyCore; import org.rubypeople.rdt.internal.core.parser.TaskParser; public final class TaskCompiler implements SingleFileCompiler { private final TaskParser taskParser; private final IMarkerManager markerManager; public TaskCompiler(IMarkerManager markerManager) { this(markerManager, new TaskParser(RubyCore.getInstancePreferences())); } public TaskCompiler(IMarkerManager markerManager, TaskParser taskParser) { this.taskParser = taskParser; this.markerManager = markerManager; } public void compileFile(IFile file) throws CoreException { InputStream contents = null; try { contents = file.getContents(); taskParser.clear(); taskParser.parse(new InputStreamReader(contents)); markerManager.createTasks(file, taskParser.getTasks()); taskParser.clear(); } catch (IOException e) { RubyCore.log(e); } finally { IoUtils.closeQuietly(contents); } } } --- NEW FILE: IMarkerManager.java --- package org.rubypeople.rdt.internal.core.builder; import java.util.List; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; import org.jruby.lexer.yacc.SyntaxException; public interface IMarkerManager { public void removeProblemsAndTasksFor(IResource resource); public void createSyntaxError(IFile file, SyntaxException e); public void createTasks(IFile file, List tasks) throws CoreException; public void addWarning(IFile file, String message); public void addWarning(IFile file, String message, int startLine, int startOffset, int endOffset); } --- NEW FILE: ProjectFileFinder.java --- /** * */ package org.rubypeople.rdt.internal.core.builder; import java.util.ArrayList; import java.util.List; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResourceProxy; import org.eclipse.core.resources.IResourceProxyVisitor; import org.eclipse.core.runtime.CoreException; final class ProjectFileFinder implements IFileFinder { private final IProject project; public ProjectFileFinder(IProject project) { this.project = project; } public List findFiles() throws CoreException { List files = new ArrayList(); addAllSourceFiles(files); return files; } protected void addAllSourceFiles(final List sourceFiles) throws CoreException { project.accept(new IResourceProxyVisitor() { public boolean visit(IResourceProxy proxy) throws CoreException { IResource resource = null; switch (proxy.getType()) { case IResource.FILE: if (org.rubypeople.rdt.internal.core.util.Util.isRubyLikeFileName(proxy.getName())) { if (resource == null) resource = proxy.requestResource(); sourceFiles.add(resource); } return false; } return true; } }, IResource.NONE); } } --- NEW FILE: RdtCompiler.java --- /** * */ package org.rubypeople.rdt.internal.core.builder; import java.io.InputStreamReader; import java.io.Reader; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.CoreException; import org.jruby.ast.Node; import org.jruby.lexer.yacc.SyntaxException; import org.rubypeople.rdt.internal.core.parser.ImmediateWarnings; import org.rubypeople.rdt.internal.core.parser.RubyParser; public final class RdtCompiler implements SingleFileCompiler { private final IMarkerManager markerManager; private RubyParser parser; private final IndexUpdater indexUpdater; public RdtCompiler(IMarkerManager markerManager) { this(markerManager, new RubyParser(new ImmediateWarnings(markerManager)), new IndexUpdater(null)); } public RdtCompiler(IMarkerManager markerManager, RubyParser parser, IndexUpdater indexUpdater) { this.markerManager = markerManager; this.parser = parser; this.indexUpdater = indexUpdater; } public void compileFile(IFile file) throws CoreException { Reader reader = new InputStreamReader(file.getContents()); try { Node rootNode = parser.parse(file, reader); // indexUpdater.update(file, rootNode); } catch (SyntaxException e) { markerManager.createSyntaxError(file, e); } finally { IoUtils.closeQuietly(reader); } } } --- NEW FILE: RubyCompiler.java --- /** * */ package org.rubypeople.rdt.internal.core.builder; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.OperationCanceledException; import org.rubypeople.rdt.core.RubyCore; class RubyCompiler { private int percentPerUnit = 0; private List compilers = new ArrayList(); private final MarkerManager rubyMarkerManager; public RubyCompiler(int percentPerUnit) { this.percentPerUnit = percentPerUnit; rubyMarkerManager = new MarkerManager(); this.compilers = createSingleFileCompilers(rubyMarkerManager); } private static List createSingleFileCompilers(MarkerManager rubyMarkerManager) { List compilers = new ArrayList(); compilers.add(new RdtCompiler(rubyMarkerManager)); compilers.add(new TaskCompiler(rubyMarkerManager)); return compilers; } public void compile(List units, IProgressMonitor monitor){ int unitsLength = units.size(); if (unitsLength == 0) { monitor.worked(unitsLength * percentPerUnit); return; } // do them all now // TODO figure out what to do with exceptions - add an error for the file? for (int i = 0; i < unitsLength; i++) { try { IFile file = (IFile) units.get(i); monitoredCompile(monitor, i, unitsLength, file); } catch (CoreException e) { RubyCore.log(e); } } } private void monitoredCompile(IProgressMonitor monitor, int fileNumber, int grandTotal, IFile file) throws CoreException { checkCancel(monitor); RubyCore.trace("About to compile " + file); //$NON-NLS-1$ String name = file.getFullPath().makeRelative().toString(); monitor.subTask(name + ": (" + fileNumber + " of " + grandTotal + ")"); rubyMarkerManager.removeProblemsAndTasksFor(file); runCompilers(file); monitor.worked(percentPerUnit); } private void runCompilers(IFile file) throws CoreException { for (Iterator iter = compilers.iterator(); iter.hasNext();) { SingleFileCompiler compiler = (SingleFileCompiler) iter.next(); compiler.compileFile(file); } } private void checkCancel(IProgressMonitor monitor) { if (monitor != null && monitor.isCanceled()) throw new OperationCanceledException(); } } --- NEW FILE: IoUtils.java --- package org.rubypeople.rdt.internal.core.builder; import java.io.IOException; import java.io.InputStream; import java.io.Reader; import org.rubypeople.rdt.core.RubyCore; public class IoUtils { static void closeQuietly(Reader reader) { try { reader.close(); } catch (IOException e) { RubyCore.log(e); } } static void closeQuietly(InputStream contents) { try { contents.close(); } catch (IOException e) { RubyCore.log(e); } } public static String readAll(Reader reader) throws IOException { StringBuffer result = new StringBuffer(); char[] buffer = new char[1024]; while (true) { int bytesRead = reader.read(buffer); if (bytesRead <= 0) return result.toString(); result.append(buffer, 0, bytesRead); } } public static String readAllQuietly(Reader reader) { try { return readAll(reader); } catch (IOException e) { throw new RuntimeException(); } } } --- NEW FILE: IndexUpdater.java --- package org.rubypeople.rdt.internal.core.builder; import org.eclipse.core.resources.IFile; import org.jruby.ast.ClassNode; import org.jruby.ast.Node; import org.rubypeople.rdt.internal.core.symbols.ClassSymbol; import org.rubypeople.rdt.internal.core.symbols.SymbolIndex; public class IndexUpdater { private final SymbolIndex index; public IndexUpdater(SymbolIndex index) { this.index = index; } public void update(IFile file, Node rootNode) { index.flush(file.getFullPath()); if (rootNode instanceof ClassNode) { ClassNode classNode = (ClassNode) rootNode; index.add(new ClassSymbol(classNode.getClassName()), file, classNode.getPosition()); } } } --- NEW FILE: IncrementalFileFinder.java --- /** * */ package org.rubypeople.rdt.internal.core.builder; import java.util.ArrayList; import java.util.List; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResourceDelta; class IncrementalFileFinder implements IFileFinder { private final IResourceDelta delta; IncrementalFileFinder(IResourceDelta delta) { super(); this.delta = delta; } public List findFiles() { return getAffectedFiles(delta.getAffectedChildren()); } private List getAffectedFiles(IResourceDelta[] deltas) { List files = new ArrayList(); for (int i = 0; i < deltas.length; i++) { IResourceDelta curDelta = deltas[i]; // Skip removals, we don't want to parse those if (curDelta.getKind() == IResourceDelta.REMOVED) continue; IResource resource = curDelta.getResource(); if (isContainer(resource)) { files.addAll(getAffectedFiles(curDelta.getAffectedChildren())); continue; } if (isFile(resource)) continue; // FIXME This uses the Util class to check if teh filename looks like a ruby file, use behavior like RubyFileMatcher if (!isRubyResource(resource)) continue; files.add(resource); } return files; } private boolean isContainer(IResource resource) { return resource.getType() == IResource.FOLDER || resource.getType() == IResource.PROJECT; } private boolean isFile(IResource resource) { return resource.getType() != IResource.FILE; } private boolean isRubyResource(IResource resource) { return org.rubypeople.rdt.internal.core.util.Util.isRubyLikeFileName(resource.getName()); } } |
|
From: David C. <dc...@us...> - 2005-10-02 22:40:50
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.ui.tests/src/org/rubypeople/rdt/internal/debug/ui/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12580/src/org/rubypeople/rdt/internal/debug/ui/tests Modified Files: TC_RubyConsoleTracker.java Log Message: Cleanup a whole bunch of 'unused warnings" Index: TC_RubyConsoleTracker.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.ui.tests/src/org/rubypeople/rdt/internal/debug/ui/tests/TC_RubyConsoleTracker.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TC_RubyConsoleTracker.java 13 Jul 2005 14:29:55 -0000 1.3 --- TC_RubyConsoleTracker.java 1 Oct 2005 23:11:05 -0000 1.4 *************** *** 16,20 **** import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.IRegion; - import org.eclipse.jface.text.hyperlink.IHyperlink; import org.eclipse.ui.console.IOConsoleOutputStream; import org.eclipse.ui.console.IPatternMatchListener; --- 16,19 ---- |
|
From: David C. <dc...@us...> - 2005-10-02 22:40:39
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/symbols In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8654/src/org/rubypeople/rdt/internal/core/symbols Log Message: Directory /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/symbols added to the repository |
|
From: David C. <dc...@us...> - 2005-10-02 22:32:19
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.core.tests/src/org/rubypeople/rdt/debug/core/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12368/src/org/rubypeople/rdt/debug/core/tests Modified Files: TC_DebuggerCommunicationTest.java Log Message: Cleanup a whole bunch of 'unused warnings" Index: TC_DebuggerCommunicationTest.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.core.tests/src/org/rubypeople/rdt/debug/core/tests/TC_DebuggerCommunicationTest.java,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** TC_DebuggerCommunicationTest.java 18 Sep 2005 14:40:45 -0000 1.36 --- TC_DebuggerCommunicationTest.java 1 Oct 2005 23:10:38 -0000 1.37 *************** *** 8,15 **** import java.net.Socket; - import junit.framework.Assert; import junit.framework.TestCase; - import org.jruby.internal.runtime.ThreadService; import org.rubypeople.rdt.core.RubyCore; import org.rubypeople.rdt.internal.debug.core.ExceptionSuspensionPoint; --- 8,13 ---- |
|
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")); |
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8784/src/org/rubypeople/rdt/internal/core/parser Modified Files: MarkerUtility.java RubyParser.java RdtWarnings.java Added Files: ImmediateWarnings.java IRdtWarnings.java Log Message: Refactored RubyBuilder into several smaller classes. Wrote UTs for a few of them. Began work on a SymbolIndex. Index: MarkerUtility.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser/MarkerUtility.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MarkerUtility.java 6 Aug 2005 12:55:10 -0000 1.8 --- MarkerUtility.java 1 Oct 2005 23:01:01 -0000 1.9 *************** *** 68,76 **** } ! /** ! * @param underlyingResource ! * @param problem ! */ ! private static void createProblemMarker(IResource underlyingResource, IProblem problem) { try { IMarker marker = underlyingResource.createMarker(IRubyModelMarker.RUBY_MODEL_PROBLEM_MARKER); --- 68,72 ---- } ! public static void createProblemMarker(IResource underlyingResource, IProblem problem) { try { IMarker marker = underlyingResource.createMarker(IRubyModelMarker.RUBY_MODEL_PROBLEM_MARKER); Index: RdtWarnings.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser/RdtWarnings.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RdtWarnings.java 30 Mar 2005 00:12:29 -0000 1.3 --- RdtWarnings.java 1 Oct 2005 23:01:01 -0000 1.4 *************** *** 8,12 **** import java.util.List; ! import org.jruby.common.IRubyWarnings; import org.jruby.lexer.yacc.ISourcePosition; --- 8,12 ---- import java.util.List; ! import org.eclipse.core.resources.IFile; import org.jruby.lexer.yacc.ISourcePosition; *************** *** 14,18 **** * @author Chris */ ! public class RdtWarnings implements IRubyWarnings { private List warnings; --- 14,18 ---- * @author Chris */ ! public class RdtWarnings implements IRdtWarnings { private List warnings; *************** *** 77,79 **** --- 77,82 ---- } + public void setFile(IFile file) { + } + } Index: RubyParser.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser/RubyParser.java,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** RubyParser.java 4 Mar 2005 23:31:09 -0000 1.35 --- RubyParser.java 1 Oct 2005 23:01:01 -0000 1.36 *************** *** 5,12 **** import java.io.Reader; - import java.io.StringReader; import org.jruby.ast.Node; - import org.jruby.common.IRubyWarnings; import org.jruby.common.NullWarnings; import org.jruby.lexer.yacc.LexerSource; --- 5,11 ---- import java.io.Reader; + import org.eclipse.core.resources.IFile; import org.jruby.ast.Node; import org.jruby.common.NullWarnings; import org.jruby.lexer.yacc.LexerSource; *************** *** 22,66 **** public class RubyParser { ! private final RubyParserPool pool; ! private IRubyWarnings warnings; private static boolean isDebug; public RubyParser() { ! this(new NullWarnings()); } ! public RubyParser(IRubyWarnings warnings) { this.warnings = warnings; this.pool = RubyParserPool.getInstance(); } ! public Node parse(String file, String content) { ! return parse(file, new StringReader(content)); ! } ! ! public Node parse(String file, Reader content) { ! return parse(file, content, new RubyParserConfiguration()); ! } ! ! private Node parse(String file, Reader content, RubyParserConfiguration config) { DefaultRubyParser parser = null; ! RubyParserResult result = null; ! try { ! parser = pool.borrowParser(); ! parser.setWarnings(warnings); ! parser.init(config); ! LexerSource lexerSource = new LexerSource(file, content, new RdtPositionFactory()); ! result = parser.parse(lexerSource); ! } catch (SyntaxException e) { ! throw e; ! } finally { ! pool.returnParser(parser); ! } ! return result.getAST(); } - /** - * @param b - */ public static void setDebugging(boolean b) { isDebug = b; --- 21,55 ---- public class RubyParser { ! private final RubyParserPool pool; ! private IRdtWarnings warnings; private static boolean isDebug; public RubyParser() { ! this(new NullRdtWarnings()); } ! public RubyParser(IRdtWarnings warnings) { this.warnings = warnings; this.pool = RubyParserPool.getInstance(); } ! public Node parse(IFile file, Reader content) { DefaultRubyParser parser = null; ! RubyParserResult result = null; ! try { ! warnings.setFile(file); ! parser = pool.borrowParser(); ! parser.setWarnings(warnings); ! parser.init(new RubyParserConfiguration()); ! LexerSource lexerSource = new LexerSource(file.getName(), content, new RdtPositionFactory()); ! result = parser.parse(lexerSource); ! } catch (SyntaxException e) { ! throw e; ! } finally { ! pool.returnParser(parser); ! } ! return result.getAST(); } public static void setDebugging(boolean b) { isDebug = b; *************** *** 68,74 **** public static boolean isDebugging() { - // TODO Auto-generated method stub return isDebug; } } \ No newline at end of file --- 57,68 ---- public static boolean isDebugging() { return isDebug; } + private static class NullRdtWarnings extends NullWarnings implements IRdtWarnings { + public void setFile(IFile file) { + } + } + + } \ No newline at end of file --- NEW FILE: ImmediateWarnings.java --- package org.rubypeople.rdt.internal.core.parser; import org.eclipse.core.resources.IFile; import org.jruby.lexer.yacc.ISourcePosition; import org.rubypeople.rdt.internal.core.builder.IMarkerManager; public class ImmediateWarnings implements IRdtWarnings { private IFile file; private IMarkerManager markerManager; public ImmediateWarnings(IMarkerManager markerManager) { this.markerManager = markerManager; } public void warning(String message) { warn(new RdtPosition(1, 0, 0), message); } public void warning(ISourcePosition position, String message) { warn(position, message); } public void warn(ISourcePosition position, String message) { markerManager.addWarning(file, message, position.getStartLine(), position.getStartOffset(), position.getEndOffset()); } public void warn(String message) { markerManager.addWarning(file, message); } public boolean isVerbose() { return true; } public void setFile(IFile file) { this.file = file; } } --- NEW FILE: IRdtWarnings.java --- package org.rubypeople.rdt.internal.core.parser; import org.eclipse.core.resources.IFile; import org.jruby.common.IRubyWarnings; public interface IRdtWarnings extends IRubyWarnings { public void setFile(IFile file); } |
|
From: David C. <dc...@us...> - 2005-10-02 22:14:39
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8784/src/org/rubypeople/rdt/core Modified Files: RubyCore.java Log Message: Refactored RubyBuilder into several smaller classes. Wrote UTs for a few of them. Began work on a SymbolIndex. Index: RubyCore.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/RubyCore.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** RubyCore.java 26 Sep 2005 21:48:31 -0000 1.14 --- RubyCore.java 1 Oct 2005 23:01:01 -0000 1.15 *************** *** 226,230 **** } ! /** * @since 3.1 */ --- 226,234 ---- } ! public static void trace(String message) { ! if (getPlugin().isDebugging()) System.out.println(message); ! } ! ! /** * @since 3.1 */ |
|
From: David C. <dc...@us...> - 2005-10-02 22:11:53
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/META-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8784/META-INF Modified Files: MANIFEST.MF Log Message: Refactored RubyBuilder into several smaller classes. Wrote UTs for a few of them. Began work on a SymbolIndex. Index: MANIFEST.MF =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/META-INF/MANIFEST.MF,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MANIFEST.MF 21 Sep 2005 21:59:05 -0000 1.4 --- MANIFEST.MF 1 Oct 2005 23:01:00 -0000 1.5 *************** *** 45,48 **** --- 45,49 ---- org.rubypeople.rdt.internal.core.builder, org.rubypeople.rdt.internal.core.parser, + org.rubypeople.rdt.internal.core.symbols, org.rubypeople.rdt.internal.core.util, org.rubypeople.rdt.internal.formatter |
|
From: David C. <dc...@us...> - 2005-10-02 21:53:14
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/symbols In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8616/src/org/rubypeople/rdt/internal/core/symbols Log Message: Directory /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/symbols added to the repository |
|
From: David C. <dc...@us...> - 2005-10-02 21:48:50
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8729/src/org/rubypeople/rdt/internal/core Modified Files: TS_Core.java Log Message: Refactored RubyBuilder into several smaller classes. Wrote UTs for a few of them. Began work on a SymbolIndex. Index: TS_Core.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/TS_Core.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TS_Core.java 6 Aug 2005 22:57:28 -0000 1.3 --- TS_Core.java 1 Oct 2005 23:00:54 -0000 1.4 *************** *** 1,9 **** package org.rubypeople.rdt.internal.core; - import org.rubypeople.rdt.internal.core.parser.TC_TaskParser; - import junit.framework.Test; import junit.framework.TestSuite; public class TS_Core { --- 1,11 ---- package org.rubypeople.rdt.internal.core; import junit.framework.Test; import junit.framework.TestSuite; + import org.rubypeople.rdt.internal.core.builder.TS_CoreBuilder; + import org.rubypeople.rdt.internal.core.parser.TS_CoreParser; + import org.rubypeople.rdt.internal.core.symbols.TS_CoreSymbols; + public class TS_Core { *************** *** 14,18 **** suite.addTestSuite(TC_RubyCore.class); suite.addTestSuite(TC_RubyProject.class); ! suite.addTestSuite(TC_TaskParser.class); return suite; --- 16,22 ---- suite.addTestSuite(TC_RubyCore.class); suite.addTestSuite(TC_RubyProject.class); ! suite.addTest(TS_CoreBuilder.suite()); ! suite.addTest(TS_CoreParser.suite()); ! suite.addTest(TS_CoreSymbols.suite()); return suite; |
|
From: David C. <dc...@us...> - 2005-10-02 21:42:26
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.tests.all/src/org/rubypeople/rdt/tests/all In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8102/src/org/rubypeople/rdt/tests/all Modified Files: TS_RdtAllUnitTests.java TS_RdtAllFunctionalTests.java Log Message: Added additional UTs for launching. Moved tests to the correct package. Slight refactoring of launching code. Index: TS_RdtAllFunctionalTests.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.tests.all/src/org/rubypeople/rdt/tests/all/TS_RdtAllFunctionalTests.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TS_RdtAllFunctionalTests.java 18 Sep 2005 14:20:53 -0000 1.1 --- TS_RdtAllFunctionalTests.java 1 Oct 2005 22:58:05 -0000 1.2 *************** *** 8,12 **** import org.rubypeople.rdt.debug.core.tests.TS_Debug; import org.rubypeople.rdt.internal.debug.ui.tests.launcher.TS_Launcher; ! import org.rubypeople.rdt.internal.launching.tests.TS_Launching; import org.rubypeople.rdt.internal.ui.TS_UiTests; --- 8,12 ---- import org.rubypeople.rdt.debug.core.tests.TS_Debug; import org.rubypeople.rdt.internal.debug.ui.tests.launcher.TS_Launcher; ! import org.rubypeople.rdt.internal.launching.TS_Launching; import org.rubypeople.rdt.internal.ui.TS_UiTests; Index: TS_RdtAllUnitTests.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.tests.all/src/org/rubypeople/rdt/tests/all/TS_RdtAllUnitTests.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TS_RdtAllUnitTests.java 18 Sep 2005 14:20:53 -0000 1.1 --- TS_RdtAllUnitTests.java 1 Oct 2005 22:58:05 -0000 1.2 *************** *** 8,12 **** import org.rubypeople.rdt.debug.core.tests.TS_Debug; import org.rubypeople.rdt.internal.debug.ui.tests.launcher.TS_Launcher; ! import org.rubypeople.rdt.internal.launching.tests.TS_Launching; import org.rubypeople.rdt.internal.ui.TS_UiTests; --- 8,12 ---- import org.rubypeople.rdt.debug.core.tests.TS_Debug; import org.rubypeople.rdt.internal.debug.ui.tests.launcher.TS_Launcher; ! import org.rubypeople.rdt.internal.launching.TS_Launching; import org.rubypeople.rdt.internal.ui.TS_UiTests; |