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: <caw...@us...> - 2007-03-06 19:42:30
|
Revision: 2097
http://svn.sourceforge.net/rubyeclipse/?rev=2097&view=rev
Author: cawilliams
Date: 2007-03-06 11:42:25 -0800 (Tue, 06 Mar 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java
Modified: trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java
===================================================================
--- trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java 2007-03-06 19:41:19 UTC (rev 2096)
+++ trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java 2007-03-06 19:42:25 UTC (rev 2097)
@@ -83,6 +83,7 @@
buffer.append(new Path(interpreter.getInstallLocation().getAbsolutePath()).append("bin").append("ruby").toOSString());
buffer.append("\" ");
buffer.append(INTERPRETER_ARGUMENTS);
+ if (!debug) buffer.append(" -e STDOUT.sync=true -e STDERR.sync=true -e load(ARGV.shift)");
buffer.append(" -I \"");
buffer.append(project.getLocation().toOSString());
buffer.append("\"");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-03-06 19:41:35
|
Revision: 2096
http://svn.sourceforge.net/rubyeclipse/?rev=2096&view=rev
Author: cawilliams
Date: 2007-03-06 11:41:19 -0800 (Tue, 06 Mar 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RubyRuntime.java
trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java
Modified: trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RubyRuntime.java
===================================================================
--- trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RubyRuntime.java 2007-03-06 19:21:23 UTC (rev 2095)
+++ trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RubyRuntime.java 2007-03-06 19:41:19 UTC (rev 2096)
@@ -157,7 +157,7 @@
xml.append(name);
xml.append("\" path=\"");
xml.append(location.toOSString());
- xml.append("\" vmargs=\"-e STDOUT.sync=true -e STDERR.sync=true -e load(ARGV.shift)\">\r\n");
+ xml.append("\">\r\n");
xml.append("<libraryLocations>\r\n");
xml.append("<libraryLocation src=\"");
xml.append(location.toPortableString());
@@ -166,9 +166,11 @@
xml.append(location.toPortableString());
xml.append("/lib/ruby/1.8\"/>\r\n");
File file = LaunchingPlugin.getFileInPlugin(new Path("ruby" + File.separator + id + File.separator + "lib"));
- xml.append("<libraryLocation src=\"");
- xml.append(Path.fromOSString(file.toString()).toPortableString());
- xml.append("\"/>\r\n");
+ if (file != null) {
+ xml.append("<libraryLocation src=\"");
+ xml.append(Path.fromOSString(file.toString()).toPortableString());
+ xml.append("\"/>\r\n");
+ }
xml.append("</libraryLocations>\r\n");
xml.append("</vm>\r\n");
return xml.toString();
Modified: trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java
===================================================================
--- trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java 2007-03-06 19:21:23 UTC (rev 2095)
+++ trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java 2007-03-06 19:41:19 UTC (rev 2096)
@@ -83,7 +83,6 @@
buffer.append(new Path(interpreter.getInstallLocation().getAbsolutePath()).append("bin").append("ruby").toOSString());
buffer.append("\" ");
buffer.append(INTERPRETER_ARGUMENTS);
- buffer.append(" -e STDOUT.sync=true -e STDERR.sync=true -e load(ARGV.shift)");
buffer.append(" -I \"");
buffer.append(project.getLocation().toOSString());
buffer.append("\"");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-03-06 19:21:25
|
Revision: 2095
http://svn.sourceforge.net/rubyeclipse/?rev=2095&view=rev
Author: cawilliams
Date: 2007-03-06 11:21:23 -0800 (Tue, 06 Mar 2007)
Log Message:
-----------
move sync stuff over to launcher, not VM
Modified Paths:
--------------
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVM.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMRunner.java
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVM.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVM.java 2007-03-06 13:48:05 UTC (rev 2094)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVM.java 2007-03-06 19:21:23 UTC (rev 2095)
@@ -167,14 +167,4 @@
}
return null;
}
-
-
- @Override
- public String getVMArgs() {
- String vmArgs = super.getVMArgs();
- if (vmArgs == null) vmArgs = "";
- else vmArgs += " ";
- vmArgs += "-e STDOUT.sync=true -e STDERR.sync=true -e load(ARGV.shift)";
- return vmArgs;
- }
}
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMRunner.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMRunner.java 2007-03-06 13:48:05 UTC (rev 2094)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMRunner.java 2007-03-06 19:21:23 UTC (rev 2095)
@@ -195,6 +195,13 @@
// options like '-client' & '-server' which are required to be the first option
String[] allVMArgs = combineVmArgs(config, fVMInstance);
addArguments(allVMArgs, arguments);
+ // FIXME Find a better place for this to go?
+ arguments.add("-e");
+ arguments.add("STDOUT.sync=true");
+ arguments.add("-e");
+ arguments.add("STDERR.sync=true");
+ arguments.add("-e");
+ arguments.add("load(ARGV.shift)");
String[] lp= config.getLoadPath();
if (lp.length > 0) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cal...@us...> - 2007-03-06 13:48:11
|
Revision: 2094
http://svn.sourceforge.net/rubyeclipse/?rev=2094&view=rev
Author: callandor1983
Date: 2007-03-06 05:48:05 -0800 (Tue, 06 Mar 2007)
Log Message:
-----------
DocumentProvider problem solved
Modified Paths:
--------------
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/inlinemethod/SelectedCallFinder.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/documentprovider/DocumentProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/documentprovider/DocumentWithIncluding.java
Modified: 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/converttemptofield/TempToFieldConverter.java 2007-03-06 12:56:24 UTC (rev 2093)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/converttemptofield/TempToFieldConverter.java 2007-03-06 13:48:05 UTC (rev 2094)
@@ -149,7 +149,7 @@
}
private Node findSelectedNode(Class<?>... filterNodes) {
- return SelectionNodeProvider.getSelectedNodeOfType(config.getDocProvider().getAllNodes(), config.getCaretPosition(), filterNodes);
+ return SelectionNodeProvider.getSelectedNodeOfType(config.getDocProvider().getActiveFileRootNode(), config.getCaretPosition(), filterNodes);
}
boolean isInitializationExternalizable() {
Modified: 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/SelectedCallFinder.java 2007-03-06 12:56:24 UTC (rev 2093)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/SelectedCallFinder.java 2007-03-06 13:48:05 UTC (rev 2094)
@@ -40,7 +40,7 @@
public MethodCallNodeWrapper findSelectedCall(final int pos, final DocumentProvider doc) {
- final Node selectedNode = SelectionNodeProvider.getSelectedNodeOfType(doc.getAllNodes(), pos, CallNode.class, FCallNode.class, VCallNode.class);
+ final Node selectedNode = SelectionNodeProvider.getSelectedNodeOfType(doc.getActiveFileRootNode(), pos, CallNode.class, FCallNode.class, VCallNode.class);
return selectedNode != null ? new MethodCallNodeWrapper(selectedNode) : null;
}
Modified: 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/RenameFieldConditionChecker.java 2007-03-06 12:56:24 UTC (rev 2093)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamefield/RenameFieldConditionChecker.java 2007-03-06 13:48:05 UTC (rev 2094)
@@ -35,8 +35,10 @@
import org.jruby.ast.CallNode;
import org.jruby.ast.Node;
+import org.jruby.ast.RootNode;
import org.rubypeople.rdt.refactoring.classnodeprovider.ClassNodeProvider;
import org.rubypeople.rdt.refactoring.classnodeprovider.IncludedClassesProvider;
+import org.rubypeople.rdt.refactoring.core.NodeProvider;
import org.rubypeople.rdt.refactoring.core.RefactoringConditionChecker;
import org.rubypeople.rdt.refactoring.core.SelectionNodeProvider;
import org.rubypeople.rdt.refactoring.core.renamefield.fielditems.FieldCallItem;
@@ -53,6 +55,8 @@
private RenameFieldConfig config;
+ private RootNode rootNode;
+
public RenameFieldConditionChecker(RenameFieldConfig config) {
super(config.getDocProvider(), config);
}
@@ -61,7 +65,7 @@
this.config = (RenameFieldConfig) configObj;
config.setDocProvider(new DocumentWithIncluding(config.getDocProvider()));
- Node rootNode = config.getDocProvider().getActiveFileRootNode();
+ rootNode = config.getDocProvider().getActiveFileRootNode();
try {
ClassNodeWrapper enclosingClassNode = SelectionNodeProvider.getSelectedClassNode(rootNode, config.getCaretPosition());
@@ -102,7 +106,7 @@
private Collection<FieldItem> getInstVarAccesses() {
ArrayList<FieldItem> fieldCallNodes = new ArrayList<FieldItem>();
- Collection<Node> allNodes = config.getDocProvider().getAllNodes();
+ Collection<Node> allNodes = NodeProvider.getAllNodes(rootNode);
for (Node currentNode : allNodes) {
if (isPossibleCall(currentNode)) {
fieldCallNodes.add(new FieldCallItem((CallNode) currentNode));
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/documentprovider/DocumentProvider.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/documentprovider/DocumentProvider.java 2007-03-06 12:56:24 UTC (rev 2093)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/documentprovider/DocumentProvider.java 2007-03-06 13:48:05 UTC (rev 2094)
@@ -30,6 +30,7 @@
package org.rubypeople.rdt.refactoring.documentprovider;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.Map;
@@ -67,7 +68,12 @@
}
public Collection<Node> getAllNodes() {
- return NodeProvider.getAllNodes(getActiveFileRootNode());
+ ArrayList<Node> allNodes = new ArrayList<Node>();
+
+ for(String currentFileName : getFileNames()){
+ allNodes.addAll(getAllNodes(currentFileName));
+ }
+ return allNodes;
}
public Collection<Node> getAllNodes(String fileName){
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/documentprovider/DocumentWithIncluding.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/documentprovider/DocumentWithIncluding.java 2007-03-06 12:56:24 UTC (rev 2093)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/documentprovider/DocumentWithIncluding.java 2007-03-06 13:48:05 UTC (rev 2094)
@@ -33,7 +33,6 @@
import java.util.HashSet;
import org.jruby.ast.FCallNode;
-import org.jruby.ast.Node;
import org.jruby.ast.RootNode;
import org.jruby.ast.StrNode;
import org.jruby.lexer.yacc.SyntaxException;
@@ -149,14 +148,4 @@
private boolean isStrNode(FCallNode node) {
return node.getArgsNode().childNodes().iterator().next() instanceof StrNode;
}
-
- @Override
- public Collection<Node> getAllNodes() {
- ArrayList<Node> allNodes = new ArrayList<Node>();
-
- for(String currentFileName : getFileNames()){
- allNodes.addAll(getAllNodes(currentFileName));
- }
- return allNodes;
- }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cal...@us...> - 2007-03-06 12:56:36
|
Revision: 2093
http://svn.sourceforge.net/rubyeclipse/?rev=2093&view=rev
Author: callandor1983
Date: 2007-03-06 04:56:24 -0800 (Tue, 06 Mar 2007)
Log Message:
-----------
PushDown tests fixed
Modified Paths:
--------------
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/pushdown/push_down_test_3.test_project_source_0.rb
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/pushdown/push_down_test_4.test_project_source_0.rb
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/pushdown/push_down_test_4.test_project_source_1.rb
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/pushdown/TC_MethodDownPusherTreeTest.java
Modified: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/pushdown/push_down_test_3.test_project_source_0.rb
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/pushdown/push_down_test_3.test_project_source_0.rb 2007-03-06 09:27:49 UTC (rev 2092)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/pushdown/push_down_test_3.test_project_source_0.rb 2007-03-06 12:56:24 UTC (rev 2093)
@@ -1,2 +1,4 @@
+require "push_down_test_3"
+
class A < X
end
\ No newline at end of file
Modified: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/pushdown/push_down_test_4.test_project_source_0.rb
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/pushdown/push_down_test_4.test_project_source_0.rb 2007-03-06 09:27:49 UTC (rev 2092)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/pushdown/push_down_test_4.test_project_source_0.rb 2007-03-06 12:56:24 UTC (rev 2093)
@@ -1,2 +1,4 @@
+require "push_down_test_4"
+
class A < X
end
\ No newline at end of file
Modified: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/pushdown/push_down_test_4.test_project_source_1.rb
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/pushdown/push_down_test_4.test_project_source_1.rb 2007-03-06 09:27:49 UTC (rev 2092)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/pushdown/push_down_test_4.test_project_source_1.rb 2007-03-06 12:56:24 UTC (rev 2093)
@@ -1,2 +1,4 @@
+require "push_down_test_4"
+
class B < X
end
\ No newline at end of file
Modified: trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/pushdown/TC_MethodDownPusherTreeTest.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/pushdown/TC_MethodDownPusherTreeTest.java 2007-03-06 09:27:49 UTC (rev 2092)
+++ trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/pushdown/TC_MethodDownPusherTreeTest.java 2007-03-06 12:56:24 UTC (rev 2093)
@@ -61,10 +61,12 @@
" end\n" +
"end";
- private final static String DOCUMENT_A_EXTENDS_X = "class A < X\n" +
+ private final static String DOCUMENT_A_EXTENDS_X = "require \"DOCUMENT_X.rb\"\n" +
+ "class A < X\n" +
"end";
- private final static String DOCUMENT_B_EXTENDS_X = "class B < X\n" +
+ private final static String DOCUMENT_B_EXTENDS_X = "require \"DOCUMENT_X.rb\"\n" +
+ "class B < X\n" +
"end";
private final static String DOCUMENT_X = "class X\n" +
@@ -91,17 +93,17 @@
public void testTwoDocumentPushDown()
{
addContent(new String[]{"X", "method"});
- StringDocumentProvider docProvider = new StringDocumentProvider("push_down_test_testTwoDocumentPushDown.rb", DOCUMENT_X);
- docProvider.addFile("DOCUMENT_A_EXTENDS_X", DOCUMENT_A_EXTENDS_X);
+ StringDocumentProvider docProvider = new StringDocumentProvider("DOCUMENT_X.rb", DOCUMENT_X);
+ docProvider.addFile("DOCUMENT_A_EXTENDS_X.rb", DOCUMENT_A_EXTENDS_X);
validate(new MethodDownPusher(docProvider));
}
public void testTreeDocumentPushDown()
{
addContent(new String[]{"X", "method"});
- StringDocumentProvider docProvider = new StringDocumentProvider("push_down_test_testTreeDocumentPushDown.rb", DOCUMENT_X);
- docProvider.addFile("DOCUMENT_A_EXTENDS_X", DOCUMENT_A_EXTENDS_X);
- docProvider.addFile("DOCUMENT_B_EXTENDS_X", DOCUMENT_B_EXTENDS_X);
+ StringDocumentProvider docProvider = new StringDocumentProvider("DOCUMENT_X.rb", DOCUMENT_X);
+ docProvider.addFile("DOCUMENT_A_EXTENDS_X.rb", DOCUMENT_A_EXTENDS_X);
+ docProvider.addFile("DOCUMENT_B_EXTENDS_X.rb", DOCUMENT_B_EXTENDS_X);
validate(new MethodDownPusher(docProvider));
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cal...@us...> - 2007-03-06 09:27:53
|
Revision: 2092
http://svn.sourceforge.net/rubyeclipse/?rev=2092&view=rev
Author: callandor1983
Date: 2007-03-06 01:27:49 -0800 (Tue, 06 Mar 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/pushdown/MethodDownPusher.java
Modified: 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/MethodDownPusher.java 2007-03-05 16:57:05 UTC (rev 2091)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/pushdown/MethodDownPusher.java 2007-03-06 09:27:49 UTC (rev 2092)
@@ -32,8 +32,10 @@
import java.util.Arrays;
import java.util.Collection;
+import org.rubypeople.rdt.refactoring.classnodeprovider.AllFilesClassNodeProvider;
import org.rubypeople.rdt.refactoring.classnodeprovider.ClassNodeProvider;
import org.rubypeople.rdt.refactoring.documentprovider.DocumentProvider;
+import org.rubypeople.rdt.refactoring.documentprovider.DocumentWithIncluding;
import org.rubypeople.rdt.refactoring.editprovider.DeleteEditProvider;
import org.rubypeople.rdt.refactoring.editprovider.EditAndTreeContentProvider;
import org.rubypeople.rdt.refactoring.editprovider.EditProvider;
@@ -54,7 +56,7 @@
private ClassNodeProvider classNodeProvider;
public MethodDownPusher(DocumentProvider documentProvider) {
- this.projectClassNodeProvider = documentProvider.getProjectClassNodeProvider();
+ this.projectClassNodeProvider = new AllFilesClassNodeProvider(new DocumentWithIncluding(documentProvider));
this.classNodeProvider = documentProvider.getClassNodeProvider();
initTreeClasses(classNodeProvider);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-03-05 16:57:10
|
Revision: 2091
http://svn.sourceforge.net/rubyeclipse/?rev=2091&view=rev
Author: cawilliams
Date: 2007-03-05 08:57:05 -0800 (Mon, 05 Mar 2007)
Log Message:
-----------
add 0.9.0 RC1 release info
Added Paths:
-----------
trunk/org.rubypeople.rdt.pluginbuilder/releases/0.9.0RC1.properties
Added: trunk/org.rubypeople.rdt.pluginbuilder/releases/0.9.0RC1.properties
===================================================================
--- trunk/org.rubypeople.rdt.pluginbuilder/releases/0.9.0RC1.properties (rev 0)
+++ trunk/org.rubypeople.rdt.pluginbuilder/releases/0.9.0RC1.properties 2007-03-05 16:57:05 UTC (rev 2091)
@@ -0,0 +1,7 @@
+#Written from Plug-in Builder Editor
+#Mon Mar 05 11:38:44 EST 2007
+buildType=S
+version=0.9.0
+version.qualifier=200703051037
+fetchTag=2088
+buildTypePresentation=RC1
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-03-05 16:56:20
|
Revision: 2090
http://svn.sourceforge.net/rubyeclipse/?rev=2090&view=rev
Author: cawilliams
Date: 2007-03-05 08:56:19 -0800 (Mon, 05 Mar 2007)
Log Message:
-----------
add loadpath for ruby stuff
Added Paths:
-----------
trunk/org.rubypeople.rdt.launching/.loadpath
trunk/org.rubypeople.rdt.refactoring.tests/.loadpath
trunk/org.rubypeople.rdt.testunit/.loadpath
Added: trunk/org.rubypeople.rdt.launching/.loadpath
===================================================================
--- trunk/org.rubypeople.rdt.launching/.loadpath (rev 0)
+++ trunk/org.rubypeople.rdt.launching/.loadpath 2007-03-05 16:56:19 UTC (rev 2090)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<loadpath>
+ <pathentry path="" type="src"/>
+ <pathentry path="org.rubypeople.rdt.launching.RUBY_CONTAINER" type="con"/>
+</loadpath>
Added: trunk/org.rubypeople.rdt.refactoring.tests/.loadpath
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/.loadpath (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring.tests/.loadpath 2007-03-05 16:56:19 UTC (rev 2090)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<loadpath>
+ <pathentry path="" type="src"/>
+ <pathentry path="org.rubypeople.rdt.launching.RUBY_CONTAINER" type="con"/>
+</loadpath>
Added: trunk/org.rubypeople.rdt.testunit/.loadpath
===================================================================
--- trunk/org.rubypeople.rdt.testunit/.loadpath (rev 0)
+++ trunk/org.rubypeople.rdt.testunit/.loadpath 2007-03-05 16:56:19 UTC (rev 2090)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<loadpath>
+ <pathentry path="" type="src"/>
+ <pathentry path="org.rubypeople.rdt.launching.RUBY_CONTAINER" type="con"/>
+</loadpath>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-03-05 16:56:05
|
Revision: 2089
http://svn.sourceforge.net/rubyeclipse/?rev=2089&view=rev
Author: cawilliams
Date: 2007-03-05 08:56:00 -0800 (Mon, 05 Mar 2007)
Log Message:
-----------
add ruby nature
Modified Paths:
--------------
trunk/org.rubypeople.rdt.testunit/.project
Modified: trunk/org.rubypeople.rdt.testunit/.project
===================================================================
--- trunk/org.rubypeople.rdt.testunit/.project 2007-03-05 15:25:15 UTC (rev 2088)
+++ trunk/org.rubypeople.rdt.testunit/.project 2007-03-05 16:56:00 UTC (rev 2089)
@@ -6,6 +6,11 @@
</projects>
<buildSpec>
<buildCommand>
+ <name>org.rubypeople.rdt.core.rubybuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
@@ -24,5 +29,6 @@
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.rubypeople.rdt.core.rubynature</nature>
</natures>
</projectDescription>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-03-05 15:25:16
|
Revision: 2088
http://svn.sourceforge.net/rubyeclipse/?rev=2088&view=rev
Author: cawilliams
Date: 2007-03-05 07:25:15 -0800 (Mon, 05 Mar 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser/RubyParser.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser/RubyParser.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser/RubyParser.java 2007-03-05 14:44:11 UTC (rev 2087)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser/RubyParser.java 2007-03-05 15:25:15 UTC (rev 2088)
@@ -16,9 +16,11 @@
import java.io.Reader;
import java.io.StringReader;
import java.io.UnsupportedEncodingException;
+import java.util.List;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
+import org.jruby.ast.CommentNode;
import org.jruby.ast.Node;
import org.jruby.common.NullWarnings;
import org.jruby.lexer.yacc.LexerSource;
@@ -38,6 +40,7 @@
private final RubyParserPool pool;
private IRdtWarnings warnings;
private static boolean isDebug;
+ private RubyParserResult result;
public RubyParser() {
this(new NullRdtWarnings());
@@ -50,7 +53,7 @@
public Node parse(IFile file, Reader content) {
DefaultRubyParser parser = null;
- RubyParserResult result = null;
+ result = null;
try {
warnings.setFile(file);
parser = getDefaultRubyParser();
@@ -66,6 +69,10 @@
}
return result.getAST();
}
+
+ public List<CommentNode> getComments() {
+ return result.getCommentNodes();
+ }
protected void returnBorrowedParser(DefaultRubyParser parser) {
pool.returnParser(parser);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cal...@us...> - 2007-03-05 14:44:13
|
Revision: 2087
http://svn.sourceforge.net/rubyeclipse/?rev=2087&view=rev
Author: callandor1983
Date: 2007-03-05 06:44:11 -0800 (Mon, 05 Mar 2007)
Log Message:
-----------
Modified Paths:
--------------
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/renamefield/FieldProvider.java
Added Paths:
-----------
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_28.result.rb
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_28.source.rb
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_28.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/renamefield/rename_field_test_26.activeFile.rb.result
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/renamefield/rename_field_test_26.activeFile.rb.source
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/renamefield/rename_field_test_26.test_properties
Modified: 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/ExtractMethodConditionChecker.java 2007-03-05 14:37:31 UTC (rev 2086)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/extractmethod/ExtractMethodConditionChecker.java 2007-03-05 14:44:11 UTC (rev 2087)
@@ -35,7 +35,6 @@
import org.jruby.ast.ArgsNode;
import org.jruby.ast.ArgumentNode;
import org.jruby.ast.ArrayNode;
-import org.jruby.ast.BlockNode;
import org.jruby.ast.BreakNode;
import org.jruby.ast.CaseNode;
import org.jruby.ast.ClassNode;
Modified: 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/FieldProvider.java 2007-03-05 14:37:31 UTC (rev 2086)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamefield/FieldProvider.java 2007-03-05 14:44:11 UTC (rev 2087)
@@ -137,7 +137,12 @@
for (FCallNode accessorPart : currentAccessor.getAccessorNodes()) {
ArrayNode arrayNode = (ArrayNode) accessorPart.getArgsNode();
- itemList.add(new AttrFieldItem((SymbolNode) arrayNode.get(0)));
+ for(Object actObj : arrayNode.childNodes()) {
+ SymbolNode aktSymbol = (SymbolNode) actObj;
+ if(name.equals(aktSymbol.getName())) {
+ itemList.add(new AttrFieldItem(aktSymbol));
+ }
+ }
}
}
}
Added: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_28.result.rb
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_28.result.rb (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_28.result.rb 2007-03-05 14:44:11 UTC (rev 2087)
@@ -0,0 +1,8 @@
+def methode
+ replace_br
+ replace(doc, 'img') {|img| img.attributes['alt'] || ""}
+end
+
+def replace_br
+ replace(doc, 'br') {|br| "\n"}
+end
Added: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_28.source.rb
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_28.source.rb (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_28.source.rb 2007-03-05 14:44:11 UTC (rev 2087)
@@ -0,0 +1,4 @@
+def methode
+ replace(doc, 'br') {|br| "\n"}
+ replace(doc, 'img') {|img| img.attributes['alt'] || ""}
+end
Added: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_28.test_properties
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_28.test_properties (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_28.test_properties 2007-03-05 14:44:11 UTC (rev 2087)
@@ -0,0 +1,4 @@
+start=14
+end=45
+name=replace_br
+visibility=none
\ No newline at end of file
Added: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/renamefield/rename_field_test_26.activeFile.rb.result
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/renamefield/rename_field_test_26.activeFile.rb.result (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/renamefield/rename_field_test_26.activeFile.rb.result 2007-03-05 14:44:11 UTC (rev 2087)
@@ -0,0 +1,7 @@
+class Message
+ attr_reader :title, :content, :time, :id, :from
+
+ def initialize(params)
+ @content = strip_html params[:body] || params[:url] || ""
+ end
+end
\ No newline at end of file
Added: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/renamefield/rename_field_test_26.activeFile.rb.source
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/renamefield/rename_field_test_26.activeFile.rb.source (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/renamefield/rename_field_test_26.activeFile.rb.source 2007-03-05 14:44:11 UTC (rev 2087)
@@ -0,0 +1,7 @@
+class Message
+ attr_reader :title, :body, :time, :id, :from
+
+ def initialize(params)
+ @body = strip_html(params[:body] || params[:url] || "")
+ end
+end
\ No newline at end of file
Added: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/renamefield/rename_field_test_26.test_properties
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/renamefield/rename_field_test_26.test_properties (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/renamefield/rename_field_test_26.test_properties 2007-03-05 14:44:11 UTC (rev 2087)
@@ -0,0 +1,4 @@
+activeFile=activeFile.rb
+destinationFiles=
+caretPosition=95
+newName=content
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-03-05 14:37:39
|
Revision: 2086
http://svn.sourceforge.net/rubyeclipse/?rev=2086&view=rev
Author: cawilliams
Date: 2007-03-05 06:37:31 -0800 (Mon, 05 Mar 2007)
Log Message:
-----------
try to fix tests I broke when I added default vm args to sync stdout and stderr
Modified Paths:
--------------
trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RubyRuntime.java
trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java
Modified: trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RubyRuntime.java
===================================================================
--- trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RubyRuntime.java 2007-03-05 12:12:25 UTC (rev 2085)
+++ trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RubyRuntime.java 2007-03-05 14:37:31 UTC (rev 2086)
@@ -157,7 +157,7 @@
xml.append(name);
xml.append("\" path=\"");
xml.append(location.toOSString());
- xml.append("\">\r\n");
+ xml.append("\" vmargs=\"-e STDOUT.sync=true -e STDERR.sync=true -e load(ARGV.shift)\">\r\n");
xml.append("<libraryLocations>\r\n");
xml.append("<libraryLocation src=\"");
xml.append(location.toPortableString());
Modified: trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java
===================================================================
--- trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java 2007-03-05 12:12:25 UTC (rev 2085)
+++ trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java 2007-03-05 14:37:31 UTC (rev 2086)
@@ -83,6 +83,7 @@
buffer.append(new Path(interpreter.getInstallLocation().getAbsolutePath()).append("bin").append("ruby").toOSString());
buffer.append("\" ");
buffer.append(INTERPRETER_ARGUMENTS);
+ buffer.append(" -e STDOUT.sync=true -e STDERR.sync=true -e load(ARGV.shift)");
buffer.append(" -I \"");
buffer.append(project.getLocation().toOSString());
buffer.append("\"");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 2085
http://svn.sourceforge.net/rubyeclipse/?rev=2085&view=rev
Author: mirkostocker
Date: 2007-03-05 04:12:25 -0800 (Mon, 05 Mar 2007)
Log Message:
-----------
oops, forgot to commit in the tests plugin..
Modified Paths:
--------------
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/generateaccessors/TC_AccessorsGeneratorTreeTest.java
Modified: trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/generateaccessors/TC_AccessorsGeneratorTreeTest.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/generateaccessors/TC_AccessorsGeneratorTreeTest.java 2007-03-05 11:53:49 UTC (rev 2084)
+++ trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/generateaccessors/TC_AccessorsGeneratorTreeTest.java 2007-03-05 12:12:25 UTC (rev 2085)
@@ -34,7 +34,6 @@
import org.rubypeople.rdt.refactoring.core.generateaccessors.AccessorsGenerator;
import org.rubypeople.rdt.refactoring.core.generateaccessors.GeneratedAccessor;
-import org.rubypeople.rdt.refactoring.core.generateaccessors.AccessorsGenerator.TreeClass.TreeAttribute.TreeAccessor;
import org.rubypeople.rdt.refactoring.documentprovider.DocumentProvider;
import org.rubypeople.rdt.refactoring.documentprovider.StringDocumentProvider;
import org.rubypeople.rdt.refactoring.tests.TreeProviderTester;
@@ -125,14 +124,14 @@
public void testDocumentWithSimpleWriter()
{
- addContent(new String[]{"X", "a", TreeAccessor.READER});
+ addContent(new String[]{"X", "a", AccessorsGenerator.READER});
DocumentProvider docProvider = new StringDocumentProvider("generate_accessor_test_testDocumentWithSimpleWriter.rb", TEST_DOCUMENT_WITH_SIMPLE_WRITER);
validate(new AccessorsGenerator(docProvider, GeneratedAccessor.TYPE_SIMPLE_ACCESSOR));
}
public void testDocumentWithMethodReader()
{
- addContent(new String[]{"X", "a", TreeAccessor.WRITER});
+ addContent(new String[]{"X", "a", AccessorsGenerator.WRITER});
DocumentProvider docProvider = new StringDocumentProvider("generate_accessor_test_testDocumentWithMethodReader.rb", TEST_DOCUMENT_WITH_METHOD_READER);
validate(new AccessorsGenerator(docProvider, GeneratedAccessor.TYPE_METHOD_ACCESSOR));
}
@@ -141,8 +140,8 @@
private void addContentWithBothAccessors(String[] content)
{
- addContent(addToArray(content, TreeAccessor.READER));
- addContent(addToArray(content, TreeAccessor.WRITER));
+ addContent(addToArray(content, AccessorsGenerator.READER));
+ addContent(addToArray(content, AccessorsGenerator.WRITER));
}
private String[] addToArray(String[] content, String additionalContent)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mir...@us...> - 2007-03-05 11:54:03
|
Revision: 2084
http://svn.sourceforge.net/rubyeclipse/?rev=2084&view=rev
Author: mirkostocker
Date: 2007-03-05 03:53:49 -0800 (Mon, 05 Mar 2007)
Log Message:
-----------
externalized all refactoring strings
Modified Paths:
--------------
trunk/org.rubypeople.rdt.refactoring/plugin.xml
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/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/classnodeprovider/IncludedClassesProvider.java
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/SelectionNodeProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/TextSelectionProvider.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/TempToFieldConditionChecker.java
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/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/ExtractMethodConditionChecker.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/ExtractedMethodHelper.java
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/FormatSourceRefactoring.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/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/generateconstructor/GenerateConstructorRefactoring.java
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/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/inlinemethod/InlineMethodConditionChecker.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/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/TargetClassFinder.java
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/TempInliner.java
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/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/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/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/MoveFieldRefactoring.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/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/MoveMethodRefactoring.java
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/OverrideMethodRefactoring.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/PushDownRefactoring.java
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/RenameRefactoring.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/RenameClassConditionChecker.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/FieldProvider.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/RenameFieldRefactoring.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/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/RenameLocalConditionChecker.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamelocalvariable/RenameLocalConfig.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/VariableNameProvider.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/RenameMethodRefactoring.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/SplitTempRefactoring.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/WorkspaceDocumentProvider.java
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/MultiEditProvider.java
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/FieldNodeWrapper.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/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/preview/RubyTextEditChangePreviewViewer.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/ConstructorGenerationTree.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/pages/AccessorSelectionPage.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/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/OccurenceReplaceSelectionPage.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/EncapsulateFieldAccessorComposite.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/MethodNameListener.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/TargetClassFinderUI.java
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/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
Added Paths:
-----------
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/converttemptofield/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/converttemptofield/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/encapsulatefield/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/encapsulatefield/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/extractmethod/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/extractmethod/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/formatsource/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/formatsource/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/generateaccessors/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/generateaccessors/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/generateconstructor/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/generateconstructor/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlineclass/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlineclass/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinetemp/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinetemp/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/mergeclasspartsinfile/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/mergeclasspartsinfile/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/mergewithexternalclassparts/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/mergewithexternalclassparts/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/movefield/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/movefield/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/movemethod/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/movemethod/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/overridemethod/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/overridemethod/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/pushdown/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/pushdown/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/rename/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/rename/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renameclass/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renameclass/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamefield/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamefield/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamelocalvariable/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamelocalvariable/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamemethod/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/renamemethod/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/splittemp/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/splittemp/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/editprovider/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/editprovider/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/nodewrapper/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/nodewrapper/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/preview/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/preview/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/encapsulatefield/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/encapsulatefield/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/extractmethod/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/extractmethod/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/inlinemethod/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/inlinemethod/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/movemethod/Messages.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/movemethod/messages.properties
Modified: trunk/org.rubypeople.rdt.refactoring/plugin.xml
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/plugin.xml 2007-03-05 09:29:26 UTC (rev 2083)
+++ trunk/org.rubypeople.rdt.refactoring/plugin.xml 2007-03-05 11:53:49 UTC (rev 2084)
@@ -70,43 +70,8 @@
id="org.rubypeople.rdt.refactoring.renameAction"
label="%rubyRefactoring.RenameLabel"
menubarPath="org.rubypeople.rdt.refactoring.refactoringMenu/org.rubypeople.rdt.refactoring.refactoringGroup"
- style="push"
tooltip="Renames the selected element..."/>
-<!-- old renames
<action
- class="org.rubypeople.rdt.refactoring.action.RenameMethodAction"
- definitionId="org.rubypeople.rdt.refactoring.command.RenameMethod"
- id="org.rubypeople.rdt.refactoring.renameMethodAction"
- label="%rubyRefactoring.RenameMethodLabel"
- menubarPath="org.rubypeople.rdt.refactoring.refactoringMenu/org.rubypeople.rdt.refactoring.refactoringGroup"
- style="push"
- tooltip="Renames a method."/>
- <action
- class="org.rubypeople.rdt.refactoring.action.RenameLocalVariableAction"
- definitionId="org.rubypeople.rdt.refactoring.command.RenameLocalVariable"
- id="org.rubypeople.rdt.refactoring.renameLocalVariableAction"
- label="%rubyRefactoring.RenameLocalVariableLabel"
- menubarPath="org.rubypeople.rdt.refactoring.refactoringMenu/org.rubypeople.rdt.refactoring.refactoringGroup"
- style="push"
- tooltip="Renames a local variable"/>
- <action
- class="org.rubypeople.rdt.refactoring.action.RenameFieldAction"
- definitionId="org.rubypeople.rdt.refactoring.command.RenameField"
- id="org.rubypeople.rdt.refactoring.renameFieldAction"
- label="%rubyRefactoring.RenameFieldLabel"
- menubarPath="org.rubypeople.rdt.refactoring.refactoringMenu/org.rubypeople.rdt.refactoring.refactoringGroup"
- style="push"
- tooltip="Renames a field."/>
- <action
- class="org.rubypeople.rdt.refactoring.action.RenameClassAction"
- definitionId="org.rubypeople.rdt.refactoring.command.RenameClass"
- id="org.rubypeople.rdt.refactoring.renameClassAction"
- label="%rubyRefactoring.RenameClassLabel"
- menubarPath="org.rubypeople.rdt.refactoring.refactoringMenu/org.rubypeople.rdt.refactoring.refactoringGroup"
- style="push"
- tooltip="Renames a class."/>
--->
- <action
class="org.rubypeople.rdt.refactoring.action.PushDownAction"
definitionId="org.rubypeople.rdt.refactoring.command.PushDown"
id="org.rubypeople.rdt.refactoring.pushDownAction"
@@ -224,26 +189,8 @@
categoryId="org.rubypeople.rdt.refactoring.commands.refactoring"
id="org.rubypeople.rdt.refactoring.command.Rename"
name="%rubyRefactoring.RenameLabel"/>
-<!-- old renames
<command
categoryId="org.rubypeople.rdt.refactoring.commands.refactoring"
- id="org.rubypeople.rdt.refactoring.command.RenameLocalVariable"
- name="%rubyRefactoring.RenameLocalVariableLabel"/>
- <command
- categoryId="org.rubypeople.rdt.refactoring.commands.refactoring"
- id="org.rubypeople.rdt.refactoring.command.RenameField"
- name="%rubyRefactoring.RenameFieldLabel"/>
- <command
- categoryId="org.rubypeople.rdt.refactoring.commands.refactoring"
- id="org.rubypeople.rdt.refactoring.command.RenameClass"
- name="%rubyRefactoring.RenameClassLabel"/>
- <command
- categoryId="org.rubypeople.rdt.refactoring.commands.refactoring"
- id="org.rubypeople.rdt.refactoring.command.RenameMethod"
- name="%rubyRefactoring.RenameMethodLabel"/>
--->
- <command
- categoryId="org.rubypeople.rdt.refactoring.commands.refactoring"
id="org.rubypeople.rdt.refactoring.command.SplitTemp"
name="%rubyRefactoring.SplitTempLabel"/>
<command
@@ -329,28 +276,6 @@
contextId="org.rubypeople.rdt.ui.rubyEditorScope"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
sequence="M2+M3+R"/>
-<!-- Old Renames
- <key
- commandId="org.rubypeople.rdt.refactoring.command.RenameClass"
- contextId="org.rubypeople.rdt.ui.rubyEditorScope"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M2+M3+R C"/>
- <key
- commandId="org.rubypeople.rdt.refactoring.command.RenameField"
- contextId="org.rubypeople.rdt.ui.rubyEditorScope"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M2+M3+R F"/>
- <key
- commandId="org.rubypeople.rdt.refactoring.command.RenameLocalVariable"
- contextId="org.rubypeople.rdt.ui.rubyEditorScope"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M2+M3+R L"/>
- <key
- commandId="org.rubypeople.rdt.refactoring.command.RenameMethod"
- contextId="org.rubypeople.rdt.ui.rubyEditorScope"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M2+M3+R M"/>
--->
</extension>
<extension
point="org.eclipse.ui.popupMenus">
@@ -373,6 +298,21 @@
id="org.rubypeople.rdt.refactoring.action.SplitTempAction"
label="%rubyRefactoring.SplitTempLabel"
menubarPath="additions" />
+ <action
+ class="org.rubypeople.rdt.refactoring.action.RenameAction"
+ id="org.rubypeople.rdt.refactoring.action.RenameAction"
+ label="%rubyRefactoring.RenameLabel"
+ menubarPath="additions" />
+ </objectContribution>
+
+ <objectContribution
+ id="org.rubypeople.rdt.refactoring.refactoringContext"
+ objectClass="org.rubypeople.rdt.internal.core.RubyType">
+ <action
+ class="org.rubypeople.rdt.refactoring.action.RenameAction"
+ id="org.rubypeople.rdt.refactoring.action.RenameAction"
+ label="%rubyRefactoring.RenameLabel"
+ menubarPath="additions" />
</objectContribution>
<objectContribution
@@ -388,6 +328,11 @@
id="org.rubypeople.rdt.refactoring.action.MoveFieldAction"
label="%rubyRefactoring.MoveFieldLabel"
menubarPath="additions" />
+ <action
+ class="org.rubypeople.rdt.refactoring.action.RenameAction"
+ id="org.rubypeople.rdt.refactoring.action.RenameAction"
+ label="%rubyRefactoring.RenameLabel"
+ menubarPath="additions" />
</objectContribution>
<objectContribution
@@ -403,6 +348,11 @@
id="org.rubypeople.rdt.refactoring.action.MoveFieldAction"
label="%rubyRefactoring.MoveFieldLabel"
menubarPath="additions" />
+ <action
+ class="org.rubypeople.rdt.refactoring.action.RenameAction"
+ id="org.rubypeople.rdt.refactoring.action.RenameAction"
+ label="%rubyRefactoring.RenameLabel"
+ menubarPath="additions" />
</objectContribution>
<objectContribution
@@ -413,6 +363,11 @@
id="org.rubypeople.rdt.refactoring.action.MoveMethodAction"
label="%rubyRefactoring.MoveMethodLabel"
menubarPath="additions" />
+ <action
+ class="org.rubypeople.rdt.refactoring.action.RenameAction"
+ id="org.rubypeople.rdt.refactoring.action.RenameAction"
+ label="%rubyRefactoring.RenameLabel"
+ menubarPath="additions" />
</objectContribution>
</extension>
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/JRubyRefactoringUtils.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/JRubyRefactoringUtils.java 2007-03-05 09:29:26 UTC (rev 2083)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/JRubyRefactoringUtils.java 2007-03-05 11:53:49 UTC (rev 2084)
@@ -72,8 +72,8 @@
String name = ((CallNode) node).getName();
- String[] operators = new String[] { "**", "!", "+", "-", "*", "/", "%", ">>", "<<", "&", "^", "|", "+@", "-@", "<=>", ">", "<", ">=", "<=", "==",
- "===", "~", "&&" };
+ String[] operators = new String[] { "**", "!", "+", "-", "*", "/", "%", ">>", "<<", "&", "^", "|", "+@", "-@", "<=>", ">", "<", ">=", "<=", "==", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$ //$NON-NLS-13$ //$NON-NLS-14$ //$NON-NLS-15$ //$NON-NLS-16$ //$NON-NLS-17$ //$NON-NLS-18$ //$NON-NLS-19$ //$NON-NLS-20$
+ "===", "~", "&&" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
for (String currentOp : operators) {
if (name.equals(currentOp)) {
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/RefactoringPlugin.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/RefactoringPlugin.java 2007-03-05 09:29:26 UTC (rev 2083)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/RefactoringPlugin.java 2007-03-05 11:53:49 UTC (rev 2084)
@@ -80,7 +80,7 @@
* @return the image descriptor
*/
public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin("org.rubypeople.rdt.refactoring", path);
+ return AbstractUIPlugin.imageDescriptorFromPlugin("org.rubypeople.rdt.refactoring", path); //$NON-NLS-1$
}
public static Ruby getRuby() {
Added: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/Messages.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/Messages.java (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/Messages.java 2007-03-05 11:53:49 UTC (rev 2084)
@@ -0,0 +1,18 @@
+package org.rubypeople.rdt.refactoring.action;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.rubypeople.rdt.refactoring.action.messages"; //$NON-NLS-1$
+
+ public static String RefactoringActionGroup;
+
+ public static String SourceActionGroup;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/RefactoringAction.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/RefactoringAction.java 2007-03-05 09:29:26 UTC (rev 2083)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/RefactoringAction.java 2007-03-05 11:53:49 UTC (rev 2084)
@@ -45,7 +45,7 @@
private TextSelectionProvider selectionProvider;
public RefactoringAction(Class<? extends RubyRefactoring> refactoringClass, String refactoringName, TextSelectionProvider selectionProvider) {
- setText(refactoringName + "...");
+ setText(refactoringName + "..."); //$NON-NLS-1$
this.refactoringClass = refactoringClass;
this.selectionProvider = selectionProvider;
}
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/RefactoringActionGroup.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/RefactoringActionGroup.java 2007-03-05 09:29:26 UTC (rev 2083)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/RefactoringActionGroup.java 2007-03-05 11:53:49 UTC (rev 2084)
@@ -52,7 +52,7 @@
public class RefactoringActionGroup extends ActionGroup {
- private static final String INSERT_AFTER_GROUP_NAME = "group.edit";
+ private static final String INSERT_AFTER_GROUP_NAME = "group.edit"; //$NON-NLS-1$
public void fillContextMenu(IMenuManager menu) {
TextSelectionProvider selectionProvider = new TextSelectionProvider(null);
@@ -63,7 +63,7 @@
}
private IMenuManager getRefactorMenu(TextSelectionProvider selectionProvider) {
- IMenuManager submenu = new MenuManager("Refactor");
+ IMenuManager submenu = new MenuManager(Messages.SourceActionGroup);
submenu.add(new RefactoringAction(ConvertTempToFieldRefactoring.class, ConvertTempToFieldRefactoring.NAME, selectionProvider));
submenu.add(new RefactoringAction(EncapsulateFieldRefactoring.class, EncapsulateFieldRefactoring.NAME, selectionProvider));
submenu.add(new RefactoringAction(ExtractMethodRefactoring.class, ExtractMethodRefactoring.NAME, selectionProvider));
@@ -81,7 +81,7 @@
}
private IMenuManager getSourceMenu(TextSelectionProvider selectionProvider) {
- IMenuManager submenu = new MenuManager("Source");
+ IMenuManager submenu = new MenuManager(Messages.RefactoringActionGroup);
submenu.add(new RefactoringAction(GenerateAccessorsRefactoring.class, GenerateAccessorsRefactoring.NAME, selectionProvider));
submenu.add(new RefactoringAction(GenerateConstructorRefactoring.class, GenerateConstructorRefactoring.NAME, selectionProvider));
submenu.add(new RefactoringAction(OverrideMethodRefactoring.class, OverrideMethodRefactoring.NAME, selectionProvider));
Added: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/messages.properties
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/messages.properties (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/action/messages.properties 2007-03-05 11:53:49 UTC (rev 2084)
@@ -0,0 +1,2 @@
+RefactoringActionGroup=Refactor
+SourceActionGroup=Source
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/classnodeprovider/IncludedClassesProvider.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/classnodeprovider/IncludedClassesProvider.java 2007-03-05 09:29:26 UTC (rev 2083)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/classnodeprovider/IncludedClassesProvider.java 2007-03-05 11:53:49 UTC (rev 2084)
@@ -86,9 +86,9 @@
private void appendPath(String pathName) {
IPath path = new Path(pathName);
if (path.getFileExtension() == null)
- path = path.addFileExtension("rb");
- if (!path.getFileExtension().equalsIgnoreCase("rb"))
- path = path.addFileExtension("rb");
+ path = path.addFileExtension("rb"); //$NON-NLS-1$
+ if (!path.getFileExtension().equalsIgnoreCase("rb")) //$NON-NLS-1$
+ path = path.addFileExtension("rb"); //$NON-NLS-1$
includeFilePaths.add(path);
}
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/FieldProvider.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/FieldProvider.java 2007-03-05 09:29:26 UTC (rev 2083)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/FieldProvider.java 2007-03-05 11:53:49 UTC (rev 2084)
@@ -96,9 +96,6 @@
else if (currentAttr instanceof InstAsgnNode){
addInstAsgn((InstAsgnNode)currentAttr);
}
- else{
- System.out.println("An unexpected node of type " + currentAttr.getClass() + " retrieved as an Attribute: " + currentAttr.toString());
- }
}
}
@@ -115,7 +112,7 @@
public static String fieldName(String name) {
- return name.replaceAll("@|:", "");
+ return name.replaceAll("@|:", ""); //$NON-NLS-1$ //$NON-NLS-2$
}
private void addInstVar(InstVarNode currentAttr) {
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/FormatWithParenthesis.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/FormatWithParenthesis.java 2007-03-05 09:29:26 UTC (rev 2083)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/FormatWithParenthesis.java 2007-03-05 11:53:49 UTC (rev 2084)
@@ -7,10 +7,10 @@
public class FormatWithParenthesis extends DefaultFormatHelper {
public String beforeCallArguments() {
- return "(";
+ return "("; //$NON-NLS-1$
}
public String afterCallArguments() {
- return ")";
+ return ")"; //$NON-NLS-1$
}
}
\ No newline at end of file
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/IRefactoringConditionChecker.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/IRefactoringConditionChecker.java 2007-03-05 09:29:26 UTC (rev 2083)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/IRefactoringConditionChecker.java 2007-03-05 11:53:49 UTC (rev 2084)
@@ -35,9 +35,9 @@
public interface IRefactoringConditionChecker {
- public static final String ERRORS = "errors";
+ public static final String ERRORS = "errors"; //$NON-NLS-1$
- public static final String WARNING = "warnings";
+ public static final String WARNING = "warnings"; //$NON-NLS-1$
public Map<String, Collection<String>> getInitialMessages();
Added: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/Messages.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/Messages.java (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/Messages.java 2007-03-05 11:53:49 UTC (rev 2084)
@@ -0,0 +1,20 @@
+package org.rubypeople.rdt.refactoring.core;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.rubypeople.rdt.refactoring.core.messages"; //$NON-NLS-1$
+
+ public static String RefactoringConditionChecker_EmptyDocument;
+
+ public static String RefactoringConditionChecker_SyntaxErrorInCurrent;
+
+ public static String RefactoringConditionChecker_SyntaxErrorInProject;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/NodeFactory.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/NodeFactory.java 2007-03-05 09:29:26 UTC (rev 2083)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/NodeFactory.java 2007-03-05 11:53:49 UTC (rev 2084)
@@ -89,7 +89,7 @@
}
public static DefsNode createStaticMethodNode(String methodName, Collection<String> args, StaticScope scopeNode, Node body) {
- return createStaticMethodNode("self", methodName, createArgsNode(args.toArray(new String[args.size()])), scopeNode == null ? new LocalStaticScope(null) : scopeNode, body);
+ return createStaticMethodNode("self", methodName, createArgsNode(args.toArray(new String[args.size()])), scopeNode == null ? new LocalStaticScope(null) : scopeNode, body); //$NON-NLS-1$
}
public static DefnNode createMethodNode(String methodName, String[] args, Node scopeContentNode) {
@@ -300,7 +300,7 @@
}
public static Node createGetterSetter(String attrName, boolean isWriterMethod, VisibilityNodeWrapper.METHOD_VISIBILITY visibility) {
- String methodName = attrName + ((isWriterMethod) ? "=" : "");
+ String methodName = attrName + ((isWriterMethod) ? "=" : ""); //$NON-NLS-1$ //$NON-NLS-2$
String[] args = (isWriterMethod) ? new String[] { attrName } : new String[] {};
DefnNode methodNode = createGetterSetterNode(isWriterMethod, methodName, attrName, args);
BlockNode block = createBlockNode();
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/NodeProvider.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/NodeProvider.java 2007-03-05 09:29:26 UTC (rev 2083)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/NodeProvider.java 2007-03-05 11:53:49 UTC (rev 2084)
@@ -137,7 +137,7 @@
Collection<Node> fCallNodes = getSubNodes(parent, FCallNode.class);
for (Node node : fCallNodes) {
FCallNode fCallNode = (FCallNode) node;
- if (fCallNode.getName().equals("attr")) {
+ if (fCallNode.getName().equals("attr")) { //$NON-NLS-1$
result.addAll(getSubNodes(fCallNode.getArgsNode(), SymbolNode.class));
}
}
@@ -324,7 +324,7 @@
}
private static boolean isLoadOrRequireNode(FCallNode fCallNode) {
- return fCallNode.getName().equalsIgnoreCase("load") || fCallNode.getName().equalsIgnoreCase("require");
+ return fCallNode.getName().equalsIgnoreCase("load") || fCallNode.getName().equalsIgnoreCase("require"); //$NON-NLS-1$ //$NON-NLS-2$
}
public static Collection<LocalAsgnNode> gatherLocalAsgnNodes(Node baseNode) {
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/RefactoringConditionChecker.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/RefactoringConditionChecker.java 2007-03-05 09:29:26 UTC (rev 2083)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/RefactoringConditionChecker.java 2007-03-05 11:53:49 UTC (rev 2084)
@@ -78,7 +78,7 @@
}
}
if (syntaxError) {
- addWarning("There is a syntax error somewhere in the project, the refactoring might not work on these files.");
+ addWarning(Messages.RefactoringConditionChecker_SyntaxErrorInProject);
}
}
@@ -105,8 +105,8 @@
String fileName = null;
try {
fileName = docProvider.getActiveFileName();
- if(docProvider.getActiveFileContent().equals("")) {
- addError("Nothing to do in empty document.");
+ if(docProvider.getActiveFileContent().equals("")) { //$NON-NLS-1$
+ addError(Messages.RefactoringConditionChecker_EmptyDocument);
}
for(String aktFileName : docProvider.getFileNames()) {
fileName = aktFileName;
@@ -115,12 +115,12 @@
} catch(SyntaxException se) {
String activeFileName = docProvider.getActiveFileName();
if(fileName == null || fileName.equals(activeFileName)) {
- addError("There is a syntax error in the current file, refactoring is not possible.");
+ addError(Messages.RefactoringConditionChecker_SyntaxErrorInCurrent);
}
}
if(NodeProvider.hasSyntaxErrors(docProvider.getActiveFileName(), docProvider.getActiveFileContent())) {
- addError("There is a syntax error in the current file, refactoring is not possible.");
+ addError(Messages.RefactoringConditionChecker_SyntaxErrorInCurrent);
}
}
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/SelectionNodeProvider.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/SelectionNodeProvider.java 2007-03-05 09:29:26 UTC (rev 2083)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/SelectionNodeProvider.java 2007-03-05 11:53:49 UTC (rev 2084)
@@ -236,8 +236,8 @@
Vector<String> names = new Vector<String>();
names.setSize(nodes.size() + 2);
- names.set(0, "_");
- names.set(1, "~");
+ names.set(0, "_"); //$NON-NLS-1$
+ names.set(1, "~"); //$NON-NLS-1$
for (LocalAsgnNode n : nodes) {
if(n.getIndex() >= names.size()) {
names.setSize(n.getIndex() + 1);
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/TextSelectionProvider.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/TextSelectionProvider.java 2007-03-05 09:29:26 UTC (rev 2083)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/TextSelectionProvider.java 2007-03-05 11:53:49 UTC (rev 2084)
@@ -45,7 +45,7 @@
private int caret;
- @SuppressWarnings("restriction")
+ @SuppressWarnings("restriction") //$NON-NLS-1$
public TextSelectionProvider(IAction action) {
if (action == null || action instanceof org.eclipse.ui.internal.EditorPluginAction) {
@@ -66,7 +66,7 @@
caret = editor.getCaretPosition().getOffset();
}
- @SuppressWarnings("restriction")
+ @SuppressWarnings("restriction") //$NON-NLS-1$
private void initOutline(IAction action) {
TreeSelection selection = (TreeSelection) ((org.eclipse.ui.internal.PluginAction)action).getSelection();
Member member = (Member) selection.toArray()[0];
Modified: 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/Conversion.java 2007-03-05 09:29:26 UTC (rev 2083)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/converttemptofield/Conversion.java 2007-03-05 11:53:49 UTC (rev 2084)
@@ -44,7 +44,7 @@
public Conversion(LocalNodeWrapper localNode, String newName, boolean isClassField) {
super(false);
this.localNode = localNode;
- newName = ((isClassField) ? "@@" : "@") + newName;
+ newName = ((isClassField) ? "@@" : "@") + newName; //$NON-NLS-1$ //$NON-NLS-2$
Collection<LocalNodeWrapper> allLocalNodes = new ArrayList<LocalNodeWrapper>();
allLocalNodes.add(localNode);
allLocalNodes.addAll(LocalNodeWrapper.gatherLocalNodes(localNode.getWrappedNode()));
Modified: 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/ConvertTempToFieldRefactoring.java 2007-03-05 09:29:26 UTC (rev 2083)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/converttemptofield/ConvertTempToFieldRefactoring.java 2007-03-05 11:53:49 UTC (rev 2084)
@@ -35,7 +35,7 @@
public class ConvertTempToFieldRefactoring extends RubyRefactoring {
- public static final String NAME = "Convert Local Variable to Field";
+ public static final String NAME = Messages.ConvertTempToFieldRefactoring_Name;
public ConvertTempToFieldRefactoring(TextSelectionProvider selectionProvider) {
super(NAME);
Added: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/converttemptofield/Messages.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/converttemptofield/Messages.java (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/converttemptofield/Messages.java 2007-03-05 11:53:49 UTC (rev 2084)
@@ -0,0 +1,30 @@
+package org.rubypeople.rdt.refactoring.core.converttemptofield;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.rubypeople.rdt.refactoring.core.converttemptofield.messages"; //$NON-NLS-1$
+
+ public static String ConvertTempToFieldRefactoring_Name;
+
+ public static String TempToFieldConditionChecker_AlreadyExists;
+
+ public static String TempToFieldConditionChecker_CannotConvertBlockParameters;
+
+ public static String TempToFieldConditionChecker_CannotConvertMethodParameters;
+
+ public static String TempToFieldConditionChecker_CannotConvertNonlocalVars;
+
+ public static String TempToFieldConditionChecker_FieldWithName;
+
+ public static String TempToFieldConditionChecker_NoEnclosingClassToInsert;
+
+ public static String TempToFieldConditionChecker_NoLocalVarAtpos;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Modified: 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/TempToFieldConditionChecker.java 2007-03-05 09:29:26 UTC (rev 2083)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/converttemptofield/TempToFieldConditionChecker.java 2007-03-05 11:53:49 UTC (rev 2084)
@@ -83,7 +83,7 @@
@Override
public void checkFinalConditions() {
- String fieldTypeName = (config.isClassField()) ? "Class" : "Instance";
+ String fieldTypeName = (config.isClassField()) ? "Class" : "Instance"; //$NON-NLS-1$ //$NON-NLS-2$
for(FieldNodeWrapper aktField : config.getEnclosingClassNode().getFields()) {
if(checkFieldName(config.getNewName(), aktField.getNameWithoutAts(), fieldTypeName)) {
return;
@@ -93,7 +93,7 @@
private boolean checkFieldName(String newName, String aktNodeName, String fieldTypeName) {
if (newName.equals(aktNodeName)) {
- addError(fieldTypeName + " field with name '" + newName + "' already exists.");
+ addError(fieldTypeName + Messages.TempToFieldConditionChecker_FieldWithName + newName + Messages.TempToFieldConditionChecker_AlreadyExists);
return true;
}
return false;
@@ -103,15 +103,15 @@
public void checkInitialConditions() {
if (config.getSelectedNode() == null) {
- addError("There is no local variable at the current caret position.");
+ addError(Messages.TempToFieldConditionChecker_NoLocalVarAtpos);
} else if (config.getEnclosingClassNode() == null) {
- addError("There is no enclosing class to insert fields.");
+ addError(Messages.TempToFieldConditionChecker_NoEnclosingClassToInsert);
} else if (config.getEnclosingMethod() == null) {
- addError("Can only convert local variables in methods to fields.");
+ addError(Messages.TempToFieldConditionChecker_CannotConvertNonlocalVars);
} else if (JRubyRefactoringUtils.isParameter(LocalNodeWrapper.getLocalNodeName(config.getSelectedNode()), config.getEnclosingMethod())) {
- addError("Cannot convert method parameters to fields.");
+ addError(Messages.TempToFieldConditionChecker_CannotConvertMethodParameters);
} else if (isIterParameter()) {
- addError("Cannot convert block parameters to fields.");
+ addError(Messages.TempToFieldConditionChecker_CannotConvertBlockParameters);
}
}
Added: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/converttemptofield/messages.properties
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/converttemptofield/messages.properties (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/converttemptofield/messages.properties 2007-03-05 11:53:49 UTC (rev 2084)
@@ -0,0 +1,8 @@
+ConvertTempToFieldRefactoring_Name=Convert Local Variable to Field
+TempToFieldConditionChecker_FieldWithName=\ field with name '
+TempToFieldConditionChecker_AlreadyExists=' already exists.
+TempToFieldConditionChecker_NoLocalVarAtpos=There is no local variable at the current caret position.
+TempToFieldConditionChecker_NoEnclosingClassToInsert=There is no enclosing class to insert fields.
+TempToFieldConditionChecker_CannotConvertNonlocalVars=Can only convert local variables in methods to fields.
+TempToFieldConditionChecker_CannotConvertMethodParameters=Cannot convert method parameters to fields.
+TempToFieldConditionChecker_CannotConvertBlockParameters=Cannot convert block parameters to fields.
Modified: 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/EncapsulateFieldConditionChecker.java 2007-03-05 09:29:26 UTC (rev 2083)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/encapsulatefield/EncapsulateFieldConditionChecker.java 2007-03-05 11:53:49 UTC (rev 2084)
@@ -76,27 +76,27 @@
public void checkFinalConditions() {
if (config.isWriterGenerationDisabled() && config.isReaderGenerationDisabled()) {
- addError("Nothing to refactor.");
+ addError(Messages.EncapsulateFieldConditionChecker_NothingToRefactor);
}
String readerMethodName = config.getReaderMethodName();
String writerMethodName = config.getWriterMethodName();
for (MethodNodeWrapper aktMethodNode : config.getEnclosingClassNode().getMethods()) {
if (aktMethodNode.getName().equals(readerMethodName) && !config.isReaderGenerationDisabled()) {
- addWarning("A method with the name \"" + aktMethodNode.getName() + "\" allready exists.");
+ addWarning(Messages.EncapsulateFieldConditionChecker_MethodWithName + aktMethodNode.getName() + Messages.EncapsulateFieldConditionChecker_AlreadyExists);
}
if (aktMethodNode.getName().equals(writerMethodName) && !config.isWriterGenerationDisabled()) {
- addWarning("A method with the name \"" + aktMethodNode.getName() + "\" allready exists.");
+ addWarning(Messages.EncapsulateFieldConditionChecker_MethodWithName + aktMethodNode.getName() + Messages.EncapsulateFieldConditionChecker_AlreadyExists);
}
}
}
public void checkInitialConditions() {
if (!config.hasSelectedAccessor() && !config.hasSelectedInstNode()) {
- addError("No instance variable selected for encapsulation.");
+ addError(Messages.EncapsulateFieldConditionChecker_NoInstanceVariableSelected);
} else if (config.getEnclosingClassNode() == null) {
- addError("Curent selection is not inside of a class.");
+ addError(Messages.EncapsulateFieldConditionChecker_NotInsideAClass);
} else if (selectedNodeIsInstVarNodeAndNotInMethod()) {
- addError("Selected field must be inside a method.");
+ addError(Messages.EncapsulateFieldConditionChecker_NotInsideAMethod);
}
}
Modified: 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/EncapsulateFieldRefactoring.java 2007-03-05 09:29:26 UTC (rev 2083)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/encapsulatefield/EncapsulateFieldRefactoring.java 2007-03-05 11:53:49 UTC (rev 2084)
@@ -36,7 +36,7 @@
public class EncapsulateFieldRefactoring extends RubyRefactoring {
- public static final String NAME = "Encapsulate Field";
+ public static final String NAME = Messages.EncapsulateFieldRefactoring_Name;
public EncapsulateFieldRefactoring(TextSelectionProvider selectionProvider) {
super(NAME);
Modified: 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/encapsulatefield/FieldEncapsulator.java 2007-03-05 09:29:26 UTC (rev 2083)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/encapsulatefield/FieldEncapsulator.java 2007-03-05 11:53:49 UTC (rev 2084)
@@ -114,7 +114,7 @@
...
[truncated message content] |
|
From: <cal...@us...> - 2007-03-05 09:29:27
|
Revision: 2083
http://svn.sourceforge.net/rubyeclipse/?rev=2083&view=rev
Author: callandor1983
Date: 2007-03-05 01:29:26 -0800 (Mon, 05 Mar 2007)
Log Message:
-----------
JRuby updated to head (contains position-fixes).
Modified Paths:
--------------
trunk/org.jruby/src.zip
Modified: trunk/org.jruby/src.zip
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cal...@us...> - 2007-03-05 09:00:02
|
Revision: 2082
http://svn.sourceforge.net/rubyeclipse/?rev=2082&view=rev
Author: callandor1983
Date: 2007-03-05 00:59:46 -0800 (Mon, 05 Mar 2007)
Log Message:
-----------
JRuby updated to head (contains position-fixes).
Modified Paths:
--------------
trunk/org.jruby/META-INF/MANIFEST.MF
trunk/org.jruby/lib/jruby.jar
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/ASTUtil.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/RefactoringPlugin.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/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/SelectionNodeProvider.java
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/inlinemethod/TargetClassFinder.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/documentprovider/DocumentWithIncluding.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/util/NodeUtil.java
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_22.result.rb
Added Paths:
-----------
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_23.result.rb
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_23.source.rb
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_23.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_24.result.rb
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_24.source.rb
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_24.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_25.result.rb
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_25.source.rb
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_25.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_26.result.rb
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_26.source.rb
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_26.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_27.result.rb
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_27.source.rb
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_27.test_properties
Removed Paths:
-------------
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/signatureprovider/JRubyClassSignatureProvider.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/util/ArityEvaluator.java
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/util/TC_ArityEvaluator.java
Modified: trunk/org.jruby/META-INF/MANIFEST.MF
===================================================================
--- trunk/org.jruby/META-INF/MANIFEST.MF 2007-03-05 01:24:39 UTC (rev 2081)
+++ trunk/org.jruby/META-INF/MANIFEST.MF 2007-03-05 08:59:46 UTC (rev 2082)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: JRuby Plug-in
Bundle-SymbolicName: org.jruby
-Bundle-Version: 0.9.2.2944
+Bundle-Version: 0.9.2.3129
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.rubypeople.rdt-feature/feature.xml
===================================================================
--- trunk/org.rubypeople.rdt-feature/feature.xml 2007-03-05 01:24:39 UTC (rev 2081)
+++ trunk/org.rubypeople.rdt-feature/feature.xml 2007-03-05 08:59:46 UTC (rev 2082)
@@ -337,7 +337,7 @@
id="org.jruby"
download-size="0"
install-size="0"
- version="0.9.2.2944"
+ version="0.9.2.3129"
unpack="false"/>
<plugin
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-03-05 01:24:39 UTC (rev 2081)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScriptStructureBuilder.java 2007-03-05 08:59:46 UTC (rev 2082)
@@ -696,7 +696,7 @@
*/
public Instruction visitDSymbolNode(DSymbolNode iVisited) {
handleNode(iVisited);
- visitNode(iVisited.getNode());
+ visitIter(iVisited.iterator());
return null;
}
@@ -953,12 +953,12 @@
for (; iter.hasNext();) {
Node mixinNameNode = (Node) iter.next();
if ( mixinNameNode instanceof StrNode ) {
- mixins.add( ((StrNode)mixinNameNode).getValue() );
+ mixins.add( ((StrNode)mixinNameNode).getValue().toString() );
}
if ( mixinNameNode instanceof DStrNode ) {
Node next = (Node)((DStrNode)mixinNameNode).iterator().next();
if ( next instanceof StrNode ) {
- mixins.add( ((StrNode)next).getValue() );
+ mixins.add( ((StrNode)next).getValue().toString() );
}
}
if (mixinNameNode instanceof ConstNode) {
@@ -1006,7 +1006,7 @@
}
if (tmp instanceof StrNode) {
StrNode strNode = (StrNode) tmp;
- return strNode.getValue();
+ return strNode.getValue().toString();
}
return null;
}
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-03-05 01:24:39 UTC (rev 2081)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser/InOrderVisitor.java 2007-03-05 08:59:46 UTC (rev 2082)
@@ -425,7 +425,7 @@
*/
public Instruction visitDSymbolNode(DSymbolNode iVisited) {
handleNode(iVisited);
- acceptNode(iVisited.getNode());
+ visitIter(iVisited.iterator());
return null;
}
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/ASTUtil.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/ASTUtil.java 2007-03-05 01:24:39 UTC (rev 2081)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/ASTUtil.java 2007-03-05 08:59:46 UTC (rev 2082)
@@ -112,7 +112,7 @@
if (node instanceof DStrNode)
return stringRepresentation((DStrNode) node);
if (node instanceof StrNode)
- return ((StrNode) node).getValue();
+ return ((StrNode) node).getValue().toString();
log("Reached node type we don't know how to represent: "
+ node.getClass().getName());
return node.toString();
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/RefactoringPlugin.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/RefactoringPlugin.java 2007-03-05 01:24:39 UTC (rev 2081)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/RefactoringPlugin.java 2007-03-05 08:59:46 UTC (rev 2082)
@@ -30,7 +30,6 @@
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.jruby.IRuby;
import org.jruby.Ruby;
import org.osgi.framework.BundleContext;
@@ -41,7 +40,7 @@
private static RefactoringPlugin plugin;
- private static IRuby ruby;
+ private static Ruby ruby;
/**
* The constructor.
@@ -84,7 +83,7 @@
return AbstractUIPlugin.imageDescriptorFromPlugin("org.rubypeople.rdt.refactoring", path);
}
- public static IRuby getRuby() {
+ public static Ruby getRuby() {
if (ruby == null)
ruby = Ruby.getDefaultInstance();
return ruby;
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/classnodeprovider/IncludedClassesProvider.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/classnodeprovider/IncludedClassesProvider.java 2007-03-05 01:24:39 UTC (rev 2081)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/classnodeprovider/IncludedClassesProvider.java 2007-03-05 08:59:46 UTC (rev 2082)
@@ -77,7 +77,7 @@
for (Object o : arrayNode.childNodes()) {
if (o instanceof StrNode) {
StrNode strNode = (StrNode) o;
- appendPath(strNode.getValue());
+ appendPath(strNode.getValue().toString());
}
}
}
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/NodeFactory.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/NodeFactory.java 2007-03-05 01:24:39 UTC (rev 2081)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/NodeFactory.java 2007-03-05 08:59:46 UTC (rev 2082)
@@ -366,6 +366,6 @@
}
public static Node createConstDeclNode(String name, Node valueNode) {
- return new ConstDeclNode(pos, null, name, valueNode);
+ return new ConstDeclNode(pos, name, null, valueNode);
}
}
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/NodeProvider.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/NodeProvider.java 2007-03-05 01:24:39 UTC (rev 2081)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/NodeProvider.java 2007-03-05 08:59:46 UTC (rev 2082)
@@ -209,15 +209,15 @@
return lastMatch;
}
- public static boolean hasChildNode(Node parent, Class childClass) {
+ public static boolean hasChildNode(Node parent, Class<? extends Node> childClass) {
return getFirstChildNode(parent, childClass) != null;
}
- public static Node getFirstChildNode(Node parent, Class childClass) {
+ public static Node getFirstChildNode(Node parent, Class<? extends Node> childClass) {
Collection<Node> childList = getChildren(parent);
for (Object o : childList) {
Node node = unwrap(o);
- if (node.getClass().isAssignableFrom(childClass))
+ if (childClass.isAssignableFrom(node.getClass()))
return node;
}
return null;
@@ -356,7 +356,7 @@
return candidates;
}
- public static Collection<Node> getSubNodes(Node baseNode, Class<?>... klasses) {
+ public static Collection<Node> getSubNodes(Node baseNode, Class... klasses) {
Collection<Node> allNodes = getAllNodes(baseNode);
Collection<Node> resultNodes = new ArrayList<Node>();
for (Node aktNode : allNodes) {
@@ -367,11 +367,11 @@
return resultNodes;
}
- public static boolean hasSubNodes(Node baseNode, Class<?>... klasses) {
+ public static boolean hasSubNodes(Node baseNode, Class... klasses) {
return !getSubNodes(baseNode, klasses).isEmpty();
}
- public static Node getEnclosingNodeOfType(Node baseNode, Node enclosedNode, Class<? extends Object>... klasses) {
+ public static Node getEnclosingNodeOfType(Node baseNode, Node enclosedNode, Class... klasses) {
return SelectionNodeProvider.getSelectedNodeOfType(baseNode, enclosedNode.getPosition().getStartOffset(), klasses);
}
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/SelectionNodeProvider.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/SelectionNodeProvider.java 2007-03-05 01:24:39 UTC (rev 2081)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/SelectionNodeProvider.java 2007-03-05 08:59:46 UTC (rev 2082)
@@ -138,7 +138,7 @@
return (enclosingPos.getStartOffset() <= enclosedPos.getStartOffset() && enclosingPos.getEndOffset() >= enclosedPos.getEndOffset());
}
- public static Node getEnclosingNode(Node rootNode, SelectionInformation selection, Class<?>... classes) {
+ public static Node getEnclosingNode(Node rootNode, SelectionInformation selection, Class... classes) {
Collection<Node> enclosingNodes = getEnclosingNodes(rootNode, selection, classes);
Node lastNode = null;
Node secondLastNode = null;
@@ -176,7 +176,7 @@
return sameStart && sameEnd && isCallNode && isAsgnNode;
}
- public static Collection<Node> getEnclosingNodes(Node rootNode, SelectionInformation selection, Class<?>... classes) {
+ public static Collection<Node> getEnclosingNodes(Node rootNode, SelectionInformation selection, Class... classes) {
Collection<Node> allNodes = NodeProvider.getAllNodes(rootNode);
Collection<Node> enclosingStartNodes = getSelectedNodesOfType(allNodes, selection.getStartOfSelection(), classes);
Collection<Node> enclosingNodes = new ArrayList<Node>();
@@ -190,11 +190,11 @@
return enclosingNodes;
}
- public static Node getSelectedNodeOfType(Node baseNode, int position, Class<?>... klasses) {
+ public static Node getSelectedNodeOfType(Node baseNode, int position, Class... klasses) {
return getSelectedNodeOfType(NodeProvider.getAllNodes(baseNode), position, klasses);
}
- public static Node getSelectedNodeOfType(Collection<? extends Node> nodes, int position, Class<?>... klasses) {
+ public static Node getSelectedNodeOfType(Collection<? extends Node> nodes, int position, Class... klasses) {
return returnLast(getSelectedNodesOfType(nodes, position, klasses));
}
@@ -214,7 +214,7 @@
return candidate;
}
- public static Collection<Node> getSelectedNodesOfType(Collection<? extends Node> nodes, int position, Class<?>... klasses) {
+ public static Collection<Node> getSelectedNodesOfType(Collection<? extends Node> nodes, int position, Class... klasses) {
ArrayList<Node> candidates = new ArrayList<Node>();
for (Node n : nodes) {
if (nodeContainsPosition(n, position) && !(n instanceof NewlineNode) && NodeUtil.nodeAssignableFrom(n, klasses)) {
@@ -224,7 +224,7 @@
return candidates;
}
- public static Collection<Node> getSelectedNodesOfType(Node baseNode, int position, Class<?>... klasses) {
+ public static Collection<Node> getSelectedNodesOfType(Node baseNode, int position, Class... klasses) {
return getSelectedNodesOfType(NodeProvider.getAllNodes(baseNode), position, klasses);
}
@@ -254,7 +254,7 @@
}
- private static ClassNodeWrapper getSelectedClassNode(Node rootNode, int position, Class<?>... classes) throws NoClassNodeException {
+ private static ClassNodeWrapper getSelectedClassNode(Node rootNode, int position, Class... classes) throws NoClassNodeException {
Node enclosingClassNode = getSelectedNodeOfType(rootNode, position, classes);
PartialClassNodeWrapper partialClassNode = PartialClassNodeWrapper.getPartialClassNodeWrapper(enclosingClassNode, rootNode);
Modified: 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/ExtractMethodConditionChecker.java 2007-03-05 01:24:39 UTC (rev 2081)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/extractmethod/ExtractMethodConditionChecker.java 2007-03-05 08:59:46 UTC (rev 2082)
@@ -35,17 +35,25 @@
import org.jruby.ast.ArgsNode;
import org.jruby.ast.ArgumentNode;
import org.jruby.ast.ArrayNode;
+import org.jruby.ast.BlockNode;
+import org.jruby.ast.BreakNode;
import org.jruby.ast.CaseNode;
import org.jruby.ast.ClassNode;
import org.jruby.ast.DefnNode;
+import org.jruby.ast.ForNode;
+import org.jruby.ast.IterNode;
import org.jruby.ast.MethodDefNode;
import org.jruby.ast.ModuleNode;
import org.jruby.ast.MultipleAsgnNode;
+import org.jruby.ast.NextNode;
import org.jruby.ast.Node;
+import org.jruby.ast.RedoNode;
+import org.jruby.ast.RetryNode;
import org.jruby.ast.RootNode;
import org.jruby.ast.SClassNode;
import org.jruby.ast.SuperNode;
import org.jruby.ast.WhenNode;
+import org.jruby.ast.WhileNode;
import org.jruby.ast.YieldNode;
import org.jruby.ast.ZSuperNode;
import org.rubypeople.rdt.refactoring.core.NodeProvider;
@@ -101,9 +109,13 @@
}
}
+ //Check on loopControlNodes (Break, Redo, Next, Retry)
+ if(containsLoopControlNode(selectedNode)) {
+ selectedNode = getLoopOrItsParent(rootNode, selectedNode);
+ }
+
//Check if content of an ArgsNode is selected
- ArgsNode enclosingArgsNode = (ArgsNode) SelectionNodeProvider.getEnclosingNode(rootNode, config.getSelection(), ArgsNode.class);
- if(enclosingArgsNode != null) {
+ if(SelectionNodeProvider.getEnclosingNode(rootNode, config.getSelection(), ArgsNode.class) != null) {
return SelectionNodeProvider.getEnclosingNode(rootNode, config.getSelection(), MethodDefNode.class);
}
@@ -115,7 +127,7 @@
//check if the selected Nodes are contained in an enclosing arrayNode
//if not the fowllowing checks arent necessary anymore.
ArrayNode enclosingArrayNode = (ArrayNode) SelectionNodeProvider.getEnclosingNode(rootNode, config.getSelection(), ArrayNode.class);
- if(!sectedNodesInArrayNode(enclosingArrayNode, selectedNode)) {
+ if(!sectedNodesInArrayNode(enclosingArrayNode, selectedNode) || !NodeUtil.nodeAssignableFrom(selectedNode, ArrayNode.class)) {
return selectedNode;
}
@@ -139,6 +151,21 @@
return selectedNode;
}
+ private Node getLoopOrItsParent(RootNode rootNode, Node selectedNode) {
+ Node loopNode = NodeProvider.getEnclosingNodeOfType(rootNode, selectedNode, WhileNode.class, ForNode.class, IterNode.class);
+ if(loopNode != null) {
+ selectedNode = loopNode;
+ }
+ if(NodeUtil.nodeAssignableFrom(loopNode, IterNode.class)) {
+ selectedNode = NodeProvider.findParentNode(rootNode, loopNode);
+ }
+ return selectedNode;
+ }
+
+ private boolean containsLoopControlNode(Node selectedNode) {
+ return !NodeProvider.getSubNodes(selectedNode, BreakNode.class, RedoNode.class, NextNode.class, RetryNode.class).isEmpty();
+ }
+
private boolean sectedNodesInArrayNode(ArrayNode arrayNode, Node selectedNode) {
if(arrayNode == null) {
return false;
Modified: 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/inlinemethod/TargetClassFinder.java 2007-03-05 01:24:39 UTC (rev 2081)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/TargetClassFinder.java 2007-03-05 08:59:46 UTC (rev 2082)
@@ -72,7 +72,7 @@
}
private String getSurroundingClass(final MethodCallNodeWrapper call, final DocumentProvider doc) {
- ClassNode classNode = ((ClassNode) NodeProvider.getEnclosingNodeOfType(doc.getActiveFileRootNode(), call.getWrappedNode(), new Class<?>[]{ClassNode.class}));
+ ClassNode classNode = ((ClassNode) NodeProvider.getEnclosingNodeOfType(doc.getActiveFileRootNode(), call.getWrappedNode(), ClassNode.class));
if(classNode != null) {
return classNode.getCPath().getName();
}
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/documentprovider/DocumentWithIncluding.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/documentprovider/DocumentWithIncluding.java 2007-03-05 01:24:39 UTC (rev 2081)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/documentprovider/DocumentWithIncluding.java 2007-03-05 08:59:46 UTC (rev 2082)
@@ -116,7 +116,7 @@
}
private String getRequiredFilename(FCallNode node) {
- return ((StrNode) node.getArgsNode().childNodes().iterator().next()).getValue();
+ return ((StrNode) node.getArgsNode().childNodes().iterator().next()).getValue().toString();
}
private Collection<FCallNode> getRequires(String fileName) {
Deleted: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/signatureprovider/JRubyClassSignatureProvider.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/signatureprovider/JRubyClassSignatureProvider.java 2007-03-05 01:24:39 UTC (rev 2081)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/signatureprovider/JRubyClassSignatureProvider.java 2007-03-05 08:59:46 UTC (rev 2082)
@@ -1,83 +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...>
- *
- * 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.signatureprovider;
-
-import java.util.Map;
-
-import org.jruby.RubyClass;
-import org.jruby.internal.runtime.methods.AbstractMethod;
-import org.rubypeople.rdt.refactoring.util.ArityEvaluator;
-import org.rubypeople.rdt.refactoring.util.Constants;
-
-public class JRubyClassSignatureProvider extends ClassSignatureProvider {
-
- private RubyClass klass;
-
- public JRubyClassSignatureProvider(RubyClass klass) {
- super(getSuperProvider(klass));
- this.klass = klass;
- createMethodSignatures();
- }
-
- private void createMethodSignatures() {
- Map methods = klass.getMethods();
- for (Object o : methods.keySet()) {
- String key = (String) o;
- AbstractMethod method = (AbstractMethod) methods.get(key);
- addMethodSignature(key, method);
- }
- }
-
- private static IClassSignatureProvider getSuperProvider(RubyClass klass) {
- if (klass.getSuperClass() == null)
- return null;
- else if (klass.getSuperClass().getName().equals(Constants.OBJECT_NAME))
- return null;
- else
- return new JRubyClassSignatureProvider(klass.getSuperClass());
- }
-
- public String getClassName() {
- return klass.getName();
- }
-
- @Override
- protected MethodSignature getSignature(String methodName, Object data) {
- AbstractMethod method = (AbstractMethod) data;
- ArityEvaluator arityEvaluator = new ArityEvaluator(getClassName(), methodName);
- boolean isModule = ((klass.isIncluded()));
- int argCount = arityEvaluator.evaluateRequiredArity(method.getArity(), isModule);
-
- return new MethodSignature(methodName, argCount);
- }
-
- public AbstractMethod getMethod(String methodName) {
- return (AbstractMethod) getData(methodName);
- }
-}
Deleted: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/util/ArityEvaluator.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/util/ArityEvaluator.java 2007-03-05 01:24:39 UTC (rev 2081)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/util/ArityEvaluator.java 2007-03-05 08:59:46 UTC (rev 2082)
@@ -1,124 +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...>
- *
- * 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.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.jruby.RubyClass;
-import org.jruby.ast.Node;
-import org.jruby.exceptions.RaiseException;
-import org.jruby.runtime.Arity;
-import org.rubypeople.rdt.refactoring.RefactoringPlugin;
-import org.rubypeople.rdt.refactoring.core.NodeProvider;
-
-public class ArityEvaluator {
-
- private String className;
-
- private String methodName;
-
- public ArityEvaluator(String className, String methodName) {
- this.className = className;
- this.methodName = methodName;
- }
-
- public int evaluateRequiredArity(Arity arity, boolean isModule) {
- int value = arity.getValue();
- if (value >= 0)
- return value;
- if (value < -1)
- return -(1 + value);
- String script;
- if (methodName.equals("initialize")) {
- script = className + ".new";
- return evaluateArity(script, true);
- }
- if (isModule) {
- script = className + '.' + methodName;
- return evaluateArity(script, true);
- }
- int constructorArity = evaluateArity(className + ".new", false);
- String constructorArgs = getDummyArgs(constructorArity);
- script = "x = " + className + ".new" + constructorArgs + "\nx." + methodName;
- return evaluateArity(script, true);
- }
-
- private int evaluateArity(String scriptPart, boolean ignoreExceptions) {
- int arityGuess = 0;
- boolean success = false;
- while (!success) {
- String args = getDummyArgs(arityGuess);
- String script = scriptPart + args;
- String error = getScriptEvaluationError(script, ignoreExceptions);
- if (error.equals(""))
- success = true;
- else {
- int errorGuess = getArityFromError(error);
- if (errorGuess > arityGuess)
- arityGuess = errorGuess;
- else
- arityGuess++;
- }
- }
- return arityGuess;
- }
-
- private String getScriptEvaluationError(String script, boolean ignoreExceptions) {
- Node node = NodeProvider.getRootNode("test", script);
- try {
- RefactoringPlugin.getRuby().eval(node);
- } catch (RaiseException e) {
- RubyClass metaClass = e.getException().getMetaClass();
- if (metaClass.getName().equalsIgnoreCase(Constants.ARGUMENT_ERROR))
- return e.getMessage();
- else if (!ignoreExceptions)
- throw e;
- }
- return "";
- }
-
- private int getArityFromError(String error) {
- Pattern pattern = Pattern.compile("\\(([0-9])+ for ([0-9]+)\\)");
- Matcher matcher = pattern.matcher(error);
- if (!matcher.find())
- return 0;
- return Integer.parseInt(matcher.group(2));
- }
-
- private String getDummyArgs(int argGuess) {
- if (argGuess == 0)
- return "";
- StringBuilder args = new StringBuilder(" ");
- for (int i = 0; i < argGuess; i++)
- args.append("\"\", ");
- return args.substring(0, args.length() - 2);
- }
-
-}
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/util/NodeUtil.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/util/NodeUtil.java 2007-03-05 01:24:39 UTC (rev 2081)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/util/NodeUtil.java 2007-03-05 08:59:46 UTC (rev 2082)
@@ -62,7 +62,7 @@
return null;
}
- public static boolean nodeAssignableFrom(Node n, Class<?>... klasses) {
+ public static boolean nodeAssignableFrom(Node n, Class... klasses) {
if(n == null) {
return false;
}
Modified: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_22.result.rb
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_22.result.rb 2007-03-05 01:24:39 UTC (rev 2081)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_22.result.rb 2007-03-05 08:59:46 UTC (rev 2082)
@@ -1,9 +1,9 @@
def method1 arg0, arg1
- dd
+ method1 dd, 1
i = "asdf"
i += 1
end
def dd
- method1(0, 1)
+ 0
end
\ No newline at end of file
Added: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_23.result.rb
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_23.result.rb (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_23.result.rb 2007-03-05 08:59:46 UTC (rev 2082)
@@ -0,0 +1,9 @@
+def ddd
+
+ for i in [1, 2, 3, 4]
+ p i
+ break
+ end
+end
+
+ddd
\ No newline at end of file
Added: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_23.source.rb
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_23.source.rb (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_23.source.rb 2007-03-05 08:59:46 UTC (rev 2082)
@@ -0,0 +1,4 @@
+for i in [1,2,3,4]
+ p i
+ break
+end
\ No newline at end of file
Added: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_23.test_properties
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_23.test_properties (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_23.test_properties 2007-03-05 08:59:46 UTC (rev 2082)
@@ -0,0 +1,4 @@
+start=29
+end=29
+name=ddd
+visibility=none
\ No newline at end of file
Added: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_24.result.rb
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_24.result.rb (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_24.result.rb 2007-03-05 08:59:46 UTC (rev 2082)
@@ -0,0 +1,10 @@
+def ddd
+
+ for i in [1, 2, 3, 4]
+ p i
+ break
+ p i
+ end
+end
+
+ddd
\ No newline at end of file
Added: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_24.source.rb
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_24.source.rb (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_24.source.rb 2007-03-05 08:59:46 UTC (rev 2082)
@@ -0,0 +1,5 @@
+for i in [1,2,3,4]
+ p i
+ break
+ p i
+end
\ No newline at end of file
Added: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_24.test_properties
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_24.test_properties (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_24.test_properties 2007-03-05 08:59:46 UTC (rev 2082)
@@ -0,0 +1,4 @@
+start=21
+end=38
+name=ddd
+visibility=none
\ No newline at end of file
Added: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_25.result.rb
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_25.result.rb (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_25.result.rb 2007-03-05 08:59:46 UTC (rev 2082)
@@ -0,0 +1,7 @@
+def ddd
+ loop do
+ redo
+ end
+end
+
+ddd
\ No newline at end of file
Added: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_25.source.rb
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_25.source.rb (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_25.source.rb 2007-03-05 08:59:46 UTC (rev 2082)
@@ -0,0 +1,3 @@
+loop do
+ redo
+end
\ No newline at end of file
Added: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_25.test_properties
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_25.test_properties (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_25.test_properties 2007-03-05 08:59:46 UTC (rev 2082)
@@ -0,0 +1,4 @@
+start=13
+end=13
+name=ddd
+visibility=none
\ No newline at end of file
Added: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_26.result.rb
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_26.result.rb (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_26.result.rb 2007-03-05 08:59:46 UTC (rev 2082)
@@ -0,0 +1,7 @@
+def dd
+ while line = gets
+ next
+ end
+end
+
+dd
\ No newline at end of file
Added: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_26.source.rb
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_26.source.rb (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_26.source.rb 2007-03-05 08:59:46 UTC (rev 2082)
@@ -0,0 +1,3 @@
+while line = gets
+ next
+end
\ No newline at end of file
Added: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_26.test_properties
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_26.test_properties (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_26.test_properties 2007-03-05 08:59:46 UTC (rev 2082)
@@ -0,0 +1,4 @@
+start=21
+end=22
+name=dd
+visibility=none
\ No newline at end of file
Added: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_27.result.rb
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_27.result.rb (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_27.result.rb 2007-03-05 08:59:46 UTC (rev 2082)
@@ -0,0 +1,8 @@
+def ddd
+ [1, 2, 3].each do |i|
+ puts i
+ retry
+ end
+end
+
+ddd
\ No newline at end of file
Added: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_27.source.rb
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_27.source.rb (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_27.source.rb 2007-03-05 08:59:46 UTC (rev 2082)
@@ -0,0 +1,4 @@
+[1,2,3].each do |i|
+ puts i
+ retry
+end
\ No newline at end of file
Added: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_27.test_properties
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_27.test_properties (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/extractmethod/extract_method_test_27.test_properties 2007-03-05 08:59:46 UTC (rev 2082)
@@ -0,0 +1,4 @@
+start=32
+end=32
+name=ddd
+visibility=none
\ No newline at end of file
Deleted: trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/util/TC_ArityEvaluator.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/util/TC_ArityEvaluator.java 2007-03-05 01:24:39 UTC (rev 2081)
+++ trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/util/TC_ArityEvaluator.java 2007-03-05 08:59:46 UTC (rev 2082)
@@ -1,90 +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...>
- *
- * 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 junit.framework.TestCase;
-
-import org.jruby.internal.runtime.methods.AbstractMethod;
-import org.jruby.runtime.Arity;
-import org.rubypeople.rdt.refactoring.RefactoringPlugin;
-import org.rubypeople.rdt.refactoring.signatureprovider.JRubyClassSignatureProvider;
-import org.rubypeople.rdt.refactoring.util.ArityEvaluator;
-import org.rubypeople.rdt.refactoring.util.Constants;
-
-public class TC_ArityEvaluator extends TestCase
-{
-
- public void testClassString()
- {
- check("String", Constants.CONSTRUCTOR_NAME, 0);
- }
-
- public void testClassDir()
- {
- check("Dir", Constants.CONSTRUCTOR_NAME, 1);
- }
-
- public void testClassHash()
- {
- check("Hash", Constants.CONSTRUCTOR_NAME, 0);
- }
-
- public void testClassRange()
- {
- check("Range", Constants.CONSTRUCTOR_NAME, 2);
- }
-
- public void testClassFile()
- {
- check("File", Constants.CONSTRUCTOR_NAME, 1);
- }
-
- private void check(String className, String methodName, int expectedValue)
- {
- ArityEvaluator arityEvaluator = new ArityEvaluator(className,
- methodName);
- Arity arity = getArity(className, methodName);
- assertEquals(expectedValue, arityEvaluator.evaluateRequiredArity(arity,
- isModule(className)));
- }
-
- private boolean isModule(String className)
- {
- return RefactoringPlugin.getRuby().getClass(className).isIncluded();
- }
-
- private Arity getArity(String className, String methodName)
- {
- JRubyClassSignatureProvider signatureProvider = new JRubyClassSignatureProvider(
- RefactoringPlugin.getRuby().getClass(className));
- AbstractMethod method = signatureProvider.getMethod(methodName);
- assertNotNull(method);
- return method.getArity();
- }
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-03-05 01:24:56
|
Revision: 2081
http://svn.sourceforge.net/rubyeclipse/?rev=2081&view=rev
Author: cawilliams
Date: 2007-03-04 17:24:39 -0800 (Sun, 04 Mar 2007)
Log Message:
-----------
add vm arguments to launches to sync STDOUT and STDERR which throws many people off. This is sort of experimental - RadRails does this, but I don't know if it has some unintended consequences....
Modified Paths:
--------------
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVM.java
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVM.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVM.java 2007-03-04 20:11:41 UTC (rev 2080)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVM.java 2007-03-05 01:24:39 UTC (rev 2081)
@@ -167,4 +167,14 @@
}
return null;
}
+
+
+ @Override
+ public String getVMArgs() {
+ String vmArgs = super.getVMArgs();
+ if (vmArgs == null) vmArgs = "";
+ else vmArgs += " ";
+ vmArgs += "-e STDOUT.sync=true -e STDERR.sync=true -e load(ARGV.shift)";
+ return vmArgs;
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-03-04 20:11:43
|
Revision: 2080
http://svn.sourceforge.net/rubyeclipse/?rev=2080&view=rev
Author: cawilliams
Date: 2007-03-04 12:11:41 -0800 (Sun, 04 Mar 2007)
Log Message:
-----------
rename property
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/formatter/ProfileStore.java
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/formatter/ProfileStore.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/formatter/ProfileStore.java 2007-03-03 19:34:33 UTC (rev 2079)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/formatter/ProfileStore.java 2007-03-04 20:11:41 UTC (rev 2080)
@@ -122,12 +122,12 @@
/**
* Preference key where all profiles are stored
*/
- private static final String PREF_FORMATTER_PROFILES= "org.eclipse.jdt.ui.formatterprofiles"; //$NON-NLS-1$
+ private static final String PREF_FORMATTER_PROFILES= "org.rubypeople.rdt.ui.formatterprofiles"; //$NON-NLS-1$
/**
* Preference key where all profiles are stored
*/
- private static final String PREF_FORMATTER_PROFILES_VERSION= "org.eclipse.jdt.ui.formatterprofiles.version"; //$NON-NLS-1$
+ private static final String PREF_FORMATTER_PROFILES_VERSION= "org.rubypeople.rdt.ui.formatterprofiles.version"; //$NON-NLS-1$
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-03-03 19:34:35
|
Revision: 2079
http://svn.sourceforge.net/rubyeclipse/?rev=2079&view=rev
Author: cawilliams
Date: 2007-03-03 11:34:33 -0800 (Sat, 03 Mar 2007)
Log Message:
-----------
apply initial patch to hook our syntax coloring to the JRuby lexer
Modified Paths:
--------------
branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyPlugin.java
branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/IRubyColorConstants.java
branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/RubyPartitionScanner.java
branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/text/RubySourceViewerConfiguration.java
branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/text/RubyTextTools.java
Added Paths:
-----------
branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/AbstractRubyTokenScanner.java
branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/RubyTokenScanner.java
Removed Paths:
-------------
branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/HereDocPatternRule.java
branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/PercentSyntaxRule.java
branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/CharacterRule.java
branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/RubyCodeScanner.java
branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/RubyNumberRule.java
branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/SingleCharacterPrefixRule.java
branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/SingleTokenRubyCodeScanner.java
branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/SymbolRule.java
Modified: branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyPlugin.java
===================================================================
--- branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyPlugin.java 2007-03-03 19:18:22 UTC (rev 2078)
+++ branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyPlugin.java 2007-03-03 19:34:33 UTC (rev 2079)
@@ -284,7 +284,11 @@
store.setDefault(RUBY_DEFAULT + PreferenceConstants.EDITOR_ITALIC_SUFFIX, false);
PreferenceConverter.setDefault(store, RUBY_KEYWORD, new RGB(164, 53, 122));
store.setDefault(RUBY_KEYWORD + PreferenceConstants.EDITOR_BOLD_SUFFIX, true);
- store.setDefault(RUBY_KEYWORD + PreferenceConstants.EDITOR_ITALIC_SUFFIX, false);
+ store.setDefault(RUBY_KEYWORD + PreferenceConstants.EDITOR_ITALIC_SUFFIX, false);
+ PreferenceConverter.setDefault(store, RUBY_ERROR, new RGB(255, 255, 255));
+ store.setDefault(RUBY_ERROR + PreferenceConstants.EDITOR_BOLD_SUFFIX, true);
+ store.setDefault(RUBY_ERROR + PreferenceConstants.EDITOR_ITALIC_SUFFIX, false);
+ PreferenceConverter.setDefault(store, RUBY_ERROR + PreferenceConstants.EDITOR_BG_SUFFIX, new RGB(255, 0, 0));
PreferenceConverter.setDefault(store, RUBY_STRING, new RGB(42, 0, 255));
store.setDefault(RUBY_STRING + PreferenceConstants.EDITOR_BOLD_SUFFIX, false);
store.setDefault(RUBY_STRING + PreferenceConstants.EDITOR_ITALIC_SUFFIX, false);
Deleted: branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/HereDocPatternRule.java
===================================================================
--- branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/HereDocPatternRule.java 2007-03-03 19:18:22 UTC (rev 2078)
+++ branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/HereDocPatternRule.java 2007-03-03 19:34:33 UTC (rev 2079)
@@ -1,96 +0,0 @@
-package org.rubypeople.rdt.internal.ui.text;
-
-import org.eclipse.jface.text.rules.ICharacterScanner;
-import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.PatternRule;
-
-public class HereDocPatternRule extends PatternRule {
-
- public HereDocPatternRule(IToken token) {
- // TODO: escape char OK?
- // FIXME We need to only handle exact cases, not <<=
-
- // Correct cases:
- // (http://www.zenspider.com/Languages/Ruby/QuickRef.html#8)
- // <<identifier - interpolated, goes until identifier
- // <<"identifier" - same thing
- // <<'identifier' - no interpolation
- // <<-identifier - you can indent the identifier by using "-" in front
- super("<<", "", token, (char) -1, false, false);
- }
-
- protected boolean endSequenceDetected(ICharacterScanner scanner) {
- char firstChar = (char) scanner.read();
-
- if (Character.isWhitespace(firstChar)) { return false; }
-
- boolean indentedKeyword = false;
- if (firstChar == '-') {
- indentedKeyword = true;
- firstChar = (char) scanner.read();
- }
- boolean isQuoted = false;
- char quote = ' ';
- if (firstChar == '\'' || firstChar == '"') {
- isQuoted = true;
- quote = firstChar;
- firstChar = (char) scanner.read();
- }
- String keyword = readKeyword(scanner, firstChar);
- if (keyword.length() == 0) { return false; }
- if (isQuoted && !(keyword.charAt(keyword.length() - 1) == quote)) { return false; }
- if (isQuoted) {
- fEndSequence = removeEndQuote(keyword).toCharArray();
- } else {
- fEndSequence = keyword.toCharArray();
- }
- boolean result = super.endSequenceDetected(scanner);
- if (!result) { return false; }
-
- if(indentedKeyword) {
- rewindToBeginOfLine(scanner);
- char lastChar;
- do {
- lastChar = (char) scanner.read();
- }
- while(Character.isWhitespace(lastChar));
-
- String newKeyword = readKeyword(scanner, lastChar);
-
- if(isQuoted)
- return removeEndQuote(keyword).equals(newKeyword);
- else
- return keyword.equals(newKeyword);
-
- } else {
- return scanner.getColumn() == fEndSequence.length;
- }
- }
-
- private String removeEndQuote(String keyword) {
- return keyword.substring(0, keyword.length() - 1);
- }
-
- private void rewindToBeginOfLine(ICharacterScanner scanner) {
- char readChar = 0;
- while (readChar != '\n') {
- scanner.unread();
- scanner.unread();
- readChar = (char) scanner.read();
- }
- }
-
- private String readKeyword(ICharacterScanner scanner, char firstChar) {
- String keyword = "";
- char c = firstChar;
- do {
- if ((byte) c == ICharacterScanner.EOF || Character.isWhitespace(c)) {
- break;
- }
- keyword += c;
- c = (char) scanner.read();
- } while (true);
- return keyword;
- }
-
-}
Modified: branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/IRubyColorConstants.java
===================================================================
--- branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/IRubyColorConstants.java 2007-03-03 19:18:22 UTC (rev 2078)
+++ branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/IRubyColorConstants.java 2007-03-03 19:34:33 UTC (rev 2079)
@@ -4,6 +4,7 @@
public static final String RUBY_COLOR_PREFIX = "color_ruby_";
public static final String RUBY_DEFAULT = RUBY_COLOR_PREFIX + "default";
public static final String RUBY_KEYWORD = RUBY_COLOR_PREFIX + "keyword";
+ public static final String RUBY_ERROR = RUBY_COLOR_PREFIX + "error";
public static final String RUBY_STRING = RUBY_COLOR_PREFIX + "string";
public static final String RUBY_REGEXP = RUBY_COLOR_PREFIX + "regexp";
public static final String RUBY_COMMAND = RUBY_COLOR_PREFIX + "command";
Deleted: branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/PercentSyntaxRule.java
===================================================================
--- branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/PercentSyntaxRule.java 2007-03-03 19:18:22 UTC (rev 2078)
+++ branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/PercentSyntaxRule.java 2007-03-03 19:34:33 UTC (rev 2079)
@@ -1,127 +0,0 @@
-package org.rubypeople.rdt.internal.ui.text;
-
-import org.eclipse.jface.text.rules.ICharacterScanner;
-import org.eclipse.jface.text.rules.IRule;
-import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.Token;
-
-public class PercentSyntaxRule implements IRule {
-
- public IToken evaluate(ICharacterScanner scanner) {
- int c = scanner.read();
- if (((char) c) == '%') {
- c = scanner.read(); // get next char
- switch ((char) c) {
- case 'r': // regular expression
- return detectToken(scanner, IRubyPartitions.RUBY_REGEX);
- case 'x': // commands
- return detectToken(scanner, IRubyPartitions.RUBY_COMMAND);
- case 'q':
- case 'Q': // strings
- return detectToken(scanner, IRubyPartitions.RUBY_STRING);
- case 'w':
- case 'W': // Array of strings
- scanner.unread();
- scanner.unread();
- // FIXME Mark the individual elements as strings
- return Token.UNDEFINED;
- default: // special case of string (no letter following percent)
- scanner.unread();
- return detectToken(scanner, IRubyPartitions.RUBY_STRING);
- }
- }
- scanner.unread();
- return Token.UNDEFINED;
- }
-
- private IToken detectToken(ICharacterScanner scanner, String tokenType) {
- int c = scanner.read(); // get delimeter
- int lastChar = c;
- char endChar = getMatchingBracket((char) c);
- // Read until EOF, End character or EOL
- while (true) {
- c = scanner.read();
- // FIXME This is a big hack. Expression substitution actually needs to be returned as normal ruby code (and repartitioned)
- if ((char) c == '#') { // Try to handle expression substitution
- int d = scanner.read();
- if ((char) d == '{') {
- // read until '}'
- do {
- d = scanner.read();
- if (d == ICharacterScanner.EOF) {
- return new Token(tokenType);
- }
- } while ((char) d != '}');
- continue;
- } else if ((char) d == '@' || (char) d == '$') {
- // read until whitespace
- do {
- d = scanner.read();
- } while ((char) d != ' ');
- continue;
- } else {// not expression subst.
- scanner.unread();
- }
- }
-
- // TODO Stop at EOL,char[][] originalDelimiters=
- // scanner.getLegalLineDelimiters();
- if (c == ICharacterScanner.EOF)
- break; // we're done
- if ((char) c == endChar && ((char) lastChar != '\\'))
- break; // we found matching bracket
- lastChar = c;
- }
- return new Token(tokenType);
- }
-
- /**
- * Returns whether the next characters to be read by the character scanner
- * are an exact match with the given sequence. No escape characters are
- * allowed within the sequence. If specified the sequence is considered to
- * be found when reading the EOF character.
- *
- * @param scanner
- * the character scanner to be used
- * @param sequence
- * the sequence to be detected
- * @param eofAllowed
- * indicated whether EOF terminates the pattern
- * @return <code>true</code> if the given sequence has been detected
- */
- protected boolean sequenceDetected(ICharacterScanner scanner,
- char[] sequence, boolean eofAllowed) {
- for (int i = 1; i < sequence.length; i++) {
- int c = scanner.read();
- if (c == ICharacterScanner.EOF && eofAllowed) {
- return true;
- } else if (c != sequence[i]) {
- // Non-matching character detected, rewind the scanner back to
- // the start.
- // Do not unread the first character.
- scanner.unread();
- for (int j = i - 1; j > 0; j--)
- scanner.unread();
- return false;
- }
- }
-
- return true;
- }
-
- private char getMatchingBracket(char c) {
- switch (c) {
- case '(':
- return ')';
- case '{':
- return '}';
- case '[':
- return ']';
- case '<':
- return '>';
- default:
- return c;
- }
- }
-
-}
Modified: branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/RubyPartitionScanner.java
===================================================================
--- branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/RubyPartitionScanner.java 2007-03-03 19:18:22 UTC (rev 2078)
+++ branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/RubyPartitionScanner.java 2007-03-03 19:34:33 UTC (rev 2079)
@@ -10,11 +10,7 @@
import org.eclipse.jface.text.rules.IPredicateRule;
import org.eclipse.jface.text.rules.IRule;
import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.IWordDetector;
-import org.eclipse.jface.text.rules.PatternRule;
-import org.eclipse.jface.text.rules.SingleLineRule;
import org.eclipse.jface.text.rules.Token;
-import org.eclipse.jface.text.rules.WordPatternRule;
public class RubyPartitionScanner extends BufferedRuleBasedScanner implements
IPartitionTokenScanner {
@@ -25,16 +21,12 @@
/** The offset of the partition inside which to resume. */
protected int fPartitionOffset;
- public final static String RUBY_STRING = IRubyPartitions.RUBY_STRING;
public final static String RUBY_MULTI_LINE_COMMENT = IRubyPartitions.RUBY_MULTI_LINE_COMMENT;
public static final String RUBY_SINGLE_LINE_COMMENT = IRubyPartitions.RUBY_SINGLE_LINE_COMMENT;
- public static final String RUBY_REGULAR_EXPRESSION = IRubyPartitions.RUBY_REGEX;
- public static final String RUBY_COMMAND = IRubyPartitions.RUBY_COMMAND;
- public static final String HERE_DOC = "partition_scanner_here_doc";
- public static final String[] LEGAL_CONTENT_TYPES = { RUBY_STRING,
+ public static final String[] LEGAL_CONTENT_TYPES = {
RUBY_MULTI_LINE_COMMENT, RUBY_SINGLE_LINE_COMMENT,
- RUBY_REGULAR_EXPRESSION, RUBY_COMMAND };
+ };
public RubyPartitionScanner() {
super();
@@ -42,79 +34,16 @@
}
protected void initialize() {
- IToken string = new Token(RUBY_STRING);
IToken multiLineComment = new Token(RUBY_MULTI_LINE_COMMENT);
IToken singleLineComment = new Token(RUBY_SINGLE_LINE_COMMENT);
- IToken regexp = new Token(RUBY_REGULAR_EXPRESSION);
- IToken command = new Token(RUBY_COMMAND);
- IToken hereDoc = new Token(RUBY_STRING);
List rules = new ArrayList();
-
- // TODO Fix this to be able to recognize variable substitution inside
- // strings (and therefore have quotes inside them which don't end the
- // partition)
-
- // Strings
- rules.add(new PatternRule("\"", "\"", string, '\\', false, false));
- rules.add(new PatternRule("'", "'", string, '\\', false, false));
-
- // Regular expressions
- // TODO Work with options: 's', 'u', 'e', 'n', 'x', 'm', 'o', 'i'
- rules.add(new SingleLineRule("/", "/", regexp, '\\'));
-
- // Commands
- rules.add(new SingleLineRule("`", "`", command, '\\'));
-
- // Catch all the wacky Percent Syntax (Strings/commands/regexps)
- rules.add(new PercentSyntaxRule());
-
// Single line comments
// ?# evaluates to the ascii value of #
- rules.add(new WordPatternRule(new NumberSignDetector(), "?", "#",
- Token.UNDEFINED));
- // ugly hacks to make ?" and ?' recognized as characters
- rules.add(new WordPatternRule(new IWordDetector() {
-
- public boolean isWordPart(char c) {
- return c == '"';
- }
-
- public boolean isWordStart(char c) {
- return c == '?';
- }
-
- }, "?", "\"", Token.UNDEFINED));
- rules.add(new WordPatternRule(new IWordDetector() {
-
- public boolean isWordPart(char c) {
- return c == '\'';
- }
-
- public boolean isWordStart(char c) {
- return c == '?';
- }
-
- }, "?", "'", Token.UNDEFINED));
- rules.add(new WordPatternRule(new IWordDetector() {
-
- public boolean isWordPart(char c) {
- return c == '/';
- }
-
- public boolean isWordStart(char c) {
- return c == '?';
- }
-
- }, "?", "/", Token.UNDEFINED));
-
+// rules.add(new WordPatternRule(new NumberSignDetector(), "?", "#",
+// Token.UNDEFINED));
rules.add(new EndOfLineRule("#", singleLineComment));
rules.add(new DocumentationCommentRule(multiLineComment));
- rules.add(new HereDocPatternRule(hereDoc));
-
- // FIXME Create Hyrbid of RuleBasedPartitionScanner which allows IRule
- // or IPredicateRule and will only evaluate IPredicateRules if success
- // token matches content type
IRule[] result = new IRule[rules.size()];
rules.toArray(result);
setRules(result);
Added: branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/AbstractRubyTokenScanner.java
===================================================================
--- branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/AbstractRubyTokenScanner.java (rev 0)
+++ branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/AbstractRubyTokenScanner.java 2007-03-03 19:34:33 UTC (rev 2079)
@@ -0,0 +1,296 @@
+package org.rubypeople.rdt.internal.ui.text.ruby;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.jface.resource.StringConverter;
+import org.eclipse.jface.text.TextAttribute;
+import org.eclipse.jface.text.rules.ITokenScanner;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Display;
+import org.rubypeople.rdt.ui.PreferenceConstants;
+import org.rubypeople.rdt.ui.text.IColorManager;
+import org.rubypeople.rdt.ui.text.IColorManagerExtension;
+
+public abstract class AbstractRubyTokenScanner implements ITokenScanner {
+
+ private String[] fPropertyNamesColor;
+ private String[] fPropertyNamesBgColor;
+ private String[] fPropertyNamesBold;
+ private String[] fPropertyNamesItalic;
+ private String[] fPropertyNamesStrikethrough;
+ private String[] fPropertyNamesUnderline;
+ private IColorManager fColorManager;
+ private IPreferenceStore fPreferenceStore;
+ private boolean fNeedsLazyColorLoading;
+ private Map fTokenMap = new HashMap();
+
+ /**
+ * Creates an abstract Ruby scanner.
+ */
+ public AbstractRubyTokenScanner(IColorManager manager, IPreferenceStore store) {
+ super();
+ fColorManager = manager;
+ fPreferenceStore = store;
+ }
+
+ /**
+ * Returns the preference store.
+ *
+ * @return the preference store.
+ *
+ * @since 3.0
+ */
+ protected IPreferenceStore getPreferenceStore() {
+ return fPreferenceStore;
+ }
+
+ /**
+ * Returns an array of preference keys which define the tokens used in the
+ * rules of this scanner.
+ * <p>
+ * The preference key is used access the color in the preference store and
+ * in the color manager.
+ * </p>
+ * <p>
+ * Preference key +{@link PreferenceConstants#EDITOR_BOLD_SUFFIX}is used
+ * to retrieve whether the token is rendered in bold.
+ * </p>
+ * <p>
+ * Preference key +{@link PreferenceConstants#EDITOR_ITALIC_SUFFIX}is used
+ * to retrieve whether the token is rendered in italic.
+ * </p>
+ */
+ abstract protected String[] getTokenProperties();
+
+ public final void initialize() {
+ fPropertyNamesColor = getTokenProperties();
+ int length = fPropertyNamesColor.length;
+ fPropertyNamesBgColor = new String[length];
+ fPropertyNamesBold = new String[length];
+ fPropertyNamesItalic = new String[length];
+ fPropertyNamesStrikethrough = new String[length];
+ fPropertyNamesUnderline = new String[length];
+
+ for (int i= 0; i < length; i++) {
+ fPropertyNamesBgColor[i]= getBGKey(fPropertyNamesColor[i]);
+ fPropertyNamesBold[i]= getBoldKey(fPropertyNamesColor[i]);
+ fPropertyNamesItalic[i]= getItalicKey(fPropertyNamesColor[i]);
+ fPropertyNamesStrikethrough[i]= getStrikethroughKey(fPropertyNamesColor[i]);
+ fPropertyNamesUnderline[i]= getUnderlineKey(fPropertyNamesColor[i]);
+ }
+
+ fNeedsLazyColorLoading = Display.getCurrent() == null;
+ for (int i = 0; i < length; i++) {
+ if (fNeedsLazyColorLoading)
+ addTokenWithProxyAttribute(fPropertyNamesColor[i], fPropertyNamesBgColor[i], fPropertyNamesBold[i], fPropertyNamesItalic[i], fPropertyNamesStrikethrough[i], fPropertyNamesUnderline[i]);
+ else
+ addToken(fPropertyNamesColor[i], fPropertyNamesBgColor[i], fPropertyNamesBold[i], fPropertyNamesItalic[i], fPropertyNamesStrikethrough[i], fPropertyNamesUnderline[i]);
+ }
+ }
+
+ protected String getBoldKey(String colorKey) {
+ return colorKey + PreferenceConstants.EDITOR_BOLD_SUFFIX;
+ }
+
+ protected String getBGKey(String colorKey) {
+ return colorKey + PreferenceConstants.EDITOR_BG_SUFFIX;
+ }
+
+ protected String getItalicKey(String colorKey) {
+ return colorKey + PreferenceConstants.EDITOR_ITALIC_SUFFIX;
+ }
+
+ protected String getStrikethroughKey(String colorKey) {
+ return colorKey + PreferenceConstants.EDITOR_STRIKETHROUGH_SUFFIX;
+ }
+
+ protected String getUnderlineKey(String colorKey) {
+ return colorKey + PreferenceConstants.EDITOR_UNDERLINE_SUFFIX;
+ }
+
+ private void addTokenWithProxyAttribute(String colorKey, String bgColorKey, String boldKey, String italicKey, String strikethroughKey, String underlineKey) {
+ fTokenMap.put(colorKey, new Token(createTextAttribute(null, null, boldKey, italicKey, strikethroughKey, underlineKey)));
+ }
+
+ private void resolveProxyAttributes() {
+ if (fNeedsLazyColorLoading && Display.getCurrent() != null) {
+ for (int i = 0; i < fPropertyNamesColor.length; i++) {
+ addToken(fPropertyNamesColor[i], fPropertyNamesBgColor[i], fPropertyNamesBold[i], fPropertyNamesItalic[i], fPropertyNamesStrikethrough[i], fPropertyNamesUnderline[i]);
+ }
+ fNeedsLazyColorLoading = false;
+ }
+ }
+
+ private void addToken(String colorKey, String bgColorKey, String boldKey, String italicKey, String strikethroughKey, String underlineKey) {
+ bindColor(colorKey);
+ bindColor(bgColorKey);
+
+ if (!fNeedsLazyColorLoading)
+ fTokenMap.put(colorKey, new Token(createTextAttribute(colorKey, bgColorKey, boldKey, italicKey, strikethroughKey, underlineKey)));
+ else {
+ Token token = ((Token) fTokenMap.get(colorKey));
+ if (token != null) token.setData(createTextAttribute(colorKey, bgColorKey, boldKey, italicKey, strikethroughKey, underlineKey));
+ }
+ }
+
+ private void bindColor(String colorKey) {
+ if (fColorManager != null && colorKey != null && fColorManager.getColor(colorKey) == null) {
+ RGB rgb = PreferenceConverter.getColor(fPreferenceStore, colorKey);
+ if (rgb == PreferenceConverter.COLOR_DEFAULT_DEFAULT) return;
+
+ if (fColorManager instanceof IColorManagerExtension) {
+ IColorManagerExtension ext = (IColorManagerExtension) fColorManager;
+ ext.unbindColor(colorKey);
+ ext.bindColor(colorKey, rgb);
+ }
+ }
+ }
+
+ protected Token getToken(String key) {
+ if (fNeedsLazyColorLoading) resolveProxyAttributes();
+ return (Token) fTokenMap.get(key);
+ }
+
+ /**
+ * Create a text attribute based on the given color, bold and italic
+ * preference keys.
+ *
+ * @param colorKey
+ * the color preference key
+ * @param colorKey
+ * the color preference key
+ * @param boldKey
+ * the bold preference key
+ * @param italicKey
+ * the italic preference key
+ * @param strikethroughKey
+ * the strikethrough preference key
+ * @param underlineKey
+ * the underline preference key
+ * @return the created text attribute
+ * @since 0.9.0
+ */
+ private TextAttribute createTextAttribute(String colorKey, String bgColorKey, String boldKey, String italicKey, String strikethroughKey, String underlineKey) {
+ Color color= null;
+ if (colorKey != null)
+ color= fColorManager.getColor(colorKey);
+
+ Color bgColor= null;
+ if (bgColorKey != null)
+ bgColor= fColorManager.getColor(bgColorKey);
+
+ int style= fPreferenceStore.getBoolean(boldKey) ? SWT.BOLD : SWT.NORMAL;
+ if (fPreferenceStore.getBoolean(italicKey))
+ style |= SWT.ITALIC;
+
+ if (fPreferenceStore.getBoolean(strikethroughKey))
+ style |= TextAttribute.STRIKETHROUGH;
+
+ if (fPreferenceStore.getBoolean(underlineKey))
+ style |= TextAttribute.UNDERLINE;
+
+ return new TextAttribute(color, bgColor, style);
+ }
+
+ public boolean affectsBehavior(PropertyChangeEvent event) {
+ return indexOf(event.getProperty()) >= 0;
+ }
+
+ public void adaptToPreferenceChange(PropertyChangeEvent event) {
+ // New
+ String p = event.getProperty();
+ int index = indexOf(p);
+ Token token = getToken(fPropertyNamesColor[index]);
+ if (fPropertyNamesColor[index].equals(p))
+ adaptToColorChange(token, event);
+ if (fPropertyNamesBgColor[index].equals(p))
+ adaptToBgColorChange(token, event);
+ else if (fPropertyNamesBold[index].equals(p))
+ adaptToStyleChange(token, event, SWT.BOLD);
+ else if (fPropertyNamesItalic[index].equals(p))
+ adaptToStyleChange(token, event, SWT.ITALIC);
+ else if (fPropertyNamesStrikethrough[index].equals(p))
+ adaptToStyleChange(token, event, TextAttribute.STRIKETHROUGH);
+ else if (fPropertyNamesUnderline[index].equals(p))
+ adaptToStyleChange(token, event, TextAttribute.UNDERLINE);
+ }
+
+ private void adaptToStyleChange(Token token, PropertyChangeEvent event, int styleAttribute) {
+ boolean eventValue = false;
+ Object value = event.getNewValue();
+ if (value instanceof Boolean)
+ eventValue = ((Boolean) value).booleanValue();
+ else if (IPreferenceStore.TRUE.equals(value)) eventValue = true;
+
+ Object data = token.getData();
+ if (data instanceof TextAttribute) {
+ TextAttribute oldAttr = (TextAttribute) data;
+ boolean activeValue = (oldAttr.getStyle() & styleAttribute) == styleAttribute;
+ if (activeValue != eventValue) token.setData(new TextAttribute(oldAttr.getForeground(), oldAttr.getBackground(), eventValue ? oldAttr.getStyle() | styleAttribute : oldAttr.getStyle() & ~styleAttribute));
+ }
+ }
+
+ private void adaptToColorChange(Token token, PropertyChangeEvent event) {
+ adaptToSomeColorChange(token, event, true);
+ }
+
+ private void adaptToBgColorChange(Token token, PropertyChangeEvent event) {
+ adaptToSomeColorChange(token, event, false);
+ }
+
+ private void adaptToSomeColorChange(Token token, PropertyChangeEvent event, boolean isForeground) {
+ RGB rgb = null;
+
+ Object value = event.getNewValue();
+ if (value instanceof RGB)
+ rgb = (RGB) value;
+ else if (value instanceof String) rgb = StringConverter.asRGB((String) value);
+
+ if (rgb != null) {
+
+ String property = event.getProperty();
+ Color color = fColorManager.getColor(property);
+
+ if ((color == null || !rgb.equals(color.getRGB())) && fColorManager instanceof IColorManagerExtension) {
+ IColorManagerExtension ext = (IColorManagerExtension) fColorManager;
+
+ ext.unbindColor(property);
+ ext.bindColor(property, rgb);
+
+ color = fColorManager.getColor(property);
+ }
+
+ Object data = token.getData();
+ if (data instanceof TextAttribute) {
+ TextAttribute oldAttr = (TextAttribute) data;
+ Color foreGround;
+ Color backGround;
+ if (!isForeground) {
+ foreGround = oldAttr.getForeground();
+ backGround = color;
+ } else {
+ foreGround = color;
+ backGround = oldAttr.getBackground();
+ }
+ token.setData(new TextAttribute(foreGround, backGround, oldAttr.getStyle()));
+ }
+ }
+ }
+
+ private int indexOf(String property) {
+ if (property != null) {
+ int length = fPropertyNamesColor.length;
+ for (int i = 0; i < length; i++) {
+ if (property.equals(fPropertyNamesColor[i]) || property.equals(fPropertyNamesBgColor[i]) || property.equals(fPropertyNamesBold[i]) || property.equals(fPropertyNamesItalic[i]) || property.equals(fPropertyNamesStrikethrough[i]) || property.equals(fPropertyNamesUnderline[i])) return i;
+ }
+ }
+ return -1;
+ }
+}
Deleted: branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/CharacterRule.java
===================================================================
--- branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/CharacterRule.java 2007-03-03 19:18:22 UTC (rev 2078)
+++ branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/CharacterRule.java 2007-03-03 19:34:33 UTC (rev 2079)
@@ -1,20 +0,0 @@
-package org.rubypeople.rdt.internal.ui.text.ruby;
-
-import org.eclipse.jface.text.rules.IToken;
-
-public class CharacterRule extends SingleCharacterPrefixRule {
-
- private static final char PREFIX = '?';
- private static final int WORD_LENGTH = 2;
-
- /**
- * Creates a rule which will return the specified token when a character
- * sequence is detected.
- *
- * @param token
- * the token to be returned
- */
- public CharacterRule(IToken token) {
- super(PREFIX, token, WORD_LENGTH, 2);
- }
-}
Deleted: branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/RubyCodeScanner.java
===================================================================
--- branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/RubyCodeScanner.java 2007-03-03 19:18:22 UTC (rev 2078)
+++ branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/RubyCodeScanner.java 2007-03-03 19:34:33 UTC (rev 2079)
@@ -1,81 +0,0 @@
-package org.rubypeople.rdt.internal.ui.text.ruby;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.IWordDetector;
-import org.eclipse.jface.text.rules.WordRule;
-import org.rubypeople.rdt.internal.ui.text.IRubyColorConstants;
-import org.rubypeople.rdt.internal.ui.text.RubyWordDetector;
-import org.rubypeople.rdt.ui.text.IColorManager;
-import org.rubypeople.rdt.ui.text.RubyTextTools;
-
-public class RubyCodeScanner extends AbstractRubyScanner {
-
- protected String[] keywords;
-
- private static String[] fgTokenProperties = { IRubyColorConstants.RUBY_KEYWORD,
- IRubyColorConstants.RUBY_DEFAULT, IRubyColorConstants.RUBY_FIXNUM,
- IRubyColorConstants.RUBY_CHARACTER, IRubyColorConstants.RUBY_SYMBOL,
- IRubyColorConstants.RUBY_INSTANCE_VARIABLE, IRubyColorConstants.RUBY_GLOBAL
- // TODO Add Ability to set colors for return and operators
- // IRubyColorConstants.RUBY_METHOD_NAME,
- // IRubyColorConstants.RUBY_KEYWORD_RETURN,
- // IRubyColorConstants.RUBY_OPERATOR
- };
-
- /**
- * Creates a Ruby code scanner
- *
- * @param manager
- * the color manager
- * @param store
- * the preference store
- */
- public RubyCodeScanner(IColorManager manager, IPreferenceStore store) {
- super(manager, store);
- initialize();
- }
-
- /*
- * @see AbstractRubyScanner#getTokenProperties()
- */
- protected String[] getTokenProperties() {
- return fgTokenProperties;
- }
-
- protected List createRules() {
- List rules = new ArrayList();
-
- rules.add(new CharacterRule(getToken(IRubyColorConstants.RUBY_CHARACTER)));
-
- IToken fixnumToken = getToken(IRubyColorConstants.RUBY_FIXNUM);
- rules.add(new RubyNumberRule(fixnumToken));
-
- rules.add(new SymbolRule(getToken(IRubyColorConstants.RUBY_SYMBOL)));
-
- //rules.add(new ClassVariableRule(getToken(IRubyColorConstants.RUBY_CLASS_VARIABLE)));
-
- IToken defToken = getToken(IRubyColorConstants.RUBY_DEFAULT);
- setDefaultReturnToken(getToken(IRubyColorConstants.RUBY_DEFAULT));
-
- IWordDetector instanceVarDetector = new InstanceVariableDetector();
- WordRule instanceVarRule = new WordRule(instanceVarDetector, getToken(IRubyColorConstants.RUBY_INSTANCE_VARIABLE));
- rules.add(instanceVarRule);
-
- WordRule gloablRule = new WordRule(new GlobalDetector(), getToken(IRubyColorConstants.RUBY_GLOBAL));
- rules.add(gloablRule);
-
- IWordDetector wordDetector = new RubyWordDetector();
- WordRule wordRule = new WordRule(wordDetector, defToken);
- IToken token = getToken(IRubyColorConstants.RUBY_KEYWORD);
- String[] keywords = RubyTextTools.getKeyWords();
- for (int keyWordIndex = 0; keyWordIndex < keywords.length; keyWordIndex++)
- wordRule.addWord(keywords[keyWordIndex], token);
- rules.add(wordRule);
-
- return rules;
- }
-}
\ No newline at end of file
Deleted: branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/RubyNumberRule.java
===================================================================
--- branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/RubyNumberRule.java 2007-03-03 19:18:22 UTC (rev 2078)
+++ branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/RubyNumberRule.java 2007-03-03 19:34:33 UTC (rev 2079)
@@ -1,48 +0,0 @@
-package org.rubypeople.rdt.internal.ui.text.ruby;
-
-import org.eclipse.jface.text.rules.ICharacterScanner;
-import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.NumberRule;
-import org.eclipse.jface.text.rules.Token;
-
-public class RubyNumberRule extends NumberRule {
-
- public RubyNumberRule(IToken token){
- super(token);
- }
-
- /*
- * @see IRule#evaluate(ICharacterScanner)
- */
- public IToken evaluate(ICharacterScanner scanner) {
- int c= scanner.read();
- if (Character.isDigit((char)c)) {
- scanner.unread();
- scanner.unread();
- c = scanner.read();
- if ( Character.isLetter((char)c) || ((char)c) == '_'){
- do {
- c= scanner.read();
- } while (Character.isDigit((char) c));
- scanner.unread();
- return Token.UNDEFINED;
- }
- c = scanner.read();
- if (fColumn == UNDEFINED || (fColumn == scanner.getColumn() - 1)) {
- do {
- c= scanner.read();
- } while (Character.isDigit((char) c));
- if ( Character.isLetter((char)c) || ((char)c) == '_' ){
- scanner.unread();
- return Token.UNDEFINED;
- }
- scanner.unread();
- return fToken;
- }
- }
-
- scanner.unread();
- return Token.UNDEFINED;
- }
-
-}
Added: branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/RubyTokenScanner.java
===================================================================
--- branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/RubyTokenScanner.java (rev 0)
+++ branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/RubyTokenScanner.java 2007-03-03 19:34:33 UTC (rev 2079)
@@ -0,0 +1,167 @@
+package org.rubypeople.rdt.internal.ui.text.ruby;
+
+import java.io.IOException;
+import java.io.StringReader;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.Token;
+import org.jruby.lexer.yacc.LexState;
+import org.jruby.lexer.yacc.LexerSource;
+import org.jruby.lexer.yacc.RubyYaccLexer;
+import org.jruby.lexer.yacc.SyntaxException;
+import org.jruby.parser.ParserSupport;
+import org.jruby.parser.RubyParserConfiguration;
+import org.jruby.parser.RubyParserResult;
+import org.jruby.parser.Tokens;
+import org.rubypeople.rdt.internal.ui.RubyPlugin;
+import org.rubypeople.rdt.internal.ui.text.IRubyColorConstants;
+import org.rubypeople.rdt.ui.text.IColorManager;
+
+public class RubyTokenScanner extends AbstractRubyTokenScanner {
+
+ protected String[] keywords;
+
+ private static String[] fgTokenProperties = { IRubyColorConstants.RUBY_KEYWORD, IRubyColorConstants.RUBY_DEFAULT, IRubyColorConstants.RUBY_FIXNUM, IRubyColorConstants.RUBY_CHARACTER, IRubyColorConstants.RUBY_SYMBOL, IRubyColorConstants.RUBY_INSTANCE_VARIABLE, IRubyColorConstants.RUBY_GLOBAL, IRubyColorConstants.RUBY_STRING, IRubyColorConstants.RUBY_REGEXP, IRubyColorConstants.RUBY_ERROR
+ // TODO Add Ability to set colors for return and operators
+ // IRubyColorConstants.RUBY_METHOD_NAME,
+ // IRubyColorConstants.RUBY_KEYWORD_RETURN,
+ // IRubyColorConstants.RUBY_OPERATOR
+ };
+
+ private RubyYaccLexer lexer;
+ private LexerSource lexerSource;
+ private ParserSupport parserSupport;
+ private int tokenLength;
+ private int oldOffset;
+ private boolean isInRegexp;
+ private boolean isInString;
+ private RubyParserResult result;
+ private int origOffset;
+ private int origLength;
+ private String contents;
+
+ public RubyTokenScanner(IColorManager manager, IPreferenceStore store) {
+ super(manager, store);
+ lexer = new RubyYaccLexer();
+ parserSupport = new ParserSupport();
+ parserSupport.setConfiguration(new RubyParserConfiguration());
+ result = new RubyParserResult();
+ parserSupport.setResult(result);
+ lexer.setParserSupport(parserSupport);
+ initialize();
+ }
+
+ public int getTokenLength() {
+ return tokenLength;
+ }
+
+ public int getTokenOffset() {
+ return oldOffset;
+ }
+
+ public IToken nextToken() {
+ oldOffset = getOffset();
+ tokenLength = 0;
+ IToken returnValue = getToken(IRubyColorConstants.RUBY_DEFAULT);
+ boolean isEOF = false;
+ try {
+ isEOF = !lexer.advance();
+ if (isEOF) {
+ returnValue = Token.EOF;
+ } else {
+ returnValue = token(lexer.token());
+ }
+ lexer.getStrTerm();
+ } catch (SyntaxException se) {
+ if (lexerSource.getOffset() - origLength == 0)
+ return Token.EOF; // return eof if we hit a problem found at
+ // end of parsing
+ else
+ tokenLength = getOffset() - oldOffset;
+ return new Token(IRubyColorConstants.RUBY_ERROR);
+ } catch (IOException e) {
+ RubyPlugin.log(e);
+ }
+ if (!isEOF)
+ tokenLength = getOffset() - oldOffset;
+ return returnValue;
+ }
+
+ private int getOffset() {
+ return lexerSource.getOffset() + origOffset;
+ }
+
+ @Override
+ protected Token getToken(String key) {
+ if (isInRegexp)
+ return super.getToken(IRubyColorConstants.RUBY_REGEXP);
+ if (isInString)
+ return super.getToken(IRubyColorConstants.RUBY_STRING);
+ return super.getToken(key);
+ }
+
+ private IToken token(int i) {
+ if (i >= 257 && i <= 303)
+ return getToken(IRubyColorConstants.RUBY_KEYWORD);
+ switch (i) {
+ case Tokens.tSYMBEG:
+ return getToken(IRubyColorConstants.RUBY_SYMBOL);
+ case Tokens.tGVAR:
+ return getToken(IRubyColorConstants.RUBY_GLOBAL);
+ case Tokens.tIVAR:
+ case Tokens.tCVAR: // FIXME Allow for unique coloring of class variables...
+ return getToken(IRubyColorConstants.RUBY_INSTANCE_VARIABLE);
+ case Tokens.tFLOAT:
+ case Tokens.tINTEGER:
+ // A character is marked as an integer, lets check for that special case...
+ if ((((oldOffset - origOffset) + 1) < contents.length()) && (contents.charAt((oldOffset - origOffset) + 1) == '?'))
+ return getToken(IRubyColorConstants.RUBY_CHARACTER);
+ return getToken(IRubyColorConstants.RUBY_FIXNUM);
+ case Tokens.tSTRING_CONTENT:
+ return getToken(IRubyColorConstants.RUBY_STRING);
+ case Tokens.tSTRING_BEG:
+ isInString = true;
+ return getToken(IRubyColorConstants.RUBY_STRING);
+ case Tokens.tSTRING_END:
+ isInString = false;
+ return getToken(IRubyColorConstants.RUBY_STRING);
+ case Tokens.tREGEXP_BEG:
+ isInRegexp = true;
+ return getToken(IRubyColorConstants.RUBY_REGEXP);
+ case Tokens.tREGEXP_END:
+ isInRegexp = false;
+ return getToken(IRubyColorConstants.RUBY_REGEXP);
+ default:
+ return getToken(IRubyColorConstants.RUBY_DEFAULT);
+ }
+ }
+
+ public void setRange(IDocument document, int offset, int length) {
+ lexer.reset();
+ lexer.setState(LexState.EXPR_BEG);
+ parserSupport.initTopLocalVariables();
+ if (offset == 0) {
+ isInRegexp = false;
+ isInString = false;
+ }
+ try {
+ contents = document.get(offset, length);
+ lexerSource = new LexerSource("filename", new StringReader(contents));
+ lexer.setSource(lexerSource);
+ } catch (BadLocationException e) {
+ RubyPlugin.log(e);
+ }
+ origOffset = offset;
+ origLength = length;
+ }
+
+ /*
+ * @see AbstractRubyScanner#getTokenProperties()
+ */
+ protected String[] getTokenProperties() {
+ return fgTokenProperties;
+ }
+}
Deleted: branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/SingleCharacterPrefixRule.java
===================================================================
--- branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/SingleCharacterPrefixRule.java 2007-03-03 19:18:22 UTC (rev 2078)
+++ branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/SingleCharacterPrefixRule.java 2007-03-03 19:34:33 UTC (rev 2079)
@@ -1,94 +0,0 @@
-package org.rubypeople.rdt.internal.ui.text.ruby;
-
-import org.eclipse.jface.text.Assert;
-import org.eclipse.jface.text.rules.ICharacterScanner;
-import org.eclipse.jface.text.rules.IRule;
-import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.Token;
-
-/**
- * This is a base class for recognizing tokens where a single character prefix
- * can determine if the word is of a particular token type. The token ends at
- * EOF, EOL or whitespace.
- *
- * @author cawilliams
- *
- */
-public class SingleCharacterPrefixRule implements IRule {
-
- protected char fPrefix;
- protected IToken fToken;
- protected int fMinLength;
- protected int fMaxLength;
- private StringBuffer fWord;
-
- public SingleCharacterPrefixRule(char prefix, IToken token, int minLength, int maxLength) {
- fPrefix = prefix;
- Assert.isNotNull(token);
- fToken = token;
- Assert.isLegal(minLength >= 1);
- fMinLength = minLength;
- Assert.isLegal(maxLength >= 1);
- fMaxLength = maxLength;
- }
-
- public IToken evaluate(ICharacterScanner scanner) {
- int c = scanner.read();
- int length = 1;
- fWord = new StringBuffer();
- if (((char) c) == fPrefix) {
- fWord.append(((char) c));
- // Now read until we hit EOF, EOL or whitespace
- while (true) {
- c = scanner.read();
- if (!isValidCharacter(c, length)) {
- if (!isValidEndCharacter(c, length))
- scanner.unread();
- else {
- fWord.append(((char) c));
- length++;
- }
- if (!lengthInRange(length) || !wordValid(fWord.toString())) return Token.UNDEFINED;
- return fToken;
- }
- fWord.append(((char) c));
- length++;
- }
- }
-
- scanner.unread();
- return Token.UNDEFINED;
- }
-
- protected boolean wordValid(String word) {
- return true;
- }
-
- protected boolean isValidEndCharacter(int c, int length) {
- return false;
- }
-
- /**
- * Determine if the current character is valid for the rule. Return false if
- * the character is not a part of the token. This is not applied to the
- * single character prefix.
- *
- * @param c
- * @param index
- * @return
- */
- protected boolean isValidCharacter(int c, int index) {
- return c != ICharacterScanner.EOF && !Character.isWhitespace((char) c);
- }
-
- /**
- * Determine if the length of the token is valid.
- *
- * @param length
- * @return
- */
- protected boolean lengthInRange(int length) {
- return (length >= fMinLength) && (length <= fMaxLength);
- }
-
-}
Deleted: branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/SingleTokenRubyCodeScanner.java
===================================================================
--- branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/SingleTokenRubyCodeScanner.java 2007-03-03 19:18:22 UTC (rev 2078)
+++ branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/SingleTokenRubyCodeScanner.java 2007-03-03 19:34:33 UTC (rev 2079)
@@ -1,33 +0,0 @@
-package org.rubypeople.rdt.internal.ui.text.ruby;
-
-import java.util.List;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.rubypeople.rdt.ui.text.IColorManager;
-
-public class SingleTokenRubyCodeScanner extends AbstractRubyScanner {
-
- private String[] fProperty;
-
- public SingleTokenRubyCodeScanner(IColorManager manager, IPreferenceStore store, String property) {
- super(manager, store);
- fProperty = new String[] { property};
- initialize();
- }
-
- /*
- * @see AbstractRubyScanner#getTokenProperties()
- */
- protected String[] getTokenProperties() {
- return fProperty;
- }
-
- /*
- * @see AbstractRubyScanner#createRules()
- */
- protected List createRules() {
- setDefaultReturnToken(getToken(fProperty[0]));
- return null;
- }
-
-}
Deleted: branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/SymbolRule.java
===================================================================
--- branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/SymbolRule.java 2007-03-03 19:18:22 UTC (rev 2078)
+++ branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/SymbolRule.java 2007-03-03 19:34:33 UTC (rev 2079)
@@ -1,36 +0,0 @@
-package org.rubypeople.rdt.internal.ui.text.ruby;
-
-import org.eclipse.jface.text.rules.IToken;
-
-/**
- * A rule which will return the given Token for Ruby symbols.
- *
- * @author cawilliams
- *
- */
-public class SymbolRule extends SingleCharacterPrefixRule {
-
- private static final char PREFIX = ':';
-
- public SymbolRule(IToken token) {
- super(PREFIX, token, 2, Integer.MAX_VALUE);
- }
-
- protected boolean isValidCharacter(int c, int index) {
- if (!super.isValidCharacter(c, index))
- return false;
-
- // Symbols can only contain word characters (a-zA-Z0-9_)
- // TODO which special method names contain brackets?
- return Character.isLetterOrDigit((char) c) || c == '_';
- }
-
- protected boolean isValidEndCharacter(int c, int length) {
- return c == '?' || c == '!';
- }
-
- protected boolean wordValid(String word) {
- return !Character.isDigit(word.charAt(1));
- }
-
-}
Modified: branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/text/RubySourceViewerConfiguration.java
===================================================================
--- branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/text/RubySourceViewerConfiguration.java 2007-03-03 19:18:22 UTC (rev 2078)
+++ branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/text/RubySourceViewerConfiguration.java 2007-03-03 19:34:33 UTC (rev 2079)
@@ -57,11 +57,11 @@
import org.rubypeople.rdt.internal.ui.text.comment.RubyCommentAutoIndentStrategy;
import org.rubypeople.rdt.internal.ui.text.hyperlinks.RubyHyperLinkDetector;
import org.rubypeople.rdt.internal.ui.text.ruby.AbstractRubyScanner;
-import org.rubypeople.rdt.internal.ui.text.ruby.RubyCodeScanner;
+import org.rubypeople.rdt.internal.ui.text.ruby.AbstractRubyTokenScanner;
import org.rubypeople.rdt.internal.ui.text.ruby.RubyCompletionProcessor;
import org.rubypeople.rdt.internal.ui.text.ruby.RubyFormattingStrategy;
import org.rubypeople.rdt.internal.ui.text.ruby.RubyReconcilingStrategy;
-import org.rubypeople.rdt.internal.ui.text.ruby.SingleTokenRubyCodeScanner;
+import org.rubypeople.rdt.internal.ui.text.ruby.RubyTokenScanner;
import org.rubypeople.rdt.internal.ui.text.ruby.hover.RubyCodeTextHover;
public class RubySourceViewerConfiguration extends
@@ -85,11 +85,9 @@
*/
private IColorManager fColorManager;
- protected AbstractRubyScanner fCodeScanner;
+ protected AbstractRubyTokenScanner fCodeScanner;
- protected AbstractRubyScanner fMultilineCommentScanner, fSinglelineCommentScanner, fStringScanner;
- private SingleTokenRubyCodeScanner fRegexpScanner;
- private SingleTokenRubyCodeScanner fCommandScanner;
+ protected AbstractRubyScanner fMultilineCommentScanner, fSinglelineCommentScanner;
private RubyDoubleClickSelector fRubyDoubleClickSelector;
private RubyCompletionProcessor fRubyCp;
@@ -181,10 +179,7 @@
public boolean affectsTextPresentation(PropertyChangeEvent event) {
return fCodeScanner.affectsBehavior(event)
|| fMultilineCommentScanner.affectsBehavior(event)
- || fSinglelineCommentScanner.affectsBehavior(event)
- || fStringScanner.affectsBehavior(event)
- || fRegexpScanner.affectsBehavior(event)
- || fCommandScanner.affectsBehavior(event);
+ || fSinglelineCommentScanner.affectsBehavior(event);
}
/**
@@ -209,12 +204,6 @@
fMultilineCommentScanner.adaptToPreferenceChange(event);
if (fSinglelineCommentScanner.affectsBehavior(event))
fSinglelineCommentScanner.adaptToPreferenceChange(event);
- if (fStringScanner.affectsBehavior(event))
- fStringScanner.adaptToPreferenceChange(event);
- if (fRegexpScanner.affectsBehavior(event))
- fRegexpScanner.adaptToPreferenceChange(event);
- if (fCommandScanner.affectsBehavior(event))
- fCommandScanner.adaptToPreferenceChange(event);
}
/**
@@ -247,17 +236,11 @@
*/
private void initializeScanners() {
Assert.isTrue(isNewSetup());
- fCodeScanner = new RubyCodeScanner(getColorManager(), fPreferenceStore);
+ fCodeScanner = new RubyTokenScanner(getColorManager(), fPreferenceStore);
fMultilineCommentScanner = new RubyCommentScanner(getColorManager(),
fPreferenceStore, IRubyColorConstants.RUBY_MULTI_LINE_COMMENT);
fSinglelineCommentScanner = new RubyCommentScanner(getColorManager(),
fPreferenceStore, IRubyColorConstants.RUBY_SINGLE_LINE_COMMENT);
- fStringScanner = new SingleTokenRubyCodeScanner(getColorManager(),
- fPreferenceStore, IRubyColorConstants.RUBY_STRING);
- fRegexpScanner = new SingleTokenRubyCodeScanner(getColorManager(),
- fPreferenceStore, IRubyColorConstants.RUBY_REGEXP);
- fCommandScanner = new SingleTokenRubyCodeScanner(getColorManager(),
- fPreferenceStore, IRubyColorConstants.RUBY_COMMAND);
}
/**
@@ -298,27 +281,9 @@
reconciler.setDamager(dr, RubyPartitionScanner.RUBY_MULTI_LINE_COMMENT);
reconciler
.setRepairer(dr, RubyPartitionScanner.RUBY_MULTI_LINE_COMMENT);
-
- dr = new DefaultDamagerRepairer(getStringScanner());
- reconciler.setDamager(dr, RubyPartitionScanner.RUBY_STRING);
- reconciler.setRepairer(dr, RubyPartitionScanner.RUBY_STRING);
-
- dr = new DefaultDamagerRepairer(getRegexpScanner());
- reconciler.setDamager(dr, RubyPartitionScanner.RUBY_REGULAR_EXPRESSION);
- reconciler
- .setRepairer(dr, RubyPartitionScanner.RUBY_REGULAR_EXPRESSION);
-
- dr = new DefaultDamagerRepairer(getCommandScanner());
- reconciler.setDamager(dr, RubyPartitionScanner.RUBY_COMMAND);
- reconciler.setRepairer(dr, RubyPartitionScanner.RUBY_COMMAND);
-
return reconciler;
}
- private ITokenScanner getCommandScanner() {
- return fCommandScanner;
- }
-
protected ITokenScanner getCodeScanner() {
return fCodeScanner;
}
@@ -331,18 +296,9 @@
return fSinglelineCommentScanner;
}
- protected ITokenScanner getStringScanner() {
- return fStringScanner;
- }
-
- protected ITokenScanner getRegexpScanner() {
- return fRegexpScanner;
- }
-
public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
return new String[] { IDocument.DEFAULT_CONTENT_TYPE,
RubyPartitionScanner.RUBY_MULTI_LINE_COMMENT,
- RubyPartitionScanner.RUBY_STRING,
RubyPartitionScanner.RUBY_SINGLE_LINE_COMMENT };
}
Modified: branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/text/RubyTextTools.java
===================================================================
--- branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/text/RubyTextTools.java 2007-03-03 19:18:22 UTC (rev 2078)
+++ branches/syntax/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/text/RubyTextTools.java 2007-03-03 19:34:33 UTC (rev 2079)
@@ -21,8 +21,8 @@
import org.rubypeople.rdt.internal.ui.text.RubyCommentScanner;
import org.rubypeople.rdt.internal.ui.text.RubyPartitionScanner;
import org.rubypeople.rdt.internal.ui.text.ruby.AbstractRubyScanner;
-import org.rubypeople.rdt.internal.ui.text.ruby.RubyCodeScanner;
-import org.rubypeople.rdt.internal.ui.text.ruby.SingleTokenRubyCodeScanner;
+import org.rubypeople.rdt.internal.ui.text.ruby.AbstractRubyTokenScanner;
+import org.rubypeople.rdt.internal.ui.text.ruby.RubyTokenScanner;
public class RubyTextTools {
@@ -45,15 +45,12 @@
protected static String[] keywords;
protected RubyColorManager fColorManager;
protected RubyPartitionScanner partitionScanner;
- protected AbstractRubyScanner fCodeScanner;
- protected AbstractRubyScanner fMultilineCommentScanner, fSinglelineCommentScanner,
- stringScanner;
+ protected AbstractRubyTokenScanner fCodeScanner;
+ protected AbstractRubyScanner fMultilineCommentScanner, fSinglelineCommentScanner;
private IPreferenceStore fPreferenceStore;
private Preferences fCorePreferenceStore;
/** The preference change listener */
private PreferenceListener fPreferenceListener = new PreferenceListener();
- private SingleTokenRubyCodeScanner fRegexpScanner;
- private SingleTokenRubyCodeScanner fCommandScanner;
/**
* Creates a new Ruby text tools collection.
@@ -108,17 +105,11 @@
fColorManager = new RubyColorManager(autoDisposeOnDisplayDispose);
partitionScanner = new RubyPartitionScanner();
- fCodeScanner = new RubyCodeScanner(fColorManager, store);
+ fCodeScanner = new RubyTokenScanner(fColorManager, store);
fMultilineCommentScanner = new RubyCommentScanner(fColorManager, store, coreStore,
IRubyColorConstants.RUBY_MULTI_LINE_COMMENT);
fSinglelineCommentScanner = new RubyCommentScanner(fColorManager, store, coreStore,
IRubyColorConstants.RUBY_SINGLE_LINE_COMMENT);
- stringScanner = new SingleTokenRubyCodeScanner(fColorManager, store,
- IRubyColorConstants.RUBY_STRING);
- fRegexpScanner = new SingleTokenRubyCodeScanner(fColorManager, store,
- IRubyColorConstants.RUBY_REGEXP);
- fCommandScanner = new SingleTokenRubyCodeScanner(fColorManager, store,
- IRubyColorConstants.RUBY_COMMAND);
fPreferenceStore = store;
fPreferenceStore.addPropertyChangeListener(fPreferenceListener);
@@ -142,10 +133,7 @@
if (fMultilineCommentScanner.affectsBehavior(event))
fMultilineCommentScanner.adaptToPreferenceChange(event);
if (fSinglelineCommentScanner.affectsBehavior(event))
- fSinglelineCommentScanner.adaptToPreferenceChange(event);
- if (stringScanner.affectsBehavior(event)) stringScanner.adaptToPreferenceChange(event);
- if (fRegexpScanner.affectsBehavior(event)) fRegexpScanner.adaptToPreferenceChange(event);
- if (fCommandScanner.affectsBehavior(event)) fCommandScanner.adaptToPreferenceChange(event);
+ fSinglelineCommentScanner.adaptToPreferenceChange(event);
}
public IDocumentPartitioner createDocumentPartitioner() {
@@ -161,7 +149,7 @@
* @deprecated As of 0.8.0, replaced by
* {@link RubySourceViewerConfiguration#getCodeScanner()}
*/
- public AbstractRubyScanner getCodeScanner() {
+ public AbstractRubyTokenScanner getCodeScanner() {
return fCodeScanner;
}
@@ -181,14 +169,6 @@
return fSinglelineCommentScanner;
}
- /**
- * @deprecated As of 0.8.0, replaced by
- * {@link RubySourceViewerConfiguration#getStringScanner()}
- */
- public ITokenScanner getStringScanner() {
- return stringScanner;
- }
-
public IPreferenceStore getPreferenceStore() {
return RubyPlugin.getDefault().getPreferenceStore();
}
@@ -212,9 +192,7 @@
public boolean affectsTextPresentation(PropertyChangeEvent event) {
return fCodeScanner.affectsBehavior(event)
|| fMultilineCommentScanner.affectsBehavior(event)
- || fSinglelineCommentScanner.affectsBehavior(event)
- || stringScanner.affectsBehavior(event) || fRegexpScanner.affectsBehavior(event)
- || fCommandScanner.affectsBehavior(event);
+ || fSinglelineCommentScanner.affectsBehavior(event);
}
/**
@@ -246,9 +224,6 @@
fCodeScanner = null;
fMultilineCommentScanner = null;
fSinglelineCommentScanner = null;
- stringScanner = null;
- fRegexpScanner = null;
- fCommandScanner = null;
// fJavaDocScanner= null;
partitionScanner = null;
@@ -271,22 +246,6 @@
}
/**
- * @deprecated As of 0.8.0, replaced by
- * {@link RubySourceViewerConfiguration#getRegexpScanner()}
- */
- public ITokenScanner getRegexpScanner() {
- return fRegexpScanner;
- }
-
- /**
- * @deprecated As of 0.8.0, replaced by
- * {@link RubySourceViewerConfiguration#getCommandScanner()}
- */
- public ITokenScanner getCommandScanner() {
- return fCommandScanner;
- }
-
- /**
* Returns the color manager which is used to manage any Ruby-specific
* colors needed for such things like syntax highlighting.
* <p>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-03-03 19:18:24
|
Revision: 2078
http://svn.sourceforge.net/rubyeclipse/?rev=2078&view=rev
Author: cawilliams
Date: 2007-03-03 11:18:22 -0800 (Sat, 03 Mar 2007)
Log Message:
-----------
create a new branch for exploring alternative syntax coloring implementations
Added Paths:
-----------
branches/syntax/
Copied: branches/syntax (from rev 2077, trunk)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-03-03 19:04:04
|
Revision: 2077
http://svn.sourceforge.net/rubyeclipse/?rev=2077&view=rev
Author: cawilliams
Date: 2007-03-03 11:04:00 -0800 (Sat, 03 Mar 2007)
Log Message:
-----------
Removed Paths:
-------------
branches/syntax-coloring/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-03-03 19:00:06
|
Revision: 2076
http://svn.sourceforge.net/rubyeclipse/?rev=2076&view=rev
Author: cawilliams
Date: 2007-03-03 10:59:54 -0800 (Sat, 03 Mar 2007)
Log Message:
-----------
create a branch for exploring an alternate way of doing syntax coloring based on JRuby lexer or AST
Added Paths:
-----------
branches/syntax-coloring/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mba...@us...> - 2007-03-02 20:23:26
|
Revision: 2075
http://svn.sourceforge.net/rubyeclipse/?rev=2075&view=rev
Author: mbarchfe
Date: 2007-03-02 12:23:23 -0800 (Fri, 02 Mar 2007)
Log Message:
-----------
fix update site replacement in feature.xml
Modified Paths:
--------------
trunk/org.rubypeople.rdt.pluginbuilder/build-files/build.properties
trunk/org.rubypeople.rdt.pluginbuilder/build-files/customTargets.xml
Modified: trunk/org.rubypeople.rdt.pluginbuilder/build-files/build.properties
===================================================================
--- trunk/org.rubypeople.rdt.pluginbuilder/build-files/build.properties 2007-03-02 19:14:44 UTC (rev 2074)
+++ trunk/org.rubypeople.rdt.pluginbuilder/build-files/build.properties 2007-03-02 20:23:23 UTC (rev 2075)
@@ -105,3 +105,19 @@
#collBase=.
#collectingFolder=eclipse
#archivePrefix=eclipse
+
+# the buildResultsDirectory specifies a directory into which the build results are copied
+# after a successful build
+buildResultsDirectory=${buildDirectory}/dist
+
+# There are three update site URLs for three streams of RDT builds: releases, integration
+# and nightly builds. For each build the appropriate URL must be placed into feature.xml
+# The feature.xml file contains the release update site by default
+
+releaseUpdateSiteURL=http://rubyeclipse.sourceforge.net/updatesite
+
+# in case of a nightly or integration build the releaseUpdateSiteURL in feature.xml is
+# replaced with one of the following entries
+nightlyBuildUpdateSiteURL=http://updatesite.rubypeople.org/nightly
+integrationBuildUpdateSiteURL=http://updatesite.rubypeople.org/integration
+
Modified: trunk/org.rubypeople.rdt.pluginbuilder/build-files/customTargets.xml
===================================================================
--- trunk/org.rubypeople.rdt.pluginbuilder/build-files/customTargets.xml 2007-03-02 19:14:44 UTC (rev 2074)
+++ trunk/org.rubypeople.rdt.pluginbuilder/build-files/customTargets.xml 2007-03-02 20:23:23 UTC (rev 2075)
@@ -75,7 +75,8 @@
<!-- Steps to do after fetching the build elements -->
<!-- ===================================================================== -->
<target name="postFetch">
- <antcall target="replaceVersions"/>
+ <antcall target="replaceVersions"/>
+ <antcall target="setUpdateSiteURL"/>
</target>
<target name="replaceVersions">
@@ -101,7 +102,22 @@
<replacefilter token="Bundle-Version: 0.0.0" value="Bundle-Version: ${version.full}" />
<replacefilter token="VERSION_QUALIFIER" value="${version.qualifier}" />
</replace>
- </target>
+ </target>
+
+ <target name="setUpdateSiteURL" if="isNightlyOrIntegrationBuild">
+
+ <!-- do not replace the update site URL if it is a release build -->
+ <condition property="updateSiteUrl"
+ value="${nightlyBuildUpdateSiteURL}"
+ else="${integrationBuildUpdateSiteURL}">
+ <isset property="isNightlyBuild"/>
+ </condition>
+ <echo message="Setting update-site URL: ${updateSiteUrl}"/>
+ <replace dir="${buildDirectory}/features">
+ <include name="org.rubypeople.*/feature.xml"/>
+ <replacefilter token="${releaseUpdateSiteURL}" value="${updateSiteUrl}" />
+ </replace>
+ </target>
<!-- ===================================================================== -->
<!-- Steps to do before generating the build scripts. -->
<!-- ===================================================================== -->
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-03-02 19:14:45
|
Revision: 2074
http://svn.sourceforge.net/rubyeclipse/?rev=2074&view=rev
Author: cawilliams
Date: 2007-03-02 11:14:44 -0800 (Fri, 02 Mar 2007)
Log Message:
-----------
fix completion on class's super type in declaration (at least when the source isn't broken...)
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-03-02 14:58:34 UTC (rev 2073)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/codeassist/CompletionEngine.java 2007-03-02 19:14:44 UTC (rev 2074)
@@ -90,6 +90,7 @@
}
}
} else {
+ // FIXME If we're invoked on the class declaration (it's super class) don't do this!
// FIXME Traverse the IRubyElement model, not nodes (and don't reparse)?
getDocumentsRubyElementsInScope();
}
@@ -433,11 +434,10 @@
/** Lookup type declaration nodes */
private List<Node> getTypeDeclarationNodes(String typeName) {
- System.out.println("Being asked for the type decl node for " + typeName);
-
// Find the named type
RubyElementRequestor requestor = new RubyElementRequestor(fContext.getScript());
IType[] types = requestor.findType(typeName);
+ if (types == null || types.length == 0) return new ArrayList<Node>(0);
IType type = types[0];
try {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-03-02 14:58:43
|
Revision: 2073
http://svn.sourceforge.net/rubyeclipse/?rev=2073&view=rev
Author: cawilliams
Date: 2007-03-02 06:58:34 -0800 (Fri, 02 Mar 2007)
Log Message:
-----------
oopsie - try to fix broken launching that I caused when I tried to merge the two launching constant classes. SELECTED_INTERPRETER maps to VM_INSTALL_NAME now, rather than RUBY_CONTAINER (which I'm not sure is working correctly if we use it).
Also fixed the way we display the loadpaths in the environment tab of the run launch config stuff
Modified Paths:
--------------
trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/LoadPathEntryLabelProvider.java
trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyApplicationShortcut.java
trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyEnvironmentTab.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyLaunchConfigurationAttribute.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/RubyRuntime.java
trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitLaunchShortcut.java
Modified: trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/LoadPathEntryLabelProvider.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/LoadPathEntryLabelProvider.java 2007-03-01 15:19:46 UTC (rev 2072)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/LoadPathEntryLabelProvider.java 2007-03-02 14:58:34 UTC (rev 2073)
@@ -4,6 +4,7 @@
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.swt.graphics.Image;
+import org.rubypeople.rdt.core.ILoadpathEntry;
import org.rubypeople.rdt.internal.core.LoadpathEntry;
import org.rubypeople.rdt.internal.debug.ui.RdtDebugUiPlugin;
@@ -20,20 +21,10 @@
* @see ILabelProvider#getText(Object)
*/
public String getText(Object element) {
- if (element != null && element.getClass() == LoadpathEntry.class) {
- IProject project = ((LoadpathEntry) element).getProject();
- // TODO: quick fix
- if (project == null) {
- return "Project is null" ;
- }
- if (project.isAccessible()) {
- return project.getLocation().toOSString() ;
- }
- else {
- return project.getName() + " (not accessible)" ;
- }
+ if (element != null && element instanceof ILoadpathEntry) {
+ ILoadpathEntry entry = (ILoadpathEntry) element;
+ return entry.getPath().toOSString();
}
-
RdtDebugUiPlugin.log(new RuntimeException("Unable to render load path."));
return null;
}
Modified: trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyApplicationShortcut.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyApplicationShortcut.java 2007-03-01 15:19:46 UTC (rev 2072)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyApplicationShortcut.java 2007-03-02 14:58:34 UTC (rev 2073)
@@ -27,6 +27,7 @@
import org.rubypeople.rdt.internal.debug.ui.RdtDebugUiPlugin;
import org.rubypeople.rdt.internal.launching.RubyLaunchConfigurationAttribute;
import org.rubypeople.rdt.internal.ui.RubyPlugin;
+import org.rubypeople.rdt.launching.IRubyLaunchConfigurationConstants;
import org.rubypeople.rdt.launching.RubyRuntime;
public class RubyApplicationShortcut implements ILaunchShortcut {
@@ -130,8 +131,8 @@
wc.setAttribute(RubyLaunchConfigurationAttribute.PROJECT_NAME, rubyFile.getProject().getName());
wc.setAttribute(RubyLaunchConfigurationAttribute.FILE_NAME, rubyFile.getProjectRelativePath().toString());
wc.setAttribute(RubyLaunchConfigurationAttribute.WORKING_DIRECTORY, RubyApplicationShortcut.getDefaultWorkingDirectory(rubyFile.getProject()));
- wc.setAttribute(RubyLaunchConfigurationAttribute.SELECTED_INTERPRETER, RubyRuntime.getCompositeIdFromVM(RubyRuntime.getDefaultVMInstall()));
- // FIXME generate a composite id for the interpreter, not name!
+ wc.setAttribute(IRubyLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME, RubyRuntime.getDefaultVMInstall().getName());
+ wc.setAttribute(IRubyLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE, RubyRuntime.getDefaultVMInstall().getVMInstallType().getId());
wc.setAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, "org.rubypeople.rdt.debug.ui.rubySourceLocator");
config = wc.doSave();
} catch (CoreException ce) {
Modified: trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyEnvironmentTab.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyEnvironmentTab.java 2007-03-01 15:19:46 UTC (rev 2072)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyEnvironmentTab.java 2007-03-02 14:58:34 UTC (rev 2073)
@@ -38,6 +38,7 @@
import org.rubypeople.rdt.internal.debug.ui.rubyvms.RubyVMMessages;
import org.rubypeople.rdt.internal.launching.RubyLaunchConfigurationAttribute;
import org.rubypeople.rdt.internal.ui.RubyPluginImages;
+import org.rubypeople.rdt.launching.IRubyLaunchConfigurationConstants;
import org.rubypeople.rdt.launching.IVMInstall;
import org.rubypeople.rdt.launching.IVMInstallType;
import org.rubypeople.rdt.launching.RubyRuntime;
@@ -46,7 +47,7 @@
public class RubyEnvironmentTab extends AbstractLaunchConfigurationTab {
protected ListViewer loadPathListViewer;
- protected java.util.List installedInterpretersWorkingCopy;
+ protected List installedInterpretersWorkingCopy;
protected Combo interpreterCombo;
@@ -217,7 +218,7 @@
setUseLoadPathDefaults(useDefaultLoadPath);
if (useDefaultLoadPath) {
String projectName = configuration.getAttribute(
- RubyLaunchConfigurationAttribute.PROJECT_NAME, "");
+ IRubyLaunchConfigurationConstants.ATTR_PROJECT_NAME, "");
if (projectName.length() != 0) {
IRubyProject project = RubyModelManager
.getRubyModelManager().getRubyModel()
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyLaunchConfigurationAttribute.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyLaunchConfigurationAttribute.java 2007-03-01 15:19:46 UTC (rev 2072)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyLaunchConfigurationAttribute.java 2007-03-02 14:58:34 UTC (rev 2073)
@@ -40,9 +40,9 @@
static final String PROJECT_NAME = IRubyLaunchConfigurationConstants.ATTR_PROJECT_NAME;
/**
- * @deprecated Please use <code>IRubyLaunchConfigurationConstants.ATTR_RUBY_CONTAINER_PATH</code>
+ * @deprecated Please use <code>IRubyLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME</code>.
*/
- static final String SELECTED_INTERPRETER = IRubyLaunchConfigurationConstants.ATTR_RUBY_CONTAINER_PATH;
+ static final String SELECTED_INTERPRETER = IRubyLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME;
/**
* @deprecated Please use <code>IRubyLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY</code>
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/RubyRuntime.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/RubyRuntime.java 2007-03-01 15:19:46 UTC (rev 2072)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/RubyRuntime.java 2007-03-02 14:58:34 UTC (rev 2073)
@@ -1397,7 +1397,7 @@
/**
* Performs default resolution for a container entry.
- * Delegates to the Java model.
+ * Delegates to the Ruby model.
*/
private static IRuntimeLoadpathEntry[] computeDefaultContainerEntries(IRuntimeLoadpathEntry entry, IRubyProject project) throws CoreException {
if (project == null || entry == null) {
Modified: trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitLaunchShortcut.java
===================================================================
--- trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitLaunchShortcut.java 2007-03-01 15:19:46 UTC (rev 2072)
+++ trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitLaunchShortcut.java 2007-03-02 14:58:34 UTC (rev 2073)
@@ -138,7 +138,8 @@
wc.setAttribute(IRubyLaunchConfigurationConstants.ATTR_PROJECT_NAME, rubyFile.getProject().getName());
wc.setAttribute(IRubyLaunchConfigurationConstants.ATTR_FILE_NAME, TestUnitLaunchConfigurationDelegate.getTestRunnerPath());
wc.setAttribute(IRubyLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, TestUnitLaunchShortcut.getDefaultWorkingDirectory(rubyFile.getProject()));
- wc.setAttribute(IRubyLaunchConfigurationConstants.ATTR_RUBY_CONTAINER_PATH, RubyRuntime.getCompositeIdFromVM(RubyRuntime.getDefaultVMInstall()));
+ wc.setAttribute(IRubyLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME, RubyRuntime.getDefaultVMInstall().getName());
+ wc.setAttribute(IRubyLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE, RubyRuntime.getDefaultVMInstall().getVMInstallType().getId());
wc.setAttribute(TestUnitLaunchConfigurationDelegate.LAUNCH_CONTAINER_ATTR, container);
wc.setAttribute(TestUnitLaunchConfigurationDelegate.TESTNAME_ATTR, testName);
wc.setAttribute(TestUnitLaunchConfigurationDelegate.TESTTYPE_ATTR, "");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|