resin 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/amber/st/IDE.st CHANGED
@@ -1,185 +1,295 @@
1
1
  Smalltalk current createPackage: 'IDE' properties: #{}!
2
- ErrorHandler subclass: #DebugErrorHandler
3
- instanceVariableNames: ''
4
- category: 'IDE'!
5
-
6
- !DebugErrorHandler methodsFor: 'error handling'!
7
-
8
- handleError: anError
9
- [Debugger new
10
- error: anError;
11
- open] on: Error do: [:error |
12
- ErrorHandler new handleError: error]
13
- ! !
14
-
15
- !DebugErrorHandler class methodsFor: 'initialization'!
16
-
17
- initialize
18
- self register
19
- ! !
20
-
21
- Widget subclass: #ClassesListNode
22
- instanceVariableNames: 'browser theClass level nodes'
2
+ Widget subclass: #TabManager
3
+ instanceVariableNames: 'selectedTab tabs opened ul input'
23
4
  category: 'IDE'!
24
5
 
25
- !ClassesListNode methodsFor: ''!
26
-
27
- renderOn: html
28
- | li cssClass |
29
- cssClass := ''.
30
- li := html li
31
- onClick: [self browser selectClass: self theClass].
32
- li asJQuery html: self label.
33
-
34
- self browser selectedClass = self theClass ifTrue: [
35
- cssClass := cssClass, ' selected'].
36
-
37
- self theClass comment isEmpty ifFalse: [
38
- cssClass := cssClass, ' commented'].
6
+ !TabManager methodsFor: 'accessing'!
39
7
 
40
- li class: cssClass.
8
+ tabs
9
+ ^tabs ifNil: [tabs := Array new]
10
+ !
41
11
 
42
- self nodes do: [:each |
43
- each renderOn: html]
12
+ labelFor: aWidget
13
+ | label maxSize |
14
+ maxSize := 15.
15
+ label := aWidget label copyFrom: 0 to: (aWidget label size min: maxSize).
16
+ aWidget label size > maxSize ifTrue: [
17
+ label := label, '...'].
18
+ ^label
44
19
  ! !
45
20
 
46
- !ClassesListNode methodsFor: 'accessing'!
47
-
48
- nodes
49
- ^nodes
50
- !
51
-
52
- theClass
53
- ^theClass
54
- !
21
+ !TabManager methodsFor: 'actions'!
55
22
 
56
- theClass: aClass
57
- theClass := aClass
23
+ updateBodyMargin
24
+ self setBodyMargin: '#jtalk' asJQuery height
58
25
  !
59
26
 
60
- browser
61
- ^browser
27
+ updatePosition
28
+ <jQuery('#jtalk').css('top', '').css('bottom', '0px')>
62
29
  !
63
30
 
64
- browser: aBrowser
65
- browser := aBrowser
31
+ removeBodyMargin
32
+ self setBodyMargin: 0
66
33
  !
67
34
 
68
- level
69
- ^level
35
+ setBodyMargin: anInteger
36
+ '.jtalkBody' asJQuery css: 'margin-bottom' put: anInteger asString, 'px'
70
37
  !
71
38
 
72
- level: anInteger
73
- level := anInteger
39
+ onResize: aBlock
40
+ <jQuery('#jtalk').resizable({
41
+ handles: 'n',
42
+ resize: aBlock,
43
+ minHeight: 230
44
+ })>
74
45
  !
75
46
 
76
- label
77
- | str |
78
- str := String new writeStream.
79
- self level timesRepeat: [
80
- str nextPutAll: '&nbsp;&nbsp;&nbsp;&nbsp;'].
81
- str nextPutAll: self theClass name.
82
- ^str contents
47
+ onWindowResize: aBlock
48
+ <jQuery(window).resize(aBlock)>
83
49
  !
84
50
 
