author | convert-repo |
Wed, 11 Dec 2019 04:28:36 +0000 | |
changeset 1116 | b51ace366efc |
parent 1072 | a44c741ee5ef |
permissions | -rw-r--r-- |
828 | 1 |
" |
2 |
A custom code generation and refactoring support for Smalltalk/X |
|
3 |
Copyright (C) 2013-2015 Jakub Nesveda |
|
1072 | 4 |
Copyright (C) 2015 Jan Vrany |
828 | 5 |
|
6 |
This library is free software; you can redistribute it and/or |
|
7 |
modify it under the terms of the GNU Lesser General Public |
|
8 |
License as published by the Free Software Foundation; either |
|
9 |
version 2.1 of the License. |
|
10 |
||
11 |
This library is distributed in the hope that it will be useful, |
|
12 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
14 |
Lesser General Public License for more details. |
|
15 |
||
16 |
You should have received a copy of the GNU Lesser General Public |
|
17 |
License along with this library; if not, write to the Free Software |
|
18 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
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' }" |
504
3525d97ae194
- added interface canGenerate, generate to CustomCodeGenrator with context object instead of a class
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:
766
diff
changeset
|
23 |
|
534
f89b11cd6fa5
CustomContext made as abstract class with 2 implementations: Browser and Sub generator
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
504
diff
changeset
|
24 |
CustomContext subclass:#CustomSubContext |
718
ed7514e9d76c
rename selectedMethodProtocols to selecteProtocols in CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
681
diff
changeset
|
25 |
instanceVariableNames:'selectedClasses selectedClassCategories selectedProtocols |
629
e85070e8c11b
add code selection object (CustomSourceCodeSelection) with code, method, class... to CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
626
diff
changeset
|
26 |
selectedMethods selectedPackages selectedVariables selectedCodes' |
504
3525d97ae194
- added interface canGenerate, generate to CustomCodeGenrator with context object instead of a class
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff
changeset
|
27 |
classVariableNames:'' |
3525d97ae194
- added interface canGenerate, generate to CustomCodeGenrator with context object instead of a class
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff
changeset
|
28 |
poolDictionaries:'' |
3525d97ae194
- added interface canGenerate, generate to CustomCodeGenrator with context object instead of a class
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff
changeset
|
29 |
category:'Interface-Refactoring-Custom' |
3525d97ae194
- added interface canGenerate, generate to CustomCodeGenrator with context object instead of a class
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff
changeset
|
30 |
! |
3525d97ae194
- added interface canGenerate, generate to CustomCodeGenrator with context object instead of a class
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff
changeset
|
31 |
|
828 | 32 |
!CustomSubContext class methodsFor:'documentation'! |
33 |
||
34 |
copyright |
|
35 |
" |
|
36 |
A custom code generation and refactoring support for Smalltalk/X |
|
37 |
Copyright (C) 2013-2015 Jakub Nesveda |
|
1072 | 38 |
Copyright (C) 2015 Jan Vrany |
828 | 39 |
|
40 |
This library is free software; you can redistribute it and/or |
|
41 |
modify it under the terms of the GNU Lesser General Public |
|
42 |
License as published by the Free Software Foundation; either |
|
43 |
version 2.1 of the License. |
|
44 |
||
45 |
This library is distributed in the hope that it will be useful, |
|
46 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
47 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
48 |
Lesser General Public License for more details. |
|
49 |
||
50 |
You should have received a copy of the GNU Lesser General Public |
|
51 |
License along with this library; if not, write to the Free Software |
|
52 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
53 |
" |
|
54 |
! ! |
|
672
f05a98383324
merge CustomCodeGeneratorOrRefactoring with CustomCodeGeneratorOrRefactoringBase
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
629
diff
changeset
|
55 |
|
534
f89b11cd6fa5
CustomContext made as abstract class with 2 implementations: Browser and Sub generator
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
504
diff
changeset
|
56 |
!CustomSubContext methodsFor:'accessing'! |
504
3525d97ae194
- added interface canGenerate, generate to CustomCodeGenrator with context object instead of a class
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff
changeset
|
57 |
|
766
1313153656d9
better documentation for setters in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
761
diff
changeset
|
58 |
selectedClassCategories: classCategories |
1313153656d9
better documentation for setters in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
761
diff
changeset
|
59 |
"Sets the list of class categories" |
1313153656d9
better documentation for setters in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
761
diff
changeset
|
60 |
|
1313153656d9
better documentation for setters in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
761
diff
changeset
|
61 |
selectedClassCategories := classCategories. |
1313153656d9
better documentation for setters in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
761
diff
changeset
|
62 |
|
1313153656d9
better documentation for setters in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
761
diff
changeset
|
63 |
"Modified (comment): / 29-11-2014 / 18:32:56 / Jakub Nesveda <nesvejak@fit.cvut.cz>" |
534
f89b11cd6fa5
CustomContext made as abstract class with 2 implementations: Browser and Sub generator
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
504
diff
changeset
|
64 |
! |
f89b11cd6fa5
CustomContext made as abstract class with 2 implementations: Browser and Sub generator
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
504
diff
changeset
|
65 |
|
746
a25dc307d4e8
Make CustomContext>>selectedClasses always return a collection of RBClass...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
66 |
selectedClasses: classes |
a25dc307d4e8
Make CustomContext>>selectedClasses always return a collection of RBClass...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
67 |
"Sets the list of classes" |
534
f89b11cd6fa5
CustomContext made as abstract class with 2 implementations: Browser and Sub generator
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
504
diff
changeset
|
68 |
|
761
afbac76f54d3
fixed problem with different model in a generator and in the context
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
760
diff
changeset
|
69 |
selectedClasses := classes |
534
f89b11cd6fa5
CustomContext made as abstract class with 2 implementations: Browser and Sub generator
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
504
diff
changeset
|
70 |
|
f89b11cd6fa5
CustomContext made as abstract class with 2 implementations: Browser and Sub generator
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
504
diff
changeset
|
71 |
"Created: / 26-04-2014 / 16:05:34 / Jakub Nesveda <nesvejak@fit.cvut.cz>" |
746
a25dc307d4e8
Make CustomContext>>selectedClasses always return a collection of RBClass...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
72 |
"Modified: / 14-11-2014 / 19:26:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
761
afbac76f54d3
fixed problem with different model in a generator and in the context
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
760
diff
changeset
|
73 |
"Modified: / 25-11-2014 / 20:23:16 / Jakub Nesveda <nesvejak@fit.cvut.cz>" |
541
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
74 |
! |
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
75 |
|
629
e85070e8c11b
add code selection object (CustomSourceCodeSelection) with code, method, class... to CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
626
diff
changeset
|
76 |
selectedCodes: something |
766
1313153656d9
better documentation for setters in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
761
diff
changeset
|
77 |
"Sets the list of code selections - instances of CustomSourceCodeSelection" |
1313153656d9
better documentation for setters in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
761
diff
changeset
|
78 |
|
629
e85070e8c11b
add code selection object (CustomSourceCodeSelection) with code, method, class... to CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
626
diff
changeset
|
79 |
selectedCodes := something. |
626
a32e9bcc436e
work in progress on first refactoring
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
541
diff
changeset
|
80 |
|
629
e85070e8c11b
add code selection object (CustomSourceCodeSelection) with code, method, class... to CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
626
diff
changeset
|
81 |
"Created: / 18-08-2014 / 23:53:25 / Jakub Nesveda <nesvejak@fit.cvut.cz>" |
766
1313153656d9
better documentation for setters in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
761
diff
changeset
|
82 |
"Modified (comment): / 29-11-2014 / 18:33:46 / Jakub Nesveda <nesvejak@fit.cvut.cz>" |
626
a32e9bcc436e
work in progress on first refactoring
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
541
diff
changeset
|
83 |
! |
a32e9bcc436e
work in progress on first refactoring
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
541
diff
changeset
|
84 |
|
756
1dcd0b55815e
added convert to RBMethod when real methods are passed into CustomSubContext >> selectedMethods:
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
755
diff
changeset
|
85 |
selectedMethods: methods |
1dcd0b55815e
added convert to RBMethod when real methods are passed into CustomSubContext >> selectedMethods:
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
755
diff
changeset
|
86 |
"Sets the list of methods" |
1dcd0b55815e
added convert to RBMethod when real methods are passed into CustomSubContext >> selectedMethods:
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
755
diff
changeset
|
87 |
|
761
afbac76f54d3
fixed problem with different model in a generator and in the context
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
760
diff
changeset
|
88 |
selectedMethods := methods. |
756
1dcd0b55815e
added convert to RBMethod when real methods are passed into CustomSubContext >> selectedMethods:
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
755
diff
changeset
|
89 |
|
761
afbac76f54d3
fixed problem with different model in a generator and in the context
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
760
diff
changeset
|
90 |
"Modified: / 25-11-2014 / 20:27:14 / Jakub Nesveda <nesvejak@fit.cvut.cz>" |
541
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
91 |
! |
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
92 |
|
766
1313153656d9
better documentation for setters in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
761
diff
changeset
|
93 |
selectedPackages: packages |
1313153656d9
better documentation for setters in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
761
diff
changeset
|
94 |
"Sets the list of packages" |
1313153656d9
better documentation for setters in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
761
diff
changeset
|
95 |
|
1313153656d9
better documentation for setters in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
761
diff
changeset
|
96 |
selectedPackages := packages. |
1313153656d9
better documentation for setters in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
761
diff
changeset
|
97 |
|
1313153656d9
better documentation for setters in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
761
diff
changeset
|
98 |
"Modified (comment): / 29-11-2014 / 18:31:41 / Jakub Nesveda <nesvejak@fit.cvut.cz>" |
541
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
99 |
! |
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
100 |
|
766
1313153656d9
better documentation for setters in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
761
diff
changeset
|
101 |
selectedProtocols: protocols |
1313153656d9
better documentation for setters in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
761
diff
changeset
|
102 |
"Sets the list of method protocols (i.e. categories)" |
1313153656d9
better documentation for setters in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
761
diff
changeset
|
103 |
|
1313153656d9
better documentation for setters in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
761
diff
changeset
|
104 |
selectedProtocols := protocols. |
1313153656d9
better documentation for setters in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
761
diff
changeset
|
105 |
|
1313153656d9
better documentation for setters in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
761
diff
changeset
|
106 |
"Modified (comment): / 29-11-2014 / 18:34:52 / Jakub Nesveda <nesvejak@fit.cvut.cz>" |
718
ed7514e9d76c
rename selectedMethodProtocols to selecteProtocols in CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
681
diff
changeset
|
107 |
! |
ed7514e9d76c
rename selectedMethodProtocols to selecteProtocols in CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
681
diff
changeset
|
108 |
|
766
1313153656d9
better documentation for setters in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
761
diff
changeset
|
109 |
selectedVariables: variables |
1313153656d9
better documentation for setters in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
761
diff
changeset
|
110 |
"Sets the list of class variable names" |
1313153656d9
better documentation for setters in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
761
diff
changeset
|
111 |
|
1313153656d9
better documentation for setters in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
761
diff
changeset
|
112 |
selectedVariables := variables. |
1313153656d9
better documentation for setters in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
761
diff
changeset
|
113 |
|
1313153656d9
better documentation for setters in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
761
diff
changeset
|
114 |
"Modified (comment): / 29-11-2014 / 18:36:06 / Jakub Nesveda <nesvejak@fit.cvut.cz>" |
541
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
115 |
! ! |
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
116 |
|
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
117 |
!CustomSubContext methodsFor:'accessing-selection'! |
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
118 |
|
884
919f637c2be9
Added support to update browser's selection after code is generated.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
833
diff
changeset
|
119 |
selectClassNamed:className selector:selector |
919f637c2be9
Added support to update browser's selection after code is generated.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
833
diff
changeset
|
120 |
|
919f637c2be9
Added support to update browser's selection after code is generated.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
833
diff
changeset
|
121 |
"Modified: / 29-08-2015 / 13:22:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
919f637c2be9
Added support to update browser's selection after code is generated.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
833
diff
changeset
|
122 |
! |
919f637c2be9
Added support to update browser's selection after code is generated.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
833
diff
changeset
|
123 |
|
919f637c2be9
Added support to update browser's selection after code is generated.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
833
diff
changeset
|
124 |
selectClassesNamed:classNames |
919f637c2be9
Added support to update browser's selection after code is generated.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
833
diff
changeset
|
125 |
|
919f637c2be9
Added support to update browser's selection after code is generated.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
833
diff
changeset
|
126 |
"Modified: / 29-08-2015 / 13:22:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
919f637c2be9
Added support to update browser's selection after code is generated.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
833
diff
changeset
|
127 |
! |
919f637c2be9
Added support to update browser's selection after code is generated.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
833
diff
changeset
|
128 |
|
541
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
129 |
selectedClassCategories |
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
130 |
|
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
131 |
^ selectedClassCategories |
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
132 |
|
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
133 |
"Modified: / 05-05-2014 / 20:31:09 / Jakub Nesveda <nesvejak@fit.cvut.cz>" |
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
134 |
! |
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
135 |
|
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
136 |
selectedClasses |
761
afbac76f54d3
fixed problem with different model in a generator and in the context
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
760
diff
changeset
|
137 |
"Returns the list of classes" |
541
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
138 |
|
761
afbac76f54d3
fixed problem with different model in a generator and in the context
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
760
diff
changeset
|
139 |
"classes is supposed to be a collection of RBClass/RBMetaclass. However, if real classes |
afbac76f54d3
fixed problem with different model in a generator and in the context
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
760
diff
changeset
|
140 |
are passed, they are converted to RBClasses here for your convenience" |
afbac76f54d3
fixed problem with different model in a generator and in the context
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
760
diff
changeset
|
141 |
|
afbac76f54d3
fixed problem with different model in a generator and in the context
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
760
diff
changeset
|
142 |
^ selectedClasses ? #() collect: [ :class | |
afbac76f54d3
fixed problem with different model in a generator and in the context
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
760
diff
changeset
|
143 |
class isBehavior |
afbac76f54d3
fixed problem with different model in a generator and in the context
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
760
diff
changeset
|
144 |
ifTrue:[ self asRBClass: class ] |
afbac76f54d3
fixed problem with different model in a generator and in the context
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
760
diff
changeset
|
145 |
ifFalse:[ class ] |
afbac76f54d3
fixed problem with different model in a generator and in the context
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
760
diff
changeset
|
146 |
] |
541
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
147 |
|
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
148 |
"Created: / 19-12-2013 / 12:24:42 / Jakub Nesveda <nesvejak@fit.cvut.cz>" |
761
afbac76f54d3
fixed problem with different model in a generator and in the context
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
760
diff
changeset
|
149 |
"Modified (format): / 25-11-2014 / 20:24:46 / Jakub Nesveda <nesvejak@fit.cvut.cz>" |
541
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
150 |
! |
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
151 |
|
629
e85070e8c11b
add code selection object (CustomSourceCodeSelection) with code, method, class... to CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
626
diff
changeset
|
152 |
selectedCodes |
626
a32e9bcc436e
work in progress on first refactoring
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
541
diff
changeset
|
153 |
|
629
e85070e8c11b
add code selection object (CustomSourceCodeSelection) with code, method, class... to CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
626
diff
changeset
|
154 |
^ selectedCodes |
626
a32e9bcc436e
work in progress on first refactoring
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
541
diff
changeset
|
155 |
|
629
e85070e8c11b
add code selection object (CustomSourceCodeSelection) with code, method, class... to CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
626
diff
changeset
|
156 |
"Created: / 18-08-2014 / 23:52:48 / Jakub Nesveda <nesvejak@fit.cvut.cz>" |
626
a32e9bcc436e
work in progress on first refactoring
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
541
diff
changeset
|
157 |
! |
a32e9bcc436e
work in progress on first refactoring
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
541
diff
changeset
|
158 |
|
541
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
159 |
selectedMethods |
761
afbac76f54d3
fixed problem with different model in a generator and in the context
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
760
diff
changeset
|
160 |
"Returns the list of methods" |
541
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
161 |
|
761
afbac76f54d3
fixed problem with different model in a generator and in the context
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
760
diff
changeset
|
162 |
"methods is supposed to be a collection of RBMethod. However, if real methods (Method) |
afbac76f54d3
fixed problem with different model in a generator and in the context
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
760
diff
changeset
|
163 |
are passed, they are converted to RBMethod here for your convenience" |
541
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
164 |
|
761
afbac76f54d3
fixed problem with different model in a generator and in the context
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
760
diff
changeset
|
165 |
^ selectedMethods ? #() collect: [ :method | |
afbac76f54d3
fixed problem with different model in a generator and in the context
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
760
diff
changeset
|
166 |
method isMethod |
afbac76f54d3
fixed problem with different model in a generator and in the context
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
760
diff
changeset
|
167 |
ifTrue:[ self asRBMethod: method ] |
afbac76f54d3
fixed problem with different model in a generator and in the context
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
760
diff
changeset
|
168 |
ifFalse:[ method ] |
afbac76f54d3
fixed problem with different model in a generator and in the context
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
760
diff
changeset
|
169 |
] |
afbac76f54d3
fixed problem with different model in a generator and in the context
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
760
diff
changeset
|
170 |
|
afbac76f54d3
fixed problem with different model in a generator and in the context
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
760
diff
changeset
|
171 |
"Modified (comment): / 25-11-2014 / 20:26:31 / Jakub Nesveda <nesvejak@fit.cvut.cz>" |
541
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
172 |
! |
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
173 |
|
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
174 |
selectedPackages |
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
175 |
|
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
176 |
^ selectedPackages |
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
177 |
|
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
178 |
"Modified: / 05-05-2014 / 20:32:13 / Jakub Nesveda <nesvejak@fit.cvut.cz>" |
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
179 |
! |
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
180 |
|
718
ed7514e9d76c
rename selectedMethodProtocols to selecteProtocols in CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
681
diff
changeset
|
181 |
selectedProtocols |
ed7514e9d76c
rename selectedMethodProtocols to selecteProtocols in CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
681
diff
changeset
|
182 |
^ selectedProtocols |
ed7514e9d76c
rename selectedMethodProtocols to selecteProtocols in CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
681
diff
changeset
|
183 |
|
ed7514e9d76c
rename selectedMethodProtocols to selecteProtocols in CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
681
diff
changeset
|
184 |
"Modified: / 05-05-2014 / 20:31:35 / Jakub Nesveda <nesvejak@fit.cvut.cz>" |
ed7514e9d76c
rename selectedMethodProtocols to selecteProtocols in CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
681
diff
changeset
|
185 |
! |
ed7514e9d76c
rename selectedMethodProtocols to selecteProtocols in CustomContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
681
diff
changeset
|
186 |
|
541
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
187 |
selectedVariables |
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
188 |
|
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
189 |
^ selectedVariables |
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
190 |
|
fb9cae8a5221
Add methods below to CustomContext, implement them in CustomSubContext
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
534
diff
changeset
|
191 |
"Modified: / 05-05-2014 / 20:32:31 / Jakub Nesveda <nesvejak@fit.cvut.cz>" |
504
3525d97ae194
- added interface canGenerate, generate to CustomCodeGenrator with context object instead of a class
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff
changeset
|
192 |
! ! |
3525d97ae194
- added interface canGenerate, generate to CustomCodeGenrator with context object instead of a class
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff
changeset
|
193 |
|
534
f89b11cd6fa5
CustomContext made as abstract class with 2 implementations: Browser and Sub generator
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
504
diff
changeset
|
194 |
!CustomSubContext methodsFor:'initialization'! |
504
3525d97ae194
- added interface canGenerate, generate to CustomCodeGenrator with context object instead of a class
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff
changeset
|
195 |
|
3525d97ae194
- added interface canGenerate, generate to CustomCodeGenrator with context object instead of a class
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff
changeset
|
196 |
initialize |
755
37d50424e347
tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
746
diff
changeset
|
197 |
|
37d50424e347
tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
746
diff
changeset
|
198 |
super initialize. |
504
3525d97ae194
- added interface canGenerate, generate to CustomCodeGenrator with context object instead of a class
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff
changeset
|
199 |
selectedClasses := OrderedCollection new. |
3525d97ae194
- added interface canGenerate, generate to CustomCodeGenrator with context object instead of a class
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff
changeset
|
200 |
|
3525d97ae194
- added interface canGenerate, generate to CustomCodeGenrator with context object instead of a class
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff
changeset
|
201 |
"Created: / 19-12-2013 / 12:37:44 / Jakub Nesveda <nesvejak@fit.cvut.cz>" |
755
37d50424e347
tests fixes - global instance of RBNamespace for creating RBClass holds old data when the global system namespace changes its state - in this case it is old real class instance
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
746
diff
changeset
|
202 |
"Modified: / 19-11-2014 / 10:19:21 / Jakub Nesveda <nesvejak@fit.cvut.cz>" |
504
3525d97ae194
- added interface canGenerate, generate to CustomCodeGenrator with context object instead of a class
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff
changeset
|
203 |
! ! |
3525d97ae194
- added interface canGenerate, generate to CustomCodeGenrator with context object instead of a class
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
diff
changeset
|
204 |
|
672
f05a98383324
merge CustomCodeGeneratorOrRefactoring with CustomCodeGeneratorOrRefactoringBase
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
629
diff
changeset
|
205 |
!CustomSubContext class methodsFor:'documentation'! |
f05a98383324
merge CustomCodeGeneratorOrRefactoring with CustomCodeGeneratorOrRefactoringBase
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
629
diff
changeset
|
206 |
|
f05a98383324
merge CustomCodeGeneratorOrRefactoring with CustomCodeGeneratorOrRefactoringBase
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
629
diff
changeset
|
207 |
version_HG |
f05a98383324
merge CustomCodeGeneratorOrRefactoring with CustomCodeGeneratorOrRefactoringBase
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
629
diff
changeset
|
208 |
|
f05a98383324
merge CustomCodeGeneratorOrRefactoring with CustomCodeGeneratorOrRefactoringBase
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
629
diff
changeset
|
209 |
^ '$Changeset: <not expanded> $' |
f05a98383324
merge CustomCodeGeneratorOrRefactoring with CustomCodeGeneratorOrRefactoringBase
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
629
diff
changeset
|
210 |
! ! |
f05a98383324
merge CustomCodeGeneratorOrRefactoring with CustomCodeGeneratorOrRefactoringBase
Jakub Nesveda <jakubnesveda@seznam.cz>
parents:
629
diff
changeset
|
211 |