move refactoryBuilder and codeBuilder to CustomCodeGeneratorOrRefactoring
authorJakub Nesveda <jakubnesveda@seznam.cz>
Sat, 23 Aug 2014 16:41:05 +0200
changeset 634 d77d9a7561be
parent 633 933b7e644aaf
child 635 9edd6a278835
child 636 a7f9fcc82017
move refactoryBuilder and codeBuilder to CustomCodeGeneratorOrRefactoring
CustomAccessMethodsCodeGenerator.st
CustomAccessMethodsCodeGeneratorTests.st
CustomChangeNotificationAccessMethodsCodeGeneratorTests.st
CustomChangeNotificationSetterMethodsCodeGenerator.st
CustomChangeNotificationSetterMethodsCodeGeneratorTests.st
CustomCodeGenerator.st
CustomCodeGeneratorClassGenerator.st
CustomCodeGeneratorClassGeneratorTests.st
CustomCodeGeneratorOrRefactoring.st
CustomCodeGeneratorOrRefactoringTestCase.st
CustomCodeGeneratorOrRefactoringTestCaseTests.st
CustomCodeGeneratorTestCase.st
CustomCodeGeneratorTestCaseCodeGenerator.st
CustomCodeGeneratorTestCaseTests.st
CustomCodeGeneratorTests.st
CustomCodeGeneratorUserPreferencesTests.st
CustomCodeSelectionToResourceTranslation.st
CustomDefaultGetterMethodsCodeGenerator.st
CustomDefaultGetterMethodsCodeGeneratorTests.st
CustomLazyInitializationAccessMethodsCodeGeneratorTests.st
CustomLazyInitializationGetterMethodsCodeGenerator.st
CustomLazyInitializationGetterMethodsCodeGeneratorTests.st
CustomLocalChangeManager.st
CustomMultiSetterMethodsCodeGenerator.st
CustomMultiSetterMethodsCodeGeneratorTests.st
CustomRefactoring.st
CustomRefactoryBuilder.st
CustomReplaceIfNilWithIfTrueRefactoring.st
CustomReplaceIfNilWithIfTrueRefactoringTests.st
CustomSimpleAccessMethodsCodeGeneratorTests.st
CustomSimpleGetterMethodsCodeGenerator.st
CustomSimpleGetterMethodsCodeGeneratorTests.st
CustomSimpleSetterMethodsCodeGenerator.st
CustomSimpleSetterMethodsCodeGeneratorTests.st
CustomSimpleTestCaseCodeGenerator.st
CustomSourceCodeBuilder.st
CustomSourceCodeBuilderTests.st
CustomSubclassResponsibilityCodeGenerator.st
CustomTestCaseCodeGenerator.st
CustomValueHolderAccessMethodsCodeGeneratorTests.st
CustomValueHolderGetterMethodsCodeGenerator.st
CustomValueHolderGetterMethodsCodeGeneratorTests.st
CustomValueHolderWithChangeNotificationAccessMethodsCodeGeneratorTests.st
CustomValueHolderWithChangeNotificationGetterMethodsCodeGenerator.st
CustomValueHolderWithChangeNotificationGetterMethodsCodeGeneratorTests.st
CustomValueHolderWithChangeNotificationSetterMethodsCodeGenerator.st
CustomValueHolderWithChangeNotificationSetterMethodsCodeGeneratorTests.st
CustomVisitorCodeGenerator.st
CustomVisitorCodeGeneratorAcceptVisitorTests.st
CustomVisitorCodeGeneratorTests.st
Make.proto
Make.spec
abbrev.stc
bc.mak
jn_refactoring_custom.st
libInit.cc
refactoring_custom.rc
--- a/CustomAccessMethodsCodeGenerator.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomAccessMethodsCodeGenerator.st	Sat Aug 23 16:41:05 2014 +0200
@@ -78,7 +78,7 @@
 
             source := self sourceForClass: class variableName: variableName.
 
-            method := builder createMethod.
+            method := codeBuilder createMethod.
             method 
                 class: (self methodClass: class);
                 protocol: self protocol;
--- a/CustomAccessMethodsCodeGeneratorTests.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomAccessMethodsCodeGeneratorTests.st	Sat Aug 23 16:41:05 2014 +0200
@@ -1,6 +1,6 @@
 "{ Package: 'jn:refactoring_custom' }"
 
-CustomCodeGeneratorTestCase subclass:#CustomAccessMethodsCodeGeneratorTests
+CustomCodeGeneratorOrRefactoringTestCase subclass:#CustomAccessMethodsCodeGeneratorTests
 	instanceVariableNames:'expectedSource class'
 	classVariableNames:''
 	poolDictionaries:''
@@ -10,9 +10,8 @@
 
 !CustomAccessMethodsCodeGeneratorTests methodsFor:'accessing'!
 
-generator
-
-    ^ mock mockOf: CustomAccessMethodsCodeGenerator
+generatorOrRefactoring
+    ^ mock mockOf:CustomAccessMethodsCodeGenerator
 
     "Modified: / 01-07-2014 / 16:19:16 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 ! !
@@ -22,7 +21,7 @@
 test_arg_name_for_method_name_boolean
     | actualArgName |
 
-    actualArgName := generator argNameForMethodName: 'isSomething'.
+    actualArgName := generatorOrRefactoring argNameForMethodName: 'isSomething'.
 
     self assert: 'aBoolean' = actualArgName
 
@@ -32,7 +31,7 @@
 test_arg_name_for_method_name_other
     | actualArgName |
 
-    actualArgName := generator argNameForMethodName: 'selector'.
+    actualArgName := generatorOrRefactoring argNameForMethodName: 'selector'.
 
     self assert: 'something' = actualArgName
 
@@ -47,7 +46,7 @@
 
     context selectedClasses: (Array with: class).
 
-    generator mockSelector: #sourceForClass:variableName: withBlockValue: [
+    generatorOrRefactoring mockSelector: #sourceForClass:variableName: withBlockValue: [
         :aClass :varName |
 
         ^ varName, ' ^ ', varName. 
@@ -55,7 +54,7 @@
 
     methodCount := class methodDictionary size.
 
-    generator executeInContext: context.
+    generatorOrRefactoring executeInContext: context.
 
     self assert: (methodCount + 3) = class methodDictionary size.
 
@@ -83,7 +82,7 @@
     context selectedClasses: (Array with: class).
     context selectedVariables: (Array with: 'instanceVariable_02').
 
-    generator mockSelector: #sourceForClass:variableName: withBlockValue: [
+    generatorOrRefactoring mockSelector: #sourceForClass:variableName: withBlockValue: [
         :aClass :varName |
 
         ^ varName, ' ^ ', varName. 
@@ -91,7 +90,7 @@
 
     methodCount := class methodDictionary size.
 
-    generator executeInContext: context.
+    generatorOrRefactoring executeInContext: context.
 
     self assert: (methodCount + 1) = class methodDictionary size.
 
@@ -112,7 +111,7 @@
     context selectedClasses: (Array with: class).
     context selectedVariables: (Array with: 'instanceVariable_02' with: 'instanceVariable_01').
 
-    generator mockSelector: #sourceForClass:variableName: withBlockValue: [
+    generatorOrRefactoring mockSelector: #sourceForClass:variableName: withBlockValue: [
         :aClass :varName |
 
         ^ varName, ' ^ ', varName. 
@@ -120,7 +119,7 @@
 
     methodCount := class methodDictionary size.
 
-    generator executeInContext: context.
+    generatorOrRefactoring executeInContext: context.
 
     self assert: (methodCount + 2) = class methodDictionary size.
 
@@ -138,7 +137,7 @@
 test_default_method_name_for_variable_name
     | actualDefaultMethodName |
 
-    actualDefaultMethodName := generator defaultMethodNameFor: 'varName'.
+    actualDefaultMethodName := generatorOrRefactoring defaultMethodNameFor: 'varName'.
 
     self assert: 'defaultVarName' = actualDefaultMethodName
 
@@ -148,7 +147,7 @@
 test_method_name_for_all_upper_case
     | actualMethodName |
 
-    actualMethodName := generator methodNameFor: 'VAR'.
+    actualMethodName := generatorOrRefactoring methodNameFor: 'VAR'.
 
     self assert: 'VAR' = actualMethodName
 
@@ -158,7 +157,7 @@
 test_method_name_for_class_variable
     | actualMethodName |
 
-    actualMethodName := generator methodNameFor: 'ClassVar'.
+    actualMethodName := generatorOrRefactoring methodNameFor: 'ClassVar'.
 
     self assert: 'classVar' = actualMethodName
 
@@ -167,7 +166,7 @@
 
 test_method_name_for_instance_variable
 
-    self assert: 'instVar' = (generator methodNameFor: 'instVar')
+    self assert: 'instVar' = (generatorOrRefactoring methodNameFor: 'instVar')
 
     "Created: / 20-06-2014 / 20:35:22 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 !
@@ -175,7 +174,7 @@
 test_method_name_for_number
     | actualMethodName |
 
-    actualMethodName := generator methodNameFor: 'Var_7'.
+    actualMethodName := generatorOrRefactoring methodNameFor: 'Var_7'.
 
     self assert: 'var_7' = actualMethodName
 
@@ -192,7 +191,7 @@
 
     self assert: class isMeta.
 
-    actualVarType := generator varTypeOf: 'ClassInstVar2' class: class.
+    actualVarType := generatorOrRefactoring varTypeOf: 'ClassInstVar2' class: class.
 
     self assert: 'classInstVar' = actualVarType
 
@@ -205,7 +204,7 @@
     class := self createClass.
     class instanceVariableNames: 'instVar1 instVar2'.
 
-    actualVarType := generator varTypeOf: 'instVar2' class: class.
+    actualVarType := generatorOrRefactoring varTypeOf: 'instVar2' class: class.
 
     self assert: 'instance' = actualVarType
 
@@ -218,7 +217,7 @@
     class := self createClass.
     class classVariableNames: 'ClassVar1 ClassVar2'.
 
-    actualVarType := generator varTypeOf: 'ClassVar2' class: class.
+    actualVarType := generatorOrRefactoring varTypeOf: 'ClassVar2' class: class.
 
     self assert: 'static' = actualVarType
 
--- a/CustomChangeNotificationAccessMethodsCodeGeneratorTests.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomChangeNotificationAccessMethodsCodeGeneratorTests.st	Sat Aug 23 16:41:05 2014 +0200
@@ -1,6 +1,6 @@
 "{ Package: 'jn:refactoring_custom' }"
 
-CustomCodeGeneratorTestCase subclass:#CustomChangeNotificationAccessMethodsCodeGeneratorTests
+CustomCodeGeneratorOrRefactoringTestCase subclass:#CustomChangeNotificationAccessMethodsCodeGeneratorTests
 	instanceVariableNames:''
 	classVariableNames:''
 	poolDictionaries:''
@@ -10,7 +10,7 @@
 
 !CustomChangeNotificationAccessMethodsCodeGeneratorTests methodsFor:'accessing'!
 
-generator
+generatorOrRefactoring
     ^ CustomChangeNotificationAccessMethodsCodeGenerator new
 ! !
 
--- a/CustomChangeNotificationSetterMethodsCodeGenerator.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomChangeNotificationSetterMethodsCodeGenerator.st	Sat Aug 23 16:41:05 2014 +0200
@@ -45,7 +45,7 @@
         comment := comment bindWith: varType with: aName.
     ].
 