85
- getNodesFrom: aCollection
86
- | children others |
87
- children := #().
88
- others := #().
89
- aCollection do: [:each |
90
- (each superclass = self theClass)
91
- ifTrue: [children add: each]
92
- ifFalse: [others add: each]].
93
- nodes:= children collect: [:each |
94
- ClassesListNode on: each browser: self browser classes: others level: self level + 1]
95
- ! !
96
-
97
- !ClassesListNode class methodsFor: 'instance creation'!
98
-
99
- on: aClass browser: aBrowser classes: aCollection level: anInteger
100
- ^self new
101
- theClass: aClass;
102
- browser: aBrowser;
103
- level: anInteger;
104
- getNodesFrom: aCollection;
105
- yourself
106
- ! !
107
-
108
- Widget subclass: #ClassesList
109
- instanceVariableNames: 'browser ul nodes'
110
- category: 'IDE'!
111
-
112
- !ClassesList methodsFor: 'accessing'!
113
-
114
- category
115
- ^self browser selectedPackage
51
+ open
52
+ opened ifFalse: [
53
+ 'body' asJQuery addClass: 'jtalkBody'.
54
+ '#jtalk' asJQuery show.
55
+ ul asJQuery show.
56
+ self updateBodyMargin.
57
+ selectedTab show.
58
+ opened := true]
116
59
  !
117
60
 
118
- nodes
119
- nodes ifNil: [nodes := self getNodes].
120
- ^nodes
61
+ close
62
+ opened ifTrue: [
63
+ '#jtalk' asJQuery hide.
64
+ ul asJQuery hide.
65
+ selectedTab hide.
66
+ self removeBodyMargin.
67
+ 'body' asJQuery removeClass: 'jtalkBody'.
68
+ opened := false]
121
69
  !
122
70
 
123
- browser
124
- ^browser
71
+ newBrowserTab
72
+ Browser open
125
73
  !
126
74
 
127
- browser: aBrowser
128
- browser := aBrowser
75
+ selectTab: aWidget
76
+ self open.
77
+ selectedTab := aWidget.
78
+ self tabs do: [:each |
79
+ each hide].
80
+ aWidget show.
81
+
82
+ self update
129
83
  !
130
84
 
131
- getNodes
132
- | classes children others |
133
- classes := self browser classes.
134
- children := #().
135
- others := #().
136
- classes do: [:each |
137
- (classes includes: each superclass)
138
- ifFalse: [children add: each]
139
- ifTrue: [others add: each]].
140
- ^children collect: [:each |
141
- ClassesListNode on: each browser: self browser classes: others level: 0]
85
+ closeTab: aWidget
86
+ self removeTab: aWidget.
87
+ self selectTab: self tabs last.
88
+ aWidget remove.
89
+ self update
142
90
  !
143
91
 
144
- resetNodes
145
- nodes := nil
92
+ search: aString
93
+ | searchedClass |
94
+ searchedClass := Smalltalk current at: aString.
95
+ searchedClass isClass
96
+ ifTrue: [Browser openOn: searchedClass]
97
+ ifFalse: [ReferencesBrowser search: aString]
146
98
  ! !
147
99
 
148
- !ClassesList methodsFor: 'rendering'!
100
+ !TabManager methodsFor: 'adding/Removing'!
149
101
 
150
- renderOn: html
151
- ul := html ul
152
- class: 'jt_column browser classes';
153
- yourself.
154
- self updateNodes
102
+ addTab: aWidget
103
+ self tabs add: aWidget.
104
+ aWidget appendToJQuery: '#jtalk' asJQuery.
105
+ aWidget hide
155
106
  !
156
107
 
157
- updateNodes
158
- ul contents: [:html |
159
- self nodes do: [:each |
160
- each renderOn: html]]
108
+ removeTab: aWidget
109
+ self tabs remove: aWidget.
110
+ self update
161
111
  ! !
162
112
 
163
- !ClassesList class methodsFor: 'instance creation'!
113
+ !TabManager methodsFor: 'initialization'!
164
114
 
