|
From: <cal...@us...> - 2007-03-12 11:39:39
|
Revision: 2130
http://svn.sourceforge.net/rubyeclipse/?rev=2130&view=rev
Author: callandor1983
Date: 2007-03-12 04:39:36 -0700 (Mon, 12 Mar 2007)
Log Message:
-----------
inline local: parentheses are now set if selected callNode contains only one argument.
Modified Paths:
--------------
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/inlinelocal/InlineTempConditionChecker.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinelocal/TempInliner.java
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinelocal/TempValueReplaceProvider.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/ui/pages/OccurenceReplaceSelectionPage.java
trunk/org.rubypeople.rdt.refactoring.tests/.classpath
Added Paths:
-----------
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/util/JRubyRefactoringUtils.java
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/inlinetemp/inline_temp_test_11.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/inlinetemp/inline_temp_test_11.test_result
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/inlinetemp/inline_temp_test_11.test_source
Removed Paths:
-------------
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/JRubyRefactoringUtils.java
Deleted: 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-12 09:25:00 UTC (rev 2129)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/JRubyRefactoringUtils.java 2007-03-12 11:39:36 UTC (rev 2130)
@@ -1,106 +0,0 @@
-/***** BEGIN LICENSE BLOCK *****
- * Version: CPL 1.0/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Common Public
- * License Version 1.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.eclipse.org/legal/cpl-v10.html
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * Copyright (C) 2006 Lukas Felber <lf...@hs...>
- * Copyright (C) 2006 Mirko Stocker <me...@mi...>
- * Copyright (C) 2006 Thomas Corbat <tc...@hs...>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the CPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the CPL, the GPL or the LGPL.
- ***** END LICENSE BLOCK *****/
-
-package org.rubypeople.rdt.refactoring;
-
-import org.jruby.ast.ArgsNode;
-import org.jruby.ast.ArgumentNode;
-import org.jruby.ast.CallNode;
-import org.jruby.ast.ListNode;
-import org.jruby.ast.MethodDefNode;
-import org.jruby.ast.Node;
-import org.rubypeople.rdt.refactoring.nodewrapper.LocalNodeWrapper;
-
-public abstract class JRubyRefactoringUtils {
-
- public static boolean isParameter(LocalNodeWrapper selectedItem, MethodDefNode enclosingMethod) {
- return isParameter(enclosingMethod.getScope().getVariables()[selectedItem.getId()], enclosingMethod);
- }
-
- public static boolean isParameter(String name, MethodDefNode enclosingMethod) {
- ArgsNode argsNode = enclosingMethod.getArgsNode();
- ListNode argumentList = argsNode.getArgs();
-
- if (argumentList == null) {
- return false;
- }
-
- for (Object currentArg : argumentList.childNodes()) {
- if (currentArg instanceof ArgumentNode) {
- ArgumentNode arg = (ArgumentNode) currentArg;
- if (arg.getName().equals(name)) {
- return true;
- }
- }
- }
- return false;
- }
-
-
- public static boolean isMathematicalExpression(Node node) {
-
- if (!(node instanceof CallNode)) {
- return false;
- }
-
- String name = ((CallNode) node).getName();
-
- 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)) {
- return true;
- }
- }
- return false;
- }
-
- public static boolean hasSamePosition(Node node1, Node node2){
- String file1 = node1.getPosition().getFile();
- String file2 = node2.getPosition().getFile();
- if(!file1.equals(file2)){
- return false;
- }
-
- int start1 = node1.getPosition().getStartOffset();
- int start2 = node2.getPosition().getStartOffset();
- if(start1 != start2){
- return false;
- }
-
- int end1 = node1.getPosition().getEndOffset();
- int end2 = node2.getPosition().getEndOffset();
- if(end1 != end2){
- return false;
- }
- return true;
- }
-}
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-12 09:25:00 UTC (rev 2129)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/converttemptofield/TempToFieldConditionChecker.java 2007-03-12 11:39:36 UTC (rev 2130)
@@ -40,7 +40,6 @@
import org.jruby.ast.MethodDefNode;
import org.jruby.ast.Node;
import org.jruby.ast.RootNode;
-import org.rubypeople.rdt.refactoring.JRubyRefactoringUtils;
import org.rubypeople.rdt.refactoring.core.NodeProvider;
import org.rubypeople.rdt.refactoring.core.RefactoringConditionChecker;
import org.rubypeople.rdt.refactoring.core.SelectionNodeProvider;
@@ -48,6 +47,7 @@
import org.rubypeople.rdt.refactoring.nodewrapper.ClassNodeWrapper;
import org.rubypeople.rdt.refactoring.nodewrapper.FieldNodeWrapper;
import org.rubypeople.rdt.refactoring.nodewrapper.LocalNodeWrapper;
+import org.rubypeople.rdt.refactoring.util.JRubyRefactoringUtils;
public class TempToFieldConditionChecker extends RefactoringConditionChecker {
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinelocal/InlineTempConditionChecker.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinelocal/InlineTempConditionChecker.java 2007-03-12 09:25:00 UTC (rev 2129)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinelocal/InlineTempConditionChecker.java 2007-03-12 11:39:36 UTC (rev 2130)
@@ -40,11 +40,11 @@
import org.jruby.ast.Node;
import org.jruby.ast.RootNode;
import org.jruby.lexer.yacc.ISourcePosition;
-import org.rubypeople.rdt.refactoring.JRubyRefactoringUtils;
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.nodewrapper.LocalNodeWrapper;
+import org.rubypeople.rdt.refactoring.util.JRubyRefactoringUtils;
import org.rubypeople.rdt.refactoring.util.NodeUtil;
public class InlineTempConditionChecker extends RefactoringConditionChecker {
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinelocal/TempInliner.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinelocal/TempInliner.java 2007-03-12 09:25:00 UTC (rev 2129)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinelocal/TempInliner.java 2007-03-12 11:39:36 UTC (rev 2130)
@@ -33,7 +33,6 @@
import java.util.ArrayList;
import java.util.Collection;
-import org.rubypeople.rdt.refactoring.JRubyRefactoringUtils;
import org.rubypeople.rdt.refactoring.core.SelectionInformation;
import org.rubypeople.rdt.refactoring.core.extractmethod.ExtractMethodConditionChecker;
import org.rubypeople.rdt.refactoring.core.extractmethod.ExtractMethodConfig;
@@ -42,6 +41,7 @@
import org.rubypeople.rdt.refactoring.editprovider.EditProvider;
import org.rubypeople.rdt.refactoring.editprovider.MultiEditProvider;
import org.rubypeople.rdt.refactoring.nodewrapper.LocalNodeWrapper;
+import org.rubypeople.rdt.refactoring.util.JRubyRefactoringUtils;
public class TempInliner extends MultiEditProvider {
@@ -78,7 +78,7 @@
private EditProvider replaceWithValueProvider(LocalNodeWrapper targetNode) {
boolean addBrackets = JRubyRefactoringUtils.isMathematicalExpression(config.getDefinitionNode().getValueNode());
- return new TempValueReplaceProvider(targetNode, config.getDefinitionNode(), addBrackets);
+ return new TempValueReplaceProvider(targetNode, config, addBrackets);
}
private EditProvider extractMethodProvider() {
Modified: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinelocal/TempValueReplaceProvider.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinelocal/TempValueReplaceProvider.java 2007-03-12 09:25:00 UTC (rev 2129)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinelocal/TempValueReplaceProvider.java 2007-03-12 11:39:36 UTC (rev 2130)
@@ -30,10 +30,18 @@
package org.rubypeople.rdt.refactoring.core.inlinelocal;
+
+import org.jruby.ast.CallNode;
import org.jruby.ast.Node;
+import org.jruby.ast.visitor.rewriter.DefaultFormatHelper;
+import org.jruby.ast.visitor.rewriter.FormatHelper;
import org.jruby.lexer.yacc.ISourcePosition;
+import org.rubypeople.rdt.refactoring.core.NodeProvider;
import org.rubypeople.rdt.refactoring.editprovider.ReplaceEditProvider;
import org.rubypeople.rdt.refactoring.nodewrapper.LocalNodeWrapper;
+import org.rubypeople.rdt.refactoring.nodewrapper.MethodCallNodeWrapper;
+import org.rubypeople.rdt.refactoring.util.JRubyRefactoringUtils;
+import org.rubypeople.rdt.refactoring.util.NodeUtil;
public class TempValueReplaceProvider extends ReplaceEditProvider {
@@ -43,9 +51,12 @@
private boolean addBrackets;
- public TempValueReplaceProvider(LocalNodeWrapper targetNode, LocalNodeWrapper inlinedNode, boolean addBrackets) {
+ private InlineTempConfig config;
+
+ public TempValueReplaceProvider(LocalNodeWrapper targetNode, InlineTempConfig config, boolean addBrackets) {
super(false);
- this.inlinedNode = inlinedNode;
+ this.config = config;
+ this.inlinedNode = config.getDefinitionNode();
this.targetNode = targetNode;
this.addBrackets = addBrackets;
}
@@ -72,4 +83,36 @@
}
return super.getFormatedNode(document);
}
+
+ @Override
+ protected FormatHelper getFormatHelper() {
+ if(callNeedsBrackets()) {
+ return new DefaultFormatHelper() {
+
+ @Override
+ public String afterCallArguments() {
+ return ")";
+ }
+
+ @Override
+ public String beforeCallArguments() {
+ return "(";
+ }};
+ } else {
+ return super.getFormatHelper();
+ }
+ }
+
+ private boolean callNeedsBrackets() {
+ Node targetEnclosingNode = NodeProvider.findParentNode(config.getDocumentProvider().getActiveFileRootNode(), targetNode.getWrappedNode());
+ boolean isTargetEnclosingNodeCallNode = NodeUtil.nodeAssignableFrom(targetEnclosingNode, MethodCallNodeWrapper.METHOD_CALL_NODE_CLASSES());
+ if(NodeUtil.nodeAssignableFrom(targetEnclosingNode, CallNode.class)) {
+ isTargetEnclosingNodeCallNode &= !JRubyRefactoringUtils.isMathematicalExpression(targetEnclosingNode);
+ }
+ boolean isInlinedNodeCallNode = NodeUtil.nodeAssignableFrom(inlinedNode.getValueNode(), MethodCallNodeWrapper.METHOD_CALL_NODE_CLASSES());
+ if(NodeUtil.nodeAssignableFrom(inlinedNode.getValueNode(), CallNode.class)) {
+ isInlinedNodeCallNode &= !JRubyRefactoringUtils.isMathematicalExpression(inlinedNode.getValueNode());
+ }
+ return isTargetEnclosingNodeCallNode && isInlinedNodeCallNode;
+ }
}
Modified: 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/MethodBodyStatementReplacer.java 2007-03-12 09:25:00 UTC (rev 2129)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/inlinemethod/MethodBodyStatementReplacer.java 2007-03-12 11:39:36 UTC (rev 2130)
@@ -75,7 +75,11 @@
Collection<Node> varNodes = null;
do {
varNodes = NodeProvider.gatherNodesOfTypeInAktScopeNode(result.getActiveFileRootNode().getBodyNode(), InstVarNode.class, InstAsgnNode.class);
-
+ for(Node actVarNode : new ArrayList<Node>(varNodes)) {
+ if(((INameNode)actVarNode).getName().equals(object)) {
+ varNodes.remove(actVarNode);
+ }
+ }
if(varNodes.isEmpty()) {
continue;
}
Modified: 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/OccurenceReplaceSelectionPage.java 2007-03-12 09:25:00 UTC (rev 2129)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/ui/pages/OccurenceReplaceSelectionPage.java 2007-03-12 11:39:36 UTC (rev 2130)
@@ -43,11 +43,11 @@
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableItem;
import org.jruby.lexer.yacc.ISourcePosition;
-import org.rubypeople.rdt.refactoring.JRubyRefactoringUtils;
import org.rubypeople.rdt.refactoring.core.renamemethod.NodeSelector;
import org.rubypeople.rdt.refactoring.documentprovider.IDocumentProvider;
import org.rubypeople.rdt.refactoring.nodewrapper.INodeWrapper;
import org.rubypeople.rdt.refactoring.ui.RdtCodeViewer;
+import org.rubypeople.rdt.refactoring.util.JRubyRefactoringUtils;
public class OccurenceReplaceSelectionPage extends RefactoringWizardPage {
Copied: trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/util/JRubyRefactoringUtils.java (from rev 2109, trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/JRubyRefactoringUtils.java)
===================================================================
--- trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/util/JRubyRefactoringUtils.java (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/util/JRubyRefactoringUtils.java 2007-03-12 11:39:36 UTC (rev 2130)
@@ -0,0 +1,106 @@
+/***** BEGIN LICENSE BLOCK *****
+ * Version: CPL 1.0/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Common Public
+ * License Version 1.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * Copyright (C) 2006 Lukas Felber <lf...@hs...>
+ * Copyright (C) 2006 Mirko Stocker <me...@mi...>
+ * Copyright (C) 2006 Thomas Corbat <tc...@hs...>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either of the GNU General Public License Version 2 or later (the "GPL"),
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the CPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the CPL, the GPL or the LGPL.
+ ***** END LICENSE BLOCK *****/
+
+package org.rubypeople.rdt.refactoring.util;
+
+import org.jruby.ast.ArgsNode;
+import org.jruby.ast.ArgumentNode;
+import org.jruby.ast.CallNode;
+import org.jruby.ast.ListNode;
+import org.jruby.ast.MethodDefNode;
+import org.jruby.ast.Node;
+import org.rubypeople.rdt.refactoring.nodewrapper.LocalNodeWrapper;
+
+public abstract class JRubyRefactoringUtils {
+
+ public static boolean isParameter(LocalNodeWrapper selectedItem, MethodDefNode enclosingMethod) {
+ return isParameter(enclosingMethod.getScope().getVariables()[selectedItem.getId()], enclosingMethod);
+ }
+
+ public static boolean isParameter(String name, MethodDefNode enclosingMethod) {
+ ArgsNode argsNode = enclosingMethod.getArgsNode();
+ ListNode argumentList = argsNode.getArgs();
+
+ if (argumentList == null) {
+ return false;
+ }
+
+ for (Object currentArg : argumentList.childNodes()) {
+ if (currentArg instanceof ArgumentNode) {
+ ArgumentNode arg = (ArgumentNode) currentArg;
+ if (arg.getName().equals(name)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+
+ public static boolean isMathematicalExpression(Node node) {
+
+ if (!(node instanceof CallNode)) {
+ return false;
+ }
+
+ String name = ((CallNode) node).getName();
+
+ 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)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public static boolean hasSamePosition(Node node1, Node node2){
+ String file1 = node1.getPosition().getFile();
+ String file2 = node2.getPosition().getFile();
+ if(!file1.equals(file2)){
+ return false;
+ }
+
+ int start1 = node1.getPosition().getStartOffset();
+ int start2 = node2.getPosition().getStartOffset();
+ if(start1 != start2){
+ return false;
+ }
+
+ int end1 = node1.getPosition().getEndOffset();
+ int end2 = node2.getPosition().getEndOffset();
+ if(end1 != end2){
+ return false;
+ }
+ return true;
+ }
+}
Modified: trunk/org.rubypeople.rdt.refactoring.tests/.classpath
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/.classpath 2007-03-12 09:25:00 UTC (rev 2129)
+++ trunk/org.rubypeople.rdt.refactoring.tests/.classpath 2007-03-12 11:39:36 UTC (rev 2130)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
+ <classpathentry excluding="*" kind="src" path="resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
Added: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/inlinetemp/inline_temp_test_11.test_properties
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/inlinetemp/inline_temp_test_11.test_properties (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/inlinetemp/inline_temp_test_11.test_properties 2007-03-12 11:39:36 UTC (rev 2130)
@@ -0,0 +1,3 @@
+caretPosition=67
+replaceWithQuery=false
+newMethodName=
\ No newline at end of file
Added: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/inlinetemp/inline_temp_test_11.test_result
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/inlinetemp/inline_temp_test_11.test_result (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/inlinetemp/inline_temp_test_11.test_result 2007-03-12 11:39:36 UTC (rev 2130)
@@ -0,0 +1,5 @@
+ def read_content(url)
+ FeedTools::Feed.open(url).items.each do |item|
+ #...
+ end
+ end
\ No newline at end of file
Added: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/inlinetemp/inline_temp_test_11.test_source
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/inlinetemp/inline_temp_test_11.test_source (rev 0)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/inlinetemp/inline_temp_test_11.test_source 2007-03-12 11:39:36 UTC (rev 2130)
@@ -0,0 +1,6 @@
+ def read_content(url)
+ feed = FeedTools::Feed.open(url)
+ feed.items.each do |item|
+ #...
+ end
+ end
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|