resin 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
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,1074 @@
1
+ smalltalk.addPackage('Helios-Workspace', {});
2
+ smalltalk.addClass('HLCodeModel', smalltalk.Object, ['announcer', 'environment', 'receiver'], 'Helios-Workspace');
3
+ smalltalk.addMethod(
4
+ "_announcer",
5
+ smalltalk.method({
6
+ selector: "announcer",
7
+ category: 'accessing',
8
+ fn: function () {
9
+ var self = this;
10
+ var $1;
11
+ if (($receiver = self['@announcer']) == nil || $receiver == undefined) {
12
+ self['@announcer'] = smalltalk.send(smalltalk.Announcer || Announcer, "_new", []);
13
+ $1 = self['@announcer'];
14
+ } else {
15
+ $1 = self['@announcer'];
16
+ }
17
+ return $1;
18
+ },
19
+ args: [],
20
+ source: "announcer\x0a\x09^ announcer ifNil: [ announcer := Announcer new ]",
21
+ messageSends: ["ifNil:", "new"],
22
+ referencedClasses: ["Announcer"]
23
+ }),
24
+ smalltalk.HLCodeModel);
25
+
26
+ smalltalk.addMethod(
27
+ "_defaultReceiver",
28
+ smalltalk.method({
29
+ selector: "defaultReceiver",
30
+ category: 'defaults',
31
+ fn: function () {
32
+ var self = this;
33
+ var $1;
34
+ $1 = smalltalk.send(smalltalk.DoIt || DoIt, "_new", []);
35
+ return $1;
36
+ },
37
+ args: [],
38
+ source: "defaultReceiver\x0a\x09^ DoIt new",
39
+ messageSends: ["new"],
40
+ referencedClasses: ["DoIt"]
41
+ }),
42
+ smalltalk.HLCodeModel);
43
+
44
+ smalltalk.addMethod(
45
+ "_doIt_",
46
+ smalltalk.method({
47
+ selector: "doIt:",
48
+ category: 'actions',
49
+ fn: function (someCode) {
50
+ var self = this;
51
+ var $1;
52
+ $1 = smalltalk.send(smalltalk.send(self, "_environment", []), "_eval_on_", [someCode, smalltalk.send(self, "_receiver", [])]);
53
+ return $1;
54
+ },
55
+ args: ["someCode"],
56
+ source: "doIt: someCode\x0a\x0a\x09^ self environment eval: someCode on: self receiver",
57
+ messageSends: ["eval:on:", "receiver", "environment"],
58
+ referencedClasses: []
59
+ }),
60
+ smalltalk.HLCodeModel);
61
+
62
+ smalltalk.addMethod(
63
+ "_environment",
64
+ smalltalk.method({
65
+ selector: "environment",
66
+ category: 'accessing',
67
+ fn: function () {
68
+ var self = this;
69
+ var $1;
70
+ if (($receiver = self['@environment']) == nil || $receiver == undefined) {
71
+ $1 = smalltalk.send(smalltalk.send(smalltalk.HLManager || HLManager, "_current", []), "_environment", []);
72
+ } else {
73
+ $1 = self['@environment'];
74
+ }
75
+ return $1;
76
+ },
77
+ args: [],
78
+ source: "environment\x0a\x09^ environment ifNil: [ HLManager current environment ]",
79
+ messageSends: ["ifNil:", "environment", "current"],
80
+ referencedClasses: ["HLManager"]
81
+ }),
82
+ smalltalk.HLCodeModel);
83
+
84
+ smalltalk.addMethod(
85
+ "_environment_",
86
+ smalltalk.method({
87
+ selector: "environment:",
88
+ category: 'accessing',
89
+ fn: function (anEnvironment) {
90
+ var self = this;
91
+ self['@environment'] = anEnvironment;
92
+ return self;
93
+ },
94
+ args: ["anEnvironment"],
95
+ source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
96
+ messageSends: [],
97
+ referencedClasses: []
98
+ }),
99
+ smalltalk.HLCodeModel);
100
+
101
+ smalltalk.addMethod(
102
+ "_receiver",
103
+ smalltalk.method({
104
+ selector: "receiver",
105
+ category: 'accessing',
106
+ fn: function () {
107
+ var self = this;
108
+ var $1;
109
+ if (($receiver = self['@receiver']) == nil || $receiver == undefined) {
110
+ self['@receiver'] = smalltalk.send(self, "_defaultReceiver", []);
111
+ $1 = self['@receiver'];
112
+ } else {
113
+ $1 = self['@receiver'];
114
+ }
115
+ return $1;
116
+ },
117
+ args: [],
118
+ source: "receiver\x0a\x09^ receiver ifNil: [ receiver := self defaultReceiver ]",
119
+ messageSends: ["ifNil:", "defaultReceiver"],
120
+ referencedClasses: []
121
+ }),
122
+ smalltalk.HLCodeModel);
123
+
124
+ smalltalk.addMethod(
125
+ "_receiver_",
126
+ smalltalk.method({
127
+ selector: "receiver:",
128
+ category: 'accessing',
129
+ fn: function (anObject) {
130
+ var self = this;
131
+ self['@receiver'] = anObject;
132
+ return self;
133
+ },
134
+ args: ["anObject"],
135
+ source: "receiver: anObject\x0a\x09receiver := anObject",
136
+ messageSends: [],
137
+ referencedClasses: []
138
+ }),
139
+ smalltalk.HLCodeModel);
140
+
141
+ smalltalk.addMethod(
142
+ "_subscribe_",
143
+ smalltalk.method({
144
+ selector: "subscribe:",
145
+ category: 'actions',
146
+ fn: function (aWidget) {
147
+ var self = this;
148
+ smalltalk.send(aWidget, "_subscribeTo_", [smalltalk.send(self, "_announcer", [])]);
149
+ return self;
150
+ },
151
+ args: ["aWidget"],
152
+ source: "subscribe: aWidget\x0a\x09aWidget subscribeTo: self announcer",
153
+ messageSends: ["subscribeTo:", "announcer"],
154
+ referencedClasses: []
155
+ }),
156
+ smalltalk.HLCodeModel);
157
+
158
+
159
+ smalltalk.addMethod(
160
+ "_on_",
161
+ smalltalk.method({
162
+ selector: "on:",
163
+ category: 'actions',
164
+ fn: function (anEnvironment) {
165
+ var self = this;
166
+ var $2, $3, $1;
167
+ $2 = smalltalk.send(self, "_new", []);
168
+ smalltalk.send($2, "_environment_", [anEnvironment]);
169
+ $3 = smalltalk.send($2, "_yourself", []);
170
+ $1 = $3;
171
+ return $1;
172
+ },
173
+ args: ["anEnvironment"],
174
+ source: "on: anEnvironment\x0a\x0a\x09^ self new\x0a \x09environment: anEnvironment;\x0a yourself",
175
+ messageSends: ["environment:", "new", "yourself"],
176
+ referencedClasses: []
177
+ }),
178
+ smalltalk.HLCodeModel.klass);
179
+
180
+
181
+ smalltalk.addClass('HLCodeWidget', smalltalk.HLWidget, ['model', 'wrapper', 'code', 'editor'], 'Helios-Workspace');
182
+ smalltalk.addMethod(
183
+ "_announcer",
184
+ smalltalk.method({
185
+ selector: "announcer",
186
+ category: 'accessing',
187
+ fn: function () {
188
+ var self = this;
189
+ var $1;
190
+ $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []);
191
+ return $1;
192
+ },
193
+ args: [],
194
+ source: "announcer\x0a\x09^ self model announcer",
195
+ messageSends: ["announcer", "model"],
196
+ referencedClasses: []
197
+ }),
198
+ smalltalk.HLCodeWidget);
199
+
200
+ smalltalk.addMethod(
201
+ "_clear",
202
+ smalltalk.method({
203
+ selector: "clear",
204
+ category: 'actions',
205
+ fn: function () {
206
+ var self = this;
207
+ smalltalk.send(self, "_contents_", [""]);
208
+ return self;
209
+ },
210
+ args: [],
211
+ source: "clear\x0a self contents: ''",
212
+ messageSends: ["contents:"],
213
+ referencedClasses: []
214
+ }),
215
+ smalltalk.HLCodeWidget);
216
+
217
+ smalltalk.addMethod(
218
+ "_contents",
219
+ smalltalk.method({
220
+ selector: "contents",
221
+ category: 'accessing',
222
+ fn: function (){
223
+ var self=this;
224
+ var $1;
225
+ $1=smalltalk.send(self["@editor"],"_getValue",[]);
226
+ return $1;
227
+ },
228
+ args: [],
229
+ source: "contents\x0a\x09^ editor getValue",
230
+ messageSends: ["getValue"],
231
+ referencedClasses: []
232
+ }),
233
+ smalltalk.HLCodeWidget);
234
+
235
+ smalltalk.addMethod(
236
+ "_contents_",
237
+ smalltalk.method({
238
+ selector: "contents:",
239
+ category: 'accessing',
240
+ fn: function (aString){
241
+ var self=this;
242
+ smalltalk.send(self["@editor"],"_setValue_",[aString]);
243
+ return self},
244
+ args: ["aString"],
245
+ source: "contents: aString\x0a\x09editor setValue: aString",
246
+ messageSends: ["setValue:"],
247
+ referencedClasses: []
248
+ }),
249
+ smalltalk.HLCodeWidget);
250
+
251
+ smalltalk.addMethod(
252
+ "_currentLine",
253
+ smalltalk.method({
254
+ selector: "currentLine",
255
+ category: 'accessing',
256
+ fn: function () {
257
+ var self = this;
258
+ var $1;
259
+ $1 = smalltalk.send(self['@editor'], "_getLine_", [smalltalk.send(smalltalk.send(self['@editor'], "_getCursor", []), "_line", [])]);
260
+ return $1;
261
+ },
262
+ args: [],
263
+ source: "currentLine\x0a ^editor getLine: (editor getCursor line)",
264
+ messageSends: ["getLine:", "line", "getCursor"],
265
+ referencedClasses: []
266
+ }),
267
+ smalltalk.HLCodeWidget);
268
+
269
+ smalltalk.addMethod(
270
+ "_currentLineOrSelection",
271
+ smalltalk.method({
272
+ selector: "currentLineOrSelection",
273
+ category: 'accessing',
274
+ fn: function () {
275
+ var self = this;
276
+ var $2, $1;
277
+ $2 = smalltalk.send(self['@editor'], "_somethingSelected", []);
278
+ if (smalltalk.assert($2)) {
279
+ $1 = smalltalk.send(self, "_selection", []);
280
+ } else {
281
+ $1 = smalltalk.send(self, "_currentLine", []);
282
+ }
283
+ return $1;
284
+ },
285
+ args: [],
286
+ source: "currentLineOrSelection\x0a ^editor somethingSelected\x0a\x09\x09ifFalse: [self currentLine]\x0a\x09\x09ifTrue: [self selection]",
287
+ messageSends: ["ifFalse:ifTrue:", "currentLine", "selection", "somethingSelected"],
288
+ referencedClasses: []
289
+ }),
290
+ smalltalk.HLCodeWidget);
291
+
292
+ smalltalk.addMethod(
293
+ "_doIt",
294
+ smalltalk.method({
295
+ selector: "doIt",
296
+ category: 'actions',
297
+ fn: function () {
298
+ var self = this;
299
+ var result;
300
+ smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLDoItRequested || HLDoItRequested, "_on_", [self['@model']])]);
301
+ result = smalltalk.send(self['@model'], "_doIt_", [smalltalk.send(self, "_currentLineOrSelection", [])]);
302
+ smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLDoItExecuted || HLDoItExecuted, "_on_", [self['@model']])]);
303
+ return result;
304
+ },
305
+ args: [],
306
+ source: "doIt\x0a\x09| result |\x0a\x0a\x09self announcer announce: (HLDoItRequested on: model).\x0a\x0a\x09result:= model doIt: self currentLineOrSelection.\x0a\x0a\x09self announcer announce: (HLDoItExecuted on: model).\x0a\x0a\x09^ result ",
307
+ messageSends: ["announce:", "on:", "announcer", "doIt:", "currentLineOrSelection"],
308
+ referencedClasses: ["HLDoItRequested", "HLDoItExecuted"]
309
+ }),
310
+ smalltalk.HLCodeWidget);
311
+
312
+ smalltalk.addMethod(
313
+ "_editor",
314
+ smalltalk.method({
315
+ selector: "editor",
316
+ category: 'actions',
317
+ fn: function () {
318
+ var self = this;
319
+ return self['@editor'];
320
+ },
321
+ args: [],
322
+ source: "editor\x0a\x09^editor",
323
+ messageSends: [],
324
+ referencedClasses: []
325
+ }),
326
+ smalltalk.HLCodeWidget);
327
+
328
+ smalltalk.addMethod(
329
+ "_focus",
330
+ smalltalk.method({
331
+ selector: "focus",
332
+ category: 'actions',
333
+ fn: function () {
334
+ var self = this;
335
+ smalltalk.send(smalltalk.send(self, "_editor", []), "_focus", []);
336
+ return self;
337
+ },
338
+ args: [],
339
+ source: "focus\x0a self editor focus",
340
+ messageSends: ["focus", "editor"],
341
+ referencedClasses: []
342
+ }),
343
+ smalltalk.HLCodeWidget);
344
+
345
+ smalltalk.addMethod(
346
+ "_inspectIt",
347
+ smalltalk.method({
348
+ selector: "inspectIt",
349
+ category: 'actions',
350
+ fn: function () {
351
+ var self = this;
352
+ var newInspector;
353
+ smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLInspectItRequested || HLInspectItRequested, "_on_", [self['@model']])]);
354
+ newInspector = smalltalk.send(self, "_makeInspectorOn_", [smalltalk.send(self, "_doIt", [])]);
355
+ smalltalk.send(newInspector, "_open", []);
356
+ return self;
357
+ },
358
+ args: [],
359
+ source: "inspectIt\x0a\x0a\x09| newInspector |\x0a \x0a\x09self announcer announce: (HLInspectItRequested on: model).\x0a\x09newInspector := self makeInspectorOn: self doIt.\x0a\x09newInspector open",
360
+ messageSends: ["announce:", "on:", "announcer", "makeInspectorOn:", "doIt", "open"],
361
+ referencedClasses: ["HLInspectItRequested"]
362
+ }),
363
+ smalltalk.HLCodeWidget);
364
+
365
+ smalltalk.addMethod(
366
+ "_makeInspectorOn_",
367
+ smalltalk.method({
368
+ selector: "makeInspectorOn:",
369
+ category: 'actions',
370
+ fn: function (anObject) {
371
+ var self = this;
372
+ var $2, $3, $1;
373
+ $2 = smalltalk.send(smalltalk.HLInspector || HLInspector, "_new", []);
374
+ smalltalk.send($2, "_inspect_", [anObject]);
375
+ $3 = smalltalk.send($2, "_yourself", []);
376
+ $1 = $3;
377
+ return $1;
378
+ },
379
+ args: ["anObject"],
380
+ source: "makeInspectorOn: anObject\x0a\x0a\x09^ HLInspector new \x0a\x09\x09inspect: anObject;\x0a\x09\x09yourself",
381
+ messageSends: ["inspect:", "new", "yourself"],
382
+ referencedClasses: ["HLInspector"]
383
+ }),
384
+ smalltalk.HLCodeWidget);
385
+
386
+ smalltalk.addMethod(
387
+ "_model",
388
+ smalltalk.method({
389
+ selector: "model",
390
+ category: 'accessing',
391
+ fn: function () {
392
+ var self = this;
393
+ var $1;
394
+ if (($receiver = self['@model']) == nil || $receiver == undefined) {
395
+ smalltalk.send(self, "_model_", [smalltalk.send(smalltalk.HLCodeModel || HLCodeModel, "_new", [])]);
396
+ $1 = self['@model'];
397
+ } else {
398
+ $1 = self['@model'];
399
+ }
400
+ return $1;
401
+ },
402
+ args: [],
403
+ source: "model\x0a\x09^ model ifNil: [ \x0a \x09self model: HLCodeModel new.\x0a\x09\x09model ]",
404
+ messageSends: ["ifNil:", "model:", "new"],
405
+ referencedClasses: ["HLCodeModel"]
406
+ }),
407
+ smalltalk.HLCodeWidget);
408
+
409
+ smalltalk.addMethod(
410
+ "_model_",
411
+ smalltalk.method({
412
+ selector: "model:",
413
+ category: 'accessing',
414
+ fn: function (aModel){
415
+ var self=this;
416
+ self["@model"]=aModel;
417
+ return self},
418
+ args: ["aModel"],
419
+ source: "model: aModel\x0a\x09model := aModel",
420
+ messageSends: [],
421
+ referencedClasses: []
422
+ }),
423
+ smalltalk.HLCodeWidget);
424
+
425
+ smalltalk.addMethod(
426
+ "_observeWrapper",
427
+ smalltalk.method({
428
+ selector: "observeWrapper",
429
+ category: 'actions',
430
+ fn: function () {
431
+ var self = this;
432
+ smalltalk.send(self['@wrapper'], "_onKeyDown_", [function (e) {return smalltalk.send(self, "_onKeyDown_", [e]);}]);
433
+ return self;
434
+ },
435
+ args: [],
436
+ source: "observeWrapper\x0a\x0a wrapper onKeyDown: [ :e | self onKeyDown: e ]\x0a",
437
+ messageSends: ["onKeyDown:"],
438
+ referencedClasses: []
439
+ }),
440
+ smalltalk.HLCodeWidget);
441
+
442
+ smalltalk.addMethod(
443
+ "_onDoIt",
444
+ smalltalk.method({
445
+ selector: "onDoIt",
446
+ category: 'reactions',
447
+ fn: function () {
448
+ var self = this;
449
+ smalltalk.send(self, "_doIt", []);
450
+ return self;
451
+ },
452
+ args: [],
453
+ source: "onDoIt\x0a\x09\x0a self doIt",
454
+ messageSends: ["doIt"],
455
+ referencedClasses: []
456
+ }),
457
+ smalltalk.HLCodeWidget);
458
+
459
+ smalltalk.addMethod(
460
+ "_onInspectIt",
461
+ smalltalk.method({
462
+ selector: "onInspectIt",
463
+ category: 'reactions',
464
+ fn: function () {
465
+ var self = this;
466
+ smalltalk.send(self, "_inspectIt", []);
467
+ return self;
468
+ },
469
+ args: [],
470
+ source: "onInspectIt\x0a\x0a\x09self inspectIt",
471
+ messageSends: ["inspectIt"],
472
+ referencedClasses: []
473
+ }),
474
+ smalltalk.HLCodeWidget);
475
+
476
+ smalltalk.addMethod(
477
+ "_onKeyDown_",
478
+ smalltalk.method({
479
+ selector: "onKeyDown:",
480
+ category: 'reactions',
481
+ fn: function (anEvent) {
482
+ var self = this;
483
+ if (anEvent.ctrlKey) {
484
+ if (anEvent.keyCode === 80) {
485
+ self._onPrintIt();
486
+ anEvent.preventDefault();
487
+ return false;
488
+ }
489
+ if (anEvent.keyCode === 68) {
490
+ self._onDoIt();
491
+ anEvent.preventDefault();
492
+ return false;
493
+ }
494
+ if (anEvent.keyCode === 73) {
495
+ self._onInspectIt();
496
+ anEvent.preventDefault();
497
+ return false;
498
+ }
499
+ }
500
+ return self;
501
+ },
502
+ args: ["anEvent"],
503
+ source: "onKeyDown: anEvent\x0a\x0a <if(anEvent.ctrlKey) {\x0a\x09\x09if(anEvent.keyCode === 80) { //ctrl+p\x0a\x09\x09\x09self._onPrintIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09\x09if(anEvent.keyCode === 68) { //ctrl+d\x0a\x09\x09\x09self._onDoIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09\x09if(anEvent.keyCode === 73) { //ctrl+i\x0a\x09\x09\x09self._onInspectIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09}>\x09",
504
+ messageSends: [],
505
+ referencedClasses: []
506
+ }),
507
+ smalltalk.HLCodeWidget);
508
+
509
+ smalltalk.addMethod(
510
+ "_onPrintIt",
511
+ smalltalk.method({
512
+ selector: "onPrintIt",
513
+ category: 'reactions',
514
+ fn: function () {
515
+ var self = this;
516
+ smalltalk.send(self, "_printIt", []);
517
+ return self;
518
+ },
519
+ args: [],
520
+ source: "onPrintIt\x0a\x0a\x09self printIt",
521
+ messageSends: ["printIt"],
522
+ referencedClasses: []
523
+ }),
524
+ smalltalk.HLCodeWidget);
525
+
526
+ smalltalk.addMethod(
527
+ "_print_",
528
+ smalltalk.method({
529
+ selector: "print:",
530
+ category: 'actions',
531
+ fn: function (aString) {
532
+ var self = this;
533
+ var start;
534
+ var stop;
535
+ start = smalltalk.send(smalltalk.HashedCollection || HashedCollection, "_new", []);
536
+ stop = smalltalk.send(smalltalk.HashedCollection || HashedCollection, "_new", []);
537
+ smalltalk.send(start, "_at_put_", ["line", smalltalk.send(smalltalk.send(self['@editor'], "_getCursor_", [false]), "_line", [])]);
538
+ smalltalk.send(start, "_at_put_", ["ch", smalltalk.send(smalltalk.send(self['@editor'], "_getCursor_", [false]), "_ch", [])]);
539
+ smalltalk.send(stop, "_at_put_", ["line", smalltalk.send(start, "_at_", ["line"])]);
540
+ smalltalk.send(stop, "_at_put_", ["ch", smalltalk.send(smalltalk.send(smalltalk.send(start, "_at_", ["ch"]), "__plus", [smalltalk.send(aString, "_size", [])]), "__plus", [2])]);
541
+ smalltalk.send(self['@editor'], "_replaceSelection_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self['@editor'], "_getSelection", []), "__comma", [" "]), "__comma", [aString]), "__comma", [" "])]);
542
+ smalltalk.send(self['@editor'], "_setCursor_", [smalltalk.send(self['@editor'], "_getCursor_", [true])]);
543
+ smalltalk.send(self['@editor'], "_setSelection_end_", [stop, start]);
544
+ return self;
545
+ },
546
+ args: ["aString"],
547
+ source: "print: aString\x0a\x09| start stop |\x0a\x09start := HashedCollection new.\x0a\x09stop := HashedCollection new.\x0a\x09start at: 'line' put: (editor getCursor: false) line.\x0a\x09start at: 'ch' put: (editor getCursor: false) ch.\x0a\x09stop at: 'line' put: (start at: 'line').\x0a\x09stop at: 'ch' put: ((start at: 'ch') + aString size + 2).\x0a\x09editor replaceSelection: (editor getSelection, ' ', aString, ' ').\x0a\x09editor setCursor: (editor getCursor: true).\x0a\x09editor setSelection: stop end: start",
548
+ messageSends: ["new", "at:put:", "line", "getCursor:", "ch", "at:", "+", "size", "replaceSelection:", ",", "getSelection", "setCursor:", "setSelection:end:"],
549
+ referencedClasses: ["HashedCollection"]
550
+ }),
551
+ smalltalk.HLCodeWidget);
552
+
553
+ smalltalk.addMethod(
554
+ "_printIt",
555
+ smalltalk.method({
556
+ selector: "printIt",
557
+ category: 'actions',
558
+ fn: function () {
559
+ var self = this;
560
+ var result;
561
+ result = smalltalk.send(self, "_doIt", []);
562
+ smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLPrintItRequested || HLPrintItRequested, "_on_", [self['@model']])]);
563
+ smalltalk.send(self, "_print_", [smalltalk.send(result, "_printString", [])]);
564
+ smalltalk.send(self, "_focus", []);
565
+ return self;
566
+ },
567
+ args: [],
568
+ source: "printIt\x0a\x0a\x09| result |\x0a\x0a\x09result:= self doIt.\x0a \x0a\x09self announcer announce: (HLPrintItRequested on: model).\x0a\x0a self print: result printString.\x0a\x09self focus.",
569
+ messageSends: ["doIt", "announce:", "on:", "announcer", "print:", "printString", "focus"],
570
+ referencedClasses: ["HLPrintItRequested"]
571
+ }),
572
+ smalltalk.HLCodeWidget);
573
+
574
+ smalltalk.addMethod(
575
+ "_receiver",
576
+ smalltalk.method({
577
+ selector: "receiver",
578
+ category: 'accessing',
579
+ fn: function () {
580
+ var self = this;
581
+ var $1;
582
+ $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_receiver", []);
583
+ return $1;
584
+ },
585
+ args: [],
586
+ source: "receiver\x0a\x09^ self model receiver",
587
+ messageSends: ["receiver", "model"],
588
+ referencedClasses: []
589
+ }),
590
+ smalltalk.HLCodeWidget);
591
+
592
+ smalltalk.addMethod(
593
+ "_receiver_",
594
+ smalltalk.method({
595
+ selector: "receiver:",
596
+ category: 'accessing',
597
+ fn: function (anObject) {
598
+ var self = this;
599
+ smalltalk.send(smalltalk.send(self, "_model", []), "_receiver_", [anObject]);
600
+ return self;
601
+ },
602
+ args: ["anObject"],
603
+ source: "receiver: anObject\x0a\x09self model receiver: anObject",
604
+ messageSends: ["receiver:", "model"],
605
+ referencedClasses: []
606
+ }),
607
+ smalltalk.HLCodeWidget);
608
+
609
+ smalltalk.addMethod(
610
+ "_renderContentOn_",
611
+ smalltalk.method({
612
+ selector: "renderContentOn:",
613
+ category: 'rendering',
614
+ fn: function (html){
615
+ var self=this;
616
+ self["@code"]=smalltalk.send(html,"_textarea",[]);
617
+ smalltalk.send(self,"_setEditorOn_",[smalltalk.send(self["@code"],"_element",[])]);
618
+ smalltalk.send(self,"_observeWrapper",[]);
619
+ return self},
620
+ args: ["html"],
621
+ source: "renderContentOn: html\x0a code := html textarea.\x0a self setEditorOn: code element.\x0a \x0a self observeWrapper",
622
+ messageSends: ["textarea", "setEditorOn:", "element", "observeWrapper"],
623
+ referencedClasses: []
624
+ }),
625
+ smalltalk.HLCodeWidget);
626
+
627
+ smalltalk.addMethod(
628
+ "_selection",
629
+ smalltalk.method({
630
+ selector: "selection",
631
+ category: 'accessing',
632
+ fn: function () {
633
+ var self = this;
634
+ var $1;
635
+ $1 = smalltalk.send(self['@editor'], "_getSelection", []);
636
+ return $1;
637
+ },
638
+ args: [],
639
+ source: "selection\x0a\x09^editor getSelection",
640
+ messageSends: ["getSelection"],
641
+ referencedClasses: []
642
+ }),
643
+ smalltalk.HLCodeWidget);
644
+
645
+ smalltalk.addMethod(
646
+ "_selectionEnd",
647
+ smalltalk.method({
648
+ selector: "selectionEnd",
649
+ category: 'accessing',
650
+ fn: function () {
651
+ var self = this;
652
+ var $1;
653
+ $1 = smalltalk.send(smalltalk.send(self['@code'], "_element", []), "_selectionEnd", []);
654
+ return $1;
655
+ },
656
+ args: [],
657
+ source: "selectionEnd\x0a ^code element selectionEnd",
658
+ messageSends: ["selectionEnd", "element"],
659
+ referencedClasses: []
660
+ }),
661
+ smalltalk.HLCodeWidget);
662
+
663
+ smalltalk.addMethod(
664
+ "_selectionEnd_",
665
+ smalltalk.method({
666
+ selector: "selectionEnd:",
667
+ category: 'accessing',
668
+ fn: function (anInteger) {
669
+ var self = this;
670
+ smalltalk.send(smalltalk.send(self['@code'], "_element", []), "_selectionEnd_", [anInteger]);
671
+ return self;
672
+ },
673
+ args: ["anInteger"],
674
+ source: "selectionEnd: anInteger\x0a code element selectionEnd: anInteger",
675
+ messageSends: ["selectionEnd:", "element"],
676
+ referencedClasses: []
677
+ }),
678
+ smalltalk.HLCodeWidget);
679
+
680
+ smalltalk.addMethod(
681
+ "_selectionStart",
682
+ smalltalk.method({
683
+ selector: "selectionStart",
684
+ category: 'accessing',
685
+ fn: function () {
686
+ var self = this;
687
+ var $1;
688
+ $1 = smalltalk.send(smalltalk.send(self['@code'], "_element", []), "_selectionStart", []);
689
+ return $1;
690
+ },
691
+ args: [],
692
+ source: "selectionStart\x0a ^code element selectionStart",
693
+ messageSends: ["selectionStart", "element"],
694
+ referencedClasses: []
695
+ }),
696
+ smalltalk.HLCodeWidget);
697
+
698
+ smalltalk.addMethod(
699
+ "_selectionStart_",
700
+ smalltalk.method({
701
+ selector: "selectionStart:",
702
+ category: 'accessing',
703
+ fn: function (anInteger) {
704
+ var self = this;
705
+ smalltalk.send(smalltalk.send(self['@code'], "_element", []), "_selectionStart_", [anInteger]);
706
+ return self;
707
+ },
708
+ args: ["anInteger"],
709
+ source: "selectionStart: anInteger\x0a code element selectionStart: anInteger",
710
+ messageSends: ["selectionStart:", "element"],
711
+ referencedClasses: []
712
+ }),
713
+ smalltalk.HLCodeWidget);
714
+
715
+ smalltalk.addMethod(
716
+ "_setEditorOn_",
717
+ smalltalk.method({
718
+ selector: "setEditorOn:",
719
+ category: 'actions',
720
+ fn: function (aTextarea) {
721
+ var self = this;
722
+ self['@editor'] = CodeMirror.fromTextArea(aTextarea, {theme: "amber", lineNumbers: true, enterMode: "flat", matchBrackets: true, electricChars: false});
723
+ return self;
724
+ },
725
+ args: ["aTextarea"],
726
+ source: "setEditorOn: aTextarea\x0a\x09<self['@editor'] = CodeMirror.fromTextArea(aTextarea, {\x0a\x09\x09theme: 'amber',\x0a lineNumbers: true,\x0a enterMode: 'flat',\x0a matchBrackets: true,\x0a electricChars: false\x0a\x09})>",
727
+ messageSends: [],
728
+ referencedClasses: []
729
+ }),
730
+ smalltalk.HLCodeWidget);
731
+
732
+
733
+
734
+ smalltalk.addClass('HLWorkspace', smalltalk.HLWidget, ['model', 'codeWidget'], 'Helios-Workspace');
735
+ smalltalk.addMethod(
736
+ "_codeWidget",
737
+ smalltalk.method({
738
+ selector: "codeWidget",
739
+ category: 'accessing',
740
+ fn: function () {
741
+ var self = this;
742
+ var $2, $3, $1;
743
+ if (($receiver = self['@codeWidget']) == nil || $receiver == undefined) {
744
+ $2 = smalltalk.send(smalltalk.HLCodeWidget || HLCodeWidget, "_new", []);
745
+ smalltalk.send($2, "_model_", [smalltalk.send(smalltalk.send(self, "_model", []), "_code", [])]);
746
+ $3 = smalltalk.send($2, "_yourself", []);
747
+ self['@codeWidget'] = $3;
748
+ $1 = self['@codeWidget'];
749
+ } else {
750
+ $1 = self['@codeWidget'];
751
+ }
752
+ return $1;
753
+ },
754
+ args: [],
755
+ source: "codeWidget\x0a\x09^ codeWidget ifNil: [\x0a\x09\x09codeWidget := HLCodeWidget new\x0a \x09\x09model: self model code;\x0a \x09yourself ]",
756
+ messageSends: ["ifNil:", "model:", "code", "model", "new", "yourself"],
757
+ referencedClasses: ["HLCodeWidget"]
758
+ }),
759
+ smalltalk.HLWorkspace);
760
+
761
+ smalltalk.addMethod(
762
+ "_model",
763
+ smalltalk.method({
764
+ selector: "model",
765
+ category: 'accessing',
766
+ fn: function () {
767
+ var self = this;
768
+ var $1;
769
+ if (($receiver = self['@model']) == nil || $receiver == undefined) {
770
+ smalltalk.send(self, "_model_", [smalltalk.send(smalltalk.HLWorkspaceModel || HLWorkspaceModel, "_new", [])]);
771
+ $1 = self['@model'];
772
+ } else {
773
+ $1 = self['@model'];
774
+ }
775
+ return $1;
776
+ },
777
+ args: [],
778
+ source: "model\x0a\x09^ model ifNil: [ \x0a \x09self model: HLWorkspaceModel new.\x0a\x09\x09model ]",
779
+ messageSends: ["ifNil:", "model:", "new"],
780
+ referencedClasses: ["HLWorkspaceModel"]
781
+ }),
782
+ smalltalk.HLWorkspace);
783
+
784
+ smalltalk.addMethod(
785
+ "_model_",
786
+ smalltalk.method({
787
+ selector: "model:",
788
+ category: 'accessing',
789
+ fn: function (aModel) {
790
+ var self = this;
791
+ self['@model'] = aModel;
792
+ smalltalk.send(smalltalk.send(self, "_codeWidget", []), "_model_", [smalltalk.send(aModel, "_code", [])]);
793
+ smalltalk.send(self, "_observeCodeWidget", []);
794
+ return self;
795
+ },
796
+ args: ["aModel"],
797
+ source: "model: aModel\x0a\x09model := aModel.\x0a \x0a self codeWidget model: aModel code.\x0a self observeCodeWidget.\x0a ",
798
+ messageSends: ["model:", "code", "codeWidget", "observeCodeWidget"],
799
+ referencedClasses: []
800
+ }),
801
+ smalltalk.HLWorkspace);
802
+
803
+ smalltalk.addMethod(
804
+ "_observeCodeWidget",
805
+ smalltalk.method({
806
+ selector: "observeCodeWidget",
807
+ category: 'actions',
808
+ fn: function () {
809
+ var self = this;
810
+ return self;
811
+ },
812
+ args: [],
813
+ source: "observeCodeWidget\x0a\x0a",
814
+ messageSends: [],
815
+ referencedClasses: []
816
+ }),
817
+ smalltalk.HLWorkspace);
818
+
819
+ smalltalk.addMethod(
820
+ "_onDoIt",
821
+ smalltalk.method({
822
+ selector: "onDoIt",
823
+ category: 'reactions',
824
+ fn: function () {
825
+ var self = this;
826
+ return self;
827
+ },
828
+ args: [],
829
+ source: "onDoIt",
830
+ messageSends: [],
831
+ referencedClasses: []
832
+ }),
833
+ smalltalk.HLWorkspace);
834
+
835
+ smalltalk.addMethod(
836
+ "_onInspectIt",
837
+ smalltalk.method({
838
+ selector: "onInspectIt",
839
+ category: 'reactions',
840
+ fn: function () {
841
+ var self = this;
842
+ return self;
843
+ },
844
+ args: [],
845
+ source: "onInspectIt",
846
+ messageSends: [],
847
+ referencedClasses: []
848
+ }),
849
+ smalltalk.HLWorkspace);
850
+
851
+ smalltalk.addMethod(
852
+ "_onPrintIt",
853
+ smalltalk.method({
854
+ selector: "onPrintIt",
855
+ category: 'reactions',
856
+ fn: function () {
857
+ var self = this;
858
+ return self;
859
+ },
860
+ args: [],
861
+ source: "onPrintIt",
862
+ messageSends: [],
863
+ referencedClasses: []
864
+ }),
865
+ smalltalk.HLWorkspace);
866
+
867
+ smalltalk.addMethod(
868
+ "_renderContentOn_",
869
+ smalltalk.method({
870
+ selector: "renderContentOn:",
871
+ category: 'rendering',
872
+ fn: function (html) {
873
+ var self = this;
874
+ smalltalk.send(html, "_with_", [smalltalk.send(self, "_codeWidget", [])]);
875
+ return self;
876
+ },
877
+ args: ["html"],
878
+ source: "renderContentOn: html\x0a\x09html with: self codeWidget\x0a ",
879
+ messageSends: ["with:", "codeWidget"],
880
+ referencedClasses: []
881
+ }),
882
+ smalltalk.HLWorkspace);
883
+
884
+
885
+ smalltalk.addMethod(
886
+ "_canBeOpenAsTab",
887
+ smalltalk.method({
888
+ selector: "canBeOpenAsTab",
889
+ category: 'testing',
890
+ fn: function () {
891
+ var self = this;
892
+ return true;
893
+ },
894
+ args: [],
895
+ source: "canBeOpenAsTab\x0a\x09^ true",
896
+ messageSends: [],
897
+ referencedClasses: []
898
+ }),
899
+ smalltalk.HLWorkspace.klass);
900
+
901
+ smalltalk.addMethod(
902
+ "_tabLabel",
903
+ smalltalk.method({
904
+ selector: "tabLabel",
905
+ category: 'accessing',
906
+ fn: function () {
907
+ var self = this;
908
+ return "Workspace";
909
+ },
910
+ args: [],
911
+ source: "tabLabel\x0a\x09^ 'Workspace'",
912
+ messageSends: [],
913
+ referencedClasses: []
914
+ }),
915
+ smalltalk.HLWorkspace.klass);
916
+
917
+ smalltalk.addMethod(
918
+ "_tabPriority",
919
+ smalltalk.method({
920
+ selector: "tabPriority",
921
+ category: 'accessing',
922
+ fn: function () {
923
+ var self = this;
924
+ return 10;
925
+ },
926
+ args: [],
927
+ source: "tabPriority\x0a\x09^ 10",
928
+ messageSends: [],
929
+ referencedClasses: []
930
+ }),
931
+ smalltalk.HLWorkspace.klass);
932
+
933
+
934
+ smalltalk.addClass('HLWorkspaceModel', smalltalk.Object, ['announcer', 'environment', 'code'], 'Helios-Workspace');
935
+ smalltalk.addMethod(
936
+ "_announcer",
937
+ smalltalk.method({
938
+ selector: "announcer",
939
+ category: 'accessing',
940
+ fn: function () {
941
+ var self = this;
942
+ var $1;
943
+ if (($receiver = self['@announcer']) == nil || $receiver == undefined) {
944
+ self['@announcer'] = smalltalk.send(smalltalk.Announcer || Announcer, "_new", []);
945
+ $1 = self['@announcer'];
946
+ } else {
947
+ $1 = self['@announcer'];
948
+ }
949
+ return $1;
950
+ },
951
+ args: [],
952
+ source: "announcer\x0a\x09^ announcer ifNil: [ announcer := Announcer new ]",
953
+ messageSends: ["ifNil:", "new"],
954
+ referencedClasses: ["Announcer"]
955
+ }),
956
+ smalltalk.HLWorkspaceModel);
957
+
958
+ smalltalk.addMethod(
959
+ "_code",
960
+ smalltalk.method({
961
+ selector: "code",
962
+ category: 'accessing',
963
+ fn: function () {
964
+ var self = this;
965
+ var $1;
966
+ if (($receiver = self['@code']) == nil || $receiver == undefined) {
967
+ $1 = smalltalk.send(smalltalk.HLCodeModel || HLCodeModel, "_on_", [smalltalk.send(self, "_environment", [])]);
968
+ } else {
969
+ $1 = self['@code'];
970
+ }
971
+ return $1;
972
+ },
973
+ args: [],
974
+ source: "code\x0a\x09\x22Answers the code model working for this workspace model\x22\x0a\x09^ code ifNil:[ HLCodeModel on: self environment ]",
975
+ messageSends: ["ifNil:", "on:", "environment"],
976
+ referencedClasses: ["HLCodeModel"]
977
+ }),
978
+ smalltalk.HLWorkspaceModel);
979
+
980
+ smalltalk.addMethod(
981
+ "_environment",
982
+ smalltalk.method({
983
+ selector: "environment",
984
+ category: 'accessing',
985
+ fn: function () {
986
+ var self = this;
987
+ var $1;
988
+ if (($receiver = self['@environment']) == nil || $receiver == undefined) {
989
+ $1 = smalltalk.send(smalltalk.send(smalltalk.HLManager || HLManager, "_current", []), "_environment", []);
990
+ } else {
991
+ $1 = self['@environment'];
992
+ }
993
+ return $1;
994
+ },
995
+ args: [],
996
+ source: "environment\x0a\x09^ environment ifNil: [ HLManager current environment ]",
997
+ messageSends: ["ifNil:", "environment", "current"],
998
+ referencedClasses: ["HLManager"]
999
+ }),
1000
+ smalltalk.HLWorkspaceModel);
1001
+
1002
+ smalltalk.addMethod(
1003
+ "_environment_",
1004
+ smalltalk.method({
1005
+ selector: "environment:",
1006
+ category: 'accessing',
1007
+ fn: function (anEnvironment) {
1008
+ var self = this;
1009
+ self['@environment'] = anEnvironment;
1010
+ return self;
1011
+ },
1012
+ args: ["anEnvironment"],
1013
+ source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
1014
+ messageSends: [],
1015
+ referencedClasses: []
1016
+ }),
1017
+ smalltalk.HLWorkspaceModel);
1018
+
1019
+ smalltalk.addMethod(
1020
+ "_onKeyDown_",
1021
+ smalltalk.method({
1022
+ selector: "onKeyDown:",
1023
+ category: 'reactions',
1024
+ fn: function (anEvent) {
1025
+ var self = this;
1026
+ if (anEvent.ctrlKey) {
1027
+ if (anEvent.keyCode === 80) {
1028
+ self._printIt();
1029
+ anEvent.preventDefault();
1030
+ return false;
1031
+ }
1032
+ if (anEvent.keyCode === 68) {
1033
+ self._doIt();
1034
+ anEvent.preventDefault();
1035
+ return false;
1036
+ }
1037
+ if (anEvent.keyCode === 73) {
1038
+ self._inspectIt();
1039
+ anEvent.preventDefault();
1040
+ return false;
1041
+ }
1042
+ }
1043
+ return self;
1044
+ },
1045
+ args: ["anEvent"],
1046
+ source: "onKeyDown: anEvent\x0a\x0a\x09<if(anEvent.ctrlKey) {\x0a\x09\x09if(anEvent.keyCode === 80) { //ctrl+p\x0a\x09\x09\x09self._printIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09\x09if(anEvent.keyCode === 68) { //ctrl+d\x0a\x09\x09\x09self._doIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09\x09if(anEvent.keyCode === 73) { //ctrl+i\x0a\x09\x09\x09self._inspectIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09}>",
1047
+ messageSends: [],
1048
+ referencedClasses: []
1049
+ }),
1050
+ smalltalk.HLWorkspaceModel);
1051
+
1052
+
1053
+ smalltalk.addMethod(
1054
+ "_on_",
1055
+ smalltalk.method({
1056
+ selector: "on:",
1057
+ category: 'actions',
1058
+ fn: function (anEnvironment) {
1059
+ var self = this;
1060
+ var $2, $3, $1;
1061
+ $2 = smalltalk.send(self, "_new", []);
1062
+ smalltalk.send($2, "_environment_", [anEnvironment]);
1063
+ $3 = smalltalk.send($2, "_yourself", []);
1064
+ $1 = $3;
1065
+ return $1;
1066
+ },
1067
+ args: ["anEnvironment"],
1068
+ source: "on: anEnvironment\x0a\x0a\x09^ self new\x0a \x09environment: anEnvironment;\x0a yourself",
1069
+ messageSends: ["environment:", "new", "yourself"],
1070
+ referencedClasses: []
1071
+ }),
1072
+ smalltalk.HLWorkspaceModel.klass);
1073
+
1074
+