165
- on: aBrowser
166
- ^self new
167
- browser: aBrowser;
168
- yourself
115
+ initialize
116
+ super initialize.
117
+ opened := true.
118
+ [:html | html div id: 'jtalk'] appendToJQuery: 'body' asJQuery.
119
+ 'body' asJQuery
120
+ addClass: 'jtalkBody'.
121
+ self appendToJQuery: '#jtalk' asJQuery.
122
+ self
123
+ addTab: IDETranscript current;
124
+ addTab: Workspace new;
125
+ addTab: TestRunner new.
126
+ self selectTab: self tabs last.
127
+ self
128
+ onResize: [self updateBodyMargin; updatePosition];
129
+ onWindowResize: [self updatePosition]
169
130
  ! !
170
131
 
171
- Widget subclass: #SourceArea
172
- instanceVariableNames: 'editor div receiver onDoIt'
173
- category: 'IDE'!
174
-
175
- !SourceArea methodsFor: 'accessing'!
132
+ !TabManager methodsFor: 'rendering'!
176
133
 
177
- val
178
- ^editor getValue
134
+ renderOn: html
135
+ html div id: 'logo'.
136
+ self renderToolbarOn: html.
137
+ ul := html ul
138
+ id: 'jtalkTabs';
139
+ yourself.
140
+ self renderTabs
179
141
  !
180
142
 
181
- val: aString
182
- editor setValue: aString
143
+ renderTabFor: aWidget on: html
144
+ | li |
145
+ li := html li.
146
+ selectedTab = aWidget ifTrue: [
147
+ li class: 'selected'].
148
+ li with: [
149
+ html span class: 'ltab'.
150
+ html span
151
+ class: 'mtab';
152
+ with: [
153
+ aWidget canBeClosed ifTrue: [
154
+ html span
155
+ class: 'close';
156
+ with: 'x';
157
+ onClick: [self closeTab: aWidget]].
158
+ html span with: (self labelFor: aWidget)].
159
+ html span class: 'rtab'];
160
+ onClick: [self selectTab: aWidget]
161
+ !
162
+
163
+ renderTabs
164
+ ul contents: [:html |
165
+ self tabs do: [:each |
166
+ self renderTabFor: each on: html].
167
+ html li
168
+ class: 'newtab';
169
+ with: [
170
+ html span class: 'ltab'.
171
+ html span class: 'mtab'; with: ' + '.
172
+ html span class: 'rtab'];
173
+ onClick: [self newBrowserTab]]
174
+ !
175
+
176
+ renderToolbarOn: html
177
+ html div
178
+ id: 'jt_toolbar';
179
+ with: [
180
+ input := html input
181
+ class: 'implementors';
182
+ yourself.
183
+ input onKeyPress: [:event |
184
+ event keyCode = 13 ifTrue: [
185
+ self search: input asJQuery val]].
186
+ html div id: 'jt_close'; onClick: [self close]]
187
+ ! !
188
+
189
+ !TabManager methodsFor: 'updating'!
190
+
191
+ update
192
+ self renderTabs
193
+ ! !
194
+
195
+ TabManager class instanceVariableNames: 'current'!
196
+
197
+ !TabManager class methodsFor: 'instance creation'!
198
+
199
+ current
200
+ ^current ifNil: [current := super new]
201
+ !
202
+
203
+ new
204
+ self shouldNotImplement
205
+ ! !
206
+
207
+ Widget subclass: #TabWidget
208
+ instanceVariableNames: 'div'
209
+ category: 'IDE'!
210
+
211
+ !TabWidget methodsFor: 'accessing'!
212
+
213
+ label
214
+ self subclassResponsibility
215
+ ! !
216
+
217
+ !TabWidget methodsFor: 'actions'!
218
+
219
+ open
220
+ TabManager current addTab: self.
221
+ TabManager current selectTab: self
222
+ !
223
+
224
+ show
225
+ div asJQuery show
226
+ !
227
+
228
+ hide
229
+ div asJQuery hide
230
+ !
231
+
232
+ remove
233
+ div asJQuery remove
234
+ !
235
+
236
+ close
237
+ TabManager current closeTab: self
238
+ ! !
239
+
240
+ !TabWidget methodsFor: 'rendering'!
241
+
242
+ renderOn: html
243
+ div := html div
244
+ class: 'jtalkTool';
245
+ yourself.
246
+ self renderTab
247
+ !
248
+
249
+ renderBoxOn: html
250
+ !
251
+
252
+ renderButtonsOn: html
253
+ !
254
+
255
+ update
256
+ self renderTab
257
+ !
258
+
259
+ renderTab
260
+ div contents: [:html |
261
+ html div
262
+ class: 'jt_box';
263
+ with: [self renderBoxOn: html].
264
+ html div
265
+ class: 'jt_buttons';
266
+ with: [self renderButtonsOn: html]]
267
+ ! !
268
+
269
+ !TabWidget methodsFor: 'testing'!
270
+
271
+ canBeClosed
272
+ ^false
273
+ ! !
274
+
275
+ !TabWidget class methodsFor: 'instance creation'!
276
+
277
+ open
278
+ ^self new open
279
+ ! !
280
+
281
+ Widget subclass: #SourceArea
282
+ instanceVariableNames: 'editor div receiver onDoIt'
283
+ category: 'IDE'!
284
+
285
+ !SourceArea methodsFor: 'accessing'!
286
+
287
+ val
288
+ ^editor getValue
289
+ !
290
+
291
+ val: aString
292
+ editor setValue: aString
183
293
  !
