--- a/CustomBrowserContext.st Sun Oct 05 13:02:03 2014 +0200
+++ b/CustomBrowserContext.st Sun Oct 05 14:15:21 2014 +0200
@@ -114,13 +114,19 @@
"Created: / 26-01-2014 / 13:39:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
-!CustomBrowserContext methodsFor:'queries'!
+!CustomBrowserContext methodsFor:'testing'!
isInteractiveContext
+ "Return true, if this generator/refactoring context is interactive,
+ i.e., if it may interact with user (like asking for class name or
+ similar) or not.
+ Generally speaking, only top-level context is interactive an only
+ if generator/refactoring was triggerred from menu.
+ "
^ true
- "Created: / 21-09-2014 / 23:10:40 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Created: / 16-09-2014 / 09:23:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!CustomBrowserContext class methodsFor:'documentation'!
--- a/CustomCodeGeneratorOrRefactoring.st Sun Oct 05 13:02:03 2014 +0200
+++ b/CustomCodeGeneratorOrRefactoring.st Sun Oct 05 14:15:21 2014 +0200
@@ -70,7 +70,7 @@
canUseRefactoringSupport
"check if refactory browser stuff is avaliable"
- ^ RefactoryChangeManager notNil
+ ^ RefactoryChangeManager notNil
and:[RefactoryChangeManager isLoaded
and:[UserPreferences current useRefactoringSupport]]
! !
@@ -79,9 +79,9 @@
availableInContext: aCustomContext
"Returns true if the generator/refactoring is available in given
- context, false otherwise.
+ context, false otherwise.
- Called by the UI to figure out what generators / refactorings
+ Called by the UI to figure out what generators / refactorings
are available at given point. See class CustomContext for details."
^ self subclassResponsibility
@@ -89,13 +89,13 @@
"Created: / 01-12-2013 / 00:13:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
-availableInPerspective:aCustomPerspective
+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"
-
+
^ self subclassResponsibility
"Created: / 26-01-2014 / 13:03:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -217,7 +217,7 @@
"Modified (format): / 23-08-2014 / 00:14:33 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
!
-sourceCodeGenerator
+sourceCodeGenerator
"Returns initialized source code generator"
| sourceCodeGenerator |
@@ -291,7 +291,7 @@
addChange: aCodeChange
aCodeChange notNil ifTrue: [
- compositeChangeCollector addChange: aCodeChange
+ compositeChangeCollector addChange: aCodeChange
]
"Created: / 23-08-2014 / 15:40:17 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
@@ -300,16 +300,16 @@
!CustomCodeGeneratorOrRefactoring methodsFor:'compilation'!
-compile:theCode forClass:aClass inCategory:cat
+compile:theCode forClass:aClass inCategory:cat
"install some code for a class.
If refactory browser stuff is avaliable the refactory tools are used to support undo"
self
- compile:theCode forClass:aClass inCategory:cat
+ compile:theCode forClass:aClass inCategory:cat
skipIfSame:true
!
-compile:theCode forClass:aClass inCategory:categoryOrNil skipIfSame:skipIfSame
+compile:theCode forClass:aClass inCategory:categoryOrNil skipIfSame:skipIfSame
"install some code for a class.
If refactory browser stuff is avaliable the refactory tools are used to support undo"
@@ -356,43 +356,22 @@
!CustomCodeGeneratorOrRefactoring methodsFor:'executing'!
-buildInContext: aCustomContext
-
- self subclassResponsibility
-
- "Created: / 18-03-2014 / 22:52:09 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-configureInContext:arg
-
- ^ self
-
- "Created: / 21-09-2014 / 20:42:00 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-executeChangesInContext: aCustomContext changesName: aName
-
- self executeCollectedChangesNamed: aName.
-
- "Created: / 10-04-2014 / 23:26:56 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
executeInContext: aCustomContext
self startCollectChanges.
- aCustomContext isInteractiveContext ifTrue:[
+ aCustomContext isInteractiveContext ifTrue:[
self configureInContext:aCustomContext.
].
self validateInContext: aCustomContext.
self buildInContext: aCustomContext.
self addBuilderChanges.
- self executeChangesInContext: aCustomContext changesName: self class description.
+ self executeCollectedChangesNamed: 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: / 21-09-2014 / 20:42:18 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 16-09-2014 / 11:04:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
executeInContextWithWaitCursor: aCustomContext
@@ -412,13 +391,38 @@
]
"Created: / 07-08-2014 / 23:17:17 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
+!CustomCodeGeneratorOrRefactoring methodsFor:'executing - private'!
+
+buildInContext:aCustomContext
+ "Actually generate code or perform custom refactoring. "
+
+ ^ self subclassResponsibility
+
+ "Created: / 16-09-2014 / 09:14:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
-validateInContext:arg
+configureInContext:aCustomContext
+ "Perform neccessary configuration for given context, such as
+ computing default values for parameters. This may interact with
+ user by means of opening a dialog.
+
+ This method is called only for interactive contexts. When using
+ non interactively, a caller must do the configuration itself by means
+ of accessors."
- ^ self
+ "/ To be overridden by subclasses
+
+ "Created: / 16-09-2014 / 07:24:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (comment): / 16-09-2014 / 11:00:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
- "Created: / 21-09-2014 / 20:42:02 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+validateInContext: aCustomContext
+
+ "/ To be overridden by subclasses
+
+ "Created: / 16-09-2014 / 09:45:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!CustomCodeGeneratorOrRefactoring methodsFor:'initialization'!
--- a/CustomCodeGeneratorOrRefactoringTestCaseCodeGenerator.st Sun Oct 05 13:02:03 2014 +0200
+++ b/CustomCodeGeneratorOrRefactoringTestCaseCodeGenerator.st Sun Oct 05 14:15:21 2014 +0200
@@ -11,9 +11,10 @@
!CustomCodeGeneratorOrRefactoringTestCaseCodeGenerator class methodsFor:'accessing-presentation'!
description
- ^ 'Generate CodeGeneratorOrRefactoringTestCase subclass for selected classes (code generators/refactorings)'
+ ^ 'Creates a new test case for custom code generator/refactoring'
"Modified: / 23-08-2014 / 19:50:52 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 16-09-2014 / 11:33:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
group
@@ -36,12 +37,32 @@
"Modified: / 22-08-2014 / 18:50:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
-!CustomCodeGeneratorOrRefactoringTestCaseCodeGenerator methodsFor:'executing'!
+!CustomCodeGeneratorOrRefactoringTestCaseCodeGenerator class methodsFor:'queries'!
+
+availableInContext:aCustomContext
+ | classes |
+
+ classes := aCustomContext selectedClasses.
+ ^ classes notEmpty
+ and:[ classes allSatisfy: [:e | e inheritsFrom: CustomCodeGeneratorOrRefactoring ] ].
+
+ "Created: / 15-09-2014 / 15:19:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
-buildForClass: aClass testClass: aTestClass
+!CustomCodeGeneratorOrRefactoringTestCaseCodeGenerator methodsFor:'accessing - defaults'!
+
+defaultTestSuperName
+ ^ 'CustomCodeGeneratorOrRefactoringTestCase'
+
+ "Created: / 16-09-2014 / 10:32:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!CustomCodeGeneratorOrRefactoringTestCaseCodeGenerator methodsFor:'executing - private'!
+
+generateTestCaseCodeFor:aTestClass forClassUnderTest:aClass
| source className |
- aTestClass superclassName: 'CustomCodeGeneratorOrRefactoringTestCase'.
+ super generateTestCaseCodeFor:aTestClass forClassUnderTest:aClass.
className := aClass theNonMetaClass name.
source := 'test_code_generated
@@ -66,8 +87,7 @@
replace: '`className' with: className asString;
createMethod
- "Created: / 13-06-2014 / 09:27:15 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
- "Modified: / 23-08-2014 / 19:56:09 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Created: / 16-09-2014 / 10:40:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!CustomCodeGeneratorOrRefactoringTestCaseCodeGenerator class methodsFor:'documentation'!
--- a/CustomContext.st Sun Oct 05 13:02:03 2014 +0200
+++ b/CustomContext.st Sun Oct 05 14:15:21 2014 +0200
@@ -79,13 +79,19 @@
"Created: / 05-05-2014 / 00:14:59 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
! !
-!CustomContext methodsFor:'queries'!
+!CustomContext methodsFor:'testing'!
isInteractiveContext
+ "Return true, if this generator/refactoring context is interactive,
+ i.e., if it may interact with user (like asking for class name or
+ similar) or not.
- self subclassResponsibility
+ Generally speaking, only top-level context is interactive an only
+ if generator/refactoring was triggerred from menu.
+ "
+ ^ false
- "Created: / 21-09-2014 / 23:10:12 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Created: / 16-09-2014 / 09:22:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!CustomContext class methodsFor:'documentation'!
--- a/CustomDialog.st Sun Oct 05 13:02:03 2014 +0200
+++ b/CustomDialog.st Sun Oct 05 14:15:21 2014 +0200
@@ -7,20 +7,145 @@
category:'Interface-Refactoring-Custom'
!
+!CustomDialog class methodsFor:'documentation'!
+
+documentation
+"
+ A simple factory for user dialogs.
+
+ Note: in future, API of this class will be merged into DialogBox and
+ CustomDialog and subclasses will vanish.
+
+ [author:]
+ Jan Vrany <jan.vrany@fit.cvut.cz>
+ Jakub Nesveda <nesvejak@fit.cvut.cz>
+
+ [instance variables:]
+
+ [class variables:]
+
+ [see also:]
+
+"
+! !
+
!CustomDialog class methodsFor:'testing'!
isAbstract
^ self == CustomDialog
! !
-!CustomDialog methodsFor:'dialogs'!
+!CustomDialog methodsFor:'common dialogs'!
+
+requestClassName: label initialAnswer:initial
+
+ | holder |
+
+ holder := ValueHolder with: initial.
+ self addClassNameEntryOn: holder labeled: 'Class' validateBy: nil.
+ self addAbortAndOkButtons.
+ self open ifTrue:[
+ ^ holder value
+ ] ifFalse:[
+ AbortOperationRequest raiseRequest.
+ ].
+
+ "
+ CustomUserDialog new requestClassName: 'Select class' initialAnswer: 'Array'.
+ "
+
+ "Created: / 10-05-2014 / 15:33:47 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 02-06-2014 / 22:37:23 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 15-09-2014 / 16:26:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!CustomDialog methodsFor:'construction-adding'!
+
+addAbortAndOkButtons
+ ^ self subclassResponsibility
-requestClassName:aString initialAnswer:anInitialAswer
+ "Created: / 15-09-2014 / 16:20:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+addButtons
+ self addAbortAndOkButtons
+
+ "Created: / 15-09-2014 / 18:56:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+addCheckBoxOn: aValueModel labeled: aString
+ | checkbox |
+
+ checkbox := CheckBox new.
+ checkbox model: aValueModel.
+ checkbox label: aString.
+
+ ^ self addComponent: checkbox labeled: nil.
+
+ "Created: / 15-09-2014 / 18:11:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+addComponent:aView
+ "Add given component. Component is automatically stretched to occupy windows' width"
+
+ self subclassResponsibility.
+
+ "Created: / 15-09-2014 / 18:48:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+addComponent:aView labeled:labelString
+ "Add a label and some component side-by-side. Returns the component"
self subclassResponsibility
- "Created: / 10-05-2014 / 15:33:47 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
- "Modified: / 02-06-2014 / 22:37:23 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Created: / 15-09-2014 / 15:43:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+addInputFieldOn: aValueModel labeled: aString validatedBy: aBlock
+ | field |
+
+ field := EditField new.
+ field immediateAccept: true.
+ field model: aValueModel.
+
+ ^ self addComponent: field labeled: aString
+
+ "Created: / 15-09-2014 / 15:52:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+addSeparator
+ "Add horizontal separator (line)"
+ ^ self addComponent: Separator new
+
+ "Created: / 15-09-2014 / 18:52:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!CustomDialog methodsFor:'construction-utilities'!
+
+addClassCategoryEntryOn: aValueModel labeled: aString validateBy: aBlock
+
+ ^ (self addInputFieldOn: aValueModel labeled: aString validatedBy: aBlock)
+ entryCompletionBlock: [:text | DoWhatIMeanSupport classCategoryCompletion: text inEnvironment: Smalltalk ];
+ yourself
+
+ "Created: / 16-09-2014 / 10:13:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+addClassNameEntryOn: aValueModel labeled: aString validateBy: aBlock
+
+ ^ (self addInputFieldOn: aValueModel labeled: aString validatedBy: aBlock)
+ entryCompletionBlock: (DoWhatIMeanSupport classNameEntryCompletionBlock);
+ yourself
+
+ "Created: / 15-09-2014 / 15:43:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!CustomDialog methodsFor:'opening'!
+
+open
+ self subclassResponsibility
+
+ "Created: / 15-09-2014 / 16:23:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!CustomDialog methodsFor:'user interaction & notifications'!
--- a/CustomIsAbstractCodeGenerator.st Sun Oct 05 13:02:03 2014 +0200
+++ b/CustomIsAbstractCodeGenerator.st Sun Oct 05 14:15:21 2014 +0200
@@ -54,7 +54,7 @@
!CustomIsAbstractCodeGenerator methodsFor:'executing'!
-executeInContext:aCustomContext
+buildInContext:aCustomContext
"Generates the code or perform the refactoring. This method
is guaranteed to be called only if #availableInContext: returns
true.
@@ -71,7 +71,6 @@
].
]
- "Created: / 20-03-2014 / 01:38:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified (comment): / 31-03-2014 / 23:26:25 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Created: / 16-09-2014 / 07:20:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
--- a/CustomSilentDialog.st Sun Oct 05 13:02:03 2014 +0200
+++ b/CustomSilentDialog.st Sun Oct 05 14:15:21 2014 +0200
@@ -48,6 +48,30 @@
"Created: / 11-05-2014 / 00:25:24 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
! !
+!CustomSilentDialog methodsFor:'construction-adding'!
+
+addAbortAndOkButtons
+ "/ Nothing to do
+
+ "Created: / 15-09-2014 / 16:21:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+addComponent:aView
+ "Add given component. Component is automatically stretched to occupy windows' width"
+
+ "/ Ignored here
+
+ "Created: / 15-09-2014 / 18:48:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+addComponent:aView labeled:labelString
+ "Add a label and some component side-by-side. Returns the component"
+
+ "/ Ignored
+
+ "Created: / 15-09-2014 / 15:45:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!CustomSilentDialog methodsFor:'dialogs'!
requestClassName:aString initialAnswer:anInitialAswer
@@ -66,6 +90,14 @@
"Created: / 11-05-2014 / 00:19:51 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
! !
+!CustomSilentDialog methodsFor:'opening'!
+
+open
+ "/ Ignored
+
+ "Created: / 15-09-2014 / 16:23:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!CustomSilentDialog methodsFor:'user interaction & notifications'!
information: aString
--- a/CustomSimpleTestCaseCodeGenerator.st Sun Oct 05 13:02:03 2014 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-"{ Package: 'jn:refactoring_custom' }"
-
-CustomTestCaseCodeGenerator subclass:#CustomSimpleTestCaseCodeGenerator
- instanceVariableNames:''
- classVariableNames:''
- poolDictionaries:''
- category:'Interface-Refactoring-Custom-Generators'
-!
-
-!CustomSimpleTestCaseCodeGenerator class methodsFor:'accessing-presentation'!
-
-description
- ^ 'Generates TestCase subclass for selected classes'
-
- "Modified: / 27-04-2014 / 11:03:05 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-!
-
-label
- ^ 'TestCase class'
-
- "Modified: / 27-04-2014 / 10:46:01 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-! !
-
-!CustomSimpleTestCaseCodeGenerator methodsFor:'executing'!
-
-buildForClass: aClass testClass: aTestClass
-
- codeBuilder
- class: aTestClass;
-
- protocol: 'tests';
- source: ('test_something
- self assert: ''a'' = ''b''');
- createMethod;
-
- protocol: 'initialization & release';
- source: ('setUp
- ^ self');
- createMethod;
-
- source: ('tearDown
- ^ self');
- createMethod
-
- "Created: / 13-06-2014 / 09:28:04 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-! !
-
--- a/CustomTestCaseCodeGenerator.st Sun Oct 05 13:02:03 2014 +0200
+++ b/CustomTestCaseCodeGenerator.st Sun Oct 05 14:15:21 2014 +0200
@@ -1,7 +1,8 @@
"{ Package: 'jn:refactoring_custom' }"
CustomCodeGenerator subclass:#CustomTestCaseCodeGenerator
- instanceVariableNames:''
+ instanceVariableNames:'testClassName testSuperName testClassCategory generateSetUp
+ generateTearDown'
classVariableNames:''
poolDictionaries:''
category:'Interface-Refactoring-Custom-Generators'
@@ -10,6 +11,12 @@
!CustomTestCaseCodeGenerator class methodsFor:'accessing-presentation'!
+description
+ ^ 'Creates a new test case'
+
+ "Created: / 16-09-2014 / 11:32:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
group
"Returns a collection strings describing a group to which
receiver belongs. A groups may be nested hence the array of
@@ -21,59 +28,223 @@
^ #('Testing')
"Created: / 05-08-2014 / 14:52:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+label
+ "Returns show label describing the receiver. This label
+ is used in UI as menu item/tree item label."
+
+ ^ 'New Test Case'
+
+ "Created: / 16-09-2014 / 11:23:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!CustomTestCaseCodeGenerator class methodsFor:'queries'!
availableInContext:aCustomContext
- ^aCustomContext selectedClasses notEmptyOrNil
+ | classes |
+
+ classes := aCustomContext selectedClasses.
+ ^ classes isEmptyOrNil or:[ classes noneSatisfy: [:cls | cls inheritsFrom: TestCase ] ].
+
+ "Modified: / 15-09-2014 / 18:23:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
availableInPerspective:aCustomPerspective
^aCustomPerspective isClassPerspective
! !
-!CustomTestCaseCodeGenerator class methodsFor:'testing'!
+!CustomTestCaseCodeGenerator methodsFor:'accessing'!
+
+generateSetUp
+ ^ generateSetUp
+!
+
+generateSetUp:aBoolean
+ generateSetUp := aBoolean.
+!
+
+generateTearDown
+ ^ generateTearDown
+!
+
+generateTearDown:aBoolean
+ generateTearDown := aBoolean.
+!
-isAbstract
- ^ self == CustomTestCaseCodeGenerator
+testClassCategory
+ ^ testClassCategory
+!
+
+testClassCategory:aString
+ testClassCategory := aString.
+!
+
+testClassName
+ ^ testClassName
+!
+
+testClassName:aString
+ testClassName := aString.
+!
+
+testSuperName
+ ^ testSuperName
+!
+
+testSuperName:aString
+ testSuperName := aString.
! !
-!CustomTestCaseCodeGenerator methodsFor:'executing'!
+!CustomTestCaseCodeGenerator methodsFor:'accessing - defaults'!
+
+defaultGenerateSetUp
+ "raise an error: this method should be implemented (TODO)"
+
+ ^ false
-buildForClass: aClass testClass: aTestClass
- "Here should be building methods for testclass, altering test class..."
+ "Created: / 16-09-2014 / 10:27:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+defaultGenerateTearDown
+ "raise an error: this method should be implemented (TODO)"
+
+ ^ false
- self subclassResponsibility
+ "Created: / 16-09-2014 / 10:27:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+defaultSetUpCodeGeneratorClass
+ ^ CustomTestCaseSetUpCodeGenerator
+!
- "Created: / 13-06-2014 / 09:28:17 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+defaultTearDownCodeGeneratorClass
+ ^ CustomTestCaseTearDownCodeGenerator
!
+defaultTestSuperName
+ ^ 'TestCase'
+! !
+
+!CustomTestCaseCodeGenerator methodsFor:'executing - private'!
+
buildInContext:aCustomContext
-
- aCustomContext selectedClasses do: [ :class |
- | className testClassName |
+ | classes |
- className := class theNonMetaClass name.
-
- (className endsWith: 'Tests') ifFalse: [
- | testClass |
-
- testClassName := className, 'Tests'.
+ classes := aCustomContext selectedClasses.
+ classes notEmptyOrNil ifTrue: [
+ classes do: [:cls |
+ | name |
- codeBuilder package: class package.
-
- testClass := codeBuilder createClass.
- testClass
- className: testClassName;
- superclassName: 'TestCase';
- category: (self testCategory: class category).
-
- self buildForClass: class testClass: testClass
+ name := cls theNonMetaClass name , 'Tests'.
+ self generateTestCaseNamed:name forClassUnderTest: cls theNonMetaclass
]
- ]
+ ] ifFalse:[
+ self generateTestCaseNamed:testClassName forClassUnderTest: (classes size == 1 ifTrue:[classes anElement theNonMetaclass] ifFalse:[nil]) .
+ ].
"Modified: / 30-08-2014 / 22:15:46 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+ "Modified: / 16-09-2014 / 10:30:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+configureInContext:aCustomContext
+ | classes |
+
+ classes := aCustomContext selectedClasses.
+ testSuperName := self defaultTestSuperName.
+ classes size == 0 ifTrue:[
+ testClassName := 'NewTestCase'.
+ testClassCategory := 'Some Tests'
+ ] ifFalse:[
+ classes size == 1 ifTrue:[
+ testClassName := classes anElement name , 'Tests'.
+ testClassCategory := classes anElement category , '-Tests'.
+ ] ifFalse:[
+ testClassCategory := 'Some Tests'.
+ ].
+ ].
+ generateSetUp := self defaultGenerateSetUp.
+ generateTearDown := self defaultGenerateTearDown.
+
+ "/ Now open the dialog...
+
+ classes isEmptyOrNil ifTrue:[
+ dialog
+ addClassNameEntryOn:((AspectAdaptor forAspect:#testClassName)
+ subject:self)
+ labeled:'Class'
+ validateBy:nil.
+ ].
+ dialog
+ addClassNameEntryOn:((AspectAdaptor forAspect:#testSuperName)
+ subject:self)
+ labeled:'Superclass'
+ validateBy:nil.
+ dialog
+ addClassCategoryEntryOn:((AspectAdaptor forAspect:#testClassCategory)
+ subject:self)
+ labeled:'Category'
+ validateBy:nil.
+ dialog addSeparator.
+ dialog
+ addCheckBoxOn:((AspectAdaptor forAspect:#generateSetUp) subject:self)
+ labeled:'Generate #setUp'.
+ dialog
+ addCheckBoxOn:((AspectAdaptor forAspect:#generateTearDown) subject:self)
+ labeled:'Generate #tearDown'.
+ 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>"
+!
+
+generateTestCaseCodeFor:testCase forClassUnderTest:anObject
+ self
+ generateTestCaseSetUpCodeFor: testCase;
+ generateTestCaseTearDownCodeFor: testCase.
+
+ "Modified: / 16-09-2014 / 11:16:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+generateTestCaseNamed:testCaseClassName forClassUnderTest:classUnderTest
+ | testCase |
+
+ (testCase := codeBuilder createClass)
+ superclassName:testSuperName;
+ className:testClassName;
+ category:testClassCategory.
+ self generateTestCaseCodeFor:testCase forClassUnderTest:classUnderTest
+
+ "Created: / 16-09-2014 / 10:28:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+generateTestCaseSetUpCodeFor:testCase
+ generateSetUp ifTrue:[
+ | subcontext |
+
+ subcontext := CustomSubContext new.
+ subcontext selectedClasses:(Array with:testCase).
+ (self defaultSetUpCodeGeneratorClass subGeneratorOf:self)
+ executeInContext:subcontext.
+ ].
+
+ "Created: / 16-09-2014 / 11:15:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 01-10-2014 / 23:52:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+generateTestCaseTearDownCodeFor:testCase
+ generateTearDown ifTrue:[
+ | subcontext |
+
+ subcontext := CustomSubContext new.
+ subcontext selectedClasses:(Array with:testCase).
+ (self defaultTearDownCodeGeneratorClass subGeneratorOf:self)
+ executeInContext:subcontext.
+ ].
+
+ "Created: / 16-09-2014 / 11:15:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 01-10-2014 / 23:52:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!CustomTestCaseCodeGenerator methodsFor:'protected'!
--- a/CustomTestCaseMethodCodeGenerator.st Sun Oct 05 13:02:03 2014 +0200
+++ b/CustomTestCaseMethodCodeGenerator.st Sun Oct 05 14:15:21 2014 +0200
@@ -18,6 +18,19 @@
"Created: / 24-08-2014 / 16:16:09 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
!
+group
+ "Returns a collection strings describing a group to which
+ receiver belongs. A groups may be nested hence the array of
+ strings. For example for subgroup 'Accessors' in group 'Generators'
+ this method should return #('Generators' 'Accessors')."
+
+ "/ By default return an empty array which means the item will appear
+ "/ in top-level group.
+ ^ #('Testing')
+
+ "Created: / 05-08-2014 / 14:14:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
label
"Returns show label describing the receiver. This label
is used in UI as menu item/tree item label."
--- a/CustomTestCaseSetUpCodeGenerator.st Sun Oct 05 13:02:03 2014 +0200
+++ b/CustomTestCaseSetUpCodeGenerator.st Sun Oct 05 14:15:21 2014 +0200
@@ -10,9 +10,9 @@
!CustomTestCaseSetUpCodeGenerator class methodsFor:'accessing-presentation'!
description
- ^ 'Generates initial #setUp for TestCases'
+ ^ 'Generates initial #setUp for test cases'
- "Modified: / 05-08-2014 / 13:37:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-09-2014 / 11:24:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
group
@@ -57,9 +57,11 @@
superHasSetup := false.
[ superHasSetup not and:[ current isNil not ] ] whileTrue:[
superHasSetup := current includesSelector: #setUp.
- current := current superclass.
+ superHasSetup ifFalse:[
+ current := current superclass.
+ ].
].
- (superHasSetup and:[ current name ~~ #TestCase ]) ifTrue:[
+ superHasSetup ifTrue:[
source := 'setUp
super setUp.
@@ -68,6 +70,8 @@
category := (current compiledMethodAt: #setUp) category.
] ifFalse:[
source := 'setUp
+ "/ super setUp.
+
"Add your own code here..."
'.
category := (TestCase compiledMethodAt: #setUp) category.
--- a/CustomTestCaseTearDownCodeGenerator.st Sun Oct 05 13:02:03 2014 +0200
+++ b/CustomTestCaseTearDownCodeGenerator.st Sun Oct 05 14:15:21 2014 +0200
@@ -57,9 +57,12 @@
superHasSetup := false.
[ superHasSetup not and:[ current isNil not ] ] whileTrue:[
superHasSetup := current includesSelector: #tearDown.
- current := current superclass.
+ superHasSetup ifFalse:[
+ current := current superclass.
+ ].
+
].
- (superHasSetup and:[ current name ~~ #TestCase ]) ifTrue:[
+ superHasSetup ifTrue:[
source := 'tearDown
"Add your own code here..."
@@ -69,6 +72,8 @@
] ifFalse:[
source := 'tearDown
"Add your own code here..."
+
+ "/ super tearDown.
'.
category := (TestCase compiledMethodAt: #tearDown ) category.
].
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/CustomUITestCaseCodeGenerator.st Sun Oct 05 14:15:21 2014 +0200
@@ -0,0 +1,40 @@
+"{ Package: 'jn:refactoring_custom' }"
+
+CustomTestCaseCodeGenerator subclass:#CustomUITestCaseCodeGenerator
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'Interface-Refactoring-Custom-Generators'
+!
+
+!CustomUITestCaseCodeGenerator class methodsFor:'accessing-presentation'!
+
+description
+ ^ 'Creates a new test case for UI'
+
+ "Created: / 16-09-2014 / 11:33:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+label
+ "Returns show label describing the receiver. This label
+ is used in UI as menu item/tree item label."
+
+ ^ 'New UI Test Case'
+
+ "Created: / 16-09-2014 / 11:23:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!CustomUITestCaseCodeGenerator methodsFor:'accessing - defaults'!
+
+defaultGenerateSetUp
+ ^ true
+
+ "Created: / 16-09-2014 / 11:26:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+defaultSetUpCodeGeneratorClass
+ ^ CustomUITestCaseSetUpCodeGenerator
+
+ "Created: / 16-09-2014 / 11:20:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/CustomUITestCaseSetUpCodeGenerator.st Sun Oct 05 14:15:21 2014 +0200
@@ -0,0 +1,23 @@
+"{ Package: 'jn:refactoring_custom' }"
+
+CustomTestCaseSetUpCodeGenerator subclass:#CustomUITestCaseSetUpCodeGenerator
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'Interface-Refactoring-Custom-Generators'
+!
+
+!CustomUITestCaseSetUpCodeGenerator class methodsFor:'accessing-presentation'!
+
+description
+ ^ 'Generates initial #setUp for UI test cases'
+
+ "Created: / 16-09-2014 / 11:24:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+label
+ ^ 'TestCase setUp method (for UI Test Cases)'
+
+ "Created: / 16-09-2014 / 11:23:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- a/CustomUserDialog.st Sun Oct 05 13:02:03 2014 +0200
+++ b/CustomUserDialog.st Sun Oct 05 14:15:21 2014 +0200
@@ -1,7 +1,7 @@
"{ Package: 'jn:refactoring_custom' }"
CustomDialog subclass:#CustomUserDialog
- instanceVariableNames:''
+ instanceVariableNames:'dialog'
classVariableNames:''
poolDictionaries:''
category:'Interface-Refactoring-Custom'
@@ -12,6 +12,7 @@
documentation
"
CustomDialog implementation with real dialogs to provide human interaction.
+ Currently it is a simple wrapper around DialogBox.
[author:]
Jakub Nesveda <nesvejak@fit.cvut.cz>
@@ -19,23 +20,69 @@
"
! !
-!CustomUserDialog methodsFor:'dialogs'!
+!CustomUserDialog class methodsFor:'instance creation'!
+
+new
+ "return an initialized instance"
+
+ ^ self basicNew initialize.
+! !
+
+!CustomUserDialog methodsFor:'construction-adding'!
+
+addAbortAndOkButtons
+ dialog addAbortAndOkButtons
-requestClassName:aString initialAnswer:anInitialAswer
+ "Created: / 15-09-2014 / 16:21:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+addComponent:aView
+ "Add given component. Component is automatically stretched to occupy windows' width"
- | className |
+ ^ dialog addComponent: aView
+
+ "Created: / 15-09-2014 / 18:50:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+addComponent:aView labeled:aString
+ "Add a label and some component side-by-side. Returns the component"
- className := Dialog
- requestClassName: aString
- initialAnswer: anInitialAswer.
+"/ aString notEmptyOrNil ifTrue:[
+ ^ dialog
+ addLabelledField:aView
+ label:aString ? ''
+ adjust:#left
+ tabable:true
+ separateAtX:0.3
+"/ ] ifFalse:[
+"/ ^ dialog
+"/ addComponent:aView indent: 0.3
+"/ ].
+
+ "Created: / 15-09-2014 / 15:45:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 15-09-2014 / 19:44:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!CustomUserDialog methodsFor:'initialization'!
- className isNil ifTrue:[
- AbortOperationRequest raise.
- ].
+initialize
+ "Invoked when a new instance is created."
+
+ "/ please change as required (and remove this comment)
+ dialog := DialogBox new.
+ dialog abortAction: [ AbortOperationRequest raiseRequest ]
+
+ "/ super initialize. -- commented since inherited method does nothing
- ^ className
+ "Modified: / 15-09-2014 / 16:23:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!CustomUserDialog methodsFor:'opening'!
- "Created: / 02-06-2014 / 22:34:24 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+open
+ ^ dialog open
+
+ "Created: / 15-09-2014 / 16:23:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!CustomUserDialog methodsFor:'user interaction & notifications'!
--- a/Make.proto Sun Oct 05 13:02:03 2014 +0200
+++ b/Make.proto Sun Oct 05 14:15:21 2014 +0200
@@ -34,7 +34,7 @@
# add the path(es) here:,
# ********** OPTIONAL: MODIFY the next lines ***
# LOCALINCLUDES=-Ifoo -Ibar
-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/libtool -I$(INCLUDE_TOP)/stx/libview -I$(INCLUDE_TOP)/stx/libview2
+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/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,
@@ -186,6 +186,8 @@
$(OUTDIR)CustomSimpleSetterMethodsCodeGenerator.$(O) CustomSimpleSetterMethodsCodeGenerator.$(H): CustomSimpleSetterMethodsCodeGenerator.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)CustomSimpleTestCaseCodeGenerator.$(O) CustomSimpleTestCaseCodeGenerator.$(H): CustomSimpleTestCaseCodeGenerator.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)CustomValueHolderAccessMethodsCodeGenerator.$(O) CustomValueHolderAccessMethodsCodeGenerator.$(H): CustomValueHolderAccessMethodsCodeGenerator.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)CustomUITestCaseCodeGenerator.$(O) CustomUITestCaseCodeGenerator.$(H): CustomUITestCaseCodeGenerator.st $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGenerator.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGeneratorOrRefactoringBase.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomTestCaseCodeGenerator.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)CustomUITestCaseSetUpCodeGenerator.$(O) CustomUITestCaseSetUpCodeGenerator.$(H): CustomUITestCaseSetUpCodeGenerator.st $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGenerator.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomCodeGeneratorOrRefactoringBase.$(H) $(INCLUDE_TOP)/jn/refactoring_custom/CustomTestCaseSetUpCodeGenerator.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)CustomValueHolderGetterMethodsCodeGenerator.$(O) CustomValueHolderGetterMethodsCodeGenerator.$(H): CustomValueHolderGetterMethodsCodeGenerator.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)CustomValueHolderWithChangeNotificationAccessMethodsCodeGenerator.$(O) CustomValueHolderWithChangeNotificationAccessMethodsCodeGenerator.$(H): CustomValueHolderWithChangeNotificationAccessMethodsCodeGenerator.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)CustomValueHolderWithChangeNotificationGetterMethodsCodeGenerator.$(O) CustomValueHolderWithChangeNotificationGetterMethodsCodeGenerator.$(H): CustomValueHolderWithChangeNotificationGetterMethodsCodeGenerator.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 Sun Oct 05 13:02:03 2014 +0200
+++ b/Make.spec Sun Oct 05 14:15:21 2014 +0200
@@ -99,7 +99,8 @@
CustomSimpleAccessMethodsCodeGenerator \
CustomSimpleGetterMethodsCodeGenerator \
CustomSimpleSetterMethodsCodeGenerator \
- CustomSimpleTestCaseCodeGenerator \
+ CustomUITestCaseCodeGenerator \
+ CustomUITestCaseSetUpCodeGenerator \
CustomValueHolderAccessMethodsCodeGenerator \
CustomValueHolderGetterMethodsCodeGenerator \
CustomValueHolderWithChangeNotificationAccessMethodsCodeGenerator \
@@ -160,7 +161,8 @@
$(OUTDIR_SLASH)CustomSimpleAccessMethodsCodeGenerator.$(O) \
$(OUTDIR_SLASH)CustomSimpleGetterMethodsCodeGenerator.$(O) \
$(OUTDIR_SLASH)CustomSimpleSetterMethodsCodeGenerator.$(O) \
- $(OUTDIR_SLASH)CustomSimpleTestCaseCodeGenerator.$(O) \
+ $(OUTDIR_SLASH)CustomUITestCaseCodeGenerator.$(O) \
+ $(OUTDIR_SLASH)CustomUITestCaseSetUpCodeGenerator.$(O) \
$(OUTDIR_SLASH)CustomValueHolderAccessMethodsCodeGenerator.$(O) \
$(OUTDIR_SLASH)CustomValueHolderGetterMethodsCodeGenerator.$(O) \
$(OUTDIR_SLASH)CustomValueHolderWithChangeNotificationAccessMethodsCodeGenerator.$(O) \
--- a/abbrev.stc Sun Oct 05 13:02:03 2014 +0200
+++ b/abbrev.stc Sun Oct 05 14:15:21 2014 +0200
@@ -87,7 +87,8 @@
CustomSimpleAccessMethodsCodeGenerator CustomSimpleAccessMethodsCodeGenerator jn:refactoring_custom 'Interface-Refactoring-Custom-Generators' 0
CustomSimpleGetterMethodsCodeGenerator CustomSimpleGetterMethodsCodeGenerator jn:refactoring_custom 'Interface-Refactoring-Custom-Generators' 0
CustomSimpleSetterMethodsCodeGenerator CustomSimpleSetterMethodsCodeGenerator jn:refactoring_custom 'Interface-Refactoring-Custom-Generators' 0
-CustomSimpleTestCaseCodeGenerator CustomSimpleTestCaseCodeGenerator jn:refactoring_custom 'Interface-Refactoring-Custom-Generators' 0
+CustomUITestCaseCodeGenerator CustomUITestCaseCodeGenerator jn:refactoring_custom 'Interface-Refactoring-Custom-Generators' 0
+CustomUITestCaseSetUpCodeGenerator CustomUITestCaseSetUpCodeGenerator jn:refactoring_custom 'Interface-Refactoring-Custom-Generators' 0
CustomValueHolderAccessMethodsCodeGenerator CustomValueHolderAccessMethodsCodeGenerator jn:refactoring_custom 'Interface-Refactoring-Custom-Generators' 0
CustomValueHolderGetterMethodsCodeGenerator CustomValueHolderGetterMethodsCodeGenerator jn:refactoring_custom 'Interface-Refactoring-Custom-Generators' 0
CustomValueHolderWithChangeNotificationAccessMethodsCodeGenerator CustomValueHolderWithChangeNotificationAccessMethodsCodeGenerator jn:refactoring_custom 'Interface-Refactoring-Custom-Generators' 0
--- a/bc.mak Sun Oct 05 13:02:03 2014 +0200
+++ b/bc.mak Sun Oct 05 14:15:21 2014 +0200
@@ -34,7 +34,7 @@
-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\libtool -I$(INCLUDE_TOP)\stx\libview -I$(INCLUDE_TOP)\stx\libview2
+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\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)
@@ -132,6 +132,8 @@
$(OUTDIR)CustomSimpleSetterMethodsCodeGenerator.$(O) CustomSimpleSetterMethodsCodeGenerator.$(H): CustomSimpleSetterMethodsCodeGenerator.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)CustomSimpleTestCaseCodeGenerator.$(O) CustomSimpleTestCaseCodeGenerator.$(H): CustomSimpleTestCaseCodeGenerator.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)CustomValueHolderAccessMethodsCodeGenerator.$(O) CustomValueHolderAccessMethodsCodeGenerator.$(H): CustomValueHolderAccessMethodsCodeGenerator.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)CustomUITestCaseCodeGenerator.$(O) CustomUITestCaseCodeGenerator.$(H): CustomUITestCaseCodeGenerator.st $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGenerator.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGeneratorOrRefactoringBase.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomTestCaseCodeGenerator.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)CustomUITestCaseSetUpCodeGenerator.$(O) CustomUITestCaseSetUpCodeGenerator.$(H): CustomUITestCaseSetUpCodeGenerator.st $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGenerator.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGeneratorOrRefactoring.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomCodeGeneratorOrRefactoringBase.$(H) $(INCLUDE_TOP)\jn\refactoring_custom\CustomTestCaseSetUpCodeGenerator.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)CustomValueHolderGetterMethodsCodeGenerator.$(O) CustomValueHolderGetterMethodsCodeGenerator.$(H): CustomValueHolderGetterMethodsCodeGenerator.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)CustomValueHolderWithChangeNotificationAccessMethodsCodeGenerator.$(O) CustomValueHolderWithChangeNotificationAccessMethodsCodeGenerator.$(H): CustomValueHolderWithChangeNotificationAccessMethodsCodeGenerator.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)CustomValueHolderWithChangeNotificationGetterMethodsCodeGenerator.$(O) CustomValueHolderWithChangeNotificationGetterMethodsCodeGenerator.$(H): CustomValueHolderWithChangeNotificationGetterMethodsCodeGenerator.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 Sun Oct 05 13:02:03 2014 +0200
+++ b/extensions.st Sun Oct 05 14:15:21 2014 +0200
@@ -252,7 +252,7 @@
!Tools::NewSystemBrowser methodsFor:'menus extensions-custom refactorings'!
selectorMenuExtensionCustomGenerators:aMenu
- <menuextension: #selectorMenu>
+ <menuextension: #selectorMenuCompareGenerateDebugSlice>
| item index perspective context |
@@ -270,12 +270,13 @@
].
"Created: / 26-08-2014 / 10:18:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 05-09-2014 / 11:28:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!Tools::NewSystemBrowser methodsFor:'menus extensions-custom refactorings'!
selectorMenuExtensionCustomRefactorings:aMenu
- <menuextension: #selectorMenu>
+ <menuextension: #selectorMenuCompareGenerateDebugSlice>
| item index perspective context |
@@ -293,7 +294,7 @@
].
"Created: / 24-08-2014 / 15:23:49 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
- "Modified: / 26-08-2014 / 10:17:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 05-09-2014 / 11:28:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!Tools::NewSystemBrowser methodsFor:'menus extensions-custom refactorings'!
--- a/jn_refactoring_custom.st Sun Oct 05 13:02:03 2014 +0200
+++ b/jn_refactoring_custom.st Sun Oct 05 14:15:21 2014 +0200
@@ -48,6 +48,8 @@
^ #(
#'stx:libbasic3' "Change - referenced by CustomCodeGeneratorOrRefactoringTestCase>>assertSource:sameAs:"
#'stx:libview' "WindowGroup - referenced by CustomCodeGeneratorOrRefactoring>>executeInContextWithWaitCursor:"
+ #'stx:libwidg' "DialogBox - referenced by CustomUserDialog>>initialize"
+ #'stx:libwidg2' "CheckBox - referenced by CustomDialog>>addCheckBoxOn:labeled:"
)
!
@@ -157,7 +159,8 @@
CustomSimpleAccessMethodsCodeGenerator
CustomSimpleGetterMethodsCodeGenerator
CustomSimpleSetterMethodsCodeGenerator
- CustomSimpleTestCaseCodeGenerator
+ CustomUITestCaseCodeGenerator
+ CustomUITestCaseSetUpCodeGenerator
CustomValueHolderAccessMethodsCodeGenerator
CustomValueHolderGetterMethodsCodeGenerator
CustomValueHolderWithChangeNotificationAccessMethodsCodeGenerator
--- a/libInit.cc Sun Oct 05 13:02:03 2014 +0200
+++ b/libInit.cc Sun Oct 05 14:15:21 2014 +0200
@@ -76,7 +76,8 @@
_CustomSimpleAccessMethodsCodeGenerator_Init(pass,__pRT__,snd);
_CustomSimpleGetterMethodsCodeGenerator_Init(pass,__pRT__,snd);
_CustomSimpleSetterMethodsCodeGenerator_Init(pass,__pRT__,snd);
-_CustomSimpleTestCaseCodeGenerator_Init(pass,__pRT__,snd);
+_CustomUITestCaseCodeGenerator_Init(pass,__pRT__,snd);
+_CustomUITestCaseSetUpCodeGenerator_Init(pass,__pRT__,snd);
_CustomValueHolderAccessMethodsCodeGenerator_Init(pass,__pRT__,snd);
_CustomValueHolderGetterMethodsCodeGenerator_Init(pass,__pRT__,snd);
_CustomValueHolderWithChangeNotificationAccessMethodsCodeGenerator_Init(pass,__pRT__,snd);
--- a/refactoring_custom.rc Sun Oct 05 13:02:03 2014 +0200
+++ b/refactoring_custom.rc Sun Oct 05 14:15:21 2014 +0200
@@ -4,7 +4,7 @@
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 6,2,32767,32767
- PRODUCTVERSION 6,2,4,1333
+ PRODUCTVERSION 6,2,4,0
#if (__BORLANDC__)
FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE
FILEFLAGS VS_FF_PRERELEASE | VS_FF_SPECIALBUILD
@@ -24,7 +24,7 @@
VALUE "InternalName", "jn:refactoring_custom\0"
VALUE "LegalCopyright", "My CopyRight or CopyLeft\0"
VALUE "ProductName", "ProductName\0"
- VALUE "ProductVersion", "6.2.4.1333\0"
+ VALUE "ProductVersion", "6.2.4.0\0"
VALUE "ProductDate", "Sun, 05 Oct 2014 10:12:03 GMT\0"
END