resin 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/amber/css/amber-normalize.css +73 -73
- data/amber/css/amber-normalize.less +1 -1
- data/amber/css/amber.css +106 -106
- data/amber/css/helios.css +242 -0
- data/amber/images/hsplitter.png +0 -0
- data/amber/images/vsplitter.png +0 -0
- data/amber/js/Benchfib.deploy.js +116 -38
- data/amber/js/Benchfib.js +120 -42
- data/amber/js/Canvas.deploy.js +674 -403
- data/amber/js/Canvas.js +682 -411
- data/amber/js/Compiler-AST.deploy.js +1150 -0
- data/amber/js/Compiler-AST.js +1591 -0
- data/amber/js/Compiler-Core.deploy.js +1562 -0
- data/amber/js/Compiler-Core.js +1972 -0
- data/amber/js/Compiler-Exceptions.deploy.js +114 -0
- data/amber/js/Compiler-Exceptions.js +161 -0
- data/amber/js/Compiler-IR.deploy.js +2326 -0
- data/amber/js/Compiler-IR.js +3146 -0
- data/amber/js/Compiler-Inlining.deploy.js +1147 -0
- data/amber/js/Compiler-Inlining.js +1514 -0
- data/amber/js/Compiler-Semantic.deploy.js +1207 -0
- data/amber/js/Compiler-Semantic.js +1628 -0
- data/amber/js/Compiler-Tests.deploy.js +646 -60
- data/amber/js/Compiler-Tests.js +843 -82
- data/amber/js/Compiler.deploy.js +1097 -159
- data/amber/js/Compiler.js +1414 -161
- data/amber/js/Examples.deploy.js +31 -15
- data/amber/js/Examples.js +33 -17
- data/amber/js/Helios-Announcements.deploy.js +127 -0
- data/amber/js/Helios-Announcements.js +157 -0
- data/amber/js/Helios-Browser.deploy.js +1473 -0
- data/amber/js/Helios-Browser.js +1953 -0
- data/amber/js/Helios-Commands.deploy.js +403 -0
- data/amber/js/Helios-Commands.js +563 -0
- data/amber/js/Helios-Core.deploy.js +1070 -0
- data/amber/js/Helios-Core.js +1445 -0
- data/amber/js/Helios-Environments.deploy.js +132 -0
- data/amber/js/Helios-Environments.js +179 -0
- data/amber/js/Helios-Inspector.deploy.js +855 -0
- data/amber/js/Helios-Inspector.js +1155 -0
- data/amber/js/Helios-KeyBindings.deploy.js +753 -0
- data/amber/js/Helios-KeyBindings.js +1023 -0
- data/amber/js/Helios-Layout.deploy.js +383 -0
- data/amber/js/Helios-Layout.js +523 -0
- data/amber/js/Helios-Workspace.deploy.js +799 -0
- data/amber/js/Helios-Workspace.js +1074 -0
- data/amber/js/IDE.deploy.js +2541 -1490
- data/amber/js/IDE.js +2721 -1660
- data/amber/js/Importer-Exporter.deploy.js +671 -0
- data/amber/js/Importer-Exporter.js +816 -0
- data/amber/js/Kernel-Announcements.deploy.js +137 -20
- data/amber/js/Kernel-Announcements.js +176 -22
- data/amber/js/Kernel-Classes.deploy.js +555 -168
- data/amber/js/Kernel-Classes.js +662 -205
- data/amber/js/Kernel-Collections.deploy.js +1403 -618
- data/amber/js/Kernel-Collections.js +1545 -690
- data/amber/js/Kernel-Exceptions.deploy.js +109 -45
- data/amber/js/Kernel-Exceptions.js +123 -49
- data/amber/js/Kernel-Methods.deploy.js +196 -81
- data/amber/js/Kernel-Methods.js +214 -89
- data/amber/js/Kernel-Objects.deploy.js +1542 -1117
- data/amber/js/Kernel-Objects.js +1593 -1148
- data/amber/js/Kernel-Tests.deploy.js +1725 -772
- data/amber/js/Kernel-Tests.js +2301 -1123
- data/amber/js/Kernel-Transcript.deploy.js +23 -25
- data/amber/js/Kernel-Transcript.js +24 -26
- data/amber/js/SUnit.deploy.js +204 -131
- data/amber/js/SUnit.js +222 -139
- data/amber/js/Spaces.deploy.js +240 -0
- data/amber/js/Spaces.js +326 -0
- data/amber/js/amber.js +26 -7
- data/amber/js/boot.js +65 -47
- data/amber/js/init.js +1 -1
- data/amber/js/lib/CodeMirror/amber.css +21 -21
- data/amber/js/lib/CodeMirror/codemirror.css +119 -13
- data/amber/js/lib/CodeMirror/codemirror.js +2219 -1220
- data/amber/js/lib/CodeMirror/smalltalk.js +134 -129
- data/amber/js/lib/bootstrap/css/bootstrap.css +5837 -0
- data/amber/js/lib/bootstrap/css/bootstrap.min.css +841 -0
- data/amber/js/lib/bootstrap/img/glyphicons-halflings-white.png +0 -0
- data/amber/js/lib/bootstrap/img/glyphicons-halflings.png +0 -0
- data/amber/js/lib/bootstrap/js/bootstrap.js +2038 -0
- data/amber/js/lib/bootstrap/js/bootstrap.min.js +7 -0
- data/amber/js/lib/jQuery/jquery-1.8.2.min.js +2 -0
- data/amber/js/lib/jQuery/jquery-ui-1.8.24.custom.min.js +125 -0
- data/amber/st/Compiler-AST.st +505 -0
- data/amber/st/Compiler-Core.st +835 -0
- data/amber/st/Compiler-Exceptions.st +87 -0
- data/amber/st/Compiler-IR.st +1097 -0
- data/amber/st/Compiler-Inlining.st +650 -0
- data/amber/st/Compiler-Semantic.st +558 -0
- data/amber/st/Compiler-Tests.st +285 -381
- data/amber/st/Compiler.st +725 -2
- data/amber/st/Helios-Announcements.st +104 -0
- data/amber/st/Helios-Browser.st +708 -0
- data/amber/st/Helios-Commands.st +223 -0
- data/amber/st/Helios-Core.st +532 -0
- data/amber/st/Helios-Environments.st +98 -0
- data/amber/st/Helios-Inspector.st +367 -0
- data/amber/st/Helios-KeyBindings.st +337 -0
- data/amber/st/Helios-Layout.st +199 -0
- data/amber/st/Helios-Workspace.st +367 -0
- data/amber/st/IDE.st +75 -53
- data/amber/st/Importer-Exporter.st +386 -0
- data/amber/st/Kernel-Announcements.st +92 -0
- data/amber/st/Kernel-Classes.st +137 -15
- data/amber/st/Kernel-Collections.st +137 -47
- data/amber/st/Kernel-Exceptions.st +14 -0
- data/amber/st/Kernel-Methods.st +9 -1
- data/amber/st/Kernel-Objects.st +29 -5
- data/amber/st/Kernel-Tests.st +545 -199
- data/amber/st/SUnit.st +10 -0
- data/amber/st/Spaces.st +142 -0
- data/lib/resin/app.rb +1 -1
- metadata +86 -31
- data/amber/js/lib/jQuery/jquery-1.4.4.min.js +0 -167
- data/amber/js/lib/jQuery/jquery-1.6.4.min.js +0 -4
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
Smalltalk current createPackage: 'Helios-Workspace' properties: #{}!
|
|
2
|
+
Object subclass: #HLCodeModel
|
|
3
|
+
instanceVariableNames: 'announcer environment receiver'
|
|
4
|
+
package: 'Helios-Workspace'!
|
|
5
|
+
|
|
6
|
+
!HLCodeModel methodsFor: 'accessing'!
|
|
7
|
+
|
|
8
|
+
announcer
|
|
9
|
+
^ announcer ifNil: [ announcer := Announcer new ]
|
|
10
|
+
!
|
|
11
|
+
|
|
12
|
+
environment
|
|
13
|
+
^ environment ifNil: [ HLManager current environment ]
|
|
14
|
+
!
|
|
15
|
+
|
|
16
|
+
environment: anEnvironment
|
|
17
|
+
environment := anEnvironment
|
|
18
|
+
!
|
|
19
|
+
|
|
20
|
+
receiver
|
|
21
|
+
^ receiver ifNil: [ receiver := self defaultReceiver ]
|
|
22
|
+
!
|
|
23
|
+
|
|
24
|
+
receiver: anObject
|
|
25
|
+
receiver := anObject
|
|
26
|
+
! !
|
|
27
|
+
|
|
28
|
+
!HLCodeModel methodsFor: 'actions'!
|
|
29
|
+
|
|
30
|
+
doIt: someCode
|
|
31
|
+
|
|
32
|
+
^ self environment eval: someCode on: self receiver
|
|
33
|
+
!
|
|
34
|
+
|
|
35
|
+
subscribe: aWidget
|
|
36
|
+
aWidget subscribeTo: self announcer
|
|
37
|
+
! !
|
|
38
|
+
|
|
39
|
+
!HLCodeModel methodsFor: 'defaults'!
|
|
40
|
+
|
|
41
|
+
defaultReceiver
|
|
42
|
+
^ DoIt new
|
|
43
|
+
! !
|
|
44
|
+
|
|
45
|
+
!HLCodeModel class methodsFor: 'actions'!
|
|
46
|
+
|
|
47
|
+
on: anEnvironment
|
|
48
|
+
|
|
49
|
+
^ self new
|
|
50
|
+
environment: anEnvironment;
|
|
51
|
+
yourself
|
|
52
|
+
! !
|
|
53
|
+
|
|
54
|
+
HLWidget subclass: #HLCodeWidget
|
|
55
|
+
instanceVariableNames: 'model wrapper code editor'
|
|
56
|
+
package: 'Helios-Workspace'!
|
|
57
|
+
|
|
58
|
+
!HLCodeWidget methodsFor: 'accessing'!
|
|
59
|
+
|
|
60
|
+
announcer
|
|
61
|
+
^ self model announcer
|
|
62
|
+
!
|
|
63
|
+
|
|
64
|
+
contents
|
|
65
|
+
^ editor getValue
|
|
66
|
+
!
|
|
67
|
+
|
|
68
|
+
contents: aString
|
|
69
|
+
editor setValue: aString
|
|
70
|
+
!
|
|
71
|
+
|
|
72
|
+
currentLine
|
|
73
|
+
^editor getLine: (editor getCursor line)
|
|
74
|
+
!
|
|
75
|
+
|
|
76
|
+
currentLineOrSelection
|
|
77
|
+
^editor somethingSelected
|
|
78
|
+
ifFalse: [self currentLine]
|
|
79
|
+
ifTrue: [self selection]
|
|
80
|
+
!
|
|
81
|
+
|
|
82
|
+
model
|
|
83
|
+
^ model ifNil: [
|
|
84
|
+
self model: HLCodeModel new.
|
|
85
|
+
model ]
|
|
86
|
+
!
|
|
87
|
+
|
|
88
|
+
model: aModel
|
|
89
|
+
model := aModel
|
|
90
|
+
!
|
|
91
|
+
|
|
92
|
+
receiver
|
|
93
|
+
^ self model receiver
|
|
94
|
+
!
|
|
95
|
+
|
|
96
|
+
receiver: anObject
|
|
97
|
+
self model receiver: anObject
|
|
98
|
+
!
|
|
99
|
+
|
|
100
|
+
selection
|
|
101
|
+
^editor getSelection
|
|
102
|
+
!
|
|
103
|
+
|
|
104
|
+
selectionEnd
|
|
105
|
+
^code element selectionEnd
|
|
106
|
+
!
|
|
107
|
+
|
|
108
|
+
selectionEnd: anInteger
|
|
109
|
+
code element selectionEnd: anInteger
|
|
110
|
+
!
|
|
111
|
+
|
|
112
|
+
selectionStart
|
|
113
|
+
^code element selectionStart
|
|
114
|
+
!
|
|
115
|
+
|
|
116
|
+
selectionStart: anInteger
|
|
117
|
+
code element selectionStart: anInteger
|
|
118
|
+
! !
|
|
119
|
+
|
|
120
|
+
!HLCodeWidget methodsFor: 'actions'!
|
|
121
|
+
|
|
122
|
+
clear
|
|
123
|
+
self contents: ''
|
|
124
|
+
!
|
|
125
|
+
|
|
126
|
+
doIt
|
|
127
|
+
| result |
|
|
128
|
+
|
|
129
|
+
self announcer announce: (HLDoItRequested on: model).
|
|
130
|
+
|
|
131
|
+
result:= model doIt: self currentLineOrSelection.
|
|
132
|
+
|
|
133
|
+
self announcer announce: (HLDoItExecuted on: model).
|
|
134
|
+
|
|
135
|
+
^ result
|
|
136
|
+
!
|
|
137
|
+
|
|
138
|
+
editor
|
|
139
|
+
^editor
|
|
140
|
+
!
|
|
141
|
+
|
|
142
|
+
focus
|
|
143
|
+
self editor focus
|
|
144
|
+
!
|
|
145
|
+
|
|
146
|
+
inspectIt
|
|
147
|
+
|
|
148
|
+
| newInspector |
|
|
149
|
+
|
|
150
|
+
self announcer announce: (HLInspectItRequested on: model).
|
|
151
|
+
newInspector := self makeInspectorOn: self doIt.
|
|
152
|
+
newInspector open
|
|
153
|
+
!
|
|
154
|
+
|
|
155
|
+
makeInspectorOn: anObject
|
|
156
|
+
|
|
157
|
+
^ HLInspector new
|
|
158
|
+
inspect: anObject;
|
|
159
|
+
yourself
|
|
160
|
+
!
|
|
161
|
+
|
|
162
|
+
observeWrapper
|
|
163
|
+
|
|
164
|
+
wrapper onKeyDown: [ :e | self onKeyDown: e ]
|
|
165
|
+
!
|
|
166
|
+
|
|
167
|
+
print: aString
|
|
168
|
+
| start stop |
|
|
169
|
+
start := HashedCollection new.
|
|
170
|
+
stop := HashedCollection new.
|
|
171
|
+
start at: 'line' put: (editor getCursor: false) line.
|
|
172
|
+
start at: 'ch' put: (editor getCursor: false) ch.
|
|
173
|
+
stop at: 'line' put: (start at: 'line').
|
|
174
|
+
stop at: 'ch' put: ((start at: 'ch') + aString size + 2).
|
|
175
|
+
editor replaceSelection: (editor getSelection, ' ', aString, ' ').
|
|
176
|
+
editor setCursor: (editor getCursor: true).
|
|
177
|
+
editor setSelection: stop end: start
|
|
178
|
+
!
|
|
179
|
+
|
|
180
|
+
printIt
|
|
181
|
+
|
|
182
|
+
| result |
|
|
183
|
+
|
|
184
|
+
result:= self doIt.
|
|
185
|
+
|
|
186
|
+
self announcer announce: (HLPrintItRequested on: model).
|
|
187
|
+
|
|
188
|
+
self print: result printString.
|
|
189
|
+
self focus.
|
|
190
|
+
!
|
|
191
|
+
|
|
192
|
+
setEditorOn: aTextarea
|
|
193
|
+
<self['@editor'] = CodeMirror.fromTextArea(aTextarea, {
|
|
194
|
+
theme: 'amber',
|
|
195
|
+
lineNumbers: true,
|
|
196
|
+
enterMode: 'flat',
|
|
197
|
+
matchBrackets: true,
|
|
198
|
+
electricChars: false
|
|
199
|
+
})>
|
|
200
|
+
! !
|
|
201
|
+
|
|
202
|
+
!HLCodeWidget methodsFor: 'reactions'!
|
|
203
|
+
|
|
204
|
+
onDoIt
|
|
205
|
+
|
|
206
|
+
self doIt
|
|
207
|
+
!
|
|
208
|
+
|
|
209
|
+
onInspectIt
|
|
210
|
+
|
|
211
|
+
self inspectIt
|
|
212
|
+
!
|
|
213
|
+
|
|
214
|
+
onKeyDown: anEvent
|
|
215
|
+
|
|
216
|
+
<if(anEvent.ctrlKey) {
|
|
217
|
+
if(anEvent.keyCode === 80) { //ctrl+p
|
|
218
|
+
self._onPrintIt();
|
|
219
|
+
anEvent.preventDefault();
|
|
220
|
+
return false;
|
|
221
|
+
}
|
|
222
|
+
if(anEvent.keyCode === 68) { //ctrl+d
|
|
223
|
+
self._onDoIt();
|
|
224
|
+
anEvent.preventDefault();
|
|
225
|
+
return false;
|
|
226
|
+
}
|
|
227
|
+
if(anEvent.keyCode === 73) { //ctrl+i
|
|
228
|
+
self._onInspectIt();
|
|
229
|
+
anEvent.preventDefault();
|
|
230
|
+
return false;
|
|
231
|
+
}
|
|
232
|
+
}>
|
|
233
|
+
!
|
|
234
|
+
|
|
235
|
+
onPrintIt
|
|
236
|
+
|
|
237
|
+
self printIt
|
|
238
|
+
! !
|
|
239
|
+
|
|
240
|
+
!HLCodeWidget methodsFor: 'rendering'!
|
|
241
|
+
|
|
242
|
+
renderContentOn: html
|
|
243
|
+
code := html textarea.
|
|
244
|
+
self setEditorOn: code element.
|
|
245
|
+
|
|
246
|
+
self observeWrapper
|
|
247
|
+
! !
|
|
248
|
+
|
|
249
|
+
HLWidget subclass: #HLWorkspace
|
|
250
|
+
instanceVariableNames: 'model codeWidget'
|
|
251
|
+
package: 'Helios-Workspace'!
|
|
252
|
+
|
|
253
|
+
!HLWorkspace methodsFor: 'accessing'!
|
|
254
|
+
|
|
255
|
+
codeWidget
|
|
256
|
+
^ codeWidget ifNil: [
|
|
257
|
+
codeWidget := HLCodeWidget new
|
|
258
|
+
model: self model code;
|
|
259
|
+
yourself ]
|
|
260
|
+
!
|
|
261
|
+
|
|
262
|
+
model
|
|
263
|
+
^ model ifNil: [
|
|
264
|
+
self model: HLWorkspaceModel new.
|
|
265
|
+
model ]
|
|
266
|
+
!
|
|
267
|
+
|
|
268
|
+
model: aModel
|
|
269
|
+
model := aModel.
|
|
270
|
+
|
|
271
|
+
self codeWidget model: aModel code.
|
|
272
|
+
self observeCodeWidget.
|
|
273
|
+
! !
|
|
274
|
+
|
|
275
|
+
!HLWorkspace methodsFor: 'actions'!
|
|
276
|
+
|
|
277
|
+
observeCodeWidget
|
|
278
|
+
! !
|
|
279
|
+
|
|
280
|
+
!HLWorkspace methodsFor: 'reactions'!
|
|
281
|
+
|
|
282
|
+
onDoIt
|
|
283
|
+
!
|
|
284
|
+
|
|
285
|
+
onInspectIt
|
|
286
|
+
!
|
|
287
|
+
|
|
288
|
+
onPrintIt
|
|
289
|
+
! !
|
|
290
|
+
|
|
291
|
+
!HLWorkspace methodsFor: 'rendering'!
|
|
292
|
+
|
|
293
|
+
renderContentOn: html
|
|
294
|
+
html with: self codeWidget
|
|
295
|
+
! !
|
|
296
|
+
|
|
297
|
+
!HLWorkspace class methodsFor: 'accessing'!
|
|
298
|
+
|
|
299
|
+
tabLabel
|
|
300
|
+
^ 'Workspace'
|
|
301
|
+
!
|
|
302
|
+
|
|
303
|
+
tabPriority
|
|
304
|
+
^ 10
|
|
305
|
+
! !
|
|
306
|
+
|
|
307
|
+
!HLWorkspace class methodsFor: 'testing'!
|
|
308
|
+
|
|
309
|
+
canBeOpenAsTab
|
|
310
|
+
^ true
|
|
311
|
+
! !
|
|
312
|
+
|
|
313
|
+
Object subclass: #HLWorkspaceModel
|
|
314
|
+
instanceVariableNames: 'announcer environment code'
|
|
315
|
+
package: 'Helios-Workspace'!
|
|
316
|
+
|
|
317
|
+
!HLWorkspaceModel methodsFor: 'accessing'!
|
|
318
|
+
|
|
319
|
+
announcer
|
|
320
|
+
^ announcer ifNil: [ announcer := Announcer new ]
|
|
321
|
+
!
|
|
322
|
+
|
|
323
|
+
code
|
|
324
|
+
"Answers the code model working for this workspace model"
|
|
325
|
+
^ code ifNil:[ HLCodeModel on: self environment ]
|
|
326
|
+
!
|
|
327
|
+
|
|
328
|
+
environment
|
|
329
|
+
^ environment ifNil: [ HLManager current environment ]
|
|
330
|
+
!
|
|
331
|
+
|
|
332
|
+
environment: anEnvironment
|
|
333
|
+
environment := anEnvironment
|
|
334
|
+
! !
|
|
335
|
+
|
|
336
|
+
!HLWorkspaceModel methodsFor: 'reactions'!
|
|
337
|
+
|
|
338
|
+
onKeyDown: anEvent
|
|
339
|
+
|
|
340
|
+
<if(anEvent.ctrlKey) {
|
|
341
|
+
if(anEvent.keyCode === 80) { //ctrl+p
|
|
342
|
+
self._printIt();
|
|
343
|
+
anEvent.preventDefault();
|
|
344
|
+
return false;
|
|
345
|
+
}
|
|
346
|
+
if(anEvent.keyCode === 68) { //ctrl+d
|
|
347
|
+
self._doIt();
|
|
348
|
+
anEvent.preventDefault();
|
|
349
|
+
return false;
|
|
350
|
+
}
|
|
351
|
+
if(anEvent.keyCode === 73) { //ctrl+i
|
|
352
|
+
self._inspectIt();
|
|
353
|
+
anEvent.preventDefault();
|
|
354
|
+
return false;
|
|
355
|
+
}
|
|
356
|
+
}>
|
|
357
|
+
! !
|
|
358
|
+
|
|
359
|
+
!HLWorkspaceModel class methodsFor: 'actions'!
|
|
360
|
+
|
|
361
|
+
on: anEnvironment
|
|
362
|
+
|
|
363
|
+
^ self new
|
|
364
|
+
environment: anEnvironment;
|
|
365
|
+
yourself
|
|
366
|
+
! !
|
|
367
|
+
|
data/amber/st/IDE.st
CHANGED
|
@@ -43,7 +43,7 @@ resetNodes
|
|
|
43
43
|
|
|
44
44
|
renderOn: html
|
|
45
45
|
ul := html ul
|
|
46
|
-
class: '
|
|
46
|
+
class: 'amber_column browser classes';
|
|
47
47
|
yourself.
|
|
48
48
|
self updateNodes
|
|
49
49
|
!
|
|
@@ -226,7 +226,7 @@ selectionStart: anInteger
|
|
|
226
226
|
|
|
227
227
|
setEditorOn: aTextarea
|
|
228
228
|
<self['@editor'] = CodeMirror.fromTextArea(aTextarea, {
|
|
229
|
-
theme: '
|
|
229
|
+
theme: 'amber',
|
|
230
230
|
lineNumbers: true,
|
|
231
231
|
enterMode: 'flat',
|
|
232
232
|
matchBrackets: true,
|
|
@@ -267,6 +267,10 @@ fileIn
|
|
|
267
267
|
Importer new import: self currentLineOrSelection readStream
|
|
268
268
|
!
|
|
269
269
|
|
|
270
|
+
focus
|
|
271
|
+
self editor focus.
|
|
272
|
+
!
|
|
273
|
+
|
|
270
274
|
handleKeyDown: anEvent
|
|
271
275
|
<if(anEvent.ctrlKey) {
|
|
272
276
|
if(anEvent.keyCode === 80) { //ctrl+p
|
|
@@ -305,7 +309,8 @@ print: aString
|
|
|
305
309
|
!
|
|
306
310
|
|
|
307
311
|
printIt
|
|
308
|
-
self print: self doIt printString
|
|
312
|
+
self print: self doIt printString.
|
|
313
|
+
self focus.
|
|
309
314
|
! !
|
|
310
315
|
|
|
311
316
|
!SourceArea methodsFor: 'events'!
|
|
@@ -351,11 +356,11 @@ tabs
|
|
|
351
356
|
|
|
352
357
|
close
|
|
353
358
|
opened ifTrue: [
|
|
354
|
-
'#
|
|
359
|
+
'#amber' asJQuery hide.
|
|
355
360
|
ul asJQuery hide.
|
|
356
361
|
selectedTab hide.
|
|
357
362
|
self removeBodyMargin.
|
|
358
|
-
'body' asJQuery removeClass: '
|
|
363
|
+
'body' asJQuery removeClass: 'amberBody'.
|
|
359
364
|
opened := false]
|
|
360
365
|
!
|
|
361
366
|
|
|
@@ -371,7 +376,7 @@ newBrowserTab
|
|
|
371
376
|
!
|
|
372
377
|
|
|
373
378
|
onResize: aBlock
|
|
374
|
-
<jQuery('#
|
|
379
|
+
<jQuery('#amber').resizable({
|
|
375
380
|
handles: 'n',
|
|
376
381
|
resize: aBlock,
|
|
377
382
|
minHeight: 230
|
|
@@ -384,8 +389,8 @@ onWindowResize: aBlock
|
|
|
384
389
|
|
|
385
390
|
open
|
|
386
391
|
opened ifFalse: [
|
|
387
|
-
'body' asJQuery addClass: '
|
|
388
|
-
'#
|
|
392
|
+
'body' asJQuery addClass: 'amberBody'.
|
|
393
|
+
'#amber' asJQuery show.
|
|
389
394
|
ul asJQuery show.
|
|
390
395
|
self updateBodyMargin.
|
|
391
396
|
selectedTab show.
|
|
@@ -415,22 +420,22 @@ selectTab: aWidget
|
|
|
415
420
|
!
|
|
416
421
|
|
|
417
422
|
setBodyMargin: anInteger
|
|
418
|
-
'.
|
|
423
|
+
'.amberBody' asJQuery css: 'margin-bottom' put: anInteger asString, 'px'
|
|
419
424
|
!
|
|
420
425
|
|
|
421
426
|
updateBodyMargin
|
|
422
|
-
self setBodyMargin: '#
|
|
427
|
+
self setBodyMargin: '#amber' asJQuery height
|
|
423
428
|
!
|
|
424
429
|
|
|
425
430
|
updatePosition
|
|
426
|
-
<jQuery('#
|
|
431
|
+
<jQuery('#amber').css('top', '').css('bottom', '0px')>
|
|
427
432
|
! !
|
|
428
433
|
|
|
429
434
|
!TabManager methodsFor: 'adding/Removing'!
|
|
430
435
|
|
|
431
436
|
addTab: aWidget
|
|
432
437
|
self tabs add: aWidget.
|
|
433
|
-
aWidget appendToJQuery: '#
|
|
438
|
+
aWidget appendToJQuery: '#amber' asJQuery.
|
|
434
439
|
aWidget hide
|
|
435
440
|
!
|
|
436
441
|
|
|
@@ -444,10 +449,10 @@ removeTab: aWidget
|
|
|
444
449
|
initialize
|
|
445
450
|
super initialize.
|
|
446
451
|
opened := true.
|
|
447
|
-
[:html | html div id: '
|
|
452
|
+
[:html | html div id: 'amber'] appendToJQuery: 'body' asJQuery.
|
|
448
453
|
'body' asJQuery
|
|
449
|
-
addClass: '
|
|
450
|
-
self appendToJQuery: '#
|
|
454
|
+
addClass: 'amberBody'.
|
|
455
|
+
self appendToJQuery: '#amber' asJQuery.
|
|
451
456
|
self
|
|
452
457
|
addTab: IDETranscript current;
|
|
453
458
|
addTab: Workspace new;
|
|
@@ -464,7 +469,7 @@ renderOn: html
|
|
|
464
469
|
html div id: 'logo'.
|
|
465
470
|
self renderToolbarOn: html.
|
|
466
471
|
ul := html ul
|
|
467
|
-
id: '
|
|
472
|
+
id: 'amberTabs';
|
|
468
473
|
yourself.
|
|
469
474
|
self renderTabs
|
|
470
475
|
!
|
|
@@ -504,7 +509,7 @@ renderTabs
|
|
|
504
509
|
|
|
505
510
|
renderToolbarOn: html
|
|
506
511
|
html div
|
|
507
|
-
id: '
|
|
512
|
+
id: 'amber_toolbar';
|
|
508
513
|
with: [
|
|
509
514
|
input := html input
|
|
510
515
|
class: 'implementors';
|
|
@@ -512,7 +517,7 @@ renderToolbarOn: html
|
|
|
512
517
|
input onKeyPress: [:event |
|
|
513
518
|
event keyCode = 13 ifTrue: [
|
|
514
519
|
self search: input asJQuery val]].
|
|
515
|
-
html div id: '
|
|
520
|
+
html div id: 'amber_close'; onClick: [self close]]
|
|
516
521
|
! !
|
|
517
522
|
|
|
518
523
|
!TabManager methodsFor: 'updating'!
|
|
@@ -576,7 +581,7 @@ renderButtonsOn: html
|
|
|
576
581
|
|
|
577
582
|
renderOn: html
|
|
578
583
|
div := html div
|
|
579
|
-
class: '
|
|
584
|
+
class: 'amberTool';
|
|
580
585
|
yourself.
|
|
581
586
|
self renderTab
|
|
582
587
|
!
|
|
@@ -584,10 +589,10 @@ renderOn: html
|
|
|
584
589
|
renderTab
|
|
585
590
|
div contents: [:html |
|
|
586
591
|
html div
|
|
587
|
-
class: '
|
|
592
|
+
class: 'amber_box';
|
|
588
593
|
with: [self renderBoxOn: html].
|
|
589
594
|
html div
|
|
590
|
-
class: '
|
|
595
|
+
class: 'amber_buttons';
|
|
591
596
|
with: [self renderButtonsOn: html]]
|
|
592
597
|
!
|
|
593
598
|
|
|
@@ -797,7 +802,9 @@ commitPackage
|
|
|
797
802
|
!
|
|
798
803
|
|
|
799
804
|
compile
|
|
805
|
+
| currentEditLine |
|
|
800
806
|
self disableSaveButton.
|
|
807
|
+
currentEditLine := sourceArea editor getCursor.
|
|
801
808
|
selectedTab = #comment
|
|
802
809
|
ifTrue: [
|
|
803
810
|
selectedClass ifNotNil: [
|
|
@@ -805,7 +812,8 @@ compile
|
|
|
805
812
|
ifFalse: [
|
|
806
813
|
(selectedProtocol notNil or: [selectedMethod notNil])
|
|
807
814
|
ifFalse: [self compileDefinition]
|
|
808
|
-
ifTrue: [self compileMethodDefinition]]
|
|
815
|
+
ifTrue: [self compileMethodDefinition]].
|
|
816
|
+
sourceArea editor setCursor: currentEditLine.
|
|
809
817
|
!
|
|
810
818
|
|
|
811
819
|
compileClassComment
|
|
@@ -1045,7 +1053,7 @@ ajaxPutAt: anURL data: aString
|
|
|
1045
1053
|
|
|
1046
1054
|
renderBottomPanelOn: html
|
|
1047
1055
|
html div
|
|
1048
|
-
class: '
|
|
1056
|
+
class: 'amber_sourceCode';
|
|
1049
1057
|
with: [
|
|
1050
1058
|
sourceArea := SourceArea new.
|
|
1051
1059
|
sourceArea renderOn: html.
|
|
@@ -1083,7 +1091,7 @@ renderButtonsOn: html
|
|
|
1083
1091
|
!
|
|
1084
1092
|
|
|
1085
1093
|
renderTabsOn: html
|
|
1086
|
-
tabsList := html ul class: '
|
|
1094
|
+
tabsList := html ul class: 'amber_tabs amber_browser'.
|
|
1087
1095
|
self updateTabsList.
|
|
1088
1096
|
!
|
|
1089
1097
|
|
|
@@ -1091,8 +1099,8 @@ renderTopPanelOn: html
|
|
|
1091
1099
|
html div
|
|
1092
1100
|
class: 'top';
|
|
1093
1101
|
with: [
|
|
1094
|
-
packagesList := html ul class: '
|
|
1095
|
-
html div class: '
|
|
1102
|
+
packagesList := html ul class: 'amber_column browser packages'.
|
|
1103
|
+
html div class: 'amber_packagesButtons'; with: [
|
|
1096
1104
|
html button
|
|
1097
1105
|
title: 'Commit classes in this package to disk';
|
|
1098
1106
|
onClick: [self commitPackage];
|
|
@@ -1107,14 +1115,14 @@ renderTopPanelOn: html
|
|
|
1107
1115
|
with: 'Remove'].
|
|
1108
1116
|
classesList := ClassesList on: self.
|
|
1109
1117
|
classesList renderOn: html.
|
|
1110
|
-
protocolsList := html ul class: '
|
|
1111
|
-
methodsList := html ul class: '
|
|
1118
|
+
protocolsList := html ul class: 'amber_column browser protocols'.
|
|
1119
|
+
methodsList := html ul class: 'amber_column browser methods'.
|
|
1112
1120
|
self
|
|
1113
1121
|
updateCategoriesList;
|
|
1114
1122
|
updateClassesList;
|
|
1115
1123
|
updateProtocolsList;
|
|
1116
1124
|
updateMethodsList.
|
|
1117
|
-
html div class: '
|
|
1125
|
+
html div class: 'amber_clear']
|
|
1118
1126
|
! !
|
|
1119
1127
|
|
|
1120
1128
|
!Browser methodsFor: 'testing'!
|
|
@@ -1171,6 +1179,8 @@ updateProtocolsList
|
|
|
1171
1179
|
!
|
|
1172
1180
|
|
|
1173
1181
|
updateSourceAndButtons
|
|
1182
|
+
| currentProtocol |
|
|
1183
|
+
|
|
1174
1184
|
self disableSaveButton.
|
|
1175
1185
|
classButtons contents: [:html |
|
|
1176
1186
|
html button
|
|
@@ -1203,9 +1213,12 @@ updateSourceAndButtons
|
|
|
1203
1213
|
html option
|
|
1204
1214
|
class: 'important';
|
|
1205
1215
|
with: 'New...'.
|
|
1216
|
+
currentProtocol := selectedProtocol.
|
|
1217
|
+
(currentProtocol isNil and: [ selectedMethod notNil ])
|
|
1218
|
+
ifTrue: [ currentProtocol := selectedMethod category].
|
|
1206
1219
|
self protocols do: [:each |
|
|
1207
1220
|
option := html option with: each.
|
|
1208
|
-
|
|
1221
|
+
currentProtocol = each ifTrue: [ option at: 'selected' put: 'selected' ] ]].
|
|
1209
1222
|
selectedMethod isNil ifFalse: [
|
|
1210
1223
|
referencesSelect := html select.
|
|
1211
1224
|
referencesSelect
|
|
@@ -1380,12 +1393,12 @@ initialize
|
|
|
1380
1393
|
|
|
1381
1394
|
renderBottomPanelOn: html
|
|
1382
1395
|
html div
|
|
1383
|
-
class: '
|
|
1396
|
+
class: 'amber_sourceCode debugger';
|
|
1384
1397
|
with: [
|
|
1385
1398
|
sourceArea := SourceArea new.
|
|
1386
1399
|
sourceArea renderOn: html].
|
|
1387
|
-
ul2 := html ul class: '
|
|
1388
|
-
inspector := html div class: '
|
|
1400
|
+
ul2 := html ul class: 'amber_column debugger variables'.
|
|
1401
|
+
inspector := html div class: 'amber_column debugger inspector'.
|
|
1389
1402
|
sourceArea
|
|
1390
1403
|
onKeyUp: [self updateStatus]
|
|
1391
1404
|
!
|
|
@@ -1416,7 +1429,7 @@ renderButtonsOn: html
|
|
|
1416
1429
|
with: 'Abandon';
|
|
1417
1430
|
onClick: [self close].
|
|
1418
1431
|
inspectButton := html button
|
|
1419
|
-
class: '
|
|
1432
|
+
class: 'amber_button debugger inspect';
|
|
1420
1433
|
with: 'Inspect';
|
|
1421
1434
|
onClick: [self inspectSelectedVariable].
|
|
1422
1435
|
self
|
|
@@ -1446,7 +1459,7 @@ renderTopPanelOn: html
|
|
|
1446
1459
|
class: 'label';
|
|
1447
1460
|
with: self error messageText.
|
|
1448
1461
|
ul := html ul
|
|
1449
|
-
class: '
|
|
1462
|
+
class: 'amber_column debugger contexts';
|
|
1450
1463
|
with: [self renderContext: self error context on: html]]
|
|
1451
1464
|
! !
|
|
1452
1465
|
|
|
@@ -1543,7 +1556,7 @@ show: anObject
|
|
|
1543
1556
|
renderBoxOn: html
|
|
1544
1557
|
textarea := html textarea.
|
|
1545
1558
|
textarea
|
|
1546
|
-
class: '
|
|
1559
|
+
class: 'amber_transcript';
|
|
1547
1560
|
at: 'spellcheck' put: 'false'
|
|
1548
1561
|
!
|
|
1549
1562
|
|
|
@@ -1634,7 +1647,7 @@ refresh
|
|
|
1634
1647
|
|
|
1635
1648
|
renderBottomPanelOn: html
|
|
1636
1649
|
html div
|
|
1637
|
-
class: '
|
|
1650
|
+
class: 'amber_sourceCode';
|
|
1638
1651
|
with: [
|
|
1639
1652
|
sourceArea := SourceArea new
|
|
1640
1653
|
receiver: object;
|
|
@@ -1666,18 +1679,18 @@ renderTopPanelOn: html
|
|
|
1666
1679
|
html div
|
|
1667
1680
|
class: 'top';
|
|
1668
1681
|
with: [
|
|
1669
|
-
variablesList := html ul class: '
|
|
1670
|
-
valueTextarea := html textarea class: '
|
|
1671
|
-
html div class: '
|
|
1682
|
+
variablesList := html ul class: 'amber_column variables'.
|
|
1683
|
+
valueTextarea := html textarea class: 'amber_column value'; at: 'readonly' put: 'readonly'.
|
|
1684
|
+
html div class: 'amber_tabs inspector'; with: [
|
|
1672
1685
|
html button
|
|
1673
|
-
class: '
|
|
1686
|
+
class: 'amber_button inspector refresh';
|
|
1674
1687
|
with: 'Refresh';
|
|
1675
1688
|
onClick: [self refresh].
|
|
1676
1689
|
diveButton := html button
|
|
1677
|
-
class: '
|
|
1690
|
+
class: 'amber_button inspector dive';
|
|
1678
1691
|
with: 'Dive';
|
|
1679
1692
|
onClick: [self dive]].
|
|
1680
|
-
html div class: '
|
|
1693
|
+
html div class: 'amber_clear'].
|
|
1681
1694
|
self
|
|
1682
1695
|
updateVariablesList;
|
|
1683
1696
|
updateValueTextarea.
|
|
@@ -1885,7 +1898,7 @@ renderBoxOn: html
|
|
|
1885
1898
|
!
|
|
1886
1899
|
|
|
1887
1900
|
renderImplementorsOn: html
|
|
1888
|
-
implementorsList := html ul class: '
|
|
1901
|
+
implementorsList := html ul class: 'amber_column implementors'.
|
|
1889
1902
|
self updateImplementorsList
|
|
1890
1903
|
!
|
|
1891
1904
|
|
|
@@ -1898,17 +1911,17 @@ renderInputOn: html
|
|
|
1898
1911
|
!
|
|
1899
1912
|
|
|
1900
1913
|
renderMatchesOn: html
|
|
1901
|
-
matchesList := html ul class: '
|
|
1914
|
+
matchesList := html ul class: 'amber_column matches'.
|
|
1902
1915
|
self updateMatchesList
|
|
1903
1916
|
!
|
|
1904
1917
|
|
|
1905
1918
|
renderReferencedClassesOn: html
|
|
1906
|
-
referencedClassesList := html ul class: '
|
|
1919
|
+
referencedClassesList := html ul class: 'amber_column referenced_classes'.
|
|
1907
1920
|
self updateReferencedClassesList
|
|
1908
1921
|
!
|
|
1909
1922
|
|
|
1910
1923
|
renderSendersOn: html
|
|
1911
|
-
sendersList := html ul class: '
|
|
1924
|
+
sendersList := html ul class: 'amber_column senders'.
|
|
1912
1925
|
self updateSendersList
|
|
1913
1926
|
! !
|
|
1914
1927
|
|
|
@@ -1985,7 +1998,7 @@ TabWidget subclass: #TestRunner
|
|
|
1985
1998
|
!TestRunner methodsFor: 'accessing'!
|
|
1986
1999
|
|
|
1987
2000
|
allClasses
|
|
1988
|
-
^TestCase allSubclasses
|
|
2001
|
+
^TestCase allSubclasses select: [ :each | each isAbstract not ]
|
|
1989
2002
|
!
|
|
1990
2003
|
|
|
1991
2004
|
classes
|
|
@@ -2030,14 +2043,18 @@ statusInfo
|
|
|
2030
2043
|
testCases
|
|
2031
2044
|
| testCases |
|
|
2032
2045
|
testCases := #().
|
|
2033
|
-
self selectedClasses
|
|
2046
|
+
(self selectedClasses
|
|
2047
|
+
select: [:each | self selectedCategories includes: each category])
|
|
2048
|
+
do: [:each | testCases addAll: each buildSuite].
|
|
2034
2049
|
^testCases
|
|
2035
2050
|
! !
|
|
2036
2051
|
|
|
2037
2052
|
!TestRunner methodsFor: 'actions'!
|
|
2038
2053
|
|
|
2039
2054
|
performFailure: aTestCase
|
|
2040
|
-
aTestCase
|
|
2055
|
+
aTestCase setUp.
|
|
2056
|
+
[ aTestCase perform: aTestCase selector ]
|
|
2057
|
+
ensure: [ aTestCase tearDown ]
|
|
2041
2058
|
!
|
|
2042
2059
|
|
|
2043
2060
|
run: aCollection
|
|
@@ -2130,12 +2147,12 @@ renderButtonsOn: html
|
|
|
2130
2147
|
!
|
|
2131
2148
|
|
|
2132
2149
|
renderCategoriesOn: html
|
|
2133
|
-
packagesList := html ul class: '
|
|
2150
|
+
packagesList := html ul class: 'amber_column sunit packages'.
|
|
2134
2151
|
self updateCategoriesList
|
|
2135
2152
|
!
|
|
2136
2153
|
|
|
2137
2154
|
renderClassesOn: html
|
|
2138
|
-
classesList := html ul class: '
|
|
2155
|
+
classesList := html ul class: 'amber_column sunit classes'.
|
|
2139
2156
|
self updateClassesList
|
|
2140
2157
|
!
|
|
2141
2158
|
|
|
@@ -2158,7 +2175,7 @@ renderFailuresOn: html
|
|
|
2158
2175
|
renderResultsOn: html
|
|
2159
2176
|
statusDiv := html div.
|
|
2160
2177
|
html with: self progressBar.
|
|
2161
|
-
methodsList := html ul class: '
|
|
2178
|
+
methodsList := html ul class: 'amber_column sunit results'.
|
|
2162
2179
|
self updateMethodsList.
|
|
2163
2180
|
self updateStatusDiv
|
|
2164
2181
|
! !
|
|
@@ -2248,6 +2265,11 @@ inspectIt
|
|
|
2248
2265
|
|
|
2249
2266
|
printIt
|
|
2250
2267
|
sourceArea printIt
|
|
2268
|
+
!
|
|
2269
|
+
|
|
2270
|
+
show
|
|
2271
|
+
super show.
|
|
2272
|
+
sourceArea focus.
|
|
2251
2273
|
! !
|
|
2252
2274
|
|
|
2253
2275
|
!Workspace methodsFor: 'rendering'!
|