Community
Participate
Working Groups
In class: package p; public class ScriptTest { public void foo(){ } } 1. Add a new Parameter String ... s with default "Hallo" 2. Apply refactoring 3. Create a refactoring script 4. Undo refactoring 5. Apply refactoring script 6. It fails because the string tokenizer does not recognize the whitespace in the type correctly You need to have applied the Patch of bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=194636
A solution would be to use ; instead of whitepaces. But this would break already persisted refactorings. If there are any users of scriptable refactoring it would be bad if CSR would not be backward compatible as this might be a major use of scriptable refactorings. The main problem addressed here is that properties are not persisted in an independant manner. Which means, writing arguments into an attribute of a xml file that are seperated by whitespaces or any other seperator removes the logical context which hinders other humans to understand the XML.
As discussed, the types should be stored in a 'normalized' format, without any white spaces. If the user entered 'String []', the refactorings don't need to follow this format, but can reformat that with the project's formatter settings.
Created attachment 72694 [details] Better testing Does no longer perform checks of deleted ParameterInfo Gives added/deleted parameters special names Testing is improved Returntype is set correctly
patch released > 20070628