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 21:35:57
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12486/src/org/rubypeople/rdt/testunit/launcher Modified Files: TestUnitMainTab.java TestUnitRunnerConfiguration.java Log Message: Cleanup a whole bunch of 'unused warnings" Index: TestUnitRunnerConfiguration.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitRunnerConfiguration.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** TestUnitRunnerConfiguration.java 25 Sep 2005 17:56:54 -0000 1.14 --- TestUnitRunnerConfiguration.java 1 Oct 2005 23:10:52 -0000 1.15 *************** *** 10,14 **** import org.rubypeople.rdt.core.RubyCore; import org.rubypeople.rdt.internal.launching.InterpreterRunnerConfiguration; - import org.rubypeople.rdt.internal.launching.RdtLaunchingPlugin; import org.rubypeople.rdt.testunit.TestunitPlugin; --- 10,13 ---- Index: TestUnitMainTab.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitMainTab.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** TestUnitMainTab.java 28 Mar 2005 23:23:23 -0000 1.13 --- TestUnitMainTab.java 1 Oct 2005 23:10:52 -0000 1.14 *************** *** 65,69 **** private RubyClassSelector classSelector; protected ElementListSelectionDialog dialog; - private IProject rubyProject; protected String lastProject = ""; protected String lastFile = ""; --- 65,68 ---- |
|
From: David C. <dc...@us...> - 2005-10-02 21:31: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-serv8729/src/org/rubypeople/rdt/internal/core/builder Added Files: TC_TaskCompiler.java IndexUpdater_UT.java ShamMarkerManager.java ShamRubyParser.java TS_CoreBuilder.java TC_RdtCompiler.java Log Message: Refactored RubyBuilder into several smaller classes. Wrote UTs for a few of them. Began work on a SymbolIndex. --- NEW FILE: TC_TaskCompiler.java --- package org.rubypeople.rdt.internal.core.builder; import java.io.IOException; import java.io.Reader; import java.util.ArrayList; import java.util.Collections; import java.util.List; import junit.framework.TestCase; import org.rubypeople.eclipse.shams.resources.ShamFile; import org.rubypeople.eclipse.shams.runtime.ShamPreferences; import org.rubypeople.rdt.internal.core.parser.TaskParser; import org.rubypeople.rdt.internal.core.parser.TaskTag; public class TC_TaskCompiler extends TestCase { private static final TaskTag TASK_TAG = new TaskTag("",0,0,0,0); private ShamMarkerManager markerManager; private ShamTaskParser taskParser; private TaskCompiler taskCompiler; private ShamFile file; private static class ShamTaskParser extends TaskParser { private String contents; private List tasks = new ArrayList(); public ShamTaskParser() { super(new ShamPreferences()); } public void parse(Reader reader) throws IOException { contents = IoUtils.readAll(reader); } public List getTasks() { return tasks; } public void assertFileContents(String expectedContents) { assertEquals(expectedContents, contents); } public void addTaskToReturn(TaskTag taskTag) { tasks.add(taskTag); } } public void setUp() { markerManager = new ShamMarkerManager(); taskParser = new ShamTaskParser(); taskCompiler = new TaskCompiler(markerManager, taskParser); file = new ShamFile(""); file.setContents("fileContents"); } public void testCompile() throws Exception { taskParser.addTaskToReturn(TASK_TAG); taskCompiler.compileFile(file); taskParser.assertFileContents("fileContents"); markerManager.assertTasksCreated(file, Collections.singletonList(TASK_TAG)); } } --- NEW FILE: ShamRubyParser.java --- package org.rubypeople.rdt.internal.core.builder; import java.io.Reader; import junit.framework.Assert; import org.eclipse.core.resources.IFile; import org.jruby.ast.Node; import org.jruby.lexer.yacc.SyntaxException; import org.rubypeople.rdt.internal.core.parser.RubyParser; public class ShamRubyParser extends RubyParser { private IFile fileArg; private String contentArg; private SyntaxException syntaxException; private Node parseResult; public Node parse(IFile file, Reader reader) { fileArg = file; contentArg = IoUtils.readAllQuietly(reader); if (syntaxException != null) throw syntaxException; return parseResult; } public void assertParsed(IFile expectedFile, String expectedContent) { Assert.assertEquals("File", expectedFile, fileArg); Assert.assertEquals("Content", expectedContent, contentArg); } public void setExceptionToThrow(SyntaxException syntaxException) { this.syntaxException = syntaxException; } public void setParseResult(Node parseResult) { this.parseResult = parseResult; } } --- NEW FILE: TC_RdtCompiler.java --- package org.rubypeople.rdt.internal.core.builder; import junit.framework.TestCase; import org.eclipse.core.resources.IFile; import org.jruby.ast.Node; import org.jruby.ast.visitor.NodeVisitor; 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 { private static final String FILE_CONTENTS = "file Contents"; private static final String FILENAME = "testFile.rb"; private ShamFile file; private ShamMarkerManager markerManager; private ShamRubyParser parser; private RdtCompiler compiler; private MockIndexUpdater indexUpdater; private Node rootNode; public void setUp() { file = new ShamFile(FILENAME); file.setContents(FILE_CONTENTS); rootNode = new Node() { public void accept(NodeVisitor visitor) { } }; markerManager = new ShamMarkerManager(); parser = new ShamRubyParser(); parser.setParseResult(rootNode); indexUpdater = new MockIndexUpdater(); compiler = new RdtCompiler(markerManager, parser, indexUpdater); } public void testParserInvocation() throws Exception { compiler.compileFile(file); parser.assertParsed(file, FILE_CONTENTS); file.assertContentStreamClosed(); // DSC // indexUpdater.assertUpdated(file, rootNode); } public void testSyntaxException() throws Exception { SyntaxException syntaxException = new SyntaxException(null, ""); parser.setExceptionToThrow(syntaxException); compiler.compileFile(file); file.assertContentStreamClosed(); markerManager.assertErrorCreated(file, syntaxException); } private static final class MockIndexUpdater extends IndexUpdater { public MockIndexUpdater() { super(null); } private Node rootNodeArg; private IFile fileArg; public void update(IFile file, Node rootNode) { fileArg = file; rootNodeArg = rootNode; } public void assertUpdated(IFile expectedFile, Node expectedRootNode) { assertEquals("File", expectedFile, fileArg); assertEquals("Node", expectedRootNode, rootNodeArg); } } } --- NEW FILE: ShamMarkerManager.java --- /** * */ package org.rubypeople.rdt.internal.core.builder; import java.util.List; import junit.framework.Assert; 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.eclipse.shams.resources.ShamFile; public class ShamMarkerManager implements IMarkerManager { private IFile fileArg; private List tasksArg; private String messageArg; private int lineArg; private int startOffsetArg; private int endOffsetArg; private SyntaxException syntaxExceptionArg; public void removeProblemsAndTasksFor(IResource resource) { } public void createSyntaxError(IFile file, SyntaxException syntaxException) { fileArg = file; syntaxExceptionArg = syntaxException; } public void assertErrorCreated(ShamFile expectedFile, SyntaxException expectedSyntaxException) { Assert.assertEquals("file", expectedFile, fileArg); Assert.assertEquals("syntaxException", expectedSyntaxException, syntaxExceptionArg); } public void createTasks(IFile file, List tasks) throws CoreException { fileArg = file; tasksArg = tasks; } public void assertTasksCreated(IFile expectedFile, List expectedTasks) { Assert.assertEquals("file", expectedFile, fileArg); Assert.assertEquals("tasks", expectedTasks, tasksArg); } public void assertWarningAdded(IFile file, String message) { Assert.assertEquals("File", file, fileArg); Assert.assertEquals("Warning Message", message, messageArg); } public void addWarning(IFile file, String message) { fileArg = file; messageArg = message; } public void assertWarningAdded(IFile file, String message, int line, int startOffset, int endOffset) { Assert.assertEquals("File", file, fileArg); Assert.assertEquals("Warning Message", message, messageArg); Assert.assertEquals("line", line, lineArg); Assert.assertEquals("startOffset", startOffset, startOffsetArg); Assert.assertEquals("endOffset", endOffset, endOffsetArg); } public void addWarning(IFile file, String message, int line, int startOffset, int endOffset) { fileArg = file; messageArg = message; lineArg = line; startOffsetArg = startOffset; endOffsetArg = endOffset; } } --- NEW FILE: IndexUpdater_UT.java --- package org.rubypeople.rdt.internal.core.builder; import junit.framework.TestCase; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.IPath; import org.jruby.ast.ClassNode; import org.jruby.ast.Node; import org.jruby.ast.TrueNode; import org.jruby.lexer.yacc.ISourcePosition; import org.rubypeople.eclipse.shams.resources.ShamFile; import org.rubypeople.rdt.internal.core.parser.RdtPosition; import org.rubypeople.rdt.internal.core.symbols.ClassSymbol; import org.rubypeople.rdt.internal.core.symbols.SymbolIndex; public class IndexUpdater_UT extends TestCase { private static final RdtPosition POSITION_1 = new RdtPosition(1,2,3); private static final String TEST_CLASS_NAME = "TestClassName"; private IndexUpdater updater; private ShamFile file; private MockSymbolIndex symbolIndex; public void setUp() { file = new ShamFile("TestFile.rb"); symbolIndex = new MockSymbolIndex(); updater = new IndexUpdater(symbolIndex); } public void testIrrelevantNodes() { Node node = new TrueNode(POSITION_1); updater.update(file, node); symbolIndex.assertFlushed(file.getFullPath()); symbolIndex.assertAddNotCalled(); } public void testSimple() { Node node = new ClassNode(POSITION_1, TEST_CLASS_NAME, null, null); updater.update(file, node); symbolIndex.assertFlushed(file.getFullPath()); symbolIndex.assertAdded(new ClassSymbol(TEST_CLASS_NAME), file, POSITION_1); } private static class MockSymbolIndex extends SymbolIndex { private IFile fileArg; private ClassSymbol symbolArg; private ISourcePosition positionArg; private IPath flushedPathArg; public void flush(IPath path) { flushedPathArg = path; } public void assertFlushed(IPath expectedPath) { assertEquals("Flushed path", expectedPath, flushedPathArg); } public void assertAddNotCalled() { assertNull("Unexpected call to assertAddNotCalled()", fileArg); } public void assertAdded(ClassSymbol expectedSymbol, IFile expectedFile, ISourcePosition expectedPosition) { assertEquals("Symbol", expectedSymbol, symbolArg); assertEquals("File", expectedFile, fileArg); assertEquals("Position", expectedPosition, positionArg); } public void add(ClassSymbol symbol, IFile file, ISourcePosition position) { symbolArg = symbol; fileArg = file; positionArg = position; } } } --- NEW FILE: TS_CoreBuilder.java --- package org.rubypeople.rdt.internal.core.builder; import junit.framework.Test; import junit.framework.TestSuite; public class TS_CoreBuilder { public static Test suite() { TestSuite suite = new TestSuite(); suite.addTestSuite(TC_TaskCompiler.class); suite.addTestSuite(TC_RdtCompiler.class); return suite; } } |
|
From: David C. <dc...@us...> - 2005-10-02 21:07:58
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8073/src/org/rubypeople/rdt/internal/launching/tests Removed Files: EvaluateRubyProcessOutput.java TC_ArgumentSplitter.java TS_Launching.java TC_RubyInterpreter.java TC_RubyRuntime.java TC_RunnerLaunching.java Log Message: Added additional UTs for launching. Moved tests to the correct package. Slight refactoring of launching code. --- TC_RubyRuntime.java DELETED --- --- TC_RunnerLaunching.java DELETED --- --- TS_Launching.java DELETED --- --- TC_RubyInterpreter.java DELETED --- --- TC_ArgumentSplitter.java DELETED --- --- EvaluateRubyProcessOutput.java DELETED --- |
|
From: David C. <dc...@us...> - 2005-10-02 21:07:58
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8073/src/org/rubypeople/rdt/internal/launching Added Files: EvaluateRubyProcessOutput.java TS_Launching.java ShamProcess.java TC_RubyInterpreter.java TC_RunnerLaunching.java TC_ArgumentSplitter.java TC_RubyRuntime.java Log Message: Added additional UTs for launching. Moved tests to the correct package. Slight refactoring of launching code. --- NEW FILE: ShamProcess.java --- /** * */ package org.rubypeople.rdt.internal.launching; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.io.OutputStream; public class ShamProcess extends Process { public void destroy() { } public int exitValue() { return 0; } public InputStream getErrorStream() { return new ByteArrayInputStream(new byte[0]); } public InputStream getInputStream() { return new ByteArrayInputStream(new byte[0]); } public OutputStream getOutputStream() { return new ByteArrayOutputStream(1024); } public int waitFor() throws InterruptedException { return 0; } } --- NEW FILE: TC_RubyRuntime.java --- package org.rubypeople.rdt.internal.launching; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.io.Reader; import java.io.StringReader; import java.io.StringWriter; import java.io.Writer; import java.util.Arrays; import java.util.List; import junit.framework.TestCase; import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFileState; import org.eclipse.core.resources.IMarker; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProjectDescription; import org.eclipse.core.resources.IResourceProxyVisitor; import org.eclipse.core.resources.IResourceVisitor; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.ResourceAttributes; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.QualifiedName; import org.eclipse.core.runtime.content.IContentDescription; import org.eclipse.core.runtime.jobs.ISchedulingRule; import org.rubypeople.rdt.internal.launching.RubyInterpreter; import org.rubypeople.rdt.internal.launching.RubyRuntime; public class TC_RubyRuntime extends TestCase { protected StringWriter runtimeConfigurationWriter = new StringWriter(); public TC_RubyRuntime(String name) { super(name); } public void testGetInstalledInterpreters() { ShamRubyRuntime runtime = new ShamRubyRuntime(); RubyInterpreter interpreterOne = new RubyInterpreter("InterpreterOne", new Path("C:/RubyInstallRootOne")); RubyInterpreter interpreterTwo = new RubyInterpreter("InterpreterTwo", new Path("C:/RubyInstallRootTwo")); assertTrue("Runtime should contain all interpreters.", runtime.getInstalledInterpreters().containsAll(Arrays.asList(new Object[] { interpreterOne, interpreterTwo }))); assertTrue("interpreterTwo should be selected interpreter.", runtime.getSelectedInterpreter().equals(interpreterTwo)); } public void testSetInstalledInterpreters() { ShamRubyRuntime runtime = new ShamRubyRuntime(); RubyInterpreter interpreterOne = new RubyInterpreter("InterpreterOne", new Path("C:/RubyInstallRootOne")); runtime.setInstalledInterpreters(Arrays.asList(new Object[] { interpreterOne })); runtime.saveRuntimeConfiguration() ; assertEquals("XML should indicate only one interpreter with it being the selected.", "<?xml version=\"1.0\" encoding=\"UTF-8\"?><runtimeconfig><interpreter name=\"InterpreterOne\" path=\"C:/RubyInstallRootOne\" selected=\"true\"/></runtimeconfig>", runtimeConfigurationWriter.toString()); RubyInterpreter interpreterTwo = new RubyInterpreter("InterpreterTwo", new Path("C:/RubyInstallRootTwo")); runtime.setInstalledInterpreters(Arrays.asList(new Object[] { interpreterOne, interpreterTwo })); runtime.saveRuntimeConfiguration() ; assertEquals("XML should indicate both interpreters with the first one being selected.", "<?xml version=\"1.0\" encoding=\"UTF-8\"?><runtimeconfig><interpreter name=\"InterpreterOne\" path=\"C:/RubyInstallRootOne\" selected=\"true\"/><interpreter name=\"InterpreterTwo\" path=\"C:/RubyInstallRootTwo\"/></runtimeconfig>", runtimeConfigurationWriter.toString()); runtime.setSelectedInterpreter(interpreterTwo); runtime.saveRuntimeConfiguration() ; assertEquals("XML should indicate selected interpreter change.", "<?xml version=\"1.0\" encoding=\"UTF-8\"?><runtimeconfig><interpreter name=\"InterpreterOne\" path=\"C:/RubyInstallRootOne\"/><interpreter name=\"InterpreterTwo\" path=\"C:/RubyInstallRootTwo\" selected=\"true\"/></runtimeconfig>", runtimeConfigurationWriter.toString()); } protected class ShamRubyRuntime extends RubyRuntime { protected ShamRubyRuntime() { super(); } protected Reader getRuntimeConfigurationReader() { return new StringReader("<?xml version=\"1.0\" encoding=\"UTF-8\"?><runtimeconfig><interpreter name=\"InterpreterOne\" path=\"C:/RubyInstallRootOne\"/><interpreter name=\"InterpreterTwo\" path=\"C:/RubyInstallRootTwo\" selected=\"true\"/></runtimeconfig>"); } protected Writer getRuntimeConfigurationWriter() { return runtimeConfigurationWriter; } public void setInstalledInterpreters(List newInstalledInterpreters) { super.setInstalledInterpreters(newInstalledInterpreters); } public void saveRuntimeConfiguration() { runtimeConfigurationWriter = new StringWriter(); super.saveRuntimeConfiguration() ; } } protected class RuntimeConfigurationFile implements IFile { protected RuntimeConfigurationFile() {} public void setCharset(String newCharset, IProgressMonitor monitor) throws CoreException { } public void appendContents(InputStream source, boolean force, boolean keepHistory, IProgressMonitor monitor) throws CoreException {} public void appendContents(InputStream source, int updateFlags, IProgressMonitor monitor) throws CoreException {} public void create(InputStream source, boolean force, IProgressMonitor monitor) throws CoreException {} public void create(InputStream source, int updateFlags, IProgressMonitor monitor) throws CoreException {} public void delete(boolean force, boolean keepHistory, IProgressMonitor monitor) throws CoreException {} public InputStream getContents() throws CoreException { return new ByteArrayInputStream("<?xml version=\"1.0\" encoding=\"UTF-8\"?><runtimeconfig><interpreter name=\"InterpreterOne\" path=\"C:/RubyInstallRootOne\"/><interpreter name=\"InterpreterTwo\" path=\"C:/RubyInstallRootTwo\" selected=\"true\"/></runtimeconfig>".getBytes()); } public InputStream getContents(boolean force) throws CoreException { return getContents(); } public IPath getFullPath() { return null; } public IFileState[] getHistory(IProgressMonitor monitor) throws CoreException { return null; } public String getName() { return null; } public boolean isReadOnly() { return false; } public String getCharset() throws CoreException { return null; } public void move(IPath destination, boolean force, boolean keepHistory, IProgressMonitor monitor) throws CoreException {} public void setContents(IFileState source, boolean force, boolean keepHistory, IProgressMonitor monitor) throws CoreException {} public void setContents(IFileState source, int updateFlags, IProgressMonitor monitor) throws CoreException {} public void setContents(InputStream source, boolean force, boolean keepHistory, IProgressMonitor monitor) throws CoreException {} public void setContents(InputStream source, int updateFlags, IProgressMonitor monitor) throws CoreException {} public void accept(IResourceVisitor visitor, int depth, boolean includePhantoms) throws CoreException {} public void accept(IResourceVisitor visitor, int depth, int memberFlags) throws CoreException {} public void accept(IResourceVisitor visitor) throws CoreException {} public void clearHistory(IProgressMonitor monitor) throws CoreException {} public void copy(IPath destination, boolean force, IProgressMonitor monitor) throws CoreException {} public void copy(IPath destination, int updateFlags, IProgressMonitor monitor) throws CoreException {} public void copy(IProjectDescription description, boolean force, IProgressMonitor monitor) throws CoreException {} public void copy(IProjectDescription description, int updateFlags, IProgressMonitor monitor) throws CoreException {} public IMarker createMarker(String type) throws CoreException { return null; } public void delete(boolean force, IProgressMonitor monitor) throws CoreException {} public void delete(int updateFlags, IProgressMonitor monitor) throws CoreException {} public void deleteMarkers(String type, boolean includeSubtypes, int depth) throws CoreException {} public boolean exists() { return false; } public IMarker findMarker(long id) throws CoreException { return null; } public IMarker[] findMarkers(String type, boolean includeSubtypes, int depth) throws CoreException { return null; } public String getFileExtension() { return null; } public IPath getLocation() { return null; } public IMarker getMarker(long id) { return null; } public long getModificationStamp() { return 0; } public IContainer getParent() { return null; } public String getPersistentProperty(QualifiedName key) throws CoreException { return null; } public IProject getProject() { return null; } public IPath getProjectRelativePath() { return null; } public Object getSessionProperty(QualifiedName key) throws CoreException { return null; } public int getType() { return 0; } public IWorkspace getWorkspace() { return null; } public boolean isAccessible() { return false; } public boolean isDerived() { return false; } public boolean isLocal(int depth) { return false; } public boolean isPhantom() { return false; } public boolean isTeamPrivateMember() { return false; } public void move(IPath destination, boolean force, IProgressMonitor monitor) throws CoreException {} public void move(IPath destination, int updateFlags, IProgressMonitor monitor) throws CoreException {} public void move(IProjectDescription description, boolean force, boolean keepHistory, IProgressMonitor monitor) throws CoreException {} public void move(IProjectDescription description, int updateFlags, IProgressMonitor monitor) throws CoreException {} public void refreshLocal(int depth, IProgressMonitor monitor) throws CoreException {} public void setDerived(boolean isDerived) throws CoreException {} public void setLocal(boolean flag, int depth, IProgressMonitor monitor) throws CoreException {} public void setPersistentProperty(QualifiedName key, String value) throws CoreException {} public void setReadOnly(boolean readOnly) {} public void setSessionProperty(QualifiedName key, Object value) throws CoreException {} public void setTeamPrivateMember(boolean isTeamPrivate) throws CoreException {} public void touch(IProgressMonitor monitor) throws CoreException {} public Object getAdapter(Class adapter) { return null; } public boolean isSynchronized(int depth) { return false; } public int getEncoding() throws CoreException { return 0; } public void createLink( IPath localLocation, int updateFlags, IProgressMonitor monitor) throws CoreException { } public IPath getRawLocation() { return null; } public boolean isLinked() { return false; } public void accept(IResourceProxyVisitor arg0, int arg1) throws CoreException { } public long getLocalTimeStamp() { return 0; } public long setLocalTimeStamp(long value) throws CoreException { return 0; } public boolean contains(ISchedulingRule rule) { return false; } public boolean isConflicting(ISchedulingRule rule) { return false; } public void setCharset(String newCharset) throws CoreException { } /* (non-Javadoc) * @see org.eclipse.core.resources.IFile#getCharset(boolean) */ public String getCharset(boolean checkImplicit) throws CoreException { // TODO Auto-generated method stub return null; } /* (non-Javadoc) * @see org.eclipse.core.resources.IFile#getContentDescription() */ public IContentDescription getContentDescription() throws CoreException { // TODO Auto-generated method stub return null; } public String getCharsetFor(Reader reader) throws CoreException { // TODO Auto-generated method stub return null; } public ResourceAttributes getResourceAttributes() { // TODO Auto-generated method stub return null; } public void revertModificationStamp(long value) throws CoreException { // TODO Auto-generated method stub } public void setResourceAttributes(ResourceAttributes attributes) throws CoreException { // TODO Auto-generated method stub } } } --- NEW FILE: TC_RunnerLaunching.java --- package org.rubypeople.rdt.internal.launching; import java.io.File; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; import junit.framework.TestCase; import org.eclipse.core.boot.BootLoader; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.Path; import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.ILaunch; import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.core.ILaunchConfigurationType; import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; import org.eclipse.debug.core.ILaunchManager; import org.eclipse.debug.core.Launch; 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 { private final static String PROJECT_NAME = "Simple Project"; private final static String RUBY_LIB_DIR = "someRubyDir"; // dir inside project private final static String RUBY_FILE_NAME = "rubyFile.rb"; private final static String INTERPRETER_ARGUMENTS = "interpreter Arguments"; private final static String PROGRAM_ARGUMENTS = "programArguments"; private final static String RUBY_COMMAND = "rubyw"; public TC_RunnerLaunching(String name) { super(name); } protected ILaunchManager getLaunchManager() { return DebugPlugin.getDefault().getLaunchManager(); } protected List getCommandLine(IProject project, boolean debug) { List commandLine = new ArrayList(); if (debug) { commandLine.add("-reclipseDebug"); } if (debug) { String dirOfRubyDebuggerFile = DebuggerRunner.getDirectoryOfRubyDebuggerFile().replace('/', File.separatorChar) ; if (dirOfRubyDebuggerFile.startsWith("\\")) { dirOfRubyDebuggerFile = dirOfRubyDebuggerFile.substring(1) ; } commandLine.add("-I"); commandLine.add(dirOfRubyDebuggerFile); } commandLine.add("-I"); commandLine.add( project.getLocation().toOSString()); commandLine.add("-I"); commandLine.add(project.getLocation().toOSString() + File.separator + RUBY_LIB_DIR) ; commandLine.addAll(Arrays.asList(INTERPRETER_ARGUMENTS.split("\\s+"))); commandLine.add("--"); // use always forward slashes for path relative to project dir commandLine.add(project.getLocation().toOSString() + "/" + RUBY_LIB_DIR + "/" + RUBY_FILE_NAME); commandLine.add(PROGRAM_ARGUMENTS); return commandLine; } public void testDebugEnabled() throws Exception { // check if debugging is enabled in plugin.xml ILaunchConfigurationType launchConfigurationType = getLaunchManager().getLaunchConfigurationType( RubyLaunchConfigurationAttribute.RUBY_LAUNCH_CONFIGURATION_TYPE); assertEquals("Ruby Application", launchConfigurationType.getName()); assertTrue( "LaunchConfiguration supports debug", launchConfigurationType.supportsMode(ILaunchManager.DEBUG_MODE)); } public void launch(boolean debug) throws Exception { IProject project = ResourceTools.createProject(PROJECT_NAME); ShamInterpreter interpreter = new ShamInterpreter("", new Path("")); List installedInterpreters = new ArrayList(); installedInterpreters.add(interpreter); RubyRuntime.getDefault().setInstalledInterpreters(installedInterpreters); RubyRuntime.getDefault().setSelectedInterpreter(interpreter); ILaunchConfiguration configuration = new ShamLaunchConfiguration(); ILaunch launch = new Launch(configuration, debug ? ILaunchManager.DEBUG_MODE : ILaunchManager.RUN_MODE, null); ILaunchConfigurationType launchConfigurationType = getLaunchManager().getLaunchConfigurationType( RubyLaunchConfigurationAttribute.RUBY_LAUNCH_CONFIGURATION_TYPE); launchConfigurationType.getDelegate().launch( configuration, debug ? ILaunchManager.DEBUG_MODE : ILaunchManager.RUN_MODE, launch, null); assertEquals("One process has been spawned", 1, launch.getProcesses().length); List expected = getCommandLine(project, debug); List actual = interpreter.getArguments(); assertEquals("Assembled command line.", expected, actual); assertEquals( "Process label.", "Ruby " + RUBY_COMMAND + " : " + RUBY_LIB_DIR + "/" + RUBY_FILE_NAME, launch.getProcesses()[0].getLabel()); } public void testRunInDebugMode() throws Exception { launch(true); } public void testRunInRunMode() throws Exception { launch(false); } public class ShamLaunchConfiguration implements ILaunchConfiguration { public boolean contentsEqual(ILaunchConfiguration configuration) { return false; } public ILaunchConfigurationWorkingCopy copy(String name) throws CoreException { return null; } public void delete() throws CoreException { } public boolean exists() { return true; } public boolean getAttribute(String attributeName, boolean defaultValue) throws CoreException { return false; } public int getAttribute(String attributeName, int defaultValue) throws CoreException { return 0; } public List getAttribute(String attributeName, List defaultValue) throws CoreException { return null; } public Map getAttribute(String attributeName, Map defaultValue) throws CoreException { return null; } public String getAttribute(String attributeName, String defaultValue) throws CoreException { if (attributeName.equals(RubyLaunchConfigurationAttribute.PROJECT_NAME)) { return PROJECT_NAME; } else if (attributeName.equals(RubyLaunchConfigurationAttribute.FILE_NAME)) { return RUBY_LIB_DIR + File.separator + RUBY_FILE_NAME; } else if (attributeName.equals(RubyLaunchConfigurationAttribute.WORKING_DIRECTORY)) { return "C:\\Working Dir"; } else if (attributeName.equals(RubyLaunchConfigurationAttribute.INTERPRETER_ARGUMENTS)) { return INTERPRETER_ARGUMENTS; } else if (attributeName.equals(RubyLaunchConfigurationAttribute.PROGRAM_ARGUMENTS)) { return PROGRAM_ARGUMENTS; } return null; } public IFile getFile() { return null; } public IPath getLocation() { return null; } public String getMemento() throws CoreException { return null; } public String getName() { return null; } public ILaunchConfigurationType getType() throws CoreException { return new ShamLaunchConfigurationType(); } public ILaunchConfigurationWorkingCopy getWorkingCopy() throws CoreException { return null; } public boolean isLocal() { return false; } public boolean isWorkingCopy() { return false; } public ILaunch launch(String mode, IProgressMonitor monitor) throws CoreException { return null; } public boolean supportsMode(String mode) throws CoreException { return false; } public Object getAdapter(Class adapter) { return null; } public String getCategory() throws CoreException { return null; } public Map getAttributes() throws CoreException { return null; } public ILaunch launch(String mode, IProgressMonitor monitor, boolean build) throws CoreException { return null; } /* (non-Javadoc) * @see org.eclipse.debug.core.ILaunchConfiguration#launch(java.lang.String, org.eclipse.core.runtime.IProgressMonitor, boolean, boolean) */ public ILaunch launch(String mode, IProgressMonitor monitor, boolean build, boolean register) throws CoreException { // TODO Auto-generated method stub return null; } } public class ShamInterpreter extends RubyInterpreter { public ShamInterpreter(String aName, IPath validInstallLocation) { super(aName, validInstallLocation); } private List arguments; public List getArguments() { return arguments; } public String getCommand() { return RUBY_COMMAND; } public Process exec(List args, File workingDirectory) { arguments = args; return new ShamProcess(); } } } --- NEW FILE: TS_Launching.java --- package org.rubypeople.rdt.internal.launching; import junit.framework.Test; import junit.framework.TestSuite; public class TS_Launching { public static Test suite() { TestSuite suite = new TestSuite(); suite.addTestSuite(TC_RubyInterpreter.class); suite.addTestSuite(TC_RubyRuntime.class); suite.addTestSuite(TC_RunnerLaunching.class) ; suite.addTestSuite(TC_ArgumentSplitter.class) ; return suite; } } --- NEW FILE: TC_RubyInterpreter.java --- package org.rubypeople.rdt.internal.launching; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import junit.framework.TestCase; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Path; import org.rubypeople.rdt.internal.launching.CommandExecutor; import org.rubypeople.rdt.internal.launching.IllegalCommandException; import org.rubypeople.rdt.internal.launching.RubyInterpreter; public class TC_RubyInterpreter extends TestCase { private static final String TEST_RUBY_CMD = "/foo bar ruby"; private static final File WORKING_DIR = new File("/testDir"); public void testEquals() { RubyInterpreter interpreterOne = new RubyInterpreter("InterpreterOne", new Path("/InterpreterOnePath")); RubyInterpreter similarInterpreterOne = new RubyInterpreter("InterpreterOne", new Path("/InterpreterOnePath")); assertTrue("Interpreters should be equal.", interpreterOne.equals(similarInterpreterOne)); RubyInterpreter interpreterTwo = new RubyInterpreter("InterpreterTwo", new Path("/InterpreterTwoPath")); assertTrue("Interpreters should not be equal.", !interpreterOne.equals(interpreterTwo)); } public void testExecList() throws Exception { ShamCommandExecutor executor = new ShamCommandExecutor(); RubyInterpreter interpreter = new NonValidatingInterpreter("Test", new Path("/path to ruby"), executor); ShamProcess process = new ShamProcess(); executor.setProcessToReturn(process); Process result = interpreter.exec(Arrays.asList(new String[] {"a","b b", "c"}), WORKING_DIR); executor.assertExecute(new String[] {TEST_RUBY_CMD, "a", "b b", "c"}, WORKING_DIR); assertEquals(process, result); } public void testExecutorThrows() throws Exception { ShamCommandExecutor executor = new ShamCommandExecutor(); RubyInterpreter interpreter = new NonValidatingInterpreter("Test", new Path("/path to ruby"), executor); IOException testException = new IOException("test"); executor.setExceptionToThrow(testException); try { interpreter.exec(new ArrayList(), WORKING_DIR); fail("Expected CoreException"); } catch (CoreException expected) { assertEquals(IStatus.ERROR, expected.getStatus().getSeverity()); assertEquals(testException, expected.getStatus().getException()); } } public void testUnknownInterperterThrows() throws Exception { RubyInterpreter interpreter = new RubyInterpreter("Test", new Path("unknown ruby interpreter"), null); try { interpreter.exec(new ArrayList(), WORKING_DIR); fail("Expected CoreException"); } catch (CoreException expected) { assertEquals(IStatus.ERROR, expected.getStatus().getSeverity()); assertEquals(IllegalCommandException.class, expected.getStatus().getException().getClass()); } } private static final class NonValidatingInterpreter extends RubyInterpreter { private NonValidatingInterpreter(String name, IPath location, CommandExecutor executor) { super(name, location, executor); } public String getCommand() throws IllegalCommandException { return TEST_RUBY_CMD; } } private static class ShamCommandExecutor implements CommandExecutor { private String[] commandArg; private File workingDirectoryArg; private ShamProcess processToReturn; private IOException exceptionToThrow; public void assertExecute(String[] expectedCommand, File expectedWorkingDir) { assertEquals("Command ", Arrays.asList(expectedCommand), Arrays.asList(commandArg)); assertEquals("Working dir", expectedWorkingDir, workingDirectoryArg); } public void setExceptionToThrow(IOException exception) { this.exceptionToThrow = exception; } public void setProcessToReturn(ShamProcess process) { this.processToReturn = process; } public Process exec(String[] command, File workingDirectory) throws IOException { commandArg = command; workingDirectoryArg = workingDirectory; if (exceptionToThrow != null) throw exceptionToThrow; return processToReturn; } } } --- NEW FILE: TC_ArgumentSplitter.java --- package org.rubypeople.rdt.internal.launching; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import junit.framework.TestCase; import org.rubypeople.rdt.internal.launching.ArgumentSplitter; public class TC_ArgumentSplitter extends TestCase { public void testNoArgs() { verifySplit(new String[]{}, ""); verifySplit(new String[]{}, " "); verifySplit(new String[]{}, " "); } public void testSimpleSplit() { verifySplit(new String[]{"foo"}, "foo"); verifySplit(new String[]{"foo"}, " foo "); verifySplit(new String[]{"foo", "bar"}, "foo bar"); verifySplit(new String[]{"foo", "bar"}, " foo bar "); } public void testSimpleQuotes() { verifySplit(new String[]{"foo"}, "'foo'"); verifySplit(new String[]{"foo bar"}, "'foo bar'"); verifySplit(new String[]{"foo bar","red blue"}, "'foo bar' 'red blue'"); verifySplit(new String[]{"foo"}, "\"foo\""); } public void testEmptyQuotes() { verifySplit(new String[]{""}, "''"); verifySplit(new String[]{"F", "", "B", "X"}, "F '' B \"X"); verifySplit(new String[]{"F", "", "B"}, "F '' B \""); } public void testMixedQuotes() { verifySplit(new String[]{"f\"oo"}, "'f\"oo'"); verifySplit(new String[]{"f'oo"}, "\"f'oo\""); } private void verifySplit(String[] expected, String input) { List args = ArgumentSplitter.split(input); assertEquals("For input: "+input, new ArrayList(Arrays.asList(expected)), args); } } --- NEW FILE: EvaluateRubyProcessOutput.java --- package org.rubypeople.rdt.internal.launching; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.PrintWriter; /* There is a different behaviour, when a ruby application ist started from commandlined compared to a ruby application started with RDT. E.g. there must be additional STDOUT.flush commands for RDT started applications in order to achieve same bahvior. */ public class EvaluateRubyProcessOutput implements Runnable { // Allocate 1K buffers for Input and Error Streams.. private byte[] inBuffer = new byte[1024]; private byte[] errBuffer = new byte[1024]; // Declare internal variables we will need.. private Process process; private InputStream pErrorStream; private InputStream pInputStream; private OutputStream pOutputStream; private PrintWriter outputWriter; private Thread inReadThread; private Thread errReadThread; public EvaluateRubyProcessOutput(Process p) { // Save variables.. process = p; // Get the streams.. pErrorStream = process.getErrorStream(); pInputStream = process.getInputStream(); pOutputStream = process.getOutputStream(); // Create a PrintWriter on top of the output stream.. // Create the threads and start them.. inReadThread = new Thread(this); errReadThread = new Thread(this); outputWriter = new PrintWriter(pOutputStream, true); new Thread() { public void run() { try { // This Thread just waits for the process to // end and notifies the handler.. process.waitFor() ; System.out.println("Process endend.") ; } catch (InterruptedException ex) { ex.printStackTrace(); } } }.start(); inReadThread.start(); errReadThread.start(); } private void processEnded(int exitValue) { // Handle process end.. //handler.processEnded(exitValue); } private void processNewInput(String input) { // Handle process new input.. //handler.processNewInput(input); System.out.println(input) ; } private void processNewError(String error) { // Handle process new error.. //handler.processNewError(error); } // Run the command and return the ExecHelper wrapper object.. // Send the output string through the print writer.. public void sendOutput(String output) throws IOException { outputWriter.println(output); } public void run() { // Are we on the InputRead Thread? if (inReadThread == Thread.currentThread()) { try { // Read the InputStream in a loop until we find no // more bytes to read.. for (int i = 0; i > -1; i = pInputStream.read(inBuffer)) { // We have a new segment of input, so process // it as a String.. processNewInput(new String(inBuffer, 0, i)); } } catch (IOException ex) { ex.printStackTrace(); } // Are we on the ErrorRead Thread? } else if (errReadThread == Thread.currentThread()) { try { // Read the ErrorStream in a loop until we find no // more bytes to read.. for (int i = 0; i > -1; i = pErrorStream.read(errBuffer)) { // We have a new segment of error, so process // it as a String.. processNewError(new String(errBuffer, 0, i)); } } catch (IOException ex) { ex.printStackTrace(); } } } public static void main(String[] args) throws Exception { /* file D:\\Temp\\test.rb: class Hello attr_reader :msg def initialize @msg = "Hello, World\n" end end h = Hello.new puts h.msg print "Press RETURN" STDOUT.flush input = $stdin.gets puts "You entered #{input}" */ Process p = Runtime.getRuntime().exec("D:\\ruby-1.8.0\\ruby\\bin\\ruby.exe D:\\Temp\\test.rb"); EvaluateRubyProcessOutput erpo = new EvaluateRubyProcessOutput(p) ; String in = new BufferedReader(new InputStreamReader(System.in)).readLine() ; erpo.sendOutput(in) ; } } |
|
From: David C. <dc...@us...> - 2005-10-02 21:07:26
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8729/src/org/rubypeople/rdt/internal/core/parser Added Files: TC_ImmediateWarnings.java TS_CoreParser.java Log Message: Refactored RubyBuilder into several smaller classes. Wrote UTs for a few of them. Began work on a SymbolIndex. --- NEW FILE: TC_ImmediateWarnings.java --- package org.rubypeople.rdt.internal.core.parser; import junit.framework.TestCase; import org.jruby.lexer.yacc.ISourcePosition; import org.rubypeople.eclipse.shams.resources.ShamFile; import org.rubypeople.rdt.internal.core.builder.ShamMarkerManager; public class TC_ImmediateWarnings extends TestCase { private ImmediateWarnings warnings; private ShamMarkerManager markerManager; private ShamFile file; public void setUp() { markerManager = new ShamMarkerManager(); warnings = new ImmediateWarnings(markerManager); file = new ShamFile("test.rb"); warnings.setFile(file); } public void testTextOnlyWarn() throws Exception { warnings.warn("testMessage"); markerManager.assertWarningAdded(file, "testMessage"); } public void testTextOnlyWarning() throws Exception { warnings.warn("testMessage"); markerManager.assertWarningAdded(file, "testMessage"); } public void testWarn() { ISourcePosition position = new RdtPosition(1, 2, 3); warnings.warn(position, "another Message"); markerManager.assertWarningAdded(file, "another Message", 1, 2, 3); } } --- NEW FILE: TS_CoreParser.java --- package org.rubypeople.rdt.internal.core.parser; import junit.framework.Test; import junit.framework.TestSuite; public class TS_CoreParser { public static Test suite() { TestSuite suite = new TestSuite(); suite.addTestSuite(TC_TaskParser.class); suite.addTestSuite(TC_ImmediateWarnings.class); return suite; } } |
|
From: David C. <dc...@us...> - 2005-10-02 21:07:24
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8729/src Modified Files: RubyParserCmd.java Log Message: Refactored RubyBuilder into several smaller classes. Wrote UTs for a few of them. Began work on a SymbolIndex. Index: RubyParserCmd.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src/RubyParserCmd.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RubyParserCmd.java 6 Sep 2005 21:40:56 -0000 1.2 --- RubyParserCmd.java 1 Oct 2005 23:00:54 -0000 1.3 *************** *** 13,16 **** --- 13,17 ---- import org.jruby.ast.Node; import org.jruby.lexer.yacc.SyntaxException; + import org.rubypeople.eclipse.shams.resources.ShamFile; import org.rubypeople.rdt.internal.core.DefaultWorkingCopyOwner; import org.rubypeople.rdt.internal.core.RubyProject; *************** *** 102,106 **** RubyParser parser = new RubyParser(new RdtWarnings()); try { ! Node node = parser.parse(file, new FileReader(file)); RubyScriptElementInfo unitInfo = new RubyScriptElementInfo() ; RubyScript script = new RubyScript(new RubyProject(), null, file, DefaultWorkingCopyOwner.PRIMARY ) ; --- 103,107 ---- RubyParser parser = new RubyParser(new RdtWarnings()); try { ! Node node = parser.parse(new ShamFile(file), new FileReader(file)); RubyScriptElementInfo unitInfo = new RubyScriptElementInfo() ; RubyScript script = new RubyScript(new RubyProject(), null, file, DefaultWorkingCopyOwner.PRIMARY ) ; |
|
From: David C. <dc...@us...> - 2005-10-02 20:50:43
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8121/src/org/rubypeople/rdt/internal/launching Modified Files: RubyInterpreter.java Added Files: CommandExecutor.java StandardCommandExecutor.java Log Message: Added additional UTs for launching. Moved tests to the correct package. Slight refactoring of launching code. --- NEW FILE: StandardCommandExecutor.java --- /** * */ package org.rubypeople.rdt.internal.launching; import java.io.File; import java.io.IOException; class StandardCommandExecutor implements CommandExecutor { public Process exec(String[] command, File workingDirectory) throws IOException { return Runtime.getRuntime().exec(command, null, workingDirectory); } } --- NEW FILE: CommandExecutor.java --- package org.rubypeople.rdt.internal.launching; import java.io.File; import java.io.IOException; public interface CommandExecutor { public Process exec(String[] command, File workingDirectory) throws IOException; } Index: RubyInterpreter.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyInterpreter.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** RubyInterpreter.java 25 Sep 2005 17:57:01 -0000 1.13 --- RubyInterpreter.java 1 Oct 2005 22:58:08 -0000 1.14 *************** *** 18,27 **** protected String name; public RubyInterpreter(String aName, IPath validInstallLocation) { ! name = aName; ! installLocation = validInstallLocation; } ! public IPath getInstallLocation() { return installLocation; } --- 18,34 ---- protected String name; + private final CommandExecutor commandExecutor; + public RubyInterpreter(String aName, IPath validInstallLocation) { ! this(aName, validInstallLocation, new StandardCommandExecutor()); } ! public RubyInterpreter(String aName, IPath validInstallLocation, CommandExecutor commandExecutor) { ! name = aName; ! installLocation = validInstallLocation; ! this.commandExecutor = commandExecutor; ! } ! ! public IPath getInstallLocation() { return installLocation; } *************** *** 55,64 **** rubyCmd.add(this.getCommand()); rubyCmd.addAll(args); ! return Runtime.getRuntime().exec((String[]) rubyCmd.toArray(new String[0]), null, workingDirectory); } catch (IOException e) { ! throw new RuntimeException("Unable to execute interpreter: " + args + workingDirectory); } ! catch (IllegalCommandException ex) { ! IStatus errorStatus = new Status(IStatus.ERROR, RdtLaunchingPlugin.PLUGIN_ID, IStatus.OK, ex.getMessage(), null); throw new CoreException(errorStatus) ; } --- 62,73 ---- rubyCmd.add(this.getCommand()); rubyCmd.addAll(args); ! return commandExecutor.exec((String[]) rubyCmd.toArray(new String[0]), workingDirectory); } catch (IOException e) { ! IStatus errorStatus = new Status(IStatus.ERROR, RdtLaunchingPlugin.PLUGIN_ID, IStatus.OK, ! "Unable to execute interpreter: " + args + workingDirectory, e); ! throw new CoreException(errorStatus) ; } ! catch (IllegalCommandException e) { ! IStatus errorStatus = new Status(IStatus.ERROR, RdtLaunchingPlugin.PLUGIN_ID, IStatus.OK, e.getMessage(), e); throw new CoreException(errorStatus) ; } |
|
From: David C. <dc...@us...> - 2005-10-02 20:43:32
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12388/src/org/rubypeople/rdt/internal/ui Modified Files: RubyPluginImages.java RubyPlugin.java Log Message: Cleanup a whole bunch of 'unused warnings" Index: RubyPluginImages.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyPluginImages.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** RubyPluginImages.java 2 Sep 2005 18:00:20 -0000 1.10 --- RubyPluginImages.java 1 Oct 2005 23:10:44 -0000 1.11 *************** *** 22,30 **** private static final String T_OBJ = "obj16"; //$NON-NLS-1$ - private static final String T_OVR = "ovr16"; //$NON-NLS-1$ private static final String T_ELCL= "elcl16"; //$NON-NLS-1$ private static final String T_CTOOL = "ctool16"; //$NON-NLS-1$ private static final String T_WIZBAN= "wizban"; //$NON-NLS-1$ - private static final String T_ETOOL= "etool16"; //$NON-NLS-1$ public static final String IMG_OBJS_ERROR = NAME_PREFIX + "error_obj.gif"; --- 22,28 ---- Index: RubyPlugin.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyPlugin.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** RubyPlugin.java 19 Sep 2005 21:45:09 -0000 1.14 --- RubyPlugin.java 1 Oct 2005 23:10:44 -0000 1.15 *************** *** 40,44 **** import org.rubypeople.rdt.core.RubyCore; import org.rubypeople.rdt.core.WorkingCopyOwner; - import org.rubypeople.rdt.internal.core.parser.RubyParser; import org.rubypeople.rdt.internal.formatter.CodeFormatter; import org.rubypeople.rdt.internal.ui.preferences.MockupPreferenceStore; --- 40,43 ---- |
|
From: David C. <dc...@us...> - 2005-10-02 20:43:31
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12388/src/org/rubypeople/rdt/internal/ui/preferences Modified Files: TextEditorPreferencePage2.java RubyBasePreferencePage.java Log Message: Cleanup a whole bunch of 'unused warnings" Index: RubyBasePreferencePage.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/RubyBasePreferencePage.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** RubyBasePreferencePage.java 18 Sep 2005 18:47:24 -0000 1.5 --- RubyBasePreferencePage.java 1 Oct 2005 23:10:44 -0000 1.6 *************** *** 9,15 **** import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; - import org.rubypeople.rdt.internal.ui.RubyUIMessages; import org.rubypeople.rdt.internal.ui.RubyPlugin; ! import org.rubypeople.rdt.ui.PreferenceConstants; public class RubyBasePreferencePage extends RubyAbstractPreferencePage implements IWorkbenchPreferencePage { --- 9,14 ---- import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; import org.rubypeople.rdt.internal.ui.RubyPlugin; ! import org.rubypeople.rdt.internal.ui.RubyUIMessages; public class RubyBasePreferencePage extends RubyAbstractPreferencePage implements IWorkbenchPreferencePage { Index: TextEditorPreferencePage2.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/TextEditorPreferencePage2.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** TextEditorPreferencePage2.java 1 Apr 2005 02:11:34 -0000 1.15 --- TextEditorPreferencePage2.java 1 Oct 2005 23:10:44 -0000 1.16 *************** *** 64,68 **** }; - /** Button controlling default setting of the selected reference provider. */ private Button fSetDefaultButton; --- 64,67 ---- *************** *** 90,99 **** private List fAppearanceColorList; - private List fQuickDiffProviderList; private ColorEditor fAppearanceColorEditor; - private Button fShowInTextCheckBox; - private Button fHighlightInTextCheckBox; - private Button fShowInOverviewRulerCheckBox; - private Button fShowInVerticalRulerCheckBox; private org.rubypeople.rdt.internal.ui.preferences.FoldingConfigurationBlock fFoldingConfigurationBlock; --- 89,93 ---- |
|
From: David C. <dc...@us...> - 2005-10-02 20:43:31
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rdocexport In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12388/src/org/rubypeople/rdt/internal/ui/rdocexport Modified Files: CreateRdocActionDelegate.java Log Message: Cleanup a whole bunch of 'unused warnings" Index: CreateRdocActionDelegate.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rdocexport/CreateRdocActionDelegate.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CreateRdocActionDelegate.java 18 Sep 2005 18:46:10 -0000 1.1 --- CreateRdocActionDelegate.java 1 Oct 2005 23:10:44 -0000 1.2 *************** *** 5,9 **** import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; - import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IObjectActionDelegate; import org.eclipse.ui.IWorkbenchPart; --- 5,8 ---- *************** *** 13,17 **** private ISelection fCurrentSelection; - private Shell fCurrentShell; /* --- 12,15 ---- *************** *** 19,23 **** */ public void setActivePart(IAction action, IWorkbenchPart targetPart) { - fCurrentShell = targetPart.getSite().getShell(); } --- 17,20 ---- |
|
From: David C. <dc...@us...> - 2005-10-02 20:36:47
|
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-serv8729/src/org/rubypeople/rdt/internal/core/ast Added Files: DumpAst.java Log Message: Refactored RubyBuilder into several smaller classes. Wrote UTs for a few of them. Began work on a SymbolIndex. --- NEW FILE: DumpAst.java --- package org.rubypeople.rdt.internal.core.ast; import java.io.InputStreamReader; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import org.jruby.ast.Node; import org.jruby.ast.visitor.DefaultIteratorVisitor; import org.jruby.ast.visitor.NodeVisitor; import org.rubypeople.eclipse.shams.resources.ShamFile; import org.rubypeople.rdt.internal.core.parser.RubyParser; public class DumpAst { private static class DumpingInvocationHandler implements InvocationHandler { public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { Node node = (Node) args[0]; System.out.println("Start: " + node.getClass().getName()); return null; } } public static void main(String[] args) throws Exception { new DumpAst().dump("require 'x'; class Foo; end"); } private void dump(String rubyCode) throws Exception { ShamFile file = new ShamFile("-"); file.setContents(rubyCode); InputStreamReader reader = new InputStreamReader(file.getContents()); Node rootNode = new RubyParser().parse(file, reader); NodeVisitor dumpVisitor = (NodeVisitor) Proxy.newProxyInstance(getClass().getClassLoader(), new Class[] {NodeVisitor.class}, new DumpingInvocationHandler()); rootNode.accept(dumpVisitor); } } |
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-serv8729/src/org/rubypeople/rdt/internal/core/symbols Added Files: TC_SymbolIndex.java TC_Location.java TS_CoreSymbols.java TC_ClassSymbol.java Log Message: Refactored RubyBuilder into several smaller classes. Wrote UTs for a few of them. Began work on a SymbolIndex. --- NEW FILE: TC_ClassSymbol.java --- package org.rubypeople.rdt.internal.core.symbols; import junit.framework.TestCase; public class TC_ClassSymbol extends TestCase { private ClassSymbol fooClass; private ClassSymbol fooClass2; private ClassSymbol barClass; public void setUp() { fooClass = new ClassSymbol("Foo"); fooClass2 = new ClassSymbol("Foo"); barClass = new ClassSymbol("Bar"); } public void testEquals() { assertEquals(true, fooClass.equals(fooClass2)); assertEquals(false, fooClass.equals(barClass)); assertEquals(false, barClass.equals(fooClass)); assertEquals(false, barClass.equals("Bar")); } public void testHashCode() { assertEquals(fooClass.hashCode(), fooClass2.hashCode()); } } --- NEW FILE: TC_Location.java --- package org.rubypeople.rdt.internal.core.symbols; import junit.framework.TestCase; import org.eclipse.core.runtime.Path; public class TC_Location extends TestCase { public void testForSource() { Location location = new Location(new Path("foo"), 1, 2); assertEquals(true, location.forSource(new Path("foo"))); assertEquals(false, location.forSource(new Path("Foo"))); } } --- NEW FILE: TC_SymbolIndex.java --- package org.rubypeople.rdt.internal.core.symbols; import java.util.Collections; import java.util.HashSet; import java.util.Set; import junit.framework.TestCase; import org.eclipse.core.runtime.Path; public class TC_SymbolIndex extends TestCase { private static final ClassSymbol UNKNOWN_SYMBOL = new ClassSymbol("unknown"); private static final ClassSymbol FOO_CLASS_SYMBOL = new ClassSymbol("Foo"); private static final Path FOO_PATH = new Path("/foo.rb"); private static final Path OTHER_FOO_PATH = new Path("/utils/foo.rb"); private static final Location FOO_CLASS_LOCATION = new Location(FOO_PATH, 12, 15); private static final Location OTHER_FOO_CLASS_LOCATION = new Location(OTHER_FOO_PATH, 10, 13); private static final Set EMPTY_SET= Collections.EMPTY_SET; private SymbolIndex index; public void setUp() { index = new SymbolIndex(); index.add(FOO_CLASS_SYMBOL, FOO_CLASS_LOCATION); } public void testSimple() { assertEquals(createSet(FOO_CLASS_LOCATION), index.find(FOO_CLASS_SYMBOL)); } public void testNotFound() { assertEquals(EMPTY_SET, index.find(UNKNOWN_SYMBOL)); } public void testFlush() { index.flush(FOO_PATH); assertEquals(EMPTY_SET, index.find(FOO_CLASS_SYMBOL)); } public void testMultipleLocations() { index.add(FOO_CLASS_SYMBOL, OTHER_FOO_CLASS_LOCATION); assertEquals(createSet(OTHER_FOO_CLASS_LOCATION, FOO_CLASS_LOCATION), index.find(FOO_CLASS_SYMBOL)); } private Set createSet(Object obj1) { Set set = new HashSet(); set.add(obj1); return set; } private Set createSet(Object obj1, Object obj2) { Set set = createSet(obj1); set.add(obj2); return set; } } --- NEW FILE: TS_CoreSymbols.java --- package org.rubypeople.rdt.internal.core.symbols; import junit.framework.Test; import junit.framework.TestSuite; public class TS_CoreSymbols extends TestSuite { public static Test suite() { TestSuite suite = new TestSuite(); suite.addTestSuite(TC_ClassSymbol.class); suite.addTestSuite(TC_Location.class); suite.addTestSuite(TC_SymbolIndex.class); return suite; } } |
|
From: David C. <dc...@us...> - 2005-10-02 19:57:41
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/views In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12486/src/org/rubypeople/rdt/testunit/views Modified Files: FailureTrace.java FailureTab.java CompareResultsAction.java Log Message: Cleanup a whole bunch of 'unused warnings" Index: FailureTrace.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/views/FailureTrace.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FailureTrace.java 28 Mar 2005 23:23:24 -0000 1.3 --- FailureTrace.java 1 Oct 2005 23:10:52 -0000 1.4 *************** *** 46,52 **** private final Image fExceptionIcon= TestUnitView.createImage("obj16/exc_catch.gif"); //$NON-NLS-1$ - private static final String FRAME_PREFIX= "at "; //$NON-NLS-1$ private Table fTable; - private TestUnitView fTestRunner; private String fInputTrace; private final Clipboard fClipboard; --- 46,50 ---- *************** *** 68,72 **** fTable= new Table(parent, SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL); - fTestRunner= testRunner; fClipboard= clipboard; --- 66,69 ---- *************** *** 238,286 **** private String filterStack(String stackTrace) { ! //if (!JUnitPreferencePage.getFilterStack() || stackTrace == null) ! return stackTrace; ! // TODO Filter the stack trace ! // StringWriter stringWriter= new StringWriter(); ! // PrintWriter printWriter= new PrintWriter(stringWriter); ! // StringReader stringReader= new StringReader(stackTrace); ! // BufferedReader bufferedReader= new BufferedReader(stringReader); ! // ! // String line; ! // String[] patterns= JUnitPreferencePage.getFilterPatterns(); ! // try { ! // while ((line= bufferedReader.readLine()) != null) { ! // if (!filterLine(patterns, line)) ! // printWriter.println(line); ! // } ! // } catch (IOException e) { ! // return stackTrace; // return the stack unfiltered ! // } ! // return stringWriter.toString(); } - private boolean filterLine(String[] patterns, String line) { - String pattern; - int len; - for (int i= (patterns.length - 1); i >= 0; --i) { - pattern= patterns[i]; - len= pattern.length() - 1; - if (pattern.charAt(len) == '*') { - //strip trailing * from a package filter - pattern= pattern.substring(0, len); - } else if (Character.isUpperCase(pattern.charAt(0))) { - //class in the default package - pattern= FRAME_PREFIX + pattern + '.'; - } else { - //class names start w/ an uppercase letter after the . - final int lastDotIndex= pattern.lastIndexOf('.'); - if ((lastDotIndex != -1) && (lastDotIndex != len) && Character.isUpperCase(pattern.charAt(lastDotIndex + 1))) - pattern += '.'; //append . to a class filter - } - - if (line.indexOf(pattern) > 0) - return true; - } - return false; - } public TestRunInfo getFailedTest() { --- 235,242 ---- private String filterStack(String stackTrace) { ! return stackTrace; ! // TODO Filter the stack trace } public TestRunInfo getFailedTest() { Index: FailureTab.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/views/FailureTab.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FailureTab.java 2 Mar 2005 01:35:44 -0000 1.4 --- FailureTab.java 1 Oct 2005 23:10:52 -0000 1.5 *************** *** 46,50 **** private Table fTable; private TestUnitView fRunnerViewPart; - private Clipboard fClipboard; private boolean fMoveSelection = false; --- 46,49 ---- *************** *** 57,61 **** public void createTabControl(CTabFolder tabFolder, Clipboard clipboard, TestUnitView runner) { fRunnerViewPart = runner; - fClipboard = clipboard; CTabItem failureTab = new CTabItem(tabFolder, SWT.NONE); --- 56,59 ---- Index: CompareResultsAction.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/views/CompareResultsAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CompareResultsAction.java 15 Sep 2004 03:17:55 -0000 1.1 --- CompareResultsAction.java 1 Oct 2005 23:10:52 -0000 1.2 *************** *** 19,23 **** public class CompareResultsAction extends Action { - private FailureTrace fView; public CompareResultsAction(FailureTrace view) { --- 19,22 ---- *************** *** 29,33 **** setHoverImageDescriptor(TestunitPlugin.getImageDescriptor("elcl16/compare.gif")); //$NON-NLS-1$ setImageDescriptor(TestunitPlugin.getImageDescriptor("elcl16/compare.gif")); //$NON-NLS-1$ - fView = view; } --- 28,31 ---- |
|
From: David C. <dc...@us...> - 2005-10-02 19:49:25
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8729 Modified Files: .classpath 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.rdt.core.tests/.classpath,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** .classpath 2 Mar 2005 00:55:07 -0000 1.10 --- .classpath 1 Oct 2005 23:00:54 -0000 1.11 *************** *** 2,8 **** <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 sourcepath="/org.rubypeople.rdt.core/src" kind="lib" path="/org.rubypeople.rdt.core/lib/jruby.jar"/> <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> |
|
From: David C. <dc...@us...> - 2005-10-02 19:43:04
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12621/src/org/rubypeople/rdt/internal/debug/core/model Modified Files: RubyVariable.java Log Message: Cleanup a whole bunch of 'unused warnings" Index: RubyVariable.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/model/RubyVariable.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** RubyVariable.java 29 Aug 2005 16:05:48 -0000 1.10 --- RubyVariable.java 1 Oct 2005 23:11:08 -0000 1.11 *************** *** 1,5 **** package org.rubypeople.rdt.internal.debug.core.model; - import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.PlatformObject; import org.eclipse.debug.core.DebugException; --- 1,4 ---- |
|
From: David C. <dc...@us...> - 2005-10-02 19:20:44
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/parsing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12621/src/org/rubypeople/rdt/internal/debug/core/parsing Modified Files: XmlStreamReader.java Log Message: Cleanup a whole bunch of 'unused warnings" Index: XmlStreamReader.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/parsing/XmlStreamReader.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** XmlStreamReader.java 9 Jan 2005 09:21:21 -0000 1.7 --- XmlStreamReader.java 1 Oct 2005 23:11:09 -0000 1.8 *************** *** 4,13 **** import org.rubypeople.rdt.internal.debug.core.RdtDebugCorePlugin; - import org.rubypeople.rdt.internal.debug.core.SuspensionPoint; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; public abstract class XmlStreamReader { - private SuspensionPoint breakpointHit; private AbstractReadStrategy readStrategy ; --- 4,11 ---- |
|
From: David C. <dc...@us...> - 2005-10-02 19:20:44
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12621/src/org/rubypeople/rdt/internal/debug/core Modified Files: RubyLineBreakpoint.java RubyDebuggerProxy.java Log Message: Cleanup a whole bunch of 'unused warnings" Index: RubyDebuggerProxy.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/RubyDebuggerProxy.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** RubyDebuggerProxy.java 18 Jan 2005 22:19:14 -0000 1.15 --- RubyDebuggerProxy.java 1 Oct 2005 23:11:09 -0000 1.16 *************** *** 299,311 **** class RubyLoop extends Thread { - private boolean shouldStop; public RubyLoop() { - shouldStop = false; this.setName("RubyDebuggerLoop"); } public void setShouldStop() { - shouldStop = true; } --- 299,308 ---- Index: RubyLineBreakpoint.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/RubyLineBreakpoint.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** RubyLineBreakpoint.java 20 Mar 2004 15:37:09 -0000 1.5 --- RubyLineBreakpoint.java 1 Oct 2005 23:11:09 -0000 1.6 *************** *** 8,12 **** import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.debug.core.DebugException; - import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.model.LineBreakpoint; --- 8,11 ---- *************** *** 32,39 **** } - private void register() throws CoreException { - DebugPlugin.getDefault().getBreakpointManager().addBreakpoint(this); - } - public int getLineNumber() throws CoreException { return ensureMarker().getAttribute(IMarker.LINE_NUMBER, -1); --- 31,34 ---- |
|
From: David C. <dc...@us...> - 2005-10-02 19:00:35
|
Update of /cvsroot/rubyeclipse/org.rubypeople.eclipse.shams/src/org/rubypeople/eclipse/shams/resources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8707/src/org/rubypeople/eclipse/shams/resources Modified Files: ShamFile.java Log Message: Refactored RubyBuilder into several smaller classes. Wrote UTs for a few of them. Began work on a SymbolIndex. Index: ShamFile.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.eclipse.shams/src/org/rubypeople/eclipse/shams/resources/ShamFile.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ShamFile.java 13 Jul 2005 14:29:45 -0000 1.12 --- ShamFile.java 1 Oct 2005 23:00:50 -0000 1.13 *************** *** 4,10 **** --- 4,13 ---- import java.io.FileInputStream; import java.io.FileNotFoundException; + import java.io.IOException; import java.io.InputStream; import java.io.Reader; + import junit.framework.Assert; + import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IFile; *************** *** 24,32 **** public class ShamFile extends ShamResource implements IFile { ! protected String contents = ""; protected boolean readContentFromFile; public void setCharset(String newCharset, IProgressMonitor monitor) ! throws CoreException { } --- 27,37 ---- public class ShamFile extends ShamResource implements IFile { ! ! protected String contents = ""; protected boolean readContentFromFile; + private InputStream inputStream; public void setCharset(String newCharset, IProgressMonitor monitor) ! throws CoreException { } *************** *** 70,82 **** if (readContentFromFile) { try { ! return new FileInputStream(this.path.toString()); } catch (FileNotFoundException e) { throw new RuntimeException(e.toString()); } } ! return new ByteArrayInputStream(contents.getBytes()); } ! public InputStream getContents(boolean force) throws CoreException { return getContents(); } --- 75,97 ---- if (readContentFromFile) { try { ! return openStream(new FileInputStream(this.path.toString())); } catch (FileNotFoundException e) { throw new RuntimeException(e.toString()); } } ! return openStream(new ByteArrayInputStream(contents.getBytes())); } ! private InputStream openStream(InputStream newStream) { ! Assert.assertNull("Unexpected second opening of stream", inputStream); ! inputStream = new MonitoredInputStream(newStream); ! return inputStream; ! } ! ! public void assertContentStreamClosed() { ! Assert.assertNull("Unexpected found open stream", inputStream); ! } ! ! public InputStream getContents(boolean force) throws CoreException { return getContents(); } *************** *** 324,326 **** --- 339,359 ---- } + + private class MonitoredInputStream extends InputStream { + + private final InputStream inputStream; + + public MonitoredInputStream(InputStream inputStream) { + this.inputStream = inputStream; + } + + public int read() throws IOException { + return inputStream.read(); + } + + public void close() throws IOException { + super.close(); + ShamFile.this.inputStream = null; + } + } } |
|
From: David C. <dc...@us...> - 2005-10-02 17:42:01
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12348 Modified Files: plugin.xml Log Message: Updated schema to match actual use and eliminate warning. Index: plugin.xml =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.ui/plugin.xml,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** plugin.xml 28 Jul 2005 11:57:15 -0000 1.43 --- plugin.xml 2 Oct 2005 17:41:53 -0000 1.44 *************** *** 326,339 **** </extension> ! <extension ! point="org.rubypeople.rdt.ui.editorPopupExtender"> <rubyEditorPopupMenuExtension class="org.rubypeople.rdt.internal.debug.ui.RubyEditorPopupMenuExtension"> ! <enablement> ! <systemProperty ! name="org.rubypeople.rdt.debug.ui.debuggerActive" ! value="true"> ! </systemProperty> ! </enablement> ! </rubyEditorPopupMenuExtension> </extension> <extension --- 326,335 ---- </extension> ! <extension point="org.rubypeople.rdt.ui.editorPopupExtender"> <rubyEditorPopupMenuExtension class="org.rubypeople.rdt.internal.debug.ui.RubyEditorPopupMenuExtension"> ! <enablement> ! <systemProperty name="org.rubypeople.rdt.debug.ui.debuggerActive" value="true"/> ! </enablement> ! </rubyEditorPopupMenuExtension> </extension> <extension |
|
From: David C. <dc...@us...> - 2005-10-02 17:41:59
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/schema In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12333/schema Modified Files: org.rubypeople.rdt.ui.editorPopupExtender.exsd Log Message: Updated schema to match actual use and eliminate warning. Index: org.rubypeople.rdt.ui.editorPopupExtender.exsd =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/schema/org.rubypeople.rdt.ui.editorPopupExtender.exsd,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** org.rubypeople.rdt.ui.editorPopupExtender.exsd 7 Mar 2005 20:46:57 -0000 1.1 --- org.rubypeople.rdt.ui.editorPopupExtender.exsd 2 Oct 2005 17:41:49 -0000 1.2 *************** *** 13,18 **** <element name="extension"> <complexType> ! ! <sequence> <element ref="rubyEditorPopupMenuExtension"/> </sequence> --- 13,17 ---- <element name="extension"> <complexType> ! <sequence> <element ref="rubyEditorPopupMenuExtension"/> </sequence> *************** *** 42,51 **** <element name="rubyEditorPopupMenuExtension"> ! <complexType> ! <sequence> <element ref="enablement"/> ! </sequence> ! <attribute name="class" type="string"/> ! </complexType> </element> --- 41,83 ---- <element name="rubyEditorPopupMenuExtension"> ! <complexType> ! <sequence> <element ref="enablement"/> ! </sequence> ! <attribute name="class" type="string"> ! <annotation> ! <documentation> ! ! </documentation> ! </annotation> ! </attribute> ! </complexType> ! </element> ! ! <element name="enablement"> ! <complexType> ! <sequence> ! <element ref="systemProperty" minOccurs="0" maxOccurs="unbounded"/> ! </sequence> ! </complexType> ! </element> ! ! <element name="systemProperty"> ! <complexType> ! <attribute name="name" type="string" use="required"> ! <annotation> ! <documentation> ! ! </documentation> ! </annotation> ! </attribute> ! <attribute name="value" type="string" use="required"> ! <annotation> ! <documentation> ! ! </documentation> ! </annotation> ! </attribute> ! </complexType> </element> |
|
From: David C. <dc...@us...> - 2005-10-02 17:19:09
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8231 Modified Files: plugin.xml Log Message: Enabled project-specific compiler error/warnings and set IGNORE for discouraged access on three projects. Index: plugin.xml =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/plugin.xml,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** plugin.xml 21 Sep 2005 20:23:10 -0000 1.61 --- plugin.xml 2 Oct 2005 17:18:53 -0000 1.62 *************** *** 193,198 **** </context> </extension> ! <extension ! point="org.eclipse.ui.commands"> <category name="%category.source.name" --- 193,197 ---- </context> </extension> ! <extension point="org.eclipse.ui.commands"> <category name="%category.source.name" |
|
From: David C. <dc...@us...> - 2005-10-02 17:19:09
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.ui.tests/.settings In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8271/.settings Added Files: org.eclipse.jdt.core.prefs Log Message: Enabled project-specific compiler error/warnings and set IGNORE for discouraged access on three projects. --- NEW FILE: org.eclipse.jdt.core.prefs --- #Sun Oct 02 13:18:11 EDT 2005 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.autoboxing=ignore org.eclipse.jdt.core.compiler.problem.deprecation=ignore org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning org.eclipse.jdt.core.compiler.problem.forbiddenReference=error org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled org.eclipse.jdt.core.compiler.problem.unusedImport=warning org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning |
|
From: David C. <dc...@us...> - 2005-10-02 17:19:09
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8231/src/org/rubypeople/rdt/internal/ui/preferences Modified Files: TextEditorPreferencePage2.java Log Message: Enabled project-specific compiler error/warnings and set IGNORE for discouraged access on three projects. Index: TextEditorPreferencePage2.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/TextEditorPreferencePage2.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** TextEditorPreferencePage2.java 1 Oct 2005 23:10:44 -0000 1.16 --- TextEditorPreferencePage2.java 2 Oct 2005 17:18:53 -0000 1.17 *************** *** 64,69 **** }; - private Button fSetDefaultButton; - protected TextPropertyWidget[] textPropertyWidgets; protected Text indentationWidget; --- 64,67 ---- |
|
From: David C. <dc...@us...> - 2005-10-02 17:19:08
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/.settings In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8231/.settings Added Files: org.eclipse.jdt.core.prefs Log Message: Enabled project-specific compiler error/warnings and set IGNORE for discouraged access on three projects. --- NEW FILE: org.eclipse.jdt.core.prefs --- #Sun Oct 02 13:16:45 EDT 2005 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.autoboxing=ignore org.eclipse.jdt.core.compiler.problem.deprecation=ignore org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning org.eclipse.jdt.core.compiler.problem.forbiddenReference=error org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled org.eclipse.jdt.core.compiler.problem.unusedImport=warning org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning |
|
From: David C. <dc...@us...> - 2005-10-02 17:19:06
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.ui/.settings In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8261/.settings Added Files: org.eclipse.jdt.core.prefs Log Message: Enabled project-specific compiler error/warnings and set IGNORE for discouraged access on three projects. --- NEW FILE: org.eclipse.jdt.core.prefs --- #Sun Oct 02 13:17:30 EDT 2005 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.autoboxing=ignore org.eclipse.jdt.core.compiler.problem.deprecation=ignore org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning org.eclipse.jdt.core.compiler.problem.forbiddenReference=error org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled org.eclipse.jdt.core.compiler.problem.unusedImport=warning org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning |