|
From: <mir...@us...> - 2007-03-07 13:36:36
|
Revision: 2102
http://svn.sourceforge.net/rubyeclipse/?rev=2102&view=rev
Author: mirkostocker
Date: 2007-03-07 05:36:17 -0800 (Wed, 07 Mar 2007)
Log Message:
-----------
Fix for a test I broke while externalizing strings and fix a bug in the docprovider
Modified Paths:
--------------
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/movemethod/messages.properties
trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/documentprovider/DocumentWithIncluding.java
trunk/org.rubypeople.rdt.refactoring.tests/resources/core/movemethod/conditionchecks/move_method_checker_test_1.test_properties
trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/MultipleDocumentsInOneProvider.java
Modified: 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/movemethod/messages.properties 2007-03-06 23:45:56 UTC (rev 2101)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/core/movemethod/messages.properties 2007-03-07 13:36:17 UTC (rev 2102)
@@ -14,8 +14,8 @@
MoveMethodConditionChecker_CannotMoveConstructor=The selected method is a constructor and thus cannot be moved.
MoveMethodConditionChecker_NoTarget=There is no target class where you could move to.
MoveMethodConditionChecker_NoFieldOfTargetType=There is no possible field of the type of the target class.
-MoveMethodConditionChecker_TheMethod=The method
-MoveMethodConditionChecker_CanBeCalledFromOutside=\ can be called from outside of the class
+MoveMethodConditionChecker_TheMethod=The method \"
+MoveMethodConditionChecker_CanBeCalledFromOutside=\" can be called from outside of the class
MoveMethodConditionChecker_MightNotGetReplaced=. Since Ruby is dynamically typed, calls from outside the class definition might not get replaced with calls to the class
MoveMethodConditionChecker_ContainsClassField=" contains the class field "
MoveMethodConditionChecker_MovingMightAffectTheFunctionality=". Moving it might affect the functionality of the class "
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 23:45:56 UTC (rev 2101)
+++ trunk/org.rubypeople.rdt.refactoring/src/org/rubypeople/rdt/refactoring/documentprovider/DocumentWithIncluding.java 2007-03-07 13:36:17 UTC (rev 2102)
@@ -62,14 +62,12 @@
for(String actFileName : candidates) {
String fileName = getFileNameWithoutPath(actFileName);
if(includedFiles.contains(fileName)) {
- addFile(fileName, docProvider.getFileContent(fileName));
- markedForRemoval.add(actFileName);
+ addAndRemove(markedForRemoval, actFileName, fileName);
continue;
}
for (FCallNode node : getRequires(actFileName)) {
if(nodeRequiresMe(node)) {
- addFile(fileName, docProvider.getFileContent(fileName));
- markedForRemoval.add(actFileName);
+ addAndRemove(markedForRemoval, actFileName, fileName);
}
}
}
@@ -78,6 +76,11 @@
} while(markedForRemoval.size() > 0);
}
+ private void addAndRemove(ArrayList<String> markedForRemoval, String actFileName, String fileName) {
+ addFile(fileName, docProvider.getFileContent(actFileName));
+ markedForRemoval.add(actFileName);
+ }
+
private String cutProjectPath(String fileName) {
return fileName.substring(fileName.lastIndexOf('/') + 1);
Modified: trunk/org.rubypeople.rdt.refactoring.tests/resources/core/movemethod/conditionchecks/move_method_checker_test_1.test_properties
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/resources/core/movemethod/conditionchecks/move_method_checker_test_1.test_properties 2007-03-06 23:45:56 UTC (rev 2101)
+++ trunk/org.rubypeople.rdt.refactoring.tests/resources/core/movemethod/conditionchecks/move_method_checker_test_1.test_properties 2007-03-07 13:36:17 UTC (rev 2102)
@@ -5,7 +5,7 @@
# Optional value
selectedField=@myB
finalWarning0=An attr_reader for the field x will be generated.
-finalWarning1=The method moveMethod can be called from outside of the class A. Since Ruby is dynamically typed, calls from outside the class definition might not get replaced with calls to the class B.
+finalWarning1=The method "moveMethod" can be called from outside of the class A. Since Ruby is dynamically typed, calls from outside the class definition might not get replaced with calls to the class B.
finalWarning2=The method "moveMethod" contains the class field "@@a". Moving it might affect the functionality of the class "A".
finalWarning3=The visibility of method method1 will be changed to public.
finalWarning4=The visibility of method method2 will be changed to public.
Modified: trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/MultipleDocumentsInOneProvider.java
===================================================================
--- trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/MultipleDocumentsInOneProvider.java 2007-03-06 23:45:56 UTC (rev 2101)
+++ trunk/org.rubypeople.rdt.refactoring.tests/src/org/rubypeople/rdt/refactoring/tests/core/MultipleDocumentsInOneProvider.java 2007-03-07 13:36:17 UTC (rev 2102)
@@ -88,7 +88,6 @@
}
public String getFileContent(String currentFileName) {
- assert "".equals(currentFileName) : "Should always equal getActiveFileName()";
return getActiveFileContent();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|