refactoring_custom/SmallSense__CustomSilentDialog.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 02 Jul 2018 08:46:03 +0200
changeset 1073 c591c75fe5a8
parent 1072 a44c741ee5ef
permissions -rw-r--r--
Tagged Smalltalk/X 8.0.0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
828
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
     1
"
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
     2
A custom code generation and refactoring support for Smalltalk/X
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
     3
Copyright (C) 2013-2015 Jakub Nesveda
1072
a44c741ee5ef Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 833
diff changeset
     4
Copyright (C) 2015 Jan Vrany
828
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
     5
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
     6
This library is free software; you can redistribute it and/or
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
     7
modify it under the terms of the GNU Lesser General Public
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
     8
License as published by the Free Software Foundation; either
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
     9
version 2.1 of the License.
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    10
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    11
This library is distributed in the hope that it will be useful,
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    12
but WITHOUT ANY WARRANTY; without even the implied warranty of
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    14
Lesser General Public License for more details.
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    15
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    16
You should have received a copy of the GNU Lesser General Public
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    17
License along with this library; if not, write to the Free Software
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    18
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    19
"
833
297eb38e4eee Package jn:refactoring_custom renamed to stx:goodies/smallsense/refactoring_custom
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 830
diff changeset
    20
"{ Package: 'stx:goodies/smallsense/refactoring_custom' }"
544
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    21
830
1a88f5e65fe2 Classes moved to namespace SmallSense
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 828
diff changeset
    22
"{ NameSpace: SmallSense }"
803
95cdac772759 Fixed failing tests caused by new STX release
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 740
diff changeset
    23
557
d0e228558858 make CustomDialog as abstract with CustomSilentDialog (system/test interaction) and CustomUserDialog (human interaction) implementations
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 546
diff changeset
    24
CustomDialog subclass:#CustomSilentDialog
544
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    25
	instanceVariableNames:'methodAnswers'
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    26
	classVariableNames:''
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    27
	poolDictionaries:''
740
dcc444183c8c move CustomDialog and its implementations to UI category
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 695
diff changeset
    28
	category:'Interface-Refactoring-Custom-UI'
544
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    29
!
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    30
695
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
    31
CustomSilentDialog subclass:#NilComponent
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
    32
	instanceVariableNames:''
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
    33
	classVariableNames:''
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
    34
	poolDictionaries:''
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
    35
	privateIn:CustomSilentDialog
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
    36
!
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
    37
557
d0e228558858 make CustomDialog as abstract with CustomSilentDialog (system/test interaction) and CustomUserDialog (human interaction) implementations
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 546
diff changeset
    38
!CustomSilentDialog class methodsFor:'documentation'!
d0e228558858 make CustomDialog as abstract with CustomSilentDialog (system/test interaction) and CustomUserDialog (human interaction) implementations
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 546
diff changeset
    39
828
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    40
copyright
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    41
"
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    42
A custom code generation and refactoring support for Smalltalk/X
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    43
Copyright (C) 2013-2015 Jakub Nesveda
1072
a44c741ee5ef Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 833
diff changeset
    44
Copyright (C) 2015 Jan Vrany
828
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    45
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    46
This library is free software; you can redistribute it and/or
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    47
modify it under the terms of the GNU Lesser General Public
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    48
License as published by the Free Software Foundation; either
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    49
version 2.1 of the License.
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    50
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    51
This library is distributed in the hope that it will be useful,
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    52
but WITHOUT ANY WARRANTY; without even the implied warranty of
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    53
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    54
Lesser General Public License for more details.
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    55
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    56
You should have received a copy of the GNU Lesser General Public
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    57
License along with this library; if not, write to the Free Software
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    58
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    59
"
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    60
!
4c5acc592dc7 Added copyright notice
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 803
diff changeset
    61
557
d0e228558858 make CustomDialog as abstract with CustomSilentDialog (system/test interaction) and CustomUserDialog (human interaction) implementations
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 546
diff changeset
    62
documentation
d0e228558858 make CustomDialog as abstract with CustomSilentDialog (system/test interaction) and CustomUserDialog (human interaction) implementations
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 546
diff changeset
    63
