smalltalk.addPackage('IDE', {}); smalltalk.addClass('ClassesList', smalltalk.Widget, ['browser', 'ul', 'nodes'], 'IDE'); smalltalk.addMethod( "_browser", smalltalk.method({ selector: "browser", category: 'accessing', fn: function (){ var self=this; return self['@browser']; return self;}, args: [], source: "browser\x0a\x09^browser", messageSends: [], referencedClasses: [] }), smalltalk.ClassesList); smalltalk.addMethod( "_browser_", smalltalk.method({ selector: "browser:", category: 'accessing', fn: function (aBrowser){ var self=this; (self['@browser']=aBrowser); return self;}, args: ["aBrowser"], source: "browser: aBrowser\x0a\x09browser := aBrowser", messageSends: [], referencedClasses: [] }), smalltalk.ClassesList); smalltalk.addMethod( "_category", smalltalk.method({ selector: "category", category: 'accessing', fn: function (){ var self=this; return smalltalk.send(smalltalk.send(self, "_browser", []), "_selectedPackage", []); return self;}, args: [], source: "category\x0a\x09^self browser selectedPackage", messageSends: ["selectedPackage", "browser"], referencedClasses: [] }), smalltalk.ClassesList); smalltalk.addMethod( "_getNodes", smalltalk.method({ selector: "getNodes", category: 'accessing', fn: function (){ var self=this; var classes=nil; var children=nil; var others=nil; (classes=smalltalk.send(smalltalk.send(self, "_browser", []), "_classes", [])); (children=[]); (others=[]); smalltalk.send(classes, "_do_", [(function(each){return ((($receiver = smalltalk.send(classes, "_includes_", [smalltalk.send(each, "_superclass", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(children, "_add_", [each]);})() : (function(){return smalltalk.send(others, "_add_", [each]);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(children, "_add_", [each]);}), (function(){return smalltalk.send(others, "_add_", [each]);})]));})]); return smalltalk.send(children, "_collect_", [(function(each){return smalltalk.send((smalltalk.ClassesListNode || ClassesListNode), "_on_browser_classes_level_", [each, smalltalk.send(self, "_browser", []), others, (0)]);})]); return self;}, args: [], source: "getNodes\x0a\x09| classes children others |\x0a\x09classes := self browser classes.\x0a\x09children := #().\x0a\x09others := #().\x0a\x09classes do: [:each |\x0a\x09\x09(classes includes: each superclass)\x0a\x09\x09\x09ifFalse: [children add: each]\x0a\x09\x09\x09ifTrue: [others add: each]].\x0a\x09^children collect: [:each |\x0a\x09\x09ClassesListNode on: each browser: self browser classes: others level: 0]", messageSends: ["classes", "browser", "do:", "ifFalse:ifTrue:", "includes:", "superclass", "add:", "collect:", "on:browser:classes:level:"], referencedClasses: ["ClassesListNode"] }), smalltalk.ClassesList); smalltalk.addMethod( "_nodes", smalltalk.method({ selector: "nodes", category: 'accessing', fn: function (){ var self=this; (($receiver = self['@nodes']) == nil || $receiver == undefined) ? (function(){return (self['@nodes']=smalltalk.send(self, "_getNodes", []));})() : $receiver; return self['@nodes']; return self;}, args: [], source: "nodes\x0a\x09nodes ifNil: [nodes := self getNodes].\x0a\x09^nodes", messageSends: ["ifNil:", "getNodes"], referencedClasses: [] }), smalltalk.ClassesList); smalltalk.addMethod( "_renderOn_", smalltalk.method({ selector: "renderOn:", category: 'rendering', fn: function (html){ var self=this; (self['@ul']=(function($rec){smalltalk.send($rec, "_class_", ["amber_column browser classes"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(html, "_ul", []))); smalltalk.send(self, "_updateNodes", []); return self;}, args: ["html"], source: "renderOn: html\x0a\x09ul := html ul\x0a\x09\x09class: 'amber_column browser classes';\x0a\x09\x09yourself.\x0a\x09self updateNodes", messageSends: ["class:", "yourself", "ul", "updateNodes"], referencedClasses: [] }), smalltalk.ClassesList); smalltalk.addMethod( "_resetNodes", smalltalk.method({ selector: "resetNodes", category: 'accessing', fn: function (){ var self=this; (self['@nodes']=nil); return self;}, args: [], source: "resetNodes\x0a\x09nodes := nil", messageSends: [], referencedClasses: [] }), smalltalk.ClassesList); smalltalk.addMethod( "_updateNodes", smalltalk.method({ selector: "updateNodes", category: 'rendering', fn: function (){ var self=this; smalltalk.send(self['@ul'], "_contents_", [(function(html){return smalltalk.send(smalltalk.send(self, "_nodes", []), "_do_", [(function(each){return smalltalk.send(each, "_renderOn_", [html]);})]);})]); return self;}, args: [], source: "updateNodes\x0a\x09ul contents: [:html |\x0a\x09\x09self nodes do: [:each |\x0a\x09\x09\x09each renderOn: html]]", messageSends: ["contents:", "do:", "nodes", "renderOn:"], referencedClasses: [] }), smalltalk.ClassesList); smalltalk.addMethod( "_on_", smalltalk.method({ selector: "on:", category: 'instance creation', fn: function (aBrowser){ var self=this; return (function($rec){smalltalk.send($rec, "_browser_", [aBrowser]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", [])); return self;}, args: ["aBrowser"], source: "on: aBrowser\x0a\x09^self new \x0a\x09\x09browser: aBrowser; \x0a\x09\x09yourself", messageSends: ["browser:", "yourself", "new"], referencedClasses: [] }), smalltalk.ClassesList.klass); smalltalk.addClass('ClassesListNode', smalltalk.Widget, ['browser', 'theClass', 'level', 'nodes'], 'IDE'); smalltalk.addMethod( "_browser", smalltalk.method({ selector: "browser", category: 'accessing', fn: function (){ var self=this; return self['@browser']; return self;}, args: [], source: "browser\x0a\x09^browser", messageSends: [], referencedClasses: [] }), smalltalk.ClassesListNode); smalltalk.addMethod( "_browser_", smalltalk.method({ selector: "browser:", category: 'accessing', fn: function (aBrowser){ var self=this; (self['@browser']=aBrowser); return self;}, args: ["aBrowser"], source: "browser: aBrowser\x0a\x09browser := aBrowser", messageSends: [], referencedClasses: [] }), smalltalk.ClassesListNode); smalltalk.addMethod( "_getNodesFrom_", smalltalk.method({ selector: "getNodesFrom:", category: 'accessing', fn: function (aCollection){ var self=this; var children=nil; var others=nil; (children=[]); (others=[]); smalltalk.send(aCollection, "_do_", [(function(each){return ((($receiver = smalltalk.send(smalltalk.send(each, "_superclass", []), "__eq", [smalltalk.send(self, "_theClass", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(children, "_add_", [each]);})() : (function(){return smalltalk.send(others, "_add_", [each]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(children, "_add_", [each]);}), (function(){return smalltalk.send(others, "_add_", [each]);})]));})]); (self['@nodes']=smalltalk.send(children, "_collect_", [(function(each){return smalltalk.send((smalltalk.ClassesListNode || ClassesListNode), "_on_browser_classes_level_", [each, smalltalk.send(self, "_browser", []), others, ((($receiver = smalltalk.send(self, "_level", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);})])); return self;}, args: ["aCollection"], source: "getNodesFrom: aCollection\x0a\x09| children others |\x0a\x09children := #().\x0a\x09others := #().\x0a\x09aCollection do: [:each |\x0a\x09\x09(each superclass = self theClass)\x0a\x09\x09\x09ifTrue: [children add: each]\x0a\x09\x09\x09ifFalse: [others add: each]].\x0a\x09nodes:= children collect: [:each |\x0a\x09\x09ClassesListNode on: each browser: self browser classes: others level: self level + 1]", messageSends: ["do:", "ifTrue:ifFalse:", "=", "superclass", "theClass", "add:", "collect:", "on:browser:classes:level:", "browser", "+", "level"], referencedClasses: ["ClassesListNode"] }), smalltalk.ClassesListNode); smalltalk.addMethod( "_label", smalltalk.method({ selector: "label", category: 'accessing', fn: function (){ var self=this; var str=nil; (str=smalltalk.send(smalltalk.send((smalltalk.String || String), "_new", []), "_writeStream", [])); smalltalk.send(smalltalk.send(self, "_level", []), "_timesRepeat_", [(function(){return smalltalk.send(str, "_nextPutAll_", ["    "]);})]); smalltalk.send(str, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_theClass", []), "_name", [])]); return smalltalk.send(str, "_contents", []); return self;}, args: [], source: "label\x0a\x09| str |\x0a\x09str := String new writeStream.\x0a\x09self level timesRepeat: [\x0a\x09\x09str nextPutAll: '    '].\x0a\x09str nextPutAll: self theClass name.\x0a\x09^str contents", messageSends: ["writeStream", "new", "timesRepeat:", "level", "nextPutAll:", "name", "theClass", "contents"], referencedClasses: ["String"] }), smalltalk.ClassesListNode); smalltalk.addMethod( "_level", smalltalk.method({ selector: "level", category: 'accessing', fn: function (){ var self=this; return self['@level']; return self;}, args: [], source: "level\x0a\x09^level", messageSends: [], referencedClasses: [] }), smalltalk.ClassesListNode); smalltalk.addMethod( "_level_", smalltalk.method({ selector: "level:", category: 'accessing', fn: function (anInteger){ var self=this; (self['@level']=anInteger); return self;}, args: ["anInteger"], source: "level: anInteger\x0a\x09level := anInteger", messageSends: [], referencedClasses: [] }), smalltalk.ClassesListNode); smalltalk.addMethod( "_nodes", smalltalk.method({ selector: "nodes", category: 'accessing', fn: function (){ var self=this; return self['@nodes']; return self;}, args: [], source: "nodes\x0a\x09^nodes", messageSends: [], referencedClasses: [] }), smalltalk.ClassesListNode); smalltalk.addMethod( "_renderOn_", smalltalk.method({ selector: "renderOn:", category: '', fn: function (html){ var self=this; var li=nil; var cssClass=nil; (cssClass=""); (li=smalltalk.send(smalltalk.send(html, "_li", []), "_onClick_", [(function(){return smalltalk.send(smalltalk.send(self, "_browser", []), "_selectClass_", [smalltalk.send(self, "_theClass", [])]);})])); smalltalk.send(smalltalk.send(li, "_asJQuery", []), "_html_", [smalltalk.send(self, "_label", [])]); ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(self, "_browser", []), "_selectedClass", []), "__eq", [smalltalk.send(self, "_theClass", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (cssClass=smalltalk.send(cssClass, "__comma", [" selected"]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (cssClass=smalltalk.send(cssClass, "__comma", [" selected"]));})])); ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(self, "_theClass", []), "_comment", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (cssClass=smalltalk.send(cssClass, "__comma", [" commented"]));})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (cssClass=smalltalk.send(cssClass, "__comma", [" commented"]));})])); smalltalk.send(li, "_class_", [cssClass]); smalltalk.send(smalltalk.send(self, "_nodes", []), "_do_", [(function(each){return smalltalk.send(each, "_renderOn_", [html]);})]); return self;}, args: ["html"], source: "renderOn: html\x0a\x09| li cssClass |\x0a\x09cssClass := ''.\x0a\x09li := html li \x0a\x09\x09onClick: [self browser selectClass: self theClass]. \x0a\x09li asJQuery html: self label.\x0a\x0a\x09self browser selectedClass = self theClass ifTrue: [\x0a\x09\x09cssClass := cssClass, ' selected'].\x0a\x0a\x09self theClass comment isEmpty ifFalse: [\x0a\x09\x09cssClass := cssClass, ' commented'].\x0a\x0a\x09li class: cssClass.\x0a\x0a\x09self nodes do: [:each |\x0a\x09\x09each renderOn: html]", messageSends: ["onClick:", "li", "selectClass:", "browser", "theClass", "html:", "asJQuery", "label", "ifTrue:", "=", "selectedClass", ",", "ifFalse:", "isEmpty", "comment", "class:", "do:", "nodes", "renderOn:"], referencedClasses: [] }), smalltalk.ClassesListNode); smalltalk.addMethod( "_theClass", smalltalk.method({ selector: "theClass", category: 'accessing', fn: function (){ var self=this; return self['@theClass']; return self;}, args: [], source: "theClass\x0a\x09^theClass", messageSends: [], referencedClasses: [] }), smalltalk.ClassesListNode); smalltalk.addMethod( "_theClass_", smalltalk.method({ selector: "theClass:", category: 'accessing', fn: function (aClass){ var self=this; (self['@theClass']=aClass); return self;}, args: ["aClass"], source: "theClass: aClass\x0a\x09theClass := aClass", messageSends: [], referencedClasses: [] }), smalltalk.ClassesListNode); smalltalk.addMethod( "_on_browser_classes_level_", smalltalk.method({ selector: "on:browser:classes:level:", category: 'instance creation', fn: function (aClass, aBrowser, aCollection, anInteger){ var self=this; return (function($rec){smalltalk.send($rec, "_theClass_", [aClass]);smalltalk.send($rec, "_browser_", [aBrowser]);smalltalk.send($rec, "_level_", [anInteger]);smalltalk.send($rec, "_getNodesFrom_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", [])); return self;}, args: ["aClass", "aBrowser", "aCollection", "anInteger"], source: "on: aClass browser: aBrowser classes: aCollection level: anInteger\x0a\x09^self new\x0a\x09\x09theClass: aClass;\x0a\x09\x09browser: aBrowser;\x0a\x09\x09level: anInteger;\x0a\x09\x09getNodesFrom: aCollection;\x0a\x09\x09yourself", messageSends: ["theClass:", "browser:", "level:", "getNodesFrom:", "yourself", "new"], referencedClasses: [] }), smalltalk.ClassesListNode.klass); smalltalk.addClass('DebugErrorHandler', smalltalk.ErrorHandler, [], 'IDE'); smalltalk.addMethod( "_handleError_", smalltalk.method({ selector: "handleError:", category: 'error handling', fn: function (anError){ var self=this; smalltalk.send((function(){return (function($rec){smalltalk.send($rec, "_error_", [anError]);return smalltalk.send($rec, "_open", []);})(smalltalk.send((smalltalk.Debugger || Debugger), "_new", []));}), "_on_do_", [(smalltalk.Error || Error), (function(error){return smalltalk.send(smalltalk.send((smalltalk.ErrorHandler || ErrorHandler), "_new", []), "_handleError_", [error]);})]); return self;}, args: ["anError"], source: "handleError: anError\x0a\x09[Debugger new\x0a\x09\x09error: anError;\x0a\x09\x09open] on: Error do: [:error |\x0a\x09\x09\x09ErrorHandler new handleError: error]", messageSends: ["on:do:", "error:", "open", "new", "handleError:"], referencedClasses: ["Debugger", "Error", "ErrorHandler"] }), smalltalk.DebugErrorHandler); smalltalk.addMethod( "_initialize", smalltalk.method({ selector: "initialize", category: 'initialization', fn: function (){ var self=this; smalltalk.send(self, "_register", []); return self;}, args: [], source: "initialize\x0a\x09self register", messageSends: ["register"], referencedClasses: [] }), smalltalk.DebugErrorHandler.klass); smalltalk.addClass('SourceArea', smalltalk.Widget, ['editor', 'div', 'receiver', 'onDoIt'], 'IDE'); smalltalk.addMethod( "_clear", smalltalk.method({ selector: "clear", category: 'actions', fn: function (){ var self=this; smalltalk.send(self, "_val_", [""]); return self;}, args: [], source: "clear\x0a self val: ''", messageSends: ["val:"], referencedClasses: [] }), smalltalk.SourceArea); smalltalk.addMethod( "_currentLine", smalltalk.method({ selector: "currentLine", category: 'accessing', fn: function (){ var self=this; return smalltalk.send(self['@editor'], "_getLine_", [smalltalk.send(smalltalk.send(self['@editor'], "_getCursor", []), "_line", [])]); return self;}, args: [], source: "currentLine\x0a ^editor getLine: (editor getCursor line)", messageSends: ["getLine:", "line", "getCursor"], referencedClasses: [] }), smalltalk.SourceArea); smalltalk.addMethod( "_currentLineOrSelection", smalltalk.method({ selector: "currentLineOrSelection", category: 'accessing', fn: function (){ var self=this; return ((($receiver = smalltalk.send(self['@editor'], "_somethingSelected", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_currentLine", []);})() : (function(){return smalltalk.send(self, "_selection", []);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(self, "_currentLine", []);}), (function(){return smalltalk.send(self, "_selection", []);})])); return self;}, args: [], source: "currentLineOrSelection\x0a ^editor somethingSelected\x0a\x09ifFalse: [self currentLine]\x0a\x09ifTrue: [self selection]", messageSends: ["ifFalse:ifTrue:", "somethingSelected", "currentLine", "selection"], referencedClasses: [] }), smalltalk.SourceArea); smalltalk.addMethod( "_doIt", smalltalk.method({ selector: "doIt", category: 'actions', fn: function (){ var self=this; var result=nil; (result=smalltalk.send(self, "_eval_", [smalltalk.send(self, "_currentLineOrSelection", [])])); (($receiver = smalltalk.send(self, "_onDoIt", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(smalltalk.send(self, "_onDoIt", []), "_value", []);})() : nil; return result; return self;}, args: [], source: "doIt\x0a | result |\x0a result := self eval: self currentLineOrSelection.\x0a self onDoIt ifNotNil: [self onDoIt value].\x0a ^result", messageSends: ["eval:", "currentLineOrSelection", "ifNotNil:", "onDoIt", "value"], referencedClasses: [] }), smalltalk.SourceArea); smalltalk.addMethod( "_editor", smalltalk.method({ selector: "editor", category: 'accessing', fn: function (){ var self=this; return self['@editor']; return self;}, args: [], source: "editor\x0a\x09^editor", messageSends: [], referencedClasses: [] }), smalltalk.SourceArea); smalltalk.addMethod( "_eval_", smalltalk.method({ selector: "eval:", category: 'actions', fn: function (aString){ var self=this; var $early={}; try{var compiler=nil; (compiler=smalltalk.send((smalltalk.Compiler || Compiler), "_new", [])); smalltalk.send((function(){return smalltalk.send(compiler, "_parseExpression_", [aString]);}), "_on_do_", [(smalltalk.Error || Error), (function(ex){return (function(){throw $early=[smalltalk.send((typeof window == 'undefined' ? nil : window), "_alert_", [smalltalk.send(ex, "_messageText", [])])]})();})]); return smalltalk.send(smalltalk.send(smalltalk.send(compiler, "_eval_", [smalltalk.send(compiler, "_compile_forClass_", [smalltalk.send(smalltalk.send("doIt ^[", "__comma", [aString]), "__comma", ["] value"]), (smalltalk.DoIt || DoIt)])]), "_fn", []), "_applyTo_arguments_", [smalltalk.send(self, "_receiver", []), []]); return self; } catch(e) {if(e===$early)return e[0]; throw e}}, 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 eval: (compiler compile: 'doIt ^[', aString, '] value' forClass: DoIt)) fn applyTo: self receiver arguments: #()", messageSends: ["new", "on:do:", "parseExpression:", "alert:", "messageText", "applyTo:arguments:", "fn", "eval:", "compile:forClass:", ",", "receiver"], referencedClasses: ["Compiler", "Error", "DoIt"] }), smalltalk.SourceArea); smalltalk.addMethod( "_fileIn", smalltalk.method({ selector: "fileIn", category: 'actions', fn: function (){ var self=this; smalltalk.send(smalltalk.send((smalltalk.Importer || Importer), "_new", []), "_import_", [smalltalk.send(smalltalk.send(self, "_currentLineOrSelection", []), "_readStream", [])]); return self;}, args: [], source: "fileIn\x0a Importer new import: self currentLineOrSelection readStream", messageSends: ["import:", "new", "readStream", "currentLineOrSelection"], referencedClasses: ["Importer"] }), smalltalk.SourceArea); smalltalk.addMethod( "_handleKeyDown_", smalltalk.method({ selector: "handleKeyDown:", category: 'actions', fn: function (anEvent){ var self=this; if(anEvent.ctrlKey) { if(anEvent.keyCode === 80) { //ctrl+p self._printIt(); anEvent.preventDefault(); return false; } if(anEvent.keyCode === 68) { //ctrl+d self._doIt(); anEvent.preventDefault(); return false; } if(anEvent.keyCode === 73) { //ctrl+i self._inspectIt(); anEvent.preventDefault(); return false; } }; return self;}, args: ["anEvent"], source: "handleKeyDown: anEvent\x0a ", messageSends: [], referencedClasses: [] }), smalltalk.SourceArea); smalltalk.addMethod( "_inspectIt", smalltalk.method({ selector: "inspectIt", category: 'actions', fn: function (){ var self=this; smalltalk.send(smalltalk.send(self, "_doIt", []), "_inspect", []); return self;}, args: [], source: "inspectIt\x0a self doIt inspect", messageSends: ["inspect", "doIt"], referencedClasses: [] }), smalltalk.SourceArea); smalltalk.addMethod( "_onDoIt", smalltalk.method({ selector: "onDoIt", category: 'accessing', fn: function (){ var self=this; return self['@onDoIt']; return self;}, args: [], source: "onDoIt\x0a\x09^onDoIt", messageSends: [], referencedClasses: [] }), smalltalk.SourceArea); smalltalk.addMethod( "_onDoIt_", smalltalk.method({ selector: "onDoIt:", category: 'accessing', fn: function (aBlock){ var self=this; (self['@onDoIt']=aBlock); return self;}, args: ["aBlock"], source: "onDoIt: aBlock\x0a\x09onDoIt := aBlock", messageSends: [], referencedClasses: [] }), smalltalk.SourceArea); smalltalk.addMethod( "_onKeyDown_", smalltalk.method({ selector: "onKeyDown:", category: 'events', fn: function (aBlock){ var self=this; smalltalk.send(self['@div'], "_onKeyDown_", [aBlock]); return self;}, args: ["aBlock"], source: "onKeyDown: aBlock\x0a\x09div onKeyDown: aBlock", messageSends: ["onKeyDown:"], referencedClasses: [] }), smalltalk.SourceArea); smalltalk.addMethod( "_onKeyUp_", smalltalk.method({ selector: "onKeyUp:", category: 'events', fn: function (aBlock){ var self=this; smalltalk.send(self['@div'], "_onKeyUp_", [aBlock]); return self;}, args: ["aBlock"], source: "onKeyUp: aBlock\x0a\x09div onKeyUp: aBlock", messageSends: ["onKeyUp:"], referencedClasses: [] }), smalltalk.SourceArea); smalltalk.addMethod( "_print_", smalltalk.method({ selector: "print:", category: 'actions', fn: function (aString){ var self=this; var start=nil; var stop=nil; (start=smalltalk.send((smalltalk.HashedCollection || HashedCollection), "_new", [])); (stop=smalltalk.send((smalltalk.HashedCollection || HashedCollection), "_new", [])); smalltalk.send(start, "_at_put_", ["line", smalltalk.send(smalltalk.send(self['@editor'], "_getCursor_", [false]), "_line", [])]); smalltalk.send(start, "_at_put_", ["ch", smalltalk.send(smalltalk.send(self['@editor'], "_getCursor_", [false]), "_ch", [])]); smalltalk.send(stop, "_at_put_", ["line", smalltalk.send(start, "_at_", ["line"])]); smalltalk.send(stop, "_at_put_", ["ch", ((($receiver = ((($receiver = smalltalk.send(start, "_at_", ["ch"])).klass === smalltalk.Number) ? $receiver +smalltalk.send(aString, "_size", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(aString, "_size", [])]))).klass === smalltalk.Number) ? $receiver +(2) : smalltalk.send($receiver, "__plus", [(2)]))]); smalltalk.send(self['@editor'], "_replaceSelection_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self['@editor'], "_getSelection", []), "__comma", [" "]), "__comma", [aString]), "__comma", [" "])]); smalltalk.send(self['@editor'], "_setCursor_", [smalltalk.send(self['@editor'], "_getCursor_", [true])]); smalltalk.send(self['@editor'], "_setSelection_end_", [stop, start]); return self;}, args: ["aString"], 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", messageSends: ["new", "at:put:", "line", "getCursor:", "ch", "at:", "+", "size", "replaceSelection:", ",", "getSelection", "setCursor:", "setSelection:end:"], referencedClasses: ["HashedCollection"] }), smalltalk.SourceArea); smalltalk.addMethod( "_printIt", smalltalk.method({ selector: "printIt", category: 'actions', fn: function (){ var self=this; smalltalk.send(self, "_print_", [smalltalk.send(smalltalk.send(self, "_doIt", []), "_printString", [])]); return self;}, args: [], source: "printIt\x0a self print: self doIt printString", messageSends: ["print:", "printString", "doIt"], referencedClasses: [] }), smalltalk.SourceArea); smalltalk.addMethod( "_receiver", smalltalk.method({ selector: "receiver", category: 'accessing', fn: function (){ var self=this; return (($receiver = self['@receiver']) == nil || $receiver == undefined) ? (function(){return smalltalk.send((smalltalk.DoIt || DoIt), "_new", []);})() : $receiver; return self;}, args: [], source: "receiver\x0a\x09^receiver ifNil: [DoIt new]", messageSends: ["ifNil:", "new"], referencedClasses: ["DoIt"] }), smalltalk.SourceArea); smalltalk.addMethod( "_receiver_", smalltalk.method({ selector: "receiver:", category: 'accessing', fn: function (anObject){ var self=this; (self['@receiver']=anObject); return self;}, args: ["anObject"], source: "receiver: anObject\x0a\x09receiver := anObject", messageSends: [], referencedClasses: [] }), smalltalk.SourceArea); smalltalk.addMethod( "_renderOn_", smalltalk.method({ selector: "renderOn:", category: 'rendering', fn: function (html){ var self=this; var textarea=nil; (self['@div']=smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["source"])); smalltalk.send(self['@div'], "_with_", [(function(){return (textarea=smalltalk.send(html, "_textarea", []));})]); smalltalk.send(self, "_setEditorOn_", [smalltalk.send(textarea, "_element", [])]); smalltalk.send(self['@div'], "_onKeyDown_", [(function(e){return smalltalk.send(self, "_handleKeyDown_", [e]);})]); return self;}, args: ["html"], source: "renderOn: html\x0a | textarea |\x0a div := html div class: 'source'.\x0a div with: [textarea := html textarea].\x0a self setEditorOn: textarea element.\x0a div onKeyDown: [:e | self handleKeyDown: e]", messageSends: ["class:", "div", "with:", "textarea", "setEditorOn:", "element", "onKeyDown:", "handleKeyDown:"], referencedClasses: [] }), smalltalk.SourceArea); smalltalk.addMethod( "_selection", smalltalk.method({ selector: "selection", category: 'accessing', fn: function (){ var self=this; return smalltalk.send(self['@editor'], "_getSelection", []); return self;}, args: [], source: "selection\x0a\x09^editor getSelection", messageSends: ["getSelection"], referencedClasses: [] }), smalltalk.SourceArea); smalltalk.addMethod( "_selectionEnd", smalltalk.method({ selector: "selectionEnd", category: 'accessing', fn: function (){ var self=this; return smalltalk.send(smalltalk.send((typeof textarea == 'undefined' ? nil : textarea), "_element", []), "_selectionEnd", []); return self;}, args: [], source: "selectionEnd\x0a ^textarea element selectionEnd", messageSends: ["selectionEnd", "element"], referencedClasses: [] }), smalltalk.SourceArea); smalltalk.addMethod( "_selectionEnd_", smalltalk.method({ selector: "selectionEnd:", category: 'accessing', fn: function (anInteger){ var self=this; smalltalk.send(smalltalk.send((typeof textarea == 'undefined' ? nil : textarea), "_element", []), "_selectionEnd_", [anInteger]); return self;}, args: ["anInteger"], source: "selectionEnd: anInteger\x0a textarea element selectionEnd: anInteger", messageSends: ["selectionEnd:", "element"], referencedClasses: [] }), smalltalk.SourceArea); smalltalk.addMethod( "_selectionStart", smalltalk.method({ selector: "selectionStart", category: 'accessing', fn: function (){ var self=this; return smalltalk.send(smalltalk.send((typeof textarea == 'undefined' ? nil : textarea), "_element", []), "_selectionStart", []); return self;}, args: [], source: "selectionStart\x0a ^textarea element selectionStart", messageSends: ["selectionStart", "element"], referencedClasses: [] }), smalltalk.SourceArea); smalltalk.addMethod( "_selectionStart_", smalltalk.method({ selector: "selectionStart:", category: 'accessing', fn: function (anInteger){ var self=this; smalltalk.send(smalltalk.send((typeof textarea == 'undefined' ? nil : textarea), "_element", []), "_selectionStart_", [anInteger]); return self;}, args: ["anInteger"], source: "selectionStart: anInteger\x0a textarea element selectionStart: anInteger", messageSends: ["selectionStart:", "element"], referencedClasses: [] }), smalltalk.SourceArea); smalltalk.addMethod( "_setEditorOn_", smalltalk.method({ selector: "setEditorOn:", category: 'accessing', fn: function (aTextarea){ var self=this; self['@editor'] = CodeMirror.fromTextArea(aTextarea, { theme: 'jtalk', lineNumbers: true, enterMode: 'flat', matchBrackets: true, electricChars: false }); return self;}, args: ["aTextarea"], source: "setEditorOn: aTextarea\x0a\x09", messageSends: [], referencedClasses: [] }), smalltalk.SourceArea); smalltalk.addMethod( "_val", smalltalk.method({ selector: "val", category: 'accessing', fn: function (){ var self=this; return smalltalk.send(self['@editor'], "_getValue", []); return self;}, args: [], source: "val\x0a ^editor getValue", messageSends: ["getValue"], referencedClasses: [] }), smalltalk.SourceArea); smalltalk.addMethod( "_val_", smalltalk.method({ selector: "val:", category: 'accessing', fn: function (aString){ var self=this; smalltalk.send(self['@editor'], "_setValue_", [aString]); return self;}, args: ["aString"], source: "val: aString\x0a editor setValue: aString", messageSends: ["setValue:"], referencedClasses: [] }), smalltalk.SourceArea); smalltalk.addClass('TabManager', smalltalk.Widget, ['selectedTab', 'tabs', 'opened', 'ul', 'input'], 'IDE'); smalltalk.addMethod( "_addTab_", smalltalk.method({ selector: "addTab:", category: 'adding/Removing', fn: function (aWidget){ var self=this; smalltalk.send(smalltalk.send(self, "_tabs", []), "_add_", [aWidget]); smalltalk.send(aWidget, "_appendToJQuery_", [smalltalk.send("#amber", "_asJQuery", [])]); smalltalk.send(aWidget, "_hide", []); return self;}, args: ["aWidget"], source: "addTab: aWidget\x0a self tabs add: aWidget.\x0a aWidget appendToJQuery: '#amber' asJQuery.\x0a aWidget hide", messageSends: ["add:", "tabs", "appendToJQuery:", "asJQuery", "hide"], referencedClasses: [] }), smalltalk.TabManager); smalltalk.addMethod( "_close", smalltalk.method({ selector: "close", category: 'actions', fn: function (){ var self=this; ((($receiver = self['@opened']).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(smalltalk.send("#amber", "_asJQuery", []), "_hide", []);smalltalk.send(smalltalk.send(self['@ul'], "_asJQuery", []), "_hide", []);smalltalk.send(self['@selectedTab'], "_hide", []);smalltalk.send(self, "_removeBodyMargin", []);smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_removeClass_", ["amberBody"]);return (self['@opened']=false);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(smalltalk.send("#amber", "_asJQuery", []), "_hide", []);smalltalk.send(smalltalk.send(self['@ul'], "_asJQuery", []), "_hide", []);smalltalk.send(self['@selectedTab'], "_hide", []);smalltalk.send(self, "_removeBodyMargin", []);smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_removeClass_", ["amberBody"]);return (self['@opened']=false);})])); return self;}, args: [], source: "close\x0a opened ifTrue: [\x0a\x09'#amber' asJQuery hide.\x0a\x09ul asJQuery hide.\x0a\x09selectedTab hide.\x0a\x09self removeBodyMargin.\x0a\x09'body' asJQuery removeClass: 'amberBody'.\x0a\x09opened := false]", messageSends: ["ifTrue:", "hide", "asJQuery", "removeBodyMargin", "removeClass:"], referencedClasses: [] }), smalltalk.TabManager); smalltalk.addMethod( "_closeTab_", smalltalk.method({ selector: "closeTab:", category: 'actions', fn: function (aWidget){ var self=this; smalltalk.send(self, "_removeTab_", [aWidget]); smalltalk.send(self, "_selectTab_", [smalltalk.send(smalltalk.send(self, "_tabs", []), "_last", [])]); smalltalk.send(aWidget, "_remove", []); smalltalk.send(self, "_update", []); return self;}, args: ["aWidget"], source: "closeTab: aWidget\x0a self removeTab: aWidget.\x0a self selectTab: self tabs last.\x0a aWidget remove.\x0a self update", messageSends: ["removeTab:", "selectTab:", "last", "tabs", "remove", "update"], referencedClasses: [] }), smalltalk.TabManager); smalltalk.addMethod( "_initialize", smalltalk.method({ selector: "initialize", category: 'initialization', fn: function (){ var self=this; smalltalk.send(self, "_initialize", [], smalltalk.TabManager.superclass || nil); (self['@opened']=true); smalltalk.send((function(html){return smalltalk.send(smalltalk.send(html, "_div", []), "_id_", ["amber"]);}), "_appendToJQuery_", [smalltalk.send("body", "_asJQuery", [])]); smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_addClass_", ["amberBody"]); smalltalk.send(self, "_appendToJQuery_", [smalltalk.send("#amber", "_asJQuery", [])]); (function($rec){smalltalk.send($rec, "_addTab_", [smalltalk.send((smalltalk.IDETranscript || IDETranscript), "_current", [])]);smalltalk.send($rec, "_addTab_", [smalltalk.send((smalltalk.Workspace || Workspace), "_new", [])]);return smalltalk.send($rec, "_addTab_", [smalltalk.send((smalltalk.TestRunner || TestRunner), "_new", [])]);})(self); smalltalk.send(self, "_selectTab_", [smalltalk.send(smalltalk.send(self, "_tabs", []), "_last", [])]); (function($rec){smalltalk.send($rec, "_onResize_", [(function(){return (function($rec){smalltalk.send($rec, "_updateBodyMargin", []);return smalltalk.send($rec, "_updatePosition", []);})(self);})]);return smalltalk.send($rec, "_onWindowResize_", [(function(){return smalltalk.send(self, "_updatePosition", []);})]);})(self); return self;}, args: [], source: "initialize\x0a super initialize.\x0a opened := true.\x0a [:html | html div id: 'amber'] appendToJQuery: 'body' asJQuery.\x0a 'body' asJQuery \x0a\x09addClass: 'amberBody'.\x0a self appendToJQuery: '#amber' asJQuery.\x0a self \x0a\x09addTab: IDETranscript current;\x0a\x09addTab: Workspace new;\x0a\x09addTab: TestRunner new.\x0a self selectTab: self tabs last.\x0a self \x0a\x09onResize: [self updateBodyMargin; updatePosition];\x0a\x09onWindowResize: [self updatePosition]", messageSends: ["initialize", "appendToJQuery:", "id:", "div", "asJQuery", "addClass:", "addTab:", "current", "new", "selectTab:", "last", "tabs", "onResize:", "updateBodyMargin", "updatePosition", "onWindowResize:"], referencedClasses: ["IDETranscript", "Workspace", "TestRunner"] }), smalltalk.TabManager); smalltalk.addMethod( "_labelFor_", smalltalk.method({ selector: "labelFor:", category: 'accessing', fn: function (aWidget){ var self=this; var label=nil; var maxSize=nil; (maxSize=(15)); (label=smalltalk.send(smalltalk.send(aWidget, "_label", []), "_copyFrom_to_", [(0), smalltalk.send(smalltalk.send(smalltalk.send(aWidget, "_label", []), "_size", []), "_min_", [maxSize])])); ((($receiver = ((($receiver = smalltalk.send(smalltalk.send(aWidget, "_label", []), "_size", [])).klass === smalltalk.Number) ? $receiver >maxSize : smalltalk.send($receiver, "__gt", [maxSize]))).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (label=smalltalk.send(label, "__comma", ["..."]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (label=smalltalk.send(label, "__comma", ["..."]));})])); return label; return self;}, args: ["aWidget"], source: "labelFor: aWidget\x0a\x09| label maxSize |\x0a\x09maxSize := 15.\x0a\x09label := aWidget label copyFrom: 0 to: (aWidget label size min: maxSize).\x0a\x09aWidget label size > maxSize ifTrue: [\x0a\x09\x09label := label, '...'].\x0a\x09^label", messageSends: ["copyFrom:to:", "label", "min:", "size", "ifTrue:", ">", ","], referencedClasses: [] }), smalltalk.TabManager); smalltalk.addMethod( "_newBrowserTab", smalltalk.method({ selector: "newBrowserTab", category: 'actions', fn: function (){ var self=this; smalltalk.send((smalltalk.Browser || Browser), "_open", []); return self;}, args: [], source: "newBrowserTab\x0a Browser open", messageSends: ["open"], referencedClasses: ["Browser"] }), smalltalk.TabManager); smalltalk.addMethod( "_onResize_", smalltalk.method({ selector: "onResize:", category: 'actions', fn: function (aBlock){ var self=this; jQuery('#amber').resizable({ handles: 'n', resize: aBlock, minHeight: 230 }); return self;}, args: ["aBlock"], source: "onResize: aBlock\x0a ", messageSends: [], referencedClasses: [] }), smalltalk.TabManager); smalltalk.addMethod( "_onWindowResize_", smalltalk.method({ selector: "onWindowResize:", category: 'actions', fn: function (aBlock){ var self=this; jQuery(window).resize(aBlock); return self;}, args: ["aBlock"], source: "onWindowResize: aBlock\x0a ", messageSends: [], referencedClasses: [] }), smalltalk.TabManager); smalltalk.addMethod( "_open", smalltalk.method({ selector: "open", category: 'actions', fn: function (){ var self=this; ((($receiver = self['@opened']).klass === smalltalk.Boolean) ? (! $receiver ? (function(){smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_addClass_", ["amberBody"]);smalltalk.send(smalltalk.send("#amber", "_asJQuery", []), "_show", []);smalltalk.send(smalltalk.send(self['@ul'], "_asJQuery", []), "_show", []);smalltalk.send(self, "_updateBodyMargin", []);smalltalk.send(self['@selectedTab'], "_show", []);return (self['@opened']=true);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_addClass_", ["amberBody"]);smalltalk.send(smalltalk.send("#amber", "_asJQuery", []), "_show", []);smalltalk.send(smalltalk.send(self['@ul'], "_asJQuery", []), "_show", []);smalltalk.send(self, "_updateBodyMargin", []);smalltalk.send(self['@selectedTab'], "_show", []);return (self['@opened']=true);})])); return self;}, args: [], source: "open\x0a opened ifFalse: [\x0a\x09'body' asJQuery addClass: 'amberBody'.\x0a\x09'#amber' asJQuery show.\x0a\x09ul asJQuery show.\x0a\x09self updateBodyMargin.\x0a\x09selectedTab show.\x0a\x09opened := true]", messageSends: ["ifFalse:", "addClass:", "asJQuery", "show", "updateBodyMargin"], referencedClasses: [] }), smalltalk.TabManager); smalltalk.addMethod( "_removeBodyMargin", smalltalk.method({ selector: "removeBodyMargin", category: 'actions', fn: function (){ var self=this; smalltalk.send(self, "_setBodyMargin_", [(0)]); return self;}, args: [], source: "removeBodyMargin\x0a self setBodyMargin: 0", messageSends: ["setBodyMargin:"], referencedClasses: [] }), smalltalk.TabManager); smalltalk.addMethod( "_removeTab_", smalltalk.method({ selector: "removeTab:", category: 'adding/Removing', fn: function (aWidget){ var self=this; smalltalk.send(smalltalk.send(self, "_tabs", []), "_remove_", [aWidget]); smalltalk.send(self, "_update", []); return self;}, args: ["aWidget"], source: "removeTab: aWidget\x0a self tabs remove: aWidget.\x0a self update", messageSends: ["remove:", "tabs", "update"], referencedClasses: [] }), smalltalk.TabManager); smalltalk.addMethod( "_renderOn_", smalltalk.method({ selector: "renderOn:", category: 'rendering', fn: function (html){ var self=this; smalltalk.send(smalltalk.send(html, "_div", []), "_id_", ["logo"]); smalltalk.send(self, "_renderToolbarOn_", [html]); (self['@ul']=(function($rec){smalltalk.send($rec, "_id_", ["amberTabs"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(html, "_ul", []))); smalltalk.send(self, "_renderTabs", []); return self;}, args: ["html"], source: "renderOn: html\x0a\x09html div id: 'logo'.\x0a\x09self renderToolbarOn: html.\x0a\x09ul := html ul\x0a\x09\x09id: 'amberTabs';\x0a\x09\x09yourself.\x0a\x09self renderTabs", messageSends: ["id:", "div", "renderToolbarOn:", "yourself", "ul", "renderTabs"], referencedClasses: [] }), smalltalk.TabManager); smalltalk.addMethod( "_renderTabFor_on_", smalltalk.method({ selector: "renderTabFor:on:", category: 'rendering', fn: function (aWidget, html){ var self=this; var li=nil; (li=smalltalk.send(html, "_li", [])); ((($receiver = smalltalk.send(self['@selectedTab'], "__eq", [aWidget])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(li, "_class_", ["selected"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(li, "_class_", ["selected"]);})])); (function($rec){smalltalk.send($rec, "_with_", [(function(){smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["ltab"]);(function($rec){smalltalk.send($rec, "_class_", ["mtab"]);return smalltalk.send($rec, "_with_", [(function(){((($receiver = smalltalk.send(aWidget, "_canBeClosed", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function($rec){smalltalk.send($rec, "_class_", ["close"]);smalltalk.send($rec, "_with_", ["x"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_closeTab_", [aWidget]);})]);})(smalltalk.send(html, "_span", []));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function($rec){smalltalk.send($rec, "_class_", ["close"]);smalltalk.send($rec, "_with_", ["x"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_closeTab_", [aWidget]);})]);})(smalltalk.send(html, "_span", []));})]));return smalltalk.send(smalltalk.send(html, "_span", []), "_with_", [smalltalk.send(self, "_labelFor_", [aWidget])]);})]);})(smalltalk.send(html, "_span", []));return smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["rtab"]);})]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectTab_", [aWidget]);})]);})(li); return self;}, args: ["aWidget", "html"], source: "renderTabFor: aWidget on: html\x0a\x09| li |\x0a\x09li := html li.\x0a\x09selectedTab = aWidget ifTrue: [\x0a\x09li class: 'selected'].\x0a\x09li with: [\x0a\x09\x09html span class: 'ltab'.\x0a\x09\x09html span\x0a\x09\x09\x09class: 'mtab';\x0a\x09\x09\x09with: [\x0a\x09\x09\x09\x09aWidget canBeClosed ifTrue: [\x0a\x09\x09\x09\x09\x09html span \x0a\x09\x09\x09\x09\x09\x09class: 'close';\x0a\x09\x09\x09\x09\x09\x09with: 'x';\x0a\x09\x09\x09\x09\x09onClick: [self closeTab: aWidget]].\x0a\x09\x09\x09html span with: (self labelFor: aWidget)].\x0a\x09\x09html span class: 'rtab'];\x0a\x09onClick: [self selectTab: aWidget]", messageSends: ["li", "ifTrue:", "=", "class:", "with:", "span", "canBeClosed", "onClick:", "closeTab:", "labelFor:", "selectTab:"], referencedClasses: [] }), smalltalk.TabManager); smalltalk.addMethod( "_renderTabs", smalltalk.method({ selector: "renderTabs", category: 'rendering', fn: function (){ var self=this; smalltalk.send(self['@ul'], "_contents_", [(function(html){smalltalk.send(smalltalk.send(self, "_tabs", []), "_do_", [(function(each){return smalltalk.send(self, "_renderTabFor_on_", [each, html]);})]);return (function($rec){smalltalk.send($rec, "_class_", ["newtab"]);smalltalk.send($rec, "_with_", [(function(){smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["ltab"]);(function($rec){smalltalk.send($rec, "_class_", ["mtab"]);return smalltalk.send($rec, "_with_", [" + "]);})(smalltalk.send(html, "_span", []));return smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["rtab"]);})]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_newBrowserTab", []);})]);})(smalltalk.send(html, "_li", []));})]); return self;}, args: [], source: "renderTabs\x0a\x09ul contents: [:html |\x0a\x09 self tabs do: [:each |\x0a\x09\x09self renderTabFor: each on: html].\x0a\x09 html li\x0a\x09\x09class: 'newtab';\x0a\x09\x09with: [\x0a\x09\x09\x09html span class: 'ltab'.\x0a\x09\x09\x09html span class: 'mtab'; with: ' + '.\x0a\x09\x09\x09html span class: 'rtab'];\x0a\x09\x09onClick: [self newBrowserTab]]", messageSends: ["contents:", "do:", "tabs", "renderTabFor:on:", "class:", "with:", "span", "onClick:", "newBrowserTab", "li"], referencedClasses: [] }), smalltalk.TabManager); smalltalk.addMethod( "_renderToolbarOn_", smalltalk.method({ selector: "renderToolbarOn:", category: 'rendering', fn: function (html){ var self=this; (function($rec){smalltalk.send($rec, "_id_", ["amber_toolbar"]);return smalltalk.send($rec, "_with_", [(function(){(self['@input']=(function($rec){smalltalk.send($rec, "_class_", ["implementors"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(html, "_input", [])));smalltalk.send(self['@input'], "_onKeyPress_", [(function(event){return ((($receiver = smalltalk.send(smalltalk.send(event, "_keyCode", []), "__eq", [(13)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_search_", [smalltalk.send(smalltalk.send(self['@input'], "_asJQuery", []), "_val", [])]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_search_", [smalltalk.send(smalltalk.send(self['@input'], "_asJQuery", []), "_val", [])]);})]));})]);return (function($rec){smalltalk.send($rec, "_id_", ["amber_close"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_close", []);})]);})(smalltalk.send(html, "_div", []));})]);})(smalltalk.send(html, "_div", [])); return self;}, args: ["html"], source: "renderToolbarOn: html\x0a\x09html div \x0a\x09\x09id: 'amber_toolbar';\x0a\x09\x09with: [\x0a\x09\x09\x09input := html input \x0a\x09\x09\x09\x09class: 'implementors';\x0a\x09\x09\x09\x09yourself.\x0a\x09\x09\x09input onKeyPress: [:event |\x0a\x09\x09\x09\x09event keyCode = 13 ifTrue: [\x0a\x09\x09\x09\x09self search: input asJQuery val]].\x0a\x09\x09\x09html div id: 'amber_close'; onClick: [self close]]", messageSends: ["id:", "with:", "class:", "yourself", "input", "onKeyPress:", "ifTrue:", "=", "keyCode", "search:", "val", "asJQuery", "onClick:", "close", "div"], referencedClasses: [] }), smalltalk.TabManager); smalltalk.addMethod( "_search_", smalltalk.method({ selector: "search:", category: 'actions', fn: function (aString){ var self=this; var searchedClass=nil; (searchedClass=smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_at_", [aString])); ((($receiver = smalltalk.send(searchedClass, "_isClass", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send((smalltalk.Browser || Browser), "_openOn_", [searchedClass]);})() : (function(){return smalltalk.send((smalltalk.ReferencesBrowser || ReferencesBrowser), "_search_", [aString]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send((smalltalk.Browser || Browser), "_openOn_", [searchedClass]);}), (function(){return smalltalk.send((smalltalk.ReferencesBrowser || ReferencesBrowser), "_search_", [aString]);})])); return self;}, args: ["aString"], source: "search: aString\x0a\x09| searchedClass |\x0a\x09searchedClass := Smalltalk current at: aString.\x0a\x09\x09searchedClass isClass\x0a\x09\x09\x09ifTrue: [Browser openOn: searchedClass]\x0a\x09\x09\x09ifFalse: [ReferencesBrowser search: aString]", messageSends: ["at:", "current", "ifTrue:ifFalse:", "isClass", "openOn:", "search:"], referencedClasses: ["Smalltalk", "Browser", "ReferencesBrowser"] }), smalltalk.TabManager); smalltalk.addMethod( "_selectTab_", smalltalk.method({ selector: "selectTab:", category: 'actions', fn: function (aWidget){ var self=this; smalltalk.send(self, "_open", []); (self['@selectedTab']=aWidget); smalltalk.send(smalltalk.send(self, "_tabs", []), "_do_", [(function(each){return smalltalk.send(each, "_hide", []);})]); smalltalk.send(aWidget, "_show", []); smalltalk.send(self, "_update", []); return self;}, args: ["aWidget"], source: "selectTab: aWidget\x0a self open.\x0a selectedTab := aWidget.\x0a self tabs do: [:each |\x0a\x09each hide].\x0a aWidget show.\x0a\x09\x0a self update", messageSends: ["open", "do:", "tabs", "hide", "show", "update"], referencedClasses: [] }), smalltalk.TabManager); smalltalk.addMethod( "_setBodyMargin_", smalltalk.method({ selector: "setBodyMargin:", category: 'actions', fn: function (anInteger){ var self=this; smalltalk.send(smalltalk.send(".amberBody", "_asJQuery", []), "_css_put_", ["margin-bottom", smalltalk.send(smalltalk.send(anInteger, "_asString", []), "__comma", ["px"])]); return self;}, args: ["anInteger"], source: "setBodyMargin: anInteger\x0a '.amberBody' asJQuery css: 'margin-bottom' put: anInteger asString, 'px'", messageSends: ["css:put:", "asJQuery", ",", "asString"], referencedClasses: [] }), smalltalk.TabManager); smalltalk.addMethod( "_tabs", smalltalk.method({ selector: "tabs", category: 'accessing', fn: function (){ var self=this; return (($receiver = self['@tabs']) == nil || $receiver == undefined) ? (function(){return (self['@tabs']=smalltalk.send((smalltalk.Array || Array), "_new", []));})() : $receiver; return self;}, args: [], source: "tabs\x0a ^tabs ifNil: [tabs := Array new]", messageSends: ["ifNil:", "new"], referencedClasses: ["Array"] }), smalltalk.TabManager); smalltalk.addMethod( "_update", smalltalk.method({ selector: "update", category: 'updating', fn: function (){ var self=this; smalltalk.send(self, "_renderTabs", []); return self;}, args: [], source: "update\x0a\x09self renderTabs", messageSends: ["renderTabs"], referencedClasses: [] }), smalltalk.TabManager); smalltalk.addMethod( "_updateBodyMargin", smalltalk.method({ selector: "updateBodyMargin", category: 'actions', fn: function (){ var self=this; smalltalk.send(self, "_setBodyMargin_", [smalltalk.send(smalltalk.send("#amber", "_asJQuery", []), "_height", [])]); return self;}, args: [], source: "updateBodyMargin\x0a self setBodyMargin: '#amber' asJQuery height", messageSends: ["setBodyMargin:", "height", "asJQuery"], referencedClasses: [] }), smalltalk.TabManager); smalltalk.addMethod( "_updatePosition", smalltalk.method({ selector: "updatePosition", category: 'actions', fn: function (){ var self=this; jQuery('#amber').css('top', '').css('bottom', '0px'); return self;}, args: [], source: "updatePosition\x0a ", messageSends: [], referencedClasses: [] }), smalltalk.TabManager); smalltalk.TabManager.klass.iVarNames = ['current']; smalltalk.addMethod( "_current", smalltalk.method({ selector: "current", category: 'instance creation', fn: function (){ var self=this; return (($receiver = self['@current']) == nil || $receiver == undefined) ? (function(){return (self['@current']=smalltalk.send(self, "_new", [], smalltalk.TabManager.klass.superclass || nil));})() : $receiver; return self;}, args: [], source: "current\x0a ^current ifNil: [current := super new]", messageSends: ["ifNil:", "new"], referencedClasses: [] }), smalltalk.TabManager.klass); smalltalk.addMethod( "_new", smalltalk.method({ selector: "new", category: 'instance creation', fn: function (){ var self=this; smalltalk.send(self, "_shouldNotImplement", []); return self;}, args: [], source: "new\x0a self shouldNotImplement", messageSends: ["shouldNotImplement"], referencedClasses: [] }), smalltalk.TabManager.klass); smalltalk.addClass('TabWidget', smalltalk.Widget, ['div'], 'IDE'); smalltalk.addMethod( "_canBeClosed", smalltalk.method({ selector: "canBeClosed", category: 'testing', fn: function (){ var self=this; return false; return self;}, args: [], source: "canBeClosed\x0a ^false", messageSends: [], referencedClasses: [] }), smalltalk.TabWidget); smalltalk.addMethod( "_close", smalltalk.method({ selector: "close", category: 'actions', fn: function (){ var self=this; smalltalk.send(smalltalk.send((smalltalk.TabManager || TabManager), "_current", []), "_closeTab_", [self]); return self;}, args: [], source: "close\x0a TabManager current closeTab: self", messageSends: ["closeTab:", "current"], referencedClasses: ["TabManager"] }), smalltalk.TabWidget); smalltalk.addMethod( "_hide", smalltalk.method({ selector: "hide", category: 'actions', fn: function (){ var self=this; smalltalk.send(smalltalk.send(self['@div'], "_asJQuery", []), "_hide", []); return self;}, args: [], source: "hide\x0a\x09div asJQuery hide", messageSends: ["hide", "asJQuery"], referencedClasses: [] }), smalltalk.TabWidget); smalltalk.addMethod( "_label", smalltalk.method({ selector: "label", category: 'accessing', fn: function (){ var self=this; smalltalk.send(self, "_subclassResponsibility", []); return self;}, args: [], source: "label\x0a self subclassResponsibility", messageSends: ["subclassResponsibility"], referencedClasses: [] }), smalltalk.TabWidget); smalltalk.addMethod( "_open", smalltalk.method({ selector: "open", category: 'actions', fn: function (){ var self=this; smalltalk.send(smalltalk.send((smalltalk.TabManager || TabManager), "_current", []), "_addTab_", [self]); smalltalk.send(smalltalk.send((smalltalk.TabManager || TabManager), "_current", []), "_selectTab_", [self]); return self;}, args: [], source: "open\x0a TabManager current addTab: self.\x0a TabManager current selectTab: self", messageSends: ["addTab:", "current", "selectTab:"], referencedClasses: ["TabManager"] }), smalltalk.TabWidget); smalltalk.addMethod( "_remove", smalltalk.method({ selector: "remove", category: 'actions', fn: function (){ var self=this; smalltalk.send(smalltalk.send(self['@div'], "_asJQuery", []), "_remove", []); return self;}, args: [], source: "remove\x0a\x09div asJQuery remove", messageSends: ["remove", "asJQuery"], referencedClasses: [] }), smalltalk.TabWidget); smalltalk.addMethod( "_renderBoxOn_", smalltalk.method({ selector: "renderBoxOn:", category: 'rendering', fn: function (html){ var self=this; return self;}, args: ["html"], source: "renderBoxOn: html", messageSends: [], referencedClasses: [] }), smalltalk.TabWidget); smalltalk.addMethod( "_renderButtonsOn_", smalltalk.method({ selector: "renderButtonsOn:", category: 'rendering', fn: function (html){ var self=this; return self;}, args: ["html"], source: "renderButtonsOn: html", messageSends: [], referencedClasses: [] }), smalltalk.TabWidget); smalltalk.addMethod( "_renderOn_", smalltalk.method({ selector: "renderOn:", category: 'rendering', fn: function (html){ var self=this; (self['@div']=(function($rec){smalltalk.send($rec, "_class_", ["amberTool"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(html, "_div", []))); smalltalk.send(self, "_renderTab", []); return self;}, args: ["html"], source: "renderOn: html\x0a\x09div := html div\x0a\x09\x09class: 'amberTool';\x0a\x09\x09yourself.\x0a\x09self renderTab", messageSends: ["class:", "yourself", "div", "renderTab"], referencedClasses: [] }), smalltalk.TabWidget); smalltalk.addMethod( "_renderTab", smalltalk.method({ selector: "renderTab", category: 'rendering', fn: function (){ var self=this; smalltalk.send(self['@div'], "_contents_", [(function(html){(function($rec){smalltalk.send($rec, "_class_", ["amber_box"]);return smalltalk.send($rec, "_with_", [(function(){return smalltalk.send(self, "_renderBoxOn_", [html]);})]);})(smalltalk.send(html, "_div", []));return (function($rec){smalltalk.send($rec, "_class_", ["amber_buttons"]);return smalltalk.send($rec, "_with_", [(function(){return smalltalk.send(self, "_renderButtonsOn_", [html]);})]);})(smalltalk.send(html, "_div", []));})]); return self;}, args: [], source: "renderTab\x0a\x09div contents: [:html |\x0a\x09 html div\x0a\x09\x09class: 'amber_box';\x0a\x09\x09with: [self renderBoxOn: html].\x0a\x09 html div\x0a\x09\x09class: 'amber_buttons';\x0a\x09\x09with: [self renderButtonsOn: html]]", messageSends: ["contents:", "class:", "with:", "renderBoxOn:", "div", "renderButtonsOn:"], referencedClasses: [] }), smalltalk.TabWidget); smalltalk.addMethod( "_show", smalltalk.method({ selector: "show", category: 'actions', fn: function (){ var self=this; smalltalk.send(smalltalk.send(self['@div'], "_asJQuery", []), "_show", []); return self;}, args: [], source: "show\x0a\x09div asJQuery show", messageSends: ["show", "asJQuery"], referencedClasses: [] }), smalltalk.TabWidget); smalltalk.addMethod( "_update", smalltalk.method({ selector: "update", category: 'rendering', fn: function (){ var self=this; smalltalk.send(self, "_renderTab", []); return self;}, args: [], source: "update\x0a\x09self renderTab", messageSends: ["renderTab"], referencedClasses: [] }), smalltalk.TabWidget); smalltalk.addMethod( "_open", smalltalk.method({ selector: "open", category: 'instance creation', fn: function (){ var self=this; return smalltalk.send(smalltalk.send(self, "_new", []), "_open", []); return self;}, args: [], source: "open\x0a ^self new open", messageSends: ["open", "new"], referencedClasses: [] }), smalltalk.TabWidget.klass); smalltalk.addClass('Browser', smalltalk.TabWidget, ['selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedMethod', 'packagesList', 'classesList', 'protocolsList', 'methodsList', 'sourceArea', 'tabsList', 'selectedTab', 'saveButton', 'classButtons', 'methodButtons', 'unsavedChanges'], 'IDE'); smalltalk.addMethod( "_addInstanceVariableNamed_toClass_", smalltalk.method({ selector: "addInstanceVariableNamed:toClass:", category: 'actions', fn: function (aString, aClass){ var self=this; smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_addSubclassOf_named_instanceVariableNames_package_", [smalltalk.send(aClass, "_superclass", []), smalltalk.send(aClass, "_name", []), (function($rec){smalltalk.send($rec, "_add_", [aString]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(smalltalk.send(aClass, "_instanceVariableNames", []), "_copy", [])), smalltalk.send(smalltalk.send(aClass, "_package", []), "_name", [])]); return self;}, args: ["aString", "aClass"], source: "addInstanceVariableNamed: aString toClass: aClass\x0a\x09ClassBuilder new\x0a\x09\x09addSubclassOf: aClass superclass \x0a\x09\x09named: aClass name \x0a\x09\x09instanceVariableNames: (aClass instanceVariableNames copy add: aString; yourself)\x0a\x09\x09package: aClass package name", messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "new", "superclass", "name", "add:", "yourself", "copy", "instanceVariableNames", "package"], referencedClasses: ["ClassBuilder"] }), smalltalk.Browser); smalltalk.addMethod( "_addNewClass", smalltalk.method({ selector: "addNewClass", category: 'actions', fn: function (){ var self=this; var className=nil; (className=smalltalk.send((typeof window == 'undefined' ? nil : window), "_prompt_", ["New class"])); ((($receiver = smalltalk.send(smalltalk.send(className, "_notNil", []), "_and_", [(function(){return smalltalk.send(className, "_notEmpty", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send((smalltalk.Object || Object), "_subclass_instanceVariableNames_package_", [className, "", smalltalk.send(self, "_selectedPackage", [])]);(function($rec){smalltalk.send($rec, "_resetClassesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self);return smalltalk.send(self, "_selectClass_", [smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_at_", [className])]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send((smalltalk.Object || Object), "_subclass_instanceVariableNames_package_", [className, "", smalltalk.send(self, "_selectedPackage", [])]);(function($rec){smalltalk.send($rec, "_resetClassesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self);return smalltalk.send(self, "_selectClass_", [smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_at_", [className])]);})])); return self;}, 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 self \x0a\x09\x09\x09resetClassesList;\x0a\x09\x09\x09updateClassesList.\x0a\x09\x09self selectClass: (Smalltalk current at: className)]", messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "subclass:instanceVariableNames:package:", "selectedPackage", "resetClassesList", "updateClassesList", "selectClass:", "at:", "current"], referencedClasses: ["Object", "Smalltalk"] }), smalltalk.Browser); smalltalk.addMethod( "_addNewProtocol", smalltalk.method({ selector: "addNewProtocol", category: 'actions', fn: function (){ var self=this; var newProtocol=nil; (newProtocol=smalltalk.send((typeof window == 'undefined' ? nil : window), "_prompt_", ["New method protocol"])); ((($receiver = smalltalk.send(smalltalk.send(newProtocol, "_notNil", []), "_and_", [(function(){return smalltalk.send(newProtocol, "_notEmpty", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@selectedMethod'], "_category_", [newProtocol]);return smalltalk.send(self, "_setMethodProtocol_", [newProtocol]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@selectedMethod'], "_category_", [newProtocol]);return smalltalk.send(self, "_setMethodProtocol_", [newProtocol]);})])); return self;}, args: [], source: "addNewProtocol\x0a | newProtocol |\x0a newProtocol := window prompt: 'New method protocol'.\x0a (newProtocol notNil and: [newProtocol notEmpty]) ifTrue: [\x0a\x09selectedMethod category: newProtocol.\x0a\x09self setMethodProtocol: newProtocol]", messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "category:", "setMethodProtocol:"], referencedClasses: [] }), smalltalk.Browser); smalltalk.addMethod( "_ajaxPutAt_data_", smalltalk.method({ selector: "ajaxPutAt:data:", category: 'network', fn: function (anURL, aString){ var self=this; smalltalk.send((typeof jQuery == 'undefined' ? nil : jQuery), "_ajax_options_", [anURL, smalltalk.HashedCollection._fromPairs_([smalltalk.send("type", "__minus_gt", ["PUT"]),smalltalk.send("data", "__minus_gt", [aString]),smalltalk.send("contentType", "__minus_gt", ["text/plain;charset=UTF-8"]),smalltalk.send("error", "__minus_gt", [(function(){return smalltalk.send((typeof window == 'undefined' ? nil : window), "_alert_", [smalltalk.send("PUT request failed at: ", "__comma", [anURL])]);})])])]); return self;}, args: ["anURL", "aString"], source: "ajaxPutAt: anURL data: aString\x0a\x09jQuery \x0a\x09\x09ajax: anURL\x09options: #{\x09'type' -> 'PUT'.\x0a\x09\x09\x09\x09\x09\x09\x09\x09'data' -> aString.\x0a\x09\x09\x09\x09\x09\x09\x09\x09'contentType' -> 'text/plain;charset=UTF-8'.\x0a\x09\x09\x09\x09\x09\x09\x09\x09'error' -> [window alert: 'PUT request failed at: ', anURL] }", messageSends: ["ajax:options:", "->", "alert:", ","], referencedClasses: [] }), smalltalk.Browser); smalltalk.addMethod( "_canBeClosed", smalltalk.method({ selector: "canBeClosed", category: 'testing', fn: function (){ var self=this; return true; return self;}, args: [], source: "canBeClosed\x0a\x09^true", messageSends: [], referencedClasses: [] }), smalltalk.Browser); smalltalk.addMethod( "_cancelChanges", smalltalk.method({ selector: "cancelChanges", category: 'actions', fn: function (){ var self=this; return ((($receiver = self['@unsavedChanges']).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send((typeof window == 'undefined' ? nil : window), "_confirm_", ["Cancel changes?"]);})() : (function(){return true;})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send((typeof window == 'undefined' ? nil : window), "_confirm_", ["Cancel changes?"]);}), (function(){return true;})])); return self;}, args: [], source: "cancelChanges\x0a ^unsavedChanges \x0a\x09ifTrue: [window confirm: 'Cancel changes?']\x0a\x09ifFalse: [true]", messageSends: ["ifTrue:ifFalse:", "confirm:"], referencedClasses: [] }), smalltalk.Browser); smalltalk.addMethod( "_classCommentSource", smalltalk.method({ selector: "classCommentSource", category: 'accessing', fn: function (){ var self=this; return smalltalk.send(self['@selectedClass'], "_comment", []); return self;}, args: [], source: "classCommentSource\x0a ^selectedClass comment", messageSends: ["comment"], referencedClasses: [] }), smalltalk.Browser); smalltalk.addMethod( "_classDeclarationSource", smalltalk.method({ selector: "classDeclarationSource", category: 'accessing', fn: function (){ var self=this; var $early={}; try{var stream=nil; (stream=smalltalk.send("", "_writeStream", [])); (($receiver = self['@selectedClass']) == nil || $receiver == undefined) ? (function(){return (function(){throw $early=[smalltalk.send(self, "_classDeclarationTemplate", [])]})();})() : $receiver; (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(self['@selectedClass'], "_superclass", []), "_asString", [])]);smalltalk.send($rec, "_nextPutAll_", [" subclass: #"]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self['@selectedClass'], "_name", [])]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send((smalltalk.String || String), "_lf", []), "__comma", [smalltalk.send((smalltalk.String || String), "_tab", [])])]);return smalltalk.send($rec, "_nextPutAll_", ["instanceVariableNames: '"]);})(stream); smalltalk.send(smalltalk.send(self['@selectedClass'], "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(stream, "_nextPutAll_", [each]);}), (function(){return smalltalk.send(stream, "_nextPutAll_", [" "]);})]); (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("'", "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])]), "__comma", [smalltalk.send((smalltalk.String || String), "_tab", [])])]);smalltalk.send($rec, "_nextPutAll_", ["package: '"]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self['@selectedClass'], "_category", [])]);return smalltalk.send($rec, "_nextPutAll_", ["'"]);})(stream); return smalltalk.send(stream, "_contents", []); return self; } catch(e) {if(e===$early)return e[0]; throw e}}, args: [], source: "classDeclarationSource\x0a\x09| stream |\x0a\x09stream := '' writeStream.\x0a\x09selectedClass ifNil: [^self classDeclarationTemplate].\x0a\x09stream \x0a\x09 nextPutAll: selectedClass superclass asString;\x0a\x09 nextPutAll: ' subclass: #';\x0a\x09 nextPutAll: selectedClass name;\x0a\x09 nextPutAll: String lf, String tab;\x0a\x09 nextPutAll: 'instanceVariableNames: '''.\x0a\x09selectedClass instanceVariableNames \x0a\x09 do: [:each | stream nextPutAll: each] \x0a\x09 separatedBy: [stream nextPutAll: ' '].\x0a\x09stream\x0a\x09 nextPutAll: '''', String lf, String tab;\x0a\x09 nextPutAll: 'package: ''';\x0a\x09 nextPutAll: selectedClass category;\x0a\x09 nextPutAll: ''''.\x0a\x09^stream contents", messageSends: ["writeStream", "ifNil:", "classDeclarationTemplate", "nextPutAll:", "asString", "superclass", "name", ",", "lf", "tab", "do:separatedBy:", "instanceVariableNames", "category", "contents"], referencedClasses: ["String"] }), smalltalk.Browser); smalltalk.addMethod( "_classDeclarationTemplate", smalltalk.method({ selector: "classDeclarationTemplate", category: 'accessing', fn: function (){ var self=this; return smalltalk.send(smalltalk.send("Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''\x0a\x09package: '", "__comma", [smalltalk.send(self, "_selectedPackage", [])]), "__comma", ["'"]); return self;}, args: [], source: "classDeclarationTemplate\x0a\x09^'Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''''\x0a\x09package: ''', self selectedPackage, ''''", messageSends: [",", "selectedPackage"], referencedClasses: [] }), smalltalk.Browser); smalltalk.addMethod( "_classes", smalltalk.method({ selector: "classes", category: 'accessing', fn: function (){ var self=this; return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_classes", []), "_select_", [(function(each){return smalltalk.send(smalltalk.send(each, "_category", []), "__eq", [self['@selectedPackage']]);})]), "_sort_", [(function(a, b){return ((($receiver = smalltalk.send(a, "_name", [])).klass === smalltalk.Number) ? $receiver (package commitPathJs, '/', selectedPackage, '.js').\x0a \x09\x09\x09\x09\x09StrippedExporter \x09-> (package commitPathJs, '/', selectedPackage, '.deploy.js').\x0a \x09\x09\x09\x09\x09\x09 ChunkExporter \x09\x09-> (package commitPathSt, '/', selectedPackage, '.st') \x09\x09\x09} \x0a \x0a \x09\x09\x09\x09\x09\x09do: [:commitStrategy| |fileContents|\x0a \x09fileContents := (commitStrategy key new exportPackage: selectedPackage).\x0a \x09self ajaxPutAt: commitStrategy value data: fileContents]\x0a \x09\x09\x09\x09\x09\x09]", messageSends: ["ifNotNil:", "named:", "do:", "->", ",", "commitPathJs", "commitPathSt", "exportPackage:", "new", "key", "ajaxPutAt:data:", "value"], referencedClasses: ["Package", "Exporter", "StrippedExporter", "ChunkExporter"] }), smalltalk.Browser); smalltalk.addMethod( "_compile", smalltalk.method({ selector: "compile", category: 'actions', fn: function (){ var self=this; smalltalk.send(self, "_disableSaveButton", []); ((($receiver = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("comment")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (($receiver = self['@selectedClass']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_compileClassComment", []);})() : nil;})() : (function(){return ((($receiver = smalltalk.send(smalltalk.send(self['@selectedProtocol'], "_notNil", []), "_or_", [(function(){return smalltalk.send(self['@selectedMethod'], "_notNil", []);})])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_compileDefinition", []);})() : (function(){return smalltalk.send(self, "_compileMethodDefinition", []);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(self, "_compileDefinition", []);}), (function(){return smalltalk.send(self, "_compileMethodDefinition", []);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return (($receiver = self['@selectedClass']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_compileClassComment", []);})() : nil;}), (function(){return ((($receiver = smalltalk.send(smalltalk.send(self['@selectedProtocol'], "_notNil", []), "_or_", [(function(){return smalltalk.send(self['@selectedMethod'], "_notNil", []);})])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_compileDefinition", []);})() : (function(){return smalltalk.send(self, "_compileMethodDefinition", []);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(self, "_compileDefinition", []);}), (function(){return smalltalk.send(self, "_compileMethodDefinition", []);})]));})])); return self;}, args: [], source: "compile\x0a self disableSaveButton.\x0a selectedTab = #comment \x0a\x09ifTrue: [\x0a\x09\x09\x09selectedClass ifNotNil: [\x0a\x09\x09\x09\x09self compileClassComment]]\x0a\x09ifFalse: [\x0a\x09\x09\x09(selectedProtocol notNil or: [selectedMethod notNil])\x0a\x09\x09\x09\x09ifFalse: [self compileDefinition]\x0a\x09\x09\x09\x09ifTrue: [self compileMethodDefinition]]", messageSends: ["disableSaveButton", "ifTrue:ifFalse:", "=", "ifNotNil:", "compileClassComment", "ifFalse:ifTrue:", "or:", "notNil", "compileDefinition", "compileMethodDefinition"], referencedClasses: [] }), smalltalk.Browser); smalltalk.addMethod( "_compileClassComment", smalltalk.method({ selector: "compileClassComment", category: 'actions', fn: function (){ var self=this; smalltalk.send(self['@selectedClass'], "_comment_", [smalltalk.send(self['@sourceArea'], "_val", [])]); return self;}, args: [], source: "compileClassComment\x0a selectedClass comment: sourceArea val", messageSends: ["comment:", "val"], referencedClasses: [] }), smalltalk.Browser); smalltalk.addMethod( "_compileDefinition", smalltalk.method({ selector: "compileDefinition", category: 'actions', fn: function (){ var self=this; var newClass=nil; (newClass=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_evaluateExpression_", [smalltalk.send(self['@sourceArea'], "_val", [])])); (function($rec){smalltalk.send($rec, "_resetClassesList", []);smalltalk.send($rec, "_updateCategoriesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self); smalltalk.send(self, "_selectClass_", [newClass]); return self;}, args: [], source: "compileDefinition\x0a | newClass |\x0a newClass := Compiler new evaluateExpression: sourceArea val.\x0a self \x0a\x09resetClassesList;\x0a\x09updateCategoriesList;\x0a\x09updateClassesList.\x0a self selectClass: newClass", messageSends: ["evaluateExpression:", "new", "val", "resetClassesList", "updateCategoriesList", "updateClassesList", "selectClass:"], referencedClasses: ["Compiler"] }), smalltalk.Browser); smalltalk.addMethod( "_compileMethodDefinition", smalltalk.method({ selector: "compileMethodDefinition", category: 'actions', fn: function (){ var self=this; ((($receiver = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_compileMethodDefinitionFor_", [self['@selectedClass']]);})() : (function(){return smalltalk.send(self, "_compileMethodDefinitionFor_", [smalltalk.send(self['@selectedClass'], "_class", [])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_compileMethodDefinitionFor_", [self['@selectedClass']]);}), (function(){return smalltalk.send(self, "_compileMethodDefinitionFor_", [smalltalk.send(self['@selectedClass'], "_class", [])]);})])); return self;}, args: [], source: "compileMethodDefinition\x0a selectedTab = #instance\x0a\x09ifTrue: [self compileMethodDefinitionFor: selectedClass]\x0a\x09ifFalse: [self compileMethodDefinitionFor: selectedClass class]", messageSends: ["ifTrue:ifFalse:", "=", "compileMethodDefinitionFor:", "class"], referencedClasses: [] }), smalltalk.Browser); smalltalk.addMethod( "_compileMethodDefinitionFor_", smalltalk.method({ selector: "compileMethodDefinitionFor:", category: 'actions', fn: function (aClass){ var self=this; var $early={}; try{var compiler=nil; var method=nil; var source=nil; var node=nil; (source=smalltalk.send(self['@sourceArea'], "_val", [])); (($receiver = self['@selectedProtocol']) == nil || $receiver == undefined) ? (function(){return (self['@selectedProtocol']=smalltalk.send(self['@selectedMethod'], "_category", []));})() : $receiver; (compiler=smalltalk.send((smalltalk.Compiler || Compiler), "_new", [])); smalltalk.send(compiler, "_source_", [source]); (node=smalltalk.send(compiler, "_parse_", [source])); ((($receiver = smalltalk.send(node, "_isParseFailure", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){throw $early=[smalltalk.send((typeof window == 'undefined' ? nil : window), "_alert_", [smalltalk.send(smalltalk.send(smalltalk.send("PARSE ERROR: ", "__comma", [smalltalk.send(node, "_reason", [])]), "__comma", [", position: "]), "__comma", [smalltalk.send(smalltalk.send(node, "_position", []), "_asString", [])])])]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function(){throw $early=[smalltalk.send((typeof window == 'undefined' ? nil : window), "_alert_", [smalltalk.send(smalltalk.send(smalltalk.send("PARSE ERROR: ", "__comma", [smalltalk.send(node, "_reason", [])]), "__comma", [", position: "]), "__comma", [smalltalk.send(smalltalk.send(node, "_position", []), "_asString", [])])])]})();})])); smalltalk.send(compiler, "_currentClass_", [aClass]); (method=smalltalk.send(compiler, "_eval_", [smalltalk.send(compiler, "_compileNode_", [node])])); smalltalk.send(method, "_category_", [self['@selectedProtocol']]); smalltalk.send(smalltalk.send(compiler, "_unknownVariables", []), "_do_", [(function(each){return (($receiver = smalltalk.send((typeof window == 'undefined' ? nil : window), "_at_", [each])) == nil || $receiver == undefined) ? (function(){return ((($receiver = smalltalk.send((typeof window == 'undefined' ? nil : window), "_confirm_", [smalltalk.send(smalltalk.send("Declare '", "__comma", [each]), "__comma", ["' as instance variable?"])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_addInstanceVariableNamed_toClass_", [each, aClass]);return (function(){throw $early=[smalltalk.send(self, "_compileMethodDefinitionFor_", [aClass])]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self, "_addInstanceVariableNamed_toClass_", [each, aClass]);return (function(){throw $early=[smalltalk.send(self, "_compileMethodDefinitionFor_", [aClass])]})();})]));})() : $receiver;})]); smalltalk.send(aClass, "_addCompiledMethod_", [method]); smalltalk.send(compiler, "_setupClass_", [aClass]); smalltalk.send(self, "_updateMethodsList", []); smalltalk.send(self, "_selectMethod_", [method]); return self; } catch(e) {if(e===$early)return e[0]; throw e}}, args: ["aClass"], source: "compileMethodDefinitionFor: aClass\x0a | compiler method source node | \x0a source := sourceArea val.\x0a selectedProtocol ifNil: [selectedProtocol := selectedMethod category].\x0a compiler := Compiler new.\x0a compiler source: source.\x0a node := compiler parse: source.\x0a node isParseFailure ifTrue: [\x0a\x09^window alert: 'PARSE ERROR: ', node reason, ', position: ', node position asString].\x0a compiler currentClass: aClass.\x0a method := compiler eval: (compiler compileNode: node).\x0a method category: selectedProtocol.\x0a compiler unknownVariables do: [:each |\x0a \x22Do not try to redeclare javascript's objects\x22\x0a (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 aClass addCompiledMethod: method.\x0a compiler setupClass: aClass.\x0a self updateMethodsList.\x0a self selectMethod: method", messageSends: ["val", "ifNil:", "category", "new", "source:", "parse:", "ifTrue:", "isParseFailure", "alert:", ",", "reason", "asString", "position", "currentClass:", "eval:", "compileNode:", "category:", "do:", "unknownVariables", "at:", "confirm:", "addInstanceVariableNamed:toClass:", "compileMethodDefinitionFor:", "addCompiledMethod:", "setupClass:", "updateMethodsList", "selectMethod:"], referencedClasses: ["Compiler"] }), smalltalk.Browser); smalltalk.addMethod( "_copyClass", smalltalk.method({ selector: "copyClass", category: 'actions', fn: function (){ var self=this; var className=nil; (className=smalltalk.send((typeof window == 'undefined' ? nil : window), "_prompt_", ["Copy class"])); ((($receiver = smalltalk.send(smalltalk.send(className, "_notNil", []), "_and_", [(function(){return smalltalk.send(className, "_notEmpty", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_copyClass_named_", [smalltalk.send(self, "_selectedClass", []), className]);(function($rec){smalltalk.send($rec, "_resetClassesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self);return smalltalk.send(self, "_selectClass_", [smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_at_", [className])]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_copyClass_named_", [smalltalk.send(self, "_selectedClass", []), className]);(function($rec){smalltalk.send($rec, "_resetClassesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self);return smalltalk.send(self, "_selectClass_", [smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_at_", [className])]);})])); return self;}, 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 self \x0a\x09\x09\x09resetClassesList;\x0a\x09\x09\x09updateClassesList.\x0a\x09\x09self selectClass: (Smalltalk current at: className)]", messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "copyClass:named:", "new", "selectedClass", "resetClassesList", "updateClassesList", "selectClass:", "at:", "current"], referencedClasses: ["ClassBuilder", "Smalltalk"] }), smalltalk.Browser); smalltalk.addMethod( "_declarationSource", smalltalk.method({ selector: "declarationSource", category: 'accessing', fn: function (){ var self=this; return ((($receiver = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_classDeclarationSource", []);})() : (function(){return smalltalk.send(self, "_metaclassDeclarationSource", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_classDeclarationSource", []);}), (function(){return smalltalk.send(self, "_metaclassDeclarationSource", []);})])); return self;}, args: [], source: "declarationSource\x0a ^selectedTab = #instance\x0a\x09ifTrue: [self classDeclarationSource]\x0a\x09ifFalse: [self metaclassDeclarationSource]", messageSends: ["ifTrue:ifFalse:", "=", "classDeclarationSource", "metaclassDeclarationSource"], referencedClasses: [] }), smalltalk.Browser); smalltalk.addMethod( "_disableSaveButton", smalltalk.method({ selector: "disableSaveButton", category: 'actions', fn: function (){ var self=this; (($receiver = self['@saveButton']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self['@saveButton'], "_at_put_", ["disabled", true]);})() : nil; (self['@unsavedChanges']=false); return self;}, args: [], source: "disableSaveButton\x0a saveButton ifNotNil: [\x0a\x09saveButton at: 'disabled' put: true].\x0a unsavedChanges := false", messageSends: ["ifNotNil:", "at:put:"], referencedClasses: [] }), smalltalk.Browser); smalltalk.addMethod( "_dummyMethodSource", smalltalk.method({ selector: "dummyMethodSource", category: 'accessing', fn: function (){ var self=this; return "messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements"; return self;}, args: [], source: "dummyMethodSource\x0a ^'messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements'", messageSends: [], referencedClasses: [] }), smalltalk.Browser); smalltalk.addMethod( "_handleSourceAreaKeyDown_", smalltalk.method({ selector: "handleSourceAreaKeyDown:", category: 'actions', fn: function (anEvent){ var self=this; if(anEvent.ctrlKey) { if(anEvent.keyCode === 83) { //ctrl+s self._compile(); anEvent.preventDefault(); return false; } } ; return self;}, args: ["anEvent"], source: "handleSourceAreaKeyDown: anEvent\x0a\x09 ", messageSends: [], referencedClasses: [] }), smalltalk.Browser); smalltalk.addMethod( "_hideClassButtons", smalltalk.method({ selector: "hideClassButtons", category: 'actions', fn: function (){ var self=this; smalltalk.send(smalltalk.send(self['@classButtons'], "_asJQuery", []), "_hide", []); return self;}, args: [], source: "hideClassButtons\x0a classButtons asJQuery hide", messageSends: ["hide", "asJQuery"], referencedClasses: [] }), smalltalk.Browser); smalltalk.addMethod( "_hideMethodButtons", smalltalk.method({ selector: "hideMethodButtons", category: 'actions', fn: function (){ var self=this; smalltalk.send(smalltalk.send(self['@methodButtons'], "_asJQuery", []), "_hide", []); return self;}, args: [], source: "hideMethodButtons\x0a methodButtons asJQuery hide", messageSends: ["hide", "asJQuery"], referencedClasses: [] }), smalltalk.Browser); smalltalk.addMethod( "_initialize", smalltalk.method({ selector: "initialize", category: 'initialization', fn: function (){ var self=this; smalltalk.send(self, "_initialize", [], smalltalk.Browser.superclass || nil); (self['@selectedTab']=smalltalk.symbolFor("instance")); (self['@selectedPackage']=smalltalk.send(smalltalk.send(self, "_packages", []), "_first", [])); (self['@unsavedChanges']=false); return self;}, args: [], source: "initialize\x0a super initialize.\x0a selectedTab := #instance.\x0a selectedPackage := self packages first.\x0a unsavedChanges := false", messageSends: ["initialize", "first", "packages"], referencedClasses: [] }), smalltalk.Browser); smalltalk.addMethod( "_label", smalltalk.method({ selector: "label", category: 'accessing', fn: function (){ var self=this; return (($receiver = self['@selectedClass']) == nil || $receiver == undefined) ? (function(){return "Browser (nil)";})() : (function(){return smalltalk.send("Browser: ", "__comma", [smalltalk.send(self['@selectedClass'], "_name", [])]);})(); return self;}, args: [], source: "label\x0a ^selectedClass \x0a\x09ifNil: ['Browser (nil)']\x0a\x09ifNotNil: ['Browser: ', selectedClass name]", messageSends: ["ifNil:ifNotNil:", ",", "name"], referencedClasses: [] }), smalltalk.Browser); smalltalk.addMethod( "_metaclassDeclarationSource", smalltalk.method({ selector: "metaclassDeclarationSource", category: 'accessing', fn: function (){ var self=this; var stream=nil; (stream=smalltalk.send("", "_writeStream", [])); (($receiver = self['@selectedClass']) != nil && $receiver != undefined) ? (function(){(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self['@selectedClass'], "_asString", [])]);smalltalk.send($rec, "_nextPutAll_", [" class "]);return smalltalk.send($rec, "_nextPutAll_", ["instanceVariableNames: '"]);})(stream);smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedClass'], "_class", []), "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(stream, "_nextPutAll_", [each]);}), (function(){return smalltalk.send(stream, "_nextPutAll_", [" "]);})]);return smalltalk.send(stream, "_nextPutAll_", ["'"]);})() : nil; return smalltalk.send(stream, "_contents", []); return self;}, args: [], source: "metaclassDeclarationSource\x0a | stream |\x0a stream := '' writeStream.\x0a selectedClass ifNotNil: [\x0a\x09stream \x0a\x09 nextPutAll: selectedClass asString;\x0a\x09 nextPutAll: ' class ';\x0a\x09 nextPutAll: 'instanceVariableNames: '''.\x0a\x09selectedClass class instanceVariableNames\x0a\x09 do: [:each | stream nextPutAll: each]\x0a\x09 separatedBy: [stream nextPutAll: ' '].\x0a\x09stream nextPutAll: ''''].\x0a ^stream contents", messageSends: ["writeStream", "ifNotNil:", "nextPutAll:", "asString", "do:separatedBy:", "instanceVariableNames", "class", "contents"], referencedClasses: [] }), smalltalk.Browser); smalltalk.addMethod( "_methodSource", smalltalk.method({ selector: "methodSource", category: 'accessing', fn: function (){ var self=this; return (($receiver = self['@selectedMethod']) == nil || $receiver == undefined) ? (function(){return smalltalk.send(self, "_dummyMethodSource", []);})() : (function(){return smalltalk.send(self['@selectedMethod'], "_source", []);})(); return self;}, args: [], source: "methodSource\x0a ^selectedMethod\x0a\x09ifNil: [self dummyMethodSource]\x0a\x09ifNotNil: [selectedMethod source]", messageSends: ["ifNil:ifNotNil:", "dummyMethodSource", "source"], referencedClasses: [] }), smalltalk.Browser); smalltalk.addMethod( "_methods", smalltalk.method({ selector: "methods", category: 'accessing', fn: function (){ var self=this; var $early={}; try{var klass=nil; ((($receiver = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("comment")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){throw $early=[[]]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function(){throw $early=[[]]})();})])); (($receiver = self['@selectedClass']) != nil && $receiver != undefined) ? (function(){return (klass=((($receiver = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return self['@selectedClass'];})() : (function(){return smalltalk.send(self['@selectedClass'], "_class", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return self['@selectedClass'];}), (function(){return smalltalk.send(self['@selectedClass'], "_class", []);})])));})() : nil; return smalltalk.send((($receiver = self['@selectedProtocol']) == nil || $receiver == undefined) ? (function(){return (($receiver = klass) == nil || $receiver == undefined) ? (function(){return [];})() : (function(){return smalltalk.send(smalltalk.send(klass, "_methodDictionary", []), "_values", []);})();})() : (function(){return smalltalk.send(smalltalk.send(smalltalk.send(klass, "_methodDictionary", []), "_values", []), "_select_", [(function(each){return smalltalk.send(smalltalk.send(each, "_category", []), "__eq", [self['@selectedProtocol']]);})]);})(), "_sort_", [(function(a, b){return ((($receiver = smalltalk.send(a, "_selector", [])).klass === smalltalk.Number) ? $receiver > "]), "__comma", [smalltalk.send(self, "_selector", [])])]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_openBrowserOn_", [each]);})]);})(li);})]);})]); return self;}, args: [], source: "updateImplementorsList\x0a implementorsList contents: [:html |\x0a\x09html li\x0a\x09\x09class: 'column_label'; \x0a\x09\x09with: 'Implementors (', self implementors size asString, ')';\x0a\x09\x09style: 'font-weight: bold'.\x0a\x09self implementors do: [:each || li |\x0a\x09 li := html li.\x0a\x09 li\x0a\x09\x09with: (each methodClass asString, ' >> ', self selector);\x0a\x09\x09onClick: [self openBrowserOn: each]]]", messageSends: ["contents:", "class:", "with:", ",", "asString", "size", "implementors", "style:", "li", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"], referencedClasses: [] }), smalltalk.ReferencesBrowser); smalltalk.addMethod( "_updateMatchesList", smalltalk.method({ selector: "updateMatchesList", category: 'updating', fn: function (){ var self=this; smalltalk.send(self['@matchesList'], "_contents_", [(function(html){(function($rec){smalltalk.send($rec, "_class_", ["column_label"]);smalltalk.send($rec, "_with_", [smalltalk.send(smalltalk.send("Regex matches (", "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_matches", []), "_size", []), "_asString", [])]), "__comma", [")"])]);return smalltalk.send($rec, "_style_", ["font-weight: bold"]);})(smalltalk.send(html, "_li", []));return smalltalk.send(smalltalk.send(self, "_matches", []), "_do_", [(function(each){var li=nil; (li=smalltalk.send(html, "_li", []));return (function($rec){smalltalk.send($rec, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodClass", []), "_asString", []), "__comma", [" >> "]), "__comma", [smalltalk.send(each, "_selector", [])])]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_openBrowserOn_", [each]);})]);})(li);})]);})]); return self;}, args: [], source: "updateMatchesList\x0a matchesList contents: [:html |\x0a\x09html li\x0a\x09\x09class: 'column_label'; \x0a\x09\x09with: 'Regex matches (', self matches size asString, ')';\x0a\x09\x09style: 'font-weight: bold'.\x0a\x09self matches do: [:each || li |\x0a\x09 li := html li.\x0a\x09 li\x0a\x09\x09with: (each methodClass asString, ' >> ', each selector);\x0a\x09\x09onClick: [self openBrowserOn: each]]]", messageSends: ["contents:", "class:", "with:", ",", "asString", "size", "matches", "style:", "li", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"], referencedClasses: [] }), smalltalk.ReferencesBrowser); smalltalk.addMethod( "_updateReferencedClassesList", smalltalk.method({ selector: "updateReferencedClassesList", category: 'updating', fn: function (){ var self=this; smalltalk.send(self['@referencedClassesList'], "_contents_", [(function(html){(function($rec){smalltalk.send($rec, "_class_", ["column_label"]);smalltalk.send($rec, "_with_", [smalltalk.send(smalltalk.send("Class references (", "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_referencedClasses", []), "_size", []), "_asString", [])]), "__comma", [")"])]);return smalltalk.send($rec, "_style_", ["font-weight: bold"]);})(smalltalk.send(html, "_li", []));return smalltalk.send(smalltalk.send(self, "_referencedClasses", []), "_do_", [(function(each){return (function($rec){smalltalk.send($rec, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodClass", []), "_asString", []), "__comma", [" >> "]), "__comma", [smalltalk.send(each, "_selector", [])])]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_openBrowserOn_", [each]);})]);})(smalltalk.send(html, "_li", []));})]);})]); return self;}, args: [], source: "updateReferencedClassesList\x0a\x09referencedClassesList contents: [:html |\x0a\x09html li\x0a\x09\x09class: 'column_label'; \x0a\x09\x09with: 'Class references (', self referencedClasses size asString, ')';\x0a\x09\x09style: 'font-weight: bold'.\x0a\x09self referencedClasses do: [:each |\x0a\x09\x09html li\x0a\x09\x09\x09with: (each methodClass asString, ' >> ', each selector);\x0a\x09\x09\x09onClick: [self openBrowserOn: each]]]", messageSends: ["contents:", "class:", "with:", ",", "asString", "size", "referencedClasses", "style:", "li", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"], referencedClasses: [] }), smalltalk.ReferencesBrowser); smalltalk.addMethod( "_updateSendersList", smalltalk.method({ selector: "updateSendersList", category: 'updating', fn: function (){ var self=this; smalltalk.send(self['@sendersList'], "_contents_", [(function(html){(function($rec){smalltalk.send($rec, "_class_", ["column_label"]);smalltalk.send($rec, "_with_", [smalltalk.send(smalltalk.send("Senders (", "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_senders", []), "_size", []), "_asString", [])]), "__comma", [")"])]);return smalltalk.send($rec, "_style_", ["font-weight: bold"]);})(smalltalk.send(html, "_li", []));return smalltalk.send(smalltalk.send(self, "_senders", []), "_do_", [(function(each){return (function($rec){smalltalk.send($rec, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodClass", []), "_asString", []), "__comma", [" >> "]), "__comma", [smalltalk.send(each, "_selector", [])])]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_openBrowserOn_", [each]);})]);})(smalltalk.send(html, "_li", []));})]);})]); return self;}, args: [], source: "updateSendersList\x0a\x09sendersList contents: [:html |\x0a\x09html li\x0a\x09\x09class: 'column_label'; \x0a\x09\x09with: 'Senders (', self senders size asString, ')';\x0a\x09\x09style: 'font-weight: bold'.\x0a\x09self senders do: [:each |\x0a\x09\x09html li\x0a\x09\x09\x09with: (each methodClass asString, ' >> ', each selector);\x0a\x09\x09\x09onClick: [self openBrowserOn: each]]]", messageSends: ["contents:", "class:", "with:", ",", "asString", "size", "senders", "style:", "li", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"], referencedClasses: [] }), smalltalk.ReferencesBrowser); smalltalk.addMethod( "_search_", smalltalk.method({ selector: "search:", category: 'instance creation', fn: function (aString){ var self=this; return (function($rec){smalltalk.send($rec, "_searchReferencesFor_", [aString]);return smalltalk.send($rec, "_open", []);})(smalltalk.send(self, "_new", [])); return self;}, args: ["aString"], source: "search: aString\x0a\x09^self new\x0a\x09\x09searchReferencesFor: aString;\x0a\x09\x09open", messageSends: ["searchReferencesFor:", "open", "new"], referencedClasses: [] }), smalltalk.ReferencesBrowser.klass); smalltalk.addClass('TestRunner', smalltalk.TabWidget, ['selectedCategories', 'packagesList', 'selectedClasses', 'classesList', 'selectedMethods', 'progressBar', 'methodsList', 'result', 'statusDiv'], 'IDE'); smalltalk.addMethod( "_allClasses", smalltalk.method({ selector: "allClasses", category: 'accessing', fn: function (){ var self=this; return smalltalk.send((smalltalk.TestCase || TestCase), "_allSubclasses", []); return self;}, args: [], source: "allClasses\x0a\x09^TestCase allSubclasses", messageSends: ["allSubclasses"], referencedClasses: ["TestCase"] }), smalltalk.TestRunner); smalltalk.addMethod( "_classes", smalltalk.method({ selector: "classes", category: 'accessing', fn: function (){ var self=this; return smalltalk.send(smalltalk.send(smalltalk.send(self, "_allClasses", []), "_select_", [(function(each){return smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_includes_", [smalltalk.send(each, "_category", [])]);})]), "_sort_", [(function(a, b){return ((($receiver = smalltalk.send(a, "_name", [])).klass === smalltalk.Number) ? $receiver >smalltalk.send(b, "_name", []) : smalltalk.send($receiver, "__gt", [smalltalk.send(b, "_name", [])]));})]); return self;}, args: [], source: "classes\x0a ^(self allClasses \x0a\x09select: [:each | self selectedCategories includes: each category])\x0a\x09sort: [:a :b | a name > b name]", messageSends: ["sort:", "select:", "allClasses", "includes:", "selectedCategories", "category", ">", "name"], referencedClasses: [] }), smalltalk.TestRunner); smalltalk.addMethod( "_initialize", smalltalk.method({ selector: "initialize", category: 'initialization', fn: function (){ var self=this; smalltalk.send(self, "_initialize", [], smalltalk.TestRunner.superclass || nil); (self['@result']=smalltalk.send((smalltalk.TestResult || TestResult), "_new", [])); return self;}, args: [], source: "initialize\x0a\x09super initialize.\x0a\x09result := TestResult new", messageSends: ["initialize", "new"], referencedClasses: ["TestResult"] }), smalltalk.TestRunner); smalltalk.addMethod( "_isSelectedCategory_", smalltalk.method({ selector: "isSelectedCategory:", category: 'testing', fn: function (aCategory){ var self=this; return smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_includes_", [aCategory]); return self;}, args: ["aCategory"], source: "isSelectedCategory: aCategory\x0a\x09^(self selectedCategories includes: aCategory)", messageSends: ["includes:", "selectedCategories"], referencedClasses: [] }), smalltalk.TestRunner); smalltalk.addMethod( "_isSelectedClass_", smalltalk.method({ selector: "isSelectedClass:", category: 'testing', fn: function (aClass){ var self=this; return smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_includes_", [aClass]); return self;}, args: ["aClass"], source: "isSelectedClass: aClass\x0a\x09^(self selectedClasses includes: aClass)", messageSends: ["includes:", "selectedClasses"], referencedClasses: [] }), smalltalk.TestRunner); smalltalk.addMethod( "_label", smalltalk.method({ selector: "label", category: 'accessing', fn: function (){ var self=this; return "SUnit"; return self;}, args: [], source: "label\x0a ^'SUnit'", messageSends: [], referencedClasses: [] }), smalltalk.TestRunner); smalltalk.addMethod( "_packages", smalltalk.method({ selector: "packages", category: 'accessing', fn: function (){ var self=this; var packages=nil; (packages=smalltalk.send((smalltalk.Array || Array), "_new", [])); smalltalk.send(smalltalk.send(self, "_allClasses", []), "_do_", [(function(each){return ((($receiver = smalltalk.send(packages, "_includes_", [smalltalk.send(each, "_category", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(packages, "_add_", [smalltalk.send(each, "_category", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(packages, "_add_", [smalltalk.send(each, "_category", [])]);})]));})]); return smalltalk.send(packages, "_sort", []); return self;}, args: [], source: "packages\x0a | packages |\x0a packages := Array new.\x0a self allClasses do: [:each |\x0a\x09(packages includes: each category) ifFalse: [\x0a\x09 packages add: each category]].\x0a ^packages sort", messageSends: ["new", "do:", "allClasses", "ifFalse:", "includes:", "category", "add:", "sort"], referencedClasses: ["Array"] }), smalltalk.TestRunner); smalltalk.addMethod( "_performFailure_", smalltalk.method({ selector: "performFailure:", category: 'actions', fn: function (aTestCase){ var self=this; smalltalk.send(aTestCase, "_perform_", [smalltalk.send(aTestCase, "_selector", [])]); return self;}, args: ["aTestCase"], source: "performFailure: aTestCase\x0a\x09aTestCase perform: aTestCase selector", messageSends: ["perform:", "selector"], referencedClasses: [] }), smalltalk.TestRunner); smalltalk.addMethod( "_printErrors", smalltalk.method({ selector: "printErrors", category: 'printing', fn: function (){ var self=this; return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_errors", []), "_size", []), "_asString", []), "__comma", [" errors, "]); return self;}, args: [], source: "printErrors\x0a\x09^self result errors size asString , ' errors, '", messageSends: [",", "asString", "size", "errors", "result"], referencedClasses: [] }), smalltalk.TestRunner); smalltalk.addMethod( "_printFailures", smalltalk.method({ selector: "printFailures", category: 'printing', fn: function (){ var self=this; return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_failures", []), "_size", []), "_asString", []), "__comma", [" failures"]); return self;}, args: [], source: "printFailures\x0a\x09^self result failures size asString, ' failures'", messageSends: [",", "asString", "size", "failures", "result"], referencedClasses: [] }), smalltalk.TestRunner); smalltalk.addMethod( "_printPasses", smalltalk.method({ selector: "printPasses", category: 'printing', fn: function (){ var self=this; return smalltalk.send(smalltalk.send(((($receiver = ((($receiver = smalltalk.send(smalltalk.send(self, "_result", []), "_total", [])).klass === smalltalk.Number) ? $receiver -smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_errors", []), "_size", []) : smalltalk.send($receiver, "__minus", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_errors", []), "_size", [])]))).klass === smalltalk.Number) ? $receiver -smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_failures", []), "_size", []) : smalltalk.send($receiver, "__minus", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_failures", []), "_size", [])])), "_asString", []), "__comma", [" passes, "]); return self;}, args: [], source: "printPasses\x0a\x09^(self result total - self result errors size - self result failures size) asString , ' passes, '", messageSends: [",", "asString", "-", "total", "result", "size", "errors", "failures"], referencedClasses: [] }), smalltalk.TestRunner); smalltalk.addMethod( "_printTotal", smalltalk.method({ selector: "printTotal", category: 'printing', fn: function (){ var self=this; return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_total", []), "_asString", []), "__comma", [" runs, "]); return self;}, args: [], source: "printTotal\x0a\x09^self result total asString, ' runs, '", messageSends: [",", "asString", "total", "result"], referencedClasses: [] }), smalltalk.TestRunner); smalltalk.addMethod( "_progressBar", smalltalk.method({ selector: "progressBar", category: 'accessing', fn: function (){ var self=this; return (($receiver = self['@progressBar']) == nil || $receiver == undefined) ? (function(){return (self['@progressBar']=smalltalk.send((smalltalk.ProgressBar || ProgressBar), "_new", []));})() : $receiver; return self;}, args: [], source: "progressBar\x0a\x09^progressBar ifNil: [progressBar := ProgressBar new]", messageSends: ["ifNil:", "new"], referencedClasses: ["ProgressBar"] }), smalltalk.TestRunner); smalltalk.addMethod( "_renderBoxOn_", smalltalk.method({ selector: "renderBoxOn:", category: 'rendering', fn: function (html){ var self=this; (function($rec){smalltalk.send($rec, "_renderCategoriesOn_", [html]);smalltalk.send($rec, "_renderClassesOn_", [html]);return smalltalk.send($rec, "_renderResultsOn_", [html]);})(self); return self;}, args: ["html"], source: "renderBoxOn: html\x0a self \x0a\x09renderCategoriesOn: html;\x0a\x09renderClassesOn: html;\x0a\x09renderResultsOn: html", messageSends: ["renderCategoriesOn:", "renderClassesOn:", "renderResultsOn:"], referencedClasses: [] }), smalltalk.TestRunner); smalltalk.addMethod( "_renderButtonsOn_", smalltalk.method({ selector: "renderButtonsOn:", category: 'rendering', fn: function (html){ var self=this; (function($rec){smalltalk.send($rec, "_with_", ["Run selected"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_run_", [smalltalk.send(self, "_testCases", [])]);})]);})(smalltalk.send(html, "_button", [])); return self;}, args: ["html"], source: "renderButtonsOn: html\x0a html button\x0a\x09with: 'Run selected';\x0a\x09onClick: [self run: self testCases]", messageSends: ["with:", "onClick:", "run:", "testCases", "button"], referencedClasses: [] }), smalltalk.TestRunner); smalltalk.addMethod( "_renderCategoriesOn_", smalltalk.method({ selector: "renderCategoriesOn:", category: 'rendering', fn: function (html){ var self=this; (self['@packagesList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column sunit packages"])); smalltalk.send(self, "_updateCategoriesList", []); return self;}, args: ["html"], source: "renderCategoriesOn: html\x0a\x09packagesList := html ul class: 'amber_column sunit packages'.\x0a\x09self updateCategoriesList", messageSends: ["class:", "ul", "updateCategoriesList"], referencedClasses: [] }), smalltalk.TestRunner); smalltalk.addMethod( "_renderClassesOn_", smalltalk.method({ selector: "renderClassesOn:", category: 'rendering', fn: function (html){ var self=this; (self['@classesList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column sunit classes"])); smalltalk.send(self, "_updateClassesList", []); return self;}, args: ["html"], source: "renderClassesOn: html\x0a\x09classesList := html ul class: 'amber_column sunit classes'.\x0a\x09self updateClassesList", messageSends: ["class:", "ul", "updateClassesList"], referencedClasses: [] }), smalltalk.TestRunner); smalltalk.addMethod( "_renderErrorsOn_", smalltalk.method({ selector: "renderErrorsOn:", category: 'rendering', fn: function (html){ var self=this; smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_errors", []), "_do_", [(function(each){return (function($rec){smalltalk.send($rec, "_class_", ["errors"]);smalltalk.send($rec, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_class", []), "_name", []), "__comma", [" >> "]), "__comma", [smalltalk.send(each, "_selector", [])])]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_performFailure_", [each]);})]);})(smalltalk.send(html, "_li", []));})]); return self;}, args: ["html"], source: "renderErrorsOn: html\x0a\x09self result errors do: [:each |\x0a\x09\x09html li \x0a\x09\x09\x09class: 'errors';\x0a\x09\x09\x09with: each class name, ' >> ', each selector;\x0a onClick: [self performFailure: each]]", messageSends: ["do:", "errors", "result", "class:", "with:", ",", "name", "class", "selector", "onClick:", "performFailure:", "li"], referencedClasses: [] }), smalltalk.TestRunner); smalltalk.addMethod( "_renderFailuresOn_", smalltalk.method({ selector: "renderFailuresOn:", category: 'rendering', fn: function (html){ var self=this; smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_failures", []), "_do_", [(function(each){return (function($rec){smalltalk.send($rec, "_class_", ["failures"]);smalltalk.send($rec, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_class", []), "_name", []), "__comma", [" >> "]), "__comma", [smalltalk.send(each, "_selector", [])])]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_performFailure_", [each]);})]);})(smalltalk.send(html, "_li", []));})]); return self;}, args: ["html"], source: "renderFailuresOn: html\x0a\x09self result failures do: [:each |\x0a\x09\x09html li \x0a\x09\x09\x09class: 'failures';\x0a\x09\x09\x09with: each class name, ' >> ', each selector;\x0a onClick: [self performFailure: each]]", messageSends: ["do:", "failures", "result", "class:", "with:", ",", "name", "class", "selector", "onClick:", "performFailure:", "li"], referencedClasses: [] }), smalltalk.TestRunner); smalltalk.addMethod( "_renderResultsOn_", smalltalk.method({ selector: "renderResultsOn:", category: 'rendering', fn: function (html){ var self=this; (self['@statusDiv']=smalltalk.send(html, "_div", [])); smalltalk.send(html, "_with_", [smalltalk.send(self, "_progressBar", [])]); (self['@methodsList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column sunit results"])); smalltalk.send(self, "_updateMethodsList", []); smalltalk.send(self, "_updateStatusDiv", []); return self;}, args: ["html"], source: "renderResultsOn: html\x0a\x09statusDiv := html div.\x0a\x09html with: self progressBar.\x0a\x09methodsList := html ul class: 'amber_column sunit results'.\x0a\x09self updateMethodsList.\x0a\x09self updateStatusDiv", messageSends: ["div", "with:", "progressBar", "class:", "ul", "updateMethodsList", "updateStatusDiv"], referencedClasses: [] }), smalltalk.TestRunner); smalltalk.addMethod( "_result", smalltalk.method({ selector: "result", category: 'accessing', fn: function (){ var self=this; return self['@result']; return self;}, args: [], source: "result\x0a\x09^result", messageSends: [], referencedClasses: [] }), smalltalk.TestRunner); smalltalk.addMethod( "_run_", smalltalk.method({ selector: "run:", category: 'actions', fn: function (aCollection){ var self=this; (self['@result']=smalltalk.send((smalltalk.TestResult || TestResult), "_new", [])); (function($rec){smalltalk.send($rec, "_updateStatusDiv", []);return smalltalk.send($rec, "_updateMethodsList", []);})(self); smalltalk.send(smalltalk.send(self, "_progressBar", []), "_updatePercent_", [(0)]); smalltalk.send(self['@result'], "_total_", [smalltalk.send(aCollection, "_size", [])]); smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send((function(){smalltalk.send(each, "_runCaseFor_", [self['@result']]);smalltalk.send(smalltalk.send(self, "_progressBar", []), "_updatePercent_", [((($receiver = ((($receiver = smalltalk.send(self['@result'], "_runs", [])).klass === smalltalk.Number) ? $receiver /smalltalk.send(self['@result'], "_total", []) : smalltalk.send($receiver, "__slash", [smalltalk.send(self['@result'], "_total", [])]))).klass === smalltalk.Number) ? $receiver *(100) : smalltalk.send($receiver, "__star", [(100)]))]);smalltalk.send(self, "_updateStatusDiv", []);return smalltalk.send(self, "_updateMethodsList", []);}), "_valueWithTimeout_", [(100)]);})]); return self;}, args: ["aCollection"], source: "run: aCollection\x0a\x09result := TestResult new.\x0a\x09self \x0a\x09\x09updateStatusDiv;\x0a\x09\x09updateMethodsList.\x0a\x09self progressBar updatePercent: 0.\x0a\x09result total: aCollection size.\x0a\x09aCollection do: [:each | \x0a\x09\x09[each runCaseFor: result.\x0a\x09\x09self progressBar updatePercent: result runs / result total * 100.\x0a\x09\x09self updateStatusDiv.\x0a\x09\x09self updateMethodsList] valueWithTimeout: 100].", messageSends: ["new", "updateStatusDiv", "updateMethodsList", "updatePercent:", "progressBar", "total:", "size", "do:", "valueWithTimeout:", "runCaseFor:", "*", "/", "runs", "total"], referencedClasses: ["TestResult"] }), smalltalk.TestRunner); smalltalk.addMethod( "_selectAllCategories", smalltalk.method({ selector: "selectAllCategories", category: 'actions', fn: function (){ var self=this; smalltalk.send(smalltalk.send(self, "_packages", []), "_do_", [(function(each){return ((($receiver = smalltalk.send(self['@selectedCategories'], "_includes_", [each])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_add_", [each]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_add_", [each]);})]));})]); (function($rec){smalltalk.send($rec, "_updateCategoriesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self); return self;}, args: [], source: "selectAllCategories\x0a\x09self packages do: [:each | \x0a\x09\x09(selectedCategories includes: each) ifFalse: [\x0a\x09\x09\x09self selectedCategories add: each]].\x0a\x09self \x0a\x09 updateCategoriesList;\x0a\x09 updateClassesList", messageSends: ["do:", "packages", "ifFalse:", "includes:", "add:", "selectedCategories", "updateCategoriesList", "updateClassesList"], referencedClasses: [] }), smalltalk.TestRunner); smalltalk.addMethod( "_selectAllClasses", smalltalk.method({ selector: "selectAllClasses", category: 'actions', fn: function (){ var self=this; smalltalk.send(smalltalk.send(self, "_classes", []), "_do_", [(function(each){return ((($receiver = smalltalk.send(self['@selectedClasses'], "_includes_", [each])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_add_", [each]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_add_", [each]);})]));})]); (function($rec){smalltalk.send($rec, "_updateCategoriesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self); return self;}, args: [], source: "selectAllClasses\x0a\x09self classes do: [:each | \x0a\x09\x09(selectedClasses includes: each) ifFalse: [\x0a\x09\x09\x09self selectedClasses add: each]].\x0a\x09self \x0a\x09 updateCategoriesList;\x0a\x09 updateClassesList", messageSends: ["do:", "classes", "ifFalse:", "includes:", "add:", "selectedClasses", "updateCategoriesList", "updateClassesList"], referencedClasses: [] }), smalltalk.TestRunner); smalltalk.addMethod( "_selectedCategories", smalltalk.method({ selector: "selectedCategories", category: 'accessing', fn: function (){ var self=this; return (($receiver = self['@selectedCategories']) == nil || $receiver == undefined) ? (function(){return (self['@selectedCategories']=smalltalk.send((smalltalk.Array || Array), "_new", []));})() : $receiver; return self;}, args: [], source: "selectedCategories\x0a\x09^selectedCategories ifNil: [selectedCategories := Array new]", messageSends: ["ifNil:", "new"], referencedClasses: ["Array"] }), smalltalk.TestRunner); smalltalk.addMethod( "_selectedClasses", smalltalk.method({ selector: "selectedClasses", category: 'accessing', fn: function (){ var self=this; return (($receiver = self['@selectedClasses']) == nil || $receiver == undefined) ? (function(){return (self['@selectedClasses']=smalltalk.send((smalltalk.Array || Array), "_new", []));})() : $receiver; return self;}, args: [], source: "selectedClasses\x0a\x09^selectedClasses ifNil: [selectedClasses := Array new]", messageSends: ["ifNil:", "new"], referencedClasses: ["Array"] }), smalltalk.TestRunner); smalltalk.addMethod( "_statusInfo", smalltalk.method({ selector: "statusInfo", category: 'accessing', fn: function (){ var self=this; return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_printTotal", []), "__comma", [smalltalk.send(self, "_printPasses", [])]), "__comma", [smalltalk.send(self, "_printErrors", [])]), "__comma", [smalltalk.send(self, "_printFailures", [])]); return self;}, args: [], source: "statusInfo\x0a\x09^self printTotal, self printPasses, self printErrors, self printFailures", messageSends: [",", "printTotal", "printPasses", "printErrors", "printFailures"], referencedClasses: [] }), smalltalk.TestRunner); smalltalk.addMethod( "_testCases", smalltalk.method({ selector: "testCases", category: 'accessing', fn: function (){ var self=this; var testCases=nil; (testCases=[]); smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_do_", [(function(each){return smalltalk.send(testCases, "_addAll_", [smalltalk.send(each, "_buildSuite", [])]);})]); return testCases; return self;}, args: [], source: "testCases\x0a\x09| testCases |\x0a\x09testCases := #().\x0a\x09self selectedClasses do: [:each | testCases addAll: each buildSuite].\x0a\x09^testCases", messageSends: ["do:", "selectedClasses", "addAll:", "buildSuite"], referencedClasses: [] }), smalltalk.TestRunner); smalltalk.addMethod( "_toggleCategory_", smalltalk.method({ selector: "toggleCategory:", category: 'actions', fn: function (aCategory){ var self=this; ((($receiver = smalltalk.send(self, "_isSelectedCategory_", [aCategory])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self['@selectedCategories'], "_add_", [aCategory]);})() : (function(){return smalltalk.send(self['@selectedCategories'], "_remove_", [aCategory]);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(self['@selectedCategories'], "_add_", [aCategory]);}), (function(){return smalltalk.send(self['@selectedCategories'], "_remove_", [aCategory]);})])); (function($rec){smalltalk.send($rec, "_updateCategoriesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self); return self;}, args: ["aCategory"], source: "toggleCategory: aCategory\x0a\x09(self isSelectedCategory: aCategory) \x0a\x09\x09ifFalse: [selectedCategories add: aCategory]\x0a\x09\x09ifTrue: [selectedCategories remove: aCategory].\x0a\x09self \x0a\x09 updateCategoriesList;\x0a\x09 updateClassesList", messageSends: ["ifFalse:ifTrue:", "isSelectedCategory:", "add:", "remove:", "updateCategoriesList", "updateClassesList"], referencedClasses: [] }), smalltalk.TestRunner); smalltalk.addMethod( "_toggleClass_", smalltalk.method({ selector: "toggleClass:", category: 'actions', fn: function (aClass){ var self=this; ((($receiver = smalltalk.send(self, "_isSelectedClass_", [aClass])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self['@selectedClasses'], "_add_", [aClass]);})() : (function(){return smalltalk.send(self['@selectedClasses'], "_remove_", [aClass]);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(self['@selectedClasses'], "_add_", [aClass]);}), (function(){return smalltalk.send(self['@selectedClasses'], "_remove_", [aClass]);})])); smalltalk.send(self, "_updateClassesList", []); return self;}, args: ["aClass"], source: "toggleClass: aClass\x0a\x09(self isSelectedClass: aClass) \x0a\x09\x09ifFalse: [selectedClasses add: aClass]\x0a\x09\x09ifTrue: [selectedClasses remove: aClass].\x0a\x09self \x0a\x09 updateClassesList", messageSends: ["ifFalse:ifTrue:", "isSelectedClass:", "add:", "remove:", "updateClassesList"], referencedClasses: [] }), smalltalk.TestRunner); smalltalk.addMethod( "_updateCategoriesList", smalltalk.method({ selector: "updateCategoriesList", category: 'updating', fn: function (){ var self=this; smalltalk.send(self['@packagesList'], "_contents_", [(function(html){(function($rec){smalltalk.send($rec, "_class_", ["all"]);smalltalk.send($rec, "_with_", ["All"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectAllCategories", []);})]);})(smalltalk.send(html, "_li", []));return smalltalk.send(smalltalk.send(self, "_packages", []), "_do_", [(function(each){var li=nil; (li=smalltalk.send(html, "_li", []));((($receiver = smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_includes_", [each])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(li, "_class_", ["selected"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(li, "_class_", ["selected"]);})]));return (function($rec){smalltalk.send($rec, "_with_", [each]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_toggleCategory_", [each]);})]);})(li);})]);})]); return self;}, args: [], source: "updateCategoriesList\x0a packagesList contents: [:html |\x0a\x09 html li \x0a\x09\x09class: 'all';\x0a\x09\x09with: 'All';\x0a\x09\x09onClick: [self selectAllCategories].\x0a\x09self packages do: [:each || li |\x0a\x09 li := html li.\x0a\x09 (self selectedCategories includes: each) ifTrue: [\x0a\x09\x09li class: 'selected'].\x0a\x09 li\x0a\x09\x09with: each;\x0a\x09\x09onClick: [self toggleCategory: each]]]", messageSends: ["contents:", "class:", "with:", "onClick:", "selectAllCategories", "li", "do:", "packages", "ifTrue:", "includes:", "selectedCategories", "toggleCategory:"], referencedClasses: [] }), smalltalk.TestRunner); smalltalk.addMethod( "_updateClassesList", smalltalk.method({ selector: "updateClassesList", category: 'updating', fn: function (){ var self=this; smalltalk.send(self['@classesList'], "_contents_", [(function(html){((($receiver = smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function($rec){smalltalk.send($rec, "_class_", ["all"]);smalltalk.send($rec, "_with_", ["All"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectAllClasses", []);})]);})(smalltalk.send(html, "_li", []));})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function($rec){smalltalk.send($rec, "_class_", ["all"]);smalltalk.send($rec, "_with_", ["All"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectAllClasses", []);})]);})(smalltalk.send(html, "_li", []));})]));return smalltalk.send(smalltalk.send(self, "_classes", []), "_do_", [(function(each){var li=nil; (li=smalltalk.send(html, "_li", []));((($receiver = smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_includes_", [each])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(li, "_class_", ["selected"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(li, "_class_", ["selected"]);})]));return (function($rec){smalltalk.send($rec, "_with_", [smalltalk.send(each, "_name", [])]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_toggleClass_", [each]);})]);})(li);})]);})]); return self;}, args: [], source: "updateClassesList\x0a classesList contents: [:html |\x0a\x09(self selectedCategories isEmpty) ifFalse: [\x0a\x09\x09html li\x0a\x09\x09\x09class: 'all';\x0a\x09\x09\x09with: 'All';\x0a\x09\x09\x09onClick: [self selectAllClasses]].\x0a\x09self classes do: [:each || li |\x0a\x09\x09li := html li.\x0a\x09\x09(self selectedClasses includes: each) ifTrue: [\x0a\x09\x09\x09li class: 'selected'].\x0a\x09\x09li\x0a\x09\x09\x09with: each name;\x0a\x09\x09\x09onClick: [self toggleClass: each]]]", messageSends: ["contents:", "ifFalse:", "isEmpty", "selectedCategories", "class:", "with:", "onClick:", "selectAllClasses", "li", "do:", "classes", "ifTrue:", "includes:", "selectedClasses", "name", "toggleClass:"], referencedClasses: [] }), smalltalk.TestRunner); smalltalk.addMethod( "_updateMethodsList", smalltalk.method({ selector: "updateMethodsList", category: 'updating', fn: function (){ var self=this; smalltalk.send(self['@methodsList'], "_contents_", [(function(html){smalltalk.send(self, "_renderErrorsOn_", [html]);return smalltalk.send(self, "_renderFailuresOn_", [html]);})]); return self;}, args: [], source: "updateMethodsList\x0a\x09methodsList contents: [:html |\x0a\x09\x09self renderErrorsOn: html.\x0a self renderFailuresOn: html]", messageSends: ["contents:", "renderErrorsOn:", "renderFailuresOn:"], referencedClasses: [] }), smalltalk.TestRunner); smalltalk.addMethod( "_updateStatusDiv", smalltalk.method({ selector: "updateStatusDiv", category: 'updating', fn: function (){ var self=this; smalltalk.send(self['@statusDiv'], "_class_", [smalltalk.send("sunit status ", "__comma", [smalltalk.send(self['@result'], "_status", [])])]); smalltalk.send(self['@statusDiv'], "_contents_", [(function(html){return smalltalk.send(smalltalk.send(html, "_span", []), "_with_", [smalltalk.send(self, "_statusInfo", [])]);})]); return self;}, args: [], source: "updateStatusDiv\x0a\x09statusDiv class: 'sunit status ', result status.\x0a\x09statusDiv contents: [:html |\x0a\x09\x09html span with: self statusInfo]", messageSends: ["class:", ",", "status", "contents:", "with:", "span", "statusInfo"], referencedClasses: [] }), smalltalk.TestRunner); smalltalk.addClass('Workspace', smalltalk.TabWidget, ['sourceArea'], 'IDE'); smalltalk.addMethod( "_clearWorkspace", smalltalk.method({ selector: "clearWorkspace", category: 'actions', fn: function (){ var self=this; smalltalk.send(self['@sourceArea'], "_clear", []); return self;}, args: [], source: "clearWorkspace\x0a sourceArea clear", messageSends: ["clear"], referencedClasses: [] }), smalltalk.Workspace); smalltalk.addMethod( "_doIt", smalltalk.method({ selector: "doIt", category: 'actions', fn: function (){ var self=this; smalltalk.send(self['@sourceArea'], "_doIt", []); return self;}, args: [], source: "doIt\x0a sourceArea doIt", messageSends: ["doIt"], referencedClasses: [] }), smalltalk.Workspace); smalltalk.addMethod( "_fileIn", smalltalk.method({ selector: "fileIn", category: 'actions', fn: function (){ var self=this; smalltalk.send(self['@sourceArea'], "_fileIn", []); return self;}, args: [], source: "fileIn\x0a sourceArea fileIn", messageSends: ["fileIn"], referencedClasses: [] }), smalltalk.Workspace); smalltalk.addMethod( "_inspectIt", smalltalk.method({ selector: "inspectIt", category: 'actions', fn: function (){ var self=this; smalltalk.send(self['@sourceArea'], "_inspectIt", []); return self;}, args: [], source: "inspectIt\x0a sourceArea inspectIt", messageSends: ["inspectIt"], referencedClasses: [] }), smalltalk.Workspace); smalltalk.addMethod( "_label", smalltalk.method({ selector: "label", category: 'accessing', fn: function (){ var self=this; return "Workspace"; return self;}, args: [], source: "label\x0a ^'Workspace'", messageSends: [], referencedClasses: [] }), smalltalk.Workspace); smalltalk.addMethod( "_printIt", smalltalk.method({ selector: "printIt", category: 'actions', fn: function (){ var self=this; smalltalk.send(self['@sourceArea'], "_printIt", []); return self;}, args: [], source: "printIt\x0a\x09sourceArea printIt", messageSends: ["printIt"], referencedClasses: [] }), smalltalk.Workspace); smalltalk.addMethod( "_renderBoxOn_", smalltalk.method({ selector: "renderBoxOn:", category: 'rendering', fn: function (html){ var self=this; (self['@sourceArea']=smalltalk.send((smalltalk.SourceArea || SourceArea), "_new", [])); smalltalk.send(self['@sourceArea'], "_renderOn_", [html]); return self;}, args: ["html"], source: "renderBoxOn: html\x0a sourceArea := SourceArea new.\x0a sourceArea renderOn: html", messageSends: ["new", "renderOn:"], referencedClasses: ["SourceArea"] }), smalltalk.Workspace); smalltalk.addMethod( "_renderButtonsOn_", smalltalk.method({ selector: "renderButtonsOn:", category: 'rendering', fn: function (html){ var self=this; (function($rec){smalltalk.send($rec, "_with_", ["DoIt"]);smalltalk.send($rec, "_title_", ["ctrl+d"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_doIt", []);})]);})(smalltalk.send(html, "_button", [])); (function($rec){smalltalk.send($rec, "_with_", ["PrintIt"]);smalltalk.send($rec, "_title_", ["ctrl+p"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_printIt", []);})]);})(smalltalk.send(html, "_button", [])); (function($rec){smalltalk.send($rec, "_with_", ["InspectIt"]);smalltalk.send($rec, "_title_", ["ctrl+i"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_inspectIt", []);})]);})(smalltalk.send(html, "_button", [])); (function($rec){smalltalk.send($rec, "_with_", ["FileIn"]);smalltalk.send($rec, "_title_", ["ctrl+f"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_fileIn", []);})]);})(smalltalk.send(html, "_button", [])); (function($rec){smalltalk.send($rec, "_with_", ["Clear workspace"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_clearWorkspace", []);})]);})(smalltalk.send(html, "_button", [])); return self;}, args: ["html"], source: "renderButtonsOn: html\x0a html button\x0a\x09with: 'DoIt';\x0a\x09title: 'ctrl+d';\x0a\x09onClick: [self doIt].\x0a html button\x0a\x09with: 'PrintIt';\x0a\x09title: 'ctrl+p';\x0a\x09onClick: [self printIt].\x0a html button\x0a\x09with: 'InspectIt';\x0a\x09title: 'ctrl+i';\x0a\x09onClick: [self inspectIt].\x0a html button\x0a\x09with: 'FileIn';\x0a\x09title: 'ctrl+f';\x0a\x09onClick: [self fileIn].\x0a html button\x0a\x09with: 'Clear workspace';\x0a\x09onClick: [self clearWorkspace]", messageSends: ["with:", "title:", "onClick:", "doIt", "button", "printIt", "inspectIt", "fileIn", "clearWorkspace"], referencedClasses: [] }), smalltalk.Workspace); smalltalk.addMethod( "_inspect", smalltalk.method({ selector: "inspect", category: '*IDE', fn: function (){ var self=this; (function($rec){smalltalk.send($rec, "_inspect_", [self]);return smalltalk.send($rec, "_open", []);})(smalltalk.send((smalltalk.Inspector || Inspector), "_new", [])); return self;}, args: [], source: "inspect\x0a\x09Inspector new \x0a\x09\x09inspect: self;\x0a\x09\x09open", messageSends: ["inspect:", "open", "new"], referencedClasses: ["Inspector"] }), smalltalk.Object); smalltalk.addMethod( "_inspectOn_", smalltalk.method({ selector: "inspectOn:", category: '*IDE', fn: function (anInspector){ var self=this; var variables=nil; (variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", [])); smalltalk.send(variables, "_at_put_", ["#self", self]); smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_allInstanceVariableNames", []), "_do_", [(function(each){return smalltalk.send(variables, "_at_put_", [each, smalltalk.send(self, "_instVarAt_", [each])]);})]); (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector); return self;}, 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", messageSends: ["new", "at:put:", "do:", "allInstanceVariableNames", "class", "instVarAt:", "setLabel:", "printString", "setVariables:"], referencedClasses: ["Dictionary"] }), smalltalk.Object); smalltalk.addMethod( "_inspectOn_", smalltalk.method({ selector: "inspectOn:", category: '*IDE', fn: function (anInspector){ var self=this; var variables=nil; (variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", [])); smalltalk.send(variables, "_at_put_", ["#self", self]); smalltalk.send(self, "_withIndexDo_", [(function(each, i){return smalltalk.send(variables, "_at_put_", [i, each]);})]); (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector); return self;}, 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", messageSends: ["new", "at:put:", "withIndexDo:", "setLabel:", "printString", "setVariables:"], referencedClasses: ["Dictionary"] }), smalltalk.Collection); smalltalk.addMethod( "_inspectOn_", smalltalk.method({ selector: "inspectOn:", category: '*IDE', fn: function (anInspector){ var self=this; var variables=nil; (variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", [])); smalltalk.send(variables, "_at_put_", ["#self", self]); smalltalk.send(variables, "_at_put_", ["#keys", smalltalk.send(self, "_keys", [])]); smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return smalltalk.send(variables, "_at_put_", [key, value]);})]); (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector); return self;}, 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", messageSends: ["new", "at:put:", "keys", "keysAndValuesDo:", "setLabel:", "printString", "setVariables:"], referencedClasses: ["Dictionary"] }), smalltalk.HashedCollection); smalltalk.addMethod( "_inspectOn_", smalltalk.method({ selector: "inspectOn:", category: '*IDE', fn: function (anInspector){ var self=this; var label=nil; smalltalk.send(self, "_inspectOn_", [anInspector], smalltalk.String.superclass || nil); ((($receiver = ((($receiver = smalltalk.send(smalltalk.send(self, "_printString", []), "_size", [])).klass === smalltalk.Number) ? $receiver >(30) : smalltalk.send($receiver, "__gt", [(30)]))).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (label=smalltalk.send(smalltalk.send(smalltalk.send(self, "_printString", []), "_copyFrom_to_", [(1), (30)]), "__comma", ["...'"]));})() : (function(){return (label=smalltalk.send(self, "_printString", []));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return (label=smalltalk.send(smalltalk.send(smalltalk.send(self, "_printString", []), "_copyFrom_to_", [(1), (30)]), "__comma", ["...'"]));}), (function(){return (label=smalltalk.send(self, "_printString", []));})])); smalltalk.send(anInspector, "_setLabel_", [label]); return self;}, 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", messageSends: ["inspectOn:", "ifTrue:ifFalse:", ">", "size", "printString", ",", "copyFrom:to:", "setLabel:"], referencedClasses: [] }), smalltalk.String); smalltalk.addMethod( "_inspectOn_", smalltalk.method({ selector: "inspectOn:", category: '*IDE', fn: function (anInspector){ var self=this; var variables=nil; (variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", [])); smalltalk.send(variables, "_at_put_", ["#self", self]); smalltalk.send(self['@elements'], "_withIndexDo_", [(function(each, i){return smalltalk.send(variables, "_at_put_", [i, each]);})]); (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector); return self;}, args: ["anInspector"], source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09elements withIndexDo: [:each :i |\x0a\x09\x09variables at: i put: each].\x0a\x09anInspector \x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables", messageSends: ["new", "at:put:", "withIndexDo:", "setLabel:", "printString", "setVariables:"], referencedClasses: ["Dictionary"] }), smalltalk.Set); smalltalk.addMethod( "_inspectOn_", smalltalk.method({ selector: "inspectOn:", category: '*IDE', fn: function (anInspector){ var self=this; var variables=nil; (variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", [])); smalltalk.send(variables, "_at_put_", ["#self", self]); smalltalk.send(variables, "_at_put_", ["#year", smalltalk.send(self, "_year", [])]); smalltalk.send(variables, "_at_put_", ["#month", smalltalk.send(self, "_month", [])]); smalltalk.send(variables, "_at_put_", ["#day", smalltalk.send(self, "_day", [])]); smalltalk.send(variables, "_at_put_", ["#hours", smalltalk.send(self, "_hours", [])]); smalltalk.send(variables, "_at_put_", ["#minutes", smalltalk.send(self, "_minutes", [])]); smalltalk.send(variables, "_at_put_", ["#seconds", smalltalk.send(self, "_seconds", [])]); smalltalk.send(variables, "_at_put_", ["#milliseconds", smalltalk.send(self, "_milliseconds", [])]); (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector); return self;}, 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", messageSends: ["new", "at:put:", "year", "month", "day", "hours", "minutes", "seconds", "milliseconds", "setLabel:", "printString", "setVariables:"], referencedClasses: ["Dictionary"] }), smalltalk.Date); smalltalk.addMethod( "_inspectOn_", smalltalk.method({ selector: "inspectOn:", category: '*IDE', fn: function (anInspector){ var self=this; var variables=nil; (variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", [])); smalltalk.send(variables, "_at_put_", ["#self", self]); smalltalk.send(variables, "_at_put_", ["#year", smalltalk.send(self, "_year", [])]); smalltalk.send(variables, "_at_put_", ["#month", smalltalk.send(self, "_month", [])]); smalltalk.send(variables, "_at_put_", ["#day", smalltalk.send(self, "_day", [])]); smalltalk.send(variables, "_at_put_", ["#hours", smalltalk.send(self, "_hours", [])]); smalltalk.send(variables, "_at_put_", ["#minutes", smalltalk.send(self, "_minutes", [])]); smalltalk.send(variables, "_at_put_", ["#seconds", smalltalk.send(self, "_seconds", [])]); smalltalk.send(variables, "_at_put_", ["#milliseconds", smalltalk.send(self, "_milliseconds", [])]); (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector); return self;}, 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", messageSends: ["new", "at:put:", "year", "month", "day", "hours", "minutes", "seconds", "milliseconds", "setLabel:", "printString", "setVariables:"], referencedClasses: ["Dictionary"] }), smalltalk.Date); smalltalk.addMethod( "_inspectOn_", smalltalk.method({ selector: "inspectOn:", category: '*IDE', fn: function (anInspector){ var self=this; var variables=nil; (variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", [])); smalltalk.send(variables, "_at_put_", ["#self", self]); smalltalk.send(variables, "_at_put_", ["#home", smalltalk.send(self, "_home", [])]); smalltalk.send(variables, "_at_put_", ["#receiver", smalltalk.send(self, "_receiver", [])]); smalltalk.send(variables, "_at_put_", ["#selector", smalltalk.send(self, "_selector", [])]); smalltalk.send(variables, "_at_put_", ["#temps", smalltalk.send(self, "_temps", [])]); smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_instanceVariableNames", []), "_do_", [(function(each){return smalltalk.send(variables, "_at_put_", [each, smalltalk.send(self, "_instVarAt_", [each])]);})]); (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector); return self;}, 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: '#temps' put: self temps.\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", messageSends: ["new", "at:put:", "home", "receiver", "selector", "temps", "do:", "instanceVariableNames", "class", "instVarAt:", "setLabel:", "printString", "setVariables:"], referencedClasses: ["Dictionary"] }), smalltalk.MethodContext);