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.
Files changed (117) hide show
  1. data/amber/css/amber-normalize.css +73 -73
  2. data/amber/css/amber-normalize.less +1 -1
  3. data/amber/css/amber.css +106 -106
  4. data/amber/css/helios.css +242 -0
  5. data/amber/images/hsplitter.png +0 -0
  6. data/amber/images/vsplitter.png +0 -0
  7. data/amber/js/Benchfib.deploy.js +116 -38
  8. data/amber/js/Benchfib.js +120 -42
  9. data/amber/js/Canvas.deploy.js +674 -403
  10. data/amber/js/Canvas.js +682 -411
  11. data/amber/js/Compiler-AST.deploy.js +1150 -0
  12. data/amber/js/Compiler-AST.js +1591 -0
  13. data/amber/js/Compiler-Core.deploy.js +1562 -0
  14. data/amber/js/Compiler-Core.js +1972 -0
  15. data/amber/js/Compiler-Exceptions.deploy.js +114 -0
  16. data/amber/js/Compiler-Exceptions.js +161 -0
  17. data/amber/js/Compiler-IR.deploy.js +2326 -0
  18. data/amber/js/Compiler-IR.js +3146 -0
  19. data/amber/js/Compiler-Inlining.deploy.js +1147 -0
  20. data/amber/js/Compiler-Inlining.js +1514 -0
  21. data/amber/js/Compiler-Semantic.deploy.js +1207 -0
  22. data/amber/js/Compiler-Semantic.js +1628 -0
  23. data/amber/js/Compiler-Tests.deploy.js +646 -60
  24. data/amber/js/Compiler-Tests.js +843 -82
  25. data/amber/js/Compiler.deploy.js +1097 -159
  26. data/amber/js/Compiler.js +1414 -161
  27. data/amber/js/Examples.deploy.js +31 -15
  28. data/amber/js/Examples.js +33 -17
  29. data/amber/js/Helios-Announcements.deploy.js +127 -0
  30. data/amber/js/Helios-Announcements.js +157 -0
  31. data/amber/js/Helios-Browser.deploy.js +1473 -0
  32. data/amber/js/Helios-Browser.js +1953 -0
  33. data/amber/js/Helios-Commands.deploy.js +403 -0
  34. data/amber/js/Helios-Commands.js +563 -0
  35. data/amber/js/Helios-Core.deploy.js +1070 -0
  36. data/amber/js/Helios-Core.js +1445 -0
  37. data/amber/js/Helios-Environments.deploy.js +132 -0
  38. data/amber/js/Helios-Environments.js +179 -0
  39. data/amber/js/Helios-Inspector.deploy.js +855 -0
  40. data/amber/js/Helios-Inspector.js +1155 -0
  41. data/amber/js/Helios-KeyBindings.deploy.js +753 -0
  42. data/amber/js/Helios-KeyBindings.js +1023 -0
  43. data/amber/js/Helios-Layout.deploy.js +383 -0
  44. data/amber/js/Helios-Layout.js +523 -0
  45. data/amber/js/Helios-Workspace.deploy.js +799 -0
  46. data/amber/js/Helios-Workspace.js +1074 -0
  47. data/amber/js/IDE.deploy.js +2541 -1490
  48. data/amber/js/IDE.js +2721 -1660
  49. data/amber/js/Importer-Exporter.deploy.js +671 -0
  50. data/amber/js/Importer-Exporter.js +816 -0
  51. data/amber/js/Kernel-Announcements.deploy.js +137 -20
  52. data/amber/js/Kernel-Announcements.js +176 -22
  53. data/amber/js/Kernel-Classes.deploy.js +555 -168
  54. data/amber/js/Kernel-Classes.js +662 -205
  55. data/amber/js/Kernel-Collections.deploy.js +1403 -618
  56. data/amber/js/Kernel-Collections.js +1545 -690
  57. data/amber/js/Kernel-Exceptions.deploy.js +109 -45
  58. data/amber/js/Kernel-Exceptions.js +123 -49
  59. data/amber/js/Kernel-Methods.deploy.js +196 -81
  60. data/amber/js/Kernel-Methods.js +214 -89
  61. data/amber/js/Kernel-Objects.deploy.js +1542 -1117
  62. data/amber/js/Kernel-Objects.js +1593 -1148
  63. data/amber/js/Kernel-Tests.deploy.js +1725 -772
  64. data/amber/js/Kernel-Tests.js +2301 -1123
  65. data/amber/js/Kernel-Transcript.deploy.js +23 -25
  66. data/amber/js/Kernel-Transcript.js +24 -26
  67. data/amber/js/SUnit.deploy.js +204 -131
  68. data/amber/js/SUnit.js +222 -139
  69. data/amber/js/Spaces.deploy.js +240 -0
  70. data/amber/js/Spaces.js +326 -0
  71. data/amber/js/amber.js +26 -7
  72. data/amber/js/boot.js +65 -47
  73. data/amber/js/init.js +1 -1
  74. data/amber/js/lib/CodeMirror/amber.css +21 -21
  75. data/amber/js/lib/CodeMirror/codemirror.css +119 -13
  76. data/amber/js/lib/CodeMirror/codemirror.js +2219 -1220
  77. data/amber/js/lib/CodeMirror/smalltalk.js +134 -129
  78. data/amber/js/lib/bootstrap/css/bootstrap.css +5837 -0
  79. data/amber/js/lib/bootstrap/css/bootstrap.min.css +841 -0
  80. data/amber/js/lib/bootstrap/img/glyphicons-halflings-white.png +0 -0
  81. data/amber/js/lib/bootstrap/img/glyphicons-halflings.png +0 -0
  82. data/amber/js/lib/bootstrap/js/bootstrap.js +2038 -0
  83. data/amber/js/lib/bootstrap/js/bootstrap.min.js +7 -0
  84. data/amber/js/lib/jQuery/jquery-1.8.2.min.js +2 -0
  85. data/amber/js/lib/jQuery/jquery-ui-1.8.24.custom.min.js +125 -0
  86. data/amber/st/Compiler-AST.st +505 -0
  87. data/amber/st/Compiler-Core.st +835 -0
  88. data/amber/st/Compiler-Exceptions.st +87 -0
  89. data/amber/st/Compiler-IR.st +1097 -0
  90. data/amber/st/Compiler-Inlining.st +650 -0
  91. data/amber/st/Compiler-Semantic.st +558 -0
  92. data/amber/st/Compiler-Tests.st +285 -381
  93. data/amber/st/Compiler.st +725 -2
  94. data/amber/st/Helios-Announcements.st +104 -0
  95. data/amber/st/Helios-Browser.st +708 -0
  96. data/amber/st/Helios-Commands.st +223 -0
  97. data/amber/st/Helios-Core.st +532 -0
  98. data/amber/st/Helios-Environments.st +98 -0
  99. data/amber/st/Helios-Inspector.st +367 -0
  100. data/amber/st/Helios-KeyBindings.st +337 -0
  101. data/amber/st/Helios-Layout.st +199 -0
  102. data/amber/st/Helios-Workspace.st +367 -0
  103. data/amber/st/IDE.st +75 -53
  104. data/amber/st/Importer-Exporter.st +386 -0
  105. data/amber/st/Kernel-Announcements.st +92 -0
  106. data/amber/st/Kernel-Classes.st +137 -15
  107. data/amber/st/Kernel-Collections.st +137 -47
  108. data/amber/st/Kernel-Exceptions.st +14 -0
  109. data/amber/st/Kernel-Methods.st +9 -1
  110. data/amber/st/Kernel-Objects.st +29 -5
  111. data/amber/st/Kernel-Tests.st +545 -199
  112. data/amber/st/SUnit.st +10 -0
  113. data/amber/st/Spaces.st +142 -0
  114. data/lib/resin/app.rb +1 -1
  115. metadata +86 -31
  116. data/amber/js/lib/jQuery/jquery-1.4.4.min.js +0 -167
  117. 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: 'jt_column browser classes';
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: 'jtalk',
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
- '#jtalk' asJQuery hide.
359
+ '#amber' asJQuery hide.
355
360
  ul asJQuery hide.
