|
@@ -99,35 +99,18 @@ var self=this,$self=this;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-return $recv((function(){
|
|
|
|
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
-return $core.withContext(function($ctx2) {
|
|
|
|
-//>>excludeEnd("ctx");
|
|
|
|
return $recv($self._environment())._evaluate_for_(aString,$self._receiver());
|
|
return $recv($self._environment())._evaluate_for_(aString,$self._receiver());
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
|
|
|
|
-//>>excludeEnd("ctx");
|
|
|
|
-}))._tryCatch_((function(e){
|
|
|
|
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
-return $core.withContext(function($ctx2) {
|
|
|
|
-//>>excludeEnd("ctx");
|
|
|
|
-$recv($globals.ErrorHandler)._handleError_(e);
|
|
|
|
-return nil;
|
|
|
|
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
-}, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,2)});
|
|
|
|
-//>>excludeEnd("ctx");
|
|
|
|
-}));
|
|
|
|
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
}, function($ctx1) {$ctx1.fill(self,"doIt:",{aString:aString})});
|
|
}, function($ctx1) {$ctx1.fill(self,"doIt:",{aString:aString})});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
},
|
|
},
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
args: ["aString"],
|
|
args: ["aString"],
|
|
-source: "doIt: aString\x0a\x09\x22Evaluate aString in the receiver's `environment`.\x0a\x09\x0a\x09Note: Catch any error and handle it manually, bypassing\x0a\x09boot.js behavior to avoid the browser default action on\x0a\x09ctrl+d/ctrl+p.\x0a\x09\x0a\x09See https://lolg.it/amber/amber/issues/882\x22\x0a\x0a\x09^ [ self environment evaluate: aString for: self receiver ]\x0a\x09\x09tryCatch: [ :e | \x0a\x09\x09\x09ErrorHandler handleError: e.\x0a\x09\x09\x09nil ]",
|
|
|
|
-referencedClasses: ["ErrorHandler"],
|
|
|
|
|
|
+source: "doIt: aString\x0a\x09^ self environment evaluate: aString for: self receiver",
|
|
|
|
+referencedClasses: [],
|
|
//>>excludeEnd("ide");
|
|
//>>excludeEnd("ide");
|
|
pragmas: [],
|
|
pragmas: [],
|
|
-messageSends: ["tryCatch:", "evaluate:for:", "environment", "receiver", "handleError:"]
|
|
|
|
|
|
+messageSends: ["evaluate:for:", "environment", "receiver"]
|
|
}),
|
|
}),
|
|
$globals.HLCodeModel);
|
|
$globals.HLCodeModel);
|
|
|
|
|
|
@@ -313,7 +296,7 @@ $globals.HLCodeWidget);
|
|
|
|
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
-selector: "browseIt",
|
|
|
|
|
|
+selector: "basicDoIt",
|
|
protocol: "actions",
|
|
protocol: "actions",
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this,$self=this;
|
|
var self=this,$self=this;
|
|
@@ -321,40 +304,58 @@ var result;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-var $early={};
|
|
|
|
-try {
|
|
|
|
-result=$recv((function(){
|
|
|
|
|
|
+var $1;
|
|
|
|
+$1=$self._model();
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-return $core.withContext(function($ctx2) {
|
|
|
|
|
|
+$ctx1.sendIdx["model"]=1;
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-return $self._doIt();
|
|
|
|
|
|
+result=$recv($1)._doIt_($self._currentLineOrSelection());
|
|
|
|
+$recv($recv($self._model())._announcer())._announce_($recv($globals.HLDoItExecuted)._on_($self.model));
|
|
|
|
+return result;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
|
|
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"basicDoIt",{result:result})});
|
|
|
|
+//>>excludeEnd("ctx");
|
|
|
|
+},
|
|
|
|
+//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
|
+args: [],
|
|
|
|
+source: "basicDoIt\x0a\x09| result |\x0a\x0a\x09result := self model doIt: self currentLineOrSelection.\x0a\x09self model announcer announce: (HLDoItExecuted on: model).\x0a\x0a\x09^ result",
|
|
|
|
+referencedClasses: ["HLDoItExecuted"],
|
|
|
|
+//>>excludeEnd("ide");
|
|
|
|
+pragmas: [],
|
|
|
|
+messageSends: ["doIt:", "model", "currentLineOrSelection", "announce:", "announcer", "on:"]
|
|
|
|
+}),
|
|
|
|
+$globals.HLCodeWidget);
|
|
|
|
+
|
|
|
|
+$core.addMethod(
|
|
|
|
+$core.method({
|
|
|
|
+selector: "browseIt",
|
|
|
|
+protocol: "actions",
|
|
|
|
+fn: function (){
|
|
|
|
+var self=this,$self=this;
|
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
+return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-}))._on_do_($globals.Error,(function(exception){
|
|
|
|
|
|
+$recv((function(){
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx2) {
|
|
return $core.withContext(function($ctx2) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-throw $early=[$recv($globals.ErrorHandler)._handleError_(exception)];
|
|
|
|
|
|
+return $recv($self._model())._browse_($self._basicDoIt());
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-}, function($ctx2) {$ctx2.fillBlock({exception:exception},$ctx1,2)});
|
|
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-}));
|
|
|
|
-$recv($self._model())._browse_(result);
|
|
|
|
|
|
+}))._fork();
|
|
return self;
|
|
return self;
|
|
-}
|
|
|
|
-catch(e) {if(e===$early)return e[0]; throw e}
|
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-}, function($ctx1) {$ctx1.fill(self,"browseIt",{result:result})});
|
|
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"browseIt",{})});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
},
|
|
},
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
args: [],
|
|
args: [],
|
|
-source: "browseIt\x0a\x09| result |\x0a\x09\x0a\x09result := [ self doIt ] on: Error do: [ :exception | \x0a\x09\x09^ ErrorHandler handleError: exception ].\x0a\x09\x09\x0a\x09self model browse: result",
|
|
|
|
-referencedClasses: ["Error", "ErrorHandler"],
|
|
|
|
|
|
+source: "browseIt\x0a\x09[ self model browse: self basicDoIt ] fork",
|
|
|
|
+referencedClasses: [],
|
|
//>>excludeEnd("ide");
|
|
//>>excludeEnd("ide");
|
|
pragmas: [],
|
|
pragmas: [],
|
|
-messageSends: ["on:do:", "doIt", "handleError:", "browse:", "model"]
|
|
|
|
|
|
+messageSends: ["fork", "browse:", "model", "basicDoIt"]
|
|
}),
|
|
}),
|
|
$globals.HLCodeWidget);
|
|
$globals.HLCodeWidget);
|
|
|
|
|
|
@@ -576,29 +577,30 @@ selector: "doIt",
|
|
protocol: "actions",
|
|
protocol: "actions",
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this,$self=this;
|
|
var self=this,$self=this;
|
|
-var result;
|
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-var $1;
|
|
|
|
-$1=$self._model();
|
|
|
|
|
|
+$recv((function(){
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-$ctx1.sendIdx["model"]=1;
|
|
|
|
|
|
+return $core.withContext(function($ctx2) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-result=$recv($1)._doIt_($self._currentLineOrSelection());
|
|
|
|
-$recv($recv($self._model())._announcer())._announce_($recv($globals.HLDoItExecuted)._on_($self.model));
|
|
|
|
-return result;
|
|
|
|
|
|
+return $self._basicDoIt();
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-}, function($ctx1) {$ctx1.fill(self,"doIt",{result:result})});
|
|
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
|
|
|
|
+//>>excludeEnd("ctx");
|
|
|
|
+}))._fork();
|
|
|
|
+return self;
|
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"doIt",{})});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
},
|
|
},
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
args: [],
|
|
args: [],
|
|
-source: "doIt\x0a\x09| result |\x0a\x0a\x09result := self model doIt: self currentLineOrSelection.\x0a\x09self model announcer announce: (HLDoItExecuted on: model).\x0a\x0a\x09^ result",
|
|
|
|
-referencedClasses: ["HLDoItExecuted"],
|
|
|
|
|
|
+source: "doIt\x0a\x09[ self basicDoIt ] fork",
|
|
|
|
+referencedClasses: [],
|
|
//>>excludeEnd("ide");
|
|
//>>excludeEnd("ide");
|
|
pragmas: [],
|
|
pragmas: [],
|
|
-messageSends: ["doIt:", "model", "currentLineOrSelection", "announce:", "announcer", "on:"]
|
|
|
|
|
|
+messageSends: ["fork", "basicDoIt"]
|
|
}),
|
|
}),
|
|
$globals.HLCodeWidget);
|
|
$globals.HLCodeWidget);
|
|
|
|
|
|
@@ -727,7 +729,15 @@ var self=this,$self=this;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-$recv($self._model())._inspect_($self._doIt());
|
|
|
|
|
|
+$recv((function(){
|
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
+return $core.withContext(function($ctx2) {
|
|
|
|
+//>>excludeEnd("ctx");
|
|
|
|
+return $recv($self._model())._inspect_($self._basicDoIt());
|
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
|
|
|
|
+//>>excludeEnd("ctx");
|
|
|
|
+}))._fork();
|
|
return self;
|
|
return self;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
}, function($ctx1) {$ctx1.fill(self,"inspectIt",{})});
|
|
}, function($ctx1) {$ctx1.fill(self,"inspectIt",{})});
|
|
@@ -735,11 +745,11 @@ return self;
|
|
},
|
|
},
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
args: [],
|
|
args: [],
|
|
-source: "inspectIt\x0a\x09self model inspect: self doIt",
|
|
|
|
|
|
+source: "inspectIt\x0a\x09[ self model inspect: self basicDoIt ] fork",
|
|
referencedClasses: [],
|
|
referencedClasses: [],
|
|
//>>excludeEnd("ide");
|
|
//>>excludeEnd("ide");
|
|
pragmas: [],
|
|
pragmas: [],
|
|
-messageSends: ["inspect:", "model", "doIt"]
|
|
|
|
|
|
+messageSends: ["fork", "inspect:", "model", "basicDoIt"]
|
|
}),
|
|
}),
|
|
$globals.HLCodeWidget);
|
|
$globals.HLCodeWidget);
|
|
|
|
|
|
@@ -1135,7 +1145,15 @@ var self=this,$self=this;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-$self._print_($recv($self._doIt())._printString());
|
|
|
|
|
|
+$recv((function(){
|
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
+return $core.withContext(function($ctx2) {
|
|
|
|
+//>>excludeEnd("ctx");
|
|
|
|
+return $self._print_($recv($self._basicDoIt())._printString());
|
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
|
|
|
|
+//>>excludeEnd("ctx");
|
|
|
|
+}))._fork();
|
|
return self;
|
|
return self;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
}, function($ctx1) {$ctx1.fill(self,"printIt",{})});
|
|
}, function($ctx1) {$ctx1.fill(self,"printIt",{})});
|
|
@@ -1143,11 +1161,11 @@ return self;
|
|
},
|
|
},
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
args: [],
|
|
args: [],
|
|
-source: "printIt\x0a\x09self print: self doIt printString",
|
|
|
|
|
|
+source: "printIt\x0a\x09[ self print: self basicDoIt printString ] fork",
|
|
referencedClasses: [],
|
|
referencedClasses: [],
|
|
//>>excludeEnd("ide");
|
|
//>>excludeEnd("ide");
|
|
pragmas: [],
|
|
pragmas: [],
|
|
-messageSends: ["print:", "printString", "doIt"]
|
|
|
|
|
|
+messageSends: ["fork", "print:", "printString", "basicDoIt"]
|
|
}),
|
|
}),
|
|
$globals.HLCodeWidget);
|
|
$globals.HLCodeWidget);
|
|
|
|
|