"
d0e228558858 make CustomDialog as abstract with CustomSilentDialog (system/test interaction) and CustomUserDialog (human interaction) implementations
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 546
diff changeset
    64
    CustomDialog implementation based on non human interaction with dialog answers.
d0e228558858 make CustomDialog as abstract with CustomSilentDialog (system/test interaction) and CustomUserDialog (human interaction) implementations
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 546
diff changeset
    65
    You may set dialog aswers to inject them in code generators.
d0e228558858 make CustomDialog as abstract with CustomSilentDialog (system/test interaction) and CustomUserDialog (human interaction) implementations
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 546
diff changeset
    66
d0e228558858 make CustomDialog as abstract with CustomSilentDialog (system/test interaction) and CustomUserDialog (human interaction) implementations
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 546
diff changeset
    67
    [author:]
d0e228558858 make CustomDialog as abstract with CustomSilentDialog (system/test interaction) and CustomUserDialog (human interaction) implementations
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 546
diff changeset
    68
        Jakub Nesveda <nesvejak@fit.cvut.cz>
d0e228558858 make CustomDialog as abstract with CustomSilentDialog (system/test interaction) and CustomUserDialog (human interaction) implementations
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 546
diff changeset
    69
d0e228558858 make CustomDialog as abstract with CustomSilentDialog (system/test interaction) and CustomUserDialog (human interaction) implementations
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 546
diff changeset
    70
"
d0e228558858 make CustomDialog as abstract with CustomSilentDialog (system/test interaction) and CustomUserDialog (human interaction) implementations
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 546
diff changeset
    71
! !
d0e228558858 make CustomDialog as abstract with CustomSilentDialog (system/test interaction) and CustomUserDialog (human interaction) implementations
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 546
diff changeset
    72
d0e228558858 make CustomDialog as abstract with CustomSilentDialog (system/test interaction) and CustomUserDialog (human interaction) implementations
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 546
diff changeset
    73
!CustomSilentDialog class methodsFor:'instance creation'!
544
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    74
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    75
new
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    76
    "return an initialized instance"
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    77
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    78
    ^ self basicNew initialize
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    79
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    80
    "Created: / 11-05-2014 / 11:13:00 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    81
! !
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    82
557
d0e228558858 make CustomDialog as abstract with CustomSilentDialog (system/test interaction) and CustomUserDialog (human interaction) implementations
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 546
diff changeset
    83
!CustomSilentDialog methodsFor:'accessing'!
544
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    84
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    85
answer: anAnswer forSelector: aSelector
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    86
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    87
    methodAnswers 
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    88
        at: aSelector 
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    89
        put: anAnswer
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    90
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    91
    "Created: / 11-05-2014 / 00:32:39 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    92
!
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    93
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    94
methodAnswer: aSelector   
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    95
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    96
    ^ methodAnswers at: aSelector
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    97
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    98
    "Created: / 11-05-2014 / 00:25:24 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
    99
! !
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
   100
669
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   101
!CustomSilentDialog methodsFor:'construction-adding'!
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   102
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   103
addAbortAndOkButtons
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   104
    "/ Nothing to do
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   105
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   106
    "Created: / 15-09-2014 / 16:21:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   107
!
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   108
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   109
addComponent:aView
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   110
    "Add given component. Component is automatically stretched to occupy windows' width"
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   111
695
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
   112
    ^ CustomSilentDialog::NilComponent new
669
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   113
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   114
    "Created: / 15-09-2014 / 18:48:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
695
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
   115
    "Modified: / 14-10-2014 / 11:27:44 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
669
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   116
!
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   117
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   118
addComponent:aView labeled:labelString
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   119
    "Add a label and some component side-by-side. Returns the component"
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   120
695
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
   121
    ^ CustomSilentDialog::NilComponent new
669
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   122
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   123
    "Created: / 15-09-2014 / 15:45:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
695
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
   124
    "Modified: / 14-10-2014 / 11:26:55 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