184
294
 
185
295
  currentLine
@@ -328,283 +438,173 @@ renderOn: html
328
438
  div onKeyDown: [:e | self handleKeyDown: e]
329
439
  ! !
330
440
 
331
- Widget subclass: #TabWidget
332
- instanceVariableNames: 'div'
441
+ Widget subclass: #ClassesList
442
+ instanceVariableNames: 'browser ul nodes'
333
443
  category: 'IDE'!
334
444
 
335
- !TabWidget methodsFor: 'accessing'!
336
-
337
- label
338
- self subclassResponsibility
339
- ! !
445
+ !ClassesList methodsFor: 'accessing'!
340
446
 
341
- !TabWidget methodsFor: 'actions'!
447
+ category
448
+ ^self browser selectedPackage
449
+ !
342
450
 
343
- open
344
- TabManager current addTab: self.
345
- TabManager current selectTab: self
451
+ nodes
452
+ nodes ifNil: [nodes := self getNodes].
453
+ ^nodes
346
454
  !
347
455
 
348
- show
349
- div asJQuery show
456
+ browser
457
+ ^browser
350
458
  !
351
459
 
352
- hide
353
- div asJQuery hide
460
+ browser: aBrowser
461
+ browser := aBrowser
354
462
  !
355
463
 
356
- remove
357
- div asJQuery remove
464
+ getNodes
465
+ | classes children others |
466
+ classes := self browser classes.
467
+ children := #().
468
+ others := #().
469
+ classes do: [:each |
470
+ (classes includes: each superclass)
471
+ ifFalse: [children add: each]
472
+ ifTrue: [others add: each]].
473
+ ^children collect: [:each |
474
+ ClassesListNode on: each browser: self browser classes: others level: 0]
358
475
  !
359
476
 
360
- close
361
- TabManager current closeTab: self
477
+ resetNodes
478
+ nodes := nil
362
479
  ! !
363
480
 
364
- !TabWidget methodsFor: 'rendering'!
481
+ !ClassesList methodsFor: 'rendering'!
365
482
 
366
483
  renderOn: html
367
- div := html div
368
- class: 'jtalkTool';
484
+ ul := html ul
485
+ class: 'jt_column browser classes';
369
486
  yourself.
