|
@@ -1,4 +1,4 @@
|
|
|
-define("amber_core/Platform-Services", ["amber/boot", "amber_core/Kernel-Objects", "amber_core/Kernel-Collections"], function($boot){
|
|
|
+define("amber_core/Platform-Services", ["amber/boot", "amber_core/Kernel-Objects", "amber_core/Kernel-Collections", "amber_core/Kernel-Infrastructure", "amber_core/Kernel-Methods"], function($boot){
|
|
|
var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
|
|
|
$core.addPackage('Platform-Services');
|
|
|
$core.packages["Platform-Services"].innerEval = function (expr) { return eval(expr); };
|
|
@@ -2173,6 +2173,283 @@ messageSends: ["show:", "current"]
|
|
|
}),
|
|
|
$globals.Transcript.klass);
|
|
|
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
+selector: "inspectOn:",
|
|
|
+protocol: '*Platform-Services',
|
|
|
+fn: function (anInspector){
|
|
|
+var self=this;
|
|
|
+var variables;
|
|
|
+function $Dictionary(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
|
|
|
+
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
+
|
|
|
+var $1;
|
|
|
+variables=$recv($Dictionary())._new();
|
|
|
+$recv(variables)._at_put_("#self",self);
|
|
|
+
|
|
|
+$ctx1.sendIdx["at:put:"]=1;
|
|
|
+
|
|
|
+$recv(variables)._at_put_("#keys",self._keys());
|
|
|
+
|
|
|
+$ctx1.sendIdx["at:put:"]=2;
|
|
|
+
|
|
|
+self._keysAndValuesDo_((function(key,value){
|
|
|
+
|
|
|
+return $core.withContext(function($ctx2) {
|
|
|
+
|
|
|
+return $recv(variables)._at_put_(key,value);
|
|
|
+
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1,1)});
|
|
|
+
|
|
|
+}));
|
|
|
+$recv(anInspector)._setLabel_(self._printString());
|
|
|
+$1=$recv(anInspector)._setVariables_(variables);
|
|
|
+return self;
|
|
|
+
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.AssociativeCollection)});
|
|
|
+
|
|
|
+},
|
|
|
+
|
|
|
+args: ["anInspector"],
|
|
|
+source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09variables at: '#keys' put: self keys.\x0a\x09self keysAndValuesDo: [ :key :value |\x0a\x09\x09variables at: key put: value ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
|
|
|
+referencedClasses: ["Dictionary"],
|
|
|
+
|
|
|
+messageSends: ["new", "at:put:", "keys", "keysAndValuesDo:", "setLabel:", "printString", "setVariables:"]
|
|
|
+}),
|
|
|
+$globals.AssociativeCollection);
|
|
|
+
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
+selector: "inspectOn:",
|
|
|
+protocol: '*Platform-Services',
|
|
|
+fn: function (anInspector){
|
|
|
+var self=this;
|
|
|
+var variables;
|
|
|
+function $Dictionary(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
|
|
|
+
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
+
|
|
|
+var $1;
|
|
|
+variables=$recv($Dictionary())._new();
|
|
|
+$recv(variables)._at_put_("#self",self);
|
|
|
+
|
|
|
+$ctx1.sendIdx["at:put:"]=1;
|
|
|
+
|
|
|
+self._withIndexDo_((function(each,i){
|
|
|
+
|
|
|
+return $core.withContext(function($ctx2) {
|
|
|
+
|
|
|
+return $recv(variables)._at_put_(i,each);
|
|
|
+
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1,1)});
|
|
|
+
|
|
|
+}));
|
|
|
+$recv(anInspector)._setLabel_(self._printString());
|
|
|
+$1=$recv(anInspector)._setVariables_(variables);
|
|
|
+return self;
|
|
|
+
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.Collection)});
|
|
|
+
|
|
|
+},
|
|
|
+
|
|
|
+args: ["anInspector"],
|
|
|
+source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09self withIndexDo: [ :each :i |\x0a\x09\x09variables at: i put: each ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
|
|
|
+referencedClasses: ["Dictionary"],
|
|
|
+
|
|
|
+messageSends: ["new", "at:put:", "withIndexDo:", "setLabel:", "printString", "setVariables:"]
|
|
|
+}),
|
|
|
+$globals.Collection);
|
|
|
+
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
+selector: "inspectOn:",
|
|
|
+protocol: '*Platform-Services',
|
|
|
+fn: function (anInspector){
|
|
|
+var self=this;
|
|
|
+var variables;
|
|
|
+function $Dictionary(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
|
|
|
+
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
+
|
|
|
+var $1;
|
|
|
+variables=$recv($Dictionary())._new();
|
|
|
+$recv(variables)._at_put_("#self",self);
|
|
|
+
|
|
|
+$ctx1.sendIdx["at:put:"]=1;
|
|
|
+
|
|
|
+$recv(variables)._at_put_("#year",self._year());
|
|
|
+
|
|
|
+$ctx1.sendIdx["at:put:"]=2;
|
|
|
+
|
|
|
+$recv(variables)._at_put_("#month",self._month());
|
|
|
+
|
|
|
+$ctx1.sendIdx["at:put:"]=3;
|
|
|
+
|
|
|
+$recv(variables)._at_put_("#day",self._day());
|
|
|
+
|
|
|
+$ctx1.sendIdx["at:put:"]=4;
|
|
|
+
|
|
|
+$recv(variables)._at_put_("#hours",self._hours());
|
|
|
+
|
|
|
+$ctx1.sendIdx["at:put:"]=5;
|
|
|
+
|
|
|
+$recv(variables)._at_put_("#minutes",self._minutes());
|
|
|
+
|
|
|
+$ctx1.sendIdx["at:put:"]=6;
|
|
|
+
|
|
|
+$recv(variables)._at_put_("#seconds",self._seconds());
|
|
|
+
|
|
|
+$ctx1.sendIdx["at:put:"]=7;
|
|
|
+
|
|
|
+$recv(variables)._at_put_("#milliseconds",self._milliseconds());
|
|
|
+$recv(anInspector)._setLabel_(self._printString());
|
|
|
+$1=$recv(anInspector)._setVariables_(variables);
|
|
|
+return self;
|
|
|
+
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.Date)});
|
|
|
+
|
|
|
+},
|
|
|
+
|
|
|
+args: ["anInspector"],
|
|
|
+source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09variables at: '#year' put: self year.\x0a\x09variables at: '#month' put: self month.\x0a\x09variables at: '#day' put: self day.\x0a\x09variables at: '#hours' put: self hours.\x0a\x09variables at: '#minutes' put: self minutes.\x0a\x09variables at: '#seconds' put: self seconds.\x0a\x09variables at: '#milliseconds' put: self milliseconds.\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
|
|
|
+referencedClasses: ["Dictionary"],
|
|
|
+
|
|
|
+messageSends: ["new", "at:put:", "year", "month", "day", "hours", "minutes", "seconds", "milliseconds", "setLabel:", "printString", "setVariables:"]
|
|
|
+}),
|
|
|
+$globals.Date);
|
|
|
+
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
+selector: "inspectOn:",
|
|
|
+protocol: '*Platform-Services',
|
|
|
+fn: function (anInspector){
|
|
|
+var self=this;
|
|
|
+var variables;
|
|
|
+function $Dictionary(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
|
|
|
+function $JSObjectProxy(){return $globals.JSObjectProxy||(typeof JSObjectProxy=="undefined"?nil:JSObjectProxy)}
|
|
|
+
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
+
|
|
|
+variables=$recv($Dictionary())._new();
|
|
|
+$recv(variables)._at_put_("#self",self._jsObject());
|
|
|
+$recv(anInspector)._setLabel_(self._printString());
|
|
|
+$recv($JSObjectProxy())._addObjectVariablesTo_ofProxy_(variables,self);
|
|
|
+$recv(anInspector)._setVariables_(variables);
|
|
|
+return self;
|
|
|
+
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.JSObjectProxy)});
|
|
|
+
|
|
|
+},
|
|
|
+
|
|
|
+args: ["anInspector"],
|
|
|
+source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self jsObject.\x0a\x09anInspector setLabel: self printString.\x0a\x09JSObjectProxy addObjectVariablesTo: variables ofProxy: self.\x0a\x09anInspector setVariables: variables",
|
|
|
+referencedClasses: ["Dictionary", "JSObjectProxy"],
|
|
|
+
|
|
|
+messageSends: ["new", "at:put:", "jsObject", "setLabel:", "printString", "addObjectVariablesTo:ofProxy:", "setVariables:"]
|
|
|
+}),
|
|
|
+$globals.JSObjectProxy);
|
|
|
+
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
+selector: "inspectOn:",
|
|
|
+protocol: '*Platform-Services',
|
|
|
+fn: function (anInspector){
|
|
|
+var self=this;
|
|
|
+var variables;
|
|
|
+function $Dictionary(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
|
|
|
+
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
+
|
|
|
+var $1;
|
|
|
+variables=$recv($Dictionary())._new();
|
|
|
+$recv(variables)._at_put_("#self",self);
|
|
|
+
|
|
|
+$ctx1.sendIdx["at:put:"]=1;
|
|
|
+
|
|
|
+$recv(variables)._at_put_("#home",self._home());
|
|
|
+
|
|
|
+$ctx1.sendIdx["at:put:"]=2;
|
|
|
+
|
|
|
+$recv(variables)._at_put_("#receiver",self._receiver());
|
|
|
+
|
|
|
+$ctx1.sendIdx["at:put:"]=3;
|
|
|
+
|
|
|
+$recv(variables)._at_put_("#selector",self._selector());
|
|
|
+
|
|
|
+$ctx1.sendIdx["at:put:"]=4;
|
|
|
+
|
|
|
+$recv(variables)._at_put_("#locals",self._locals());
|
|
|
+
|
|
|
+$ctx1.sendIdx["at:put:"]=5;
|
|
|
+
|
|
|
+$recv($recv(self._class())._instanceVariableNames())._do_((function(each){
|
|
|
+
|
|
|
+return $core.withContext(function($ctx2) {
|
|
|
+
|
|
|
+return $recv(variables)._at_put_(each,self._instVarAt_(each));
|
|
|
+
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
|
|
|
+
|
|
|
+}));
|
|
|
+$recv(anInspector)._setLabel_(self._printString());
|
|
|
+$1=$recv(anInspector)._setVariables_(variables);
|
|
|
+return self;
|
|
|
+
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.MethodContext)});
|
|
|
+
|
|
|
+},
|
|
|
+
|
|
|
+args: ["anInspector"],
|
|
|
+source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09variables at: '#home' put: self home.\x0a\x09variables at: '#receiver' put: self receiver.\x0a\x09variables at: '#selector' put: self selector.\x0a\x09variables at: '#locals' put: self locals.\x0a\x09self class instanceVariableNames do: [ :each |\x0a\x09\x09variables at: each put: (self instVarAt: each) ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
|
|
|
+referencedClasses: ["Dictionary"],
|
|
|
+
|
|
|
+messageSends: ["new", "at:put:", "home", "receiver", "selector", "locals", "do:", "instanceVariableNames", "class", "instVarAt:", "setLabel:", "printString", "setVariables:"]
|
|
|
+}),
|
|
|
+$globals.MethodContext);
|
|
|
+
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
+selector: "inspectOn:",
|
|
|
+protocol: '*Platform-Services',
|
|
|
+fn: function (anInspector){
|
|
|
+var self=this;
|
|
|
+var variables;
|
|
|
+function $Dictionary(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
|
|
|
+
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
+
|
|
|
+var $1;
|
|
|
+variables=$recv($Dictionary())._new();
|
|
|
+$recv(variables)._at_put_("#self",self);
|
|
|
+
|
|
|
+$ctx1.sendIdx["at:put:"]=1;
|
|
|
+
|
|
|
+$recv($recv(self._class())._allInstanceVariableNames())._do_((function(each){
|
|
|
+
|
|
|
+return $core.withContext(function($ctx2) {
|
|
|
+
|
|
|
+return $recv(variables)._at_put_(each,self._instVarAt_(each));
|
|
|
+
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
|
|
|
+
|
|
|
+}));
|
|
|
+$recv(anInspector)._setLabel_(self._printString());
|
|
|
+$1=$recv(anInspector)._setVariables_(variables);
|
|
|
+return self;
|
|
|
+
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.Object)});
|
|
|
+
|
|
|
+},
|
|
|
+
|
|
|
+args: ["anInspector"],
|
|
|
+source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09self class allInstanceVariableNames do: [ :each |\x0a\x09\x09variables at: each put: (self instVarAt: each) ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
|
|
|
+referencedClasses: ["Dictionary"],
|
|
|
+
|
|
|
+messageSends: ["new", "at:put:", "do:", "allInstanceVariableNames", "class", "instVarAt:", "setLabel:", "printString", "setVariables:"]
|
|
|
+}),
|
|
|
+$globals.Object);
|
|
|
+
|
|
|
$core.addMethod(
|
|
|
$core.method({
|
|
|
selector: "do:displayingProgress:",
|
|
@@ -2198,4 +2475,101 @@ messageSends: ["do:on:displaying:"]
|
|
|
}),
|
|
|
$globals.SequenceableCollection);
|
|
|
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
+selector: "inspectOn:",
|
|
|
+protocol: '*Platform-Services',
|
|
|
+fn: function (anInspector){
|
|
|
+var self=this;
|
|
|
+var variables,i;
|
|
|
+function $Dictionary(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
|
|
|
+
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
+
|
|
|
+var $1;
|
|
|
+variables=$recv($Dictionary())._new();
|
|
|
+$recv(variables)._at_put_("#self",self);
|
|
|
+
|
|
|
+$ctx1.sendIdx["at:put:"]=1;
|
|
|
+
|
|
|
+i=(1);
|
|
|
+self._do_((function(each){
|
|
|
+
|
|
|
+return $core.withContext(function($ctx2) {
|
|
|
+
|
|
|
+$recv(variables)._at_put_(i,each);
|
|
|
+i=$recv(i).__plus((1));
|
|
|
+return i;
|
|
|
+
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
|
|
|
+
|
|
|
+}));
|
|
|
+$recv(anInspector)._setLabel_(self._printString());
|
|
|
+$1=$recv(anInspector)._setVariables_(variables);
|
|
|
+return self;
|
|
|
+
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables,i:i},$globals.Set)});
|
|
|
+
|
|
|
+},
|
|
|
+
|
|
|
+args: ["anInspector"],
|
|
|
+source: "inspectOn: anInspector\x0a\x09| variables i |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09i := 1.\x0a\x09self do: [ :each |\x0a\x09\x09variables at: i put: each.\x0a\x09\x09i := i + 1 ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
|
|
|
+referencedClasses: ["Dictionary"],
|
|
|
+
|
|
|
+messageSends: ["new", "at:put:", "do:", "+", "setLabel:", "printString", "setVariables:"]
|
|
|
+}),
|
|
|
+$globals.Set);
|
|
|
+
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
+selector: "inspectOn:",
|
|
|
+protocol: '*Platform-Services',
|
|
|
+fn: function (anInspector){
|
|
|
+var self=this;
|
|
|
+var label;
|
|
|
+
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
+
|
|
|
+var $3,$2,$1,$5,$4;
|
|
|
+(
|
|
|
+
|
|
|
+$ctx1.supercall = true,
|
|
|
+
|
|
|
+$globals.String.superclass.fn.prototype._inspectOn_.apply($recv(self), [anInspector]));
|
|
|
+
|
|
|
+$ctx1.supercall = false;
|
|
|
+
|
|
|
+$3=self._printString();
|
|
|
+
|
|
|
+$ctx1.sendIdx["printString"]=1;
|
|
|
+
|
|
|
+$2=$recv($3)._size();
|
|
|
+$1=$recv($2).__gt((30));
|
|
|
+if($core.assert($1)){
|
|
|
+$5=self._printString();
|
|
|
+
|
|
|
+$ctx1.sendIdx["printString"]=2;
|
|
|
+
|
|
|
+$4=$recv($5)._copyFrom_to_((1),(30));
|
|
|
+label=$recv($4).__comma("...'");
|
|
|
+label;
|
|
|
+} else {
|
|
|
+label=self._printString();
|
|
|
+label;
|
|
|
+};
|
|
|
+$recv(anInspector)._setLabel_(label);
|
|
|
+return self;
|
|
|
+
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,label:label},$globals.String)});
|
|
|
+
|
|
|
+},
|
|
|
+
|
|
|
+args: ["anInspector"],
|
|
|
+source: "inspectOn: anInspector\x0a\x09| label |\x0a\x09super inspectOn: anInspector.\x0a\x09self printString size > 30\x0a\x09\x09ifTrue: [ label := (self printString copyFrom: 1 to: 30), '...''' ]\x0a\x09\x09ifFalse: [ label := self printString ].\x0a\x09anInspector setLabel: label",
|
|
|
+referencedClasses: [],
|
|
|
+
|
|
|
+messageSends: ["inspectOn:", "ifTrue:ifFalse:", ">", "size", "printString", ",", "copyFrom:to:", "setLabel:"]
|
|
|
+}),
|
|
|
+$globals.String);
|
|
|
+
|
|
|
});
|