|
@@ -608,7 +608,7 @@ return smalltalk.withContext(function($ctx2) {
|
|
return _st(compiler)._parseExpression_(aString);
|
|
return _st(compiler)._parseExpression_(aString);
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_($Error(),(function(ex){
|
|
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_($Error(),(function(ex){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
-$1=_st(window)._alert_(_st(ex)._messageText());
|
|
|
|
|
|
+$1=self._alert_(_st(ex)._messageText());
|
|
throw $early=[$1];
|
|
throw $early=[$1];
|
|
}, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
|
|
}, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
|
|
$2=_st(compiler)._evaluateExpression_on_(aString,self._receiver());
|
|
$2=_st(compiler)._evaluateExpression_on_(aString,self._receiver());
|
|
@@ -617,7 +617,7 @@ return $2;
|
|
catch(e) {if(e===$early)return e[0]; throw e}
|
|
catch(e) {if(e===$early)return e[0]; throw e}
|
|
}, function($ctx1) {$ctx1.fill(self,"eval:",{aString:aString,compiler:compiler},smalltalk.SourceArea)})},
|
|
}, function($ctx1) {$ctx1.fill(self,"eval:",{aString:aString,compiler:compiler},smalltalk.SourceArea)})},
|
|
args: ["aString"],
|
|
args: ["aString"],
|
|
-source: "eval: aString\x0a\x09| compiler |\x0a\x09compiler := Compiler new.\x0a\x09[ compiler parseExpression: aString ] on: Error do: [:ex |\x0a\x09\x09^window alert: ex messageText].\x0a\x09^compiler evaluateExpression: aString on: self receiver",
|
|
|
|
|
|
+source: "eval: aString\x0a\x09| compiler |\x0a\x09compiler := Compiler new.\x0a\x09[ compiler parseExpression: aString ] on: Error do: [:ex |\x0a\x09\x09^self alert: ex messageText].\x0a\x09^compiler evaluateExpression: aString on: self receiver",
|
|
messageSends: ["new", "on:do:", "alert:", "messageText", "parseExpression:", "evaluateExpression:on:", "receiver"],
|
|
messageSends: ["new", "on:do:", "alert:", "messageText", "parseExpression:", "evaluateExpression:on:", "receiver"],
|
|
referencedClasses: ["Compiler", "Error"]
|
|
referencedClasses: ["Compiler", "Error"]
|
|
}),
|
|
}),
|
|
@@ -1155,15 +1155,11 @@ category: 'actions',
|
|
fn: function (aBlock){
|
|
fn: function (aBlock){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
-jQuery('#amber').resizable({
|
|
|
|
- handles: 'n',
|
|
|
|
- resize: aBlock,
|
|
|
|
- minHeight: 230
|
|
|
|
-});
|
|
|
|
|
|
+_st("#amber"._asJQuery())._resizable_(smalltalk.HashedCollection._from_(["handles".__minus_gt("n"),"resize".__minus_gt(aBlock),"minHeight".__minus_gt((230))]));
|
|
return self}, function($ctx1) {$ctx1.fill(self,"onResize:",{aBlock:aBlock},smalltalk.TabManager)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"onResize:",{aBlock:aBlock},smalltalk.TabManager)})},
|
|
args: ["aBlock"],
|
|
args: ["aBlock"],
|
|
-source: "onResize: aBlock\x0a\x09<jQuery('#amber').resizable({\x0a\x09handles: 'n',\x0a\x09resize: aBlock,\x0a\x09minHeight: 230\x0a})>",
|
|
|
|
-messageSends: [],
|
|
|
|
|
|
+source: "onResize: aBlock\x0a\x09'#amber' asJQuery resizable: #{\x0a\x09\x09'handles' -> 'n'.\x0a\x09\x09'resize' -> aBlock.\x0a\x09\x09'minHeight' -> 230\x0a\x09}",
|
|
|
|
+messageSends: ["resizable:", "->", "asJQuery"],
|
|
referencedClasses: []
|
|
referencedClasses: []
|
|
}),
|
|
}),
|
|
smalltalk.TabManager);
|
|
smalltalk.TabManager);
|
|
@@ -1175,11 +1171,11 @@ category: 'actions',
|
|
fn: function (aBlock){
|
|
fn: function (aBlock){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
-jQuery(window).resize(aBlock);
|
|
|
|
|
|
+_st(_st(window)._asJQuery())._resize_(aBlock);
|
|
return self}, function($ctx1) {$ctx1.fill(self,"onWindowResize:",{aBlock:aBlock},smalltalk.TabManager)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"onWindowResize:",{aBlock:aBlock},smalltalk.TabManager)})},
|
|
args: ["aBlock"],
|
|
args: ["aBlock"],
|
|
-source: "onWindowResize: aBlock\x0a\x09<jQuery(window).resize(aBlock)>",
|
|
|
|
-messageSends: [],
|
|
|
|
|
|
+source: "onWindowResize: aBlock\x0a\x09window asJQuery resize: aBlock",
|
|
|
|
+messageSends: ["resize:", "asJQuery"],
|
|
referencedClasses: []
|
|
referencedClasses: []
|
|
}),
|
|
}),
|
|
smalltalk.TabManager);
|
|
smalltalk.TabManager);
|
|
@@ -1525,11 +1521,14 @@ category: 'actions',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
-jQuery('#amber').css('top', '').css('bottom', '0px');
|
|
|
|
|
|
+var $1,$2;
|
|
|
|
+$1="#amber"._asJQuery();
|
|
|
|
+_st($1)._css_put_("top","");
|
|
|
|
+$2=_st($1)._css_put_("bottom","0px");
|
|
return self}, function($ctx1) {$ctx1.fill(self,"updatePosition",{},smalltalk.TabManager)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"updatePosition",{},smalltalk.TabManager)})},
|
|
args: [],
|
|
args: [],
|
|
-source: "updatePosition\x0a\x09<jQuery('#amber').css('top', '').css('bottom', '0px')>",
|
|
|
|
-messageSends: [],
|
|
|
|
|
|
+source: "updatePosition\x0a\x09'#amber' asJQuery\x0a\x09\x09css: 'top' put: '';\x0a\x09\x09css: 'bottom' put: '0px'",
|
|
|
|
+messageSends: ["css:put:", "asJQuery"],
|
|
referencedClasses: []
|
|
referencedClasses: []
|
|
}),
|
|
}),
|
|
smalltalk.TabManager);
|
|
smalltalk.TabManager);
|
|
@@ -1586,11 +1585,11 @@ function $Browser(){return smalltalk.Browser||(typeof Browser=="undefined"?nil:B
|
|
function $TabManager(){return smalltalk.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
|
|
function $TabManager(){return smalltalk.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
var $1,$2;
|
|
var $1,$2;
|
|
-$1=_st(_st(_st(window)._jQuery_("#amber"))._length()).__eq((0));
|
|
|
|
|
|
+$1=_st(_st("#amber"._asJQuery())._length()).__eq((0));
|
|
if(smalltalk.assert($1)){
|
|
if(smalltalk.assert($1)){
|
|
_st($Browser())._open();
|
|
_st($Browser())._open();
|
|
} else {
|
|
} else {
|
|
-$2=_st(_st(window)._jQuery_("#amber"))._is_(":visible");
|
|
|
|
|
|
+$2=_st("#amber"._asJQuery())._is_(":visible");
|
|
if(smalltalk.assert($2)){
|
|
if(smalltalk.assert($2)){
|
|
_st(_st($TabManager())._current())._close();
|
|
_st(_st($TabManager())._current())._close();
|
|
} else {
|
|
} else {
|
|
@@ -1599,8 +1598,8 @@ _st(_st($TabManager())._current())._open();
|
|
};
|
|
};
|
|
return self}, function($ctx1) {$ctx1.fill(self,"toggleAmberIDE",{},smalltalk.TabManager.klass)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"toggleAmberIDE",{},smalltalk.TabManager.klass)})},
|
|
args: [],
|
|
args: [],
|
|
-source: "toggleAmberIDE\x0a\x09(window jQuery: '#amber') length = 0\x0a\x09\x09ifTrue: [ Browser open ]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09((window jQuery: '#amber') is: ':visible')\x0a\x09\x09\x09\x09ifTrue: [ TabManager current close ]\x0a\x09\x09\x09\x09ifFalse: [ TabManager current open ] ]",
|
|
|
|
-messageSends: ["ifTrue:ifFalse:", "open", "close", "current", "is:", "jQuery:", "=", "length"],
|
|
|
|
|
|
+source: "toggleAmberIDE\x0a\x09'#amber' asJQuery length = 0\x0a\x09\x09ifTrue: [ Browser open ]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09('#amber' asJQuery is: ':visible')\x0a\x09\x09\x09\x09ifTrue: [ TabManager current close ]\x0a\x09\x09\x09\x09ifFalse: [ TabManager current open ] ]",
|
|
|
|
+messageSends: ["ifTrue:ifFalse:", "open", "close", "current", "is:", "asJQuery", "=", "length"],
|
|
referencedClasses: ["Browser", "TabManager"]
|
|
referencedClasses: ["Browser", "TabManager"]
|
|
}),
|
|
}),
|
|
smalltalk.TabManager.klass);
|
|
smalltalk.TabManager.klass);
|
|
@@ -1875,7 +1874,7 @@ function $Object(){return smalltalk.Object||(typeof Object=="undefined"?nil:Obje
|
|
function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
|
|
function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
var $1,$2,$3;
|
|
var $1,$2,$3;
|
|
-className=_st(window)._prompt_("New class");
|
|
|
|
|
|
+className=self._prompt_("New class");
|
|
$1=_st(_st(className)._notNil())._and_((function(){
|
|
$1=_st(_st(className)._notNil())._and_((function(){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return _st(className)._notEmpty();
|
|
return _st(className)._notEmpty();
|
|
@@ -1890,7 +1889,7 @@ self._selectClass_(_st(_st($Smalltalk())._current())._at_(className));
|
|
};
|
|
};
|
|
return self}, function($ctx1) {$ctx1.fill(self,"addNewClass",{className:className},smalltalk.Browser)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"addNewClass",{className:className},smalltalk.Browser)})},
|
|
args: [],
|
|
args: [],
|
|
-source: "addNewClass\x0a\x09| className |\x0a\x09className := window prompt: 'New class'.\x0a\x09(className notNil and: [className notEmpty]) ifTrue: [\x0a\x09\x09Object subclass: className instanceVariableNames: '' package: self selectedPackage.\x0a\x09\x09\x09self\x0a\x09\x09\x09resetClassesList;\x0a\x09\x09\x09updateClassesList.\x0a\x09\x09self selectClass: (Smalltalk current at: className)]",
|
|
|
|
|
|
+source: "addNewClass\x0a\x09| className |\x0a\x09className := self prompt: 'New class'.\x0a\x09(className notNil and: [className notEmpty]) ifTrue: [\x0a\x09\x09Object subclass: className instanceVariableNames: '' package: self selectedPackage.\x0a\x09\x09\x09self\x0a\x09\x09\x09resetClassesList;\x0a\x09\x09\x09updateClassesList.\x0a\x09\x09self selectClass: (Smalltalk current at: className)]",
|
|
messageSends: ["prompt:", "ifTrue:", "subclass:instanceVariableNames:package:", "selectedPackage", "resetClassesList", "updateClassesList", "selectClass:", "at:", "current", "and:", "notEmpty", "notNil"],
|
|
messageSends: ["prompt:", "ifTrue:", "subclass:instanceVariableNames:package:", "selectedPackage", "resetClassesList", "updateClassesList", "selectClass:", "at:", "current", "and:", "notEmpty", "notNil"],
|
|
referencedClasses: ["Object", "Smalltalk"]
|
|
referencedClasses: ["Object", "Smalltalk"]
|
|
}),
|
|
}),
|
|
@@ -1905,7 +1904,7 @@ var self=this;
|
|
var newProtocol;
|
|
var newProtocol;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
var $1;
|
|
var $1;
|
|
-newProtocol=_st(window)._prompt_("New method protocol");
|
|
|
|
|
|
+newProtocol=self._prompt_("New method protocol");
|
|
$1=_st(_st(newProtocol)._notNil())._and_((function(){
|
|
$1=_st(_st(newProtocol)._notNil())._and_((function(){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return _st(newProtocol)._notEmpty();
|
|
return _st(newProtocol)._notEmpty();
|
|
@@ -1916,7 +1915,7 @@ self._setMethodProtocol_(newProtocol);
|
|
};
|
|
};
|
|
return self}, function($ctx1) {$ctx1.fill(self,"addNewProtocol",{newProtocol:newProtocol},smalltalk.Browser)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"addNewProtocol",{newProtocol:newProtocol},smalltalk.Browser)})},
|
|
args: [],
|
|
args: [],
|
|
-source: "addNewProtocol\x0a\x09| newProtocol |\x0a\x09newProtocol := window prompt: 'New method protocol'.\x0a\x09(newProtocol notNil and: [newProtocol notEmpty]) ifTrue: [\x0a\x09selectedMethod category: newProtocol.\x0a\x09self setMethodProtocol: newProtocol]",
|
|
|
|
|
|
+source: "addNewProtocol\x0a\x09| newProtocol |\x0a\x09newProtocol := self prompt: 'New method protocol'.\x0a\x09(newProtocol notNil and: [newProtocol notEmpty]) ifTrue: [\x0a\x09selectedMethod category: newProtocol.\x0a\x09self setMethodProtocol: newProtocol]",
|
|
messageSends: ["prompt:", "ifTrue:", "category:", "setMethodProtocol:", "and:", "notEmpty", "notNil"],
|
|
messageSends: ["prompt:", "ifTrue:", "category:", "setMethodProtocol:", "and:", "notEmpty", "notNil"],
|
|
referencedClasses: []
|
|
referencedClasses: []
|
|
}),
|
|
}),
|
|
@@ -1948,14 +1947,14 @@ return smalltalk.withContext(function($ctx1) {
|
|
var $2,$1;
|
|
var $2,$1;
|
|
$2=self["@unsavedChanges"];
|
|
$2=self["@unsavedChanges"];
|
|
if(smalltalk.assert($2)){
|
|
if(smalltalk.assert($2)){
|
|
-$1=_st(window)._confirm_("Cancel changes?");
|
|
|
|
|
|
+$1=self._confirm_("Cancel changes?");
|
|
} else {
|
|
} else {
|
|
$1=true;
|
|
$1=true;
|
|
};
|
|
};
|
|
return $1;
|
|
return $1;
|
|
}, function($ctx1) {$ctx1.fill(self,"cancelChanges",{},smalltalk.Browser)})},
|
|
}, function($ctx1) {$ctx1.fill(self,"cancelChanges",{},smalltalk.Browser)})},
|
|
args: [],
|
|
args: [],
|
|
-source: "cancelChanges\x0a\x09^unsavedChanges\x0a\x09ifTrue: [window confirm: 'Cancel changes?']\x0a\x09ifFalse: [true]",
|
|
|
|
|
|
+source: "cancelChanges\x0a\x09^unsavedChanges\x0a\x09ifTrue: [self confirm: 'Cancel changes?']\x0a\x09ifFalse: [true]",
|
|
messageSends: ["ifTrue:ifFalse:", "confirm:"],
|
|
messageSends: ["ifTrue:ifFalse:", "confirm:"],
|
|
referencedClasses: []
|
|
referencedClasses: []
|
|
}),
|
|
}),
|
|
@@ -2200,6 +2199,7 @@ fn: function (aClass){
|
|
var self=this;
|
|
var self=this;
|
|
var compiler,method,source,node;
|
|
var compiler,method,source,node;
|
|
function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
|
|
function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
|
|
|
|
+function $PlatformInterface(){return smalltalk.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
|
|
function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
|
|
function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
var $1,$2,$3,$4,$5,$6;
|
|
var $1,$2,$3,$4,$5,$6;
|
|
@@ -2218,23 +2218,21 @@ _st(compiler)._source_(source);
|
|
node=_st(compiler)._parse_(source);
|
|
node=_st(compiler)._parse_(source);
|
|
$2=_st(node)._isParseFailure();
|
|
$2=_st(node)._isParseFailure();
|
|
if(smalltalk.assert($2)){
|
|
if(smalltalk.assert($2)){
|
|
-$3=_st(window)._alert_(_st(_st("PARSE ERROR: ".__comma(_st(node)._reason())).__comma(", position: ")).__comma(_st(_st(node)._position())._asString()));
|
|
|
|
|
|
+$3=self._alert_(_st(_st("PARSE ERROR: ".__comma(_st(node)._reason())).__comma(", position: ")).__comma(_st(_st(node)._position())._asString()));
|
|
return $3;
|
|
return $3;
|
|
};
|
|
};
|
|
_st(compiler)._currentClass_(aClass);
|
|
_st(compiler)._currentClass_(aClass);
|
|
method=_st(compiler)._eval_(_st(compiler)._compileNode_(node));
|
|
method=_st(compiler)._eval_(_st(compiler)._compileNode_(node));
|
|
_st(_st(compiler)._unknownVariables())._do_((function(each){
|
|
_st(_st(compiler)._unknownVariables())._do_((function(each){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
-$4=_st(window)._at_(each);
|
|
|
|
-if(($receiver = $4) == nil || $receiver == undefined){
|
|
|
|
-$5=_st(window)._confirm_(_st("Declare '".__comma(each)).__comma("' as instance variable?"));
|
|
|
|
|
|
+$4=_st($PlatformInterface())._existsGlobal_(each);
|
|
|
|
+if(! smalltalk.assert($4)){
|
|
|
|
+$5=self._confirm_(_st("Declare '".__comma(each)).__comma("' as instance variable?"));
|
|
if(smalltalk.assert($5)){
|
|
if(smalltalk.assert($5)){
|
|
self._addInstanceVariableNamed_toClass_(each,aClass);
|
|
self._addInstanceVariableNamed_toClass_(each,aClass);
|
|
$6=self._compileMethodDefinitionFor_(aClass);
|
|
$6=self._compileMethodDefinitionFor_(aClass);
|
|
throw $early=[$6];
|
|
throw $early=[$6];
|
|
};
|
|
};
|
|
-} else {
|
|
|
|
-return $4;
|
|
|
|
};
|
|
};
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
|
_st(_st($ClassBuilder())._new())._installMethod_forClass_category_(method,aClass,self["@selectedProtocol"]);
|
|
_st(_st($ClassBuilder())._new())._installMethod_forClass_category_(method,aClass,self["@selectedProtocol"]);
|
|
@@ -2244,9 +2242,9 @@ return self}
|
|
catch(e) {if(e===$early)return e[0]; throw e}
|
|
catch(e) {if(e===$early)return e[0]; throw e}
|
|
}, function($ctx1) {$ctx1.fill(self,"compileMethodDefinitionFor:",{aClass:aClass,compiler:compiler,method:method,source:source,node:node},smalltalk.Browser)})},
|
|
}, function($ctx1) {$ctx1.fill(self,"compileMethodDefinitionFor:",{aClass:aClass,compiler:compiler,method:method,source:source,node:node},smalltalk.Browser)})},
|
|
args: ["aClass"],
|
|
args: ["aClass"],
|
|
-source: "compileMethodDefinitionFor: aClass\x0a\x09| compiler method source node |\x0a\x09source := sourceArea val.\x0a\x09selectedProtocol ifNil: [ selectedProtocol := selectedMethod category ].\x0a\x09compiler := Compiler new.\x0a\x09compiler source: source.\x0a\x09node := compiler parse: source.\x0a\x09node isParseFailure ifTrue: [\x0a\x09^window alert: 'PARSE ERROR: ', node reason, ', position: ', node position asString].\x0a\x09compiler currentClass: aClass.\x0a\x09method := compiler eval: (compiler compileNode: node).\x0a\x09compiler unknownVariables do: [:each |\x0a\x09\x09\x22Do not try to redeclare javascript's objects\x22\x0a\x09\x09(window at: each) ifNil: [\x0a\x09\x09(window confirm: 'Declare ''', each, ''' as instance variable?') ifTrue: [\x0a\x09\x09\x09self addInstanceVariableNamed: each toClass: aClass.\x0a\x09\x09\x09^self compileMethodDefinitionFor: aClass]]].\x0a\x09ClassBuilder new installMethod: method forClass: aClass category: selectedProtocol.\x0a\x09self updateMethodsList.\x0a\x09self selectMethod: method",
|
|
|
|
-messageSends: ["val", "ifNil:", "category", "new", "source:", "parse:", "ifTrue:", "alert:", ",", "asString", "position", "reason", "isParseFailure", "currentClass:", "eval:", "compileNode:", "do:", "addInstanceVariableNamed:toClass:", "compileMethodDefinitionFor:", "confirm:", "at:", "unknownVariables", "installMethod:forClass:category:", "updateMethodsList", "selectMethod:"],
|
|
|
|
-referencedClasses: ["Compiler", "ClassBuilder"]
|
|
|
|
|
|
+source: "compileMethodDefinitionFor: aClass\x0a\x09| compiler method source node |\x0a\x09source := sourceArea val.\x0a\x09selectedProtocol ifNil: [ selectedProtocol := selectedMethod category ].\x0a\x09compiler := Compiler new.\x0a\x09compiler source: source.\x0a\x09node := compiler parse: source.\x0a\x09node isParseFailure ifTrue: [\x0a\x09^self alert: 'PARSE ERROR: ', node reason, ', position: ', node position asString].\x0a\x09compiler currentClass: aClass.\x0a\x09method := compiler eval: (compiler compileNode: node).\x0a\x09compiler unknownVariables do: [:each |\x0a\x09\x09\x22Do not try to redeclare javascript's objects\x22\x0a\x09\x09(PlatformInterface existsGlobal: each) ifFalse: [\x0a\x09\x09(self confirm: 'Declare ''', each, ''' as instance variable?') ifTrue: [\x0a\x09\x09\x09self addInstanceVariableNamed: each toClass: aClass.\x0a\x09\x09\x09^self compileMethodDefinitionFor: aClass]]].\x0a\x09ClassBuilder new installMethod: method forClass: aClass category: selectedProtocol.\x0a\x09self updateMethodsList.\x0a\x09self selectMethod: method",
|
|
|
|
+messageSends: ["val", "ifNil:", "category", "new", "source:", "parse:", "ifTrue:", "alert:", ",", "asString", "position", "reason", "isParseFailure", "currentClass:", "eval:", "compileNode:", "do:", "ifFalse:", "addInstanceVariableNamed:toClass:", "compileMethodDefinitionFor:", "confirm:", "existsGlobal:", "unknownVariables", "installMethod:forClass:category:", "updateMethodsList", "selectMethod:"],
|
|
|
|
+referencedClasses: ["Compiler", "PlatformInterface", "ClassBuilder"]
|
|
}),
|
|
}),
|
|
smalltalk.Browser);
|
|
smalltalk.Browser);
|
|
|
|
|
|
@@ -2261,7 +2259,7 @@ function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="u
|
|
function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
|
|
function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
var $1,$2,$3;
|
|
var $1,$2,$3;
|
|
-className=_st(window)._prompt_("Copy class");
|
|
|
|
|
|
+className=self._prompt_("Copy class");
|
|
$1=_st(_st(className)._notNil())._and_((function(){
|
|
$1=_st(_st(className)._notNil())._and_((function(){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return _st(className)._notEmpty();
|
|
return _st(className)._notEmpty();
|
|
@@ -2276,7 +2274,7 @@ self._selectClass_(_st(_st($Smalltalk())._current())._at_(className));
|
|
};
|
|
};
|
|
return self}, function($ctx1) {$ctx1.fill(self,"copyClass",{className:className},smalltalk.Browser)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"copyClass",{className:className},smalltalk.Browser)})},
|
|
args: [],
|
|
args: [],
|
|
-source: "copyClass\x0a\x09| className |\x0a\x09className := window prompt: 'Copy class'.\x0a\x09(className notNil and: [className notEmpty]) ifTrue: [\x0a\x09\x09ClassBuilder new copyClass: self selectedClass named: className.\x0a\x09\x09\x09self\x0a\x09\x09\x09resetClassesList;\x0a\x09\x09\x09updateClassesList.\x0a\x09\x09self selectClass: (Smalltalk current at: className)]",
|
|
|
|
|
|
+source: "copyClass\x0a\x09| className |\x0a\x09className := self prompt: 'Copy class'.\x0a\x09(className notNil and: [className notEmpty]) ifTrue: [\x0a\x09\x09ClassBuilder new copyClass: self selectedClass named: className.\x0a\x09\x09\x09self\x0a\x09\x09\x09resetClassesList;\x0a\x09\x09\x09updateClassesList.\x0a\x09\x09self selectClass: (Smalltalk current at: className)]",
|
|
messageSends: ["prompt:", "ifTrue:", "copyClass:named:", "selectedClass", "new", "resetClassesList", "updateClassesList", "selectClass:", "at:", "current", "and:", "notEmpty", "notNil"],
|
|
messageSends: ["prompt:", "ifTrue:", "copyClass:named:", "selectedClass", "new", "resetClassesList", "updateClassesList", "selectClass:", "at:", "current", "and:", "notEmpty", "notNil"],
|
|
referencedClasses: ["ClassBuilder", "Smalltalk"]
|
|
referencedClasses: ["ClassBuilder", "Smalltalk"]
|
|
}),
|
|
}),
|
|
@@ -2637,7 +2635,7 @@ var self=this;
|
|
function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
|
|
function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
var $1;
|
|
var $1;
|
|
-$1=_st(window)._confirm_(_st("Do you really want to remove ".__comma(_st(self["@selectedClass"])._name())).__comma("?"));
|
|
|
|
|
|
+$1=self._confirm_(_st("Do you really want to remove ".__comma(_st(self["@selectedClass"])._name())).__comma("?"));
|
|
if(smalltalk.assert($1)){
|
|
if(smalltalk.assert($1)){
|
|
_st(_st($Smalltalk())._current())._removeClass_(self["@selectedClass"]);
|
|
_st(_st($Smalltalk())._current())._removeClass_(self["@selectedClass"]);
|
|
self._resetClassesList();
|
|
self._resetClassesList();
|
|
@@ -2645,7 +2643,7 @@ self._selectClass_(nil);
|
|
};
|
|
};
|
|
return self}, function($ctx1) {$ctx1.fill(self,"removeClass",{},smalltalk.Browser)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"removeClass",{},smalltalk.Browser)})},
|
|
args: [],
|
|
args: [],
|
|
-source: "removeClass\x0a\x09(window confirm: 'Do you really want to remove ', selectedClass name, '?')\x0a\x09ifTrue: [\x0a\x09\x09Smalltalk current removeClass: selectedClass.\x0a\x09\x09self resetClassesList.\x0a\x09\x09self selectClass: nil]",
|
|
|
|
|
|
+source: "removeClass\x0a\x09(self confirm: 'Do you really want to remove ', selectedClass name, '?')\x0a\x09ifTrue: [\x0a\x09\x09Smalltalk current removeClass: selectedClass.\x0a\x09\x09self resetClassesList.\x0a\x09\x09self selectClass: nil]",
|
|
messageSends: ["ifTrue:", "removeClass:", "current", "resetClassesList", "selectClass:", "confirm:", ",", "name"],
|
|
messageSends: ["ifTrue:", "removeClass:", "current", "resetClassesList", "selectClass:", "confirm:", ",", "name"],
|
|
referencedClasses: ["Smalltalk"]
|
|
referencedClasses: ["Smalltalk"]
|
|
}),
|
|
}),
|
|
@@ -2661,7 +2659,7 @@ return smalltalk.withContext(function($ctx1) {
|
|
var $1,$2,$3;
|
|
var $1,$2,$3;
|
|
$1=self._cancelChanges();
|
|
$1=self._cancelChanges();
|
|
if(smalltalk.assert($1)){
|
|
if(smalltalk.assert($1)){
|
|
-$2=_st(window)._confirm_(_st("Do you really want to remove #".__comma(_st(self["@selectedMethod"])._selector())).__comma("?"));
|
|
|
|
|
|
+$2=self._confirm_(_st("Do you really want to remove #".__comma(_st(self["@selectedMethod"])._selector())).__comma("?"));
|
|
if(smalltalk.assert($2)){
|
|
if(smalltalk.assert($2)){
|
|
$3=_st(self["@selectedTab"]).__eq("instance");
|
|
$3=_st(self["@selectedTab"]).__eq("instance");
|
|
if(smalltalk.assert($3)){
|
|
if(smalltalk.assert($3)){
|
|
@@ -2674,7 +2672,7 @@ self._selectMethod_(nil);
|
|
};
|
|
};
|
|
return self}, function($ctx1) {$ctx1.fill(self,"removeMethod",{},smalltalk.Browser)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"removeMethod",{},smalltalk.Browser)})},
|
|
args: [],
|
|
args: [],
|
|
-source: "removeMethod\x0a\x09self cancelChanges ifTrue: [\x0a\x09(window confirm: 'Do you really want to remove #', selectedMethod selector, '?')\x0a\x09\x09ifTrue: [\x0a\x09\x09selectedTab = #instance\x0a\x09\x09\x09ifTrue: [selectedClass removeCompiledMethod: selectedMethod]\x0a\x09\x09\x09ifFalse: [selectedClass class removeCompiledMethod: selectedMethod].\x0a\x09\x09self selectMethod: nil]]",
|
|
|
|
|
|
+source: "removeMethod\x0a\x09self cancelChanges ifTrue: [\x0a\x09(self confirm: 'Do you really want to remove #', selectedMethod selector, '?')\x0a\x09\x09ifTrue: [\x0a\x09\x09selectedTab = #instance\x0a\x09\x09\x09ifTrue: [selectedClass removeCompiledMethod: selectedMethod]\x0a\x09\x09\x09ifFalse: [selectedClass class removeCompiledMethod: selectedMethod].\x0a\x09\x09self selectMethod: nil]]",
|
|
messageSends: ["ifTrue:", "ifTrue:ifFalse:", "removeCompiledMethod:", "class", "=", "selectMethod:", "confirm:", ",", "selector", "cancelChanges"],
|
|
messageSends: ["ifTrue:", "ifTrue:ifFalse:", "removeCompiledMethod:", "class", "=", "selectMethod:", "confirm:", ",", "selector", "cancelChanges"],
|
|
referencedClasses: []
|
|
referencedClasses: []
|
|
}),
|
|
}),
|
|
@@ -2689,14 +2687,14 @@ var self=this;
|
|
function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
|
|
function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
var $1;
|
|
var $1;
|
|
-$1=_st(window)._confirm_(_st("Do you really want to remove the whole package ".__comma(self["@selectedPackage"])).__comma(" with all its classes?"));
|
|
|
|
|
|
+$1=self._confirm_(_st("Do you really want to remove the whole package ".__comma(self["@selectedPackage"])).__comma(" with all its classes?"));
|
|
if(smalltalk.assert($1)){
|
|
if(smalltalk.assert($1)){
|
|
_st(_st($Smalltalk())._current())._removePackage_(self["@selectedPackage"]);
|
|
_st(_st($Smalltalk())._current())._removePackage_(self["@selectedPackage"]);
|
|
self._updateCategoriesList();
|
|
self._updateCategoriesList();
|
|
};
|
|
};
|
|
return self}, function($ctx1) {$ctx1.fill(self,"removePackage",{},smalltalk.Browser)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"removePackage",{},smalltalk.Browser)})},
|
|
args: [],
|
|
args: [],
|
|
-source: "removePackage\x0a\x0a\x09(window confirm: 'Do you really want to remove the whole package ', selectedPackage, ' with all its classes?')\x0a\x09ifTrue: [\x0a\x09\x09Smalltalk current removePackage: selectedPackage.\x0a\x09\x09self updateCategoriesList]",
|
|
|
|
|
|
+source: "removePackage\x0a\x0a\x09(self confirm: 'Do you really want to remove the whole package ', selectedPackage, ' with all its classes?')\x0a\x09ifTrue: [\x0a\x09\x09Smalltalk current removePackage: selectedPackage.\x0a\x09\x09self updateCategoriesList]",
|
|
messageSends: ["ifTrue:", "removePackage:", "current", "updateCategoriesList", "confirm:", ","],
|
|
messageSends: ["ifTrue:", "removePackage:", "current", "updateCategoriesList", "confirm:", ","],
|
|
referencedClasses: ["Smalltalk"]
|
|
referencedClasses: ["Smalltalk"]
|
|
}),
|
|
}),
|
|
@@ -2711,7 +2709,7 @@ var self=this;
|
|
var newName;
|
|
var newName;
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
var $1,$2,$3;
|
|
var $1,$2,$3;
|
|
-newName=_st(window)._prompt_("Rename class ".__comma(_st(self["@selectedClass"])._name()));
|
|
|
|
|
|
+newName=self._prompt_("Rename class ".__comma(_st(self["@selectedClass"])._name()));
|
|
$1=_st(_st(newName)._notNil())._and_((function(){
|
|
$1=_st(_st(newName)._notNil())._and_((function(){
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return smalltalk.withContext(function($ctx2) {
|
|
return _st(newName)._notEmpty();
|
|
return _st(newName)._notEmpty();
|
|
@@ -2725,7 +2723,7 @@ $3;
|
|
};
|
|
};
|
|
return self}, function($ctx1) {$ctx1.fill(self,"renameClass",{newName:newName},smalltalk.Browser)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"renameClass",{newName:newName},smalltalk.Browser)})},
|
|
args: [],
|
|
args: [],
|
|
-source: "renameClass\x0a\x09| newName |\x0a\x09newName := window prompt: 'Rename class ', selectedClass name.\x0a\x09(newName notNil and: [newName notEmpty]) ifTrue: [\x0a\x09selectedClass rename: newName.\x0a\x09self\x0a\x09\x09updateClassesList;\x0a\x09\x09updateSourceAndButtons]",
|
|
|
|
|
|
+source: "renameClass\x0a\x09| newName |\x0a\x09newName := self prompt: 'Rename class ', selectedClass name.\x0a\x09(newName notNil and: [newName notEmpty]) ifTrue: [\x0a\x09selectedClass rename: newName.\x0a\x09self\x0a\x09\x09updateClassesList;\x0a\x09\x09updateSourceAndButtons]",
|
|
messageSends: ["prompt:", ",", "name", "ifTrue:", "rename:", "updateClassesList", "updateSourceAndButtons", "and:", "notEmpty", "notNil"],
|
|
messageSends: ["prompt:", ",", "name", "ifTrue:", "rename:", "updateClassesList", "updateSourceAndButtons", "and:", "notEmpty", "notNil"],
|
|
referencedClasses: []
|
|
referencedClasses: []
|
|
}),
|
|
}),
|
|
@@ -2741,7 +2739,7 @@ var newName;
|
|
function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
|
|
function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
|
|
return smalltalk.withContext(function($ctx1) {
|
|
return smalltalk.withContext(function($ctx1) {
|
|
var $1,$2;
|
|
var $1,$2;
|
|
-newName=_st(window)._prompt_("Rename package ".__comma(self["@selectedPackage"]));
|
|
|
|
|
|
+newName=self._prompt_("Rename package ".__comma(self["@selectedPackage"]));
|
|
$1=newName;
|
|
$1=newName;
|
|
if(($receiver = $1) == nil || $receiver == undefined){
|
|
if(($receiver = $1) == nil || $receiver == undefined){
|
|
$1;
|
|
$1;
|
|
@@ -2754,7 +2752,7 @@ self._updateCategoriesList();
|
|
};
|
|
};
|
|
return self}, function($ctx1) {$ctx1.fill(self,"renamePackage",{newName:newName},smalltalk.Browser)})},
|
|
return self}, function($ctx1) {$ctx1.fill(self,"renamePackage",{newName:newName},smalltalk.Browser)})},
|
|
args: [],
|
|
args: [],
|
|
-source: "renamePackage\x0a\x0a\x09| newName |\x0a\x09newName := window prompt: 'Rename package ', selectedPackage.\x0a\x09newName ifNotNil: [\x0a\x09newName notEmpty ifTrue: [\x0a\x09Smalltalk current renamePackage: selectedPackage to: newName.\x0a\x09self updateCategoriesList]]",
|
|
|
|
|
|
+source: "renamePackage\x0a\x0a\x09| newName |\x0a\x09newName := self prompt: 'Rename package ', selectedPackage.\x0a\x09newName ifNotNil: [\x0a\x09newName notEmpty ifTrue: [\x0a\x09Smalltalk current renamePackage: selectedPackage to: newName.\x0a\x09self updateCategoriesList]]",
|
|
messageSends: ["prompt:", ",", "ifNotNil:", "ifTrue:", "renamePackage:to:", "current", "updateCategoriesList", "notEmpty"],
|
|
messageSends: ["prompt:", ",", "ifNotNil:", "ifTrue:", "renamePackage:to:", "current", "updateCategoriesList", "notEmpty"],
|
|
referencedClasses: ["Smalltalk"]
|
|
referencedClasses: ["Smalltalk"]
|
|
}),
|
|
}),
|