370
- self renderTab
371
- !
372
-
373
- renderBoxOn: html
374
- !
375
-
376
- renderButtonsOn: html
377
- !
378
-
379
- update
380
- self renderTab
487
+ self updateNodes
381
488
  !
382
489
 
383
- renderTab
384
- div contents: [:html |
385
- html div
386
- class: 'jt_box';
387
- with: [self renderBoxOn: html].
388
- html div
389
- class: 'jt_buttons';
390
- with: [self renderButtonsOn: html]]
391
- ! !
392
-
393
- !TabWidget methodsFor: 'testing'!
394
-
395
- canBeClosed
396
- ^false
490
+ updateNodes
491
+ ul contents: [:html |
492
+ self nodes do: [:each |
493
+ each renderOn: html]]
397
494
  ! !
398
495
 
399
- !TabWidget class methodsFor: 'instance creation'!
496
+ !ClassesList class methodsFor: 'instance creation'!
400
497
 
401
- open
402
- ^self new open
498
+ on: aBrowser
499
+ ^self new
500
+ browser: aBrowser;
501
+ yourself
403
502
  ! !
404
503
 
405
- Widget subclass: #TabManager
406
- instanceVariableNames: 'selectedTab tabs opened ul input'
504
+ Widget subclass: #ClassesListNode
505
+ instanceVariableNames: 'browser theClass level nodes'
407
506
  category: 'IDE'!
408
507
 
409
- !TabManager methodsFor: 'accessing'!
410
-
411
- tabs
412
- ^tabs ifNil: [tabs := Array new]
413
- !
508
+ !ClassesListNode methodsFor: ''!
414
509
 
415
- labelFor: aWidget
416
- | label maxSize |
417
- maxSize := 15.
418
- label := aWidget label copyFrom: 0 to: (aWidget label size min: maxSize).
419
- aWidget label size > maxSize ifTrue: [
420
- label := label, '...'].
421
- ^label
422
- ! !
510
+ renderOn: html
511
+ | li cssClass |
512
+ cssClass := ''.
513
+ li := html li
514
+ onClick: [self browser selectClass: self theClass].
515
+ li asJQuery html: self label.
423
516
 
424
- !TabManager methodsFor: 'actions'!
517
+ self browser selectedClass = self theClass ifTrue: [
518
+ cssClass := cssClass, ' selected'].
425
519
 
426
- updateBodyMargin
427
- self setBodyMargin: '#jtalk' asJQuery height
428
- !
520
+ self theClass comment isEmpty ifFalse: [
521
+ cssClass := cssClass, ' commented'].
429
522
 
430
- updatePosition
431
- <jQuery('#jtalk').css('top', '').css('bottom', '0px')>
432
- !
523
+ li class: cssClass.
433
524
 
434
- removeBodyMargin
435
- self setBodyMargin: 0
436
- !
525
+ self nodes do: [:each |
526
+ each renderOn: html]
527
+ ! !
437
528
 
438
- setBodyMargin: anInteger
439
- '.jtalkBody' asJQuery css: 'margin-bottom' put: anInteger asString, 'px'
440
- !
529
+ !ClassesListNode methodsFor: 'accessing'!
441
530
 
442
- onResize: aBlock
443
- <jQuery('#jtalk').resizable({
444
- handles: 'n',
445
- resize: aBlock,
446
- minHeight: 230
447
- })>
531
+ nodes
532
+ ^nodes
448
533
  !
449
534
 
450
- onWindowResize: aBlock
451
- <jQuery(window).resize(aBlock)>
535
+ theClass
536
+ ^theClass
452
537
  !
453
538
 
454
- open
455
- opened ifFalse: [
456
- 'body' asJQuery addClass: 'jtalkBody'.
457
- '#jtalk' asJQuery show.
458
- ul asJQuery show.
459
- self updateBodyMargin.
460
- selectedTab show.
461
- opened := true]
539
+ theClass: aClass
540
+ theClass := aClass
462
541
  !