356
361
  selectedTab hide.
357
362
  self removeBodyMargin.
358
- 'body' asJQuery removeClass: 'jtalkBody'.
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('#jtalk').resizable({
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: 'jtalkBody'.
388
- '#jtalk' asJQuery show.
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
- '.jtalkBody' asJQuery css: 'margin-bottom' put: anInteger asString, 'px'
423
+ '.amberBody' asJQuery css: 'margin-bottom' put: anInteger asString, 'px'
419
424
  !
420
425
 
421
426
  updateBodyMargin
422
- self setBodyMargin: '#jtalk' asJQuery height
427
+ self setBodyMargin: '#amber' asJQuery height
423
428
  !
424
429
 
425
430
  updatePosition
426
- <jQuery('#jtalk').css('top', '').css('bottom', '0px')>
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: '#jtalk' asJQuery.
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: 'jtalk'] appendToJQuery: 'body' asJQuery.
452
+ [:html | html div id: 'amber'] appendToJQuery: 'body' asJQuery.
448
453
  'body' asJQuery
449
- addClass: 'jtalkBody'.
450
- self appendToJQuery: '#jtalk' asJQuery.
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: 'jtalkTabs';
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: 'jt_toolbar';
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: 'jt_close'; onClick: [self close]]
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: 'jtalkTool';
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: 'jt_box';
592
+ class: 'amber_box';
588
593
  with: [self renderBoxOn: html].
