--- a/CustomAddClassChangeTests.st Sat Nov 15 00:04:26 2014 +0000
+++ b/CustomAddClassChangeTests.st Tue Nov 18 09:33:03 2014 +0000
@@ -50,6 +50,165 @@
!CustomAddClassChangeTests methodsFor:'tests'!
+test_argumens_by_selector_parts_from_message_arguments_missing
+ | expectedResult actualResult messageNode |
+
+ messageNode := RBParser parseExpression: 'Object subclass: SomeClass01 category: #SomeCategory01 '.
+ messageNode arguments: #().
+
+ expectedResult := Dictionary new.
+ actualResult := change argumensBySelectorPartsFromMessage: messageNode.
+
+ self assert: expectedResult = actualResult
+
+ "Created: / 16-11-2014 / 15:12:19 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+test_argumens_by_selector_parts_from_message_none_argument
+ | expectedResult actualResult messageNode |
+
+ messageNode := RBParser parseExpression: 'Object name'.
+
+ expectedResult := Dictionary new.
+ actualResult := change argumensBySelectorPartsFromMessage: messageNode.
+
+ self assert: expectedResult = actualResult
+
+ "Created: / 16-11-2014 / 15:03:54 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+test_argumens_by_selector_parts_from_message_one_argument
+ | expectedResult actualResult messageNode |
+
+ messageNode := RBParser parseExpression: 'Object subclass: SomeClass01'.
+
+ expectedResult := Dictionary new
+ at: #subclass: put: (messageNode arguments at: 1);
+ yourself.
+
+ actualResult := change argumensBySelectorPartsFromMessage: messageNode.
+
+ self assert: expectedResult = actualResult
+
+ "Created: / 16-11-2014 / 15:05:30 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+test_argumens_by_selector_parts_from_message_selector_empty
+ | expectedResult actualResult messageNode |
+
+ messageNode := RBParser parseExpression: 'Object subclass: SomeClass01 category: #SomeCategory01 '.
+ messageNode selectorParts: #().
+
+ expectedResult := Dictionary new
+ at: 1 put: (messageNode arguments at: 1);
+ at: 2 put: (messageNode arguments at: 2);
+ yourself.
+
+ actualResult := change argumensBySelectorPartsFromMessage: messageNode.
+
+ self assert: expectedResult = actualResult
+
+ "Created: / 16-11-2014 / 15:10:50 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+test_argumens_by_selector_parts_from_message_selector_missing
+ | expectedResult actualResult messageNode |
+
+ messageNode := RBParser parseExpression: 'Object subclass: SomeClass01 category: #SomeCategory01 '.
+ messageNode selectorParts: nil.
+
+ expectedResult := Dictionary new
+ at: 1 put: (messageNode arguments at: 1);
+ at: 2 put: (messageNode arguments at: 2);
+ yourself.
+
+ actualResult := change argumensBySelectorPartsFromMessage: messageNode.
+
+ self assert: expectedResult = actualResult
+
+ "Created: / 16-11-2014 / 15:10:22 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+test_argumens_by_selector_parts_from_message_two_arguments
+ | expectedResult actualResult messageNode |
+
+ messageNode := RBParser parseExpression: 'Object subclass: SomeClass01 category: #SomeCategory01 '.
+
+ expectedResult := Dictionary new
+ at: #subclass: put: (messageNode arguments at: 1);
+ at: #category: put: (messageNode arguments at: 2);
+ yourself.
+
+ actualResult := change argumensBySelectorPartsFromMessage: messageNode.
+
+ self assert: expectedResult = actualResult
+
+ "Created: / 16-11-2014 / 15:09:31 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+test_fill_out_definition_ordinary_class
+
+ change definition: 'SomeObject01 subclass:#DummySubclass01
+ instanceVariableNames:''inst01 inst02''
+ classVariableNames:''Cls01 Cls02''
+ poolDictionaries:''pool01''
+ category:''Some-Category01'''.
+
+ change fillOutDefinition.
+
+ self assert: #DummySubclass01 = (change changeClassName).
+ self assert: change privateInClassName isNil.
+ self assert: #SomeObject01 = (change superclassName).
+ self assert: #'Some-Category01' = (change category).
+ self assert: (#(inst01 inst02) asOrderedCollection) = (change instanceVariableNames).
+ self assert: (#(Cls01 Cls02) asOrderedCollection) = (change classVariableNames).
+ self assert: (#(pool01) asOrderedCollection) = (change poolDictionaryNames).
+
+ "Created: / 16-11-2014 / 16:12:45 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+test_fill_out_definition_private_class_01
+
+ change definition: 'Object subclass:#DummyPrivateClass01
+ instanceVariableNames:''''
+ classVariableNames:''''
+ poolDictionaries:''''
+ privateIn:Object'.
+
+ change fillOutDefinition.
+
+ self assert: #Object::DummyPrivateClass01 = (change changeClassName).
+ self assert: #Object = (change privateInClassName).
+ self assert: #Object = (change superclassName).
+ self assert: #'' = (change category).
+ self assert: (OrderedCollection new) = (change instanceVariableNames).
+ self assert: (OrderedCollection new) = (change classVariableNames).
+ self assert: (OrderedCollection new) = (change poolDictionaryNames).
+
+ "Created: / 16-11-2014 / 15:56:30 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+test_fill_out_definition_private_class_02
+
+ change definition: 'SomeObject01 subclass:#DummyPrivateClass01
+ instanceVariableNames:''inst01 inst02''
+ classVariableNames:''Cls01 Cls02''
+ poolDictionaries:''pool01''
+ privateIn:SomeObject02'.
+
+ change fillOutDefinition.
+
+ self assert: #SomeObject02::DummyPrivateClass01 = (change changeClassName).
+ self assert: #SomeObject02 = (change privateInClassName).
+ self assert: #SomeObject01 = (change superclassName).
+ self assert: #'' = (change category).
+ self assert: (#(inst01 inst02) asOrderedCollection) = (change instanceVariableNames).
+ self assert: (#(Cls01 Cls02) asOrderedCollection) = (change classVariableNames).
+ self assert: (#(pool01) asOrderedCollection) = (change poolDictionaryNames).
+
+ "Created: / 16-11-2014 / 16:08:16 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
test_get_and_set_package
self assert: change package isNil.
@@ -61,6 +220,83 @@
"Created: / 17-10-2014 / 09:06:07 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
!
+test_is_valid_message_name
+ | expectedResult actualResult messageNode |
+
+ messageNode := RBParser parseExpression: 'Object subclass: SomeClass01 category: #SomeCategory01 '.
+
+ expectedResult := false.
+ actualResult := change isValidMessageName: messageNode.
+
+ self assert: expectedResult = actualResult
+
+ "Created: / 16-11-2014 / 15:15:00 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+test_is_valid_message_name_with_private_class
+ | expectedResult actualResult messageNode |
+
+ messageNode := RBParser parseExpression: 'DummyObject01 subclass:#DummyPrivateClass01
+ instanceVariableNames:''''
+ classVariableNames:''''
+ poolDictionaries:''''
+ privateIn:DummyObject02'.
+
+ expectedResult := true.
+ actualResult := change isValidMessageName: messageNode.
+
+ self assert: expectedResult = actualResult
+
+ "Created: / 16-11-2014 / 15:16:27 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+test_is_valid_subclass_creation_message_for_private_class
+ | expectedResult actualResult messageNode |
+
+ messageNode := RBParser parseExpression: 'DummyObject01 subclass:#DummyPrivateClass01
+ instanceVariableNames:''''
+ classVariableNames:''''
+ poolDictionaries:''''
+ privateIn:DummyObject02'.
+
+ expectedResult := true.
+ actualResult := change isValidSubclassCreationMessage: messageNode.
+
+ self assert: expectedResult = actualResult
+
+ "Created: / 16-11-2014 / 15:23:59 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+test_is_valid_subclass_creation_message_for_private_class_wrong
+ | expectedResult actualResult messageNode |
+
+ messageNode := RBParser parseExpression: 'DummyObject01 subclass:DummyPrivateClass01
+ instanceVariableNames:''''
+ classVariableNames:''''
+ poolDictionaries:''''
+ privateIn:DummyObject02'.
+
+ expectedResult := false.
+ actualResult := change isValidSubclassCreationMessage: messageNode.
+
+ self assert: expectedResult = actualResult
+
+ "Created: / 16-11-2014 / 15:33:49 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+test_is_valid_subclass_creation_message_for_unkown_message
+ | expectedResult actualResult messageNode |
+
+ messageNode := RBParser parseExpression: 'DummyObject01 subclass:#DummyPrivateClass01'.
+
+ expectedResult := false.
+ actualResult := change isValidSubclassCreationMessage: messageNode.
+
+ self assert: expectedResult = actualResult
+
+ "Created: / 16-11-2014 / 15:34:38 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
test_primitive_execute_with_package
| class |
--- a/CustomCodeGeneratorOrRefactoring.st Sat Nov 15 00:04:26 2014 +0000
+++ b/CustomCodeGeneratorOrRefactoring.st Tue Nov 18 09:33:03 2014 +0000
@@ -279,20 +279,24 @@
changeManager performChange: compositeChangeCollector
].
compositeChangeCollector := nil.
+ self model changes: CompositeRefactoryChange new.
]
]
"Created: / 31-05-2014 / 11:30:11 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 16-11-2014 / 10:42:32 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
!
startCollectChanges
(self canUseRefactoringSupport) ifTrue:[
compositeChangeCollector isNil ifTrue:[
- compositeChangeCollector := CompositeRefactoryChange new.
+ compositeChangeCollector := model changes.
compositeChangeNesting := 0.
].
compositeChangeNesting := compositeChangeNesting + 1.
]
+
+ "Modified: / 16-11-2014 / 10:43:06 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
! !
!CustomCodeGeneratorOrRefactoring methodsFor:'code generation'!
@@ -305,14 +309,6 @@
"Created: / 23-08-2014 / 15:40:17 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
"Modified: / 17-09-2014 / 22:53:48 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-addChanges
- self addChange:model changes.
- self addChange:refactoryBuilder change
-
- "Created: / 10-04-2014 / 23:26:12 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
- "Modified: / 21-09-2014 / 23:14:45 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
! !
!CustomCodeGeneratorOrRefactoring methodsFor:'compilation'!
@@ -357,6 +353,7 @@
].
change := InteractiveAddMethodChange compile:(theCode asString) in:aClass classified:category.
+ change model: self model.
"/ if collecting, add to changes (to be executed as one change at the end,
"/ in order to have only one change in the undo-list (instead of many)
@@ -368,7 +365,7 @@
"Modified: / 21-08-2006 / 18:39:06 / cg"
"Modified (format): / 21-01-2012 / 10:40:59 / cg"
- "Modified: / 21-09-2014 / 20:21:33 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 15-11-2014 / 17:32:18 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
! !
!CustomCodeGeneratorOrRefactoring methodsFor:'executing'!
@@ -393,12 +390,11 @@
self validateInContext: aCustomContext.
self buildInContext: aCustomContext.
- self addChanges.
self executeCollectedChangesNamed: self class description.
"Created: / 19-03-2014 / 18:45:26 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
"Modified: / 16-09-2014 / 11:04:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 12-11-2014 / 23:48:08 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 15-11-2014 / 22:18:34 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
!
executeInContextWithWaitCursor: aCustomContext
@@ -522,22 +518,25 @@
setUpModel
- model := CustomNamespace new.
- model formatter: formatter.
- model changeManager: changeManager.
+ model := CustomNamespace new
+ formatter: formatter;
+ changeManager: changeManager;
+ yourself
"Created: / 09-06-2014 / 22:56:10 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
- "Modified: / 19-10-2014 / 19:40:21 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 16-11-2014 / 10:41:34 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
!
setUpRefactoryBuilder
- refactoryBuilder := CustomRefactoryBuilder new.
- model formatter: formatter.
- model changeManager: changeManager.
+ refactoryBuilder := CustomRefactoryBuilder new
+ formatter: formatter;
+ changeManager: changeManager;
+ model: model;
+ yourself
"Created: / 23-08-2014 / 00:05:52 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
- "Modified: / 19-10-2014 / 19:41:14 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 16-11-2014 / 10:41:12 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
! !
!CustomCodeGeneratorOrRefactoring methodsFor:'private'!
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/CustomCodeSelectionRefactoring.st Tue Nov 18 09:33:03 2014 +0000
@@ -0,0 +1,71 @@
+"{ Package: 'jn:refactoring_custom' }"
+
+CustomRefactoring subclass:#CustomCodeSelectionRefactoring
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'Interface-Refactoring-Custom-Refactorings'
+!
+
+!CustomCodeSelectionRefactoring class methodsFor:'documentation'!
+
+documentation
+"
+ Template class for refactorings which operates on selected source code in the text editor.
+
+ [author:]
+ Jakub Nesveda <nesvejak@fit.cvut.cz>
+"
+! !
+
+!CustomCodeSelectionRefactoring 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."
+ | codes |
+
+ codes := aCustomContext selectedCodes.
+
+ codes notEmptyOrNil and: [
+ codes do: [ :selectedCode |
+ | sourceCode |
+
+ sourceCode := selectedCode selectedSourceCode.
+
+ (sourceCode notNil and: [ sourceCode size > 0 ]) ifTrue: [
+ ^ true
+ ]
+ ]
+ ].
+
+ ^ false
+
+ "Created: / 21-08-2014 / 23:28:25 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 05-11-2014 / 22:45:27 / 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"
+
+ ^ aCustomPerspective isCodeViewPerspective
+
+ "Created: / 21-08-2014 / 23:28:34 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 14-10-2014 / 10:29:52 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+isAbstract
+ "Return if this class is an abstract class.
+ True is returned here for myself only; false for subclasses.
+ Abstract subclasses must redefine again."
+
+ ^ self == CustomCodeSelectionRefactoring.
+! !
+
--- a/CustomCodeSelectionToResourceTranslation.st Sat Nov 15 00:04:26 2014 +0000
+++ b/CustomCodeSelectionToResourceTranslation.st Tue Nov 18 09:33:03 2014 +0000
@@ -1,6 +1,6 @@
"{ Package: 'jn:refactoring_custom' }"
-CustomRefactoring subclass:#CustomCodeSelectionToResourceTranslation
+CustomCodeSelectionRefactoring subclass:#CustomCodeSelectionToResourceTranslation
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
@@ -41,49 +41,6 @@
"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."
- | codes |
-
- codes := aCustomContext selectedCodes.
-
- codes notEmptyOrNil and: [
- codes do: [ :selectedCode |
- | sourceCode |
-
- sourceCode := selectedCode selectedSourceCode.
-
- (sourceCode notNil and: [ sourceCode size > 0 ]) ifTrue: [
- ^ true
- ]
- ]
- ].
-
- ^ false
-
- "Created: / 21-08-2014 / 23:28:25 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
- "Modified: / 05-11-2014 / 22:45:27 / 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"
-
- ^ aCustomPerspective isCodeViewPerspective
-
- "Created: / 21-08-2014 / 23:28:34 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
- "Modified: / 14-10-2014 / 10:29:52 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-! !
-
!CustomCodeSelectionToResourceTranslation methodsFor:'executing'!
buildInContext:aCustomContext
--- a/CustomIsAbstractCodeGenerator.st Sat Nov 15 00:04:26 2014 +0000
+++ b/CustomIsAbstractCodeGenerator.st Tue Nov 18 09:33:03 2014 +0000
@@ -55,22 +55,22 @@
!CustomIsAbstractCodeGenerator methodsFor:'executing'!
buildInContext: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 a test"
-
| classes |
classes := aCustomContext selectedClasses.
- classes do:[:class |
- (class canUnderstand: #isAbstract) ifFalse:[
+ classes do:[:class |
+ | metaclass className |
+
+ metaclass := class theMetaclass.
+ className := class theNonMetaclass name.
+
+ (metaclass includesSelector: #isAbstract) ifFalse:[
self compile: ('isAbstract
- ^ self == %1' bindWith: class) forClass: class class inCategory: 'testing'
+ ^ self == %1' bindWith: className) forClass: metaclass inCategory: 'testing'
].
]
"Created: / 16-09-2014 / 07:20:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-11-2014 / 17:23:31 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
! !
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/CustomIsAbstractCodeGeneratorTests.st Tue Nov 18 09:33:03 2014 +0000
@@ -0,0 +1,90 @@
+"{ Package: 'jn:refactoring_custom' }"
+
+CustomCodeGeneratorOrRefactoringTestCase subclass:#CustomIsAbstractCodeGeneratorTests
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'Interface-Refactoring-Custom-Generators-Tests'
+!
+
+!CustomIsAbstractCodeGeneratorTests methodsFor:'accessing'!
+
+generatorOrRefactoring
+ ^ CustomIsAbstractCodeGenerator new
+! !
+
+!CustomIsAbstractCodeGeneratorTests methodsFor:'tests'!
+
+test_available_in_context
+
+ self deny: (generatorOrRefactoring class availableInContext:context).
+
+ context selectedClasses: (Array with: self class).
+
+ self assert: (generatorOrRefactoring class availableInContext:context).
+
+ "Modified (format): / 15-11-2014 / 15:51:33 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+test_available_in_perspective_class
+
+ self assert: (generatorOrRefactoring class availableInPerspective: CustomPerspective classPerspective)
+
+ "Modified: / 15-11-2014 / 15:52:10 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+test_is_abstract_method_exists
+ | expectedSource metaclass class |
+
+ metaclass := model createClass
+ name: #DummyClass01;
+ compile;
+ theMetaclass.
+
+ metaclass compile: 'isAbstract ^ false'.
+
+ expectedSource := 'isAbstract ^ false'.
+
+ context selectedClasses: (Array with: metaclass).
+ generatorOrRefactoring executeInContext: context.
+
+ class := Smalltalk at: #DummyClass01.
+ self assertClassMethodSource:expectedSource atSelector:#isAbstract forClass:class
+
+ "Created: / 16-11-2014 / 17:25:51 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+test_is_abstract_method_generated
+ |expectedSource|
+
+ expectedSource := 'isAbstract
+ ^ self == DummyClassForGeneratorTestCase'.
+
+ self executeGeneratorInContext:#classWithInstanceVariable.
+
+ self assertClassMethodSource:expectedSource atSelector:#isAbstract
+
+ "Created: / 15-11-2014 / 15:53:35 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 15-11-2014 / 19:32:04 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+test_is_abstract_method_generated_for_metaclass
+ | expectedSource metaclass class |
+
+ metaclass := model createClass
+ name: #DummyClass01;
+ compile;
+ theMetaclass.
+
+ expectedSource := 'isAbstract
+ ^ self == DummyClass01'.
+
+ context selectedClasses: (Array with: metaclass).
+ generatorOrRefactoring executeInContext: context.
+
+ class := Smalltalk at: #DummyClass01.
+ self assertClassMethodSource:expectedSource atSelector:#isAbstract forClass:class
+
+ "Created: / 16-11-2014 / 17:17:27 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
--- a/CustomNamespace.st Sat Nov 15 00:04:26 2014 +0000
+++ b/CustomNamespace.st Tue Nov 18 09:33:03 2014 +0000
@@ -11,6 +11,13 @@
!CustomNamespace methodsFor:'accessing'!
+at: aClassName
+
+ ^ self classNamed: aClassName asSymbol
+
+ "Created: / 15-11-2014 / 17:30:04 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
changeManager
^ changeManager
!
@@ -548,6 +555,14 @@
"Created: / 30-08-2014 / 21:38:21 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
! !
+!CustomNamespace methodsFor:'testing'!
+
+isNamespace
+ ^ true
+
+ "Created: / 15-11-2014 / 17:29:25 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
!CustomNamespace class methodsFor:'documentation'!
version_HG
--- a/CustomNamespaceTests.st Sat Nov 15 00:04:26 2014 +0000
+++ b/CustomNamespaceTests.st Tue Nov 18 09:33:03 2014 +0000
@@ -60,6 +60,33 @@
"Modified: / 09-10-2014 / 10:47:56 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
!
+test_at_class_found
+ | expectedClass actualClass |
+
+ expectedClass := model createClass
+ name: #DummyClass01;
+ compile;
+ yourself.
+
+ actualClass := model at: #DummyClass01.
+
+ self assert: expectedClass = actualClass
+
+ "Modified: / 16-11-2014 / 17:08:24 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+test_at_class_missing
+ | expectedClass actualClass |
+
+ expectedClass := nil.
+
+ actualClass := model at: #DummyClass01.
+
+ self assert: expectedClass = actualClass
+
+ "Created: / 16-11-2014 / 17:08:44 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
test_chaining_api_create_class_and_method_with_default_class
| class |
@@ -906,6 +933,13 @@
"Modified: / 10-10-2014 / 15:48:35 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
!
+test_is_namespace
+
+ self assert: model isNamespace
+
+ "Modified: / 16-11-2014 / 17:09:28 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
test_method_source_builded
| method expectedSource actualSource |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/CustomPrintCodeSelectionRefactoring.st Tue Nov 18 09:33:03 2014 +0000
@@ -0,0 +1,37 @@
+"{ Package: 'jn:refactoring_custom' }"
+
+CustomCodeSelectionRefactoring subclass:#CustomPrintCodeSelectionRefactoring
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'Interface-Refactoring-Custom-Refactorings'
+!
+
+!CustomPrintCodeSelectionRefactoring class methodsFor:'accessing-presentation'!
+
+description
+
+ ^ 'Wraps selected source code with Transcript showCR: to be printed out'
+
+ "Modified: / 15-11-2014 / 16:21:56 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+label
+
+ ^ 'Wrap with Transcript showCR: '
+
+ "Modified: / 15-11-2014 / 16:21:05 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
+!CustomPrintCodeSelectionRefactoring methodsFor:'executing - private'!
+
+buildInContext:aCustomContext
+
+ refactoryBuilder
+ replace:'`@expression'
+ with:'(Transcript showCR: (`@expression) asString)'
+ inContext:aCustomContext
+
+ "Modified: / 15-11-2014 / 16:36:50 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
--- a/CustomRBAbstractClassTests.st Sat Nov 15 00:04:26 2014 +0000
+++ b/CustomRBAbstractClassTests.st Tue Nov 18 09:33:03 2014 +0000
@@ -242,6 +242,72 @@
"Created: / 10-10-2014 / 11:56:52 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
!
+test_compiler_class_default
+
+ self assert: Compiler == (rbClass compilerClass)
+
+ "Created: / 16-11-2014 / 16:44:26 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+test_compiler_class_java
+ | expectedCompiler actualCompiler |
+
+ rbClass realClass: JavaLanguage new.
+
+ expectedCompiler := JavaCompiler ? JavaCompilerForSmalltalkExtensionsOnly.
+ actualCompiler := rbClass compilerClass.
+
+ self assert: expectedCompiler = actualCompiler
+
+ "Created: / 16-11-2014 / 16:45:33 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+test_compiler_class_javascript
+ | expectedCompiler actualCompiler |
+
+ rbClass realClass: STXJavaScriptLanguage new.
+
+ expectedCompiler := JavaScriptCompiler.
+ actualCompiler := rbClass compilerClass.
+
+ self assert: expectedCompiler = actualCompiler
+
+ "Created: / 16-11-2014 / 16:54:54 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+test_compiler_class_smalltalk
+
+ rbClass realClass: self class.
+
+ self assert: Compiler == (rbClass compilerClass)
+
+ "Created: / 16-11-2014 / 16:44:54 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+test_compiler_class_with_empty_real_class
+ | expectedCompiler actualCompiler |
+
+ expectedCompiler := Object compilerClass.
+ actualCompiler := rbClass compilerClass.
+
+ self assert: expectedCompiler = expectedCompiler
+
+ "Created: / 15-11-2014 / 17:02:00 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+test_compiler_class_with_filled_real_class
+ | expectedCompiler actualCompiler |
+
+ expectedCompiler := JavaClass compilerClass.
+
+ rbClass realClass: JavaClass.
+ actualCompiler := rbClass compilerClass.
+
+ self assert: expectedCompiler = expectedCompiler
+
+ "Created: / 15-11-2014 / 17:02:10 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
test_inherits_from_model_class
| class |
@@ -365,6 +431,13 @@
"Created: / 02-11-2014 / 11:05:50 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
!
+test_is_loaded
+
+ self assert: rbClass isLoaded
+
+ "Created: / 15-11-2014 / 17:12:17 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
test_is_subclass_of_model_class
| class |
@@ -693,6 +766,57 @@
"Created: / 09-10-2014 / 23:37:01 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
!
+test_private_classes_at_found
+ | expectedClass actualClass |
+
+ model defineClass: 'Object subclass:#DummyPrivateClass01
+ instanceVariableNames:''''
+ classVariableNames:''''
+ poolDictionaries:''''
+ privateIn:Object'.
+
+ expectedClass := model classNamed: #Object::DummyPrivateClass01.
+ self assert: (expectedClass name) = #Object::DummyPrivateClass01.
+
+ rbClass name: #Object.
+ actualClass := rbClass privateClassesAt: #DummyPrivateClass01.
+
+ self assert: expectedClass = actualClass
+
+ "Created: / 16-11-2014 / 11:50:30 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+test_private_classes_at_not_found
+ | expectedClass actualClass |
+
+ expectedClass := nil.
+ actualClass := rbClass privateClassesAt: #None.
+
+ self assert: expectedClass = actualClass
+
+ "Created: / 16-11-2014 / 11:41:11 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+test_private_classes_at_not_found_with_name
+ | expectedClass actualClass |
+
+ expectedClass := nil.
+ rbClass name: #DummyClass01.
+ actualClass := rbClass privateClassesAt: #None.
+
+ self assert: expectedClass = actualClass
+
+ "Created: / 16-11-2014 / 11:43:06 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified (format): / 16-11-2014 / 16:25:34 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+test_real_shared_pool_names
+
+ self assert: #() = (rbClass realSharedPoolNames)
+
+ "Created: / 16-11-2014 / 16:40:33 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
test_superclass_name
| expectedClassName actualClassName |
@@ -708,6 +832,13 @@
"Created: / 05-10-2014 / 00:16:02 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
!
+test_top_name_space
+
+ self assert: (rbClass topNameSpace) == (rbClass model)
+
+ "Created: / 16-11-2014 / 16:58:50 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
test_with_all_superclasses_do_for_one_superclass
| expectedClassNames actualClassNames |
--- a/CustomRefactoryBuilder.st Sat Nov 15 00:04:26 2014 +0000
+++ b/CustomRefactoryBuilder.st Tue Nov 18 09:33:03 2014 +0000
@@ -64,27 +64,6 @@
!CustomRefactoryBuilder methodsFor:'accessing'!
-change
- "Returns single code change from collected code changes."
-
- | change |
-
- changes isEmpty ifTrue: [
- ^ nil
- ].
-
- change := CompositeRefactoryChange new.
-
- changes do: [ :codeChange |
- change addChange: codeChange
- ].
-
- ^ change
-
- "Created: / 15-08-2014 / 00:45:10 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
- "Modified (comment): / 17-08-2014 / 17:16:38 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
changeManager
^ changeManager
!
@@ -132,32 +111,30 @@
so they take in effect ( method is added, class is renamed, ... )
with respect to current change manager implementatin - see CustomChangeManager subclasses."
- changeManager performChange: self change
+ model execute
"Created: / 15-08-2014 / 00:45:10 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
- "Modified (comment): / 19-10-2014 / 14:30:56 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 16-11-2014 / 17:42:32 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
!
undoChanges
"redo all changes made by execute method"
- changeManager undoChanges
+ model undoChanges
"Created: / 19-10-2014 / 14:57:49 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 16-11-2014 / 17:42:55 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
! !
-!CustomRefactoryBuilder methodsFor:'initialization'!
+!CustomRefactoryBuilder methodsFor:'initialize-release'!
initialize
- "Invoked when a new instance is created."
super initialize.
model := CustomNamespace new.
- changeManager := model changeManager.
- formatter := model formatter.
"Created: / 15-08-2014 / 00:42:39 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
- "Modified: / 19-10-2014 / 19:03:30 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 16-11-2014 / 17:33:43 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
! !
!CustomRefactoryBuilder methodsFor:'parsing'!
@@ -197,10 +174,10 @@
category: aCategory;
yourself.
- changes add: change
+ model changes addChange: change
"Created: / 08-11-2014 / 13:40:51 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
- "Modified: / 08-11-2014 / 16:14:53 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 16-11-2014 / 17:35:52 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
!
executeReplace: searchPattern with: rewritePattern inCodeSelection: aCodeSelection
@@ -241,11 +218,11 @@
change package: aCodeSelection selectedMethod package.
- changes add: change
+ model changes addChange: change
].
"Created: / 24-08-2014 / 10:24:52 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
- "Modified: / 05-11-2014 / 23:08:31 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 16-11-2014 / 17:36:07 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
!
executeReplace: searchPattern with: rewritePattern inMethod: aMethod
@@ -263,10 +240,10 @@
in: aMethod modelClass
classified: aMethod category.
- changes add: change
+ model changes addChange: change
"Created: / 17-08-2014 / 18:45:20 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
- "Modified: / 31-08-2014 / 17:41:35 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 16-11-2014 / 17:37:22 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
"Modified: / 14-11-2014 / 19:55:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
--- a/CustomRefactoryBuilderTests.st Sat Nov 15 00:04:26 2014 +0000
+++ b/CustomRefactoryBuilderTests.st Tue Nov 18 09:33:03 2014 +0000
@@ -110,7 +110,6 @@
expectedCategory := 'Category02'.
- model execute.
refactoryBuilder changeCategoryOf: class to: 'Category02'; execute.
actualCategory := (Smalltalk at: #DummyClassForTestCase01) category.
@@ -118,6 +117,7 @@
self assert: expectedCategory = actualCategory
"Created: / 08-11-2014 / 14:10:29 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 16-11-2014 / 17:43:24 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
!
test_change_category_of_to_real_class
@@ -158,12 +158,14 @@
with: '(resources string: `@code)'
inCodeSelection: codeSelection.
- actualSource := refactoryBuilder changes last source.
+ refactoryBuilder model changes do: [ :change |
+ actualSource := change source
+ ].
self assertSource: expectedSource sameAs: actualSource.
"Created: / 25-08-2014 / 21:53:39 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
- "Modified: / 26-08-2014 / 22:35:26 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified (format): / 16-11-2014 / 17:52:26 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
!
test_execute_replace_with_in_code_selection_02
@@ -188,11 +190,14 @@
with: '(resources string: `@code)'
inCodeSelection: codeSelection.
- actualSource := refactoryBuilder changes last source.
+ refactoryBuilder model changes do: [ :change |
+ actualSource := change source
+ ].
self assertSource: expectedSource sameAs: actualSource.
"Created: / 26-08-2014 / 22:37:59 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 16-11-2014 / 17:52:41 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
!
test_execute_replace_with_in_code_selection_03
@@ -217,11 +222,14 @@
with: '(resources string: `@code)'
inCodeSelection: codeSelection.
- actualSource := refactoryBuilder changes last source.
+ refactoryBuilder model changes do: [ :change |
+ actualSource := change source
+ ].
self assertSource: expectedSource sameAs: actualSource.
"Created: / 26-08-2014 / 22:41:35 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 16-11-2014 / 17:52:53 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
!
test_execute_replace_with_in_code_selection_04
@@ -253,11 +261,14 @@
with: '(resources string: `@code)'
inCodeSelection: codeSelection.
- actualSource := refactoryBuilder changes last source.
+ refactoryBuilder model changes do: [ :change |
+ actualSource := change source
+ ].
self assertSource: expectedSource sameAs: actualSource.
"Created: / 26-08-2014 / 22:52:47 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 16-11-2014 / 17:53:11 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
!
test_initialize_change_for_add_class
--- a/CustomTestCaseCodeGenerator.st Sat Nov 15 00:04:26 2014 +0000
+++ b/CustomTestCaseCodeGenerator.st Tue Nov 18 09:33:03 2014 +0000
@@ -2,7 +2,7 @@
CustomCodeGenerator subclass:#CustomTestCaseCodeGenerator
instanceVariableNames:'testClassName testSuperName testClassCategory generateSetUp
- generateTearDown'
+ generateTearDown samePackageAsTestedClass'
classVariableNames:''
poolDictionaries:''
category:'Interface-Refactoring-Custom-Generators'
@@ -72,6 +72,23 @@
generateTearDown := aBoolean.
!
+samePackageAsTestedClass
+ "Returns true when we should assign TestCase class
+ to the same package as tested class."
+
+ ^ samePackageAsTestedClass
+
+ "Created: / 15-11-2014 / 11:54:37 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+samePackageAsTestedClass: aBoolean
+ "see samePackageAsTestedClass"
+
+ samePackageAsTestedClass := aBoolean
+
+ "Created: / 15-11-2014 / 11:56:36 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
testClassCategory
^ testClassCategory
!
@@ -114,6 +131,14 @@
"Created: / 16-09-2014 / 10:27:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
+defaultSamePackageAsTestedClass
+ "default value for samePackageAsTestedClass"
+
+ ^ true
+
+ "Created: / 15-11-2014 / 12:21:40 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
defaultSetUpCodeGeneratorClass
^ CustomTestCaseSetUpCodeGenerator
!
@@ -165,6 +190,7 @@
].
generateSetUp := self defaultGenerateSetUp.
generateTearDown := self defaultGenerateTearDown.
+ samePackageAsTestedClass := self defaultSamePackageAsTestedClass.
"/ Now open the dialog...
@@ -193,12 +219,15 @@
dialog
addCheckBoxOn:((AspectAdaptor forAspect:#generateTearDown) subject:self)
labeled:'Generate #tearDown'.
+ dialog
+ addCheckBoxOn:((AspectAdaptor forAspect:#samePackageAsTestedClass) subject:self)
+ labeled:'Same package as tested class'.
dialog addButtons.
dialog open.
"Created: / 16-09-2014 / 09:39:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 16-09-2014 / 11:27:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 16-10-2014 / 22:36:29 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 15-11-2014 / 12:26:44 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
!
generateTestCaseCodeFor:testCase forClassUnderTest:anObject
@@ -215,13 +244,18 @@
(testCase := model createClass)
superclassName:testSuperName;
name:testClassName asSymbol;
- category:testClassCategory;
- compile.
+ category:testClassCategory.
+
+ self samePackageAsTestedClass ifTrue: [
+ testCase package: classUnderTest package
+ ].
+
+ testCase compile.
self generateTestCaseCodeFor:testCase forClassUnderTest:classUnderTest
"Created: / 16-09-2014 / 10:28:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 10-10-2014 / 23:52:52 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 15-11-2014 / 15:32:01 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
!
generateTestCaseSetUpCodeFor:testCase
--- a/CustomTestCaseCodeGeneratorTests.st Sat Nov 15 00:04:26 2014 +0000
+++ b/CustomTestCaseCodeGeneratorTests.st Tue Nov 18 09:33:03 2014 +0000
@@ -34,6 +34,57 @@
"Created: / 14-10-2014 / 10:42:20 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
"Modified: / 05-11-2014 / 22:37:00 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+test_test_class_generated_with_package
+ | class testClass |
+
+ class := self classWithInstanceVariable
+ category: 'Some-Category';
+ package: #some_package_01;
+ yourself.
+
+ self assertClassNotExists: class name.
+
+ context selectedClasses: (Array with: class theMetaclass ).
+
+ generatorOrRefactoring
+ configureInContext: context;
+ executeInContext: context.
+
+ self assert: generatorOrRefactoring samePackageAsTestedClass.
+
+ testClass := Smalltalk at: generatorOrRefactoring testClassName asSymbol.
+
+ self assertClassExists: class name.
+ self assert: (testClass package) = #some_package_01.
+
+ "Created: / 15-11-2014 / 15:21:39 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+test_test_class_generated_without_package
+ | class testClass |
+
+ class := self classWithInstanceVariable
+ category: 'Some-Category';
+ package: #some_package_01;
+ yourself.
+
+ self assertClassNotExists: class name.
+
+ context selectedClasses: (Array with: class theMetaclass ).
+
+ generatorOrRefactoring
+ configureInContext: context;
+ samePackageAsTestedClass: false;
+ executeInContext: context.
+
+ testClass := Smalltalk at: generatorOrRefactoring testClassName asSymbol.
+
+ self assertClassExists: class name.
+ self deny: (testClass package) = #some_package_01.
+
+ "Created: / 15-11-2014 / 15:37:59 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
! !
!CustomTestCaseCodeGeneratorTests class methodsFor:'documentation'!
--- a/Make.proto Sat Nov 15 00:04:26 2014 +0000
+++ b/Make.proto Tue Nov 18 09:33:03 2014 +0000
@@ -34,7 +34,7 @@
# add the path(es) here:,
# ********** OPTIONAL: MODIFY the next lines ***
# LOCALINCLUDES=-Ifoo -Ibar
-LOCALINCLUDES= -I$(INCLUDE_TOP)/jn/refactoring_custom/patches -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/changes -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/helpers -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/refactoring -I$(INCLUDE_TOP)/stx/goodies/sunit -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libbasic3 -I$(INCLUDE_TOP)/stx/libcomp -I$(INCLUDE_TOP)/stx/libtool -I$(INCLUDE_TOP)/stx/libview -I$(INCLUDE_TOP)/stx/libview2 -I$(INCLUDE_TOP)/stx/libwidg -I$(INCLUDE_TOP)/stx/libwidg2
+LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/changes -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/helpers -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/refactoring -I$(INCLUDE_TOP)/stx/goodies/sunit -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libbasic3 -I$(INCLUDE_TOP)/stx/libcomp -I$(INCLUDE_TOP)/stx/libjava -I$(INCLUDE_TOP)/stx/libjava/tools -I$(INCLUDE_TOP)/stx/libjavascript -I$(INCLUDE_TOP)/stx/libtool -I$(INCLUDE_TOP)/stx/libview -I$(INCLUDE_TOP)/stx/libview2 -I$(INCLUDE_TOP)/stx/libwidg -I$(INCLUDE_TOP)/stx/libwidg2
# if you need any additional defines for embedded C code,
@@ -165,7 +165,7 @@
$(OUTDIR)CustomSubContext.$(O) CustomSubContext.$(H): CustomSubContext.st $(INCLUDE_TOP)/jn/refactoring_custom/CustomContext.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(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) $(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) $(STCHDR)
+$(OUTDIR)CustomCodeSelectionRefactoring.$(O) CustomCodeSelectionRefactoring.$(H): CustomCodeSelectionRefactoring.st $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomRefactoring.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(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) $(STCHDR)
$(OUTDIR)CustomNewClassGenerator.$(O) CustomNewClassGenerator.$(H): CustomNewClassGenerator.st $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGenerator.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(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) $(STCHDR)
@@ -180,10 +180,12 @@
$(OUTDIR)CustomChangeNotificationSetterMethodsCodeGenerator.$(O) CustomChangeNotificationSetterMethodsCodeGenerator.$(H): CustomChangeNotificationSetterMethodsCodeGenerator.st $(INCLUDE_TOP)/jn/refactoring_custom/CustomAccessMethodsCodeGenerator.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGenerator.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(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)/jn/refactoring_custom/CustomNewClassGenerator.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)CustomCodeGeneratorOrRefactoringTestCaseCodeGenerator.$(O) CustomCodeGeneratorOrRefactoringTestCaseCodeGenerator.$(H): CustomCodeGeneratorOrRefactoringTestCaseCodeGenerator.st $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGenerator.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomTestCaseCodeGenerator.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)CustomCodeSelectionToResourceTranslation.$(O) CustomCodeSelectionToResourceTranslation.$(H): CustomCodeSelectionToResourceTranslation.st $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeSelectionRefactoring.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomRefactoring.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)CustomDefaultGetterMethodsCodeGenerator.$(O) CustomDefaultGetterMethodsCodeGenerator.$(H): CustomDefaultGetterMethodsCodeGenerator.st $(INCLUDE_TOP)/jn/refactoring_custom/CustomAccessMethodsCodeGenerator.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGenerator.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)CustomLazyInitializationAccessMethodsCodeGenerator.$(O) CustomLazyInitializationAccessMethodsCodeGenerator.$(H): CustomLazyInitializationAccessMethodsCodeGenerator.st $(INCLUDE_TOP)/jn/refactoring_custom/CustomAccessMethodsCodeGenerator.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGenerator.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)CustomLazyInitializationGetterMethodsCodeGenerator.$(O) CustomLazyInitializationGetterMethodsCodeGenerator.$(H): CustomLazyInitializationGetterMethodsCodeGenerator.st $(INCLUDE_TOP)/jn/refactoring_custom/CustomAccessMethodsCodeGenerator.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGenerator.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)CustomMultiSetterMethodsCodeGenerator.$(O) CustomMultiSetterMethodsCodeGenerator.$(H): CustomMultiSetterMethodsCodeGenerator.st $(INCLUDE_TOP)/jn/refactoring_custom/CustomAccessMethodsCodeGenerator.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGenerator.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)CustomPrintCodeSelectionRefactoring.$(O) CustomPrintCodeSelectionRefactoring.$(H): CustomPrintCodeSelectionRefactoring.st $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeSelectionRefactoring.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomRefactoring.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)CustomRefactoringClassGenerator.$(O) CustomRefactoringClassGenerator.$(H): CustomRefactoringClassGenerator.st $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGenerator.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomNewClassGenerator.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)CustomSimpleAccessMethodsCodeGenerator.$(O) CustomSimpleAccessMethodsCodeGenerator.$(H): CustomSimpleAccessMethodsCodeGenerator.st $(INCLUDE_TOP)/jn/refactoring_custom/CustomAccessMethodsCodeGenerator.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGenerator.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)CustomSimpleGetterMethodsCodeGenerator.$(O) CustomSimpleGetterMethodsCodeGenerator.$(H): CustomSimpleGetterMethodsCodeGenerator.st $(INCLUDE_TOP)/jn/refactoring_custom/CustomAccessMethodsCodeGenerator.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGenerator.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
--- a/Make.spec Sat Nov 15 00:04:26 2014 +0000
+++ b/Make.spec Tue Nov 18 09:33:03 2014 +0000
@@ -80,7 +80,7 @@
CustomSubContext \
CustomUserDialog \
CustomAccessMethodsCodeGenerator \
- CustomCodeSelectionToResourceTranslation \
+ CustomCodeSelectionRefactoring \
CustomIsAbstractCodeGenerator \
CustomNewClassGenerator \
CustomReplaceIfNilWithIfTrueRefactoring \
@@ -95,10 +95,12 @@
CustomChangeNotificationSetterMethodsCodeGenerator \
CustomCodeGeneratorClassGenerator \
CustomCodeGeneratorOrRefactoringTestCaseCodeGenerator \
+ CustomCodeSelectionToResourceTranslation \
CustomDefaultGetterMethodsCodeGenerator \
CustomLazyInitializationAccessMethodsCodeGenerator \
CustomLazyInitializationGetterMethodsCodeGenerator \
CustomMultiSetterMethodsCodeGenerator \
+ CustomPrintCodeSelectionRefactoring \
CustomRefactoringClassGenerator \
CustomSimpleAccessMethodsCodeGenerator \
CustomSimpleGetterMethodsCodeGenerator \
@@ -146,7 +148,7 @@
$(OUTDIR_SLASH)CustomSubContext.$(O) \
$(OUTDIR_SLASH)CustomUserDialog.$(O) \
$(OUTDIR_SLASH)CustomAccessMethodsCodeGenerator.$(O) \
- $(OUTDIR_SLASH)CustomCodeSelectionToResourceTranslation.$(O) \
+ $(OUTDIR_SLASH)CustomCodeSelectionRefactoring.$(O) \
$(OUTDIR_SLASH)CustomIsAbstractCodeGenerator.$(O) \
$(OUTDIR_SLASH)CustomNewClassGenerator.$(O) \
$(OUTDIR_SLASH)CustomReplaceIfNilWithIfTrueRefactoring.$(O) \
@@ -161,10 +163,12 @@
$(OUTDIR_SLASH)CustomChangeNotificationSetterMethodsCodeGenerator.$(O) \
$(OUTDIR_SLASH)CustomCodeGeneratorClassGenerator.$(O) \
$(OUTDIR_SLASH)CustomCodeGeneratorOrRefactoringTestCaseCodeGenerator.$(O) \
+ $(OUTDIR_SLASH)CustomCodeSelectionToResourceTranslation.$(O) \
$(OUTDIR_SLASH)CustomDefaultGetterMethodsCodeGenerator.$(O) \
$(OUTDIR_SLASH)CustomLazyInitializationAccessMethodsCodeGenerator.$(O) \
$(OUTDIR_SLASH)CustomLazyInitializationGetterMethodsCodeGenerator.$(O) \
$(OUTDIR_SLASH)CustomMultiSetterMethodsCodeGenerator.$(O) \
+ $(OUTDIR_SLASH)CustomPrintCodeSelectionRefactoring.$(O) \
$(OUTDIR_SLASH)CustomRefactoringClassGenerator.$(O) \
$(OUTDIR_SLASH)CustomSimpleAccessMethodsCodeGenerator.$(O) \
$(OUTDIR_SLASH)CustomSimpleGetterMethodsCodeGenerator.$(O) \
--- a/abbrev.stc Sat Nov 15 00:04:26 2014 +0000
+++ b/abbrev.stc Tue Nov 18 09:33:03 2014 +0000
@@ -50,6 +50,7 @@
CustomCodeGeneratorUserPreferencesTests CustomCodeGeneratorUserPreferencesTests jn:refactoring_custom 'Interface-Refactoring-Custom-Tests' 1
CustomCodeSelectionToResourceTranslationTests CustomCodeSelectionToResourceTranslationTests jn:refactoring_custom 'Interface-Refactoring-Custom-Refactorings-Tests' 1
CustomDefaultGetterMethodsCodeGeneratorTests CustomDefaultGetterMethodsCodeGeneratorTests jn:refactoring_custom 'Interface-Refactoring-Custom-Generators-Tests' 1
+CustomIsAbstractCodeGeneratorTests CustomIsAbstractCodeGeneratorTests jn:refactoring_custom 'Interface-Refactoring-Custom-Generators-Tests' 1
CustomLazyInitializationAccessMethodsCodeGeneratorTests CustomLazyInitializationAccessMethodsCodeGeneratorTests jn:refactoring_custom 'Interface-Refactoring-Custom-Generators-Tests' 1
CustomLazyInitializationGetterMethodsCodeGeneratorTests CustomLazyInitializationGetterMethodsCodeGeneratorTests jn:refactoring_custom 'Interface-Refactoring-Custom-Generators-Tests' 1
CustomLocalChangeManager CustomLocalChangeManager jn:refactoring_custom 'Interface-Refactoring-Custom' 0
@@ -80,7 +81,7 @@
CustomVisitorCodeGeneratorAcceptVisitorTests CustomVisitorCodeGeneratorAcceptVisitorTests jn:refactoring_custom 'Interface-Refactoring-Custom-Generators-Tests' 1
CustomVisitorCodeGeneratorTests CustomVisitorCodeGeneratorTests jn:refactoring_custom 'Interface-Refactoring-Custom-Generators-Tests' 1
CustomAccessMethodsCodeGenerator CustomAccessMethodsCodeGenerator jn:refactoring_custom 'Interface-Refactoring-Custom-Generators' 0
-CustomCodeSelectionToResourceTranslation CustomCodeSelectionToResourceTranslation jn:refactoring_custom 'Interface-Refactoring-Custom-Refactorings' 0
+CustomCodeSelectionRefactoring CustomCodeSelectionRefactoring jn:refactoring_custom 'Interface-Refactoring-Custom-Refactorings' 0
CustomIsAbstractCodeGenerator CustomIsAbstractCodeGenerator jn:refactoring_custom 'Interface-Refactoring-Custom-Generators' 0
CustomNewClassGenerator CustomNewClassGenerator jn:refactoring_custom 'Interface-Refactoring-Custom-Generators' 0
CustomReplaceIfNilWithIfTrueRefactoring CustomReplaceIfNilWithIfTrueRefactoring jn:refactoring_custom 'Interface-Refactoring-Custom-Refactorings' 0
@@ -95,10 +96,12 @@
CustomChangeNotificationSetterMethodsCodeGenerator CustomChangeNotificationSetterMethodsCodeGenerator jn:refactoring_custom 'Interface-Refactoring-Custom-Generators' 0
CustomCodeGeneratorClassGenerator CustomCodeGeneratorClassGenerator jn:refactoring_custom 'Interface-Refactoring-Custom-Generators' 0
CustomCodeGeneratorOrRefactoringTestCaseCodeGenerator CustomCodeGeneratorOrRefactoringTestCaseCodeGenerator jn:refactoring_custom 'Interface-Refactoring-Custom-Generators' 0
+CustomCodeSelectionToResourceTranslation CustomCodeSelectionToResourceTranslation jn:refactoring_custom 'Interface-Refactoring-Custom-Refactorings' 0
CustomDefaultGetterMethodsCodeGenerator CustomDefaultGetterMethodsCodeGenerator jn:refactoring_custom 'Interface-Refactoring-Custom-Generators' 0
CustomLazyInitializationAccessMethodsCodeGenerator CustomLazyInitializationAccessMethodsCodeGenerator jn:refactoring_custom 'Interface-Refactoring-Custom-Generators' 0
CustomLazyInitializationGetterMethodsCodeGenerator CustomLazyInitializationGetterMethodsCodeGenerator jn:refactoring_custom 'Interface-Refactoring-Custom-Generators' 0
CustomMultiSetterMethodsCodeGenerator CustomMultiSetterMethodsCodeGenerator jn:refactoring_custom 'Interface-Refactoring-Custom-Generators' 0
+CustomPrintCodeSelectionRefactoring CustomPrintCodeSelectionRefactoring jn:refactoring_custom 'Interface-Refactoring-Custom-Refactorings' 0
CustomRefactoringClassGenerator CustomRefactoringClassGenerator jn:refactoring_custom 'Interface-Refactoring-Custom-Generators' 0
CustomSimpleAccessMethodsCodeGenerator CustomSimpleAccessMethodsCodeGenerator jn:refactoring_custom 'Interface-Refactoring-Custom-Generators' 0
CustomSimpleGetterMethodsCodeGenerator CustomSimpleGetterMethodsCodeGenerator jn:refactoring_custom 'Interface-Refactoring-Custom-Generators' 0
--- a/bc.mak Sat Nov 15 00:04:26 2014 +0000
+++ b/bc.mak Tue Nov 18 09:33:03 2014 +0000
@@ -35,7 +35,7 @@
-LOCALINCLUDES= -I$(INCLUDE_TOP)\jn\refactoring_custom\patches -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\changes -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\helpers -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\refactoring -I$(INCLUDE_TOP)\stx\goodies\sunit -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\libbasic3 -I$(INCLUDE_TOP)\stx\libcomp -I$(INCLUDE_TOP)\stx\libtool -I$(INCLUDE_TOP)\stx\libview -I$(INCLUDE_TOP)\stx\libview2 -I$(INCLUDE_TOP)\stx\libwidg -I$(INCLUDE_TOP)\stx\libwidg2
+LOCALINCLUDES= -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\changes -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\helpers -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\refactoring -I$(INCLUDE_TOP)\stx\goodies\sunit -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\libbasic3 -I$(INCLUDE_TOP)\stx\libcomp -I$(INCLUDE_TOP)\stx\libjava -I$(INCLUDE_TOP)\stx\libjava\tools -I$(INCLUDE_TOP)\stx\libjavascript -I$(INCLUDE_TOP)\stx\libtool -I$(INCLUDE_TOP)\stx\libview -I$(INCLUDE_TOP)\stx\libview2 -I$(INCLUDE_TOP)\stx\libwidg -I$(INCLUDE_TOP)\stx\libwidg2
LOCALDEFINES=
STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) -headerDir=. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -varPrefix=$(LIBNAME)
@@ -112,7 +112,7 @@
$(OUTDIR)CustomSubContext.$(O) CustomSubContext.$(H): CustomSubContext.st $(INCLUDE_TOP)\jn\refactoring_custom\CustomContext.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(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) $(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) $(STCHDR)
+$(OUTDIR)CustomCodeSelectionRefactoring.$(O) CustomCodeSelectionRefactoring.$(H): CustomCodeSelectionRefactoring.st $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomRefactoring.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(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) $(STCHDR)
$(OUTDIR)CustomNewClassGenerator.$(O) CustomNewClassGenerator.$(H): CustomNewClassGenerator.st $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGenerator.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(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) $(STCHDR)
@@ -127,10 +127,12 @@
$(OUTDIR)CustomChangeNotificationSetterMethodsCodeGenerator.$(O) CustomChangeNotificationSetterMethodsCodeGenerator.$(H): CustomChangeNotificationSetterMethodsCodeGenerator.st $(INCLUDE_TOP)\jn\refactoring_custom\CustomAccessMethodsCodeGenerator.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGenerator.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(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)\jn\refactoring_custom\CustomNewClassGenerator.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)CustomCodeGeneratorOrRefactoringTestCaseCodeGenerator.$(O) CustomCodeGeneratorOrRefactoringTestCaseCodeGenerator.$(H): CustomCodeGeneratorOrRefactoringTestCaseCodeGenerator.st $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGenerator.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomTestCaseCodeGenerator.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)CustomCodeSelectionToResourceTranslation.$(O) CustomCodeSelectionToResourceTranslation.$(H): CustomCodeSelectionToResourceTranslation.st $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeSelectionRefactoring.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomRefactoring.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)CustomDefaultGetterMethodsCodeGenerator.$(O) CustomDefaultGetterMethodsCodeGenerator.$(H): CustomDefaultGetterMethodsCodeGenerator.st $(INCLUDE_TOP)\jn\refactoring_custom\CustomAccessMethodsCodeGenerator.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGenerator.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)CustomLazyInitializationAccessMethodsCodeGenerator.$(O) CustomLazyInitializationAccessMethodsCodeGenerator.$(H): CustomLazyInitializationAccessMethodsCodeGenerator.st $(INCLUDE_TOP)\jn\refactoring_custom\CustomAccessMethodsCodeGenerator.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGenerator.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)CustomLazyInitializationGetterMethodsCodeGenerator.$(O) CustomLazyInitializationGetterMethodsCodeGenerator.$(H): CustomLazyInitializationGetterMethodsCodeGenerator.st $(INCLUDE_TOP)\jn\refactoring_custom\CustomAccessMethodsCodeGenerator.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGenerator.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)CustomMultiSetterMethodsCodeGenerator.$(O) CustomMultiSetterMethodsCodeGenerator.$(H): CustomMultiSetterMethodsCodeGenerator.st $(INCLUDE_TOP)\jn\refactoring_custom\CustomAccessMethodsCodeGenerator.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGenerator.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)CustomPrintCodeSelectionRefactoring.$(O) CustomPrintCodeSelectionRefactoring.$(H): CustomPrintCodeSelectionRefactoring.st $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeSelectionRefactoring.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomRefactoring.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)CustomRefactoringClassGenerator.$(O) CustomRefactoringClassGenerator.$(H): CustomRefactoringClassGenerator.st $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGenerator.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomNewClassGenerator.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)CustomSimpleAccessMethodsCodeGenerator.$(O) CustomSimpleAccessMethodsCodeGenerator.$(H): CustomSimpleAccessMethodsCodeGenerator.st $(INCLUDE_TOP)\jn\refactoring_custom\CustomAccessMethodsCodeGenerator.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGenerator.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)CustomSimpleGetterMethodsCodeGenerator.$(O) CustomSimpleGetterMethodsCodeGenerator.$(H): CustomSimpleGetterMethodsCodeGenerator.st $(INCLUDE_TOP)\jn\refactoring_custom\CustomAccessMethodsCodeGenerator.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGenerator.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
--- a/extensions.st Sat Nov 15 00:04:26 2014 +0000
+++ b/extensions.st Tue Nov 18 09:33:03 2014 +0000
@@ -1,5 +1,32 @@
"{ Package: 'jn:refactoring_custom' }"!
+!AddClassChange methodsFor:'private'!
+
+argumensBySelectorPartsFromMessage: aMessageNode
+ "Returns message arguments as dictionary indexed by selector part name.
+ For example: sel01:arg01 sel02:arg02 should be indexed
+ 'sel01:' -> 'arg01',
+ 'sel02:' -> 'arg02' "
+ | argumensBySelectorParts selectorParts |
+
+ argumensBySelectorParts := Dictionary new.
+ selectorParts := aMessageNode selectorParts ? #().
+ aMessageNode arguments ? #() keysAndValuesDo: [ :key :argument |
+ | part |
+
+ part := selectorParts at: key ifAbsent: key.
+ part == key ifFalse: [
+ "We found appropriate selector part"
+ part := part value asSymbol
+ ].
+ argumensBySelectorParts at: part put: argument.
+ ].
+
+ ^ argumensBySelectorParts
+
+ "Created: / 16-11-2014 / 14:47:55 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
!AddClassChange methodsFor:'accessing'!
package
@@ -18,6 +45,26 @@
"Created: / 08-10-2014 / 20:07:05 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
! !
+!AddClassChange methodsFor:'accessing'!
+
+privateInClassName
+ "Returns privateIn class name (when this class is a private class of another class)"
+
+ ^ self objectAttributeAt: #privateInClassName
+
+ "Created: / 16-11-2014 / 14:18:53 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
+!AddClassChange methodsFor:'accessing'!
+
+privateInClassName:aClassName
+ "see privateInClassName"
+
+ self objectAttributeAt: #privateInClassName put: aClassName
+
+ "Created: / 16-11-2014 / 14:18:34 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
!AddMethodChange methodsFor:'accessing'!
package: aPackageName
@@ -90,6 +137,22 @@
"Modified: / 10-10-2014 / 13:08:59 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
! !
+!RBAbstractClass methodsFor:'accessing - classes'!
+
+compilerClass
+ "Answer a class suitable for compiling a source code in 'my' language"
+
+ ^ self realClass isNil ifTrue: [
+ "Return Smalltalk compiler, because we do not have multiple programming
+ support in this class (yet)"
+ self class compilerClass
+ ] ifFalse: [
+ self realClass compilerClass
+ ]
+
+ "Created: / 15-11-2014 / 16:58:35 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
!RBAbstractClass methodsFor:'queries'!
inheritsFrom: aClass
@@ -132,6 +195,17 @@
"Created: / 30-09-2014 / 19:30:58 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
! !
+!RBAbstractClass methodsFor:'autoload check'!
+
+isLoaded
+ "Returns true when the class is auto-loaded.
+ see Metaclass >> isLoaded"
+
+ ^ self class isLoaded
+
+ "Created: / 15-11-2014 / 17:11:11 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
!RBAbstractClass methodsFor:'accessing'!
isModelClass
@@ -253,6 +327,38 @@
!RBAbstractClass methodsFor:'accessing'!
+privateClassesAt:aClassNameStringOrSymbol
+ "see Class >> privateClassesAt:"
+
+ | myName privateClassName |
+
+ myName := self name.
+ myName isNil ifTrue:[
+ "/ no name - there cannot be a corresponding private class
+ ^ nil
+ ].
+
+ privateClassName := (myName, '::' ,aClassNameStringOrSymbol) asSymbol.
+
+ ^ model classNamed: privateClassName.
+
+ "Created: / 15-11-2014 / 17:15:19 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 16-11-2014 / 11:49:08 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
+!RBAbstractClass methodsFor:'accessing'!
+
+realSharedPoolNames
+ "see Behavior >> realSharedPoolNames"
+
+ ^ #()
+
+ "Created: / 15-11-2014 / 17:19:50 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 16-11-2014 / 16:37:08 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
+!RBAbstractClass methodsFor:'accessing'!
+
superclassName: aName
"Assign superclass by its name"
@@ -281,6 +387,17 @@
"Created: / 26-09-2014 / 16:36:22 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
! !
+!RBAbstractClass methodsFor:'queries'!
+
+topNameSpace
+ "see ClassDescription >> topNameSpace"
+
+ ^ self model
+
+ "Created: / 15-11-2014 / 17:26:50 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified (comment): / 16-11-2014 / 16:58:00 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
!RBAbstractClass methodsFor:'enumerating'!
withAllSuperclassesDo:aBlock
--- a/jn_refactoring_custom.st Sat Nov 15 00:04:26 2014 +0000
+++ b/jn_refactoring_custom.st Tue Nov 18 09:33:03 2014 +0000
@@ -66,6 +66,9 @@
#'jn:refactoring_custom/patches' "CustomDummyClassPatches - referenced by CustomDummyTests>>test_dummy"
#'stx:libbasic3' "Change - referenced by CustomCodeGeneratorOrRefactoringTestCase>>assertSource:sameAs:"
#'stx:libcomp' "Parser - referenced by CustomNamespace>>createMethodImmediate:protocol:source:package:"
+ #'stx:libjava' "JavaClass - referenced by CustomRBAbstractClassTests>>test_compiler_class_with_filled_real_class"
+ #'stx:libjava/tools' "JavaCompiler - referenced by CustomRBAbstractClassTests>>test_compiler_class_java"
+ #'stx:libjavascript' "JavaScriptCompiler - referenced by CustomRBAbstractClassTests>>test_compiler_class_javascript"
#'stx:libview' "WindowGroup - referenced by CustomCodeGeneratorOrRefactoring>>executeInContextWithWaitCursor:"
#'stx:libwidg' "DialogBox - referenced by CustomUserDialog>>initialize"
#'stx:libwidg2' "CheckBox - referenced by CustomDialog>>addCheckBoxOn:labeled:"
@@ -144,6 +147,7 @@
(CustomCodeGeneratorUserPreferencesTests autoload)
(CustomCodeSelectionToResourceTranslationTests autoload)
(CustomDefaultGetterMethodsCodeGeneratorTests autoload)
+ (CustomIsAbstractCodeGeneratorTests autoload)
(CustomLazyInitializationAccessMethodsCodeGeneratorTests autoload)
(CustomLazyInitializationGetterMethodsCodeGeneratorTests autoload)
CustomLocalChangeManager
@@ -174,7 +178,7 @@
(CustomVisitorCodeGeneratorAcceptVisitorTests autoload)
(CustomVisitorCodeGeneratorTests autoload)
CustomAccessMethodsCodeGenerator
- CustomCodeSelectionToResourceTranslation
+ CustomCodeSelectionRefactoring
CustomIsAbstractCodeGenerator
CustomNewClassGenerator
CustomReplaceIfNilWithIfTrueRefactoring
@@ -189,10 +193,12 @@
CustomChangeNotificationSetterMethodsCodeGenerator
CustomCodeGeneratorClassGenerator
CustomCodeGeneratorOrRefactoringTestCaseCodeGenerator
+ CustomCodeSelectionToResourceTranslation
CustomDefaultGetterMethodsCodeGenerator
CustomLazyInitializationAccessMethodsCodeGenerator
CustomLazyInitializationGetterMethodsCodeGenerator
CustomMultiSetterMethodsCodeGenerator
+ CustomPrintCodeSelectionRefactoring
CustomRefactoringClassGenerator
CustomSimpleAccessMethodsCodeGenerator
CustomSimpleGetterMethodsCodeGenerator
@@ -261,6 +267,14 @@
RefactoryChange model
RefactoryChange model:
#'Tools::NewSystemBrowser' classMenuExtensionCustomRefactorings:
+ AddClassChange argumensBySelectorPartsFromMessage:
+ AddClassChange privateInClassName
+ AddClassChange privateInClassName:
+ RBAbstractClass compilerClass
+ RBAbstractClass isLoaded
+ RBAbstractClass privateClassesAt:
+ RBAbstractClass realSharedPoolNames
+ RBAbstractClass topNameSpace
)
! !
--- a/libInit.cc Sat Nov 15 00:04:26 2014 +0000
+++ b/libInit.cc Tue Nov 18 09:33:03 2014 +0000
@@ -57,7 +57,7 @@
_CustomSubContext_Init(pass,__pRT__,snd);
_CustomUserDialog_Init(pass,__pRT__,snd);
_CustomAccessMethodsCodeGenerator_Init(pass,__pRT__,snd);
-_CustomCodeSelectionToResourceTranslation_Init(pass,__pRT__,snd);
+_CustomCodeSelectionRefactoring_Init(pass,__pRT__,snd);
_CustomIsAbstractCodeGenerator_Init(pass,__pRT__,snd);
_CustomNewClassGenerator_Init(pass,__pRT__,snd);
_CustomReplaceIfNilWithIfTrueRefactoring_Init(pass,__pRT__,snd);
@@ -72,10 +72,12 @@
_CustomChangeNotificationSetterMethodsCodeGenerator_Init(pass,__pRT__,snd);
_CustomCodeGeneratorClassGenerator_Init(pass,__pRT__,snd);
_CustomCodeGeneratorOrRefactoringTestCaseCodeGenerator_Init(pass,__pRT__,snd);
+_CustomCodeSelectionToResourceTranslation_Init(pass,__pRT__,snd);
_CustomDefaultGetterMethodsCodeGenerator_Init(pass,__pRT__,snd);
_CustomLazyInitializationAccessMethodsCodeGenerator_Init(pass,__pRT__,snd);
_CustomLazyInitializationGetterMethodsCodeGenerator_Init(pass,__pRT__,snd);
_CustomMultiSetterMethodsCodeGenerator_Init(pass,__pRT__,snd);
+_CustomPrintCodeSelectionRefactoring_Init(pass,__pRT__,snd);
_CustomRefactoringClassGenerator_Init(pass,__pRT__,snd);
_CustomSimpleAccessMethodsCodeGenerator_Init(pass,__pRT__,snd);
_CustomSimpleGetterMethodsCodeGenerator_Init(pass,__pRT__,snd);
--- a/patches/Make.proto Sat Nov 15 00:04:26 2014 +0000
+++ b/patches/Make.proto Tue Nov 18 09:33:03 2014 +0000
@@ -34,7 +34,7 @@
# add the path(es) here:,
# ********** OPTIONAL: MODIFY the next lines ***
# LOCALINCLUDES=-Ifoo -Ibar
-LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/browser -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/changes -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/helpers -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libcomp
+LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/browser -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/changes -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/helpers -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libcomp
# if you need any additional defines for embedded C code,
--- a/patches/bc.mak Sat Nov 15 00:04:26 2014 +0000
+++ b/patches/bc.mak Tue Nov 18 09:33:03 2014 +0000
@@ -35,7 +35,7 @@
-LOCALINCLUDES= -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\browser -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\changes -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\helpers -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\libcomp
+LOCALINCLUDES= -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\browser -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\changes -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\helpers -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\libcomp
LOCALDEFINES=
STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) -headerDir=. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -varPrefix=$(LIBNAME)
--- a/patches/extensions.st Sat Nov 15 00:04:26 2014 +0000
+++ b/patches/extensions.st Tue Nov 18 09:33:03 2014 +0000
@@ -2,6 +2,89 @@
!AddClassChange methodsFor:'private'!
+fillOutDefinition
+ | parseTree receiver arguments argumensBySelectorParts |
+ parseTree := RBParser parseExpression: definition
+ onError: [:str :pos | ^self parseDefinitionError].
+ parseTree isMessage ifFalse: [^self parseDefinitionError].
+ (self isValidSubclassCreationMessage: parseTree)
+ ifFalse: [^self parseDefinitionError].
+ receiver := parseTree receiver.
+ superclassName := receiver isVariable
+ ifTrue: [receiver name asSymbol]
+ ifFalse: [receiver value].
+ arguments := parseTree arguments.
+ className := arguments first value.
+ instanceVariableNames := self namesIn: (arguments at: 2) value.
+ classVariableNames := self namesIn: (arguments at: 3) value.
+ poolDictionaryNames := self namesIn: (arguments at: 4) value.
+
+ argumensBySelectorParts := self argumensBySelectorPartsFromMessage: parseTree.
+ (argumensBySelectorParts includesKey: #privateIn:) ifTrue: [
+ | argument |
+
+ argument := argumensBySelectorParts at: #privateIn:.
+ argument isVariable ifTrue: [
+ self privateInClassName: argument name asSymbol
+ ] ifFalse: [
+ self privateInClassName: argument value asSymbol
+ ].
+ className := (self privateInClassName, '::', className) asSymbol.
+ category := #''. "Inherited by owner - privateInClassName"
+ ] ifFalse: [
+ category := arguments size < 5
+ ifTrue: [#Unknown]
+ ifFalse: [(arguments at: 5) value asSymbol]
+ ].
+
+ "Modified: / 16-11-2014 / 16:04:15 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
+!AddClassChange methodsFor:'testing'!
+
+isValidMessageName: aMessageNode
+
+ ^ #(
+ #subclass:instanceVariableNames:classVariableNames:poolDictionaries:
+ #subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:
+ #subclass:instanceVariableNames:classVariableNames:poolDictionaries:privateIn:
+ #variableByteSubclass:classVariableNames:poolDictionaries:
+ #variableByteSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category:
+ #variableSubclass:instanceVariableNames:classVariableNames:poolDictionaries:
+ #variableSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category:
+ )
+ includes: aMessageNode selector
+
+ "Modified (format): / 16-11-2014 / 12:35:29 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
+!AddClassChange methodsFor:'testing'!
+
+isValidSubclassCreationMessage: aMessageNode
+ | argumensBySelectorParts |
+
+ (aMessageNode receiver isVariable or: [aMessageNode receiver isLiteral])
+ ifFalse: [^false].
+
+ (self isValidMessageName: aMessageNode) ifFalse: [^false].
+
+ "Each argument should be literal except for privateIn:"
+ argumensBySelectorParts := self argumensBySelectorPartsFromMessage: aMessageNode.
+ argumensBySelectorParts keysAndValuesDo: [ :name :value |
+ value isLiteral ifFalse: [
+ name = #privateIn: ifFalse: [
+ ^ false
+ ]
+ ]
+ ].
+
+ ^ true.
+
+ "Modified: / 16-11-2014 / 15:32:47 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
+!AddClassChange methodsFor:'private'!
+
primitiveExecute
package notNil ifTrue:[
@@ -41,8 +124,7 @@
yourself]
ifFalse: [RemoveMethodChange remove: selector from: self changeClass]
- "Modified: / 17-10-2014 / 10:22:09 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
- "Modified (format): / 17-10-2014 / 22:09:45 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 16-11-2014 / 17:13:09 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
! !
!BrowserEnvironment methodsFor:'accessing'!
--- a/patches/jn_refactoring_custom_patches.st Sat Nov 15 00:04:26 2014 +0000
+++ b/patches/jn_refactoring_custom_patches.st Tue Nov 18 09:33:03 2014 +0000
@@ -52,6 +52,7 @@
^ #(
#'stx:goodies/refactoryBrowser/browser' "RefactoryBrowserPlatformSupport - referenced by BrowserEnvironment>>whichCategoryIncludes:"
+ #'stx:goodies/refactoryBrowser/parser' "RBParser - referenced by AddClassChange>>fillOutDefinition"
#'stx:libcomp' "Parser - referenced by RBMethod>>info"
)
!
@@ -98,6 +99,9 @@
BrowserEnvironment whichCategoryIncludes:
RefactoryClassChange changeClass
RBAbstractClass categories
+ AddClassChange fillOutDefinition
+ AddClassChange isValidMessageName:
+ AddClassChange isValidSubclassCreationMessage:
)
! !
--- a/patches/patches.rc Sat Nov 15 00:04:26 2014 +0000
+++ b/patches/patches.rc Tue Nov 18 09:33:03 2014 +0000
@@ -25,7 +25,7 @@
VALUE "LegalCopyright", "My CopyRight or CopyLeft\0"
VALUE "ProductName", "LibraryName\0"
VALUE "ProductVersion", "6.2.5.0\0"
- VALUE "ProductDate", "Fri, 14 Nov 2014 19:29:21 GMT\0"
+ VALUE "ProductDate", "Sun, 16 Nov 2014 16:58:06 GMT\0"
END
END