463
542
 
464
- close
465
- opened ifTrue: [
466
- '#jtalk' asJQuery hide.
467
- ul asJQuery hide.
468
- selectedTab hide.
469
- self removeBodyMargin.
470
- 'body' asJQuery removeClass: 'jtalkBody'.
471
- opened := false]
543
+ browser
544
+ ^browser
472
545
  !
473
546
 
474
- newBrowserTab
475
- Browser open
547
+ browser: aBrowser
548
+ browser := aBrowser
476
549
  !
477
550
 
478
- selectTab: aWidget
479
- self open.
480
- selectedTab := aWidget.
481
- self tabs do: [:each |
482
- each hide].
483
- aWidget show.
484
-
485
- self update
551
+ level
552
+ ^level
486
553
  !
487
554
 
488
- closeTab: aWidget
489
- self removeTab: aWidget.
490
- self selectTab: self tabs last.
491
- aWidget remove.
492
- self update
555
+ level: anInteger
556
+ level := anInteger
493
557
  !
494
558
 
495
- search: aString
496
- | searchedClass |
497
- searchedClass := Smalltalk current at: aString.
498
- searchedClass isClass
499
- ifTrue: [Browser openOn: searchedClass]
500
- ifFalse: [ReferencesBrowser search: aString]
501
- ! !
502
-
503
- !TabManager methodsFor: 'adding/Removing'!
504
-
505
- addTab: aWidget
506
- self tabs add: aWidget.
507
- aWidget appendToJQuery: '#jtalk' asJQuery.
508
- aWidget hide
559
+ label
560
+ | str |
561
+ str := String new writeStream.
562
+ self level timesRepeat: [
563
+ str nextPutAll: '&nbsp;&nbsp;&nbsp;&nbsp;'].
564
+ str nextPutAll: self theClass name.
565
+ ^str contents
509
566
  !
510
567
 
511
- removeTab: aWidget
512
- self tabs remove: aWidget.
513
- self update
568
+ getNodesFrom: aCollection
569
+ | children others |
570
+ children := #().
571
+ others := #().
572
+ aCollection do: [:each |
573
+ (each superclass = self theClass)
574
+ ifTrue: [children add: each]
575
+ ifFalse: [others add: each]].
576
+ nodes:= children collect: [:each |
577
+ ClassesListNode on: each browser: self browser classes: others level: self level + 1]
514
578
  ! !
515
579
 
516
- !TabManager methodsFor: 'initialization'!
580
+ !ClassesListNode class methodsFor: 'instance creation'!
517
581
 
518
- initialize
519
- super initialize.
520
- opened := true.
521
- [:html | html div id: 'jtalk'] appendToJQuery: 'body' asJQuery.
522
- 'body' asJQuery
523
- addClass: 'jtalkBody'.
524
- self appendToJQuery: '#jtalk' asJQuery.
525
- self
526
- addTab: IDETranscript current;
527
- addTab: Workspace new;
528
- addTab: TestRunner new.
529
- self selectTab: self tabs last.
530
- self
531
- onResize: [self updateBodyMargin; updatePosition];
532
- onWindowResize: [self updatePosition]
582
+ on: aClass browser: aBrowser classes: aCollection level: anInteger
583
+ ^self new
584
+ theClass: aClass;
585
+ browser: aBrowser;
586
+ level: anInteger;
587
+ getNodesFrom: aCollection;
588
+ yourself
533
589
  ! !
534
590
 