-    methodBuilder := builder methodBuilder.
+    methodBuilder := codeBuilder methodBuilder.
     methodBuilder
         source: '`@methodName
             `"comment
--- a/CustomChangeNotificationSetterMethodsCodeGeneratorTests.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomChangeNotificationSetterMethodsCodeGeneratorTests.st	Sat Aug 23 16:41:05 2014 +0200
@@ -1,6 +1,6 @@
 "{ Package: 'jn:refactoring_custom' }"
 
-CustomCodeGeneratorTestCase subclass:#CustomChangeNotificationSetterMethodsCodeGeneratorTests
+CustomCodeGeneratorOrRefactoringTestCase subclass:#CustomChangeNotificationSetterMethodsCodeGeneratorTests
 	instanceVariableNames:''
 	classVariableNames:''
 	poolDictionaries:''
@@ -9,7 +9,7 @@
 
 !CustomChangeNotificationSetterMethodsCodeGeneratorTests methodsFor:'accessing'!
 
-generator
+generatorOrRefactoring
     ^ CustomChangeNotificationSetterMethodsCodeGenerator new
 ! !
 
--- a/CustomCodeGenerator.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomCodeGenerator.st	Sat Aug 23 16:41:05 2014 +0200
@@ -10,17 +10,12 @@
 
 !CustomCodeGenerator class methodsFor:'instance creation'!
 
-new
-    "return an initialized instance"
-
-    ^ self basicNew initialize.
-!
-
 subGeneratorOf: aCodeGenerator
     | codeGenerator nestingCount |
 
     codeGenerator := self new.
-    codeGenerator builder: aCodeGenerator builder.
+    codeGenerator codeBuilder: aCodeGenerator codeBuilder.
+    codeGenerator refactoryBuilder: aCodeGenerator refactoryBuilder.
     codeGenerator userPreferences: aCodeGenerator userPreferences.
     codeGenerator dialog: aCodeGenerator dialog.
     codeGenerator changeManager: aCodeGenerator changeManager.
@@ -33,7 +28,7 @@
     ^ codeGenerator
 
     "Created: / 19-04-2014 / 10:15:21 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-    "Modified: / 08-07-2014 / 16:57:32 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 23-08-2014 / 00:10:17 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 ! !
 
 !CustomCodeGenerator class methodsFor:'testing'!
@@ -53,18 +48,6 @@
     "Created: / 18-03-2014 / 22:52:09 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 !
 
-executeInContext: aCustomContext
-
-    self startCollectChanges.       
-    self buildInContext: aCustomContext.
-    self addBuilderChanges.
-    self executeChangesInContext: aCustomContext changesName: self class description.
-
-    "Created: / 19-03-2014 / 18:45:26 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-    "Modified: / 03-04-2014 / 11:04:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 07-08-2014 / 23:22:11 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
 executeSubGeneratorClasses: aSubGeneratorClasses inContext: aCustomContext
 
      aSubGeneratorClasses do: [ :aSubGeneratorClass | 
@@ -77,52 +60,6 @@
     "Created: / 08-07-2014 / 18:31:10 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 ! !
 
-!CustomCodeGenerator methodsFor:'initialization'!
-
-initialize
-
-    super initialize.
-    self setUpBuilder.
-    self setUpDialog.
-    self setUpChangeManager
-
-    "Created: / 17-03-2014 / 22:27:32 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-    "Modified: / 09-06-2014 / 22:58:10 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-setUpBuilder
-
-    builder := CustomSourceCodeBuilder new.
-
-    "Created: / 09-06-2014 / 22:56:10 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-setUpChangeManager
-
-    changeManager := CustomBrowserChangeManager new.
-
-    "Created: / 09-06-2014 / 22:56:56 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-setUpDialog
-
-    dialog := CustomUserDialog new.
-
-    "Created: / 09-06-2014 / 22:57:08 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-! !
-
-!CustomCodeGenerator methodsFor:'private'!
-
-addSource: source
-
-    source sourceExists ifFalse: [
-        self addChange: (source change).
-    ]
-
-    "Created: / 01-04-2014 / 21:53:54 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-    "Modified: / 10-04-2014 / 23:07:53 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-! !
-
 !CustomCodeGenerator class methodsFor:'documentation'!
 
 version_HG
--- a/CustomCodeGeneratorClassGenerator.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomCodeGeneratorClassGenerator.st	Sat Aug 23 16:41:05 2014 +0200
@@ -55,7 +55,7 @@
 
     | subContext generator class |
 
-    class := builder createClass.
+    class := codeBuilder createClass.
     class
         superclassName: 'CustomCodeGenerator';
         className: aClassName.
--- a/CustomCodeGeneratorClassGeneratorTests.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomCodeGeneratorClassGeneratorTests.st	Sat Aug 23 16:41:05 2014 +0200
@@ -20,7 +20,7 @@
     self assert: (Smalltalk classNamed: testClassName) isNil.
 
     codeGenerator buildForClassName: testClassName.
-    codeGenerator builder compile.
+    codeGenerator codeBuilder compile.
 
     self assert: (Smalltalk classNamed: testClassName) isNil not.
     self assert: ((Smalltalk classNamed: testClassName) includesSelector: #buildInContext:).
@@ -31,7 +31,7 @@
     (Smalltalk classNamed: testClassName) removeFromSystem.
 
     "Created: / 31-03-2014 / 23:20:33 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-    "Modified: / 26-04-2014 / 00:24:55 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 23-08-2014 / 00:09:01 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 !
 
 test_code_generator_class_created_with_mock_dialog
--- a/CustomCodeGeneratorOrRefactoring.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomCodeGeneratorOrRefactoring.st	Sat Aug 23 16:41:05 2014 +0200
@@ -1,13 +1,21 @@
 "{ Package: 'jn:refactoring_custom' }"
 
 CodeGeneratorTool subclass:#CustomCodeGeneratorOrRefactoring
-	instanceVariableNames:'dialog changeManager builder'
+	instanceVariableNames:'dialog changeManager codeBuilder refactoryBuilder'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'Interface-Refactoring-Custom'
 !
 
 
+!CustomCodeGeneratorOrRefactoring class methodsFor:'instance creation'!
+
+new
+    "return an initialized instance"
+
+    ^ self basicNew initialize.
+! !
+
 !CustomCodeGeneratorOrRefactoring class methodsFor:'accessing-presentation'!
 
 description
@@ -90,20 +98,6 @@
 
 !CustomCodeGeneratorOrRefactoring methodsFor:'accessing'!
 
-builder
-
-    ^ builder
-
-    "Created: / 19-04-2014 / 10:16:28 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-builder: aBuilder
-
-    builder := aBuilder
-
-    "Created: / 19-04-2014 / 09:17:03 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
 changeManager
 
     ^ changeManager
@@ -118,6 +112,20 @@
     "Created: / 31-05-2014 / 13:30:02 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 !
 
+codeBuilder
+
+    ^ codeBuilder
+
+    "Created: / 23-08-2014 / 00:13:43 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+codeBuilder: aBuilder
+
+    codeBuilder := aBuilder
+
+    "Created: / 23-08-2014 / 00:13:26 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
 compositeChangeCollector
 
     ^ compositeChangeCollector
@@ -160,6 +168,20 @@
     "Created: / 11-05-2014 / 00:27:49 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 !
 
+refactoryBuilder
+
+    ^ refactoryBuilder
+
+    "Modified (format): / 23-08-2014 / 00:14:38 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+refactoryBuilder: aRefactoryBuilder
+
+    refactoryBuilder := aRefactoryBuilder.
+
+    "Modified (format): / 23-08-2014 / 00:14:33 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
 userPreferences
 
     ^ userPreferences
@@ -201,15 +223,21 @@
 !CustomCodeGeneratorOrRefactoring methodsFor:'code generation'!
 
 addBuilderChanges
-    | change |
+
+    self addChange: codeBuilder change.
+    self addChange: refactoryBuilder change
 
-    change := builder change.
-    change notNil ifTrue: [
-        self addChange: change 
+    "Created: / 10-04-2014 / 23:26:12 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 23-08-2014 / 15:41:16 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+addChange: aCodeChange
+
+    aCodeChange notNil ifTrue: [
+        super addChange: aCodeChange 
     ]
 
-    "Created: / 10-04-2014 / 23:26:12 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-    "Modified: / 13-05-2014 / 22:10:40 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Created: / 23-08-2014 / 15:40:17 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 ! !
 
 !CustomCodeGeneratorOrRefactoring methodsFor:'executing'!
@@ -222,15 +250,15 @@
 !
 
 executeInContext: aCustomContext
-    "Generates the code or perform the refactoring. This method
-     is guaranteed to be called only if #availableInContext: returns
-     true. 
 
-     Called by the UI when user want to perform the task"
+    self startCollectChanges.       
+    self buildInContext: aCustomContext.
+    self addBuilderChanges.
+    self executeChangesInContext: aCustomContext changesName: self class description.
 
-    self subclassResponsibility
-
-    "Created: / 01-12-2013 / 00:15:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Created: / 19-03-2014 / 18:45:26 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 03-04-2014 / 11:04:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 07-08-2014 / 23:22:11 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 !
 
 executeInContextWithWaitCursor: aCustomContext
@@ -252,6 +280,49 @@
     "Created: / 07-08-2014 / 23:17:17 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 ! !
 
+!CustomCodeGeneratorOrRefactoring methodsFor:'initialization'!
+
+initialize
+
+    super initialize.
+    self setUpCodeBuilder.
+    self setUpRefactoryBuilder.
+    self setUpDialog.
+    self setUpChangeManager
+
+    "Created: / 17-03-2014 / 22:27:32 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 23-08-2014 / 00:06:41 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+setUpChangeManager
+
+    changeManager := CustomBrowserChangeManager new.
+
+    "Created: / 09-06-2014 / 22:56:56 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+setUpCodeBuilder
+
+    codeBuilder := CustomSourceCodeBuilder new.
+
+    "Created: / 09-06-2014 / 22:56:10 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified (format): / 23-08-2014 / 00:06:15 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+setUpDialog
+
+    dialog := CustomUserDialog new.
+
+    "Created: / 09-06-2014 / 22:57:08 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+setUpRefactoryBuilder
+
+    refactoryBuilder := CustomRefactoryBuilder new.
+
+    "Created: / 23-08-2014 / 00:05:52 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
 !CustomCodeGeneratorOrRefactoring class methodsFor:'documentation'!
 
 version_HG
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CustomCodeGeneratorOrRefactoringTestCase.st	Sat Aug 23 16:41:05 2014 +0200
@@ -0,0 +1,300 @@
+"{ Package: 'jn:refactoring_custom' }"
+
+TestCase subclass:#CustomCodeGeneratorOrRefactoringTestCase
+	instanceVariableNames:'context codeBuilder refactoryBuilder generatorOrRefactoring
+		classes changeManager userPreferences mock testFormatterSettings
+		originalFormatterSettings'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Interface-Refactoring-Custom-Tests'
+!
+
+!CustomCodeGeneratorOrRefactoringTestCase methodsFor:'accessing'!
+
+formatterSettings
+    "see setUpFormatterSettings"
+
+    ^ testFormatterSettings
+
+    "Created: / 21-08-2014 / 12:21:00 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+generatorOrRefactoring
+    "Should return an instance of CustomCodeGenerator or CustomRefactoring subclass"
+    
+    ^ self subclassResponsibility
+
+    "Created: / 27-05-2014 / 19:16:44 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified (comment): / 23-08-2014 / 11:38:04 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
+!CustomCodeGeneratorOrRefactoringTestCase methodsFor:'asserting'!
+
+assertClassExists: aClassName
+
+    self assert: (Smalltalk classNamed: aClassName asString) isNil not
+
+    "Created: / 15-06-2014 / 16:42:19 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+assertClassMethodSource: aSourceCode atSelector: aSelector
+    "Assert that source code is same at given selector for first generated class"
+
+    | className class |
+
+    className := classes first classNameBuilded.
+    class := Smalltalk classNamed: className.
+
+    ^ self assertClassMethodSource: aSourceCode atSelector: aSelector forClass: class
+
+    "Created: / 11-07-2014 / 20:11:01 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+assertClassMethodSource: expectedSource atSelector: aSelector forClass: aClass
+    "Assert that source code is same at given selector for given class"
+
+    | actualSource |
+
+    actualSource := aClass theMetaclass sourceCodeAt: aSelector asSymbol.
+
+    ^ self assertSource: expectedSource sameAs: actualSource
+
+    "Created: / 11-07-2014 / 20:09:59 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+assertClassNotExists: aClassName
+
+    self assert: (Smalltalk classNamed: aClassName asString) isNil
+
+    "Created: / 15-06-2014 / 16:42:37 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+assertMethodSource: aSourceCode atSelector: aSelector
+    "Assert that source code is same at given selector for first generated class"
+
+    | className class |
+
+    className := classes first classNameBuilded.
+    class := Smalltalk classNamed: className.
+
+    ^ self assertMethodSource: aSourceCode atSelector: aSelector forClass: class
+
+    "Created: / 27-05-2014 / 20:06:17 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 30-05-2014 / 22:36:09 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+assertMethodSource: expectedSource atSelector: aSelector forClass: aClass
+    "Assert that source code is same at given selector for given class"
+
+    | actualSource |
+
+    actualSource := aClass sourceCodeAt: aSelector asSymbol.
+
+    ^ self assertSource: expectedSource sameAs: actualSource
+
+    "Created: / 27-05-2014 / 20:08:32 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+assertSource: expectedSource sameAs: actualSource
+
+    self assert: (Change isSource: expectedSource sameSourceAs: actualSource)
+
+    "Created: / 25-05-2014 / 22:18:10 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 10-07-2014 / 11:31:19 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
+!CustomCodeGeneratorOrRefactoringTestCase methodsFor:'code generation helpers'!
+
+createClass
+    "Returns new class change with some name"
+
+    | class |
+
+    class := codeBuilder createClass.
+    class className: 'DummyClassForGeneratorTestCase'.
+    classes add: class.
+
+    ^ class
+
+    "Created: / 29-05-2014 / 23:22:52 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
+!CustomCodeGeneratorOrRefactoringTestCase methodsFor:'context templates'!
+
+classWithInstanceVariable
+    | class |
+
+    class := self createClass.
+    class instanceVariableNames: 'instanceVariable'.
+
+    context selectedClasses: (Array with: class)
+
+    "Created: / 29-05-2014 / 00:33:40 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 29-05-2014 / 23:44:20 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+classWithThreeInstanceVariables
+    | class |
+
+    class := self createClass.
+    class instanceVariableNames: 'instanceVariable_01 instanceVariable_02 instanceVariable_03'.
+
+    context selectedClasses: (Array with: class).
+    context selectedVariables: (class instanceVariableNames).
+
+    "Created: / 13-07-2014 / 21:56:12 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+classWithTwoInstanceVariables
+    | class |
+
+    class := self createClass.
+    class instanceVariableNames: 'instanceVariable_01 instanceVariable_02'.
+
+    context selectedClasses: (Array with: class).
+    context selectedVariables: (class instanceVariableNames).
+
+    "Created: / 13-07-2014 / 21:45:06 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
+!CustomCodeGeneratorOrRefactoringTestCase methodsFor:'executing'!
+
+createContext: contextTemplateName
+    "Creates context by given template name
+    (produces more readable code than just method call)"
+
+    self perform: contextTemplateName asSymbol
+
+    "Created: / 27-07-2014 / 12:27:08 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+executeGeneratorInContext: contextTemplateName
+    "Executes generator in context created by given name"
+
+    self perform: contextTemplateName asSymbol.
+    generatorOrRefactoring executeInContext: context
+
+    "Created: / 27-05-2014 / 20:03:14 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 29-05-2014 / 23:38:08 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
+!CustomCodeGeneratorOrRefactoringTestCase methodsFor:'initialization & release'!
+
+defaultUserPreferences
+
+    userPreferences
+        generateComments: true;
+        generateCommentsForAspectMethods: true;
+        generateCommentsForGetters: true;
+        generateCommentsForSetters: true
+
+    "Created: / 09-06-2014 / 22:36:59 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+initalizeTestFormatterSettings
+    "see setUpFormatterSettings"
+
+    testFormatterSettings := IdentityDictionary new.
+    testFormatterSettings
+        at: #tabIndent put: 4;  
+        at: #spaceAroundTemporaries put: false;  
+        at: #emptyLineAfterTemporaries put: true;  
+        at: #emptyLineAfterMethodComment put: true;
+        at: #spaceAfterReturnToken put: true;  
+        at: #spaceAfterKeywordSelector put: false;  
+        at: #spaceAfterBlockStart put: true;  
+        at: #spaceBeforeBlockEnd put: true;  
+        at: #cStyleBlocks put: true;  
+        at: #blockArgumentsOnNewLine put: false;  
+        at: #maxLengthForSingleLineBlocks put: 4;
+        at: #periodAfterLastStatementPolicy put: #keep.
+    "
+    EmptyLineBeforeFinalMethodComment := true.
+    SpaceAroundLiteralArrayElements := true.
+    STXStyleMethodComments := true.
+    "
+
+    "Created: / 21-08-2014 / 11:38:07 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+restoreFormatterSettings
+    "see setUpFormatterSettings"
+
+    originalFormatterSettings keysAndValuesDo: [ :key :value |
+        RBFormatter perform: key asMutator with: value.   
+    ].
+
+    "Created: / 20-08-2014 / 22:25:02 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+setUp
+
+    classes := OrderedCollection new.
+    mock := CustomMock new.
+
+    context := CustomSubContext new.
+
+    changeManager := CustomLocalChangeManager new.
+    self setUpBuilders.
+
+    userPreferences := UserPreferences new.
+    self defaultUserPreferences.
+    generatorOrRefactoring := self generatorOrRefactoring.
+
+    generatorOrRefactoring isNil ifFalse: [
+        self setUpGeneratorOrRefactoring: generatorOrRefactoring
+    ].
+
+    self initalizeTestFormatterSettings.
+    self setUpFormatterSettings
+
+    "Created: / 27-05-2014 / 19:16:44 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 23-08-2014 / 16:00:14 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+setUpBuilders
+
+    codeBuilder := CustomSourceCodeBuilder new.
+    codeBuilder changeManager: changeManager.
+
+    refactoryBuilder := CustomRefactoryBuilder new.
+    refactoryBuilder changeManager: changeManager.
+
+    "Created: / 23-08-2014 / 15:57:43 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+setUpFormatterSettings
+    "Settings for RBFormatter to keep formatting settings independent on system settings.
+    Actually this is not perfect solution because of global scope modifications - imagine
+    parallel execution."
+
+    originalFormatterSettings := IdentityDictionary new.
+    testFormatterSettings keysAndValuesDo: [ :key :value |
+        originalFormatterSettings at: key put: (RBFormatter perform: key).
+        RBFormatter perform: key asMutator with: value.   
+    ].
+
+    "Created: / 20-08-2014 / 22:21:17 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 21-08-2014 / 11:38:24 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+setUpGeneratorOrRefactoring: aGeneratorOrRefactoring
+
+    aGeneratorOrRefactoring codeBuilder: codeBuilder.
+    aGeneratorOrRefactoring refactoryBuilder: refactoryBuilder.
+    aGeneratorOrRefactoring changeManager: changeManager.
+    aGeneratorOrRefactoring userPreferences: userPreferences
+
+    "Created: / 23-08-2014 / 15:59:58 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+tearDown
+
+    self restoreFormatterSettings.
+    changeManager redoChanges.
+    mock unmockAll
+
+    "Created: / 27-05-2014 / 19:26:30 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 23-08-2014 / 15:54:15 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CustomCodeGeneratorOrRefactoringTestCaseTests.st	Sat Aug 23 16:41:05 2014 +0200
@@ -0,0 +1,58 @@
+"{ Package: 'jn:refactoring_custom' }"
+
+TestCase subclass:#CustomCodeGeneratorOrRefactoringTestCaseTests
+	instanceVariableNames:'spaceAfterReturnToken maxLengthForSingleLineBlocks
+		blockArgumentsOnNewLine'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Interface-Refactoring-Custom-Tests'
+!
+
+!CustomCodeGeneratorOrRefactoringTestCaseTests methodsFor:'initialization & release'!
+
+setUp
+
+    spaceAfterReturnToken := RBFormatter spaceAfterReturnToken.
+    maxLengthForSingleLineBlocks := RBFormatter maxLengthForSingleLineBlocks.
+    blockArgumentsOnNewLine := RBFormatter blockArgumentsOnNewLine.
+
+    "Modified: / 21-08-2014 / 11:53:07 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+tearDown
+
+    RBFormatter spaceAfterReturnToken: spaceAfterReturnToken.
+    RBFormatter maxLengthForSingleLineBlocks: maxLengthForSingleLineBlocks.
+    RBFormatter blockArgumentsOnNewLine: blockArgumentsOnNewLine.
+
+    "Modified: / 21-08-2014 / 11:54:09 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
+!CustomCodeGeneratorOrRefactoringTestCaseTests methodsFor:'tests'!
+
+test_formatter_settings_modified_and_then_restored
+    | generatorTestCase |
+
+    generatorTestCase := CustomCodeGeneratorOrRefactoringTestCase new.
+    generatorTestCase initalizeTestFormatterSettings.
+    generatorTestCase formatterSettings
+        at: #spaceAfterReturnToken put: spaceAfterReturnToken not;  
+        at: #maxLengthForSingleLineBlocks put: maxLengthForSingleLineBlocks + 10;
+        at: #blockArgumentsOnNewLine put: blockArgumentsOnNewLine not.
+
+    generatorTestCase setUpFormatterSettings.
+
+    self assert: (RBFormatter spaceAfterReturnToken) == (spaceAfterReturnToken not).
+    self assert: (RBFormatter maxLengthForSingleLineBlocks) == (maxLengthForSingleLineBlocks + 10).
+    self assert: (RBFormatter blockArgumentsOnNewLine) == (blockArgumentsOnNewLine not).
+
+    generatorTestCase restoreFormatterSettings.
+
+    self assert: (RBFormatter spaceAfterReturnToken) == spaceAfterReturnToken.
+    self assert: (RBFormatter maxLengthForSingleLineBlocks) == maxLengthForSingleLineBlocks.
+    self assert: (RBFormatter blockArgumentsOnNewLine) == blockArgumentsOnNewLine.
+
+    "Created: / 21-08-2014 / 11:44:28 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 23-08-2014 / 11:16:37 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
--- a/CustomCodeGeneratorTestCase.st	Fri Aug 22 22:04:32 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,285 +0,0 @@
-"{ Package: 'jn:refactoring_custom' }"
-
-TestCase subclass:#CustomCodeGeneratorTestCase
-	instanceVariableNames:'context builder generator classes changeManager userPreferences
-		mock testFormatterSettings originalFormatterSettings'
-	classVariableNames:''
-	poolDictionaries:''
-	category:'Interface-Refactoring-Custom-Tests'
-!
-
-!CustomCodeGeneratorTestCase methodsFor:'accessing'!
-
-formatterSettings
-    "see setUpFormatterSettings"
-
-    ^ testFormatterSettings
-
-    "Created: / 21-08-2014 / 12:21:00 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-generator
-    "Should return an instance of CustomCodeGenerator subclass"
-
-    ^ self subclassResponsibility
-
-    "Created: / 27-05-2014 / 19:16:44 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-! !
-
-!CustomCodeGeneratorTestCase methodsFor:'asserting'!
-
-assertClassExists: aClassName
-
-    self assert: (Smalltalk classNamed: aClassName asString) isNil not
-
-    "Created: / 15-06-2014 / 16:42:19 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-assertClassMethodSource: aSourceCode atSelector: aSelector
-    "Assert that source code is same at given selector for first generated class"
-
-    | className class |
-
-    className := classes first classNameBuilded.
-    class := Smalltalk classNamed: className.
-
-    ^ self assertClassMethodSource: aSourceCode atSelector: aSelector forClass: class
-
-    "Created: / 11-07-2014 / 20:11:01 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-assertClassMethodSource: expectedSource atSelector: aSelector forClass: aClass
-    "Assert that source code is same at given selector for given class"
-
-    | actualSource |
-
-    actualSource := aClass theMetaclass sourceCodeAt: aSelector asSymbol.
-
-    ^ self assertSource: expectedSource sameAs: actualSource
-
-    "Created: / 11-07-2014 / 20:09:59 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-assertClassNotExists: aClassName
-
-    self assert: (Smalltalk classNamed: aClassName asString) isNil
-
-    "Created: / 15-06-2014 / 16:42:37 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-assertMethodSource: aSourceCode atSelector: aSelector
-    "Assert that source code is same at given selector for first generated class"
-
-    | className class |
-
-    className := classes first classNameBuilded.
-    class := Smalltalk classNamed: className.
-
-    ^ self assertMethodSource: aSourceCode atSelector: aSelector forClass: class
-
-    "Created: / 27-05-2014 / 20:06:17 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-    "Modified: / 30-05-2014 / 22:36:09 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-assertMethodSource: expectedSource atSelector: aSelector forClass: aClass
-    "Assert that source code is same at given selector for given class"
-
-    | actualSource |
-
-    actualSource := aClass sourceCodeAt: aSelector asSymbol.
-
-    ^ self assertSource: expectedSource sameAs: actualSource
-
-    "Created: / 27-05-2014 / 20:08:32 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-assertSource: expectedSource sameAs: actualSource
-
-    self assert: (Change isSource: expectedSource sameSourceAs: actualSource)
-
-    "Created: / 25-05-2014 / 22:18:10 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-    "Modified: / 10-07-2014 / 11:31:19 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-! !
-
-!CustomCodeGeneratorTestCase methodsFor:'code generation helpers'!
-
-createClass
-    "Returns new class change with some name"
-
-    | class |
-
-    class := builder createClass.
-    class className: 'DummyClassForGeneratorTestCase'.
-    classes add: class.
-
-    ^ class
-
-    "Created: / 29-05-2014 / 23:22:52 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-! !
-
-!CustomCodeGeneratorTestCase methodsFor:'context templates'!
-
-classWithInstanceVariable
-    | class |
-
-    class := self createClass.
-    class instanceVariableNames: 'instanceVariable'.
-
-    context selectedClasses: (Array with: class)
-
-    "Created: / 29-05-2014 / 00:33:40 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-    "Modified: / 29-05-2014 / 23:44:20 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-classWithThreeInstanceVariables
-    | class |
-
-    class := self createClass.
-    class instanceVariableNames: 'instanceVariable_01 instanceVariable_02 instanceVariable_03'.
-
-    context selectedClasses: (Array with: class).
-    context selectedVariables: (class instanceVariableNames).
-
-    "Created: / 13-07-2014 / 21:56:12 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-classWithTwoInstanceVariables
-    | class |
-
-    class := self createClass.
-    class instanceVariableNames: 'instanceVariable_01 instanceVariable_02'.
-
-    context selectedClasses: (Array with: class).
-    context selectedVariables: (class instanceVariableNames).
-
-    "Created: / 13-07-2014 / 21:45:06 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-! !
-
-!CustomCodeGeneratorTestCase methodsFor:'executing'!
-
-createContext: contextTemplateName
-    "Creates context by given template name
-    (produces more readable code than just method call)"
-
-    self perform: contextTemplateName asSymbol
-
-    "Created: / 27-07-2014 / 12:27:08 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-executeGeneratorInContext: contextTemplateName
-    "Executes generator in context created by given name"
-
-    self perform: contextTemplateName asSymbol.
-    generator executeInContext: context
-
-    "Created: / 27-05-2014 / 20:03:14 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-    "Modified: / 29-05-2014 / 23:38:08 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-! !
-
-!CustomCodeGeneratorTestCase methodsFor:'initialization & release'!
-
-defaultUserPreferences
-
-    userPreferences
-        generateComments: true;
-        generateCommentsForAspectMethods: true;
-        generateCommentsForGetters: true;
-        generateCommentsForSetters: true
-
-    "Created: / 09-06-2014 / 22:36:59 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-initalizeTestFormatterSettings
-    "see setUpFormatterSettings"
-
-    testFormatterSettings := IdentityDictionary new.
-    testFormatterSettings
-        at: #tabIndent put: 4;  
-        at: #spaceAroundTemporaries put: false;  
-        at: #emptyLineAfterTemporaries put: true;  
-        at: #emptyLineAfterMethodComment put: true;
-        at: #spaceAfterReturnToken put: true;  
-        at: #spaceAfterKeywordSelector put: false;  
-        at: #spaceAfterBlockStart put: true;  
-        at: #spaceBeforeBlockEnd put: true;  
-        at: #cStyleBlocks put: true;  
-        at: #blockArgumentsOnNewLine put: false;  
-        at: #maxLengthForSingleLineBlocks put: 4;
-        at: #periodAfterLastStatementPolicy put: #keep.
-    "
-    EmptyLineBeforeFinalMethodComment := true.
-    SpaceAroundLiteralArrayElements := true.
-    STXStyleMethodComments := true.
-    "
-
-    "Created: / 21-08-2014 / 11:38:07 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-restoreFormatterSettings
-    "see setUpFormatterSettings"
-
-    originalFormatterSettings keysAndValuesDo: [ :key :value |
-        RBFormatter perform: key asMutator with: value.   
-    ].
-
-    "Created: / 20-08-2014 / 22:25:02 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-setUp
-
-    classes := OrderedCollection new.
-    mock := CustomMock new.
-
-    context := CustomSubContext new.
-    builder := CustomSourceCodeBuilder new.
-    changeManager := CustomLocalChangeManager new.
-    userPreferences := UserPreferences new.
-    self defaultUserPreferences.
-    generator := self generator.
-
-    generator isNil ifFalse: [
-        self setUpGenerator: generator
-    ].
-
-    self initalizeTestFormatterSettings.
-    self setUpFormatterSettings
-
-    "Created: / 27-05-2014 / 19:16:44 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-    "Modified: / 21-08-2014 / 11:41:08 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-setUpFormatterSettings
-    "Settings for RBFormatter to keep formatting settings independent on system settings.
-    Actually this is not perfect solution because of global scope modifications - imagine
-    parallel execution."
-
-    originalFormatterSettings := IdentityDictionary new.
-    testFormatterSettings keysAndValuesDo: [ :key :value |
-        originalFormatterSettings at: key put: (RBFormatter perform: key).
-        RBFormatter perform: key asMutator with: value.   
-    ].
-
-    "Created: / 20-08-2014 / 22:21:17 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-    "Modified: / 21-08-2014 / 11:38:24 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-setUpGenerator: aGenerator
-
-    aGenerator builder: builder.
-    aGenerator changeManager: changeManager.
-    aGenerator userPreferences: userPreferences
-
-    "Created: / 10-07-2014 / 11:57:38 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-tearDown
-
-    self restoreFormatterSettings.
-    builder redoChanges.
-    changeManager redoChanges.
-    mock unmockAll
-
-    "Created: / 27-05-2014 / 19:26:30 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-    "Modified: / 20-08-2014 / 22:40:49 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-! !
-
--- a/CustomCodeGeneratorTestCaseCodeGenerator.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomCodeGeneratorTestCaseCodeGenerator.st	Sat Aug 23 16:41:05 2014 +0200
@@ -38,7 +38,7 @@
     self executeGeneratorInContext: #classWithInstanceVariable.
     self assertMethodSource: expectedSource atSelector: #instanceVariable'.
 
-    builder
+    codeBuilder
         class: aTestClass;
 
         protocol: 'tests';
--- a/CustomCodeGeneratorTestCaseTests.st	Fri Aug 22 22:04:32 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-"{ Package: 'jn:refactoring_custom' }"
-
-TestCase subclass:#CustomCodeGeneratorTestCaseTests
-	instanceVariableNames:'spaceAfterReturnToken maxLengthForSingleLineBlocks
-		blockArgumentsOnNewLine'
-	classVariableNames:''
-	poolDictionaries:''
-	category:'Interface-Refactoring-Custom-Tests'
-!
-
-!CustomCodeGeneratorTestCaseTests methodsFor:'initialization & release'!
-
-setUp
-
-    spaceAfterReturnToken := RBFormatter spaceAfterReturnToken.
-    maxLengthForSingleLineBlocks := RBFormatter maxLengthForSingleLineBlocks.
-    blockArgumentsOnNewLine := RBFormatter blockArgumentsOnNewLine.
-
-    "Modified: / 21-08-2014 / 11:53:07 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-tearDown
-
-    RBFormatter spaceAfterReturnToken: spaceAfterReturnToken.
-    RBFormatter maxLengthForSingleLineBlocks: maxLengthForSingleLineBlocks.
-    RBFormatter blockArgumentsOnNewLine: blockArgumentsOnNewLine.
-
-    "Modified: / 21-08-2014 / 11:54:09 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-! !
-
-!CustomCodeGeneratorTestCaseTests methodsFor:'tests'!
-
-test_formatter_settings_modified_and_then_restored
-    | generatorTestCase |
-
-    generatorTestCase := CustomCodeGeneratorTestCase new.
-    generatorTestCase initalizeTestFormatterSettings.
-    generatorTestCase formatterSettings
-        at: #spaceAfterReturnToken put: spaceAfterReturnToken not;  
-        at: #maxLengthForSingleLineBlocks put: maxLengthForSingleLineBlocks + 10;
-        at: #blockArgumentsOnNewLine put: blockArgumentsOnNewLine not.
-
-    generatorTestCase setUpFormatterSettings.
-
-    self assert: (RBFormatter spaceAfterReturnToken) == (spaceAfterReturnToken not).
-    self assert: (RBFormatter maxLengthForSingleLineBlocks) == (maxLengthForSingleLineBlocks + 10).
-    self assert: (RBFormatter blockArgumentsOnNewLine) == (blockArgumentsOnNewLine not).
-
-    generatorTestCase restoreFormatterSettings.
-
-    self assert: (RBFormatter spaceAfterReturnToken) == spaceAfterReturnToken.
-    self assert: (RBFormatter maxLengthForSingleLineBlocks) == maxLengthForSingleLineBlocks.
-    self assert: (RBFormatter blockArgumentsOnNewLine) == blockArgumentsOnNewLine.
-
-    "Created: / 21-08-2014 / 11:44:28 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-! !
-
--- a/CustomCodeGeneratorTests.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomCodeGeneratorTests.st	Sat Aug 23 16:41:05 2014 +0200
@@ -1,6 +1,6 @@
 "{ Package: 'jn:refactoring_custom' }"
 
-CustomCodeGeneratorTestCase subclass:#CustomCodeGeneratorTests
+CustomCodeGeneratorOrRefactoringTestCase subclass:#CustomCodeGeneratorTests
 	instanceVariableNames:''
 	classVariableNames:''
 	poolDictionaries:''
@@ -9,7 +9,7 @@
 
 !CustomCodeGeneratorTests methodsFor:'accessing'!
 
-generator
+generatorOrRefactoring
     ^ CustomCodeGenerator new
 ! !
 
@@ -29,7 +29,7 @@
         :aCustomContext |
 
         aCustomContext selectedClasses do:[ :class | 
-            builder
+            codeBuilder
                 source: 'selector_01 ^ 1';
                 createMethod.
         ].
@@ -40,13 +40,13 @@
         :aCustomContext |
 
         aCustomContext selectedClasses do:[ :class | 
-            builder
+            codeBuilder
                 source: 'selector_02 ^ 2';
                 createMethod.
         ].
     ].
 
-    generator
+    generatorOrRefactoring
         executeSubGeneratorClasses: (
             Array
                 with: subGeneratorClass_01
--- a/CustomCodeGeneratorUserPreferencesTests.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomCodeGeneratorUserPreferencesTests.st	Sat Aug 23 16:41:05 2014 +0200
@@ -1,6 +1,6 @@
 "{ Package: 'jn:refactoring_custom' }"
 
-CustomCodeGeneratorTestCase subclass:#CustomCodeGeneratorUserPreferencesTests
+CustomCodeGeneratorOrRefactoringTestCase subclass:#CustomCodeGeneratorUserPreferencesTests
 	instanceVariableNames:''
 	classVariableNames:''
 	poolDictionaries:''
@@ -9,8 +9,7 @@
 
 !CustomCodeGeneratorUserPreferencesTests methodsFor:'accessing'!
 
-generator
-
+generatorOrRefactoring
     ^ nil
 
     "Modified: / 09-06-2014 / 22:42:50 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CustomCodeSelectionToResourceTranslation.st	Sat Aug 23 16:41:05 2014 +0200
@@ -0,0 +1,82 @@
+"{ Package: 'jn:refactoring_custom' }"
+
+CustomRefactoring subclass:#CustomCodeSelectionToResourceTranslation
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Interface-Refactoring-Custom'
+!
+
+!CustomCodeSelectionToResourceTranslation class methodsFor:'documentation'!
+
+documentation
+"
+    Wraps variable, literal, string or expression code selection
+    with following translation call: resources string:'Some string...'
+    Ie.: when 'Some string...' is selected in the code editor then its
+    replaced by: resources string:'Some string...'
+
+    [author:]
+        Jakub Nesveda <nesvejak@fit.cvut.cz>
+
+"
+! !
+
+!CustomCodeSelectionToResourceTranslation class methodsFor:'accessing-presentation'!
+
+description
+    "Returns more detailed description of the receiver"
+
+    ^ 'Wrap code selection with translation call - resources string:'
+
+    "Created: / 21-08-2014 / 23:46:18 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+label
+    "Returns show label describing the receiver. This label
+     is used in UI as menu item/tree item label."
+
+    ^ 'Selection to Resources Translation'
+
+    "Created: / 21-08-2014 / 23:43:03 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
+!CustomCodeSelectionToResourceTranslation class methodsFor:'queries'!
+
+availableInContext:aCustomContext
+    "Returns true if the generator/refactoring is available in given
+     context, false otherwise.
+     
+     Called by the UI to figure out what generators / refactorings
+     are available at given point. See class CustomContext for details."
+
+    ^ true
+
+    "Created: / 21-08-2014 / 23:28:25 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+availableInPerspective:aCustomPerspective
+    "Returns true if the generator/refactoring is available in given
+     perspective, false otherwise.
+     
+     Called by the UI to figure out what generators / refactorings
+     to show"
+
+    ^ true
+
+    "Created: / 21-08-2014 / 23:28:34 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
+!CustomCodeSelectionToResourceTranslation methodsFor:'executing'!
+
+buildInContext:aCustomContext
+    "Performs a refactoring within given context scope"
+
+    refactoryBuilder
+        replace: '``@expression'
+        with: '(resources string: (``@expression))'
+        inCodes: aCustomContext selectedCodes
+
+    "Created: / 23-08-2014 / 00:16:58 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
--- a/CustomDefaultGetterMethodsCodeGenerator.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomDefaultGetterMethodsCodeGenerator.st	Sat Aug 23 16:41:05 2014 +0200
@@ -37,7 +37,7 @@
         comment := comment bindWith: aName.
     ].
 
-    methodBuilder := builder methodBuilder.
+    methodBuilder := codeBuilder methodBuilder.
     methodBuilder
         source: '`@methodName
             `"comment
--- a/CustomDefaultGetterMethodsCodeGeneratorTests.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomDefaultGetterMethodsCodeGeneratorTests.st	Sat Aug 23 16:41:05 2014 +0200
@@ -1,6 +1,6 @@
 "{ Package: 'jn:refactoring_custom' }"
 
-CustomCodeGeneratorTestCase subclass:#CustomDefaultGetterMethodsCodeGeneratorTests
+CustomCodeGeneratorOrRefactoringTestCase subclass:#CustomDefaultGetterMethodsCodeGeneratorTests
 	instanceVariableNames:''
 	classVariableNames:''
 	poolDictionaries:''
@@ -9,7 +9,7 @@
 
 !CustomDefaultGetterMethodsCodeGeneratorTests methodsFor:'accessing'!
 
-generator
+generatorOrRefactoring
     ^ CustomDefaultGetterMethodsCodeGenerator new
 ! !
 
--- a/CustomLazyInitializationAccessMethodsCodeGeneratorTests.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomLazyInitializationAccessMethodsCodeGeneratorTests.st	Sat Aug 23 16:41:05 2014 +0200
@@ -1,6 +1,6 @@
 "{ Package: 'jn:refactoring_custom' }"
 
-CustomCodeGeneratorTestCase subclass:#CustomLazyInitializationAccessMethodsCodeGeneratorTests
+CustomCodeGeneratorOrRefactoringTestCase subclass:#CustomLazyInitializationAccessMethodsCodeGeneratorTests
 	instanceVariableNames:''
 	classVariableNames:''
 	poolDictionaries:''
@@ -9,7 +9,7 @@
 
 !CustomLazyInitializationAccessMethodsCodeGeneratorTests methodsFor:'accessing'!
 
-generator
+generatorOrRefactoring
     ^ CustomLazyInitializationAccessMethodsCodeGenerator new
 ! !
 
--- a/CustomLazyInitializationGetterMethodsCodeGenerator.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomLazyInitializationGetterMethodsCodeGenerator.st	Sat Aug 23 16:41:05 2014 +0200
@@ -45,7 +45,7 @@
         comment := comment bindWith: varType with: aName.
     ].
 
-    methodBuilder := builder methodBuilder.
+    methodBuilder := codeBuilder methodBuilder.
     methodBuilder
         source: '`@methodName
             `"comment
--- a/CustomLazyInitializationGetterMethodsCodeGeneratorTests.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomLazyInitializationGetterMethodsCodeGeneratorTests.st	Sat Aug 23 16:41:05 2014 +0200
@@ -1,6 +1,6 @@
 "{ Package: 'jn:refactoring_custom' }"
 
-CustomCodeGeneratorTestCase subclass:#CustomLazyInitializationGetterMethodsCodeGeneratorTests
+CustomCodeGeneratorOrRefactoringTestCase subclass:#CustomLazyInitializationGetterMethodsCodeGeneratorTests
 	instanceVariableNames:''
 	classVariableNames:''
 	poolDictionaries:''
@@ -9,7 +9,7 @@
 
 !CustomLazyInitializationGetterMethodsCodeGeneratorTests methodsFor:'accessing'!
 
-generator
+generatorOrRefactoring
     ^ CustomLazyInitializationGetterMethodsCodeGenerator new
 ! !
 
--- a/CustomLocalChangeManager.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomLocalChangeManager.st	Sat Aug 23 16:41:05 2014 +0200
@@ -42,21 +42,24 @@
 
 performChange: aRefactoringChange
 
+    "/ Transcript showCR: 'EXECUTE: ', aRefactoringChange asString.  
+
     executedChanges add: aRefactoringChange execute
 
-    "Modified: / 31-05-2014 / 19:28:43 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 23-08-2014 / 15:52:03 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 !
 
 redoChanges
     "redo all changes made by performChange: method"
 
     executedChanges reversed do: [ :change | 
+        "/ Transcript showCR: 'REDO: ', change asString.  
         change execute
     ].
 
     executedChanges removeAll
 
     "Created: / 31-05-2014 / 19:29:44 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-    "Modified: / 15-06-2014 / 17:02:42 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 23-08-2014 / 15:51:55 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 ! !
 
--- a/CustomMultiSetterMethodsCodeGenerator.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomMultiSetterMethodsCodeGenerator.st	Sat Aug 23 16:41:05 2014 +0200
@@ -64,7 +64,7 @@
         assignVariablesCode := assignVariablesCode, variableName asString, ' := ', argumentName, '. '.
     ].
 
-    method := builder createMethod.
+    method := codeBuilder createMethod.
     method
         class: aClass;
         protocol: 'accessing';
--- a/CustomMultiSetterMethodsCodeGeneratorTests.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomMultiSetterMethodsCodeGeneratorTests.st	Sat Aug 23 16:41:05 2014 +0200
@@ -1,6 +1,6 @@
 "{ Package: 'jn:refactoring_custom' }"
 
-CustomCodeGeneratorTestCase subclass:#CustomMultiSetterMethodsCodeGeneratorTests
+CustomCodeGeneratorOrRefactoringTestCase subclass:#CustomMultiSetterMethodsCodeGeneratorTests
 	instanceVariableNames:''
 	classVariableNames:''
 	poolDictionaries:''
@@ -9,7 +9,7 @@
 
 !CustomMultiSetterMethodsCodeGeneratorTests methodsFor:'accessing'!
 
-generator
+generatorOrRefactoring
     ^ CustomMultiSetterMethodsCodeGenerator new
 ! !
 
@@ -20,7 +20,7 @@
     context
         selectedClasses: (Array with: self class).
 
-    self assert: (generator class availableInContext: context) not.
+    self assert: (generatorOrRefactoring class availableInContext: context) not.
 
     "Created: / 13-07-2014 / 20:11:01 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 !
@@ -31,7 +31,7 @@
         selectedClasses: (Array with: self class);
         selectedVariables: (Array with: 'var_01').
 
-    self assert: (generator class availableInContext: context) not.
+    self assert: (generatorOrRefactoring class availableInContext: context) not.
 
     "Created: / 13-07-2014 / 20:08:56 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 !
@@ -42,7 +42,7 @@
         selectedClasses: (Array with: self class);
         selectedVariables: (Array with: 'var_01' with: 'var_02' with: 'var_03').
 
-    self assert: (generator class availableInContext: context).
+    self assert: (generatorOrRefactoring class availableInContext: context).
 
     "Created: / 13-07-2014 / 20:10:29 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 !
@@ -53,7 +53,7 @@
         selectedClasses: (Array with: self class);
         selectedVariables: (Array with: 'var_01' with: 'var_02').
 
-    self assert: (generator class availableInContext: context).
+    self assert: (generatorOrRefactoring class availableInContext: context).
 
     "Created: / 13-07-2014 / 20:09:36 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 !
--- a/CustomRefactoring.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomRefactoring.st	Sat Aug 23 16:41:05 2014 +0200
@@ -16,50 +16,6 @@
     "Created: / 26-01-2014 / 21:39:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
-!CustomRefactoring methodsFor:'executing'!
-
-executeInContext: aCustomContext
-    "Generates the code or perform the refactoring. This method
-     is guaranteed to be called only if #availableInContext: returns
-     true.
-     
-     Called by the UI when user want to perform the task"
-
-
-    self startCollectChanges.
-    self refactorInContext: aCustomContext.
-    self addBuilderChanges.
-    self executeChangesInContext: aCustomContext changesName: self class description.
-
-    "Created: / 07-08-2014 / 22:54:12 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-    "Modified: / 17-08-2014 / 20:53:02 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-refactorInContext: aCustomContext
-    "Performs a refactoring within given context scope"
-
-    ^ self subclassResponsibility
-
-    "Created: / 07-08-2014 / 23:27:28 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-! !
-
-!CustomRefactoring methodsFor:'initialization'!
-
-initialize
-
-    super initialize.
-    self setUpBuilder.
-
-    "Created: / 17-08-2014 / 19:43:02 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-setUpBuilder
-
-    builder := CustomRefactoryBuilder new
-
-    "Created: / 17-08-2014 / 19:43:02 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-! !
-
 !CustomRefactoring class methodsFor:'documentation'!
 
 version_HG
--- a/CustomRefactoryBuilder.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomRefactoryBuilder.st	Sat Aug 23 16:41:05 2014 +0200
@@ -43,6 +43,14 @@
     "Modified (comment): / 17-08-2014 / 17:16:38 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 !
 
+changeManager
+    ^ changeManager
+!
+
+changeManager:something
+    changeManager := something.
+!
+
 searcher
 
     ^ ParseTreeSearcher new
--- a/CustomReplaceIfNilWithIfTrueRefactoring.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomReplaceIfNilWithIfTrueRefactoring.st	Sat Aug 23 16:41:05 2014 +0200
@@ -54,15 +54,14 @@
 
 !CustomReplaceIfNilWithIfTrueRefactoring methodsFor:'executing'!
 
-refactorInContext: aCustomContext
+buildInContext: aCustomContext
     "Performs a refactoring within given context scope"
 
-    builder
+    refactoryBuilder
         replace: '``@receiver ifNil: ``@nilBlock ifNotNil: ``@notNilBlock'
         with: '``@receiver isNil ifTrue: ``@nilBlock ifFalse: ``@notNilBlock'
         inContext: aCustomContext
 
-    "Created: / 07-08-2014 / 23:29:28 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-    "Modified: / 17-08-2014 / 19:48:59 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Created: / 23-08-2014 / 00:17:55 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 ! !
 
--- a/CustomReplaceIfNilWithIfTrueRefactoringTests.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomReplaceIfNilWithIfTrueRefactoringTests.st	Sat Aug 23 16:41:05 2014 +0200
@@ -1,7 +1,7 @@
 "{ Package: 'jn:refactoring_custom' }"
 
-CustomCodeGeneratorTestCase subclass:#CustomReplaceIfNilWithIfTrueRefactoringTests
-	instanceVariableNames:'refactoryBuilder'
+CustomCodeGeneratorOrRefactoringTestCase subclass:#CustomReplaceIfNilWithIfTrueRefactoringTests
+	instanceVariableNames:''
 	classVariableNames:''
 	poolDictionaries:''
 	category:'Interface-Refactoring-Custom-Tests'
@@ -9,39 +9,17 @@
 
 !CustomReplaceIfNilWithIfTrueRefactoringTests methodsFor:'accessing'!
 
-generator
+generatorOrRefactoring
     ^ CustomReplaceIfNilWithIfTrueRefactoring new
 ! !
 
-!CustomReplaceIfNilWithIfTrueRefactoringTests methodsFor:'initialization & release'!
-
-setUpGenerator: aGenerator
-
-    refactoryBuilder := CustomRefactoryBuilder new.
-
-    aGenerator builder: refactoryBuilder.
-    aGenerator changeManager: changeManager.
-    aGenerator userPreferences: userPreferences
-
-    "Created: / 10-08-2014 / 10:02:42 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-    "Modified: / 17-08-2014 / 20:07:10 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-tearDown
-
-    super tearDown.
-    refactoryBuilder redoChanges
-
-    "Created: / 17-08-2014 / 20:09:05 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-! !
-
 !CustomReplaceIfNilWithIfTrueRefactoringTests methodsFor:'tests'!
 
 test_if_nil_replaced_with_is_nil_if_true
     | expectedSource class method |
 
-    class := builder createClassImmediate: 'DummyClassForTestCase01'.
-    method := builder createMethod.
+    class := codeBuilder createClassImmediate: 'DummyClassForTestCase01'.
+    method := codeBuilder createMethod.
     method
         class: class;
         protocol: 'protocol';
@@ -53,9 +31,9 @@
         '.
 
     context selectedClasses: (Array with: class).  
-    builder execute.
+    codeBuilder execute.
 
-    generator executeInContext: context.
+    generatorOrRefactoring executeInContext: context.
 
     expectedSource := 'selector:arg 
     arg isNil ifTrue:[
--- a/CustomSimpleAccessMethodsCodeGeneratorTests.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomSimpleAccessMethodsCodeGeneratorTests.st	Sat Aug 23 16:41:05 2014 +0200
@@ -1,6 +1,6 @@
 "{ Package: 'jn:refactoring_custom' }"
 
-CustomCodeGeneratorTestCase subclass:#CustomSimpleAccessMethodsCodeGeneratorTests
+CustomCodeGeneratorOrRefactoringTestCase subclass:#CustomSimpleAccessMethodsCodeGeneratorTests
 	instanceVariableNames:''
 	classVariableNames:''
 	poolDictionaries:''
@@ -9,7 +9,7 @@
 
 !CustomSimpleAccessMethodsCodeGeneratorTests methodsFor:'accessing'!
 
-generator
+generatorOrRefactoring
     ^ CustomSimpleAccessMethodsCodeGenerator new
 ! !
 
--- a/CustomSimpleGetterMethodsCodeGenerator.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomSimpleGetterMethodsCodeGenerator.st	Sat Aug 23 16:41:05 2014 +0200
@@ -41,7 +41,7 @@
         comment := comment bindWith: varType with: aName.
     ].  
 
-    methodBuilder := builder methodBuilder.
+    methodBuilder := codeBuilder methodBuilder.
     methodBuilder
         source: '`@methodName
         `"comment
--- a/CustomSimpleGetterMethodsCodeGeneratorTests.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomSimpleGetterMethodsCodeGeneratorTests.st	Sat Aug 23 16:41:05 2014 +0200
@@ -1,6 +1,6 @@
 "{ Package: 'jn:refactoring_custom' }"
 
-CustomCodeGeneratorTestCase subclass:#CustomSimpleGetterMethodsCodeGeneratorTests
+CustomCodeGeneratorOrRefactoringTestCase subclass:#CustomSimpleGetterMethodsCodeGeneratorTests
 	instanceVariableNames:''
 	classVariableNames:''
 	poolDictionaries:''
@@ -9,8 +9,7 @@
 
 !CustomSimpleGetterMethodsCodeGeneratorTests methodsFor:'accessing'!
 
-generator
-
+generatorOrRefactoring
     ^ CustomSimpleGetterMethodsCodeGenerator new
 
     "Modified: / 29-05-2014 / 00:07:09 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
--- a/CustomSimpleSetterMethodsCodeGenerator.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomSimpleSetterMethodsCodeGenerator.st	Sat Aug 23 16:41:05 2014 +0200
@@ -45,7 +45,7 @@
         comment := comment bindWith: varType with: aName.
     ].
 
-    methodBuilder := builder methodBuilder.
+    methodBuilder := codeBuilder methodBuilder.
     methodBuilder
         source: '`@methodName
             `"comment
--- a/CustomSimpleSetterMethodsCodeGeneratorTests.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomSimpleSetterMethodsCodeGeneratorTests.st	Sat Aug 23 16:41:05 2014 +0200
@@ -1,6 +1,6 @@
 "{ Package: 'jn:refactoring_custom' }"
 
-CustomCodeGeneratorTestCase subclass:#CustomSimpleSetterMethodsCodeGeneratorTests
+CustomCodeGeneratorOrRefactoringTestCase subclass:#CustomSimpleSetterMethodsCodeGeneratorTests
 	instanceVariableNames:''
 	classVariableNames:''
 	poolDictionaries:''
@@ -9,7 +9,7 @@
 
 !CustomSimpleSetterMethodsCodeGeneratorTests methodsFor:'accessing'!
 
-generator
+generatorOrRefactoring
     ^ CustomSimpleSetterMethodsCodeGenerator new
 ! !
 
--- a/CustomSimpleTestCaseCodeGenerator.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomSimpleTestCaseCodeGenerator.st	Sat Aug 23 16:41:05 2014 +0200
@@ -25,7 +25,7 @@
 
 buildForClass: aClass testClass: aTestClass
 
-    builder
+    codeBuilder
         class: aTestClass;
 
         protocol: 'tests';
--- a/CustomSourceCodeBuilder.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomSourceCodeBuilder.st	Sat Aug 23 16:41:05 2014 +0200
@@ -56,6 +56,14 @@
     "Created: / 24-03-2014 / 09:02:36 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 !
 
+changeManager
+    ^ changeManager
+!
+
+changeManager:something
+    changeManager := something.
+!
+
 codeBuilds
     ^ codeBuilds
 ! !
--- a/CustomSourceCodeBuilderTests.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomSourceCodeBuilderTests.st	Sat Aug 23 16:41:05 2014 +0200
@@ -1,6 +1,6 @@
 "{ Package: 'jn:refactoring_custom' }"
 
-CustomCodeGeneratorTestCase subclass:#CustomSourceCodeBuilderTests
+CustomCodeGeneratorOrRefactoringTestCase subclass:#CustomSourceCodeBuilderTests
 	instanceVariableNames:'refactoryChangeManager'
 	classVariableNames:''
 	poolDictionaries:''
@@ -9,9 +9,8 @@
 
 !CustomSourceCodeBuilderTests methodsFor:'accessing'!
 
-generator
-
-   ^ nil
+generatorOrRefactoring
+    ^ nil
 
     "Modified: / 31-05-2014 / 22:48:25 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 ! !
@@ -46,7 +45,7 @@
 test_all_class_var_names
     | class actualClassVars expectedClassVars |
 
-    class := builder createClass.
+    class := codeBuilder createClass.
     class
         className: 'MockClassForTestCase';
         classVariableNames: 'ClassVar1 ClassVar2'.
@@ -62,7 +61,7 @@
 
 test_builder_change_nil_as_default
 
-    self assert: builder change isNil.
+    self assert: codeBuilder change isNil.
 
     "Created: / 22-07-2014 / 22:52:23 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 !
@@ -72,7 +71,7 @@
 
     class := self class.
 
-    builder
+    codeBuilder
         class: class;
         protocol: 'a protocol';
         source: '`@selector