589
594
  html div
590
- class: 'jt_buttons';
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: 'jt_sourceCode';
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: 'jt_tabs jt_browser'.
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: 'jt_column browser packages'.
1095
- html div class: 'jt_packagesButtons'; with: [
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: 'jt_column browser protocols'.
1111
- methodsList := html ul class: 'jt_column browser methods'.
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: 'jt_clear']
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
- selectedProtocol = each ifTrue: [ option at: 'selected' put: 'selected' ] ]].
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: 'jt_sourceCode debugger';
1396
+ class: 'amber_sourceCode debugger';
1384
1397
  with: [
1385
1398
  sourceArea := SourceArea new.
1386
1399
  sourceArea renderOn: html].
1387
- ul2 := html ul class: 'jt_column debugger variables'.
1388
- inspector := html div class: 'jt_column debugger inspector'.
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: 'jt_button debugger inspect';
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: 'jt_column debugger contexts';
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: 'jt_transcript';
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: 'jt_sourceCode';
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: 'jt_column variables'.
1670
- valueTextarea := html textarea class: 'jt_column value'; at: 'readonly' put: 'readonly'.
1671
- html div class: 'jt_tabs inspector'; with: [
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: 'jt_button inspector refresh';
1686
+ class: 'amber_button inspector refresh';
1674
1687
  with: 'Refresh';
1675
1688
  onClick: [self refresh].
1676
1689
  diveButton := html button
1677
- class: 'jt_button inspector dive';
1690
+ class: 'amber_button inspector dive';
1678
1691
  with: 'Dive';
1679
1692
  onClick: [self dive]].
1680
- html div class: 'jt_clear'].
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: 'jt_column implementors'.
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: 'jt_column matches'.
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: 'jt_column referenced_classes'.
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: 'jt_column senders'.
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 do: [:each | testCases addAll: each buildSuite].
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 perform: aTestCase selector
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: 'jt_column sunit packages'.
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: 'jt_column sunit classes'.
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: 'jt_column sunit results'.
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'!