535
- !TabManager methodsFor: 'rendering'!
536
-
537
- renderOn: html
538
- html div id: 'logo'.
539
- self renderToolbarOn: html.
540
- ul := html ul
541
- id: 'jtalkTabs';
542
- yourself.
543
- self renderTabs
544
- !
545
-
546
- renderTabFor: aWidget on: html
547
- | li |
548
- li := html li.
549
- selectedTab = aWidget ifTrue: [
550
- li class: 'selected'].
551
- li with: [
552
- html span class: 'ltab'.
553
- html span
554
- class: 'mtab';
555
- with: [
556
- aWidget canBeClosed ifTrue: [
557
- html span
558
- class: 'close';
559
- with: 'x';
560
- onClick: [self closeTab: aWidget]].
561
- html span with: (self labelFor: aWidget)].
562
- html span class: 'rtab'];
563
- onClick: [self selectTab: aWidget]
564
- !
565
-
566
- renderTabs
567
- ul contents: [:html |
568
- self tabs do: [:each |
569
- self renderTabFor: each on: html].
570
- html li
571
- class: 'newtab';
572
- with: [
573
- html span class: 'ltab'.
574
- html span class: 'mtab'; with: ' + '.
575
- html span class: 'rtab'];
576
- onClick: [self newBrowserTab]]
577
- !
578
-
579
- renderToolbarOn: html
580
- html div
581
- id: 'jt_toolbar';
582
- with: [
583
- input := html input
584
- class: 'implementors';
585
- yourself.
586
- input onKeyPress: [:event |
587
- event keyCode = 13 ifTrue: [
588
- self search: input asJQuery val]].
589
- html div id: 'jt_close'; onClick: [self close]]
590
- ! !
591
+ ErrorHandler subclass: #DebugErrorHandler
592
+ instanceVariableNames: ''
593
+ category: 'IDE'!
591
594
 
592
- !TabManager methodsFor: 'updating'!
595
+ !DebugErrorHandler methodsFor: 'error handling'!
593
596
 
594
- update
595
- self renderTabs
597
+ handleError: anError
598
+ [Debugger new
599
+ error: anError;
600
+ open] on: Error do: [:error |
601
+ ErrorHandler new handleError: error]
596
602
  ! !
597
603
 
598
- TabManager class instanceVariableNames: 'current'!
599
-
600
- !TabManager class methodsFor: 'instance creation'!
601
-
602
- current
603
- ^current ifNil: [current := super new]
604
- !
604
+ !DebugErrorHandler class methodsFor: 'initialization'!
605
605
 
606
- new
607
- self shouldNotImplement
606
+ initialize
607
+ self register
608
608
  ! !
609
609
 
610
610
  TabWidget subclass: #Workspace
@@ -1098,7 +1098,7 @@ ajaxPutAt: anURL data: aString
1098
1098
  jQuery
1099
1099
  ajax: anURL options: #{ 'type' -> 'PUT'.
1100
1100
  'data' -> aString.
1101
- 'contentType' -> 'text/plain'.
1101
+ 'contentType' -> 'text/plain;charset=UTF-8'.
1102
1102
  'error' -> [window alert: 'PUT request failed at: ', anURL] }
1103
1103
  ! !
1104
1104
 
@@ -1289,12 +1289,13 @@ updateSourceAndButtons
1289
1289
  class: 'important';
1290
1290
  with: 'New...'.
1291
1291
  self protocols do: [:each |
1292
- html option with: each]].
1292
+ option := html option with: each.
1293
+ selectedProtocol = each ifTrue: [ option at: 'selected' put: 'selected' ] ]].
1293
1294
  selectedMethod isNil ifFalse: [
1294
1295
  referencesSelect := html select.
1295
1296
  referencesSelect
1296
1297
  onChange: [self searchReferencesOf: referencesSelect asJQuery val];
1297
- with: [
1298
+ with: [ |option|
1298
1299
  html option
1299
1300
  with: 'References';
1300
1301
  at: 'disabled' put: 'disabled'.
@@ -2194,6 +2195,7 @@ cr
2194
2195
  !
2195
2196
 
2196
2197
  show: anObject
2198
+ textarea ifNil: [self open].
2197
2199
  textarea asJQuery val: textarea asJQuery val, anObject asString.
2198
2200
  !
2199
2201