@@ -86,7 +85,7 @@
     self assert: (class includesSelector: #aSelector) not.
     self assert: (class includesSelector: #aSelector2) not.
 
-    builder execute.
+    codeBuilder execute.
 
     self assert: (class includesSelector: #aSelector).
     self assert: (class includesSelector: #aSelector2).
@@ -106,7 +105,7 @@
 
     className := 'TestClassNameForTestCase'.
 
-    class := builder
+    class := codeBuilder
         className: className;
         classVariableNames: 'ClassVar1 ClassVar2';
         instanceVariableNames: 'instVar1 instVar2';
@@ -115,7 +114,7 @@
         category: 'Some-Category';
         createClass.
 
-    builder 
+    codeBuilder 
         class: class;
         protocol: 'a protocol';
         source: '`@selector
@@ -125,7 +124,7 @@
 
     self assertClassNotExists: className.
 
-    builder execute.
+    codeBuilder execute.
 
     class := Smalltalk classNamed: className.
 
@@ -155,13 +154,13 @@
 
     self assertClassNotExists: className.
 
-    builder := CustomSourceCodeBuilder new.
-    class := builder createClass.
+    codeBuilder := CustomSourceCodeBuilder new.
+    class := codeBuilder createClass.
     class className: className.  
 
     self assertClassNotExists: className.
 
-    method := builder createMethod.
+    method := codeBuilder createMethod.
     method 
         class: class theMetaclass;
         protocol: 'a protocol';
@@ -171,7 +170,7 @@
     self assertClassNotExists: className.
     self assert: lastUndoChange = (self lastUndoChange).
 
-    builder compile.
+    codeBuilder compile.
 
     self assertClassExists: className.
     self assert: (lastUndoChange = (self lastUndoChange)) not.
@@ -196,13 +195,13 @@
 
     self assertClassNotExists: className.
 
-    builder := CustomSourceCodeBuilder new.
-    class := builder createClass.
+    codeBuilder := CustomSourceCodeBuilder new.
+    class := codeBuilder createClass.
     class className: className.  
 
     self assertClassNotExists: className.
 
-    method := builder createMethod.
+    method := codeBuilder createMethod.
     method 
         class: class;
         protocol: 'a protocol';
@@ -212,7 +211,7 @@
     self assertClassNotExists: className.
     self assert: lastUndoChange = (self lastUndoChange).
 
-    builder compile.
+    codeBuilder compile.
 
     self assertClassExists: className.
     self assert: (lastUndoChange = (self lastUndoChange)) not.
@@ -232,7 +231,7 @@
 
     class := self class.
 
-    method := builder createMethod.
+    method := codeBuilder createMethod.
     method 
         class: self class;
         protocol: 'a protocol';
@@ -242,7 +241,7 @@
 
     self assert: (class includesSelector: #aSelector) not.
 
-    builder execute.
+    codeBuilder execute.
 
     generatedSource := (class sourceCodeAt: #aSelector).
     expectedSource := 'aSelector
@@ -263,7 +262,7 @@
 test_create_class_immediate
     | mockClass |
 
-    mockClass := builder createClassImmediate: 'MockClassForTestCase'.
+    mockClass := codeBuilder createClassImmediate: 'MockClassForTestCase'.
 
     self assert: mockClass new className = 'MockClassForTestCase'.
     self assert: mockClass superclass new className = 'Object'.
@@ -279,7 +278,7 @@
 test_create_class_immediate_with_given_super_class_name
     | mockClass |
 
-    mockClass := builder createClassImmediate: 'MockClassForTestCase' superClassName: 'Object'.
+    mockClass := codeBuilder createClassImmediate: 'MockClassForTestCase' superClassName: 'Object'.
 
     self assert: mockClass new className = 'MockClassForTestCase'.
     self assert: mockClass superclass new className = 'Object'.
@@ -297,8 +296,8 @@
     expectedSource := 'instanceMethod:aParam
     ^ self'.
 
-    mockClass := builder createClassImmediate: 'MockClassForTestCase' superClassName: 'Object'.
-    builder createMethodImmediate: mockClass protocol: 'a protocol' source: expectedSource.
+    mockClass := codeBuilder createClassImmediate: 'MockClassForTestCase' superClassName: 'Object'.
+    codeBuilder createMethodImmediate: mockClass protocol: 'a protocol' source: expectedSource.
 
     actualSource := (mockClass sourceCodeAt: #instanceMethod:).
 
@@ -311,8 +310,8 @@
 
 test_empty_class_not_in_change
 
-    builder createClass.
-    self assert: builder change isNil.
+    codeBuilder createClass.
+    self assert: codeBuilder change isNil.
 
     "Created: / 22-07-2014 / 22:22:04 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 !
@@ -320,7 +319,7 @@
 test_method_source_builded
     | methodBuilder source |
 
-    methodBuilder := builder methodBuilder.
+    methodBuilder := codeBuilder methodBuilder.
     methodBuilder
         source: '`@methodName
 
@@ -341,7 +340,7 @@
 test_method_source_builded_with_comment
     | methodBuilder buildedSource expectedSource |
 
-    methodBuilder := builder methodBuilder.
+    methodBuilder := codeBuilder methodBuilder.
     methodBuilder
         source: '`@methodName
 
@@ -375,7 +374,7 @@
 
     collection do: [ each | each call ].'.
 
-    methodBuilder := builder methodBuilder.
+    methodBuilder := codeBuilder methodBuilder.
     methodBuilder
         source: originalSource;
         replace: '`variableName' with: 'collection'.
@@ -389,8 +388,8 @@
 
 test_nil_changes_not_in_change_collector
 
-    builder createMethod.
-    self assert: builder change isNil.
+    codeBuilder createMethod.
+    self assert: codeBuilder change isNil.
 
     "Created: / 22-07-2014 / 22:16:37 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 !
@@ -399,12 +398,12 @@
 
     | method |
 
-    builder createMethod.
-    method := builder createMethod.
+    codeBuilder createMethod.
+    method := codeBuilder createMethod.
     method source: 'some ^ 5'.
 
-    self assert: builder codeBuilds length = 2.
-    self assert: builder change isNil.
+    self assert: codeBuilder codeBuilds length = 2.
+    self assert: codeBuilder change isNil.
 
     "Created: / 22-07-2014 / 22:39:10 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 !
@@ -416,10 +415,10 @@
     classNames := Array with: 'DummyClassForTestCase1' with: 'DummyClassForTestCase2'.
 
     classNames do: [ :className |
-        classCollection add: (builder className: className; createClass).
+        classCollection add: (codeBuilder className: className; createClass).
     ].
 
-    builder
+    codeBuilder
         classes: classCollection;
         protocol: 'a protocol';
         source: '`@selector
@@ -427,7 +426,7 @@
         replace: '`@selector' with: 'aSelector';
         createMethod.
 
-    builder execute.
+    codeBuilder execute.
 
     classNames do: [ :className |
         | class method |
@@ -451,21 +450,21 @@
     mockSuperClassName := 'MockSuperClassForTestCase'.
     mockClassName := 'MockClassForTestCase'.
 
-    mockSuperClass := builder createClassImmediate: mockSuperClassName superClassName: 'Object'.
-    builder createClassImmediate: mockClassName superClassName: mockSuperClassName.
+    mockSuperClass := codeBuilder createClassImmediate: mockSuperClassName superClassName: 'Object'.
+    codeBuilder createClassImmediate: mockClassName superClassName: mockSuperClassName.
 
     "/ Instance method
-    builder createMethodImmediate: mockSuperClass protocol: 'instance-protocol' source: 'instanceMethod: aParam
+    codeBuilder createMethodImmediate: mockSuperClass protocol: 'instance-protocol' source: 'instanceMethod: aParam
     self shouldImplement'.
 
     "/ Class method
-    builder createMethodImmediate: mockSuperClass class protocol: 'class-protocol' source: 'classMethod: aParam
+    codeBuilder createMethodImmediate: mockSuperClass class protocol: 'class-protocol' source: 'classMethod: aParam
     self shouldImplement'.
 
     self assertClassExists: mockSuperClassName.
     self assertClassExists: mockClassName.
 
-    builder redoChanges.
+    codeBuilder redoChanges.
 
     self assertClassNotExists: mockSuperClassName.
     self assertClassNotExists: mockClassName.
--- a/CustomSubclassResponsibilityCodeGenerator.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomSubclassResponsibilityCodeGenerator.st	Sat Aug 23 16:41:05 2014 +0200
@@ -65,7 +65,7 @@
 
         superclassMethod := (classQuery methodForSuperclassSelector: selector class: aClass).
 
-        method := builder createMethod.
+        method := codeBuilder createMethod.
         method
             class: aClass;
             protocol: superclassMethod category;
--- a/CustomTestCaseCodeGenerator.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomTestCaseCodeGenerator.st	Sat Aug 23 16:41:05 2014 +0200
@@ -46,7 +46,7 @@
 
             testClassName := className, 'Tests'.
 
-            testClass := builder createClass.
+            testClass := codeBuilder createClass.
             testClass
                 className: testClassName;
                 superclassName: 'TestCase';
--- a/CustomValueHolderAccessMethodsCodeGeneratorTests.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomValueHolderAccessMethodsCodeGeneratorTests.st	Sat Aug 23 16:41:05 2014 +0200
@@ -1,6 +1,6 @@
 "{ Package: 'jn:refactoring_custom' }"
 
-CustomCodeGeneratorTestCase subclass:#CustomValueHolderAccessMethodsCodeGeneratorTests
+CustomCodeGeneratorOrRefactoringTestCase subclass:#CustomValueHolderAccessMethodsCodeGeneratorTests
 	instanceVariableNames:''
 	classVariableNames:''
 	poolDictionaries:''
@@ -9,7 +9,7 @@
 
 !CustomValueHolderAccessMethodsCodeGeneratorTests methodsFor:'accessing'!
 
-generator
+generatorOrRefactoring
     ^ CustomValueHolderAccessMethodsCodeGenerator new
 ! !
 
--- a/CustomValueHolderGetterMethodsCodeGenerator.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomValueHolderGetterMethodsCodeGenerator.st	Sat Aug 23 16:41:05 2014 +0200
@@ -49,7 +49,7 @@
         comment := comment bindWith: aName.
     ].  
 
-    methodBuilder := builder methodBuilder.
+    methodBuilder := codeBuilder methodBuilder.
     methodBuilder
         source: '`@methodName
             `"comment
--- a/CustomValueHolderGetterMethodsCodeGeneratorTests.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomValueHolderGetterMethodsCodeGeneratorTests.st	Sat Aug 23 16:41:05 2014 +0200
@@ -1,6 +1,6 @@
 "{ Package: 'jn:refactoring_custom' }"
 
-CustomCodeGeneratorTestCase subclass:#CustomValueHolderGetterMethodsCodeGeneratorTests
+CustomCodeGeneratorOrRefactoringTestCase subclass:#CustomValueHolderGetterMethodsCodeGeneratorTests
 	instanceVariableNames:''
 	classVariableNames:''
 	poolDictionaries:''
@@ -9,7 +9,7 @@
 
 !CustomValueHolderGetterMethodsCodeGeneratorTests methodsFor:'accessing'!
 
-generator
+generatorOrRefactoring
     ^ CustomValueHolderGetterMethodsCodeGenerator new
 ! !
 
--- a/CustomValueHolderWithChangeNotificationAccessMethodsCodeGeneratorTests.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomValueHolderWithChangeNotificationAccessMethodsCodeGeneratorTests.st	Sat Aug 23 16:41:05 2014 +0200
@@ -1,6 +1,6 @@
 "{ Package: 'jn:refactoring_custom' }"
 
-CustomCodeGeneratorTestCase subclass:#CustomValueHolderWithChangeNotificationAccessMethodsCodeGeneratorTests
+CustomCodeGeneratorOrRefactoringTestCase subclass:#CustomValueHolderWithChangeNotificationAccessMethodsCodeGeneratorTests
 	instanceVariableNames:''
 	classVariableNames:''
 	poolDictionaries:''
@@ -9,7 +9,7 @@
 
 !CustomValueHolderWithChangeNotificationAccessMethodsCodeGeneratorTests methodsFor:'accessing'!
 
-generator
+generatorOrRefactoring
     ^ CustomValueHolderWithChangeNotificationAccessMethodsCodeGenerator new
 ! !
 
--- a/CustomValueHolderWithChangeNotificationGetterMethodsCodeGenerator.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomValueHolderWithChangeNotificationGetterMethodsCodeGenerator.st	Sat Aug 23 16:41:05 2014 +0200
@@ -48,7 +48,7 @@
         comment := comment bindWith: aName.
     ].  
 
-    methodBuilder := builder methodBuilder.
+    methodBuilder := codeBuilder methodBuilder.
     methodBuilder
         source: '`@methodName
             `"comment
--- a/CustomValueHolderWithChangeNotificationGetterMethodsCodeGeneratorTests.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomValueHolderWithChangeNotificationGetterMethodsCodeGeneratorTests.st	Sat Aug 23 16:41:05 2014 +0200
@@ -1,6 +1,6 @@
 "{ Package: 'jn:refactoring_custom' }"
 
-CustomCodeGeneratorTestCase subclass:#CustomValueHolderWithChangeNotificationGetterMethodsCodeGeneratorTests
+CustomCodeGeneratorOrRefactoringTestCase subclass:#CustomValueHolderWithChangeNotificationGetterMethodsCodeGeneratorTests
 	instanceVariableNames:''
 	classVariableNames:''
 	poolDictionaries:''
@@ -9,7 +9,7 @@
 
 !CustomValueHolderWithChangeNotificationGetterMethodsCodeGeneratorTests methodsFor:'accessing'!
 
-generator
+generatorOrRefactoring
     ^ CustomValueHolderWithChangeNotificationGetterMethodsCodeGenerator new
 ! !
 
--- a/CustomValueHolderWithChangeNotificationSetterMethodsCodeGenerator.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomValueHolderWithChangeNotificationSetterMethodsCodeGenerator.st	Sat Aug 23 16:41:05 2014 +0200
@@ -42,7 +42,7 @@
         comment := comment bindWith: aName.
     ].
 
-    methodBuilder := builder methodBuilder.
+    methodBuilder := codeBuilder methodBuilder.
     methodBuilder
         source: '`@methodName
             `"comment
--- a/CustomValueHolderWithChangeNotificationSetterMethodsCodeGeneratorTests.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomValueHolderWithChangeNotificationSetterMethodsCodeGeneratorTests.st	Sat Aug 23 16:41:05 2014 +0200
@@ -1,6 +1,6 @@
 "{ Package: 'jn:refactoring_custom' }"
 
-CustomCodeGeneratorTestCase subclass:#CustomValueHolderWithChangeNotificationSetterMethodsCodeGeneratorTests
+CustomCodeGeneratorOrRefactoringTestCase subclass:#CustomValueHolderWithChangeNotificationSetterMethodsCodeGeneratorTests
 	instanceVariableNames:''
 	classVariableNames:''
 	poolDictionaries:''
@@ -9,7 +9,7 @@
 
 !CustomValueHolderWithChangeNotificationSetterMethodsCodeGeneratorTests methodsFor:'accessing'!
 
-generator
+generatorOrRefactoring
     ^ CustomValueHolderWithChangeNotificationSetterMethodsCodeGenerator new
 ! !
 
--- a/CustomVisitorCodeGenerator.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomVisitorCodeGenerator.st	Sat Aug 23 16:41:05 2014 +0200
@@ -81,7 +81,7 @@
         methodSelector := methodSelector, parameterSelectorPart.
     ].
 
-    method := builder createMethod.
+    method := codeBuilder createMethod.
     method
         class: aClass;
         protocol: 'visiting';
--- a/CustomVisitorCodeGeneratorAcceptVisitorTests.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomVisitorCodeGeneratorAcceptVisitorTests.st	Sat Aug 23 16:41:05 2014 +0200
@@ -1,6 +1,6 @@
 "{ Package: 'jn:refactoring_custom' }"
 
-CustomCodeGeneratorTestCase subclass:#CustomVisitorCodeGeneratorAcceptVisitorTests
+CustomCodeGeneratorOrRefactoringTestCase subclass:#CustomVisitorCodeGeneratorAcceptVisitorTests
 	instanceVariableNames:''
 	classVariableNames:''
 	poolDictionaries:''
@@ -9,7 +9,7 @@
 
 !CustomVisitorCodeGeneratorAcceptVisitorTests methodsFor:'accessing'!
 
-generator
+generatorOrRefactoring
     ^ CustomVisitorCodeGeneratorAcceptVisitor new
 ! !
 
--- a/CustomVisitorCodeGeneratorTests.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/CustomVisitorCodeGeneratorTests.st	Sat Aug 23 16:41:05 2014 +0200
@@ -1,6 +1,6 @@
 "{ Package: 'jn:refactoring_custom' }"
 
-CustomCodeGeneratorTestCase subclass:#CustomVisitorCodeGeneratorTests
+CustomCodeGeneratorOrRefactoringTestCase subclass:#CustomVisitorCodeGeneratorTests
 	instanceVariableNames:''
 	classVariableNames:''
 	poolDictionaries:''
@@ -9,7 +9,7 @@
 
 !CustomVisitorCodeGeneratorTests methodsFor:'accessing'!
 
-generator
+generatorOrRefactoring
     ^ CustomVisitorCodeGenerator new
 ! !
 
@@ -29,19 +29,19 @@
 
     ^ visitor visitDummyTestClassForVisitorMethod: self with:parameter'.
 
-    class := builder createClassImmediate: 'DummyTestClassForVisitorMethod'.
+    class := codeBuilder createClassImmediate: 'DummyTestClassForVisitorMethod'.
 
-    generator
+    generatorOrRefactoring
         buildAcceptVisitorMethod: 'visitDummyTestClassForVisitorMethod:'
         withParameter: true 
         forClass: class.
 
-    generator builder execute.
+    generatorOrRefactoring codeBuilder execute.
 
     self assertMethodSource: expectedSource atSelector: #acceptVisitor:with: forClass: class
 
     "Created: / 27-07-2014 / 12:32:22 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-    "Modified: / 03-08-2014 / 22:51:44 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 23-08-2014 / 00:11:00 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 !
 
 test_accept_visitor_method_generated_with_comment_and_without_parameter
@@ -58,18 +58,19 @@
 
     ^ visitor visitDummyTestClassForVisitorMethod: self'.
 
-    class := builder createClassImmediate: 'DummyTestClassForVisitorMethod'.
+    class := codeBuilder createClassImmediate: 'DummyTestClassForVisitorMethod'.
 
-    generator
+    generatorOrRefactoring
         buildAcceptVisitorMethod: 'visitDummyTestClassForVisitorMethod:'
         withParameter: false 
         forClass: class.
 
-    generator builder execute.
+    generatorOrRefactoring codeBuilder execute.
 
     self assertMethodSource: expectedSource atSelector: #acceptVisitor: forClass: class
 
     "Created: / 03-08-2014 / 22:50:06 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 23-08-2014 / 00:11:14 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 !
 
 test_accept_visitor_method_generated_without_comment_and_with_parameter
@@ -82,18 +83,19 @@
 
     ^ visitor visitDummyTestClassForVisitorMethod: self with:parameter'.
 
-    class := builder createClassImmediate: 'DummyTestClassForVisitorMethod'.
+    class := codeBuilder createClassImmediate: 'DummyTestClassForVisitorMethod'.
 
-    generator
+    generatorOrRefactoring
         buildAcceptVisitorMethod: 'visitDummyTestClassForVisitorMethod:'
         withParameter: true 
         forClass: class.
 
-    generator builder execute.
+    generatorOrRefactoring codeBuilder execute.
 
     self assertMethodSource: expectedSource atSelector: #acceptVisitor:with: forClass: class
 
     "Created: / 03-08-2014 / 22:53:36 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 23-08-2014 / 00:11:25 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 !
 
 test_accept_visitor_method_generated_without_comment_and_without_parameter
@@ -106,17 +108,18 @@
 
     ^ visitor visitDummyTestClassForVisitorMethod: self'.
 
-    class := builder createClassImmediate: 'DummyTestClassForVisitorMethod'.
+    class := codeBuilder createClassImmediate: 'DummyTestClassForVisitorMethod'.
 
-    generator
+    generatorOrRefactoring
         buildAcceptVisitorMethod: 'visitDummyTestClassForVisitorMethod:'
         withParameter: false 
         forClass: class.
 
-    generator builder execute.
+    generatorOrRefactoring codeBuilder execute.
 
     self assertMethodSource: expectedSource atSelector: #acceptVisitor: forClass: class
 
     "Created: / 03-08-2014 / 22:51:18 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+    "Modified: / 23-08-2014 / 00:11:32 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
 ! !
 
--- a/Make.proto	Fri Aug 22 22:04:32 2014 +0200
+++ b/Make.proto	Sat Aug 23 16:41:05 2014 +0200
@@ -159,6 +159,7 @@
 $(OUTDIR)CustomUserDialog.$(O) CustomUserDialog.$(H): CustomUserDialog.st $(INCLUDE_TOP)/jn/refactoring_custom/CustomDialog.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)CustomAccessMethodsCodeGenerator.$(O) CustomAccessMethodsCodeGenerator.$(H): CustomAccessMethodsCodeGenerator.st $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGenerator.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libtool/CodeGeneratorTool.$(H) $(STCHDR)
 $(OUTDIR)CustomCodeGeneratorClassGenerator.$(O) CustomCodeGeneratorClassGenerator.$(H): CustomCodeGeneratorClassGenerator.st $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGenerator.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libtool/CodeGeneratorTool.$(H) $(STCHDR)
+$(OUTDIR)CustomCodeSelectionToResourceTranslation.$(O) CustomCodeSelectionToResourceTranslation.$(H): CustomCodeSelectionToResourceTranslation.st $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomRefactoring.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libtool/CodeGeneratorTool.$(H) $(STCHDR)
 $(OUTDIR)CustomFooBarBazCodeGenerator.$(O) CustomFooBarBazCodeGenerator.$(H): CustomFooBarBazCodeGenerator.st $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGenerator.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libtool/CodeGeneratorTool.$(H) $(STCHDR)
 $(OUTDIR)CustomIsAbstractCodeGenerator.$(O) CustomIsAbstractCodeGenerator.$(H): CustomIsAbstractCodeGenerator.st $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGenerator.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libtool/CodeGeneratorTool.$(H) $(STCHDR)
 $(OUTDIR)CustomReplaceIfNilWithIfTrueRefactoring.$(O) CustomReplaceIfNilWithIfTrueRefactoring.$(H): CustomReplaceIfNilWithIfTrueRefactoring.st $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomRefactoring.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libtool/CodeGeneratorTool.$(H) $(STCHDR)
--- a/Make.spec	Fri Aug 22 22:04:32 2014 +0200
+++ b/Make.spec	Sat Aug 23 16:41:05 2014 +0200
@@ -76,6 +76,7 @@
 	CustomUserDialog \
 	CustomAccessMethodsCodeGenerator \
 	CustomCodeGeneratorClassGenerator \
+	CustomCodeSelectionToResourceTranslation \
 	CustomFooBarBazCodeGenerator \
 	CustomIsAbstractCodeGenerator \
 	CustomReplaceIfNilWithIfTrueRefactoring \
@@ -130,6 +131,7 @@
     $(OUTDIR_SLASH)CustomUserDialog.$(O) \
     $(OUTDIR_SLASH)CustomAccessMethodsCodeGenerator.$(O) \
     $(OUTDIR_SLASH)CustomCodeGeneratorClassGenerator.$(O) \
+    $(OUTDIR_SLASH)CustomCodeSelectionToResourceTranslation.$(O) \
     $(OUTDIR_SLASH)CustomFooBarBazCodeGenerator.$(O) \
     $(OUTDIR_SLASH)CustomIsAbstractCodeGenerator.$(O) \
     $(OUTDIR_SLASH)CustomReplaceIfNilWithIfTrueRefactoring.$(O) \
--- a/abbrev.stc	Fri Aug 22 22:04:32 2014 +0200
+++ b/abbrev.stc	Sat Aug 23 16:41:05 2014 +0200
@@ -6,8 +6,8 @@
 CustomClassQueryTests CustomClassQueryTests jn:refactoring_custom 'Interface-Refactoring-Custom-Tests' 1
 CustomCodeGeneratorClassGeneratorTests CustomCodeGeneratorClassGeneratorTests jn:refactoring_custom 'Interface-Refactoring-Custom-Tests' 1
 CustomCodeGeneratorOrRefactoring CustomCodeGeneratorOrRefactoring jn:refactoring_custom 'Interface-Refactoring-Custom' 0
-CustomCodeGeneratorTestCase CustomCodeGeneratorTestCase jn:refactoring_custom 'Interface-Refactoring-Custom-Tests' 1
-CustomCodeGeneratorTestCaseTests CustomCodeGeneratorTestCaseTests jn:refactoring_custom 'Interface-Refactoring-Custom-Tests-Tests' 1
+CustomCodeGeneratorOrRefactoringTestCase CustomCodeGeneratorOrRefactoringTestCase jn:refactoring_custom 'Interface-Refactoring-Custom-Tests' 1
+CustomCodeGeneratorOrRefactoringTestCaseTests CustomCodeGeneratorOrRefactoringTestCaseTests jn:refactoring_custom 'Interface-Refactoring-Custom-Tests' 1
 CustomContext CustomContext jn:refactoring_custom 'Interface-Refactoring-Custom' 0
 CustomDialog CustomDialog jn:refactoring_custom 'Interface-Refactoring-Custom' 0
 CustomDummyTests CustomDummyTests jn:refactoring_custom 'Interface-Refactoring-Custom-Tests' 1
@@ -55,6 +55,7 @@
 CustomVisitorCodeGeneratorTests CustomVisitorCodeGeneratorTests jn:refactoring_custom 'Interface-Refactoring-Custom-Tests' 1
 CustomAccessMethodsCodeGenerator CustomAccessMethodsCodeGenerator jn:refactoring_custom 'Interface-Refactoring-Custom' 0
 CustomCodeGeneratorClassGenerator CustomCodeGeneratorClassGenerator jn:refactoring_custom 'Interface-Refactoring-Custom' 0
+CustomCodeSelectionToResourceTranslation CustomCodeSelectionToResourceTranslation jn:refactoring_custom 'Interface-Refactoring-Custom' 0
 CustomFooBarBazCodeGenerator CustomFooBarBazCodeGenerator jn:refactoring_custom 'Interface-Refactoring-Custom' 0
 CustomIsAbstractCodeGenerator CustomIsAbstractCodeGenerator jn:refactoring_custom 'Interface-Refactoring-Custom' 0
 CustomReplaceIfNilWithIfTrueRefactoring CustomReplaceIfNilWithIfTrueRefactoring jn:refactoring_custom 'Interface-Refactoring-Custom' 0
--- a/bc.mak	Fri Aug 22 22:04:32 2014 +0200
+++ b/bc.mak	Sat Aug 23 16:41:05 2014 +0200
@@ -105,6 +105,7 @@
 $(OUTDIR)CustomUserDialog.$(O) CustomUserDialog.$(H): CustomUserDialog.st $(INCLUDE_TOP)\jn\refactoring_custom\CustomDialog.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)CustomAccessMethodsCodeGenerator.$(O) CustomAccessMethodsCodeGenerator.$(H): CustomAccessMethodsCodeGenerator.st $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGenerator.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libtool\CodeGeneratorTool.$(H) $(STCHDR)
 $(OUTDIR)CustomCodeGeneratorClassGenerator.$(O) CustomCodeGeneratorClassGenerator.$(H): CustomCodeGeneratorClassGenerator.st $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGenerator.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libtool\CodeGeneratorTool.$(H) $(STCHDR)
+$(OUTDIR)CustomCodeSelectionToResourceTranslation.$(O) CustomCodeSelectionToResourceTranslation.$(H): CustomCodeSelectionToResourceTranslation.st $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomRefactoring.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libtool\CodeGeneratorTool.$(H) $(STCHDR)
 $(OUTDIR)CustomFooBarBazCodeGenerator.$(O) CustomFooBarBazCodeGenerator.$(H): CustomFooBarBazCodeGenerator.st $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGenerator.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libtool\CodeGeneratorTool.$(H) $(STCHDR)
 $(OUTDIR)CustomIsAbstractCodeGenerator.$(O) CustomIsAbstractCodeGenerator.$(H): CustomIsAbstractCodeGenerator.st $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGenerator.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libtool\CodeGeneratorTool.$(H) $(STCHDR)
 $(OUTDIR)CustomReplaceIfNilWithIfTrueRefactoring.$(O) CustomReplaceIfNilWithIfTrueRefactoring.$(H): CustomReplaceIfNilWithIfTrueRefactoring.st $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomRefactoring.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libtool\CodeGeneratorTool.$(H) $(STCHDR)
--- a/jn_refactoring_custom.st	Fri Aug 22 22:04:32 2014 +0200
+++ b/jn_refactoring_custom.st	Sat Aug 23 16:41:05 2014 +0200
@@ -46,7 +46,7 @@
     ^ #(
         #'stx:goodies/refactoryBrowser/changes'    "CompositeRefactoryChange - referenced by CustomRefactoryBuilder>>change"
         #'stx:goodies/refactoryBrowser/helpers'    "RBNamespace - referenced by CustomSourceCodeBuilder::Class>>asRBClass"
-        #'stx:libbasic3'    "Change - referenced by CustomCodeGeneratorTestCase>>assertSource:sameAs:"
+        #'stx:libbasic3'    "Change - referenced by CustomCodeGeneratorOrRefactoringTestCase>>assertSource:sameAs:"
         #'stx:libview'    "WindowGroup - referenced by CustomCodeGeneratorOrRefactoring>>executeInContextWithWaitCursor:"
     )
 !
@@ -76,8 +76,8 @@
         (CustomClassQueryTests autoload)
         (CustomCodeGeneratorClassGeneratorTests autoload)
         CustomCodeGeneratorOrRefactoring
-        (CustomCodeGeneratorTestCase autoload)
-        (CustomCodeGeneratorTestCaseTests autoload)
+        (CustomCodeGeneratorOrRefactoringTestCase autoload)
+        (CustomCodeGeneratorOrRefactoringTestCaseTests autoload)
         CustomContext
         CustomDialog
         (CustomDummyTests autoload)
@@ -125,6 +125,7 @@
         (CustomVisitorCodeGeneratorTests autoload)
         CustomAccessMethodsCodeGenerator
         CustomCodeGeneratorClassGenerator
+        CustomCodeSelectionToResourceTranslation
         CustomFooBarBazCodeGenerator
         CustomIsAbstractCodeGenerator
         CustomReplaceIfNilWithIfTrueRefactoring
--- a/libInit.cc	Fri Aug 22 22:04:32 2014 +0200
+++ b/libInit.cc	Sat Aug 23 16:41:05 2014 +0200
@@ -53,6 +53,7 @@
 _CustomUserDialog_Init(pass,__pRT__,snd);
 _CustomAccessMethodsCodeGenerator_Init(pass,__pRT__,snd);
 _CustomCodeGeneratorClassGenerator_Init(pass,__pRT__,snd);
+_CustomCodeSelectionToResourceTranslation_Init(pass,__pRT__,snd);
 _CustomFooBarBazCodeGenerator_Init(pass,__pRT__,snd);
 _CustomIsAbstractCodeGenerator_Init(pass,__pRT__,snd);
 _CustomReplaceIfNilWithIfTrueRefactoring_Init(pass,__pRT__,snd);
--- a/refactoring_custom.rc	Fri Aug 22 22:04:32 2014 +0200
+++ b/refactoring_custom.rc	Sat Aug 23 16:41:05 2014 +0200
@@ -25,7 +25,7 @@
       VALUE "LegalCopyright", "My CopyRight or CopyLeft\0"
       VALUE "ProductName", "ProductName\0"
       VALUE "ProductVersion", "6.2.4.1326\0"
-      VALUE "ProductDate", "Thu, 21 Aug 2014 10:22:44 GMT\0"
+      VALUE "ProductDate", "Sat, 23 Aug 2014 14:35:48 GMT\0"
     END
 
   END