resin 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/amber/bin/amberc +4 -3
- data/amber/js/IDE.deploy.js +147 -45
- data/amber/js/IDE.js +155 -53
- data/amber/js/Kernel-Classes.deploy.js +20 -14
- data/amber/js/Kernel-Classes.js +29 -18
- data/amber/js/Kernel-Collections.deploy.js +82 -0
- data/amber/js/Kernel-Collections.js +102 -0
- data/amber/js/Kernel-Methods.deploy.js +374 -261
- data/amber/js/Kernel-Methods.js +417 -269
- data/amber/js/Kernel-Objects.deploy.js +90 -28
- data/amber/js/Kernel-Objects.js +121 -34
- data/amber/js/Kernel-Tests.deploy.js +35 -0
- data/amber/js/Kernel-Tests.js +45 -0
- data/amber/js/SUnit.deploy.js +175 -17
- data/amber/js/SUnit.js +237 -24
- data/amber/js/amber.js +2 -1
- data/amber/js/boot.js +74 -18
- data/amber/js/lib/es5-shim-2.0.2/CHANGES +93 -0
- data/amber/js/lib/es5-shim-2.0.2/CONTRIBUTORS.md +25 -0
- data/amber/js/lib/es5-shim-2.0.2/LICENSE +19 -0
- data/amber/js/lib/es5-shim-2.0.2/README.md +161 -0
- data/amber/js/lib/es5-shim-2.0.2/es5-sham.js +348 -0
- data/amber/js/lib/es5-shim-2.0.2/es5-sham.min.js +6 -0
- data/amber/js/lib/es5-shim-2.0.2/es5-shim.js +963 -0
- data/amber/js/lib/es5-shim-2.0.2/es5-shim.min.js +16 -0
- data/amber/js/lib/es5-shim-2.0.2/minify +2 -0
- data/amber/js/lib/es5-shim-2.0.2/package.json +31 -0
- data/amber/js/lib/es5-shim-2.0.2/tests/helpers/h-kill.js +59 -0
- data/amber/js/lib/es5-shim-2.0.2/tests/helpers/h-matchers.js +34 -0
- data/amber/js/lib/es5-shim-2.0.2/tests/helpers/h.js +3 -0
- data/amber/js/lib/es5-shim-2.0.2/tests/index.html +62 -0
- data/amber/js/lib/es5-shim-2.0.2/tests/lib/jasmine-html.js +190 -0
- data/amber/js/lib/es5-shim-2.0.2/tests/lib/jasmine.css +166 -0
- data/amber/js/lib/es5-shim-2.0.2/tests/lib/jasmine.js +2477 -0
- data/amber/js/lib/es5-shim-2.0.2/tests/lib/jasmine_favicon.png +0 -0
- data/amber/js/lib/es5-shim-2.0.2/tests/lib/json2.js +478 -0
- data/amber/js/lib/es5-shim-2.0.2/tests/spec/s-array.js +1138 -0
- data/amber/js/lib/es5-shim-2.0.2/tests/spec/s-date.js +117 -0
- data/amber/js/lib/es5-shim-2.0.2/tests/spec/s-function.js +147 -0
- data/amber/js/lib/es5-shim-2.0.2/tests/spec/s-object.js +84 -0
- data/amber/js/lib/es5-shim-2.0.2/tests/spec/s-string.js +24 -0
- data/amber/st/IDE.st +15 -16
- data/amber/st/Kernel-Classes.st +9 -9
- data/amber/st/Kernel-Collections.st +37 -0
- data/amber/st/Kernel-Methods.st +63 -8
- data/amber/st/Kernel-Objects.st +34 -7
- data/amber/st/Kernel-Tests.st +10 -0
- data/amber/st/SUnit.st +86 -9
- metadata +44 -21
- data/amber/js/compat.js +0 -22
data/amber/bin/amberc
CHANGED
@@ -99,8 +99,8 @@ if [ -z $1 ] ; then
|
|
99
99
|
fi
|
100
100
|
|
101
101
|
# Define our predefined library combinations
|
102
|
-
KERNEL="boot Kernel-Objects Kernel-Classes Kernel-Methods Kernel-Collections Kernel-Exceptions Kernel-Transcript"
|
103
|
-
COMPILER="$KERNEL parser Compiler"
|
102
|
+
KERNEL="boot Kernel-Objects Kernel-Classes Kernel-Methods Kernel-Collections Kernel-Exceptions Kernel-Transcript Kernel-Announcements"
|
103
|
+
COMPILER="$KERNEL parser Compiler Compiler-Exceptions"
|
104
104
|
|
105
105
|
# Predefined initializer
|
106
106
|
INITIALIZER="$AMBER/js/init.js"
|
@@ -216,7 +216,8 @@ done
|
|
216
216
|
LIBS="$TOBASE $TOLOAD"
|
217
217
|
|
218
218
|
# Get a unique tempdir and make it get auto removed on exit
|
219
|
-
TMPDIR=`mktemp -d amberc.XXXXXX`
|
219
|
+
TMPDIR=`mktemp -d amberc.XXXXXX 2>>/dev/null` ||\
|
220
|
+
TMPDIR=/tmp/amberc.$$.`date +%s` && mkdir -p $TMPDIR
|
220
221
|
trap "rm -rf $TMPDIR" EXIT
|
221
222
|
|
222
223
|
|
data/amber/js/IDE.deploy.js
CHANGED
@@ -2354,29 +2354,128 @@ smalltalk.addMethod(
|
|
2354
2354
|
"_updateSourceAndButtons",
|
2355
2355
|
smalltalk.method({
|
2356
2356
|
selector: "updateSourceAndButtons",
|
2357
|
-
fn: function ()
|
2358
|
-
|
2359
|
-
|
2360
|
-
|
2361
|
-
|
2362
|
-
|
2363
|
-
|
2364
|
-
|
2365
|
-
|
2366
|
-
|
2367
|
-
|
2368
|
-
|
2369
|
-
|
2370
|
-
|
2371
|
-
|
2372
|
-
|
2373
|
-
|
2374
|
-
|
2375
|
-
|
2376
|
-
|
2377
|
-
|
2378
|
-
|
2379
|
-
|
2357
|
+
fn: function (){
|
2358
|
+
var self=this;
|
2359
|
+
var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$14,$15,$16,$17,$18,$19,$13,$20,$22,$23,$24,$25,$21,$26,$27;
|
2360
|
+
var currentProtocol;
|
2361
|
+
smalltalk.send(self,"_disableSaveButton",[]);
|
2362
|
+
smalltalk.send(self["@classButtons"],"_contents_",[(function(html){
|
2363
|
+
$1=smalltalk.send(html,"_button",[]);
|
2364
|
+
smalltalk.send($1,"_title_",["Create a new class"]);
|
2365
|
+
smalltalk.send($1,"_onClick_",[(function(){
|
2366
|
+
return smalltalk.send(self,"_addNewClass",[]);
|
2367
|
+
})]);
|
2368
|
+
$2=smalltalk.send($1,"_with_",["New class"]);
|
2369
|
+
$2;
|
2370
|
+
$3=smalltalk.send(html,"_button",[]);
|
2371
|
+
smalltalk.send($3,"_with_",["Rename class"]);
|
2372
|
+
$4=smalltalk.send($3,"_onClick_",[(function(){
|
2373
|
+
return smalltalk.send(self,"_renameClass",[]);
|
2374
|
+
})]);
|
2375
|
+
$4;
|
2376
|
+
$5=smalltalk.send(html,"_button",[]);
|
2377
|
+
smalltalk.send($5,"_with_",["Copy class"]);
|
2378
|
+
$6=smalltalk.send($5,"_onClick_",[(function(){
|
2379
|
+
return smalltalk.send(self,"_copyClass",[]);
|
2380
|
+
})]);
|
2381
|
+
$6;
|
2382
|
+
$7=smalltalk.send(html,"_button",[]);
|
2383
|
+
smalltalk.send($7,"_with_",["Remove class"]);
|
2384
|
+
$8=smalltalk.send($7,"_onClick_",[(function(){
|
2385
|
+
return smalltalk.send(self,"_removeClass",[]);
|
2386
|
+
})]);
|
2387
|
+
$8;
|
2388
|
+
$9=smalltalk.send(html,"_button",[]);
|
2389
|
+
smalltalk.send($9,"_with_",["References"]);
|
2390
|
+
$10=smalltalk.send($9,"_onClick_",[(function(){
|
2391
|
+
return smalltalk.send(self,"_searchClassReferences",[]);
|
2392
|
+
})]);
|
2393
|
+
return $10;
|
2394
|
+
})]);
|
2395
|
+
smalltalk.send(self["@methodButtons"],"_contents_",[(function(html){
|
2396
|
+
var protocolSelect;
|
2397
|
+
var referencesSelect;
|
2398
|
+
$11=smalltalk.send(html,"_button",[]);
|
2399
|
+
smalltalk.send($11,"_with_",["Remove method"]);
|
2400
|
+
$12=smalltalk.send($11,"_onClick_",[(function(){
|
2401
|
+
return smalltalk.send(self,"_removeMethod",[]);
|
2402
|
+
})]);
|
2403
|
+
$12;
|
2404
|
+
protocolSelect=smalltalk.send(html,"_select",[]);
|
2405
|
+
protocolSelect;
|
2406
|
+
smalltalk.send(protocolSelect,"_onChange_",[(function(){
|
2407
|
+
return smalltalk.send(self,"_setMethodProtocol_",[smalltalk.send(smalltalk.send(protocolSelect,"_asJQuery",[]),"_val",[])]);
|
2408
|
+
})]);
|
2409
|
+
$13=smalltalk.send(protocolSelect,"_with_",[(function(){
|
2410
|
+
$14=smalltalk.send(html,"_option",[]);
|
2411
|
+
smalltalk.send($14,"_with_",["Method protocol"]);
|
2412
|
+
$15=smalltalk.send($14,"_at_put_",["disabled","disabled"]);
|
2413
|
+
$15;
|
2414
|
+
$16=smalltalk.send(html,"_option",[]);
|
2415
|
+
smalltalk.send($16,"_class_",["important"]);
|
2416
|
+
$17=smalltalk.send($16,"_with_",["New..."]);
|
2417
|
+
$17;
|
2418
|
+
currentProtocol=self["@selectedProtocol"];
|
2419
|
+
currentProtocol;
|
2420
|
+
$18=smalltalk.send(smalltalk.send(currentProtocol,"_isNil",[]),"_and_",[(function(){
|
2421
|
+
return smalltalk.send(self["@selectedMethod"],"_notNil",[]);
|
2422
|
+
})]);
|
2423
|
+
if(smalltalk.assert($18)){
|
2424
|
+
currentProtocol=smalltalk.send(self["@selectedMethod"],"_category",[]);
|
2425
|
+
currentProtocol;
|
2426
|
+
};
|
2427
|
+
return smalltalk.send(smalltalk.send(self,"_protocols",[]),"_do_",[(function(each){
|
2428
|
+
option=smalltalk.send(smalltalk.send(html,"_option",[]),"_with_",[each]);
|
2429
|
+
option;
|
2430
|
+
$19=smalltalk.send(currentProtocol,"__eq",[each]);
|
2431
|
+
if(smalltalk.assert($19)){
|
2432
|
+
return smalltalk.send(option,"_at_put_",["selected","selected"]);
|
2433
|
+
};
|
2434
|
+
})]);
|
2435
|
+
})]);
|
2436
|
+
$13;
|
2437
|
+
$20=smalltalk.send(self["@selectedMethod"],"_isNil",[]);
|
2438
|
+
if(! smalltalk.assert($20)){
|
2439
|
+
referencesSelect=smalltalk.send(html,"_select",[]);
|
2440
|
+
referencesSelect;
|
2441
|
+
smalltalk.send(referencesSelect,"_onChange_",[(function(){
|
2442
|
+
return smalltalk.send(self,"_searchReferencesOf_",[smalltalk.send(smalltalk.send(referencesSelect,"_asJQuery",[]),"_val",[])]);
|
2443
|
+
})]);
|
2444
|
+
$21=smalltalk.send(referencesSelect,"_with_",[(function(){
|
2445
|
+
var option;
|
2446
|
+
$22=smalltalk.send(html,"_option",[]);
|
2447
|
+
smalltalk.send($22,"_with_",["References"]);
|
2448
|
+
smalltalk.send($22,"_at_put_",["disabled","disabled"]);
|
2449
|
+
$23=smalltalk.send($22,"_at_put_",["selected","selected"]);
|
2450
|
+
$23;
|
2451
|
+
$24=smalltalk.send(html,"_option",[]);
|
2452
|
+
smalltalk.send($24,"_class_",["important"]);
|
2453
|
+
$25=smalltalk.send($24,"_with_",[smalltalk.send(self["@selectedMethod"],"_selector",[])]);
|
2454
|
+
$25;
|
2455
|
+
return smalltalk.send(smalltalk.send(smalltalk.send(self["@selectedMethod"],"_messageSends",[]),"_sorted",[]),"_do_",[(function(each){
|
2456
|
+
return smalltalk.send(smalltalk.send(html,"_option",[]),"_with_",[each]);
|
2457
|
+
})]);
|
2458
|
+
})]);
|
2459
|
+
return $21;
|
2460
|
+
};
|
2461
|
+
})]);
|
2462
|
+
$26=smalltalk.send(self["@selectedMethod"],"_isNil",[]);
|
2463
|
+
if(smalltalk.assert($26)){
|
2464
|
+
smalltalk.send(self,"_hideMethodButtons",[]);
|
2465
|
+
$27=smalltalk.send(smalltalk.send(self["@selectedClass"],"_isNil",[]),"_or_",[(function(){
|
2466
|
+
return smalltalk.send(self["@selectedProtocol"],"_notNil",[]);
|
2467
|
+
})]);
|
2468
|
+
if(smalltalk.assert($27)){
|
2469
|
+
smalltalk.send(self,"_hideClassButtons",[]);
|
2470
|
+
} else {
|
2471
|
+
smalltalk.send(self,"_showClassButtons",[]);
|
2472
|
+
};
|
2473
|
+
} else {
|
2474
|
+
smalltalk.send(self,"_hideClassButtons",[]);
|
2475
|
+
smalltalk.send(self,"_showMethodButtons",[]);
|
2476
|
+
};
|
2477
|
+
smalltalk.send(self["@sourceArea"],"_val_",[smalltalk.send(self,"_source",[])]);
|
2478
|
+
return self}
|
2380
2479
|
}),
|
2381
2480
|
smalltalk.Browser);
|
2382
2481
|
|
@@ -3910,12 +4009,10 @@ smalltalk.addMethod(
|
|
3910
4009
|
"_performFailure_",
|
3911
4010
|
smalltalk.method({
|
3912
4011
|
selector: "performFailure:",
|
3913
|
-
fn: function (aTestCase)
|
3914
|
-
|
3915
|
-
|
3916
|
-
|
3917
|
-
return self;
|
3918
|
-
}
|
4012
|
+
fn: function (aTestCase){
|
4013
|
+
var self=this;
|
4014
|
+
smalltalk.send(aTestCase,"_runCase",[]);
|
4015
|
+
return self}
|
3919
4016
|
}),
|
3920
4017
|
smalltalk.TestRunner);
|
3921
4018
|
|
@@ -3949,11 +4046,11 @@ smalltalk.addMethod(
|
|
3949
4046
|
"_printPasses",
|
3950
4047
|
smalltalk.method({
|
3951
4048
|
selector: "printPasses",
|
3952
|
-
fn: function ()
|
3953
|
-
|
3954
|
-
|
3955
|
-
|
3956
|
-
|
4049
|
+
fn: function (){
|
4050
|
+
var self=this;
|
4051
|
+
var $1;
|
4052
|
+
$1=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self,"_result",[]),"_runs",[]),"__minus",[smalltalk.send(smalltalk.send(smalltalk.send(self,"_result",[]),"_errors",[]),"_size",[])]),"__minus",[smalltalk.send(smalltalk.send(smalltalk.send(self,"_result",[]),"_failures",[]),"_size",[])]),"_asString",[]),"__comma",[" passes, "]);
|
4053
|
+
return $1;
|
3957
4054
|
}
|
3958
4055
|
}),
|
3959
4056
|
smalltalk.TestRunner);
|
@@ -4102,17 +4199,22 @@ smalltalk.addMethod(
|
|
4102
4199
|
"_run_",
|
4103
4200
|
smalltalk.method({
|
4104
4201
|
selector: "run:",
|
4105
|
-
fn: function (aCollection)
|
4106
|
-
|
4107
|
-
|
4108
|
-
|
4109
|
-
|
4110
|
-
|
4111
|
-
|
4112
|
-
|
4113
|
-
|
4114
|
-
|
4115
|
-
|
4202
|
+
fn: function (aCollection){
|
4203
|
+
var self=this;
|
4204
|
+
var $1;
|
4205
|
+
var worker;
|
4206
|
+
worker=smalltalk.send((smalltalk.TestSuiteRunner || TestSuiteRunner),"_on_",[aCollection]);
|
4207
|
+
self["@result"]=smalltalk.send(worker,"_result",[]);
|
4208
|
+
smalltalk.send(smalltalk.send(worker,"_announcer",[]),"_on_do_",[(smalltalk.ResultAnnouncement || ResultAnnouncement),(function(ann){
|
4209
|
+
$1=smalltalk.send(smalltalk.send(ann,"_result",[]),"__eq_eq",[self["@result"]]);
|
4210
|
+
if(smalltalk.assert($1)){
|
4211
|
+
smalltalk.send(smalltalk.send(self,"_progressBar",[]),"_updatePercent_",[smalltalk.send(smalltalk.send(smalltalk.send(self["@result"],"_runs",[]),"__slash",[smalltalk.send(self["@result"],"_total",[])]),"__star",[(100)])]);
|
4212
|
+
smalltalk.send(self,"_updateStatusDiv",[]);
|
4213
|
+
return smalltalk.send(self,"_updateMethodsList",[]);
|
4214
|
+
};
|
4215
|
+
})]);
|
4216
|
+
smalltalk.send(worker,"_run",[]);
|
4217
|
+
return self}
|
4116
4218
|
}),
|
4117
4219
|
smalltalk.TestRunner);
|
4118
4220
|
|
data/amber/js/IDE.js
CHANGED
@@ -3080,31 +3080,130 @@ smalltalk.addMethod(
|
|
3080
3080
|
smalltalk.method({
|
3081
3081
|
selector: "updateSourceAndButtons",
|
3082
3082
|
category: 'updating',
|
3083
|
-
fn: function ()
|
3084
|
-
|
3085
|
-
|
3086
|
-
|
3087
|
-
|
3088
|
-
|
3089
|
-
|
3090
|
-
|
3091
|
-
|
3092
|
-
|
3093
|
-
|
3094
|
-
|
3095
|
-
|
3096
|
-
|
3097
|
-
|
3098
|
-
|
3099
|
-
|
3100
|
-
|
3101
|
-
|
3102
|
-
|
3103
|
-
|
3104
|
-
|
3105
|
-
|
3083
|
+
fn: function (){
|
3084
|
+
var self=this;
|
3085
|
+
var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$14,$15,$16,$17,$18,$19,$13,$20,$22,$23,$24,$25,$21,$26,$27;
|
3086
|
+
var currentProtocol;
|
3087
|
+
smalltalk.send(self,"_disableSaveButton",[]);
|
3088
|
+
smalltalk.send(self["@classButtons"],"_contents_",[(function(html){
|
3089
|
+
$1=smalltalk.send(html,"_button",[]);
|
3090
|
+
smalltalk.send($1,"_title_",["Create a new class"]);
|
3091
|
+
smalltalk.send($1,"_onClick_",[(function(){
|
3092
|
+
return smalltalk.send(self,"_addNewClass",[]);
|
3093
|
+
})]);
|
3094
|
+
$2=smalltalk.send($1,"_with_",["New class"]);
|
3095
|
+
$2;
|
3096
|
+
$3=smalltalk.send(html,"_button",[]);
|
3097
|
+
smalltalk.send($3,"_with_",["Rename class"]);
|
3098
|
+
$4=smalltalk.send($3,"_onClick_",[(function(){
|
3099
|
+
return smalltalk.send(self,"_renameClass",[]);
|
3100
|
+
})]);
|
3101
|
+
$4;
|
3102
|
+
$5=smalltalk.send(html,"_button",[]);
|
3103
|
+
smalltalk.send($5,"_with_",["Copy class"]);
|
3104
|
+
$6=smalltalk.send($5,"_onClick_",[(function(){
|
3105
|
+
return smalltalk.send(self,"_copyClass",[]);
|
3106
|
+
})]);
|
3107
|
+
$6;
|
3108
|
+
$7=smalltalk.send(html,"_button",[]);
|
3109
|
+
smalltalk.send($7,"_with_",["Remove class"]);
|
3110
|
+
$8=smalltalk.send($7,"_onClick_",[(function(){
|
3111
|
+
return smalltalk.send(self,"_removeClass",[]);
|
3112
|
+
})]);
|
3113
|
+
$8;
|
3114
|
+
$9=smalltalk.send(html,"_button",[]);
|
3115
|
+
smalltalk.send($9,"_with_",["References"]);
|
3116
|
+
$10=smalltalk.send($9,"_onClick_",[(function(){
|
3117
|
+
return smalltalk.send(self,"_searchClassReferences",[]);
|
3118
|
+
})]);
|
3119
|
+
return $10;
|
3120
|
+
})]);
|
3121
|
+
smalltalk.send(self["@methodButtons"],"_contents_",[(function(html){
|
3122
|
+
var protocolSelect;
|
3123
|
+
var referencesSelect;
|
3124
|
+
$11=smalltalk.send(html,"_button",[]);
|
3125
|
+
smalltalk.send($11,"_with_",["Remove method"]);
|
3126
|
+
$12=smalltalk.send($11,"_onClick_",[(function(){
|
3127
|
+
return smalltalk.send(self,"_removeMethod",[]);
|
3128
|
+
})]);
|
3129
|
+
$12;
|
3130
|
+
protocolSelect=smalltalk.send(html,"_select",[]);
|
3131
|
+
protocolSelect;
|
3132
|
+
smalltalk.send(protocolSelect,"_onChange_",[(function(){
|
3133
|
+
return smalltalk.send(self,"_setMethodProtocol_",[smalltalk.send(smalltalk.send(protocolSelect,"_asJQuery",[]),"_val",[])]);
|
3134
|
+
})]);
|
3135
|
+
$13=smalltalk.send(protocolSelect,"_with_",[(function(){
|
3136
|
+
$14=smalltalk.send(html,"_option",[]);
|
3137
|
+
smalltalk.send($14,"_with_",["Method protocol"]);
|
3138
|
+
$15=smalltalk.send($14,"_at_put_",["disabled","disabled"]);
|
3139
|
+
$15;
|
3140
|
+
$16=smalltalk.send(html,"_option",[]);
|
3141
|
+
smalltalk.send($16,"_class_",["important"]);
|
3142
|
+
$17=smalltalk.send($16,"_with_",["New..."]);
|
3143
|
+
$17;
|
3144
|
+
currentProtocol=self["@selectedProtocol"];
|
3145
|
+
currentProtocol;
|
3146
|
+
$18=smalltalk.send(smalltalk.send(currentProtocol,"_isNil",[]),"_and_",[(function(){
|
3147
|
+
return smalltalk.send(self["@selectedMethod"],"_notNil",[]);
|
3148
|
+
})]);
|
3149
|
+
if(smalltalk.assert($18)){
|
3150
|
+
currentProtocol=smalltalk.send(self["@selectedMethod"],"_category",[]);
|
3151
|
+
currentProtocol;
|
3152
|
+
};
|
3153
|
+
return smalltalk.send(smalltalk.send(self,"_protocols",[]),"_do_",[(function(each){
|
3154
|
+
option=smalltalk.send(smalltalk.send(html,"_option",[]),"_with_",[each]);
|
3155
|
+
option;
|
3156
|
+
$19=smalltalk.send(currentProtocol,"__eq",[each]);
|
3157
|
+
if(smalltalk.assert($19)){
|
3158
|
+
return smalltalk.send(option,"_at_put_",["selected","selected"]);
|
3159
|
+
};
|
3160
|
+
})]);
|
3161
|
+
})]);
|
3162
|
+
$13;
|
3163
|
+
$20=smalltalk.send(self["@selectedMethod"],"_isNil",[]);
|
3164
|
+
if(! smalltalk.assert($20)){
|
3165
|
+
referencesSelect=smalltalk.send(html,"_select",[]);
|
3166
|
+
referencesSelect;
|
3167
|
+
smalltalk.send(referencesSelect,"_onChange_",[(function(){
|
3168
|
+
return smalltalk.send(self,"_searchReferencesOf_",[smalltalk.send(smalltalk.send(referencesSelect,"_asJQuery",[]),"_val",[])]);
|
3169
|
+
})]);
|
3170
|
+
$21=smalltalk.send(referencesSelect,"_with_",[(function(){
|
3171
|
+
var option;
|
3172
|
+
$22=smalltalk.send(html,"_option",[]);
|
3173
|
+
smalltalk.send($22,"_with_",["References"]);
|
3174
|
+
smalltalk.send($22,"_at_put_",["disabled","disabled"]);
|
3175
|
+
$23=smalltalk.send($22,"_at_put_",["selected","selected"]);
|
3176
|
+
$23;
|
3177
|
+
$24=smalltalk.send(html,"_option",[]);
|
3178
|
+
smalltalk.send($24,"_class_",["important"]);
|
3179
|
+
$25=smalltalk.send($24,"_with_",[smalltalk.send(self["@selectedMethod"],"_selector",[])]);
|
3180
|
+
$25;
|
3181
|
+
return smalltalk.send(smalltalk.send(smalltalk.send(self["@selectedMethod"],"_messageSends",[]),"_sorted",[]),"_do_",[(function(each){
|
3182
|
+
return smalltalk.send(smalltalk.send(html,"_option",[]),"_with_",[each]);
|
3183
|
+
})]);
|
3184
|
+
})]);
|
3185
|
+
return $21;
|
3186
|
+
};
|
3187
|
+
})]);
|
3188
|
+
$26=smalltalk.send(self["@selectedMethod"],"_isNil",[]);
|
3189
|
+
if(smalltalk.assert($26)){
|
3190
|
+
smalltalk.send(self,"_hideMethodButtons",[]);
|
3191
|
+
$27=smalltalk.send(smalltalk.send(self["@selectedClass"],"_isNil",[]),"_or_",[(function(){
|
3192
|
+
return smalltalk.send(self["@selectedProtocol"],"_notNil",[]);
|
3193
|
+
})]);
|
3194
|
+
if(smalltalk.assert($27)){
|
3195
|
+
smalltalk.send(self,"_hideClassButtons",[]);
|
3196
|
+
} else {
|
3197
|
+
smalltalk.send(self,"_showClassButtons",[]);
|
3198
|
+
};
|
3199
|
+
} else {
|
3200
|
+
smalltalk.send(self,"_hideClassButtons",[]);
|
3201
|
+
smalltalk.send(self,"_showMethodButtons",[]);
|
3202
|
+
};
|
3203
|
+
smalltalk.send(self["@sourceArea"],"_val_",[smalltalk.send(self,"_source",[])]);
|
3204
|
+
return self},
|
3106
3205
|
args: [],
|
3107
|
-
source: "updateSourceAndButtons\x0a\x09| currentProtocol |\x0a\x0a\x09self disableSaveButton.\x0a\x09classButtons contents: [:html |\x0a\x09\x09html button\x0a\x09\x09\x09title: 'Create a new class';\x0a\x09\x09\x09onClick: [self addNewClass];\x0a\x09\x09\x09with: 'New class'.\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Rename class';\x0a\x09\x09\x09onClick: [self renameClass].\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Copy class';\x0a\x09\x09\x09onClick: [self copyClass].\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Remove class';\x0a\x09\x09\x09onClick: [self removeClass].\x0a\x09\x09html button\x0a\x09\x09\x09with: 'References';\x0a\x09\x09\x09onClick: [self searchClassReferences]].\x0a\x09methodButtons contents: [:html | | protocolSelect referencesSelect |\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Remove method';\x0a\x09\x09\x09onClick: [self removeMethod].\x0a\x09\x09protocolSelect := html select.\x0a protocolSelect\x0a\x09\x09\x09onChange: [ self setMethodProtocol: protocolSelect asJQuery val];\x0a\x09\x09\x09with: [\x0a\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09with: 'Method protocol';\x0a\x09\x09\x09\x09\x09at: 'disabled' put: 'disabled'.\x0a\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09class: 'important';\x0a\x09\x09\x09\x09\x09with: 'New...'.\x0a currentProtocol := selectedProtocol.\x0a (currentProtocol isNil and: [ selectedMethod notNil ])\x0a \x09ifTrue: [ currentProtocol := selectedMethod category].\x0a\x09\x09\x09\x09self protocols do: [:each |\x0a\x09\x09\x09\x09\x09option := html option with: each.\x0a\x09\x09\x09\x09\x09currentProtocol = each ifTrue: [ option at: 'selected' put: 'selected' ] ]].\x0a\x09\x09selectedMethod isNil ifFalse: [\x0a\x09\x09\x09referencesSelect := html select.\x0a referencesSelect\x0a\x09\x09\x09\x09onChange: [self searchReferencesOf: referencesSelect asJQuery val];\x0a\x09\x09\x09\x09with: [ |option|\x0a\x09\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09\x09with: 'References';\x0a\x09\x09\x09\x09\x09\x09at: 'disabled' put: 'disabled'.\x0a\x09\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09\x09class: 'important';\x0a\x09\x09\x09\x09\x09\x09with: selectedMethod selector.\x0a\x09\x09\x09\x09\x09selectedMethod messageSends sorted do: [:each |\x0a\x09\x09\x09\x09\x09\x09html option with: each]]]].\x0a\x09selectedMethod isNil\x0a\x09\x09ifTrue: [\x0a\x09\x09\x09self hideMethodButtons.\x0a\x09\x09\x09\x09(selectedClass isNil or: [selectedProtocol notNil])\x0a\x09\x09\x09\x09\x09ifTrue: [self hideClassButtons]\x0a\x09\x09\x09\x09\x09ifFalse: [self showClassButtons]]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09self hideClassButtons.\x0a\x09\x09\x09self showMethodButtons].\x0a\x09sourceArea val: self source",
|
3206
|
+
source: "updateSourceAndButtons\x0a\x09| currentProtocol |\x0a\x0a\x09self disableSaveButton.\x0a\x09classButtons contents: [:html |\x0a\x09\x09html button\x0a\x09\x09\x09title: 'Create a new class';\x0a\x09\x09\x09onClick: [self addNewClass];\x0a\x09\x09\x09with: 'New class'.\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Rename class';\x0a\x09\x09\x09onClick: [self renameClass].\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Copy class';\x0a\x09\x09\x09onClick: [self copyClass].\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Remove class';\x0a\x09\x09\x09onClick: [self removeClass].\x0a\x09\x09html button\x0a\x09\x09\x09with: 'References';\x0a\x09\x09\x09onClick: [self searchClassReferences]].\x0a\x09methodButtons contents: [:html | | protocolSelect referencesSelect |\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Remove method';\x0a\x09\x09\x09onClick: [self removeMethod].\x0a\x09\x09protocolSelect := html select.\x0a protocolSelect\x0a\x09\x09\x09onChange: [ self setMethodProtocol: protocolSelect asJQuery val];\x0a\x09\x09\x09with: [\x0a\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09with: 'Method protocol';\x0a\x09\x09\x09\x09\x09at: 'disabled' put: 'disabled'.\x0a\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09class: 'important';\x0a\x09\x09\x09\x09\x09with: 'New...'.\x0a currentProtocol := selectedProtocol.\x0a (currentProtocol isNil and: [ selectedMethod notNil ])\x0a \x09ifTrue: [ currentProtocol := selectedMethod category].\x0a\x09\x09\x09\x09self protocols do: [:each |\x0a\x09\x09\x09\x09\x09option := html option with: each.\x0a\x09\x09\x09\x09\x09currentProtocol = each ifTrue: [ option at: 'selected' put: 'selected' ] ]].\x0a\x09\x09selectedMethod isNil ifFalse: [\x0a\x09\x09\x09referencesSelect := html select.\x0a referencesSelect\x0a\x09\x09\x09\x09onChange: [self searchReferencesOf: referencesSelect asJQuery val];\x0a\x09\x09\x09\x09with: [ |option|\x0a\x09\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09\x09with: 'References';\x0a\x09\x09\x09\x09\x09\x09at: 'disabled' put: 'disabled';\x0a at: 'selected' put: 'selected'.\x0a\x09\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09\x09class: 'important';\x0a\x09\x09\x09\x09\x09\x09with: selectedMethod selector.\x0a\x09\x09\x09\x09\x09selectedMethod messageSends sorted do: [:each |\x0a\x09\x09\x09\x09\x09\x09html option with: each]]]].\x0a\x09selectedMethod isNil\x0a\x09\x09ifTrue: [\x0a\x09\x09\x09self hideMethodButtons.\x0a\x09\x09\x09\x09(selectedClass isNil or: [selectedProtocol notNil])\x0a\x09\x09\x09\x09\x09ifTrue: [self hideClassButtons]\x0a\x09\x09\x09\x09\x09ifFalse: [self showClassButtons]]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09self hideClassButtons.\x0a\x09\x09\x09self showMethodButtons].\x0a\x09sourceArea val: self source",
|
3108
3207
|
messageSends: ["disableSaveButton", "contents:", "title:", "button", "onClick:", "addNewClass", "with:", "renameClass", "copyClass", "removeClass", "searchClassReferences", "removeMethod", "select", "onChange:", "setMethodProtocol:", "val", "asJQuery", "option", "at:put:", "class:", "ifTrue:", "category", "and:", "notNil", "isNil", "do:", "=", "protocols", "ifFalse:", "searchReferencesOf:", "selector", "sorted", "messageSends", "ifTrue:ifFalse:", "hideMethodButtons", "hideClassButtons", "showClassButtons", "or:", "showMethodButtons", "val:", "source"],
|
3109
3208
|
referencedClasses: []
|
3110
3209
|
}),
|
@@ -5141,15 +5240,13 @@ smalltalk.addMethod(
|
|
5141
5240
|
smalltalk.method({
|
5142
5241
|
selector: "performFailure:",
|
5143
5242
|
category: 'actions',
|
5144
|
-
fn: function (aTestCase)
|
5145
|
-
|
5146
|
-
|
5147
|
-
|
5148
|
-
return self;
|
5149
|
-
},
|
5243
|
+
fn: function (aTestCase){
|
5244
|
+
var self=this;
|
5245
|
+
smalltalk.send(aTestCase,"_runCase",[]);
|
5246
|
+
return self},
|
5150
5247
|
args: ["aTestCase"],
|
5151
|
-
source: "performFailure: aTestCase\x0a\x09aTestCase
|
5152
|
-
messageSends: ["
|
5248
|
+
source: "performFailure: aTestCase\x0a\x09aTestCase runCase",
|
5249
|
+
messageSends: ["runCase"],
|
5153
5250
|
referencedClasses: []
|
5154
5251
|
}),
|
5155
5252
|
smalltalk.TestRunner);
|
@@ -5195,15 +5292,15 @@ smalltalk.addMethod(
|
|
5195
5292
|
smalltalk.method({
|
5196
5293
|
selector: "printPasses",
|
5197
5294
|
category: 'printing',
|
5198
|
-
fn: function ()
|
5199
|
-
|
5200
|
-
|
5201
|
-
|
5202
|
-
|
5295
|
+
fn: function (){
|
5296
|
+
var self=this;
|
5297
|
+
var $1;
|
5298
|
+
$1=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self,"_result",[]),"_runs",[]),"__minus",[smalltalk.send(smalltalk.send(smalltalk.send(self,"_result",[]),"_errors",[]),"_size",[])]),"__minus",[smalltalk.send(smalltalk.send(smalltalk.send(self,"_result",[]),"_failures",[]),"_size",[])]),"_asString",[]),"__comma",[" passes, "]);
|
5299
|
+
return $1;
|
5203
5300
|
},
|
5204
5301
|
args: [],
|
5205
|
-
source: "printPasses\x0a\x09^(self result
|
5206
|
-
messageSends: [",", "asString", "-", "size", "failures", "result", "errors", "
|
5302
|
+
source: "printPasses\x0a\x09^(self result runs - self result errors size - self result failures size) asString , ' passes, '",
|
5303
|
+
messageSends: [",", "asString", "-", "size", "failures", "result", "errors", "runs"],
|
5207
5304
|
referencedClasses: []
|
5208
5305
|
}),
|
5209
5306
|
smalltalk.TestRunner);
|
@@ -5403,21 +5500,26 @@ smalltalk.addMethod(
|
|
5403
5500
|
smalltalk.method({
|
5404
5501
|
selector: "run:",
|
5405
5502
|
category: 'actions',
|
5406
|
-
fn: function (aCollection)
|
5407
|
-
|
5408
|
-
|
5409
|
-
|
5410
|
-
|
5411
|
-
|
5412
|
-
|
5413
|
-
|
5414
|
-
|
5415
|
-
|
5416
|
-
|
5503
|
+
fn: function (aCollection){
|
5504
|
+
var self=this;
|
5505
|
+
var $1;
|
5506
|
+
var worker;
|
5507
|
+
worker=smalltalk.send((smalltalk.TestSuiteRunner || TestSuiteRunner),"_on_",[aCollection]);
|
5508
|
+
self["@result"]=smalltalk.send(worker,"_result",[]);
|
5509
|
+
smalltalk.send(smalltalk.send(worker,"_announcer",[]),"_on_do_",[(smalltalk.ResultAnnouncement || ResultAnnouncement),(function(ann){
|
5510
|
+
$1=smalltalk.send(smalltalk.send(ann,"_result",[]),"__eq_eq",[self["@result"]]);
|
5511
|
+
if(smalltalk.assert($1)){
|
5512
|
+
smalltalk.send(smalltalk.send(self,"_progressBar",[]),"_updatePercent_",[smalltalk.send(smalltalk.send(smalltalk.send(self["@result"],"_runs",[]),"__slash",[smalltalk.send(self["@result"],"_total",[])]),"__star",[(100)])]);
|
5513
|
+
smalltalk.send(self,"_updateStatusDiv",[]);
|
5514
|
+
return smalltalk.send(self,"_updateMethodsList",[]);
|
5515
|
+
};
|
5516
|
+
})]);
|
5517
|
+
smalltalk.send(worker,"_run",[]);
|
5518
|
+
return self},
|
5417
5519
|
args: ["aCollection"],
|
5418
|
-
source: "run: aCollection\x0a
|
5419
|
-
messageSends: ["
|
5420
|
-
referencedClasses: ["
|
5520
|
+
source: "run: aCollection\x0a| worker |\x0a\x09worker := TestSuiteRunner on: aCollection.\x0a\x09result := worker result.\x0a worker announcer on: ResultAnnouncement do: [:ann |\x0a \x09ann result == result ifTrue: [\x0a\x09\x09\x09self progressBar updatePercent: result runs / result total * 100.\x0a\x09\x09\x09self updateStatusDiv.\x0a\x09\x09\x09self updateMethodsList\x0a \x09\x09]\x0a\x09].\x0a\x09worker run",
|
5521
|
+
messageSends: ["on:", "result", "on:do:", "ifTrue:", "updatePercent:", "*", "/", "total", "runs", "progressBar", "updateStatusDiv", "updateMethodsList", "==", "announcer", "run"],
|
5522
|
+
referencedClasses: ["TestSuiteRunner", "ResultAnnouncement"]
|
5421
5523
|
}),
|
5422
5524
|
smalltalk.TestRunner);
|
5423
5525
|
|