669
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   125
! !
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   126
557
d0e228558858 make CustomDialog as abstract with CustomSilentDialog (system/test interaction) and CustomUserDialog (human interaction) implementations
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 546
diff changeset
   127
!CustomSilentDialog methodsFor:'dialogs'!
544
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
   128
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
   129
requestClassName:aString initialAnswer:anInitialAswer
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
   130
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
   131
    ^ self methodAnswer: #requestClassName:initialAnswer:
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
   132
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
   133
    "Created: / 11-05-2014 / 00:16:48 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
   134
! !
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
   135
557
d0e228558858 make CustomDialog as abstract with CustomSilentDialog (system/test interaction) and CustomUserDialog (human interaction) implementations
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 546
diff changeset
   136
!CustomSilentDialog methodsFor:'initialization'!
544
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
   137
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
   138
initialize
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
   139
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
   140
    methodAnswers := Dictionary new
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
   141
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
   142
    "Created: / 11-05-2014 / 00:19:51 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
   143
! !
4d9dfb9b35a1 add CustomDialogMock for testing purposes
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff changeset
   144
669
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   145
!CustomSilentDialog methodsFor:'opening'!
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   146
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   147
open
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   148
    "/ Ignored
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   149
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   150
    "Created: / 15-09-2014 / 16:23:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   151
! !
13f049ec3b22 CustomDialog refactored to support creation of a more complex dialogs.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 576
diff changeset
   152
557
d0e228558858 make CustomDialog as abstract with CustomSilentDialog (system/test interaction) and CustomUserDialog (human interaction) implementations
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 546
diff changeset
   153
!CustomSilentDialog methodsFor:'user interaction & notifications'!
546
7402ead9f354 fix error when nothing is generated
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 544
diff changeset
   154
7402ead9f354 fix error when nothing is generated
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 544
diff changeset
   155
information: aString
7402ead9f354 fix error when nothing is generated
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 544
diff changeset
   156
7402ead9f354 fix error when nothing is generated
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 544
diff changeset
   157
    ^ self
7402ead9f354 fix error when nothing is generated
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 544
diff changeset
   158
7402ead9f354 fix error when nothing is generated
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 544
diff changeset
   159
    "Created: / 13-05-2014 / 22:33:51 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
7402ead9f354 fix error when nothing is generated
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 544
diff changeset
   160
! !
7402ead9f354 fix error when nothing is generated
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 544
diff changeset
   161
695
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
   162
!CustomSilentDialog::NilComponent class methodsFor:'documentation'!
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
   163
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
   164
documentation
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
   165
"
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
   166
    Substitute for component in CustomDialog to hide any real UI.
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
   167
    This class just understand all method calls and returns self.
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
   168
"
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
   169
! !
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
   170
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
   171
!CustomSilentDialog::NilComponent methodsFor:'queries'!
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
   172
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
   173
doesNotUnderstand: aMessage
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
   174
    "Do nothing when a message arrives."
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
   175
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
   176
    ^ self
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
   177
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
   178
    "Created: / 14-10-2014 / 11:25:29 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
   179
! !
a746f184b5a1 fix TestCase code generator to be used with metaclass
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 669
diff changeset
   180
576
b8e70d6ade95 CustomMock - add possibility for mocking messages with arguments
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 557
diff changeset
   181
!CustomSilentDialog class methodsFor:'documentation'!
b8e70d6ade95 CustomMock - add possibility for mocking messages with arguments
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 557
diff changeset
   182
b8e70d6ade95 CustomMock - add possibility for mocking messages with arguments
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 557
diff changeset
   183
version_HG
b8e70d6ade95 CustomMock - add possibility for mocking messages with arguments
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 557
diff changeset
   184
b8e70d6ade95 CustomMock - add possibility for mocking messages with arguments
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 557
diff changeset
   185
    ^ '$Changeset: <not expanded> $'
b8e70d6ade95 CustomMock - add possibility for mocking messages with arguments
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 557
diff changeset
   186
! !
b8e70d6ade95 CustomMock - add possibility for mocking messages with arguments
Jakub Nesveda <jakubnesveda@seznam.cz>
parents: 557
diff changeset
   187