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: <mba...@us...> - 2007-02-06 20:48:19
|
Revision: 1922
http://svn.sourceforge.net/rubyeclipse/?rev=1922&view=rev
Author: mbarchfe
Date: 2007-02-06 12:47:46 -0800 (Tue, 06 Feb 2007)
Log Message:
-----------
added refactoring.tests
Modified Paths:
--------------
trunk/org.rubypeople.rdt-feature/unit-tests-feature/feature.xml
trunk/org.rubypeople.rdt.build/cruiseControl/svn_co_rdt
Modified: trunk/org.rubypeople.rdt-feature/unit-tests-feature/feature.xml
===================================================================
--- trunk/org.rubypeople.rdt-feature/unit-tests-feature/feature.xml 2007-02-06 20:45:00 UTC (rev 1921)
+++ trunk/org.rubypeople.rdt-feature/unit-tests-feature/feature.xml 2007-02-06 20:47:46 UTC (rev 1922)
@@ -4,7 +4,6 @@
label="Ruby Development Tools Unit Tests"
version="0.0.0"
provider-name="RubyPeople">
-
<install-handler/>
<description url="[Enter Feature URL here.]">
@@ -88,4 +87,11 @@
install-size="0"
version="0.0.0"/>
+ <plugin
+ id="org.rubypeople.rdt.refactoring.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
Modified: trunk/org.rubypeople.rdt.build/cruiseControl/svn_co_rdt
===================================================================
--- trunk/org.rubypeople.rdt.build/cruiseControl/svn_co_rdt 2007-02-06 20:45:00 UTC (rev 1921)
+++ trunk/org.rubypeople.rdt.build/cruiseControl/svn_co_rdt 2007-02-06 20:47:46 UTC (rev 1922)
@@ -25,7 +25,7 @@
# Fetch the plugins
#
pluginsDir=$1/plugins
-plugins="org.epic.regexp org.rubypeople.rdt org.rubypeople.rdt.debug.core.tests org.rubypeople.rdt.launching org.rubypeople.rdt.ui org.kxml2 org.rubypeople.rdt.core org.rubypeople.rdt.debug.ui org.rubypeople.rdt.launching.tests org.rubypeople.rdt.ui.tests org.rubypeople.eclipse.shams org.rubypeople.rdt.core.tests org.rubypeople.rdt.debug.ui.tests org.rubypeople.rdt.tests.all org.rubypeople.eclipse.testutils org.rubypeople.rdt.debug.core org.rubypeople.rdt.doc.user org.rubypeople.rdt.testunit org.jruby org.rubypeople.rdt.refactoring"
+plugins="org.epic.regexp org.rubypeople.rdt org.rubypeople.rdt.debug.core.tests org.rubypeople.rdt.launching org.rubypeople.rdt.ui org.kxml2 org.rubypeople.rdt.core org.rubypeople.rdt.debug.ui org.rubypeople.rdt.launching.tests org.rubypeople.rdt.ui.tests org.rubypeople.eclipse.shams org.rubypeople.rdt.core.tests org.rubypeople.rdt.debug.ui.tests org.rubypeople.rdt.tests.all org.rubypeople.eclipse.testutils org.rubypeople.rdt.debug.core org.rubypeople.rdt.doc.user org.rubypeople.rdt.testunit org.jruby org.rubypeople.rdt.refactoring org.jruby org.rubypeople.rdt.refactoring.tests"
for plugin in $plugins; do
svn co ${url}/$plugin $pluginsDir/$plugin
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-02-06 20:45:07
|
Revision: 1921
http://svn.sourceforge.net/rubyeclipse/?rev=1921&view=rev
Author: cawilliams
Date: 2007-02-06 12:45:00 -0800 (Tue, 06 Feb 2007)
Log Message:
-----------
move FileHelper over to tests plugin. Use core.util.Util to grab a file's content - that way we avoid the off by one per line offset issues in refactoring stuff we do. (on some systems they use more than \n as end of line delimeter, so many offsets that rely on that will be off by one character per line that precedes it)
Added Paths:
-----------
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/util/FileHelper.java
Added: trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/util/FileHelper.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/util/FileHelper.java (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/util/FileHelper.java 2007-02-06 20:45:00 UTC (rev 1921)
@@ -0,0 +1,94 @@
+/***** BEGIN LICENSE BLOCK *****
+ * Version: CPL 1.0/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Common Public
+ * License Version 1.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * Copyright (C) 2006 Lukas Felber <lf...@hs...>
+ * Copyright (C) 2006 Mirko Stocker <me...@mi...>
+ * Copyright (C) 2006 Thomas Corbat <tc...@hs...>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either of the GNU General Public License Version 2 or later (the "GPL"),
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the CPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the CPL, the GPL or the LGPL.
+ ***** END LICENSE BLOCK *****/
+
+package org.rubypeople.rdt.refactoring.tests.util;
+
+import java.io.BufferedReader;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.util.Properties;
+
+import org.rubypeople.rdt.refactoring.util.Constants;
+
+
+public class FileHelper {
+
+ public static String getFileContent(String fileName, Class resourceProvider) {
+ try {
+ return getReaderContent(new FileReader(getRealFileName(fileName, resourceProvider)));
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ private static String getRealFileName(String fileName, Class resourceProvider) {
+ assert resourceProvider.getResource(fileName) != null : fileName + " not found." ;
+ return resourceProvider.getResource(fileName).getFile();
+ }
+
+ public static Properties initProperties(String propertyFileName, Class resourceProvider) throws FileNotFoundException, IOException {
+ Properties properties = new Properties();
+ FileInputStream fileInputStream = null;
+ try {
+ fileInputStream = new FileInputStream(getRealFileName(propertyFileName, resourceProvider));
+ properties.load(fileInputStream);
+ } finally {
+ if(fileInputStream != null) fileInputStream.close();
+ }
+ return properties;
+ }
+
+ public static String getStreamContent(InputStream stream ) {
+
+ return getReaderContent(new InputStreamReader(stream));
+ }
+
+ private static String getReaderContent(Reader reader) {
+ try {
+ StringBuilder contentBuilder = new StringBuilder();
+ BufferedReader bufferedReader = new BufferedReader(reader);
+
+ String line;
+ while ((line = bufferedReader.readLine()) != null) {
+ contentBuilder.append(line).append(Constants.NL); // FIXME This can be wrong! Not all systems use \n as end of line!
+ }
+ return contentBuilder.toString();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-02-06 20:45:03
|
Revision: 1920
http://svn.sourceforge.net/rubyeclipse/?rev=1920&view=rev
Author: cawilliams
Date: 2007-02-06 12:44:08 -0800 (Tue, 06 Feb 2007)
Log Message:
-----------
move FileHelper over to tests plugin. Use core.util.Util to grab a file's content - that way we avoid the off by one per line offset issues in refactoring stuff we do. (on some systems they use more than \n as end of line delimeter, so many offsets that rely on that will be off by one character per line that precedes it)
Modified Paths:
--------------
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/documentprovider/WorkspaceDocumentProvider.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/FilePropertyData.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/FileTestCase.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/FileTestData.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/MultiFileTestData.java
Removed Paths:
-------------
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/util/FileHelper.java
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/documentprovider/WorkspaceDocumentProvider.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/documentprovider/WorkspaceDocumentProvider.java 2007-02-06 20:21:30 UTC (rev 1919)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/documentprovider/WorkspaceDocumentProvider.java 2007-02-06 20:44:08 UTC (rev 1920)
@@ -40,7 +40,7 @@
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Path;
-import org.rubypeople.rdt.refactoring.util.FileHelper;
+import org.rubypeople.rdt.internal.core.util.Util;
public class WorkspaceDocumentProvider extends DocumentProvider {
@@ -105,7 +105,7 @@
public String getFileContent(String fileName) {
IFile currentFile = getIFile(fileName);
try {
- return FileHelper.getStreamContent(currentFile.getContents());
+ return new String(Util.getResourceContentsAsCharArray(currentFile));
} catch (CoreException e) {
e.printStackTrace();
}
Deleted: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/util/FileHelper.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/util/FileHelper.java 2007-02-06 20:21:30 UTC (rev 1919)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/util/FileHelper.java 2007-02-06 20:44:08 UTC (rev 1920)
@@ -1,92 +0,0 @@
-/***** BEGIN LICENSE BLOCK *****
- * Version: CPL 1.0/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Common Public
- * License Version 1.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.eclipse.org/legal/cpl-v10.html
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * Copyright (C) 2006 Lukas Felber <lf...@hs...>
- * Copyright (C) 2006 Mirko Stocker <me...@mi...>
- * Copyright (C) 2006 Thomas Corbat <tc...@hs...>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the CPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the CPL, the GPL or the LGPL.
- ***** END LICENSE BLOCK *****/
-
-package org.rubypeople.rdt.refactoring.util;
-
-import java.io.BufferedReader;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.util.Properties;
-
-
-public class FileHelper {
-
- public static String getFileContent(String fileName, Class resourceProvider) {
- try {
- return getReaderContent(new FileReader(getRealFileName(fileName, resourceProvider)));
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- }
- return null;
- }
-
- private static String getRealFileName(String fileName, Class resourceProvider) {
- assert resourceProvider.getResource(fileName) != null : fileName + " not found." ;
- return resourceProvider.getResource(fileName).getFile();
- }
-
- public static Properties initProperties(String propertyFileName, Class resourceProvider) throws FileNotFoundException, IOException {
- Properties properties = new Properties();
- FileInputStream fileInputStream = null;
- try {
- fileInputStream = new FileInputStream(getRealFileName(propertyFileName, resourceProvider));
- properties.load(fileInputStream);
- } finally {
- if(fileInputStream != null) fileInputStream.close();
- }
- return properties;
- }
-
- public static String getStreamContent(InputStream stream ) {
-
- return getReaderContent(new InputStreamReader(stream));
- }
-
- private static String getReaderContent(Reader reader) {
- try {
- StringBuilder contentBuilder = new StringBuilder();
- BufferedReader bufferedReader = new BufferedReader(reader);
-
- String line;
- while ((line = bufferedReader.readLine()) != null) {
- contentBuilder.append(line).append(Constants.NL);
- }
- return contentBuilder.toString();
- } catch (IOException e) {
- e.printStackTrace();
- }
- return null;
- }
-}
Modified: trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/FilePropertyData.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/FilePropertyData.java 2007-02-06 20:21:30 UTC (rev 1919)
+++ trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/FilePropertyData.java 2007-02-06 20:44:08 UTC (rev 1920)
@@ -37,7 +37,7 @@
import java.util.Properties;
import org.rubypeople.rdt.refactoring.documentprovider.DocumentProvider;
-import org.rubypeople.rdt.refactoring.util.FileHelper;
+import org.rubypeople.rdt.refactoring.tests.util.FileHelper;
public abstract class FilePropertyData extends DocumentProvider {
Modified: trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/FileTestCase.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/FileTestCase.java 2007-02-06 20:21:30 UTC (rev 1919)
+++ trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/FileTestCase.java 2007-02-06 20:44:08 UTC (rev 1920)
@@ -30,7 +30,7 @@
import org.jruby.ast.RootNode;
import org.rubypeople.rdt.refactoring.core.NodeProvider;
-import org.rubypeople.rdt.refactoring.util.FileHelper;
+import org.rubypeople.rdt.refactoring.tests.util.FileHelper;
public abstract class FileTestCase extends RefactoringTestCase
{
Modified: trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/FileTestData.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/FileTestData.java 2007-02-06 20:21:30 UTC (rev 1919)
+++ trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/FileTestData.java 2007-02-06 20:44:08 UTC (rev 1920)
@@ -35,7 +35,7 @@
import java.util.ArrayList;
import java.util.Collection;
-import org.rubypeople.rdt.refactoring.util.FileHelper;
+import org.rubypeople.rdt.refactoring.tests.util.FileHelper;
public class FileTestData extends FilePropertyData {
Modified: trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/MultiFileTestData.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/MultiFileTestData.java 2007-02-06 20:21:30 UTC (rev 1919)
+++ trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/MultiFileTestData.java 2007-02-06 20:44:08 UTC (rev 1920)
@@ -38,7 +38,7 @@
import java.util.StringTokenizer;
import org.jruby.ast.Node;
-import org.rubypeople.rdt.refactoring.util.FileHelper;
+import org.rubypeople.rdt.refactoring.tests.util.FileHelper;
public class MultiFileTestData extends FilePropertyData {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 1919
http://svn.sourceforge.net/rubyeclipse/?rev=1919&view=rev
Author: cawilliams
Date: 2007-02-06 12:21:30 -0800 (Tue, 06 Feb 2007)
Log Message:
-----------
handle case where object being compared in compareTo might be a string (apparently comes from a couple calls to setInput(""), but changing that to setInput(null) doesn't fix it)
Modified Paths:
--------------
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/generateaccessors/AccessorsGenerator.java
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/generateaccessors/AccessorsGenerator.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/generateaccessors/AccessorsGenerator.java 2007-02-06 18:36:21 UTC (rev 1918)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/generateaccessors/AccessorsGenerator.java 2007-02-06 20:21:30 UTC (rev 1919)
@@ -275,9 +275,14 @@
public int compareTo(Object arg0) {
String thisStr = classNode.getName() + name;
- TreeAttribute otherAttr = (TreeAttribute) arg0;
- ClassNodeWrapper otherClassNode = otherAttr.getTreeClass().getClassNode();
- String otherStr = otherClassNode.getName() + otherAttr.toString();
+ String otherStr;
+ if (arg0 instanceof String) {
+ otherStr = (String) arg0;
+ } else {
+ TreeAttribute otherAttr = (TreeAttribute) arg0;
+ ClassNodeWrapper otherClassNode = otherAttr.getTreeClass().getClassNode();
+ otherStr = otherClassNode.getName() + otherAttr.toString();
+ }
return thisStr.compareTo(otherStr);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-02-06 18:36:29
|
Revision: 1918
http://svn.sourceforge.net/rubyeclipse/?rev=1918&view=rev
Author: cawilliams
Date: 2007-02-06 10:36:21 -0800 (Tue, 06 Feb 2007)
Log Message:
-----------
handle singleton methods even better. Now they should work much more like we'd expect
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/CompletionEngine.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/CompletionEngine.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/CompletionEngine.java 2007-02-06 18:35:54 UTC (rev 1917)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/CompletionEngine.java 2007-02-06 18:36:21 UTC (rev 1918)
@@ -152,19 +152,22 @@
private void suggestMethods(int replaceStart, int confidence, IType type) throws RubyModelException {
if (type == null)
- return;
+ return;
IMethod[] methods = type.getMethods();
for (int k = 0; k < methods.length; k++) {
IMethod method = methods[k];
int start = replaceStart;
String name = method.getElementName();
- if (prefix != null && !name.startsWith(prefix))
- continue;
int flags = Flags.AccDefault;
if (method.isSingleton()) {
flags |= Flags.AccStatic;
- start -= type.getElementName().length() + 1;
+ name = name.substring(type.getElementName().length() + 1);
+ } else {
+// FIXME Don't show instance methods if the thing we're working on is a constant (class name)!
}
+ if (prefix != null && !name.startsWith(prefix))
+ continue;
+
switch (method.getVisibility()) {
case IMethod.PRIVATE:
flags |= Flags.AccPrivate;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-02-06 18:35:57
|
Revision: 1917
http://svn.sourceforge.net/rubyeclipse/?rev=1917&view=rev
Author: cawilliams
Date: 2007-02-06 10:35:54 -0800 (Tue, 06 Feb 2007)
Log Message:
-----------
oops, filter to only those with a matching name in first pass searching
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/RubyElementRequestor.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/RubyElementRequestor.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/RubyElementRequestor.java 2007-02-06 18:23:50 UTC (rev 1916)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/RubyElementRequestor.java 2007-02-06 18:35:54 UTC (rev 1917)
@@ -78,7 +78,7 @@
RubyCore.log(e);
}
- return types;
+ return filterToMatches(typeName, types);
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-02-06 18:24:05
|
Revision: 1916
http://svn.sourceforge.net/rubyeclipse/?rev=1916&view=rev
Author: cawilliams
Date: 2007-02-06 10:23:50 -0800 (Tue, 06 Feb 2007)
Log Message:
-----------
fnd types outside of imports quicker by leveraging our "experimental indexer"; for completion proposals on class level methods, replace correct portion
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/CompletionEngine.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/RubyElementRequestor.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScript.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/ExperimentalIndex.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/CompletionEngine.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/CompletionEngine.java 2007-02-06 13:10:52 UTC (rev 1915)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/CompletionEngine.java 2007-02-06 18:23:50 UTC (rev 1916)
@@ -5,6 +5,7 @@
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
+import java.util.Set;
import org.jruby.ast.ClassNode;
import org.jruby.ast.ClassVarAsgnNode;
@@ -117,7 +118,7 @@
}
private void suggestTypeNames(int replaceStart) {
- List<String> types = ExperimentalIndex.getTypes();
+ Set<String> types = ExperimentalIndex.getTypeNames();
// TODO Remove duplicates? Sort?
for (String name : types) {
if (this.prefix != null && !name.startsWith(this.prefix))
@@ -134,7 +135,7 @@
}
private void suggestConstantNames(int replaceStart) {
- List<String> types = ExperimentalIndex.getConstants();
+ Set<String> types = ExperimentalIndex.getConstantNames();
// TODO Remove duplicates? Sort?
for (String name : types) {
if (this.prefix != null && !name.startsWith(this.prefix))
@@ -155,14 +156,14 @@
IMethod[] methods = type.getMethods();
for (int k = 0; k < methods.length; k++) {
IMethod method = methods[k];
+ int start = replaceStart;
String name = method.getElementName();
if (prefix != null && !name.startsWith(prefix))
continue;
- CompletionProposal proposal = new CompletionProposal(CompletionProposal.METHOD_REF, name, confidence);
- proposal.setReplaceRange(replaceStart, replaceStart + name.length());
int flags = Flags.AccDefault;
if (method.isSingleton()) {
flags |= Flags.AccStatic;
+ start -= type.getElementName().length() + 1;
}
switch (method.getVisibility()) {
case IMethod.PRIVATE:
@@ -177,6 +178,8 @@
default:
break;
}
+ CompletionProposal proposal = new CompletionProposal(CompletionProposal.METHOD_REF, name, confidence);
+ proposal.setReplaceRange(start, start + name.length());
proposal.setFlags(flags);
requestor.accept(proposal);
}
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/RubyElementRequestor.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/RubyElementRequestor.java 2007-02-06 13:10:52 UTC (rev 1915)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/RubyElementRequestor.java 2007-02-06 18:23:50 UTC (rev 1916)
@@ -1,6 +1,7 @@
package org.rubypeople.rdt.internal.codeassist;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.List;
import java.util.StringTokenizer;
@@ -15,6 +16,7 @@
import org.rubypeople.rdt.core.IType;
import org.rubypeople.rdt.core.RubyCore;
import org.rubypeople.rdt.core.RubyModelException;
+import org.rubypeople.rdt.internal.core.search.ExperimentalIndex;
public class RubyElementRequestor {
@@ -33,35 +35,49 @@
// FIXME Search the roots in a particular order? Return first match?
ISourceFolderRoot[] roots = rubyProject.getSourceFolderRoots();
for (int i = 0; i < roots.length; i++) {
- types.addAll(getTypeInSourceFolderRoot(roots[i], typeName));
+ types.addAll(getImportedTypesInSourceFolderRoot(roots[i], typeName));
}
+ if (types.size() == 0) { // Couldn't find any!
+ // Do a full search
+ types.addAll(ExperimentalIndex.findType(typeName));
+ }
} catch (RubyModelException e) {
RubyCore.log(e);
}
+ return (IType[]) types.toArray(new IType[types.size()]);
+ }
+
+ private List<IType> filterToMatches(String typeName, List<IType> types) {
List<IType> matches = new ArrayList<IType>();
for (IType type : types) {
if (type.getElementName().equals(typeName)) matches.add(type);
}
- return (IType[]) types.toArray(new IType[matches.size()]);
+ return matches;
}
- private List<IType> getTypeInSourceFolderRoot(ISourceFolderRoot root, String typeName) {
+ private List<IType> getTypesInSourceFolderRoot(ISourceFolderRoot root, String typeName) {
+ List<IType> types = getTypes(root);
+ return filterToMatches(typeName, types);
+ }
+
+ private List<IType> getImportedTypesInSourceFolderRoot(ISourceFolderRoot root, String typeName) {
List<IType> types = new ArrayList<IType>();
try {
IPath rootPath = root.getPath();
// FIXME this is an ugly hack to search the core library in a special way (no need to look at imports)
if (rootPath.toString().contains("org.rubypeople.rdt.launching")) {
- types.addAll(getTypeInImport(root, typeName.toLowerCase()));
+ types.addAll(getTypesInImport(root, typeName.toLowerCase()));
} else {
IImportDeclaration[] imports = script.getImports();
for (int j = 0; j < imports.length; j++) {
String path = imports[j].getElementName();
- types.addAll(getTypeInImport(root, path));
+ types.addAll(getTypesInImport(root, path));
}
}
} catch (RubyModelException e) {
RubyCore.log(e);
}
+
return types;
}
@@ -72,7 +88,7 @@
* @param path The internal path to search.
* @return a List of ITypes which seem to be a match
*/
- private List<IType> getTypeInImport(ISourceFolderRoot root, String path) {
+ private List<IType> getTypesInImport(ISourceFolderRoot root, String path) {
StringTokenizer tokenizer = new StringTokenizer(path, SEPARATOR_CHARS);
List<String> tokens = new ArrayList<String>();
while(tokenizer.hasMoreTokens()) {
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScript.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScript.java 2007-02-06 13:10:52 UTC (rev 1915)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScript.java 2007-02-06 18:23:50 UTC (rev 1916)
@@ -606,7 +606,7 @@
}
/**
- * @see ICompilationUnit#getTypes()
+ * @see ICompilationUnit#getTypeNames()
*/
public IType[] getTypes() throws RubyModelException {
ArrayList list = getChildrenOfType(TYPE);
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/ExperimentalIndex.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/ExperimentalIndex.java 2007-02-06 13:10:52 UTC (rev 1915)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/ExperimentalIndex.java 2007-02-06 18:23:50 UTC (rev 1916)
@@ -1,8 +1,9 @@
package org.rubypeople.rdt.internal.core.search;
-import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -10,35 +11,57 @@
import org.eclipse.core.runtime.jobs.Job;
import org.rubypeople.rdt.core.ElementChangedEvent;
import org.rubypeople.rdt.core.IElementChangedListener;
+import org.rubypeople.rdt.core.IField;
import org.rubypeople.rdt.core.IParent;
import org.rubypeople.rdt.core.IRubyElement;
import org.rubypeople.rdt.core.IRubyElementDelta;
import org.rubypeople.rdt.core.IRubyModel;
+import org.rubypeople.rdt.core.IType;
import org.rubypeople.rdt.core.RubyModelException;
import org.rubypeople.rdt.internal.core.RubyModelManager;
public class ExperimentalIndex implements IElementChangedListener {
private static ExperimentalIndex fgInstance;
- private static ArrayList<String> fgConstants;
- private static ArrayList<String> fgTypes;
+ private static HashSet<IField> fgConstants;
+ private static HashSet<IType> fgTypes;
private ExperimentalIndex() {
- fgTypes = new ArrayList<String>();
- fgConstants = new ArrayList<String>();
+ fgTypes = new HashSet<IType>();
+ fgConstants = new HashSet<IField>();
}
public void elementChanged(ElementChangedEvent event) {
processDelta(event.getDelta());
}
- public static List<String> getTypes() {
- return Collections.unmodifiableList((ArrayList<String>)fgTypes.clone()); // clone to avoid concurrent modification when iterating
+ public static Set<String> getTypeNames() {
+ Set<IType> types = Collections.unmodifiableSet((HashSet<IType>)fgTypes.clone()); // clone to avoid concurrent modification when iterating
+ Set<String> names = new HashSet<String>();
+ for (IType type : types) {
+ names.add(type.getElementName());
+ }
+ return names;
}
- public static List<String> getConstants() {
- return Collections.unmodifiableList((ArrayList<String>)fgConstants.clone()); // clone to avoid concurrent modification when iterating
+ public static Set<String> getConstantNames() {
+ Set<IField> types = Collections.unmodifiableSet((HashSet<IField>)fgConstants.clone()); // clone to avoid concurrent modification when iterating
+ Set<String> names = new HashSet<String>();
+ for (IField type : types) {
+ names.add(type.getElementName());
+ }
+ return names;
}
+
+ public static Set<IType> findType(String name) {
+ Set<IType> types = Collections.unmodifiableSet((HashSet<IType>)fgTypes.clone()); // clone to avoid concurrent modification when iterating
+ Set<IType> matches = new HashSet<IType>();
+ for (IType type : types) {
+ if (type.getElementName().equals(name))
+ matches.add(type);
+ }
+ return matches;
+ }
private void processDelta(IRubyElementDelta delta) {
IRubyElement element = delta.getElement();
@@ -62,10 +85,10 @@
void removeElement(IRubyElement element) {
switch (element.getElementType()) {
case IRubyElement.TYPE:
- fgTypes.remove(element.getElementName());
+ fgTypes.remove(element);
break;
case IRubyElement.CONSTANT:
- fgConstants.remove(element.getElementName());
+ fgConstants.remove(element);
break;
}
}
@@ -73,10 +96,10 @@
void addElement(IRubyElement element) {
switch (element.getElementType()) {
case IRubyElement.TYPE:
- fgTypes.add(element.getElementName());
+ fgTypes.add((IType)element);
break;
case IRubyElement.CONSTANT:
- fgConstants.add(element.getElementName());
+ fgConstants.add((IField)element);
break;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mir...@us...> - 2007-02-06 13:10:55
|
Revision: 1915
http://svn.sourceforge.net/rubyeclipse/?rev=1915&view=rev
Author: mirkostocker
Date: 2007-02-06 05:10:52 -0800 (Tue, 06 Feb 2007)
Log Message:
-----------
add the refactoring plug-in
Modified Paths:
--------------
trunk/org.rubypeople.rdt.build/cruiseControl/svn_co_rdt
Modified: trunk/org.rubypeople.rdt.build/cruiseControl/svn_co_rdt
===================================================================
--- trunk/org.rubypeople.rdt.build/cruiseControl/svn_co_rdt 2007-02-06 12:38:01 UTC (rev 1914)
+++ trunk/org.rubypeople.rdt.build/cruiseControl/svn_co_rdt 2007-02-06 13:10:52 UTC (rev 1915)
@@ -25,7 +25,7 @@
# Fetch the plugins
#
pluginsDir=$1/plugins
-plugins="org.epic.regexp org.rubypeople.rdt org.rubypeople.rdt.debug.core.tests org.rubypeople.rdt.launching org.rubypeople.rdt.ui org.kxml2 org.rubypeople.rdt.core org.rubypeople.rdt.debug.ui org.rubypeople.rdt.launching.tests org.rubypeople.rdt.ui.tests org.rubypeople.eclipse.shams org.rubypeople.rdt.core.tests org.rubypeople.rdt.debug.ui.tests org.rubypeople.rdt.tests.all org.rubypeople.eclipse.testutils org.rubypeople.rdt.debug.core org.rubypeople.rdt.doc.user org.rubypeople.rdt.testunit org.jruby"
+plugins="org.epic.regexp org.rubypeople.rdt org.rubypeople.rdt.debug.core.tests org.rubypeople.rdt.launching org.rubypeople.rdt.ui org.kxml2 org.rubypeople.rdt.core org.rubypeople.rdt.debug.ui org.rubypeople.rdt.launching.tests org.rubypeople.rdt.ui.tests org.rubypeople.eclipse.shams org.rubypeople.rdt.core.tests org.rubypeople.rdt.debug.ui.tests org.rubypeople.rdt.tests.all org.rubypeople.eclipse.testutils org.rubypeople.rdt.debug.core org.rubypeople.rdt.doc.user org.rubypeople.rdt.testunit org.jruby org.rubypeople.rdt.refactoring"
for plugin in $plugins; do
svn co ${url}/$plugin $pluginsDir/$plugin
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mir...@us...> - 2007-02-06 12:38:08
|
Revision: 1914
http://svn.sourceforge.net/rubyeclipse/?rev=1914&view=rev
Author: mirkostocker
Date: 2007-02-06 04:38:01 -0800 (Tue, 06 Feb 2007)
Log Message:
-----------
added the refactoring plug-in to the feature and rdt.map
Modified Paths:
--------------
trunk/org.rubypeople.rdt-feature/feature.xml
trunk/org.rubypeople.rdt.build/map/rdt.map
Modified: trunk/org.rubypeople.rdt-feature/feature.xml
===================================================================
--- trunk/org.rubypeople.rdt-feature/feature.xml 2007-02-06 08:31:40 UTC (rev 1913)
+++ trunk/org.rubypeople.rdt-feature/feature.xml 2007-02-06 12:38:01 UTC (rev 1914)
@@ -27,7 +27,7 @@
The RDT feature contains the following plug-ins and libraries
from external providers:
RegExp plug-in, http://e-p-i-c.sourceforge.net
-JRuby, http://jruby.sourceforge.net
+JRuby, http://jruby.codehaus.org/
kxml2, http://kxml.sourceforge.net
The file org.rubypeople.rdt.launching/ruby/eclipseDebug.rb
is based on the debug.rb file, which is part of the ruby 1.6.8
@@ -339,4 +339,11 @@
version="0.9.2.2944"
unpack="false"/>
+ <plugin
+ id="org.rubypeople.rdt.refactoring"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
Modified: trunk/org.rubypeople.rdt.build/map/rdt.map
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mir...@us...> - 2007-02-06 08:31:45
|
Revision: 1913
http://svn.sourceforge.net/rubyeclipse/?rev=1913&view=rev
Author: mirkostocker
Date: 2007-02-06 00:31:40 -0800 (Tue, 06 Feb 2007)
Log Message:
-----------
Finally.. the first import of the refactorings!
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/formatter/RubyPreview.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/formatter/RubyScriptPreview.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditor.java
Added Paths:
-----------
trunk/org.jruby/README
trunk/org.rubypeople.rdt.refactoring/
trunk/org.rubypeople.rdt.refactoring/.classpath
trunk/org.rubypeople.rdt.refactoring/.project
trunk/org.rubypeople.rdt.refactoring/META-INF/
trunk/org.rubypeople.rdt.refactoring/META-INF/MANIFEST.MF
trunk/org.rubypeople.rdt.refactoring/plugin.properties
trunk/org.rubypeople.rdt.refactoring/plugin.xml
trunk/org.rubypeople.rdt.refactoring/src/
trunk/org.rubypeople.rdt.refactoring/src/org/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/JRubyRefactoringUtils.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/RefactoringPlugin.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/ConvertTempToFieldAction.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/EncapsulateFieldAction.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/ExtractMethodAction.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/FormatSourceAction.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/GenerateAccessorsAction.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/GenerateConstructorAction.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/InlineClassAction.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/InlineMethodAction.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/InlineTempAction.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/MergeClassPartsAction.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/MergeClassPartsInFileAction.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/MergeWithExternalClassPartsAction.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/MoveFieldAction.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/MoveMethodAction.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/OverrideMethodAction.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/PushDownAction.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/RefactoringAction.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/RefactoringActionGroup.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/RenameAction.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/SplitTempAction.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/WorkbenchWindowActionDelegate.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/classnodeprovider/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/classnodeprovider/AllFilesClassNodeProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/classnodeprovider/ClassNodeProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/classnodeprovider/IncludedClassesProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/FieldProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/FormatWithParenthesis.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/IRefactoringConditionChecker.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/NodeFactory.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/NodeProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/RefactoringConditionChecker.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/RubyRefactoring.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/SelectionInformation.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/SelectionNodeProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/converttemptofield/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/converttemptofield/ClassVarNameProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/converttemptofield/Conversion.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/converttemptofield/ConvertTempToFieldRefactoring.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/converttemptofield/InitInConstructorConversion.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/converttemptofield/InstVarNameProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/converttemptofield/TempToFieldConditionChecker.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/converttemptofield/TempToFieldConfig.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/converttemptofield/TempToFieldConverter.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/encapsulatefield/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/encapsulatefield/EncapsulateFieldConditionChecker.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/encapsulatefield/EncapsulateFieldConfig.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/encapsulatefield/EncapsulateFieldRefactoring.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/encapsulatefield/FieldEncapsulator.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/extractmethod/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/extractmethod/ExtractMethodConditionChecker.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/extractmethod/ExtractMethodConfig.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/extractmethod/ExtractMethodRefactoring.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/extractmethod/ExtractedArgument.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/extractmethod/ExtractedMethodCall.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/extractmethod/ExtractedMethodDef.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/extractmethod/ExtractedMethodHelper.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/extractmethod/MethodExtractor.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/formatsource/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/formatsource/EditableFormatHelper.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/formatsource/FormatSourceConditionChecker.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/formatsource/FormatSourceConfig.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/formatsource/FormatSourceRefactoring.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/formatsource/FormattedSourceEditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/formatsource/PreviewGenerator.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/formatsource/PreviewGeneratorImpl.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/generateaccessors/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/generateaccessors/AccessorOffsetProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/generateaccessors/AccessorsGenerator.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/generateaccessors/GenerateAccessorsRefactoring.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/generateaccessors/GeneratedAccessor.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/generateconstructor/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/generateconstructor/ConstructorsGenerator.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/generateconstructor/GenerateConstructorRefactoring.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/generateconstructor/GeneratedConstructor.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlineclass/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlineclass/ClassInliner.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlineclass/ConstructorInliner.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlineclass/InlineClassConditionChecker.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlineclass/InlineClassConfig.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlineclass/InlineClassRefactoring.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlineclass/InsertClassBuilder.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlineclass/TextEditComparator.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/IMethodBodyStatementReplacer.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/IMethodCallNode.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/IMethodFinder.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/IParameterReplacer.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/IRemoveDeclaration.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/IRenameDuplicatedVariables.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/IReturnStatementReplacer.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/ISelectedCallFinder.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/ITargetClassFinder.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/InlineAndRemoveEditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/InlineMethodConditionChecker.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/InlineMethodConfig.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/InlineMethodEditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/InlineMethodRefactoring.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/MethodBodyStatementReplacer.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/MethodCallNode.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/MethodCallNodeFactory.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/MethodFCallNode.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/MethodFinder.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/MethodVCallNode.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/ParameterReplacer.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/RenameDuplicatedVariables.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/ReturnStatementReplacer.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/SelectedCallFinder.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/TargetClassFinder.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinetemp/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinetemp/InlineTempConditionChecker.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinetemp/InlineTempConfig.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinetemp/InlineTempRefactoring.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinetemp/MethodCallReplaceProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinetemp/TempInliner.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinetemp/TempValueReplaceProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/mergeclasspartsinfile/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/mergeclasspartsinfile/InFileClassPartsMerger.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/mergeclasspartsinfile/MergeClassPartInFileConfig.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/mergeclasspartsinfile/MergeClassPartsInFileConditionChecker.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/mergeclasspartsinfile/MergeClassPartsInFileRefactoring.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/mergewithexternalclassparts/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/mergewithexternalclassparts/ClassInsertProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/mergewithexternalclassparts/ClassPartTreeItem.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/mergewithexternalclassparts/ExternalClassPartsMerger.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/mergewithexternalclassparts/MergeWithExternalClassPartConfig.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/mergewithexternalclassparts/MergeWithExternalClassPartsConditionChecker.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/mergewithexternalclassparts/MergeWithExternalClassPartsRefactoring.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/movefield/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/movefield/GenerateAccessorAtSource.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/movefield/GenerateAccessorsAtTarget.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/movefield/MoveFieldConditionChecker.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/movefield/MoveFieldConfig.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/movefield/MoveFieldEditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/movefield/MoveFieldRefactoring.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/movemethod/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/movemethod/DelegateMethodEditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/movemethod/InsertAccessorEditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/movemethod/InsertMethodEditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/movemethod/InsertVisibilityEditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/movemethod/MethodMover.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/movemethod/MoveMethodConditionChecker.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/movemethod/MoveMethodConfig.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/movemethod/MoveMethodRefactoring.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/movemethod/RemovePartOfVisibilityNodeProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/movemethod/ReplaceMethodCallEditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/movemethod/ReplaceVisibilityEditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/overridemethod/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/overridemethod/MethodsOverrider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/overridemethod/OverriddenMethod.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/overridemethod/OverrideMethodRefactoring.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/pushdown/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/pushdown/DownPushedMethods.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/pushdown/DownPushedMethodsClass.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/pushdown/MethodDownPusher.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/pushdown/NewClassOffsetProvier.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/pushdown/PushDownRefactoring.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/rename/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/rename/RenameConditionChecker.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/rename/RenameConfig.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/rename/RenameRefactoring.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renameclass/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renameclass/ChildClassesRenameEditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renameclass/ClassFinder.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renameclass/ClassInstanciationFinder.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renameclass/ConstructorCall.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renameclass/ConstructorRenameEditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renameclass/IClassFinder.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renameclass/IClassInstanciationFinder.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renameclass/PartialClassesRenameEditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renameclass/RenameClassConditionChecker.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renameclass/RenameClassConfig.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renameclass/RenameClassEditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renameclass/RenameClassRefactoring.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamefield/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamefield/FieldProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamefield/FieldRenameEditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamefield/FieldRenamer.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamefield/RenameFieldConditionChecker.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamefield/RenameFieldConfig.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamefield/RenameFieldRefactoring.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamefield/fielditems/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamefield/fielditems/AccessorFieldItem.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamefield/fielditems/AttrFieldItem.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamefield/fielditems/ClassVarAsgnFieldItem.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamefield/fielditems/ClassVarFieldItem.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamefield/fielditems/FieldCallItem.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamefield/fielditems/FieldItem.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamefield/fielditems/InstAsgnFieldItem.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamefield/fielditems/InstVarFieldItem.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamelocalvariable/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamelocalvariable/DynamicVariableRenamer.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamelocalvariable/IAbortCondition.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamelocalvariable/IRenameConfig.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamelocalvariable/LocalVariableRenamer.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamelocalvariable/LocalVariablesEditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamelocalvariable/RenameConditionChecker.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamelocalvariable/RenameConfig.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamelocalvariable/RenameLocalVariableRefactoring.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamelocalvariable/SingleLocalVariableEdit.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamelocalvariable/VariableNameProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamelocalvariable/VariableRenamer.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamemethod/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamemethod/MethodDefinitionWrapper.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamemethod/MethodRenameEditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamemethod/MethodRenamer.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamemethod/NodeSelector.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamemethod/RenameMethodConditionChecker.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamemethod/RenameMethodConfig.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamemethod/RenameMethodRefactoring.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamemethod/methoditems/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamemethod/methoditems/CallCandidateItem.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamemethod/methoditems/MethodItem.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamemethod/methoditems/MethodNameArgumentItem.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamemethod/methoditems/SymbolItem.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/splittemp/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/splittemp/ILocalVarFinder.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/splittemp/ISplittedNamesReceiver.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/splittemp/ISplittedVariableRenamer.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/splittemp/LocalVarFinder.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/splittemp/LocalVarUsage.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/splittemp/SplitTempConditionChecker.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/splittemp/SplitTempConfig.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/splittemp/SplitTempEditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/splittemp/SplitTempRefactoring.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/splittemp/SplittedVariableRenamer.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/documentprovider/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/documentprovider/DocumentProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/documentprovider/DocumentWithIncluding.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/documentprovider/IDocumentProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/documentprovider/StringDocumentProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/documentprovider/WorkspaceDocumentProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/editprovider/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/editprovider/DeleteEditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/editprovider/EditAndTreeContentProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/editprovider/EditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/editprovider/EditProviderGroup.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/editprovider/EditProviderGroups.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/editprovider/FileEditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/editprovider/FileMultiEditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/editprovider/IEditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/editprovider/IMultiFileEditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/editprovider/ITreeClass.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/editprovider/InsertEditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/editprovider/MultiEditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/editprovider/MultiFileEditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/editprovider/ReplaceEditProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/exception/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/exception/NoClassNodeException.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/exception/UnknownClassNameException.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/exception/UnknownMethodNameException.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/exception/UnknownReferenceException.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/nodewrapper/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/nodewrapper/ArgsNodeWrapper.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/nodewrapper/AttrAccessorNodeWrapper.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/nodewrapper/CallArgsNodeWrapper.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/nodewrapper/ClassNodeWrapper.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/nodewrapper/FieldNodeWrapper.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/nodewrapper/INodeWrapper.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/nodewrapper/LocalNodeWrapper.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/nodewrapper/MethodCallNodeWrapper.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/nodewrapper/MethodNodeWrapper.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/nodewrapper/PartialClassNodeWrapper.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/nodewrapper/RealClassNodeWrapper.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/nodewrapper/SClassNodeWrapper.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/nodewrapper/VisibilityNodeWrapper.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/offsetprovider/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/offsetprovider/AfterLastMethodInClassOffsetProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/offsetprovider/AfterLastNodeInMethodOffsetProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/offsetprovider/AfterMethodOffsetProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/offsetprovider/AfterNodeOffsetProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/offsetprovider/BeforeFirstMethodInClassOffsetProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/offsetprovider/ConstructorOffsetProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/offsetprovider/IOffsetProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/offsetprovider/MethodOffsetProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/offsetprovider/OffsetProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/preview/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/preview/RubyTextEditChangePreviewViewer.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/preview/RubyTextFileChange.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/signatureprovider/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/signatureprovider/ClassNodeSignatureProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/signatureprovider/ClassSignatureProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/signatureprovider/IClassSignatureProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/signatureprovider/JRubyClassSignatureProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/signatureprovider/MethodSignature.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/CheckableItem.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/ConstructorGenerationTree.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/ICheckboxListener.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/IChildrenProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/IErrorMessageGenerator.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/IErrorMessageReceiver.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/IItemSelectionReceiver.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/INewNameReceiver.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/IParentProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/IValidator.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/IncludedClassesSelectionDialog.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/LabeledTextField.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/NewNameListener.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/NotifiedContainerCheckedTree.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/RdtCodeViewer.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/RubyRefactoringWizard.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/TreeContentProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/AccessorSelectionPage.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/CallReplaceSelectionPage.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/ConstructorSelectionPage.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/ConvertTempToFieldPage.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/ConverterPageParameters.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/EncapsulateFieldPage.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/ExtractMethodPage.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/FormatSourcePage.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/InlineClassPage.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/InlineMethodPage.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/InlineTempPage.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/MergeClassPartsInFilePage.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/MergeWithExternalClassPartsPage.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/MethodDownPusherSelectionPage.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/MoveFieldPage.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/OverrideMethodSelectionPage.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/RenameFieldPage.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/RenamePage.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/SplitTempPage.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/encapsulatefield/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/encapsulatefield/EncapsulateFieldAccessorComposite.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/encapsulatefield/IVisibilitySelectionListener.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/extractmethod/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/extractmethod/ButtonStateListener.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/extractmethod/ExtractMethodComposite.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/extractmethod/IValidationController.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/extractmethod/MethodArgumentTableItem.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/extractmethod/MethodNameListener.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/extractmethod/ParameterTextChanged.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/extractmethod/ParametersButtonDownListener.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/extractmethod/ParametersButtonListener.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/extractmethod/ParametersButtonUpListener.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/extractmethod/ParametersTableCellEditorListener.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/extractmethod/SignatureObserver.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/inlinemethod/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/inlinemethod/TargetClassFinderUI.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/movemethod/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/movemethod/FirstMoveMethodPage.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/movemethod/FirstMoveMethodPageComposite.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/movemethod/SecondMoveMethodPage.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/movemethod/SecondMoveMethodPageComposite.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/util/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/util/AbstractSelectionListener.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/util/SwtUtils.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/util/
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/util/ArityEvaluator.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/util/Constants.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/util/FileHelper.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/util/HsrFormatter.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/util/NameHelper.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/util/NameValidator.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/util/NodeUtil.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/util/StringHelper.java
trunk/org.rubypeople.rdt.refactoring.tests/
trunk/org.rubypeople.rdt.refactoring.tests/.classpath
trunk/org.rubypeople.rdt.refactoring.tests/.project
trunk/org.rubypeople.rdt.refactoring.tests/META-INF/
trunk/org.rubypeople.rdt.refactoring.tests/META-INF/MANIFEST.MF
trunk/org.rubypeople.rdt.refactoring.tests/src/
trunk/org.rubypeople.rdt.refactoring.tests/src/org/
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/FilePropertyData.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/FileTestCase.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/FileTestData.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/FileTestSuite.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/MultiFileTestData.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/RefactoringConditionTestCase.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/RefactoringTestCase.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/TS_All.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/TestsPlugin.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/TreeProviderTester.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/TwoLayerTreeEditProviderTester.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/classnodeprovider/
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/classnodeprovider/ClassNodeProviderTester.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/classnodeprovider/TC_ClassNodeProvider.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/classnodeprovider/TC_IncludedClassesProvider.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/classnodeprovider/TS_ClassNodeProvider.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/classnodeprovider/class_node_provider_test_1
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/classnodeprovider/tc_included_classes_provider.rb
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/classnodeprovider/tc_included_classes_provider_2.rb
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/MultipleDocumentsInOneProvider.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/TC_NodeProvider.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/TC_SelectionNodeProvider.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/TS_Core.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/TS_TempToField.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/TempToFieldTester.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/conditionchecks/
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/conditionchecks/TS_TempToFieldChecks.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/conditionchecks/TempToFieldConditionTester.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/conditionchecks/create_stub.rb
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/conditionchecks/temp_to_field_checker_test_1.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/conditionchecks/temp_to_field_checker_test_1.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/conditionchecks/temp_to_field_checker_test_10.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/conditionchecks/temp_to_field_checker_test_10.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/conditionchecks/temp_to_field_checker_test_2.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/conditionchecks/temp_to_field_checker_test_2.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/conditionchecks/temp_to_field_checker_test_3.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/conditionchecks/temp_to_field_checker_test_3.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/conditionchecks/temp_to_field_checker_test_4.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/conditionchecks/temp_to_field_checker_test_4.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/conditionchecks/temp_to_field_checker_test_5.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/conditionchecks/temp_to_field_checker_test_5.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/conditionchecks/temp_to_field_checker_test_6.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/conditionchecks/temp_to_field_checker_test_6.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/conditionchecks/temp_to_field_checker_test_7.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/conditionchecks/temp_to_field_checker_test_7.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/conditionchecks/temp_to_field_checker_test_8.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/conditionchecks/temp_to_field_checker_test_8.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/conditionchecks/temp_to_field_checker_test_9.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/conditionchecks/temp_to_field_checker_test_9.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/create_stub.rb
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_1.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_1.test_result
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_1.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_10.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_10.test_result
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_10.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_12.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_12.test_result
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_12.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_13.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_13.test_result
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_13.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_14.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_14.test_result
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_14.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_15.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_15.test_result
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_15.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_16.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_16.test_result
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_16.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_17.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_17.test_result
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_17.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_2.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_2.test_result
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_2.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_3.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_3.test_result
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_3.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_4.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_4.test_result
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_4.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_5.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_5.test_result
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_5.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_6.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_6.test_result
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_6.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_7.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_7.test_result
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_7.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_8.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_8.test_result
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_8.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_9.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_9.test_result
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/converttemptofield/temp_to_field_test_9.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/encapsulatefield/
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/encapsulatefield/EncapsulateFieldTester.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/encapsulatefield/TS_EncapsulateField.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/encapsulatefield/conditionchecks/
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/encapsulatefield/conditionchecks/EncapsulateFieldConditionTester.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/encapsulatefield/conditionchecks/TS_EncapsulateFieldChecks.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/encapsulatefield/conditionchecks/create_stub.rb
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/encapsulatefield/conditionchecks/encapsulate_field_checker_test_1.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/encapsulatefield/conditionchecks/encapsulate_field_checker_test_1.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/encapsulatefield/conditionchecks/encapsulate_field_checker_test_2.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/encapsulatefield/conditionchecks/encapsulate_field_checker_test_2.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/encapsulatefield/conditionchecks/encapsulate_field_checker_test_3.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/encapsulatefield/conditionchecks/encapsulate_field_checker_test_3.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/encapsulatefield/conditionchecks/encapsulate_field_checker_test_4.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/encapsulatefield/conditionchecks/encapsulate_field_checker_test_4.test_source
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/encapsulatefield/create_stub.rb
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/encapsulatefield/encapsulate_field_test_1.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/encapsulatefield/encapsulate_field_test_1.test_result
trunk/org.rubypeople.rdt.refactoring...
[truncated message content] |
|
From: <mir...@us...> - 2007-02-05 10:37:17
|
Revision: 1912
http://svn.sourceforge.net/rubyeclipse/?rev=1912&view=rev
Author: mirkostocker
Date: 2007-02-05 02:35:48 -0800 (Mon, 05 Feb 2007)
Log Message:
-----------
update to jruby 2944 and ready for refactoring import
Modified Paths:
--------------
trunk/org.jruby/META-INF/MANIFEST.MF
trunk/org.jruby/lib/jruby.jar
trunk/org.jruby/src.zip
trunk/org.rubypeople.rdt-feature/feature.xml
Modified: trunk/org.jruby/META-INF/MANIFEST.MF
===================================================================
--- trunk/org.jruby/META-INF/MANIFEST.MF 2007-02-03 20:33:51 UTC (rev 1911)
+++ trunk/org.jruby/META-INF/MANIFEST.MF 2007-02-05 10:35:48 UTC (rev 1912)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: Jruby Plug-in
Bundle-SymbolicName: org.jruby
-Bundle-Version: 0.9.2.2921
+Bundle-Version: 0.9.2.2944
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime
Eclipse-LazyStart: false
Modified: trunk/org.jruby/lib/jruby.jar
===================================================================
(Binary files differ)
Modified: trunk/org.jruby/src.zip
===================================================================
(Binary files differ)
Modified: trunk/org.rubypeople.rdt-feature/feature.xml
===================================================================
--- trunk/org.rubypeople.rdt-feature/feature.xml 2007-02-03 20:33:51 UTC (rev 1911)
+++ trunk/org.rubypeople.rdt-feature/feature.xml 2007-02-05 10:35:48 UTC (rev 1912)
@@ -336,7 +336,7 @@
id="org.jruby"
download-size="0"
install-size="0"
- version="0.9.2.2921"
+ version="0.9.2.2944"
unpack="false"/>
</feature>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-02-03 20:33:53
|
Revision: 1911
http://svn.sourceforge.net/rubyeclipse/?rev=1911&view=rev
Author: cawilliams
Date: 2007-02-03 12:33:51 -0800 (Sat, 03 Feb 2007)
Log Message:
-----------
oops rename getJavaVersion to getRubyVersion
Modified Paths:
--------------
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/AbstractVMInstall.java
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/AbstractVMInstall.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/AbstractVMInstall.java 2007-02-02 17:25:59 UTC (rev 1910)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/AbstractVMInstall.java 2007-02-03 20:33:51 UTC (rev 1911)
@@ -261,7 +261,7 @@
* Subclasses should override.
* @see org.eclipse.jdt.launching.IVMInstall2#getJavaVersion()
*/
- public String getJavaVersion() {
+ public String getRubyVersion() {
return null;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-02-02 17:26:01
|
Revision: 1910
http://svn.sourceforge.net/rubyeclipse/?rev=1910&view=rev
Author: cawilliams
Date: 2007-02-02 09:25:59 -0800 (Fri, 02 Feb 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScript.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScript.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScript.java 2007-02-02 17:25:53 UTC (rev 1909)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScript.java 2007-02-02 17:25:59 UTC (rev 1910)
@@ -406,7 +406,7 @@
RubyModelManager manager = RubyModelManager.getRubyModelManager();
- RubyScript workingCopy = new RubyScript((SourceFolder) getParent(), getElementName(), DefaultWorkingCopyOwner.PRIMARY);
+ RubyScript workingCopy = new RubyScript((SourceFolder) getParent(), getElementName(), workingCopyOwner);
RubyModelManager.PerWorkingCopyInfo perWorkingCopyInfo = manager.getPerWorkingCopyInfo(workingCopy, false/*
* don't
* create
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-02-02 17:25:56
|
Revision: 1909
http://svn.sourceforge.net/rubyeclipse/?rev=1909&view=rev
Author: cawilliams
Date: 2007-02-02 09:25:53 -0800 (Fri, 02 Feb 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/IRubyScript.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/IRubyScript.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/IRubyScript.java 2007-02-02 16:06:27 UTC (rev 1908)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/IRubyScript.java 2007-02-02 17:25:53 UTC (rev 1909)
@@ -102,17 +102,17 @@
IType getType(String name);
/**
- * Returns the primary compilation unit (whose owner is the primary owner)
- * this working copy was created from, or this compilation unit if this a
- * primary compilation unit.
+ * Returns the primary ruby script (whose owner is the primary owner)
+ * this working copy was created from, or this ruby script if this a
+ * primary ruby script.
* <p>
- * Note that the returned primary compilation unit can be in working copy
+ * Note that the returned primary ruby script can be in working copy
* mode.
* </p>
*
- * @return the primary compilation unit this working copy was created from,
- * or this compilation unit if it is primary
- * @since 3.0
+ * @return the primary ruby script this working copy was created from,
+ * or this ruby script if it is primary
+ * @since 0.8.0
*/
IRubyScript getPrimary();
@@ -120,7 +120,7 @@
* Returns whether this element is a working copy.
*
* @return true if this element is a working copy, false otherwise
- * @since 3.0
+ * @since 0.8.0
*/
boolean isWorkingCopy();
@@ -156,7 +156,7 @@
* @return a new working copy of this element if this element is not a
* working copy, or this element if this element is already a
* working copy
- * @since 3.0
+ * @since 0.8.0
*/
IRubyScript getWorkingCopy(IProgressMonitor monitor) throws RubyModelException;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 1908
http://svn.sourceforge.net/rubyeclipse/?rev=1908&view=rev
Author: cawilliams
Date: 2007-02-02 08:06:27 -0800 (Fri, 02 Feb 2007)
Log Message:
-----------
try to fix the broken build as best I can...
Added Paths:
-----------
trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/parsing/BreakpointModificationReader.java
Added: trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/parsing/BreakpointModificationReader.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/parsing/BreakpointModificationReader.java (rev 0)
+++ trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/parsing/BreakpointModificationReader.java 2007-02-02 16:06:27 UTC (rev 1908)
@@ -0,0 +1,45 @@
+package org.rubypeople.rdt.internal.debug.core.parsing;
+
+import org.rubypeople.rdt.internal.debug.core.RdtDebugCorePlugin;
+import org.xmlpull.v1.XmlPullParser;
+
+public class BreakpointModificationReader extends XmlStreamReader {
+
+ private String no;
+
+ public BreakpointModificationReader(XmlPullParser xpp) {
+ super(xpp);
+ }
+
+ public BreakpointModificationReader(AbstractReadStrategy readStrategy) {
+ super(readStrategy);
+ }
+
+ public int readBreakpointNo() throws NumberFormatException {
+ try {
+ this.read();
+ } catch (Exception ex) {
+ RdtDebugCorePlugin.log(ex);
+ return -1;
+ }
+ return Integer.parseInt(no);
+ }
+
+ @Override
+ protected boolean processStartElement(XmlPullParser xpp) throws XmlStreamReaderException {
+ if (xpp.getName().equals("breakpointAdded")) {
+ no = xpp.getAttributeValue("", "no");
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public void processContent(String text) {}
+
+ @Override
+ protected boolean processEndElement(XmlPullParser xpp) {
+ return xpp.getName().equals("breakpointAdded");
+ }
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-02-02 14:57:50
|
Revision: 1907
http://svn.sourceforge.net/rubyeclipse/?rev=1907&view=rev
Author: cawilliams
Date: 2007-02-02 06:57:37 -0800 (Fri, 02 Feb 2007)
Log Message:
-----------
handle a null ListNode for args in ArgsNode
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/DefaultTypeInferrer.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/DefaultTypeInferrer.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/DefaultTypeInferrer.java 2007-02-02 14:17:43 UTC (rev 1906)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/DefaultTypeInferrer.java 2007-02-02 14:57:37 UTC (rev 1907)
@@ -14,6 +14,7 @@
import org.jruby.ast.GlobalVarNode;
import org.jruby.ast.InstAsgnNode;
import org.jruby.ast.InstVarNode;
+import org.jruby.ast.ListNode;
import org.jruby.ast.LocalAsgnNode;
import org.jruby.ast.LocalVarNode;
import org.jruby.ast.Node;
@@ -325,8 +326,11 @@
*/
private int getArgumentIndex(ArgsNode argsNode, String argName) {
int argNumber = 0;
- for (Iterator iter = argsNode.getArgs().iterator(); iter.hasNext();) {
- if (((ArgumentNode) iter.next()).getName().equals(argName)) {
+ ListNode args = argsNode.getArgs();
+ if (args == null) return -1; // no args. Maybe we should check arity instead?
+ for (Iterator iter = args.iterator(); iter.hasNext();) {
+ ArgumentNode arg = (ArgumentNode) iter.next();
+ if (arg.getName().equals(argName)) {
break;
}
argNumber++;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mir...@us...> - 2007-02-02 14:17:47
|
Revision: 1906
http://svn.sourceforge.net/rubyeclipse/?rev=1906&view=rev
Author: mirkostocker
Date: 2007-02-02 06:17:43 -0800 (Fri, 02 Feb 2007)
Log Message:
-----------
update jruby and remove the patches
Modified Paths:
--------------
trunk/org.jruby/META-INF/MANIFEST.MF
trunk/org.jruby/lib/jruby.jar
trunk/org.jruby/src.zip
trunk/org.rubypeople.rdt-feature/feature.xml
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScriptStructureBuilder.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser/InOrderVisitor.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/DOMFinder.java
Removed Paths:
-------------
trunk/org.jruby/patches/
Modified: trunk/org.jruby/META-INF/MANIFEST.MF
===================================================================
--- trunk/org.jruby/META-INF/MANIFEST.MF 2007-02-01 13:57:37 UTC (rev 1905)
+++ trunk/org.jruby/META-INF/MANIFEST.MF 2007-02-02 14:17:43 UTC (rev 1906)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: Jruby Plug-in
Bundle-SymbolicName: org.jruby
-Bundle-Version: 0.9.2.2742
+Bundle-Version: 0.9.2.2921
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime
Eclipse-LazyStart: false
Modified: trunk/org.jruby/lib/jruby.jar
===================================================================
(Binary files differ)
Modified: trunk/org.jruby/src.zip
===================================================================
(Binary files differ)
Modified: trunk/org.rubypeople.rdt-feature/feature.xml
===================================================================
--- trunk/org.rubypeople.rdt-feature/feature.xml 2007-02-01 13:57:37 UTC (rev 1905)
+++ trunk/org.rubypeople.rdt-feature/feature.xml 2007-02-02 14:17:43 UTC (rev 1906)
@@ -336,7 +336,7 @@
id="org.jruby"
download-size="0"
install-size="0"
- version="0.9.2.2742"
+ version="0.9.2.2921"
unpack="false"/>
</feature>
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScriptStructureBuilder.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScriptStructureBuilder.java 2007-02-01 13:57:37 UTC (rev 1905)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScriptStructureBuilder.java 2007-02-02 14:17:43 UTC (rev 1906)
@@ -328,7 +328,6 @@
handleNode(iVisited);
visitNode(iVisited.getArgsNode());
visitNode(iVisited.getBodyNode());
- visitNode(iVisited.getIterNode());
return null;
}
@@ -466,6 +465,7 @@
System.out.println(iVisited.getName());
visitNode(iVisited.getReceiverNode());
visitNode(iVisited.getArgsNode());
+ visitNode(iVisited.getIterNode());
return null;
}
@@ -962,6 +962,7 @@
}
visitNode(iVisited.getArgsNode());
+ visitNode(iVisited.getIterNode());
return null;
}
@@ -1183,7 +1184,6 @@
RubyBlock block = new RubyBlock(modelStack.peek());
modelStack.push(block);
- visitNode(iVisited.getIterNode());
visitNode(iVisited.getVarNode());
visitNode(iVisited.getBodyNode());
if (DEBUG)
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser/InOrderVisitor.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser/InOrderVisitor.java 2007-02-01 13:57:37 UTC (rev 1905)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser/InOrderVisitor.java 2007-02-02 14:17:43 UTC (rev 1906)
@@ -260,7 +260,6 @@
handleNode(iVisited);
acceptNode(iVisited.getArgsNode());
acceptNode(iVisited.getBodyNode());
- acceptNode(iVisited.getIterNode());
return null;
}
@@ -327,6 +326,7 @@
handleNode(iVisited);
acceptNode(iVisited.getReceiverNode());
acceptNode(iVisited.getArgsNode());
+ acceptNode(iVisited.getIterNode());
return null;
}
@@ -529,6 +529,7 @@
public Instruction visitFCallNode(FCallNode iVisited) {
handleNode(iVisited);
acceptNode(iVisited.getArgsNode());
+ acceptNode(iVisited.getIterNode());
return null;
}
@@ -660,7 +661,6 @@
*/
public Instruction visitIterNode(IterNode iVisited) {
handleNode(iVisited);
- acceptNode(iVisited.getIterNode());
acceptNode(iVisited.getVarNode());
acceptNode(iVisited.getBodyNode());
return null;
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/DOMFinder.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/DOMFinder.java 2007-02-01 13:57:37 UTC (rev 1905)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/DOMFinder.java 2007-02-02 14:17:43 UTC (rev 1906)
@@ -180,7 +180,6 @@
public Instruction visitBlockPassNode(BlockPassNode iVisited) {
visitNode(iVisited.getArgsNode());
visitNode(iVisited.getBodyNode());
- visitNode(iVisited.getIterNode());
return null;
}
@@ -192,6 +191,7 @@
public Instruction visitCallNode(CallNode iVisited) {
visitNode(iVisited.getReceiverNode());
visitNode(iVisited.getArgsNode());
+ visitNode(iVisited.getIterNode());
return null;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-02-01 13:57:57
|
Revision: 1905
http://svn.sourceforge.net/rubyeclipse/?rev=1905&view=rev
Author: cawilliams
Date: 2007-02-01 05:57:37 -0800 (Thu, 01 Feb 2007)
Log Message:
-----------
if the argsNode or the variable name are null then return false for doesArgsNodeComntainVariable.
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/DefaultTypeInferrer.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/DefaultTypeInferrer.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/DefaultTypeInferrer.java 2007-01-31 22:31:39 UTC (rev 1904)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/DefaultTypeInferrer.java 2007-02-01 13:57:37 UTC (rev 1905)
@@ -308,6 +308,8 @@
* @return
*/
private boolean doesArgsNodeContainsVariable(ArgsNode argsNode, String argName) {
+ if (argsNode == null) return false;
+ if (argName == null) return false;
return getArgumentIndex(argsNode, argName) >= 0;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mba...@us...> - 2007-01-31 22:31:45
|
Revision: 1904
http://svn.sourceforge.net/rubyeclipse/?rev=1904&view=rev
Author: mbarchfe
Date: 2007-01-31 14:31:39 -0800 (Wed, 31 Jan 2007)
Log Message:
-----------
Added better abstraction for debugger access since we need two socket connections for rubydebug
Removed Paths:
-------------
trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/parsing/BreakpointAddedReader.java
Deleted: trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/parsing/BreakpointAddedReader.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/parsing/BreakpointAddedReader.java 2007-01-31 22:31:15 UTC (rev 1903)
+++ trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/parsing/BreakpointAddedReader.java 2007-01-31 22:31:39 UTC (rev 1904)
@@ -1,47 +0,0 @@
-package org.rubypeople.rdt.internal.debug.core.parsing;
-
-import org.rubypeople.rdt.internal.debug.core.RdtDebugCorePlugin;
-import org.xmlpull.v1.XmlPullParser;
-
-public class BreakpointAddedReader extends XmlStreamReader {
-
- private String no;
-
- public BreakpointAddedReader(XmlPullParser xpp) {
- super(xpp);
- }
-
- public BreakpointAddedReader(AbstractReadStrategy readStrategy) {
- super(readStrategy);
- }
-
- @Override
- protected boolean processStartElement(XmlPullParser xpp) throws XmlStreamReaderException {
- boolean result = false;
- if (xpp.getName().equals("breakpointAdded")) {
- no = xpp.getAttributeValue("", "no");
- result = true;
- }
- return result;
- }
-
- public int readBreakpointNo() throws NumberFormatException {
-
- try {
- this.read();
- } catch (Exception ex) {
- RdtDebugCorePlugin.log(ex);
- return -1;
- }
- return Integer.parseInt(no) ;
- }
-
- @Override
- public void processContent(String text) {}
-
- @Override
- protected boolean processEndElement(XmlPullParser xpp) {
- return xpp.getName().equals("breakpointAdded") ;
- }
-
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mba...@us...> - 2007-01-31 22:31:16
|
Revision: 1903
http://svn.sourceforge.net/rubyeclipse/?rev=1903&view=rev
Author: mbarchfe
Date: 2007-01-31 14:31:15 -0800 (Wed, 31 Jan 2007)
Log Message:
-----------
Added better abstraction for debugger access since we need two socket connections for rubydebug
Modified Paths:
--------------
trunk/org.rubypeople.rdt.debug.core.tests/src/org/rubypeople/rdt/debug/core/tests/FTC_AbstractDebuggerCommunicationTest.java
trunk/org.rubypeople.rdt.debug.core.tests/src/org/rubypeople/rdt/debug/core/tests/FTC_ClassicDebuggerCommunicationTest.java
trunk/org.rubypeople.rdt.debug.core.tests/src/org/rubypeople/rdt/debug/core/tests/FTC_DebuggerProxyTest.java
trunk/org.rubypeople.rdt.debug.core.tests/src/org/rubypeople/rdt/debug/core/tests/FTC_RubyDebugCommunicationTest.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RDebugVMDebugger.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMDebugger.java
Added Paths:
-----------
trunk/org.rubypeople.rdt.debug.core.tests/src/org/rubypeople/rdt/debug/core/tests/FTC_Single.java
Modified: trunk/org.rubypeople.rdt.debug.core.tests/src/org/rubypeople/rdt/debug/core/tests/FTC_AbstractDebuggerCommunicationTest.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.core.tests/src/org/rubypeople/rdt/debug/core/tests/FTC_AbstractDebuggerCommunicationTest.java 2007-01-31 22:28:56 UTC (rev 1902)
+++ trunk/org.rubypeople.rdt.debug.core.tests/src/org/rubypeople/rdt/debug/core/tests/FTC_AbstractDebuggerCommunicationTest.java 2007-01-31 22:31:15 UTC (rev 1903)
@@ -1,34 +1,33 @@
package org.rubypeople.rdt.debug.core.tests;
-import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
-import java.io.InputStreamReader;
import java.io.PrintWriter;
-import java.net.ConnectException;
-import java.net.Socket;
import junit.framework.TestCase;
import org.rubypeople.rdt.internal.debug.core.ExceptionSuspensionPoint;
import org.rubypeople.rdt.internal.debug.core.StepSuspensionPoint;
import org.rubypeople.rdt.internal.debug.core.SuspensionPoint;
+import org.rubypeople.rdt.internal.debug.core.commands.AbstractCommand;
+import org.rubypeople.rdt.internal.debug.core.commands.AbstractDebuggerConnection;
+import org.rubypeople.rdt.internal.debug.core.commands.BreakpointCommand;
+import org.rubypeople.rdt.internal.debug.core.commands.GenericCommand;
+import org.rubypeople.rdt.internal.debug.core.commands.StepCommand;
import org.rubypeople.rdt.internal.debug.core.model.RubyProcessingException;
import org.rubypeople.rdt.internal.debug.core.model.RubyStackFrame;
import org.rubypeople.rdt.internal.debug.core.model.RubyThread;
import org.rubypeople.rdt.internal.debug.core.model.RubyVariable;
import org.rubypeople.rdt.internal.debug.core.model.ThreadInfo;
-import org.rubypeople.rdt.internal.debug.core.parsing.BreakpointAddedReader;
+import org.rubypeople.rdt.internal.debug.core.parsing.AbstractReadStrategy;
+import org.rubypeople.rdt.internal.debug.core.parsing.BreakpointModificationReader;
import org.rubypeople.rdt.internal.debug.core.parsing.EvalReader;
import org.rubypeople.rdt.internal.debug.core.parsing.FramesReader;
import org.rubypeople.rdt.internal.debug.core.parsing.LoadResultReader;
-import org.rubypeople.rdt.internal.debug.core.parsing.MultiReaderStrategy;
import org.rubypeople.rdt.internal.debug.core.parsing.SuspensionReader;
import org.rubypeople.rdt.internal.debug.core.parsing.ThreadInfoReader;
import org.rubypeople.rdt.internal.debug.core.parsing.VariableReader;
-import org.xmlpull.v1.XmlPullParser;
-import org.xmlpull.v1.XmlPullParserFactory;
public abstract class FTC_AbstractDebuggerCommunicationTest extends TestCase {
@@ -61,16 +60,13 @@
protected OutputRedirectorThread rubyStderrRedirectorThread;
- private Socket socket;
+ private AbstractDebuggerConnection debuggerConnection;
- private PrintWriter out;
-
- private MultiReaderStrategy multiReaderStrategy;
-
// for timeout handling
private Thread mainThread;
private Thread timeoutThread;
+ private AbstractReadStrategy readStrategy;
public FTC_AbstractDebuggerCommunicationTest(String arg0) {
super(arg0);
@@ -88,57 +84,45 @@
return getTestFilename().replace('\\', '/');
}
- protected XmlPullParser getXpp(Socket socket) throws Exception {
-
- XmlPullParserFactory factory = XmlPullParserFactory.newInstance(
- "org.kxml2.io.KXmlParser,org.kxml2.io.KXmlSerializer", null);
- XmlPullParser xpp = factory.newPullParser();
- xpp.setInput(new BufferedReader(new InputStreamReader(socket
- .getInputStream())));
- return xpp;
- }
-
protected SuspensionReader getSuspensionReader() throws Exception {
- return new SuspensionReader(multiReaderStrategy);
+ return new SuspensionReader(readStrategy);
}
protected VariableReader getVariableReader() throws Exception {
- return new VariableReader(multiReaderStrategy);
+ return new VariableReader(readStrategy);
}
protected EvalReader getEvalExceptionReader() throws Exception {
- return new EvalReader(multiReaderStrategy);
+ return new EvalReader(readStrategy);
}
protected FramesReader getFramesReader() throws Exception {
- return new FramesReader(multiReaderStrategy);
+ return new FramesReader(readStrategy);
}
protected ThreadInfoReader getThreadInfoReader() throws Exception {
- return new ThreadInfoReader(multiReaderStrategy);
+ return new ThreadInfoReader(readStrategy);
}
protected LoadResultReader getLoadResultReader() throws Exception {
- return new LoadResultReader(multiReaderStrategy);
+ return new LoadResultReader(readStrategy);
}
-
+
protected EvalReader getEvalReader() throws Exception {
- return new EvalReader(multiReaderStrategy);
+ return new EvalReader(readStrategy);
}
-
- protected BreakpointAddedReader getBreakpointAddedReader() throws Exception {
- return new BreakpointAddedReader(multiReaderStrategy);
- }
+ protected BreakpointModificationReader getBreakpointAddedReader() throws Exception {
+ return new BreakpointModificationReader(readStrategy);
+ }
+
protected String getOSIndependent(String path) {
return path.replace('\\', '/');
}
public void setUp() throws Exception {
- if (!new File(getTmpDir()).exists()
- || !new File(getTmpDir()).isDirectory()) {
- throw new RuntimeException("Temp directory does not exist: "
- + getTmpDir());
+ if (!new File(getTmpDir()).exists() || !new File(getTmpDir()).isDirectory()) {
+ throw new RuntimeException("Temp directory does not exist: " + getTmpDir());
}
// if a reader hangs, because the expected data from the ruby process
// does not arrive, it gets interrupted from the timeout watchdog.
@@ -158,13 +142,13 @@
}
};
timeoutThread.start();
- log("Setup finished.") ;
+ log("Setup finished.");
}
public void tearDown() {
- log("TearDown") ;
+ log("TearDown");
timeoutThread.interrupt();
- if (process == null || socket == null) {
+ if (process == null) {
// here we go if there was an error in the creation of the process
// (process == null)
// or there was an error creating the socket, e.g. ruby process has
@@ -177,15 +161,14 @@
e.printStackTrace();
}
try {
- socket.close();
+ debuggerConnection.exit();
} catch (IOException e) {
- log("Exception while closing socket.") ;
+ log("Exception while closing socket.");
e.printStackTrace();
}
try {
if (process.exitValue() != 0) {
- log("Ruby finished with exit value: "
- + process.exitValue());
+ log("Ruby finished with exit value: " + process.exitValue());
}
} catch (IllegalThreadStateException ex) {
process.destroy();
@@ -197,12 +180,12 @@
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
- log("Exception while sleeping after destroying the ruby process") ;
+ log("Exception while sleeping after destroying the ruby process");
// TODO: find out what causes interruption!
try {
Thread.sleep(5000);
} catch (InterruptedException e1) {
- log("Exception again while sleeping after destroying the ruby process") ;
+ log("Exception again while sleeping after destroying the ruby process");
}
}
}
@@ -211,7 +194,7 @@
try {
rubyStdoutRedirectorThread.join();
} catch (InterruptedException e) {
- log("Exception while waiting for stdout redirector") ;
+ log("Exception while waiting for stdout redirector");
e.printStackTrace();
}
log("..done");
@@ -219,212 +202,218 @@
try {
rubyStderrRedirectorThread.join();
} catch (InterruptedException e) {
- log("Exception while waiting for stderr redirector") ;
+ log("Exception while waiting for stderr redirector");
e.printStackTrace();
}
log("..done");
}
protected void writeFile(String name, String[] content) throws Exception {
- PrintWriter writer = new PrintWriter(new FileOutputStream(getTmpDir()
- + name));
+ PrintWriter writer = new PrintWriter(new FileOutputStream(getTmpDir() + name));
for (int i = 0; i < content.length; i++) {
writer.println(content[i]);
}
writer.close();
}
+ protected abstract AbstractDebuggerConnection createDebuggerConnection();
+
+ protected abstract void startRubyProcess() throws Exception;
+
protected void createSocket(String[] lines) throws Exception {
writeFile("test.rb", lines);
startRubyProcess();
Thread.sleep(1000);
- try {
- socket = new Socket("localhost", 1098);
- } catch (ConnectException cex) {
- throw new RuntimeException(
- "Ruby process finished prematurely. Last line in stderr: "
- + rubyStderrRedirectorThread.getLastLine(), cex);
- }
- multiReaderStrategy = new MultiReaderStrategy(getXpp(socket));
+ debuggerConnection = createDebuggerConnection();
+ debuggerConnection.connect();
+ // new AbstractDebuggerConnection
+ // try {
+ // socket = new Socket("localhost", 1098);
+ // } catch (ConnectException cex) {
+ // throw new RuntimeException(
+ // "Ruby process finished prematurely. Last line in stderr: "
+ // + rubyStderrRedirectorThread.getLastLine(), cex);
+ // }
+ // multiReaderStrategy = new MultiReaderStrategy(getXpp(socket));
-// Runnable runnable = new Runnable() {
-// public void run() {
-// try {
-// while (true) {
-// new WasteReader(multiReaderStrategy).read();
-// }
-// } catch (Exception e) {
-// e.printStackTrace();
-// }
-// };
-// };
-// new Thread(runnable).start();
- Thread.sleep(500);
- out = new PrintWriter(socket.getOutputStream(), true);
- readSuspensionInFirstLine() ;
+ // Runnable runnable = new Runnable() {
+ // public void run() {
+ // try {
+ // while (true) {
+ // new WasteReader(multiReaderStrategy).read();
+ // }
+ // } catch (Exception e) {
+ // e.printStackTrace();
+ // }
+ // };
+ // };
+ // new Thread(runnable).start();
+ // Thread.sleep(500);
+ // out = new PrintWriter(socket.getOutputStream(), true);
+ // createControlSocket() ;
}
- protected abstract void startRubyProcess() throws Exception;
- protected void readSuspensionInFirstLine() throws Exception {
-
+ protected SuspensionReader startDebugger() throws Exception {
+ return debuggerConnection.start();
}
-
- protected void sendRuby(String debuggerCommand) {
+
+ protected void sendCommand(AbstractCommand command) throws Exception {
+ command.execute(debuggerConnection);
+ }
+
+ /*
+ * @deprecated
+ */
+ protected void sendRuby(String debuggerCommand) throws Exception {
try {
process.exitValue();
- throw new RuntimeException(
- "Ruby debugger has finished prematurely.");
+ throw new RuntimeException("Ruby debugger has finished prematurely.");
} catch (IllegalThreadStateException ex) {
// not yet finished, normal behaviour
// why does process does not have a function like isRunning() ?
- log("Sending: " + debuggerCommand);
- out.println(debuggerCommand);
+ // TODO: remove generic command
+ GenericCommand command = new GenericCommand(debuggerCommand, false /* iscontrol */);
+ command.execute(debuggerConnection);
+ readStrategy = command.getReadStrategy();
}
}
- public void testNameError() throws Exception {
- createSocket(new String[] { "puts 'x'" });
- sendRuby("cont");
- SuspensionPoint hit = getSuspensionReader().readSuspension();
- // TODO: assertion is wrong, I want the debugger to suspend here
- // but there must be several catchpoints available
- assertNull(hit);
+ // public void testNameError() throws Exception {
+ // createSocket(new String[] { "puts 'x'" });
+ // sendRuby("cont");
+ // SuspensionPoint hit = getSuspensionReader().readSuspension();
+ // // TODO: assertion is wrong, I want the debugger to suspend here
+ // // but there must be several catchpoints available
+ // assertNull(hit);
+ // }
+
+ protected void runToLine(int lineNumber) throws Exception {
+ runTo("test.rb", lineNumber);
}
- public void testBreakpointOnFirstLine() throws Exception {
- // Breakpoint in line 1 does not work yet.
- createSocket(new String[] { "puts 'a'" });
- sendRuby("b test.rb:1");
- sendRuby("cont");
- log("Waiting for breakpoint..");
- SuspensionPoint hit = getSuspensionReader().readSuspension();
+ private void runTo(String filename, int lineNumber) throws Exception {
+ String command = "b " + filename + ":" + lineNumber;
+ new BreakpointCommand(command).executeWithResult(debuggerConnection);
+ SuspensionReader reader;
+ if (!debuggerConnection.isCommandPortConnected()) {
+ reader = debuggerConnection.start();
+ } else {
+ StepCommand stepCommand = new StepCommand("cont");
+ stepCommand.execute(debuggerConnection);
+ reader = stepCommand.getSuspensionReader();
+ }
+ SuspensionPoint hit = reader.readSuspension();
assertNotNull(hit);
assertTrue(hit.isBreakpoint());
- assertEquals(1, hit.getLine());
+ assertEquals(lineNumber, hit.getLine());
}
+ public void testBreakpointOnFirstLine() throws Exception {
+ createSocket(new String[] { "puts 'a'" });
+ runTo("test.rb", 1);
+ }
+
public void testBreakpointAddAndRemove() throws Exception {
createSocket(new String[] { "1.upto(3) {", "puts 'a'", "puts 'b'", "puts 'c'", "}" });
+ int breakpointId1 = new BreakpointCommand("b test.rb:2").executeWithResult(debuggerConnection);
+ assertEquals(1, breakpointId1);
+ int breakpointId2 = new BreakpointCommand("b test.rb:4").executeWithResult(debuggerConnection);
+ assertEquals(2, breakpointId2);
+
+ SuspensionPoint hit1 = startDebugger().readSuspension();
+ assertBreakpoint(hit1, "test.rb", 2);
+ SuspensionPoint hit2 = new StepCommand("cont").readSuspension(debuggerConnection);
+ assertBreakpoint(hit2, "test.rb", 4);
+ SuspensionPoint hit3 = new StepCommand("cont").readSuspension(debuggerConnection);
+ assertBreakpoint(hit3, "test.rb", 2);
+ int idDeleted = new BreakpointCommand("delete 100").executeWithResult(debuggerConnection);
+ assertEquals(-1, idDeleted);
+ idDeleted = new BreakpointCommand("delete 2").executeWithResult(debuggerConnection);
+ assertEquals(2, idDeleted);
+ SuspensionPoint hit4 = new StepCommand("cont").readSuspension(debuggerConnection);
+ assertBreakpoint(hit4, "test.rb", 2);
+ SuspensionPoint hit5 = new StepCommand("cont").readSuspension(debuggerConnection);
+ assertNull("null expected, but was: " + hit5, hit5);
+ }
+
+ public void testSimpleCycleSteppingWorks() throws Exception {
+ createSocket(new String[] { "1.upto(2) {", "puts 'a'", "}", "puts 'b'" });
+ int breakpointId1 = new BreakpointCommand("b test.rb:2").executeWithResult(debuggerConnection);
+ assertEquals(1, breakpointId1);
+ int breakpointId2 = new BreakpointCommand("b test.rb:4").executeWithResult(debuggerConnection);
+ assertEquals(2, breakpointId2);
+ SuspensionReader reader = startDebugger();
+ assertBreakpoint(reader.readSuspension(), "test.rb", 2);
+ sendRuby("cont"); // 2 -> 2
+ assertBreakpoint(getSuspensionReader().readSuspension(), "test.rb", 2);
+ sendRuby("cont"); // 2 -> 2
+ assertBreakpoint(getSuspensionReader().readSuspension(), "test.rb", 4);
+ sendRuby("cont"); // 4 -> finish
+ SuspensionPoint hit = getSuspensionReader().readSuspension();
+ assertNull("null expected, but was: " + hit, hit);
+ }
+
+ public void testStoppingOnOneLineTwice() throws Exception {
+ createSocket(new String[] { "1.upto(2) {", "if true", "puts 'a'", "end", "}", "puts 'b'" });
sendRuby("b test.rb:2");
- assertEquals(1, getBreakpointAddedReader().readBreakpointNo()) ;
- sendRuby("b test.rb:4");
- assertEquals(2, getBreakpointAddedReader().readBreakpointNo()) ;
- sendRuby("cont"); // -> 2
- assertBreakpoint(getSuspensionReader().readSuspension(), "test.rb", 2);
- sendRuby("cont"); // 2 -> 4
- assertBreakpoint(getSuspensionReader().readSuspension(), "test.rb", 4);
- sendRuby("cont"); // 4 -> 2
- assertBreakpoint(getSuspensionReader().readSuspension(), "test.rb", 2);
- sendRuby("delete -1"); // should be ignored
- sendRuby("delete 100"); // should be ignored
- sendRuby("delete 2");
- sendRuby("cont"); // 2 -> 2
- assertBreakpoint(getSuspensionReader().readSuspension(), "test.rb", 2);
- sendRuby("cont"); // 2 -> finish
+ assertEquals(1, getBreakpointAddedReader().readBreakpointNo());
+ sendRuby("b test.rb:6");
+ assertEquals(2, getBreakpointAddedReader().readBreakpointNo());
+ sendRuby("cont"); // -> 2
+ assertBreakpoint(getSuspensionReader().readSuspension(), "test.rb", 2);
+ sendRuby("cont"); // 2 -> 2
+ assertBreakpoint(getSuspensionReader().readSuspension(), "test.rb", 2);
+ sendRuby("cont"); // 2 -> 2
+ assertBreakpoint(getSuspensionReader().readSuspension(), "test.rb", 2);
+ sendRuby("cont"); // 2 -> 2
+ assertBreakpoint(getSuspensionReader().readSuspension(), "test.rb", 2);
+ sendRuby("cont"); // 2 -> 2
+ assertBreakpoint(getSuspensionReader().readSuspension(), "test.rb", 6);
+ sendRuby("cont"); // 6 -> finish
SuspensionPoint hit = getSuspensionReader().readSuspension();
- assertNull("null expected, but was: " + hit, hit);
- }
-
- public void testSimpleCycleSteppingWorks() throws Exception {
- createSocket(new String[] { "1.upto(2) {", "puts 'a'", "}", "puts 'b'" });
- sendRuby("b test.rb:2");
- assertEquals(1, getBreakpointAddedReader().readBreakpointNo());
- sendRuby("b test.rb:4");
- assertEquals(2, getBreakpointAddedReader().readBreakpointNo());
- sendRuby("cont"); // -> 2
- assertBreakpoint(getSuspensionReader().readSuspension(), "test.rb", 2);
- sendRuby("cont"); // 2 -> 2
- assertBreakpoint(getSuspensionReader().readSuspension(), "test.rb", 2);
- sendRuby("cont"); // 2 -> 2
- assertBreakpoint(getSuspensionReader().readSuspension(), "test.rb", 4);
- sendRuby("cont"); // 4 -> finish
- SuspensionPoint hit = getSuspensionReader().readSuspension();
- assertNull("null expected, but was: " + hit, hit);
- }
-
- public void testStoppingOnOneLineTwice() throws Exception {
- createSocket(new String[] {
- "1.upto(2) {", "if true", "puts 'a'", "end", "}", "puts 'b'" });
- sendRuby("b test.rb:2");
- assertEquals(1, getBreakpointAddedReader().readBreakpointNo());
- sendRuby("b test.rb:6");
- assertEquals(2, getBreakpointAddedReader().readBreakpointNo());
- sendRuby("cont"); // -> 2
- assertBreakpoint(getSuspensionReader().readSuspension(), "test.rb", 2);
- sendRuby("cont"); // 2 -> 2
- assertBreakpoint(getSuspensionReader().readSuspension(), "test.rb", 2);
- sendRuby("cont"); // 2 -> 2
- assertBreakpoint(getSuspensionReader().readSuspension(), "test.rb", 2);
- sendRuby("cont"); // 2 -> 2
- assertBreakpoint(getSuspensionReader().readSuspension(), "test.rb", 2);
- sendRuby("cont"); // 2 -> 2
- assertBreakpoint(getSuspensionReader().readSuspension(), "test.rb", 6);
- sendRuby("cont"); // 6 -> finish
- SuspensionPoint hit = getSuspensionReader().readSuspension();
- assertNull("null expected, but was: " + hit, hit);
- }
-
- public void assertBreakpoint(SuspensionPoint hit, String file, int line) {
- assertNotNull(hit);
+ assertNull("null expected, but was: " + hit, hit);
+ }
+
+ public void assertBreakpoint(SuspensionPoint hit, String file, int line) {
+ assertNotNull(hit);
assertTrue(hit.isBreakpoint());
- assertEquals(line, hit.getLine());
- assertEquals(file, hit.getFile());
+ assertEquals(line, hit.getLine());
+ assertEquals(file, hit.getFile());
}
-
+
public void testException() throws Exception {
// per default catch is set to StandardError, i.e. every raise of a
// subclass of StandardError
// will suspend
- createSocket(new String[] { "puts 'a'",
- "raise 'message \\dir\\file: <xml/>\n<8>'", "puts 'c'" });
- sendRuby("catch StandardError");
- sendRuby("cont");
- log("Waiting for exception");
- SuspensionPoint hit = getSuspensionReader().readSuspension();
+ createSocket(new String[] { "puts 'a'", "raise 'message \\dir\\file: <xml/>\n<8>'", "puts 'c'" });
+ GenericCommand catchCommand = new GenericCommand("catch StandardError", true /* iscontrol */);
+ catchCommand.execute(debuggerConnection);
+ SuspensionPoint hit = startDebugger().readSuspension();
assertNotNull(hit);
assertEquals(3, hit.getLine());
assertEquals(getOSIndependent(getTmpDir() + "test.rb"), hit.getFile());
assertTrue(hit.isException());
- assertEquals("message \\dir\\file: <xml/> <8>",
- ((ExceptionSuspensionPoint) hit).getExceptionMessage());
- assertEquals("RuntimeError", ((ExceptionSuspensionPoint) hit)
- .getExceptionType());
+ assertEquals("message \\dir\\file: <xml/> <8>", ((ExceptionSuspensionPoint) hit).getExceptionMessage());
+ assertEquals("RuntimeError", ((ExceptionSuspensionPoint) hit).getExceptionType());
+ // TODO: test catch off with a second exception
sendRuby("catch off");
sendRuby("cont");
}
- public void testIgnoreException() throws Exception {
- createSocket(new String[] { "puts 'a'", "raise 'dont stop'" });
- sendRuby("catch off");
- sendRuby("cont");
- System.out
- .println("Waiting for the program to finish without suspending at the raise command");
- SuspensionPoint hit = getSuspensionReader().readSuspension();
- assertNull(hit);
- }
-
public void testExceptionsIgnoredByDefault() throws Exception {
createSocket(new String[] { "puts 'a'", "raise 'dont stop'" });
- sendRuby("cont");
- System.out
- .println("Waiting for the program to finish without suspending at the raise command");
- SuspensionPoint hit = getSuspensionReader().readSuspension();
+ SuspensionPoint hit = startDebugger().readSuspension();
assertNull(hit);
}
public void testExceptionHierarchy() throws Exception {
- createSocket(new String[] { "class MyError < StandardError", "end",
- "begin", "raise StandardError.new", "rescue", "end",
- "raise MyError.new" });
- sendRuby("catch MyError");
- sendRuby("cont");
- System.out
- .println("Waiting for the program to finish without suspending at the raise command");
- SuspensionPoint hit = getSuspensionReader().readSuspension();
+ createSocket(new String[] { "class MyError < StandardError", "end", "begin", "raise StandardError.new", "rescue", "end", "raise MyError.new" });
+ GenericCommand catchCommand = new GenericCommand("catch StandardError", true /* iscontrol */);
+ catchCommand.execute(debuggerConnection);
+ SuspensionPoint hit = startDebugger().readSuspension();
assertNotNull(hit);
assertEquals(7, hit.getLine());
- assertEquals("MyError", ((ExceptionSuspensionPoint) hit)
- .getExceptionType());
+ assertEquals("MyError", ((ExceptionSuspensionPoint) hit).getExceptionType());
sendRuby("cont");
hit = getSuspensionReader().readSuspension();
assertNull(hit);
@@ -432,55 +421,38 @@
public void testBreakpointNeverReached() throws Exception {
createSocket(new String[] { "puts 'a'", "puts 'b'", "puts 'c'" });
- sendRuby("b test.rb:10");
- getBreakpointAddedReader().readBreakpointNo();
- sendRuby("cont");
+ new BreakpointCommand("b test.rb:10").executeWithResult(debuggerConnection);
log("Waiting for breakpoint..");
- SuspensionPoint hit = getSuspensionReader().readSuspension();
+ SuspensionPoint hit = startDebugger().readSuspension();
assertNull(hit);
}
private void log(String string) {
if (VERBOSE)
- System.out.println(string);
+ System.out.println(string);
}
public void testStepOver() throws Exception {
createSocket(new String[] { "puts 'a'", "puts 'b'", "puts 'c'" });
- sendRuby("b test.rb:2");
- getBreakpointAddedReader().readBreakpointNo();
- sendRuby("cont");
- getSuspensionReader().readSuspension();
- sendRuby("next");
- SuspensionPoint info = getSuspensionReader().readSuspension();
+ BreakpointCommand breakpointCommand = new BreakpointCommand("b test.rb:2");
+ sendCommand(breakpointCommand);
+ breakpointCommand.getBreakpointAddedReader().readBreakpointNo();
+
+ startDebugger().readSuspension();
+
+ SuspensionPoint info = new StepCommand("next").readSuspension(debuggerConnection);
assertEquals(3, info.getLine());
assertEquals(getOSIndependent(getTmpDir() + "test.rb"), info.getFile());
assertTrue(info.isStep());
assertEquals(1, ((StepSuspensionPoint) info).getFramesNumber());
- sendRuby("next");
- info = getSuspensionReader().readSuspension();
- assertNull(info);
- }
- public void testStepOverFrames() throws Exception {
- createSocket(new String[] { "require 'test2.rb'", "puts 'a'",
- "Test2.new.print()" });
- writeFile("test2.rb", new String[] { "class Test2", "def print",
- "puts 'XX'", "end", "end" });
- sendRuby("b test.rb:3");
- getBreakpointAddedReader().readBreakpointNo();
- sendRuby("cont");
- getSuspensionReader().readSuspension();
- sendRuby("next");
- SuspensionPoint info = getSuspensionReader().readSuspension();
+ info = new StepCommand("next").readSuspension(debuggerConnection);
assertNull(info);
}
- public void testStepOverFramesValue2() throws Exception {
- createSocket(new String[] { "require 'test2.rb'", "puts 'a'",
- "Test2.new.print()" });
- writeFile("test2.rb", new String[] { "class Test2", "def print",
- "puts 'XX'", "puts 'XX'", "end", "end" });
+ public void testStepOverFrames() throws Exception {
+ createSocket(new String[] { "require 'test2.rb'", "puts 'a'", "Test2.new.print()" });
+ writeFile("test2.rb", new String[] { "class Test2", "def print", "puts 'XX'", "puts 'XX'", "end", "end" });
runTo("test2.rb", 3);
sendRuby("next");
SuspensionPoint info = getSuspensionReader().readSuspension();
@@ -494,10 +466,8 @@
}
public void testStepOverInDifferentFrame() throws Exception {
- createSocket(new String[] { "require 'test2.rb'", "Test2.new.print()",
- "puts 'a'" });
- writeFile("test2.rb", new String[] { "class Test2", "def print",
- "puts 'XX'", "puts 'XX'", "end", "end" });
+ createSocket(new String[] { "require 'test2.rb'", "Test2.new.print()", "puts 'a'" });
+ writeFile("test2.rb", new String[] { "class Test2", "def print", "puts 'XX'", "puts 'XX'", "end", "end" });
runTo("test2.rb", 4);
sendRuby("next");
SuspensionPoint info = getSuspensionReader().readSuspension();
@@ -509,10 +479,8 @@
}
public void testStepReturn() throws Exception {
- createSocket(new String[] { "require 'test2.rb'", "Test2.new.print()",
- "puts 'a'" });
- writeFile("test2.rb", new String[] { "class Test2", "def print",
- "puts 'XX'", "puts 'XX'", "end", "end" });
+ createSocket(new String[] { "require 'test2.rb'", "Test2.new.print()", "puts 'a'" });
+ writeFile("test2.rb", new String[] { "class Test2", "def print", "puts 'XX'", "puts 'XX'", "end", "end" });
runTo("test2.rb", 4);
sendRuby("next");
SuspensionPoint info = getSuspensionReader().readSuspension();
@@ -524,12 +492,9 @@
}
public void testHitBreakpointWhileSteppingOver() throws Exception {
- createSocket(new String[] { "require 'test2.rb'", "Test2.new.print()",
- "puts 'a'" });
- writeFile("test2.rb", new String[] { "class Test2", "def print",
- "puts 'XX'", "puts 'XX'", "end", "end" });
- sendRuby("b test2.rb:4");
- getBreakpointAddedReader().readBreakpointNo();
+ createSocket(new String[] { "require 'test2.rb'", "Test2.new.print()", "puts 'a'" });
+ writeFile("test2.rb", new String[] { "class Test2", "def print", "puts 'XX'", "puts 'XX'", "end", "end" });
+ new BreakpointCommand("b test2.rb:4").executeWithResult(debuggerConnection);
runTo("test.rb", 2);
sendRuby("next");
SuspensionPoint info = getSuspensionReader().readSuspension();
@@ -540,10 +505,8 @@
}
public void testStepInto() throws Exception {
- createSocket(new String[] { "require 'test2.rb'", "puts 'a'",
- "Test2.new.print()" });
- writeFile("test2.rb", new String[] { "class Test2", "def print",
- "puts 'XX'", "puts 'XX'", "end", "end" });
+ createSocket(new String[] { "require 'test2.rb'", "puts 'a'", "Test2.new.print()" });
+ writeFile("test2.rb", new String[] { "class Test2", "def print", "puts 'XX'", "puts 'XX'", "end", "end" });
runTo("test.rb", 3);
sendRuby("step");
SuspensionPoint info = getSuspensionReader().readSuspension();
@@ -554,46 +517,28 @@
sendRuby("cont");
}
- protected void runToLine(int lineNumber) throws Exception {
- runTo("test.rb", lineNumber);
- }
-
- private void runTo(String filename, int lineNumber) throws Exception {
- sendRuby("b " + filename + ":" + lineNumber);
- getBreakpointAddedReader().readBreakpointNo() ;
- sendRuby("cont");
- SuspensionPoint suspension = getSuspensionReader().readSuspension();
- if (suspension == null) {
- throw new RuntimeException(
- "Expected suspension, but program exited.");
- }
- }
-
protected RubyStackFrame createStackFrame() throws Exception {
RubyStackFrame stackFrame = new RubyStackFrame(null, "", 5, 1); // RubyThread
- // thread
- // = new
- // RubyThread(null)
- // ;
+ // thread
+ // = new
+ // RubyThread(null)
+ // ;
// thread.addStackFrame(stackFrame) ;
return stackFrame;
}
-
+
public void testCommandList() throws Exception {
// test that commands separated by comma will be processed
createSocket(new String[] { "a=5", "puts a" });
runToLine(2);
sendRuby("v l ; v i a");
- RubyVariable[] variables = getVariableReader().readVariables(
- createStackFrame());
+ RubyVariable[] variables = getVariableReader().readVariables(createStackFrame());
assertEquals(1, variables.length);
- variables = getVariableReader().readVariables(
- createStackFrame());
+ variables = getVariableReader().readVariables(createStackFrame());
assertEquals(0, variables.length);
// escaped semicolon
sendRuby("v inspect a=1\\;a+1");
- variables = getVariableReader().readVariables(
- createStackFrame());
+ variables = getVariableReader().readVariables(createStackFrame());
assertEquals("Handled escaded semicolon", 1, variables.length);
assertEquals("2", variables[0].getValue().getValueString());
sendRuby("cont");
@@ -603,8 +548,7 @@
createSocket(new String[] { "puts 'a'", "puts 'b'", "stringA='XX'" });
runToLine(2);
sendRuby("v l");
- RubyVariable[] variables = getVariableReader().readVariables(
- createStackFrame());
+ RubyVariable[] variables = getVariableReader().readVariables(createStackFrame());
assertEquals(1, variables.length);
assertEquals("stringA", variables[0].getName());
assertEquals("nil", variables[0].getValue().getValueString());
@@ -614,16 +558,13 @@
}
public void testVariableWithXmlContent() throws Exception {
- createSocket(new String[] { "stringA='<start test=\"&\"/>'",
- "testHashValue=Hash[ '$&' => nil]", "puts 'b'" });
+ createSocket(new String[] { "stringA='<start test=\"&\"/>'", "testHashValue=Hash[ '$&' => nil]", "puts 'b'" });
runToLine(3);
sendRuby("v l");
- RubyVariable[] variables = getVariableReader().readVariables(
- createStackFrame());
+ RubyVariable[] variables = getVariableReader().readVariables(createStackFrame());
assertEquals(2, variables.length);
assertEquals("stringA", variables[0].getName());
- assertEquals("<start test=\"&\"/>", variables[0].getValue()
- .getValueString());
+ assertEquals("<start test=\"&\"/>", variables[0].getValue().getValueString());
assertTrue(variables[0].isLocal());
// the testHashValue contains an example, where the name consists of
// special characters
@@ -635,14 +576,11 @@
}
public void testVariableInObject() throws Exception {
- createSocket(new String[] { "class Test", "def initialize", "@y=5",
- "puts @y", "end", "def to_s", "'test'", "end", "end",
- "Test.new()" });
+ createSocket(new String[] { "class Test", "def initialize", "@y=5", "puts @y", "end", "def to_s", "'test'", "end", "end", "Test.new()" });
runTo("test.rb", 4);
// Read numerical variable
sendRuby("v l");
- RubyVariable[] variables = getVariableReader().readVariables(
- createStackFrame());
+ RubyVariable[] variables = getVariableReader().readVariables(createStackFrame());
assertEquals(1, variables.length);
assertEquals("self", variables[0].getName());
assertEquals("test", variables[0].getValue().getValueString());
@@ -662,13 +600,10 @@
}
public void testStaticVariables() throws Exception {
- createSocket(new String[] { "class Test", "@@staticVar=55",
- "def method", "puts 'a'", "end", "end", "test=Test.new()",
- "test.method()" });
+ createSocket(new String[] { "class Test", "@@staticVar=55", "def method", "puts 'a'", "end", "end", "test=Test.new()", "test.method()" });
runTo("test.rb", 4);
sendRuby("v l");
- RubyVariable[] variables = getVariableReader().readVariables(
- createStackFrame());
+ RubyVariable[] variables = getVariableReader().readVariables(createStackFrame());
assertEquals(1, variables.length);
assertEquals("self", variables[0].getName());
assertTrue(variables[0].getValue().hasVariables());
@@ -686,13 +621,10 @@
}
public void testSingletonStaticVariables() throws Exception {
- createSocket(new String[] { "class Test", "def method", "puts 'a'",
- "end", "class << Test", "@@staticVar=55", "end", "end",
- "Test.new().method()" });
+ createSocket(new String[] { "class Test", "def method", "puts 'a'", "end", "class << Test", "@@staticVar=55", "end", "end", "Test.new().method()" });
runTo("test.rb", 3);
sendRuby("v i self");
- RubyVariable[] variables = getVariableReader().readVariables(
- createStackFrame());
+ RubyVariable[] variables = getVariableReader().readVariables(createStackFrame());
assertEquals(1, variables.length);
assertEquals("@@staticVar", variables[0].getName());
assertEquals("55", variables[0].getValue().getValueString());
@@ -705,12 +637,10 @@
}
public void testConstants() throws Exception {
- createSocket(new String[] { "class Test", "TestConstant=5", "end",
- "test=Test.new()", "puts 'a'" });
+ createSocket(new String[] { "class Test", "TestConstant=5", "end", "test=Test.new()", "puts 'a'" });
runTo("test.rb", 5);
sendRuby("v i test");
- RubyVariable[] variables = getVariableReader().readVariables(
- createStackFrame());
+ RubyVariable[] variables = getVariableReader().readVariables(createStackFrame());
assertEquals(1, variables.length);
assertEquals("TestConstant", variables[0].getName());
assertEquals("5", variables[0].getValue().getValueString());
@@ -724,13 +654,10 @@
}
public void testConstantDefinedInBothClassAndSuperclass() throws Exception {
- createSocket(new String[] { "class A", "TestConstant=5",
- "TestConstant2=2", "end", "class B < A", "TestConstant=6",
- "end", "b=B.new()", "puts 'a'" });
+ createSocket(new String[] { "class A", "TestConstant=5", "TestConstant2=2", "end", "class B < A", "TestConstant=6", "end", "b=B.new()", "puts 'a'" });
runTo("test.rb", 9);
sendRuby("v i b");
- RubyVariable[] variables = getVariableReader().readVariables(
- createStackFrame());
+ RubyVariable[] variables = getVariableReader().readVariables(createStackFrame());
assertEquals(1, variables.length);
assertEquals("TestConstant", variables[0].getName());
assertEquals("6", variables[0].getValue().getValueString());
@@ -748,8 +675,7 @@
runToLine(2);
// Read numerical variable
sendRuby("v l");
- RubyVariable[] variables = getVariableReader().readVariables(
- createStackFrame());
+ RubyVariable[] variables = getVariableReader().readVariables(createStackFrame());
assertEquals(1, variables.length);
assertEquals("stringA", variables[0].getName());
assertEquals("XX", variables[0].getValue().getValueString());
@@ -759,37 +685,29 @@
}
public void testVariableLocal() throws Exception {
- createSocket(new String[] { "class User", "def initialize(id)",
- "@id=id", "end", "end", "class CallClass", "def method(user)",
- "puts user", "end", "end", "CallClass.new.method(User.new(22))" });
+ createSocket(new String[] { "class User", "def initialize(id)", "@id=id", "end", "end", "class CallClass", "def method(user)", "puts user", "end", "end", "CallClass.new.method(User.new(22))" });
runTo("test.rb", 8);
sendRuby("v local");
- RubyVariable[] localVariables = getVariableReader().readVariables(
- createStackFrame());
+ RubyVariable[] localVariables = getVariableReader().readVariables(createStackFrame());
assertEquals(2, localVariables.length);
RubyVariable userVariable = localVariables[1];
// sendRuby("v i 1 " + userVariable.getObjectId());
sendRuby("v i " + userVariable.getObjectId());
- RubyVariable[] userVariables = getVariableReader().readVariables(
- createStackFrame());
+ RubyVariable[] userVariables = getVariableReader().readVariables(createStackFrame());
assertEquals(1, userVariables.length);
assertEquals("@id", userVariables[0].getName());
assertEquals("22", userVariables[0].getValue().getValueString());
- assertEquals("Fixnum", userVariables[0].getValue()
- .getReferenceTypeName());
+ assertEquals("Fixnum", userVariables[0].getValue().getReferenceTypeName());
assertTrue(!userVariables[0].getValue().hasVariables());
sendRuby("cont");
}
public void testVariableInstance() throws Exception {
- createSocket(new String[] { "require 'test2.rb'",
- "customObject=Test2.new", "puts customObject" });
- writeFile("test2.rb", new String[] { "class Test2", "def initialize",
- "@y=5", "end", "def to_s", "'test'", "end", "end" });
+ createSocket(new String[] { "require 'test2.rb'", "customObject=Test2.new", "puts customObject" });
+ writeFile("test2.rb", new String[] { "class Test2", "def initialize", "@y=5", "end", "def to_s", "'test'", "end", "end" });
runTo("test2.rb", 6);
sendRuby("frame 2 ; v i customObject");
- RubyVariable[] variables = getVariableReader().readVariables(
- createStackFrame());
+ RubyVariable[] variables = getVariableReader().readVariables(createStackFrame());
assertEquals(1, variables.length);
assertEquals("@y", variables[0].getName());
assertEquals("5", variables[0].getValue().getValueString());
@@ -799,18 +717,15 @@
}
public void testVariableArray() throws Exception {
- createSocket(new String[] { "array = []", "array << 1", "array << 2",
- "puts 'a'" });
+ createSocket(new String[] { "array = []", "array << 1", "array << 2", "puts 'a'" });
runTo("test.rb", 4);
sendRuby("v local");
- RubyVariable[] variables = getVariableReader().readVariables(
- createStackFrame());
+ RubyVariable[] variables = getVariableReader().readVariables(createStackFrame());
assertEquals(1, variables.length);
assertEquals("array", variables[0].getName());
assertTrue("array has children", variables[0].getValue().hasVariables());
sendRuby("v i array");
- RubyVariable[] elements = getVariableReader().readVariables(
- variables[0]);
+ RubyVariable[] elements = getVariableReader().readVariables(variables[0]);
assertEquals(2, elements.length);
assertEquals("[0]", elements[0].getName());
assertEquals("1", elements[0].getValue().getValueString());
@@ -820,18 +735,15 @@
}
public void testVariableHashWithStringKeys() throws Exception {
- createSocket(new String[] { "hash = Hash['a' => 'z', 'b' => 'y']",
- "puts 'a'" });
+ createSocket(new String[] { "hash = Hash['a' => 'z', 'b' => 'y']", "puts 'a'" });
runTo("test.rb", 2);
sendRuby("v local");
- RubyVariable[] variables = getVariableReader().readVariables(
- createStackFrame());
+ RubyVariable[] variables = getVariableReader().readVariables(createStackFrame());
assertEquals(1, variables.length);
assertEquals("hash", variables[0].getName());
assertTrue("hash has children", variables[0].getValue().hasVariables());
sendRuby("v i hash");
- RubyVariable[] elements = getVariableReader().readVariables(
- variables[0]);
+ RubyVariable[] elements = getVariableReader().readVariables(variables[0]);
assertEquals(2, elements.length);
assertEquals("'a'", elements[0].getName());
assertEquals("z", elements[0].getValue().getValueString());
@@ -841,25 +753,19 @@
}
public void testVariableHashWithObjectKeys() throws Exception {
- createSocket(new String[] { "class KeyAndValue", "def initialize(v)",
- "@a=v", "end", "def to_s", "return @a.to_s", "end", "end",
- "hash = Hash[KeyAndValue.new(55) => KeyAndValue.new(66)]",
- "puts 'a'" });
+ createSocket(new String[] { "class KeyAndValue", "def initialize(v)", "@a=v", "end", "def to_s", "return @a.to_s", "end", "end", "hash = Hash[KeyAndValue.new(55) => KeyAndValue.new(66)]", "puts 'a'" });
runTo("test.rb", 10);
sendRuby("v local");
- RubyVariable[] variables = getVariableReader().readVariables(
- createStackFrame());
+ RubyVariable[] variables = getVariableReader().readVariables(createStackFrame());
assertEquals(1, variables.length);
assertEquals("hash", variables[0].getName());
assertTrue("hash has children", variables[0].getValue().hasVariables());
sendRuby("frame 1 ; v i " + variables[0].getObjectId());
- RubyVariable[] elements = getVariableReader().readVariables(
- variables[0]);
+ RubyVariable[] elements = getVariableReader().readVariables(variables[0]);
assertEquals(1, elements.length);
assertEquals("55", elements[0].getName());
// assertEquals("z", elements[0].getValue().getValueString());
- assertEquals("KeyAndValue", elements[0].getValue()
- .getReferenceTypeName());
+ assertEquals("KeyAndValue", elements[0].getValue().getReferenceTypeName());
// get the value
sendRuby("frame 1 ; v i " + elements[0].getObjectId());
RubyVariable[] values = getVariableReader().readVariables(variables[0]);
@@ -874,23 +780,18 @@
createSocket(new String[] { "emptyArray = []", "puts 'a'" });
runTo("test.rb", 2);
sendRuby("v local");
- RubyVariable[] variables = getVariableReader().readVariables(
- createStackFrame());
+ RubyVariable[] variables = getVariableReader().readVariables(createStackFrame());
assertEquals(1, variables.length);
assertEquals("emptyArray", variables[0].getName());
- assertTrue("array does not have children", !variables[0].getValue()
- .hasVariables());
+ assertTrue("array does not have children", !variables[0].getValue().hasVariables());
sendRuby("cont");
}
public void testVariableInstanceNested() throws Exception {
- createSocket(new String[] { "class Test", "def initialize(test)",
- "@privateTest = test", "end", "end",
- "test2 = Test.new(Test.new(nil))", "puts test2" });
+ createSocket(new String[] { "class Test", "def initialize(test)", "@privateTest = test", "end", "end", "test2 = Test.new(Test.new(nil))", "puts test2" });
runToLine(7);
sendRuby("v l");
- RubyVariable[] variables = getVariableReader().readVariables(
- createStackFrame());
+ RubyVariable[] variables = getVariableReader().readVariables(createStackFrame());
assertEquals(1, variables.length);
RubyVariable test2Variable = variables[0];
assertEquals("test2", test2Variable.getName());
@@ -900,91 +801,81 @@
assertEquals(1, variables.length);
RubyVariable privateTestVariable = variables[0];
assertEquals("@privateTest", privateTestVariable.getName());
- assertEquals("test2.@privateTest", privateTestVariable
- .getQualifiedName());
+ assertEquals("test2.@privateTest", privateTestVariable.getQualifiedName());
assertTrue(privateTestVariable.getValue().hasVariables());
sendRuby("v i " + privateTestVariable.getQualifiedName());
variables = getVariableReader().readVariables(privateTestVariable);
assertEquals(1, variables.length);
RubyVariable privateTestprivateTestVariable = variables[0];
assertEquals("@privateTest", privateTestprivateTestVariable.getName());
- assertEquals("test2.@privateTest.@privateTest",
- privateTestprivateTestVariable.getQualifiedName());
- assertEquals("nil", privateTestprivateTestVariable.getValue()
- .getValueString());
+ assertEquals("test2.@privateTest.@privateTest", privateTestprivateTestVariable.getQualifiedName());
+ assertEquals("nil", privateTestprivateTestVariable.getValue().getValueString());
assertTrue(!privateTestprivateTestVariable.getValue().hasVariables());
sendRuby("cont");
}
public void testInspect() throws Exception {
- createSocket(new String[] { "class Test", "def calc(a)", "a = a*2",
- "return a", "end", "end", "test=Test.new()", "a=3",
- "test.calc(a)" });
+ createSocket(new String[] { "class Test", "def calc(a)", "a = a*2", "return a", "end", "end", "test=Test.new()", "a=3", "test.calc(a)" });
runToLine(4);
// test variable value in stack 1 (top stack frame)
sendRuby("frame 1 ; v inspect a*2");
- RubyVariable[] variables = getVariableReader().readVariables(
- createStackFrame());
+ RubyVariable[] variables = getVariableReader().readVariables(createStackFrame());
assertEquals("There is one variable returned.", 1, variables.length);
- assertEquals("Result in frame 1 is 12", "12", variables[0].getValue()
- .getValueString());
+ assertEquals("Result in frame 1 is 12", "12", variables[0].getValue().getValueString());
// test variable value in stack 2 (caller stack)
sendRuby("frame 2 ; v inspect a*2");
variables = getVariableReader().readVariables(createStackFrame());
assertEquals("There is one variable returned.", 1, variables.length);
- assertEquals("Result in frame 2 is 6", "6", variables[0].getValue()
- .getValueString());
+ assertEquals("Result in frame 2 is 6", "6", variables[0].getValue().getValueString());
// test more complex expression
sendRuby("frame 1 ; v inspect Test.new().calc(5)");
variables = getVariableReader().readVariables(createStackFrame());
assertEquals("There is one variable returned.", 1, variables.length);
- assertEquals("Result is 10", "10", variables[0].getValue()
- .getValueString());
+ assertEquals("Result is 10", "10", variables[0].getValue().getValueString());
sendRuby("cont");
}
-
+
public void testInspectTemporaryArray() throws Exception {
createSocket(new String[] { "a=0", "puts a=2" });
runToLine(2);
sendRuby("v inspect %w[a b c]");
// this inspection will create a new temporary arrray object
- RubyVariable[] variables = getVariableReader().readVariables(
- createStackFrame());
+ RubyVariable[] variables = getVariableReader().readVariables(createStackFrame());
assertEquals("There is one variable returned which contains the array.", 1, variables.length);
// the following two commands starts the garbage collector. This test
- // is somehow implementation aware. It makes sure that the objects which are
- // created as a result of an expression are referenced so that they will not be
+ // is somehow implementation aware. It makes sure that the objects which
+ // are
+ // created as a result of an expression are referenced so that they will
+ // not be
// swept away from the GC
- // TODO: actually garbage_collect does nothing, also the GC can not be enabled with GC.enable()
+ // TODO: actually garbage_collect does nothing, also the GC can not be
+ // enabled with GC.enable()
sendRuby("v inspect ObjectSpace.garbage_collect\\;sleep(2)");
- RubyVariable[] gcResult = getVariableReader().readVariables(
- createStackFrame());
+ RubyVariable[] gcResult = getVariableReader().readVariables(createStackFrame());
assertEquals("There is one variable returned as result of running the GC", 1, gcResult.length);
sendRuby("v i " + variables[0].getObjectId());
- RubyVariable[] elements = getVariableReader().readVariables(
- variables[0]);
+ RubyVariable[] elements = getVariableReader().readVariables(variables[0]);
assertEquals("The array contains 3 elements", 3, elements.length);
sendRuby("cont");
}
-
+
public void testInspectNil() throws Exception {
createSocket(new String[] { "puts 'dummy'", "puts 'dummy'" });
runToLine(2);
sendRuby("v inspect nil");
- RubyVariable[] variables = getVariableReader().readVariables(
- createStackFrame());
+ RubyVariable[] variables = getVariableReader().readVariables(createStackFrame());
assertEquals("There is one variable returned which is nil.", 1, variables.length);
- assertEquals("nil", variables[0].getValue().getValueString()) ;
+ assertEquals("nil", variables[0].getValue().getValueString());
sendRuby("cont");
- }
-
+ }
+
public void testSendCommandWithSpecialCharacters() throws Exception {
- // the inspect command can contain arbitrary characters
- // a %w for example can raise an error when it is directly given to printf
+ // the inspect command can contain arbitrary characters
+ // a %w for example can raise an error when it is directly given to
+ // printf
sendRuby("v inspect %w[a b]");
- RubyVariable[] variables = getVariableReader().readVariables(
- createStackFrame());
- assertEquals(1, variables.length) ;
+ RubyVariable[] variables = getVariableReader().readVariables(createStackFrame());
+ assertEquals(1, variables.length);
sendRuby("cont");
// just do not fail
}
@@ -1002,13 +893,13 @@
}
fail("RubyProcessingException not thrown.");
}
-
+
public void testEvalError() throws Exception {
createSocket(new String[] { "puts 'test'", "puts 'test'" });
- runToLine(2);
- sendRuby("eval unknown_") ;
+ runToLine(2);
+ sendRuby("eval unknown_");
try {
- getEvalReader().readEvalResult() ;
+ getEvalReader().readEvalResult();
} catch (RubyProcessingException e) {
assertNotNull(e.getMessage());
sendRuby("cont");
@@ -1016,15 +907,12 @@
}
fail("RubyProcessingException not thrown.");
}
-
+
public void testStaticVariableInstanceNested() throws Exception {
- createSocket(new String[] { "class TestStatic", "def initialize(no)",
- "@no = no", "end", "@@staticVar=TestStatic.new(2)", "end",
- "test = TestStatic.new(1)", "puts test" });
+ createSocket(new String[] { "class TestStatic", "def initialize(no)", "@no = no", "end", "@@staticVar=TestStatic.new(2)", "end", "test = TestStatic.new(1)", "puts test" });
runToLine(8);
sendRuby("v i test.@@staticVar");
- RubyVariable[] variables = getVariableReader().readVariables(
- createStackFrame());
+ RubyVariable[] variables = getVariableReader().readVariables(createStackFrame());
assertEquals(2, variables.length);
assertEquals("@no", variables[0].getName());
assertEquals("2", variables[0].getValue().getValueString());
@@ -1033,14 +921,11 @@
}
public void testVariablesInFrames() throws Exception {
- createSocket(new String[] { "require 'test2.rb'", "y=5",
- "Test2.new().test()" });
- writeFile("test2.rb", new String[] { "class Test2", "def test", "y=6",
- "puts y", "end", "end" });
+ createSocket(new String[] { "require 'test2.rb'", "y=5", "Test2.new().test()" });
+ writeFile("test2.rb", new String[] { "class Test2", "def test", "y=6", "puts y", "end", "end" });
runTo("test2.rb", 4);
sendRuby("v l");
- RubyVariable[] variables = getVariableReader().readVariables(
- createStackFrame());
+ RubyVariable[] variables = getVariableReader().readVariables(createStackFrame());
// there are 2 variables self and y
assertEquals(2, variables.length);
// the variables are sorted: self = variables[0], y = variables[1]
@@ -1056,7 +941,8 @@
assertEquals(1, variables.length);
assertEquals("y", variables[0].getName());
assertEquals("5", variables[0].getValue().getValueString());
- // 20 is out of range, then the top level (the one with the highest number)
+ // 20 is out of range, then the top level (the one with the highest
+ // number)
// will be used, in this case 2
sendRuby("frame 20 ; v l");
variables = getVariableReader().readVariables(createStackFrame());
@@ -1066,10 +952,8 @@
}
public void testFrames() throws Exception {
- createSocket(new String[] { "require 'test2.rb'", "test = Test2.new()",
- "test.print()", "test.print()" });
- writeFile("test2.rb", new String[] { "class Test2", "def print",
- "puts 'Test2.print'", "end", "end" });
+ createSocket(new String[] { "require 'test2.rb'", "test = Test2.new()", "test.print()", "test.print()" });
+ writeFile("test2.rb", new String[] { "class Test2", "def print", "puts 'Test2.print'", "end", "end" });
runTo("test2.rb", 3);
sendRuby("b test.rb:4");
getBreakpointAddedReader().readBreakpointNo();
@@ -1078,13 +962,11 @@
getFramesReader().readFrames(thread);
assertEquals(2, thread.getStackFrames().length);
RubyStackFrame frame1 = (RubyStackFrame) thread.getStackFrames()[0];
- assertEquals(getOSIndependent(getTmpDir() + "test2.rb"), frame1
- .getFileName());
+ assertEquals(getOSIndependent(getTmpDir() + "test2.rb"), frame1.getFileName());
assertEquals(1, frame1.getIndex());
assertEquals(3, frame1.getLineNumber());
RubyStackFrame frame2 = (RubyStackFrame) thread.getStackFrames()[1];
- assertEquals(getOSIndependent(getTmpDir() + "test.rb"), frame2
- .getFileName());
+ assertEquals(getOSIndependent(getTmpDir() + "test.rb"), frame2.getFileName());
assertEquals(2, frame2.getIndex());
assertEquals(3, frame2.getLineNumber());
sendRuby("cont");
@@ -1096,9 +978,7 @@
}
public void testFramesWhenThreadSpawned() throws Exception {
- createSocket(new String[] { "def startThread",
- "Thread.new() { a = 5 }", "end", "def calc", "5 + 5", "end",
- "startThread()", "calc()" });
+ createSocket(new String[] { "def startThread", "Thread.new() { a = 5 }", "end", "def calc", "5 + 5", "end", "startThread()", "calc()" });
runTo("test.rb", 5);
RubyThread thread = new RubyThread(null, 0);
sendRuby("w");
@@ -1107,8 +987,7 @@
}
public void testThreadFramesAndVariables() throws Exception {
- createSocket(new String[] { "Thread.new {", "a=5", "x=6", "puts 'x'",
- "}", "b=10", "b=11" });
+ createSocket(new String[] { "Thread.new {", "a=5", "x=6", "puts 'x'", "}", "b=10", "b=11" });
sendRuby("b test.rb:3");
getBreakpointAddedReader().readBreakpointNo();
sendRuby("b test.rb:7");
@@ -1120,16 +999,13 @@
sendRuby("th l");
ThreadInfo[] threads = getThreadInfoReader().readThreads();
assertEquals(2, threads.length);
-
-
- sendRuby("th "+threads[0].getId()+" ; w ");
- RubyStackFrame[] stackFrames = getFramesReader().readFrames(
- new RubyThread(null, 1));
+
+ sendRuby("th " + threads[0].getId() + " ; w ");
+ RubyStackFrame[] stackFrames = getFramesReader().readFrames(new RubyThread(null, 1));
assertEquals(1, stackFrames.length);
assertEquals(7, stackFrames[0].getLineNumber());
- sendRuby("th "+threads[0].getId()+" ; v l");
- RubyVariable[] variables = getVariableReader().readVariables(
- stackFrames[0]);
+ sendRuby("th " + threads[0].getId() + " ; v l");
+ RubyVariable[] variables = getVariableReader().readVariables(stackFrames[0]);
assertEquals(1, variables.length);
assertEquals("b", variables[0].getName());
sendRuby("th " + threads[1].getId() + " ; w");
Modified: trunk/org.rubypeople.rdt.debug.core.tests/src/org/rubypeople/rdt/debug/core/tests/FTC_ClassicDebuggerCommunicationTest.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.core.tests/src/org/rubypeople/rdt/debug/core/tests/FTC_ClassicDebuggerCommunicationTest.java 2007-01-31 22:28:56 UTC (rev 1902)
+++ trunk/org.rubypeople.rdt.debug.core.tests/src/org/rubypeople/rdt/debug/core/tests/FTC_ClassicDebuggerCommunicationTest.java 2007-01-31 22:31:15 UTC (rev 1903)
@@ -4,6 +4,8 @@
import org.rubypeople.rdt.core.RubyCore;
import org.rubypeople.rdt.internal.debug.core.SuspensionPoint;
+import org.rubypeople.rdt.internal.debug.core.commands.AbstractDebuggerConnection;
+import org.rubypeople.rdt.internal.debug.core.commands.ClassicDebuggerConnection;
import org.rubypeople.rdt.internal.debug.core.model.RubyVariable;
import org.rubypeople.rdt.internal.debug.core.model.ThreadInfo;
import org.rubypeople.rdt.internal.debug.core.parsing.LoadResultReader;
@@ -28,7 +30,7 @@
// suite.addTest(new FTC_ClassicDebuggerCommunicationTest("testThreadIdsAndResume"));
// suite.addTest(new FTC_ClassicDebuggerCommunicationTest("testThreadFramesAndVariables"));
// suite.addTest(new FTC_ClassicDebuggerCommunicationTest("testFrames"));
-// suite.addTest(new FTC_ClassicDebuggerCommunicationTest("testThreads"));
+ suite.addTest(new FTC_ClassicDebuggerCommunicationTest("testThreads"));
// suite.addTest(new FTC_ClassicDebuggerCommunicationTest("testVariablesInFrames"));
@@ -39,7 +41,7 @@
//suite.addTest(new TC_DebuggerCommunicationTest("testVariablesInFrames"));
//suite.addTest(new TC_DebuggerCommunicationTest("testFramesWhenThreadSpawned"));
- //suite.addTest(new TC_DebuggerCommunicationTest("testThreadIdsAndResume"));
+ suite.addTest(new FTC_ClassicDebuggerCommunicationTest("testThreadIdsAndResume"));
//suite.addTest(new TC_DebuggerCommunicationTest("testThreadsAndFrames"));
//suite.addTest(new TC_DebuggerCommunicationTest("testStepOver"));
//suite.addTest(new TC_DebuggerCommunicationTest("testVariableNil"));
@@ -53,11 +55,11 @@
//suite.addTest(new TC_DebuggerCommunicationTest("testVariableString"));
// suite.addTest(new TC_DebuggerCommunicationTest("testInspect"));
//suite.addTest(new TC_DebuggerCommunicationTest("testInspectError"));
- //suite.addTest(new TC_DebuggerCommunicationTest("testReloadAndInspect")) ;
- //suite.addTest(new TC_DebuggerCommunicationTest("testReloadWithException")) ;
- //suite.addTest(new TC_DebuggerCommunicationTest("testReloadAndStep")) ;
- //suite.addTest(new TC_DebuggerCommunicationTest("testReloadInRequire")) ;
- //suite.addTest(new TC_DebuggerCommunicationTest("testReloadInStackFrame")) ;
+ suite.addTest(new FTC_ClassicDebuggerCommunicationTest("testReloadAndInspect")) ;
+ suite.addTest(new FTC_ClassicDebuggerCommunicationTest("testReloadWithException")) ;
+ suite.addTest(new FTC_ClassicDebuggerCommunicationTest("testReloadAndStep")) ;
+ suite.addTest(new FTC_ClassicDebuggerCommunicationTest("testReloadInRequire")) ;
+ suite.addTest(new FTC_ClassicDebuggerCommunicationTest("testReloadInStackFrame")) ;
// suite.addTest(new TC_DebuggerCommunicationTest("testIgnoreException"));
// suite.addTest(new TC_DebuggerCommunicationTest("testExceptionHierarchy"));
// suite.addTest(new TC_DebuggerCommunicationTest("testException"));
@@ -255,4 +257,9 @@
assertEquals("8", localVariables[0].getValue().getValueString());
}
+ @Override
+ protected AbstractDebuggerConnection createDebuggerConnection() {
+ return new ClassicDebuggerConnection(1098) ;
+ }
+
}
Modified: trunk/org.rubypeople.rdt.debug.core.tests/src/org/rubypeople/rdt/debug/core/tests/FTC_DebuggerProxyTest.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.core.tests/src/org/rubypeople/rdt/debug/core/tests/FTC_DebuggerProxyTest.java 2007-01-31 22:28:56 UTC (rev 1902)
+++ trunk/org.rubypeople.rdt.debug.core.tests/src/org/rubypeople/rdt/debug/core/tests/FTC_DebuggerProxyTest.java 2007-01-31 22:31:15 UTC (rev 1903)
@@ -51,17 +51,18 @@
public void setUp() throws Exception {
target = new TestRubyDebugTarget() ;
- proxy = new RubyDebuggerProxy(target, false /*useRubyDebug*/) ;
+ //TODO: get proper directory
+ String rubyFileDirectory ="launching/ruby " ;
+ proxy = new RubyDebuggerProxy(target, rubyFileDirectory, false /*useRubyDebug*/) ;
PipedInputStream pipedInputStream = new PipedInputStream() ;
PipedOutputStream pipedOutputStream = new PipedOutputStream(pipedInputStream) ;
- proxy.setWriter(new PrintWriter(pipedOutputStream)) ;
XmlPullParserFactory factory = XmlPullParserFactory.newInst...
[truncated message content] |
|
From: <mba...@us...> - 2007-01-31 22:28:58
|
Revision: 1902
http://svn.sourceforge.net/rubyeclipse/?rev=1902&view=rev
Author: mbarchfe
Date: 2007-01-31 14:28:56 -0800 (Wed, 31 Jan 2007)
Log Message:
-----------
Added better abstraction for debugger access since we need two socket connections for rubydebug
Modified Paths:
--------------
trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/RubyDebuggerProxy.java
Modified: trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/RubyDebuggerProxy.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/RubyDebuggerProxy.java 2007-01-31 22:28:36 UTC (rev 1901)
+++ trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/RubyDebuggerProxy.java 2007-01-31 22:28:56 UTC (rev 1902)
@@ -1,86 +1,55 @@
package org.rubypeople.rdt.internal.debug.core;
import java.io.IOException;
-import java.io.PrintWriter;
-import java.net.Socket;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IMarkerDelta;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.model.IBreakpoint;
+import org.rubypeople.rdt.internal.debug.core.commands.AbstractDebuggerConnection;
+import org.rubypeople.rdt.internal.debug.core.commands.BreakpointCommand;
+import org.rubypeople.rdt.internal.debug.core.commands.ClassicDebuggerConnection;
+import org.rubypeople.rdt.internal.debug.core.commands.GenericCommand;
+import org.rubypeople.rdt.internal.debug.core.commands.RubyDebugConnection;
import org.rubypeople.rdt.internal.debug.core.model.IRubyDebugTarget;
import org.rubypeople.rdt.internal.debug.core.model.RubyProcessingException;
import org.rubypeople.rdt.internal.debug.core.model.RubyStackFrame;
import org.rubypeople.rdt.internal.debug.core.model.RubyThread;
import org.rubypeople.rdt.internal.debug.core.model.RubyVariable;
import org.rubypeople.rdt.internal.debug.core.model.ThreadInfo;
-import org.rubypeople.rdt.internal.debug.core.parsing.BreakpointAddedReader;
+import org.rubypeople.rdt.internal.debug.core.parsing.AbstractReadStrategy;
import org.rubypeople.rdt.internal.debug.core.parsing.ErrorReader;
-import org.rubypeople.rdt.internal.debug.core.parsing.EvalReader;
import org.rubypeople.rdt.internal.debug.core.parsing.FramesReader;
import org.rubypeople.rdt.internal.debug.core.parsing.LoadResultReader;
-import org.rubypeople.rdt.internal.debug.core.parsing.MultiReaderStrategy;
import org.rubypeople.rdt.internal.debug.core.parsing.SuspensionReader;
import org.rubypeople.rdt.internal.debug.core.parsing.ThreadInfoReader;
import org.rubypeople.rdt.internal.debug.core.parsing.VariableReader;
-import org.xmlpull.v1.XmlPullParser;
-import org.xmlpull.v1.XmlPullParserException;
-import org.xmlpull.v1.XmlPullParserFactory;
public class RubyDebuggerProxy {
public final static String DEBUGGER_ACTIVE_KEY = "org.rubypeople.rdt.debug.ui.debuggerActive";
- private Socket socket;
- private PrintWriter writer;
+ private AbstractDebuggerConnection debuggerConnection;
private IRubyDebugTarget debugTarget;
private RubyLoop rubyLoop;
- private XmlPullParser xpp;
- protected MultiReaderStrategy multiReaderStrategy;
private ICommandFactory commandFactory;
- private final boolean isRubyDebug;
- public RubyDebuggerProxy(IRubyDebugTarget debugTarget, boolean isRubyDebug) {
+ public RubyDebuggerProxy(IRubyDebugTarget debugTarget, String rubyFileDirectory, boolean isRubyDebug) {
this.debugTarget = debugTarget;
- this.isRubyDebug = isRubyDebug;
debugTarget.setRubyDebuggerProxy(this);
commandFactory = isRubyDebug ? new RubyDebugCommandFactory() : new ClassicDebuggerCommandFactory();
+ debuggerConnection = isRubyDebug ? new RubyDebugConnection(rubyFileDirectory, debugTarget.getPort()) : new ClassicDebuggerConnection(debugTarget.getPort());
}
public boolean checkConnection() {
- try {
- return this.getSocket().isConnected();
- } catch (DebuggerNotFoundException ex) {
- return false;
- } catch (IOException ex) {
- return false;
- }
+ return debuggerConnection.isCommandPortConnected();
}
- public String registerRdebugExtension(String pathToRdebugExtension) throws IOException, RubyProcessingException {
- // should be called before start
- if (!isRubyDebug) { // Should never happen
- return "false";
- }
- try {
- // TODO: do not let the debugger stop on the first line
- new SuspensionReader(getMultiReaderStrategy()).readSuspension();
- } catch (Exception e) {
- RdtDebugCorePlugin.log(e);
- }
- String expression = "eval require '" + pathToRdebugExtension + "'";
- println(expression);
- EvalReader reader = new EvalReader(getMultiReaderStrategy());
- return reader.readEvalResult(); // throws RubyProcessingException
- }
-
- public void start() throws RubyProcessingException {
- try {
+ public void start() throws RubyProcessingException, IOException {
+
+ debuggerConnection.connect();
this.setBreakPoints();
this.startRubyLoop();
- } catch (Exception e) {
- RdtDebugCorePlugin.log(e);
- }
}
public void stop() {
@@ -92,71 +61,6 @@
rubyLoop.interrupt();
}
- protected Socket acquireSocket() throws IOException {
-
- int tryCount = 10;
- for (int i = 0; i < tryCount; i++) {
- try {
- socket = new Socket("localhost", debugTarget.getPort());
- return socket;
- } catch (IOException e) {
- try {
- Thread.sleep(500);
- } catch (InterruptedException e1) {}
- }
- }
- return null;
-
- }
-
- protected Socket getSocket() throws IOException, DebuggerNotFoundException {
-
- if (socket == null) {
- socket = acquireSocket();
- if (socket == null) {
- throw new DebuggerNotFoundException();
- }
- }
- return socket;
- }
-
- public PrintWriter getWriter() throws IOException, DebuggerNotFoundException {
- if (writer == null) {
- writer = new PrintWriter(this.getSocket().getOutputStream(), true);
- }
- return writer;
- }
-
- public void setWriter(PrintWriter writer) {
- this.writer = writer;
- }
-
- public XmlPullParser getXpp() {
- if (xpp == null) {
- try {
- XmlPullParserFactory factory = XmlPullParserFactory.newInstance("org.kxml2.io.KXmlParser,org.kxml2.io.KXmlSerializer", null);
- xpp = factory.newPullParser();
- xpp.setInput(getSocket().getInputStream(), "UTF-8");
- } catch (XmlPullParserException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- return xpp;
- }
-
- public void setXpp(XmlPullParser xpp) {
- this.xpp = xpp;
- }
-
- protected synchronized MultiReaderStrategy getMultiReaderStrategy() {
- if (this.multiReaderStrategy == null) {
- this.multiReaderStrategy = new MultiReaderStrategy(this.getXpp());
- }
- return multiReaderStrategy;
- }
-
protected void setBreakPoints() throws IOException {
IBreakpoint[] breakpoints = DebugPlugin.getDefault().getBreakpointManager().getBreakpoints(IRubyDebugTarget.MODEL_IDENTIFIER);
for (int i = 0; i < breakpoints.length; i++) {
@@ -168,12 +72,13 @@
try {
if (breakpoint.isEnabled()) {
if (breakpoint instanceof RubyExceptionBreakpoint) {
- this.println(commandFactory.createCatchOn(breakpoint));
+ // TODO: check result
+ String command = commandFactory.createCatchOn(breakpoint) ;
+ new BreakpointCommand(command).execute(debuggerConnection) ;
} else if (breakpoint instanceof RubyLineBreakpoint) {
RubyLineBreakpoint rubyLineBreakpoint = (RubyLineBreakpoint) breakpoint;
String command = commandFactory.createAddBreakpoint(rubyLineBreakpoint.getFileName(), rubyLineBreakpoint.getLineNumber());
- this.println(command);
- int index = readBreakpointIndex();
+ int index = new BreakpointCommand(command).executeWithResult(debuggerConnection);
rubyLineBreakpoint.setIndex(index);
}
}
@@ -190,12 +95,14 @@
// so far we allow only one catch exception
// catch off must be set in the case that the enablement has
// changed to disabled
- this.println(commandFactory.createCatchOff());
+ String command = commandFactory.createCatchOff();
+ new BreakpointCommand(command).execute(debuggerConnection) ;
} else if (breakpoint instanceof RubyLineBreakpoint) {
RubyLineBreakpoint rubyLineBreakpoint = (RubyLineBreakpoint) breakpoint;
if (rubyLineBreakpoint.getIndex() != -1) {
String command = commandFactory.createRemoveBreakpoint(rubyLineBreakpoint.getIndex());
- this.println(command);
+ // TODO: check for errors
+ int deletedIndex = new BreakpointCommand(command).executeWithResult(debuggerConnection);
rubyLineBreakpoint.setIndex(-1);
}
}
@@ -218,14 +125,15 @@
}
}
- public void startRubyLoop() {
+ public void startRubyLoop() throws DebuggerNotFoundException, IOException {
+ debuggerConnection.start();
rubyLoop = new RubyLoop();
rubyLoop.start();
Runnable runnable = new Runnable() {
public void run() {
try {
while (true) {
- new ErrorReader(getMultiReaderStrategy()).read();
+ new ErrorReader(debuggerConnection.getCommandReadStrategy()).read();
}
} catch (Exception e) {
RdtDebugCorePlugin.log(e);
@@ -244,9 +152,9 @@
}
protected void println(String s) throws IOException {
- RdtDebugCorePlugin.debug("Sending debugger: " + s);
try {
- this.getWriter().println(s);
+ // TOOD: GenericCommand is only temporary solution
+ new GenericCommand(s, false /* isControl */).execute(debuggerConnection);
} catch (IOException e) {
RdtDebugCorePlugin.debug("Could not send to debugger. Exception occured.", e);
throw e;
@@ -257,15 +165,6 @@
return debugTarget;
}
- public int readBreakpointIndex() {
- try {
- return new BreakpointAddedReader(getMultiReaderStrategy()).readBreakpointNo();
- } catch (Exception ioex) {
- ioex.printStackTrace();
- throw new RuntimeException(ioex.getMessage());
- }
- }
-
public RubyVariable[] readVariables(RubyStackFrame frame) {
try {
this.println(commandFactory.createReadLocalVariables(frame));
@@ -356,12 +255,14 @@
}
}
- public void closeSocket() throws IOException {
- if (socket != null) {
- socket.close();
- }
+ public void closeConnection() throws IOException {
+ debuggerConnection.exit();
}
+ private AbstractReadStrategy getMultiReaderStrategy() {
+ return debuggerConnection.getCommandReadStrategy();
+ }
+
class RubyLoop extends Thread {
public RubyLoop() {
@@ -373,8 +274,9 @@
public void run() {
try {
System.setProperty(DEBUGGER_ACTIVE_KEY, "true");
- getDebugTarget().updateThreads();
- println("cont");
+
+ // TODO
+ //getDebugTarget().updateThreads();
RdtDebugCorePlugin.debug("Waiting for breakpoints.");
while (true) {
final SuspensionPoint hit = new SuspensionReader(getMultiReaderStrategy()).readSuspension();
@@ -398,7 +300,7 @@
System.setProperty(DEBUGGER_ACTIVE_KEY, "false");
getDebugTarget().terminate();
try {
- closeSocket();
+ closeConnection();
} catch (IOException e) {
RdtDebugCorePlugin.log(e);
}
@@ -406,4 +308,6 @@
}
}
}
+
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mba...@us...> - 2007-01-31 22:28:41
|
Revision: 1901
http://svn.sourceforge.net/rubyeclipse/?rev=1901&view=rev
Author: mbarchfe
Date: 2007-01-31 14:28:36 -0800 (Wed, 31 Jan 2007)
Log Message:
-----------
Added better abstraction for debugger access since we need two socket connections for rubydebug
Added Paths:
-----------
trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/AbstractDebuggerConnection.java
trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/BreakpointCommand.java
trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/ClassicDebuggerConnection.java
trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/EvalCommand.java
trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/GenericCommand.java
trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/RubyDebugConnection.java
trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/StepCommand.java
Added: trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/AbstractDebuggerConnection.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/AbstractDebuggerConnection.java (rev 0)
+++ trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/AbstractDebuggerConnection.java 2007-01-31 22:28:36 UTC (rev 1901)
@@ -0,0 +1,127 @@
+package org.rubypeople.rdt.internal.debug.core.commands;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.net.Socket;
+
+import org.rubypeople.rdt.internal.debug.core.DebuggerNotFoundException;
+import org.rubypeople.rdt.internal.debug.core.RdtDebugCorePlugin;
+import org.rubypeople.rdt.internal.debug.core.parsing.AbstractReadStrategy;
+import org.rubypeople.rdt.internal.debug.core.parsing.MultiReaderStrategy;
+import org.rubypeople.rdt.internal.debug.core.parsing.SuspensionReader;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+import org.xmlpull.v1.XmlPullParserFactory;
+
+public abstract class AbstractDebuggerConnection {
+
+ private int commandPort;
+ private Socket commandSocket;
+ private PrintWriter writer;
+ private AbstractReadStrategy commandReadStrategy ;
+
+ public AbstractDebuggerConnection(int port) {
+ super();
+ this.commandPort = port;
+ }
+
+ /*
+ * connect to the debugger. After the connection is established the debugger
+ * listens for control commands
+ */
+ public abstract void connect() throws DebuggerNotFoundException, IOException;
+
+ /*
+ * start the debugger. Must be connected to start.
+ */
+ public abstract SuspensionReader start() throws DebuggerNotFoundException, IOException;
+
+
+ /*
+ * always call via Command.execute
+ */
+ protected AbstractReadStrategy sendCommand(AbstractCommand command) throws DebuggerNotFoundException, IOException {
+ if (!isCommandPortConnected()) {
+ throw new IllegalStateException(command + " could not be sent since command socket is not open") ;
+ }
+ RdtDebugCorePlugin.debug("Sending command: " + command.getCommand()) ;
+ getWriter().println(command.getCommand()) ;
+ return getCommandReadStrategy() ;
+ }
+
+ public AbstractReadStrategy getCommandReadStrategy() {
+ return commandReadStrategy ;
+ }
+
+ protected void createCommandConnection() throws DebuggerNotFoundException, IOException {
+ getSocket() ;
+ XmlPullParser xpp = createXpp(commandSocket) ;
+ commandReadStrategy = new MultiReaderStrategy(xpp) ;
+ }
+
+ public boolean isCommandPortConnected() {
+ return commandSocket != null ;
+ }
+
+ protected Socket getSocket() throws IOException, DebuggerNotFoundException {
+
+ if (commandSocket == null) {
+ commandSocket = acquireSocket(commandPort);
+ if (commandSocket == null) {
+ throw new DebuggerNotFoundException();
+ }
+ }
+ return commandSocket;
+ }
+
+
+ protected static Socket acquireSocket(int port) throws IOException {
+ Socket socket = null ;
+ int tryCount = 10;
+ for (int i = 0; i < tryCount; i++) {
+ try {
+ socket = new Socket("localhost", port);
+ break ;
+ } catch (IOException e) {
+ try {
+ Thread.sleep(500);
+ } catch (InterruptedException e1) {}
+ }
+ }
+ return socket;
+
+ }
+
+ private PrintWriter getWriter() throws IOException, DebuggerNotFoundException {
+ if (writer == null) {
+ writer = new PrintWriter(commandSocket.getOutputStream(), true);
+ }
+ return writer;
+ }
+
+ protected static XmlPullParser createXpp(Socket socket) {
+ XmlPullParser xpp = null;
+ try {
+ XmlPullParserFactory factory = XmlPullParserFactory.newInstance("org.kxml2.io.KXmlParser,org.kxml2.io.KXmlSerializer", null);
+ xpp = factory.newPullParser();
+ xpp.setInput(socket.getInputStream(), "UTF-8");
+ } catch (XmlPullParserException e) {
+ // TODO: log
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return xpp;
+ }
+
+ public int getCommandPort() {
+ return commandPort;
+ }
+
+ public void exit() throws IOException {
+ if (commandSocket != null) {
+ commandSocket.close() ;
+ }
+ }
+
+}
Added: trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/BreakpointCommand.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/BreakpointCommand.java (rev 0)
+++ trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/BreakpointCommand.java 2007-01-31 22:28:36 UTC (rev 1901)
@@ -0,0 +1,29 @@
+package org.rubypeople.rdt.internal.debug.core.commands;
+
+import java.io.IOException;
+
+import org.rubypeople.rdt.internal.debug.core.DebuggerNotFoundException;
+import org.rubypeople.rdt.internal.debug.core.parsing.AbstractReadStrategy;
+import org.rubypeople.rdt.internal.debug.core.parsing.BreakpointModificationReader;
+import org.rubypeople.rdt.internal.debug.core.parsing.XmlStreamReader;
+
+public class BreakpointCommand extends AbstractCommand {
+
+ public BreakpointCommand(String command) {
+ super(command, true) ;
+ }
+
+ @Override
+ protected XmlStreamReader createResultReader(AbstractReadStrategy readStrategy) {
+ return new BreakpointModificationReader(readStrategy) ;
+ }
+
+ public BreakpointModificationReader getBreakpointAddedReader() {
+ return (BreakpointModificationReader) getResultReader() ;
+ }
+
+ public int executeWithResult(AbstractDebuggerConnection connection) throws DebuggerNotFoundException, IOException {
+ execute(connection) ;
+ return getBreakpointAddedReader().readBreakpointNo() ;
+ }
+}
Added: trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/ClassicDebuggerConnection.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/ClassicDebuggerConnection.java (rev 0)
+++ trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/ClassicDebuggerConnection.java 2007-01-31 22:28:36 UTC (rev 1901)
@@ -0,0 +1,26 @@
+package org.rubypeople.rdt.internal.debug.core.commands;
+
+import java.io.IOException;
+
+import org.rubypeople.rdt.internal.debug.core.DebuggerNotFoundException;
+import org.rubypeople.rdt.internal.debug.core.parsing.SuspensionReader;
+
+public class ClassicDebuggerConnection extends AbstractDebuggerConnection {
+
+ public ClassicDebuggerConnection(int port) {
+ super(port);
+ }
+
+ @Override
+ public void connect() throws DebuggerNotFoundException, IOException {
+ createCommandConnection();
+ }
+
+ @Override
+ public SuspensionReader start() throws DebuggerNotFoundException, IOException {
+ StepCommand stepCommand = new StepCommand("cont");
+ stepCommand.execute(this) ;
+ return stepCommand.getSuspensionReader() ;
+ }
+
+}
Added: trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/EvalCommand.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/EvalCommand.java (rev 0)
+++ trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/EvalCommand.java 2007-01-31 22:28:36 UTC (rev 1901)
@@ -0,0 +1,21 @@
+package org.rubypeople.rdt.internal.debug.core.commands;
+
+import org.rubypeople.rdt.internal.debug.core.parsing.AbstractReadStrategy;
+import org.rubypeople.rdt.internal.debug.core.parsing.EvalReader;
+import org.rubypeople.rdt.internal.debug.core.parsing.XmlStreamReader;
+
+public class EvalCommand extends AbstractCommand {
+
+ public EvalCommand(String command, boolean isControl) {
+ super(command, isControl);
+ }
+
+ @Override
+ protected XmlStreamReader createResultReader(AbstractReadStrategy readStrategy) {
+ return new EvalReader(readStrategy);
+ }
+
+ public EvalReader getEvalReader() {
+ return (EvalReader) getResultReader() ;
+ }
+}
Added: trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/GenericCommand.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/GenericCommand.java (rev 0)
+++ trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/GenericCommand.java 2007-01-31 22:28:36 UTC (rev 1901)
@@ -0,0 +1,24 @@
+package org.rubypeople.rdt.internal.debug.core.commands;
+
+import org.rubypeople.rdt.internal.debug.core.parsing.AbstractReadStrategy;
+import org.rubypeople.rdt.internal.debug.core.parsing.XmlStreamReader;
+
+public class GenericCommand extends AbstractCommand {
+
+ private AbstractReadStrategy readStrategy;
+
+ public GenericCommand(String command, boolean isControl) {
+ super(command, isControl);
+ }
+
+ @Override
+ protected XmlStreamReader createResultReader(AbstractReadStrategy readStrategy) {
+ this.readStrategy = readStrategy;
+ return null;
+ }
+
+ public AbstractReadStrategy getReadStrategy() {
+ return readStrategy;
+ }
+
+}
Added: trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/RubyDebugConnection.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/RubyDebugConnection.java (rev 0)
+++ trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/RubyDebugConnection.java 2007-01-31 22:28:36 UTC (rev 1901)
@@ -0,0 +1,109 @@
+package org.rubypeople.rdt.internal.debug.core.commands;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.net.Socket;
+
+import org.rubypeople.rdt.internal.debug.core.DebuggerNotFoundException;
+import org.rubypeople.rdt.internal.debug.core.RdtDebugCorePlugin;
+import org.rubypeople.rdt.internal.debug.core.model.RubyProcessingException;
+import org.rubypeople.rdt.internal.debug.core.parsing.AbstractReadStrategy;
+import org.rubypeople.rdt.internal.debug.core.parsing.MultiReaderStrategy;
+import org.rubypeople.rdt.internal.debug.core.parsing.SuspensionReader;
+import org.xmlpull.v1.XmlPullParser;
+
+public class RubyDebugConnection extends AbstractDebuggerConnection {
+
+ private Socket controlSocket ;
+ private MultiReaderStrategy controlReadStrategy;
+ private PrintWriter controlWriter;
+ private String rdebugExtensionPath ;
+ public RubyDebugConnection(String rdebugExtensionPath, int port) {
+ super(port);
+ this.rdebugExtensionPath = rdebugExtensionPath + File.separatorChar + "rdebugExtension.rb";
+ }
+
+ @Override
+ public void connect() throws DebuggerNotFoundException, IOException{
+ createControlConnection() ;
+
+ String expression = "eval require '" + rdebugExtensionPath + "'";
+ EvalCommand command = new EvalCommand(expression, true) ;
+ command.execute(this) ;
+ String evalResult = null;
+ try {
+ evalResult = command.getEvalReader().readEvalResult();
+ } catch (RubyProcessingException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ if (evalResult == null || !evalResult.equals("true")) {
+ // TODO: go on ?
+ throw new DebuggerNotFoundException("Could not add extension to ruby debug") ;
+ }
+ }
+
+ @Override
+ public SuspensionReader start() throws DebuggerNotFoundException, IOException {
+ createCommandConnection() ;
+ return new SuspensionReader(getCommandReadStrategy()) ;
+ }
+
+ @Override
+ public AbstractReadStrategy sendCommand(AbstractCommand command) throws DebuggerNotFoundException, IOException {
+ AbstractReadStrategy result = null ;
+ if (command.isControl()) {
+ result =sendControlCommand(command) ;
+ } else {
+ result = super.sendCommand(command);
+ }
+ return result ;
+ }
+
+ private AbstractReadStrategy sendControlCommand(AbstractCommand command) throws IOException {
+ if (!isControlPortConnected()) {
+ throw new IllegalStateException(command + " could not be executed since control socket is not opened.") ;
+ }
+ RdtDebugCorePlugin.debug("Sending control command: " + command.getCommand()) ;
+ getControlWriter().println(command.getCommand()) ;
+ return getControlReadStrategy() ;
+ }
+
+ private PrintWriter getControlWriter() throws IOException {
+ if (controlWriter == null) {
+ controlWriter = new PrintWriter(getControlSocket().getOutputStream(), true);
+ }
+ return controlWriter;
+ }
+
+ protected boolean isControlPortConnected() {
+ return controlReadStrategy != null;
+ }
+
+ protected void createControlConnection() throws DebuggerNotFoundException, IOException {
+ Socket socket = getControlSocket() ;
+ XmlPullParser xpp = createXpp(socket) ;
+ controlReadStrategy = new MultiReaderStrategy(xpp) ;
+ }
+
+ private Socket getControlSocket() throws IOException {
+ if (controlSocket == null) {
+ controlSocket = acquireSocket(getCommandPort() + 1) ;
+ }
+ return controlSocket ;
+ }
+
+ public MultiReaderStrategy getControlReadStrategy() {
+ return controlReadStrategy;
+ }
+
+ @Override
+ public void exit() throws IOException {
+ super.exit();
+ GenericCommand command = new GenericCommand("exit", true) ;
+ command.execute(this) ;
+ controlSocket.close() ;
+ }
+
+}
Added: trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/StepCommand.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/StepCommand.java (rev 0)
+++ trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/StepCommand.java 2007-01-31 22:28:36 UTC (rev 1901)
@@ -0,0 +1,34 @@
+package org.rubypeople.rdt.internal.debug.core.commands;
+
+import java.io.IOException;
+
+import org.rubypeople.rdt.internal.debug.core.DebuggerNotFoundException;
+import org.rubypeople.rdt.internal.debug.core.SuspensionPoint;
+import org.rubypeople.rdt.internal.debug.core.parsing.AbstractReadStrategy;
+import org.rubypeople.rdt.internal.debug.core.parsing.SuspensionReader;
+import org.rubypeople.rdt.internal.debug.core.parsing.XmlStreamReader;
+import org.rubypeople.rdt.internal.debug.core.parsing.XmlStreamReaderException;
+import org.xmlpull.v1.XmlPullParserException;
+
+public class StepCommand extends AbstractCommand {
+
+
+ public StepCommand(String command) {
+ super(command, false);
+ }
+
+ @Override
+ protected XmlStreamReader createResultReader(AbstractReadStrategy readStrategy) {
+ return new SuspensionReader(readStrategy);
+ }
+
+ public SuspensionReader getSuspensionReader() {
+ return (SuspensionReader) getResultReader() ;
+ }
+
+ public SuspensionPoint readSuspension(AbstractDebuggerConnection debuggerConnection) throws DebuggerNotFoundException, IOException, XmlPullParserException, XmlStreamReaderException {
+ execute(debuggerConnection);
+ return getSuspensionReader().readSuspension() ;
+ }
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mba...@us...> - 2007-01-31 22:28:13
|
Revision: 1900
http://svn.sourceforge.net/rubyeclipse/?rev=1900&view=rev
Author: mbarchfe
Date: 2007-01-31 14:28:12 -0800 (Wed, 31 Jan 2007)
Log Message:
-----------
Added better abstraction for debugger access since we need two socket connections for rubydebug
Added Paths:
-----------
trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/
trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/AbstractCommand.java
Added: trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/AbstractCommand.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/AbstractCommand.java (rev 0)
+++ trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/commands/AbstractCommand.java 2007-01-31 22:28:12 UTC (rev 1900)
@@ -0,0 +1,44 @@
+package org.rubypeople.rdt.internal.debug.core.commands;
+
+import java.io.IOException;
+
+import org.rubypeople.rdt.internal.debug.core.DebuggerNotFoundException;
+import org.rubypeople.rdt.internal.debug.core.parsing.AbstractReadStrategy;
+import org.rubypeople.rdt.internal.debug.core.parsing.XmlStreamReader;
+
+public abstract class AbstractCommand {
+ private String command ;
+ private boolean isControl ;
+ private XmlStreamReader resultReader;
+
+ protected AbstractCommand(String command, boolean isControl) {
+ this.command = command;
+ this.isControl = isControl;
+ }
+
+ public void execute(AbstractDebuggerConnection debuggerConnection) throws DebuggerNotFoundException, IOException {
+ AbstractReadStrategy readStrategy = debuggerConnection.sendCommand(this) ;
+ resultReader = createResultReader(readStrategy) ;
+ }
+
+ protected abstract XmlStreamReader createResultReader(AbstractReadStrategy readStrategy) ;
+
+ public XmlStreamReader getResultReader() {
+ if (!isExecuted()) {
+ throw new IllegalStateException("getResultReader must only be called after the command was executed.") ;
+ }
+ return resultReader;
+ }
+
+ public String getCommand() {
+ return command;
+ }
+
+ public boolean isControl() {
+ return isControl;
+ }
+
+ public boolean isExecuted() {
+ return resultReader != null ;
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mba...@us...> - 2007-01-31 22:27:39
|
Revision: 1899
http://svn.sourceforge.net/rubyeclipse/?rev=1899&view=rev
Author: mbarchfe
Date: 2007-01-31 14:27:37 -0800 (Wed, 31 Jan 2007)
Log Message:
-----------
Added better abstraction for debugger access since we need two socket connections for rubydebug
Modified Paths:
--------------
trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/DebuggerNotFoundException.java
Modified: trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/DebuggerNotFoundException.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/DebuggerNotFoundException.java 2007-01-31 22:22:00 UTC (rev 1898)
+++ trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/DebuggerNotFoundException.java 2007-01-31 22:27:37 UTC (rev 1899)
@@ -3,6 +3,11 @@
public class DebuggerNotFoundException extends RuntimeException {
+ public DebuggerNotFoundException(String message) {
+ super(message);
+ // TODO Auto-generated constructor stub
+ }
+
private static final long serialVersionUID = -7048656572730937337L;
public DebuggerNotFoundException() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mba...@us...> - 2007-01-31 22:22:03
|
Revision: 1898
http://svn.sourceforge.net/rubyeclipse/?rev=1898&view=rev
Author: mbarchfe
Date: 2007-01-31 14:22:00 -0800 (Wed, 31 Jan 2007)
Log Message:
-----------
added breakpointDeleted message
Modified Paths:
--------------
trunk/org.rubypeople.rdt.launching/ruby/eclipseDebug.rb
Modified: trunk/org.rubypeople.rdt.launching/ruby/eclipseDebug.rb
===================================================================
--- trunk/org.rubypeople.rdt.launching/ruby/eclipseDebug.rb 2007-01-31 14:39:18 UTC (rev 1897)
+++ trunk/org.rubypeople.rdt.launching/ruby/eclipseDebug.rb 2007-01-31 22:22:00 UTC (rev 1898)
@@ -571,10 +571,10 @@
when /^\s*delete\s+(\d+)$/
pos = $1.to_i
if pos < 1 || pos > break_points.length
- @printer.printError("Breakpoint number out of bounds: %d. There are currently %d breakpoints defined.", pos, break_points.length )
+ @printer.printXml("<error>Breakpoint number out of bounds: %d. There are currently %d breakpoints defined.</error>", pos, break_points.length )
else
break_points.delete_at(pos-1)
- @printer.debug("Removed breakpoint no %d", pos)
+ @printer.printXml("<breakpointDeleted no=\"%d\"/>\n", pos)
end
# when /^\s*wat(?:ch)?\s+(.+)$/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|