IDE.deploy.js 174 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566
  1. smalltalk.addPackage('IDE', {});
  2. smalltalk.addClass('ClassesList', smalltalk.Widget, ['browser', 'ul', 'nodes'], 'IDE');
  3. smalltalk.addMethod(
  4. "_browser",
  5. smalltalk.method({
  6. selector: "browser",
  7. fn: function () {
  8. var self=this;
  9. return self['@browser'];
  10. return self;}
  11. }),
  12. smalltalk.ClassesList);
  13. smalltalk.addMethod(
  14. "_browser_",
  15. smalltalk.method({
  16. selector: "browser:",
  17. fn: function (aBrowser) {
  18. var self=this;
  19. (self['@browser']=aBrowser);
  20. return self;}
  21. }),
  22. smalltalk.ClassesList);
  23. smalltalk.addMethod(
  24. "_category",
  25. smalltalk.method({
  26. selector: "category",
  27. fn: function () {
  28. var self=this;
  29. return smalltalk.send(smalltalk.send(self, "_browser", []), "_selectedPackage", []);
  30. return self;}
  31. }),
  32. smalltalk.ClassesList);
  33. smalltalk.addMethod(
  34. "_getNodes",
  35. smalltalk.method({
  36. selector: "getNodes",
  37. fn: function () {
  38. var self=this;
  39. var classes=nil;
  40. var children=nil;
  41. var others=nil;
  42. (classes=smalltalk.send(smalltalk.send(self, "_browser", []), "_classes", []));
  43. (children=[]);
  44. (others=[]);
  45. 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]);})]));})]);
  46. return smalltalk.send(children, "_collect_", [(function(each){return smalltalk.send((smalltalk.ClassesListNode || ClassesListNode), "_on_browser_classes_level_", [each, smalltalk.send(self, "_browser", []), others, (0)]);})]);
  47. return self;}
  48. }),
  49. smalltalk.ClassesList);
  50. smalltalk.addMethod(
  51. "_nodes",
  52. smalltalk.method({
  53. selector: "nodes",
  54. fn: function () {
  55. var self=this;
  56. (($receiver = self['@nodes']) == nil || $receiver == undefined) ? (function(){return (self['@nodes']=smalltalk.send(self, "_getNodes", []));})() : $receiver;
  57. return self['@nodes'];
  58. return self;}
  59. }),
  60. smalltalk.ClassesList);
  61. smalltalk.addMethod(
  62. "_renderOn_",
  63. smalltalk.method({
  64. selector: "renderOn:",
  65. fn: function (html) {
  66. var self=this;
  67. (self['@ul']=(function($rec){smalltalk.send($rec, "_class_", ["amber_column browser classes"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(html, "_ul", [])));
  68. smalltalk.send(self, "_updateNodes", []);
  69. return self;}
  70. }),
  71. smalltalk.ClassesList);
  72. smalltalk.addMethod(
  73. "_resetNodes",
  74. smalltalk.method({
  75. selector: "resetNodes",
  76. fn: function () {
  77. var self=this;
  78. (self['@nodes']=nil);
  79. return self;}
  80. }),
  81. smalltalk.ClassesList);
  82. smalltalk.addMethod(
  83. "_updateNodes",
  84. smalltalk.method({
  85. selector: "updateNodes",
  86. fn: function () {
  87. var self=this;
  88. smalltalk.send(self['@ul'], "_contents_", [(function(html){return smalltalk.send(smalltalk.send(self, "_nodes", []), "_do_", [(function(each){return smalltalk.send(each, "_renderOn_", [html]);})]);})]);
  89. return self;}
  90. }),
  91. smalltalk.ClassesList);
  92. smalltalk.addMethod(
  93. "_on_",
  94. smalltalk.method({
  95. selector: "on:",
  96. fn: function (aBrowser) {
  97. var self=this;
  98. return (function($rec){smalltalk.send($rec, "_browser_", [aBrowser]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  99. return self;}
  100. }),
  101. smalltalk.ClassesList.klass);
  102. smalltalk.addClass('ClassesListNode', smalltalk.Widget, ['browser', 'theClass', 'level', 'nodes'], 'IDE');
  103. smalltalk.addMethod(
  104. "_browser",
  105. smalltalk.method({
  106. selector: "browser",
  107. fn: function () {
  108. var self=this;
  109. return self['@browser'];
  110. return self;}
  111. }),
  112. smalltalk.ClassesListNode);
  113. smalltalk.addMethod(
  114. "_browser_",
  115. smalltalk.method({
  116. selector: "browser:",
  117. fn: function (aBrowser) {
  118. var self=this;
  119. (self['@browser']=aBrowser);
  120. return self;}
  121. }),
  122. smalltalk.ClassesListNode);
  123. smalltalk.addMethod(
  124. "_getNodesFrom_",
  125. smalltalk.method({
  126. selector: "getNodesFrom:",
  127. fn: function (aCollection) {
  128. var self=this;
  129. var children=nil;
  130. var others=nil;
  131. (children=[]);
  132. (others=[]);
  133. 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]);})]));})]);
  134. (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)]))]);})]));
  135. return self;}
  136. }),
  137. smalltalk.ClassesListNode);
  138. smalltalk.addMethod(
  139. "_label",
  140. smalltalk.method({
  141. selector: "label",
  142. fn: function () {
  143. var self=this;
  144. var str=nil;
  145. (str=smalltalk.send(smalltalk.send((smalltalk.String || String), "_new", []), "_writeStream", []));
  146. smalltalk.send(smalltalk.send(self, "_level", []), "_timesRepeat_", [(function(){return smalltalk.send(str, "_nextPutAll_", ["    "]);})]);
  147. smalltalk.send(str, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_theClass", []), "_name", [])]);
  148. return smalltalk.send(str, "_contents", []);
  149. return self;}
  150. }),
  151. smalltalk.ClassesListNode);
  152. smalltalk.addMethod(
  153. "_level",
  154. smalltalk.method({
  155. selector: "level",
  156. fn: function () {
  157. var self=this;
  158. return self['@level'];
  159. return self;}
  160. }),
  161. smalltalk.ClassesListNode);
  162. smalltalk.addMethod(
  163. "_level_",
  164. smalltalk.method({
  165. selector: "level:",
  166. fn: function (anInteger) {
  167. var self=this;
  168. (self['@level']=anInteger);
  169. return self;}
  170. }),
  171. smalltalk.ClassesListNode);
  172. smalltalk.addMethod(
  173. "_nodes",
  174. smalltalk.method({
  175. selector: "nodes",
  176. fn: function () {
  177. var self=this;
  178. return self['@nodes'];
  179. return self;}
  180. }),
  181. smalltalk.ClassesListNode);
  182. smalltalk.addMethod(
  183. "_renderOn_",
  184. smalltalk.method({
  185. selector: "renderOn:",
  186. fn: function (html) {
  187. var self=this;
  188. var li=nil;
  189. var cssClass=nil;
  190. (cssClass="");
  191. (li=smalltalk.send(smalltalk.send(html, "_li", []), "_onClick_", [(function(){return smalltalk.send(smalltalk.send(self, "_browser", []), "_selectClass_", [smalltalk.send(self, "_theClass", [])]);})]));
  192. smalltalk.send(smalltalk.send(li, "_asJQuery", []), "_html_", [smalltalk.send(self, "_label", [])]);
  193. ((($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"]));})]));
  194. ((($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"]));})]));
  195. smalltalk.send(li, "_class_", [cssClass]);
  196. smalltalk.send(smalltalk.send(self, "_nodes", []), "_do_", [(function(each){return smalltalk.send(each, "_renderOn_", [html]);})]);
  197. return self;}
  198. }),
  199. smalltalk.ClassesListNode);
  200. smalltalk.addMethod(
  201. "_theClass",
  202. smalltalk.method({
  203. selector: "theClass",
  204. fn: function () {
  205. var self=this;
  206. return self['@theClass'];
  207. return self;}
  208. }),
  209. smalltalk.ClassesListNode);
  210. smalltalk.addMethod(
  211. "_theClass_",
  212. smalltalk.method({
  213. selector: "theClass:",
  214. fn: function (aClass) {
  215. var self=this;
  216. (self['@theClass']=aClass);
  217. return self;}
  218. }),
  219. smalltalk.ClassesListNode);
  220. smalltalk.addMethod(
  221. "_on_browser_classes_level_",
  222. smalltalk.method({
  223. selector: "on:browser:classes:level:",
  224. fn: function (aClass, aBrowser, aCollection, anInteger) {
  225. var self=this;
  226. 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", []));
  227. return self;}
  228. }),
  229. smalltalk.ClassesListNode.klass);
  230. smalltalk.addClass('DebugErrorHandler', smalltalk.ErrorHandler, [], 'IDE');
  231. smalltalk.addMethod(
  232. "_handleError_",
  233. smalltalk.method({
  234. selector: "handleError:",
  235. fn: function (anError) {
  236. var self=this;
  237. 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]);})]);
  238. return self;}
  239. }),
  240. smalltalk.DebugErrorHandler);
  241. smalltalk.addMethod(
  242. "_initialize",
  243. smalltalk.method({
  244. selector: "initialize",
  245. fn: function () {
  246. var self=this;
  247. smalltalk.send(self, "_register", []);
  248. return self;}
  249. }),
  250. smalltalk.DebugErrorHandler.klass);
  251. smalltalk.addClass('SourceArea', smalltalk.Widget, ['editor', 'div', 'receiver', 'onDoIt'], 'IDE');
  252. smalltalk.addMethod(
  253. "_clear",
  254. smalltalk.method({
  255. selector: "clear",
  256. fn: function () {
  257. var self=this;
  258. smalltalk.send(self, "_val_", [""]);
  259. return self;}
  260. }),
  261. smalltalk.SourceArea);
  262. smalltalk.addMethod(
  263. "_currentLine",
  264. smalltalk.method({
  265. selector: "currentLine",
  266. fn: function () {
  267. var self=this;
  268. return smalltalk.send(self['@editor'], "_getLine_", [smalltalk.send(smalltalk.send(self['@editor'], "_getCursor", []), "_line", [])]);
  269. return self;}
  270. }),
  271. smalltalk.SourceArea);
  272. smalltalk.addMethod(
  273. "_currentLineOrSelection",
  274. smalltalk.method({
  275. selector: "currentLineOrSelection",
  276. fn: function () {
  277. var self=this;
  278. 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", []);})]));
  279. return self;}
  280. }),
  281. smalltalk.SourceArea);
  282. smalltalk.addMethod(
  283. "_doIt",
  284. smalltalk.method({
  285. selector: "doIt",
  286. fn: function () {
  287. var self=this;
  288. var result=nil;
  289. (result=smalltalk.send(self, "_eval_", [smalltalk.send(self, "_currentLineOrSelection", [])]));
  290. (($receiver = smalltalk.send(self, "_onDoIt", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(smalltalk.send(self, "_onDoIt", []), "_value", []);})() : nil;
  291. return result;
  292. return self;}
  293. }),
  294. smalltalk.SourceArea);
  295. smalltalk.addMethod(
  296. "_editor",
  297. smalltalk.method({
  298. selector: "editor",
  299. fn: function () {
  300. var self=this;
  301. return self['@editor'];
  302. return self;}
  303. }),
  304. smalltalk.SourceArea);
  305. smalltalk.addMethod(
  306. "_eval_",
  307. smalltalk.method({
  308. selector: "eval:",
  309. fn: function (aString) {
  310. var self=this;
  311. var $early={};
  312. try{var compiler=nil;
  313. (compiler=smalltalk.send((smalltalk.Compiler || Compiler), "_new", []));
  314. 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", [])])]})();})]);
  315. 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", []), []]);
  316. return self;
  317. } catch(e) {if(e===$early)return e[0]; throw e}}
  318. }),
  319. smalltalk.SourceArea);
  320. smalltalk.addMethod(
  321. "_fileIn",
  322. smalltalk.method({
  323. selector: "fileIn",
  324. fn: function () {
  325. var self=this;
  326. smalltalk.send(smalltalk.send((smalltalk.Importer || Importer), "_new", []), "_import_", [smalltalk.send(smalltalk.send(self, "_currentLineOrSelection", []), "_readStream", [])]);
  327. return self;}
  328. }),
  329. smalltalk.SourceArea);
  330. smalltalk.addMethod(
  331. "_handleKeyDown_",
  332. smalltalk.method({
  333. selector: "handleKeyDown:",
  334. fn: function (anEvent) {
  335. var self=this;
  336. if(anEvent.ctrlKey) {
  337. if(anEvent.keyCode === 80) { //ctrl+p
  338. self._printIt();
  339. anEvent.preventDefault();
  340. return false;
  341. }
  342. if(anEvent.keyCode === 68) { //ctrl+d
  343. self._doIt();
  344. anEvent.preventDefault();
  345. return false;
  346. }
  347. if(anEvent.keyCode === 73) { //ctrl+i
  348. self._inspectIt();
  349. anEvent.preventDefault();
  350. return false;
  351. }
  352. };
  353. return self;}
  354. }),
  355. smalltalk.SourceArea);
  356. smalltalk.addMethod(
  357. "_inspectIt",
  358. smalltalk.method({
  359. selector: "inspectIt",
  360. fn: function () {
  361. var self=this;
  362. smalltalk.send(smalltalk.send(self, "_doIt", []), "_inspect", []);
  363. return self;}
  364. }),
  365. smalltalk.SourceArea);
  366. smalltalk.addMethod(
  367. "_onDoIt",
  368. smalltalk.method({
  369. selector: "onDoIt",
  370. fn: function () {
  371. var self=this;
  372. return self['@onDoIt'];
  373. return self;}
  374. }),
  375. smalltalk.SourceArea);
  376. smalltalk.addMethod(
  377. "_onDoIt_",
  378. smalltalk.method({
  379. selector: "onDoIt:",
  380. fn: function (aBlock) {
  381. var self=this;
  382. (self['@onDoIt']=aBlock);
  383. return self;}
  384. }),
  385. smalltalk.SourceArea);
  386. smalltalk.addMethod(
  387. "_onKeyDown_",
  388. smalltalk.method({
  389. selector: "onKeyDown:",
  390. fn: function (aBlock) {
  391. var self=this;
  392. smalltalk.send(self['@div'], "_onKeyDown_", [aBlock]);
  393. return self;}
  394. }),
  395. smalltalk.SourceArea);
  396. smalltalk.addMethod(
  397. "_onKeyUp_",
  398. smalltalk.method({
  399. selector: "onKeyUp:",
  400. fn: function (aBlock) {
  401. var self=this;
  402. smalltalk.send(self['@div'], "_onKeyUp_", [aBlock]);
  403. return self;}
  404. }),
  405. smalltalk.SourceArea);
  406. smalltalk.addMethod(
  407. "_print_",
  408. smalltalk.method({
  409. selector: "print:",
  410. fn: function (aString) {
  411. var self=this;
  412. var start=nil;
  413. var stop=nil;
  414. (start=smalltalk.send((smalltalk.HashedCollection || HashedCollection), "_new", []));
  415. (stop=smalltalk.send((smalltalk.HashedCollection || HashedCollection), "_new", []));
  416. smalltalk.send(start, "_at_put_", ["line", smalltalk.send(smalltalk.send(self['@editor'], "_getCursor_", [false]), "_line", [])]);
  417. smalltalk.send(start, "_at_put_", ["ch", smalltalk.send(smalltalk.send(self['@editor'], "_getCursor_", [false]), "_ch", [])]);
  418. smalltalk.send(stop, "_at_put_", ["line", smalltalk.send(start, "_at_", ["line"])]);
  419. 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)]))]);
  420. smalltalk.send(self['@editor'], "_replaceSelection_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self['@editor'], "_getSelection", []), "__comma", [" "]), "__comma", [aString]), "__comma", [" "])]);
  421. smalltalk.send(self['@editor'], "_setCursor_", [smalltalk.send(self['@editor'], "_getCursor_", [true])]);
  422. smalltalk.send(self['@editor'], "_setSelection_end_", [stop, start]);
  423. return self;}
  424. }),
  425. smalltalk.SourceArea);
  426. smalltalk.addMethod(
  427. "_printIt",
  428. smalltalk.method({
  429. selector: "printIt",
  430. fn: function () {
  431. var self=this;
  432. smalltalk.send(self, "_print_", [smalltalk.send(smalltalk.send(self, "_doIt", []), "_printString", [])]);
  433. return self;}
  434. }),
  435. smalltalk.SourceArea);
  436. smalltalk.addMethod(
  437. "_receiver",
  438. smalltalk.method({
  439. selector: "receiver",
  440. fn: function () {
  441. var self=this;
  442. return (($receiver = self['@receiver']) == nil || $receiver == undefined) ? (function(){return smalltalk.send((smalltalk.DoIt || DoIt), "_new", []);})() : $receiver;
  443. return self;}
  444. }),
  445. smalltalk.SourceArea);
  446. smalltalk.addMethod(
  447. "_receiver_",
  448. smalltalk.method({
  449. selector: "receiver:",
  450. fn: function (anObject) {
  451. var self=this;
  452. (self['@receiver']=anObject);
  453. return self;}
  454. }),
  455. smalltalk.SourceArea);
  456. smalltalk.addMethod(
  457. "_renderOn_",
  458. smalltalk.method({
  459. selector: "renderOn:",
  460. fn: function (html) {
  461. var self=this;
  462. var textarea=nil;
  463. (self['@div']=smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["source"]));
  464. smalltalk.send(self['@div'], "_with_", [(function(){return (textarea=smalltalk.send(html, "_textarea", []));})]);
  465. smalltalk.send(self, "_setEditorOn_", [smalltalk.send(textarea, "_element", [])]);
  466. smalltalk.send(self['@div'], "_onKeyDown_", [(function(e){return smalltalk.send(self, "_handleKeyDown_", [e]);})]);
  467. return self;}
  468. }),
  469. smalltalk.SourceArea);
  470. smalltalk.addMethod(
  471. "_selection",
  472. smalltalk.method({
  473. selector: "selection",
  474. fn: function () {
  475. var self=this;
  476. return smalltalk.send(self['@editor'], "_getSelection", []);
  477. return self;}
  478. }),
  479. smalltalk.SourceArea);
  480. smalltalk.addMethod(
  481. "_selectionEnd",
  482. smalltalk.method({
  483. selector: "selectionEnd",
  484. fn: function () {
  485. var self=this;
  486. return smalltalk.send(smalltalk.send((typeof textarea == 'undefined' ? nil : textarea), "_element", []), "_selectionEnd", []);
  487. return self;}
  488. }),
  489. smalltalk.SourceArea);
  490. smalltalk.addMethod(
  491. "_selectionEnd_",
  492. smalltalk.method({
  493. selector: "selectionEnd:",
  494. fn: function (anInteger) {
  495. var self=this;
  496. smalltalk.send(smalltalk.send((typeof textarea == 'undefined' ? nil : textarea), "_element", []), "_selectionEnd_", [anInteger]);
  497. return self;}
  498. }),
  499. smalltalk.SourceArea);
  500. smalltalk.addMethod(
  501. "_selectionStart",
  502. smalltalk.method({
  503. selector: "selectionStart",
  504. fn: function () {
  505. var self=this;
  506. return smalltalk.send(smalltalk.send((typeof textarea == 'undefined' ? nil : textarea), "_element", []), "_selectionStart", []);
  507. return self;}
  508. }),
  509. smalltalk.SourceArea);
  510. smalltalk.addMethod(
  511. "_selectionStart_",
  512. smalltalk.method({
  513. selector: "selectionStart:",
  514. fn: function (anInteger) {
  515. var self=this;
  516. smalltalk.send(smalltalk.send((typeof textarea == 'undefined' ? nil : textarea), "_element", []), "_selectionStart_", [anInteger]);
  517. return self;}
  518. }),
  519. smalltalk.SourceArea);
  520. smalltalk.addMethod(
  521. "_setEditorOn_",
  522. smalltalk.method({
  523. selector: "setEditorOn:",
  524. fn: function (aTextarea) {
  525. var self=this;
  526. self['@editor'] = CodeMirror.fromTextArea(aTextarea, {
  527. theme: 'amber',
  528. lineNumbers: true,
  529. enterMode: 'flat',
  530. matchBrackets: true,
  531. electricChars: false
  532. });
  533. return self;}
  534. }),
  535. smalltalk.SourceArea);
  536. smalltalk.addMethod(
  537. "_val",
  538. smalltalk.method({
  539. selector: "val",
  540. fn: function () {
  541. var self=this;
  542. return smalltalk.send(self['@editor'], "_getValue", []);
  543. return self;}
  544. }),
  545. smalltalk.SourceArea);
  546. smalltalk.addMethod(
  547. "_val_",
  548. smalltalk.method({
  549. selector: "val:",
  550. fn: function (aString) {
  551. var self=this;
  552. smalltalk.send(self['@editor'], "_setValue_", [aString]);
  553. return self;}
  554. }),
  555. smalltalk.SourceArea);
  556. smalltalk.addClass('TabManager', smalltalk.Widget, ['selectedTab', 'tabs', 'opened', 'ul', 'input'], 'IDE');
  557. smalltalk.addMethod(
  558. "_addTab_",
  559. smalltalk.method({
  560. selector: "addTab:",
  561. fn: function (aWidget) {
  562. var self=this;
  563. smalltalk.send(smalltalk.send(self, "_tabs", []), "_add_", [aWidget]);
  564. smalltalk.send(aWidget, "_appendToJQuery_", [smalltalk.send("#amber", "_asJQuery", [])]);
  565. smalltalk.send(aWidget, "_hide", []);
  566. return self;}
  567. }),
  568. smalltalk.TabManager);
  569. smalltalk.addMethod(
  570. "_close",
  571. smalltalk.method({
  572. selector: "close",
  573. fn: function () {
  574. var self=this;
  575. ((($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);})]));
  576. return self;}
  577. }),
  578. smalltalk.TabManager);
  579. smalltalk.addMethod(
  580. "_closeTab_",
  581. smalltalk.method({
  582. selector: "closeTab:",
  583. fn: function (aWidget) {
  584. var self=this;
  585. smalltalk.send(self, "_removeTab_", [aWidget]);
  586. smalltalk.send(self, "_selectTab_", [smalltalk.send(smalltalk.send(self, "_tabs", []), "_last", [])]);
  587. smalltalk.send(aWidget, "_remove", []);
  588. smalltalk.send(self, "_update", []);
  589. return self;}
  590. }),
  591. smalltalk.TabManager);
  592. smalltalk.addMethod(
  593. "_initialize",
  594. smalltalk.method({
  595. selector: "initialize",
  596. fn: function () {
  597. var self=this;
  598. smalltalk.send(self, "_initialize", [], smalltalk.TabManager.superclass || nil);
  599. (self['@opened']=true);
  600. smalltalk.send((function(html){return smalltalk.send(smalltalk.send(html, "_div", []), "_id_", ["amber"]);}), "_appendToJQuery_", [smalltalk.send("body", "_asJQuery", [])]);
  601. smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_addClass_", ["amberBody"]);
  602. smalltalk.send(self, "_appendToJQuery_", [smalltalk.send("#amber", "_asJQuery", [])]);
  603. (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);
  604. smalltalk.send(self, "_selectTab_", [smalltalk.send(smalltalk.send(self, "_tabs", []), "_last", [])]);
  605. (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);
  606. return self;}
  607. }),
  608. smalltalk.TabManager);
  609. smalltalk.addMethod(
  610. "_labelFor_",
  611. smalltalk.method({
  612. selector: "labelFor:",
  613. fn: function (aWidget) {
  614. var self=this;
  615. var label=nil;
  616. var maxSize=nil;
  617. (maxSize=(15));
  618. (label=smalltalk.send(smalltalk.send(aWidget, "_label", []), "_copyFrom_to_", [(0), smalltalk.send(smalltalk.send(smalltalk.send(aWidget, "_label", []), "_size", []), "_min_", [maxSize])]));
  619. ((($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", ["..."]));})]));
  620. return label;
  621. return self;}
  622. }),
  623. smalltalk.TabManager);
  624. smalltalk.addMethod(
  625. "_newBrowserTab",
  626. smalltalk.method({
  627. selector: "newBrowserTab",
  628. fn: function () {
  629. var self=this;
  630. smalltalk.send((smalltalk.Browser || Browser), "_open", []);
  631. return self;}
  632. }),
  633. smalltalk.TabManager);
  634. smalltalk.addMethod(
  635. "_onResize_",
  636. smalltalk.method({
  637. selector: "onResize:",
  638. fn: function (aBlock) {
  639. var self=this;
  640. jQuery('#amber').resizable({
  641. handles: 'n',
  642. resize: aBlock,
  643. minHeight: 230
  644. });
  645. return self;}
  646. }),
  647. smalltalk.TabManager);
  648. smalltalk.addMethod(
  649. "_onWindowResize_",
  650. smalltalk.method({
  651. selector: "onWindowResize:",
  652. fn: function (aBlock) {
  653. var self=this;
  654. jQuery(window).resize(aBlock);
  655. return self;}
  656. }),
  657. smalltalk.TabManager);
  658. smalltalk.addMethod(
  659. "_open",
  660. smalltalk.method({
  661. selector: "open",
  662. fn: function () {
  663. var self=this;
  664. ((($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);})]));
  665. return self;}
  666. }),
  667. smalltalk.TabManager);
  668. smalltalk.addMethod(
  669. "_removeBodyMargin",
  670. smalltalk.method({
  671. selector: "removeBodyMargin",
  672. fn: function () {
  673. var self=this;
  674. smalltalk.send(self, "_setBodyMargin_", [(0)]);
  675. return self;}
  676. }),
  677. smalltalk.TabManager);
  678. smalltalk.addMethod(
  679. "_removeTab_",
  680. smalltalk.method({
  681. selector: "removeTab:",
  682. fn: function (aWidget) {
  683. var self=this;
  684. smalltalk.send(smalltalk.send(self, "_tabs", []), "_remove_", [aWidget]);
  685. smalltalk.send(self, "_update", []);
  686. return self;}
  687. }),
  688. smalltalk.TabManager);
  689. smalltalk.addMethod(
  690. "_renderOn_",
  691. smalltalk.method({
  692. selector: "renderOn:",
  693. fn: function (html) {
  694. var self=this;
  695. smalltalk.send(smalltalk.send(html, "_div", []), "_id_", ["logo"]);
  696. smalltalk.send(self, "_renderToolbarOn_", [html]);
  697. (self['@ul']=(function($rec){smalltalk.send($rec, "_id_", ["amberTabs"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(html, "_ul", [])));
  698. smalltalk.send(self, "_renderTabs", []);
  699. return self;}
  700. }),
  701. smalltalk.TabManager);
  702. smalltalk.addMethod(
  703. "_renderTabFor_on_",
  704. smalltalk.method({
  705. selector: "renderTabFor:on:",
  706. fn: function (aWidget, html) {
  707. var self=this;
  708. var li=nil;
  709. (li=smalltalk.send(html, "_li", []));
  710. ((($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"]);})]));
  711. (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);
  712. return self;}
  713. }),
  714. smalltalk.TabManager);
  715. smalltalk.addMethod(
  716. "_renderTabs",
  717. smalltalk.method({
  718. selector: "renderTabs",
  719. fn: function () {
  720. var self=this;
  721. 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", []));})]);
  722. return self;}
  723. }),
  724. smalltalk.TabManager);
  725. smalltalk.addMethod(
  726. "_renderToolbarOn_",
  727. smalltalk.method({
  728. selector: "renderToolbarOn:",
  729. fn: function (html) {
  730. var self=this;
  731. (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", []));
  732. return self;}
  733. }),
  734. smalltalk.TabManager);
  735. smalltalk.addMethod(
  736. "_search_",
  737. smalltalk.method({
  738. selector: "search:",
  739. fn: function (aString) {
  740. var self=this;
  741. var searchedClass=nil;
  742. (searchedClass=smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_at_", [aString]));
  743. ((($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]);})]));
  744. return self;}
  745. }),
  746. smalltalk.TabManager);
  747. smalltalk.addMethod(
  748. "_selectTab_",
  749. smalltalk.method({
  750. selector: "selectTab:",
  751. fn: function (aWidget) {
  752. var self=this;
  753. smalltalk.send(self, "_open", []);
  754. (self['@selectedTab']=aWidget);
  755. smalltalk.send(smalltalk.send(self, "_tabs", []), "_do_", [(function(each){return smalltalk.send(each, "_hide", []);})]);
  756. smalltalk.send(aWidget, "_show", []);
  757. smalltalk.send(self, "_update", []);
  758. return self;}
  759. }),
  760. smalltalk.TabManager);
  761. smalltalk.addMethod(
  762. "_setBodyMargin_",
  763. smalltalk.method({
  764. selector: "setBodyMargin:",
  765. fn: function (anInteger) {
  766. var self=this;
  767. smalltalk.send(smalltalk.send(".amberBody", "_asJQuery", []), "_css_put_", ["margin-bottom", smalltalk.send(smalltalk.send(anInteger, "_asString", []), "__comma", ["px"])]);
  768. return self;}
  769. }),
  770. smalltalk.TabManager);
  771. smalltalk.addMethod(
  772. "_tabs",
  773. smalltalk.method({
  774. selector: "tabs",
  775. fn: function () {
  776. var self=this;
  777. return (($receiver = self['@tabs']) == nil || $receiver == undefined) ? (function(){return (self['@tabs']=smalltalk.send((smalltalk.Array || Array), "_new", []));})() : $receiver;
  778. return self;}
  779. }),
  780. smalltalk.TabManager);
  781. smalltalk.addMethod(
  782. "_update",
  783. smalltalk.method({
  784. selector: "update",
  785. fn: function () {
  786. var self=this;
  787. smalltalk.send(self, "_renderTabs", []);
  788. return self;}
  789. }),
  790. smalltalk.TabManager);
  791. smalltalk.addMethod(
  792. "_updateBodyMargin",
  793. smalltalk.method({
  794. selector: "updateBodyMargin",
  795. fn: function () {
  796. var self=this;
  797. smalltalk.send(self, "_setBodyMargin_", [smalltalk.send(smalltalk.send("#amber", "_asJQuery", []), "_height", [])]);
  798. return self;}
  799. }),
  800. smalltalk.TabManager);
  801. smalltalk.addMethod(
  802. "_updatePosition",
  803. smalltalk.method({
  804. selector: "updatePosition",
  805. fn: function () {
  806. var self=this;
  807. jQuery('#amber').css('top', '').css('bottom', '0px');
  808. return self;}
  809. }),
  810. smalltalk.TabManager);
  811. smalltalk.TabManager.klass.iVarNames = ['current'];
  812. smalltalk.addMethod(
  813. "_current",
  814. smalltalk.method({
  815. selector: "current",
  816. fn: function () {
  817. var self=this;
  818. return (($receiver = self['@current']) == nil || $receiver == undefined) ? (function(){return (self['@current']=smalltalk.send(self, "_new", [], smalltalk.TabManager.klass.superclass || nil));})() : $receiver;
  819. return self;}
  820. }),
  821. smalltalk.TabManager.klass);
  822. smalltalk.addMethod(
  823. "_new",
  824. smalltalk.method({
  825. selector: "new",
  826. fn: function () {
  827. var self=this;
  828. smalltalk.send(self, "_shouldNotImplement", []);
  829. return self;}
  830. }),
  831. smalltalk.TabManager.klass);
  832. smalltalk.addClass('TabWidget', smalltalk.Widget, ['div'], 'IDE');
  833. smalltalk.addMethod(
  834. "_canBeClosed",
  835. smalltalk.method({
  836. selector: "canBeClosed",
  837. fn: function () {
  838. var self=this;
  839. return false;
  840. return self;}
  841. }),
  842. smalltalk.TabWidget);
  843. smalltalk.addMethod(
  844. "_close",
  845. smalltalk.method({
  846. selector: "close",
  847. fn: function () {
  848. var self=this;
  849. smalltalk.send(smalltalk.send((smalltalk.TabManager || TabManager), "_current", []), "_closeTab_", [self]);
  850. return self;}
  851. }),
  852. smalltalk.TabWidget);
  853. smalltalk.addMethod(
  854. "_hide",
  855. smalltalk.method({
  856. selector: "hide",
  857. fn: function () {
  858. var self=this;
  859. smalltalk.send(smalltalk.send(self['@div'], "_asJQuery", []), "_hide", []);
  860. return self;}
  861. }),
  862. smalltalk.TabWidget);
  863. smalltalk.addMethod(
  864. "_label",
  865. smalltalk.method({
  866. selector: "label",
  867. fn: function () {
  868. var self=this;
  869. smalltalk.send(self, "_subclassResponsibility", []);
  870. return self;}
  871. }),
  872. smalltalk.TabWidget);
  873. smalltalk.addMethod(
  874. "_open",
  875. smalltalk.method({
  876. selector: "open",
  877. fn: function () {
  878. var self=this;
  879. smalltalk.send(smalltalk.send((smalltalk.TabManager || TabManager), "_current", []), "_addTab_", [self]);
  880. smalltalk.send(smalltalk.send((smalltalk.TabManager || TabManager), "_current", []), "_selectTab_", [self]);
  881. return self;}
  882. }),
  883. smalltalk.TabWidget);
  884. smalltalk.addMethod(
  885. "_remove",
  886. smalltalk.method({
  887. selector: "remove",
  888. fn: function () {
  889. var self=this;
  890. smalltalk.send(smalltalk.send(self['@div'], "_asJQuery", []), "_remove", []);
  891. return self;}
  892. }),
  893. smalltalk.TabWidget);
  894. smalltalk.addMethod(
  895. "_renderBoxOn_",
  896. smalltalk.method({
  897. selector: "renderBoxOn:",
  898. fn: function (html) {
  899. var self=this;
  900. return self;}
  901. }),
  902. smalltalk.TabWidget);
  903. smalltalk.addMethod(
  904. "_renderButtonsOn_",
  905. smalltalk.method({
  906. selector: "renderButtonsOn:",
  907. fn: function (html) {
  908. var self=this;
  909. return self;}
  910. }),
  911. smalltalk.TabWidget);
  912. smalltalk.addMethod(
  913. "_renderOn_",
  914. smalltalk.method({
  915. selector: "renderOn:",
  916. fn: function (html) {
  917. var self=this;
  918. (self['@div']=(function($rec){smalltalk.send($rec, "_class_", ["amberTool"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(html, "_div", [])));
  919. smalltalk.send(self, "_renderTab", []);
  920. return self;}
  921. }),
  922. smalltalk.TabWidget);
  923. smalltalk.addMethod(
  924. "_renderTab",
  925. smalltalk.method({
  926. selector: "renderTab",
  927. fn: function () {
  928. var self=this;
  929. 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", []));})]);
  930. return self;}
  931. }),
  932. smalltalk.TabWidget);
  933. smalltalk.addMethod(
  934. "_show",
  935. smalltalk.method({
  936. selector: "show",
  937. fn: function () {
  938. var self=this;
  939. smalltalk.send(smalltalk.send(self['@div'], "_asJQuery", []), "_show", []);
  940. return self;}
  941. }),
  942. smalltalk.TabWidget);
  943. smalltalk.addMethod(
  944. "_update",
  945. smalltalk.method({
  946. selector: "update",
  947. fn: function () {
  948. var self=this;
  949. smalltalk.send(self, "_renderTab", []);
  950. return self;}
  951. }),
  952. smalltalk.TabWidget);
  953. smalltalk.addMethod(
  954. "_open",
  955. smalltalk.method({
  956. selector: "open",
  957. fn: function () {
  958. var self=this;
  959. return smalltalk.send(smalltalk.send(self, "_new", []), "_open", []);
  960. return self;}
  961. }),
  962. smalltalk.TabWidget.klass);
  963. smalltalk.addClass('Browser', smalltalk.TabWidget, ['selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedMethod', 'packagesList', 'classesList', 'protocolsList', 'methodsList', 'sourceArea', 'tabsList', 'selectedTab', 'saveButton', 'classButtons', 'methodButtons', 'unsavedChanges'], 'IDE');
  964. smalltalk.addMethod(
  965. "_addInstanceVariableNamed_toClass_",
  966. smalltalk.method({
  967. selector: "addInstanceVariableNamed:toClass:",
  968. fn: function (aString, aClass) {
  969. var self=this;
  970. 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", [])]);
  971. return self;}
  972. }),
  973. smalltalk.Browser);
  974. smalltalk.addMethod(
  975. "_addNewClass",
  976. smalltalk.method({
  977. selector: "addNewClass",
  978. fn: function () {
  979. var self=this;
  980. var className=nil;
  981. (className=smalltalk.send((typeof window == 'undefined' ? nil : window), "_prompt_", ["New class"]));
  982. ((($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])]);})]));
  983. return self;}
  984. }),
  985. smalltalk.Browser);
  986. smalltalk.addMethod(
  987. "_addNewProtocol",
  988. smalltalk.method({
  989. selector: "addNewProtocol",
  990. fn: function () {
  991. var self=this;
  992. var newProtocol=nil;
  993. (newProtocol=smalltalk.send((typeof window == 'undefined' ? nil : window), "_prompt_", ["New method protocol"]));
  994. ((($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]);})]));
  995. return self;}
  996. }),
  997. smalltalk.Browser);
  998. smalltalk.addMethod(
  999. "_ajaxPutAt_data_",
  1000. smalltalk.method({
  1001. selector: "ajaxPutAt:data:",
  1002. fn: function (anURL, aString) {
  1003. var self=this;
  1004. 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])]);})])])]);
  1005. return self;}
  1006. }),
  1007. smalltalk.Browser);
  1008. smalltalk.addMethod(
  1009. "_canBeClosed",
  1010. smalltalk.method({
  1011. selector: "canBeClosed",
  1012. fn: function () {
  1013. var self=this;
  1014. return true;
  1015. return self;}
  1016. }),
  1017. smalltalk.Browser);
  1018. smalltalk.addMethod(
  1019. "_cancelChanges",
  1020. smalltalk.method({
  1021. selector: "cancelChanges",
  1022. fn: function () {
  1023. var self=this;
  1024. 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;})]));
  1025. return self;}
  1026. }),
  1027. smalltalk.Browser);
  1028. smalltalk.addMethod(
  1029. "_classCommentSource",
  1030. smalltalk.method({
  1031. selector: "classCommentSource",
  1032. fn: function () {
  1033. var self=this;
  1034. return smalltalk.send(self['@selectedClass'], "_comment", []);
  1035. return self;}
  1036. }),
  1037. smalltalk.Browser);
  1038. smalltalk.addMethod(
  1039. "_classDeclarationSource",
  1040. smalltalk.method({
  1041. selector: "classDeclarationSource",
  1042. fn: function () {
  1043. var self=this;
  1044. var $early={};
  1045. try{var stream=nil;
  1046. (stream=smalltalk.send("", "_writeStream", []));
  1047. (($receiver = self['@selectedClass']) == nil || $receiver == undefined) ? (function(){return (function(){throw $early=[smalltalk.send(self, "_classDeclarationTemplate", [])]})();})() : $receiver;
  1048. (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);
  1049. smalltalk.send(smalltalk.send(self['@selectedClass'], "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(stream, "_nextPutAll_", [each]);}), (function(){return smalltalk.send(stream, "_nextPutAll_", [" "]);})]);
  1050. (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);
  1051. return smalltalk.send(stream, "_contents", []);
  1052. return self;
  1053. } catch(e) {if(e===$early)return e[0]; throw e}}
  1054. }),
  1055. smalltalk.Browser);
  1056. smalltalk.addMethod(
  1057. "_classDeclarationTemplate",
  1058. smalltalk.method({
  1059. selector: "classDeclarationTemplate",
  1060. fn: function () {
  1061. var self=this;
  1062. return smalltalk.send(smalltalk.send("Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''\x0a\x09package: '", "__comma", [smalltalk.send(self, "_selectedPackage", [])]), "__comma", ["'"]);
  1063. return self;}
  1064. }),
  1065. smalltalk.Browser);
  1066. smalltalk.addMethod(
  1067. "_classes",
  1068. smalltalk.method({
  1069. selector: "classes",
  1070. fn: function () {
  1071. var self=this;
  1072. 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 <smalltalk.send(b, "_name", []) : smalltalk.send($receiver, "__lt", [smalltalk.send(b, "_name", [])]));})]), "_asSet", []);
  1073. return self;}
  1074. }),
  1075. smalltalk.Browser);
  1076. smalltalk.addMethod(
  1077. "_commitPackage",
  1078. smalltalk.method({
  1079. selector: "commitPackage",
  1080. fn: function () {
  1081. var self=this;
  1082. (($receiver = self['@selectedPackage']) != nil && $receiver != undefined) ? (function(){var package=nil;
  1083. (package=smalltalk.send((smalltalk.Package || Package), "_named_", [self['@selectedPackage']]));return smalltalk.send([smalltalk.send((smalltalk.Exporter || Exporter), "__minus_gt", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(package, "_commitPathJs", []), "__comma", ["/"]), "__comma", [self['@selectedPackage']]), "__comma", [".js"])]),smalltalk.send((smalltalk.StrippedExporter || StrippedExporter), "__minus_gt", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(package, "_commitPathJs", []), "__comma", ["/"]), "__comma", [self['@selectedPackage']]), "__comma", [".deploy.js"])]),smalltalk.send((smalltalk.ChunkExporter || ChunkExporter), "__minus_gt", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(package, "_commitPathSt", []), "__comma", ["/"]), "__comma", [self['@selectedPackage']]), "__comma", [".st"])])], "_do_", [(function(commitStrategy){var fileContents=nil;
  1084. (fileContents=smalltalk.send(smalltalk.send(smalltalk.send(commitStrategy, "_key", []), "_new", []), "_exportPackage_", [self['@selectedPackage']]));return smalltalk.send(self, "_ajaxPutAt_data_", [smalltalk.send(commitStrategy, "_value", []), fileContents]);})]);})() : nil;
  1085. return self;}
  1086. }),
  1087. smalltalk.Browser);
  1088. smalltalk.addMethod(
  1089. "_compile",
  1090. smalltalk.method({
  1091. selector: "compile",
  1092. fn: function (){
  1093. var self=this;
  1094. var currentEditLine=nil;
  1095. smalltalk.send(self, "_disableSaveButton", []);
  1096. (currentEditLine=smalltalk.send(smalltalk.send(self['@sourceArea'], "_editor", []), "_getCursor", []));
  1097. ((($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", []);})]));})]));
  1098. smalltalk.send(smalltalk.send(self['@sourceArea'], "_editor", []), "_setCursor_", [currentEditLine]);
  1099. return self;}
  1100. }),
  1101. smalltalk.Browser);
  1102. smalltalk.addMethod(
  1103. "_compileClassComment",
  1104. smalltalk.method({
  1105. selector: "compileClassComment",
  1106. fn: function () {
  1107. var self=this;
  1108. smalltalk.send(self['@selectedClass'], "_comment_", [smalltalk.send(self['@sourceArea'], "_val", [])]);
  1109. return self;}
  1110. }),
  1111. smalltalk.Browser);
  1112. smalltalk.addMethod(
  1113. "_compileDefinition",
  1114. smalltalk.method({
  1115. selector: "compileDefinition",
  1116. fn: function () {
  1117. var self=this;
  1118. var newClass=nil;
  1119. (newClass=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_evaluateExpression_", [smalltalk.send(self['@sourceArea'], "_val", [])]));
  1120. (function($rec){smalltalk.send($rec, "_resetClassesList", []);smalltalk.send($rec, "_updateCategoriesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self);
  1121. smalltalk.send(self, "_selectClass_", [newClass]);
  1122. return self;}
  1123. }),
  1124. smalltalk.Browser);
  1125. smalltalk.addMethod(
  1126. "_compileMethodDefinition",
  1127. smalltalk.method({
  1128. selector: "compileMethodDefinition",
  1129. fn: function () {
  1130. var self=this;
  1131. ((($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", [])]);})]));
  1132. return self;}
  1133. }),
  1134. smalltalk.Browser);
  1135. smalltalk.addMethod(
  1136. "_compileMethodDefinitionFor_",
  1137. smalltalk.method({
  1138. selector: "compileMethodDefinitionFor:",
  1139. fn: function (aClass) {
  1140. var self=this;
  1141. var $early={};
  1142. try{var compiler=nil;
  1143. var method=nil;
  1144. var source=nil;
  1145. var node=nil;
  1146. (source=smalltalk.send(self['@sourceArea'], "_val", []));
  1147. (($receiver = self['@selectedProtocol']) == nil || $receiver == undefined) ? (function(){return (self['@selectedProtocol']=smalltalk.send(self['@selectedMethod'], "_category", []));})() : $receiver;
  1148. (compiler=smalltalk.send((smalltalk.Compiler || Compiler), "_new", []));
  1149. smalltalk.send(compiler, "_source_", [source]);
  1150. (node=smalltalk.send(compiler, "_parse_", [source]));
  1151. ((($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", [])])])]})();})]));
  1152. smalltalk.send(compiler, "_currentClass_", [aClass]);
  1153. (method=smalltalk.send(compiler, "_eval_", [smalltalk.send(compiler, "_compileNode_", [node])]));
  1154. smalltalk.send(method, "_category_", [self['@selectedProtocol']]);
  1155. 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;})]);
  1156. smalltalk.send(aClass, "_addCompiledMethod_", [method]);
  1157. smalltalk.send(compiler, "_setupClass_", [aClass]);
  1158. smalltalk.send(self, "_updateMethodsList", []);
  1159. smalltalk.send(self, "_selectMethod_", [method]);
  1160. return self;
  1161. } catch(e) {if(e===$early)return e[0]; throw e}}
  1162. }),
  1163. smalltalk.Browser);
  1164. smalltalk.addMethod(
  1165. "_copyClass",
  1166. smalltalk.method({
  1167. selector: "copyClass",
  1168. fn: function () {
  1169. var self=this;
  1170. var className=nil;
  1171. (className=smalltalk.send((typeof window == 'undefined' ? nil : window), "_prompt_", ["Copy class"]));
  1172. ((($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])]);})]));
  1173. return self;}
  1174. }),
  1175. smalltalk.Browser);
  1176. smalltalk.addMethod(
  1177. "_declarationSource",
  1178. smalltalk.method({
  1179. selector: "declarationSource",
  1180. fn: function () {
  1181. var self=this;
  1182. 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", []);})]));
  1183. return self;}
  1184. }),
  1185. smalltalk.Browser);
  1186. smalltalk.addMethod(
  1187. "_disableSaveButton",
  1188. smalltalk.method({
  1189. selector: "disableSaveButton",
  1190. fn: function () {
  1191. var self=this;
  1192. (($receiver = self['@saveButton']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self['@saveButton'], "_at_put_", ["disabled", true]);})() : nil;
  1193. (self['@unsavedChanges']=false);
  1194. return self;}
  1195. }),
  1196. smalltalk.Browser);
  1197. smalltalk.addMethod(
  1198. "_dummyMethodSource",
  1199. smalltalk.method({
  1200. selector: "dummyMethodSource",
  1201. fn: function () {
  1202. var self=this;
  1203. return "messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements";
  1204. return self;}
  1205. }),
  1206. smalltalk.Browser);
  1207. smalltalk.addMethod(
  1208. "_handleSourceAreaKeyDown_",
  1209. smalltalk.method({
  1210. selector: "handleSourceAreaKeyDown:",
  1211. fn: function (anEvent) {
  1212. var self=this;
  1213. if(anEvent.ctrlKey) {
  1214. if(anEvent.keyCode === 83) { //ctrl+s
  1215. self._compile();
  1216. anEvent.preventDefault();
  1217. return false;
  1218. }
  1219. }
  1220. ;
  1221. return self;}
  1222. }),
  1223. smalltalk.Browser);
  1224. smalltalk.addMethod(
  1225. "_hideClassButtons",
  1226. smalltalk.method({
  1227. selector: "hideClassButtons",
  1228. fn: function () {
  1229. var self=this;
  1230. smalltalk.send(smalltalk.send(self['@classButtons'], "_asJQuery", []), "_hide", []);
  1231. return self;}
  1232. }),
  1233. smalltalk.Browser);
  1234. smalltalk.addMethod(
  1235. "_hideMethodButtons",
  1236. smalltalk.method({
  1237. selector: "hideMethodButtons",
  1238. fn: function () {
  1239. var self=this;
  1240. smalltalk.send(smalltalk.send(self['@methodButtons'], "_asJQuery", []), "_hide", []);
  1241. return self;}
  1242. }),
  1243. smalltalk.Browser);
  1244. smalltalk.addMethod(
  1245. "_initialize",
  1246. smalltalk.method({
  1247. selector: "initialize",
  1248. fn: function () {
  1249. var self=this;
  1250. smalltalk.send(self, "_initialize", [], smalltalk.Browser.superclass || nil);
  1251. (self['@selectedTab']=smalltalk.symbolFor("instance"));
  1252. (self['@selectedPackage']=smalltalk.send(smalltalk.send(self, "_packages", []), "_first", []));
  1253. (self['@unsavedChanges']=false);
  1254. return self;}
  1255. }),
  1256. smalltalk.Browser);
  1257. smalltalk.addMethod(
  1258. "_label",
  1259. smalltalk.method({
  1260. selector: "label",
  1261. fn: function () {
  1262. var self=this;
  1263. return (($receiver = self['@selectedClass']) == nil || $receiver == undefined) ? (function(){return "Browser (nil)";})() : (function(){return smalltalk.send("Browser: ", "__comma", [smalltalk.send(self['@selectedClass'], "_name", [])]);})();
  1264. return self;}
  1265. }),
  1266. smalltalk.Browser);
  1267. smalltalk.addMethod(
  1268. "_metaclassDeclarationSource",
  1269. smalltalk.method({
  1270. selector: "metaclassDeclarationSource",
  1271. fn: function () {
  1272. var self=this;
  1273. var stream=nil;
  1274. (stream=smalltalk.send("", "_writeStream", []));
  1275. (($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;
  1276. return smalltalk.send(stream, "_contents", []);
  1277. return self;}
  1278. }),
  1279. smalltalk.Browser);
  1280. smalltalk.addMethod(
  1281. "_methodSource",
  1282. smalltalk.method({
  1283. selector: "methodSource",
  1284. fn: function () {
  1285. var self=this;
  1286. return (($receiver = self['@selectedMethod']) == nil || $receiver == undefined) ? (function(){return smalltalk.send(self, "_dummyMethodSource", []);})() : (function(){return smalltalk.send(self['@selectedMethod'], "_source", []);})();
  1287. return self;}
  1288. }),
  1289. smalltalk.Browser);
  1290. smalltalk.addMethod(
  1291. "_methods",
  1292. smalltalk.method({
  1293. selector: "methods",
  1294. fn: function () {
  1295. var self=this;
  1296. var $early={};
  1297. try{var klass=nil;
  1298. ((($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=[[]]})();})]));
  1299. (($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;
  1300. 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 <smalltalk.send(b, "_selector", []) : smalltalk.send($receiver, "__lt", [smalltalk.send(b, "_selector", [])]));})]);
  1301. return self;
  1302. } catch(e) {if(e===$early)return e[0]; throw e}}
  1303. }),
  1304. smalltalk.Browser);
  1305. smalltalk.addMethod(
  1306. "_packages",
  1307. smalltalk.method({
  1308. selector: "packages",
  1309. fn: function () {
  1310. var self=this;
  1311. var packages=nil;
  1312. (packages=smalltalk.send((smalltalk.Array || Array), "_new", []));
  1313. smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_classes", []), "_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", [])]);})]));})]);
  1314. return smalltalk.send(packages, "_sort", []);
  1315. return self;}
  1316. }),
  1317. smalltalk.Browser);
  1318. smalltalk.addMethod(
  1319. "_protocols",
  1320. smalltalk.method({
  1321. selector: "protocols",
  1322. fn: function () {
  1323. var self=this;
  1324. var $early={};
  1325. try{var klass=nil;
  1326. (($receiver = self['@selectedClass']) != nil && $receiver != undefined) ? (function(){((($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=[[]]})();})]));(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", []);})])));((($receiver = smalltalk.send(smalltalk.send(klass, "_methodDictionary", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){throw $early=[smalltalk.send((smalltalk.Array || Array), "_with_", ["not yet classified"])]})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function(){throw $early=[smalltalk.send((smalltalk.Array || Array), "_with_", ["not yet classified"])]})();})]));return (function(){throw $early=[smalltalk.send(klass, "_protocols", [])]})();})() : nil;
  1327. return smalltalk.send((smalltalk.Array || Array), "_new", []);
  1328. return self;
  1329. } catch(e) {if(e===$early)return e[0]; throw e}}
  1330. }),
  1331. smalltalk.Browser);
  1332. smalltalk.addMethod(
  1333. "_removeClass",
  1334. smalltalk.method({
  1335. selector: "removeClass",
  1336. fn: function () {
  1337. var self=this;
  1338. ((($receiver = smalltalk.send((typeof window == 'undefined' ? nil : window), "_confirm_", [smalltalk.send(smalltalk.send("Do you really want to remove ", "__comma", [smalltalk.send(self['@selectedClass'], "_name", [])]), "__comma", ["?"])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_removeClass_", [self['@selectedClass']]);smalltalk.send(self, "_resetClassesList", []);return smalltalk.send(self, "_selectClass_", [nil]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_removeClass_", [self['@selectedClass']]);smalltalk.send(self, "_resetClassesList", []);return smalltalk.send(self, "_selectClass_", [nil]);})]));
  1339. return self;}
  1340. }),
  1341. smalltalk.Browser);
  1342. smalltalk.addMethod(
  1343. "_removeMethod",
  1344. smalltalk.method({
  1345. selector: "removeMethod",
  1346. fn: function () {
  1347. var self=this;
  1348. ((($receiver = smalltalk.send(self, "_cancelChanges", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send((typeof window == 'undefined' ? nil : window), "_confirm_", [smalltalk.send(smalltalk.send("Do you really want to remove #", "__comma", [smalltalk.send(self['@selectedMethod'], "_selector", [])]), "__comma", ["?"])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){((($receiver = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@selectedClass'], "_removeCompiledMethod_", [self['@selectedMethod']]);})() : (function(){return smalltalk.send(smalltalk.send(self['@selectedClass'], "_class", []), "_removeCompiledMethod_", [self['@selectedMethod']]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@selectedClass'], "_removeCompiledMethod_", [self['@selectedMethod']]);}), (function(){return smalltalk.send(smalltalk.send(self['@selectedClass'], "_class", []), "_removeCompiledMethod_", [self['@selectedMethod']]);})]));return smalltalk.send(self, "_selectMethod_", [nil]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){((($receiver = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@selectedClass'], "_removeCompiledMethod_", [self['@selectedMethod']]);})() : (function(){return smalltalk.send(smalltalk.send(self['@selectedClass'], "_class", []), "_removeCompiledMethod_", [self['@selectedMethod']]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@selectedClass'], "_removeCompiledMethod_", [self['@selectedMethod']]);}), (function(){return smalltalk.send(smalltalk.send(self['@selectedClass'], "_class", []), "_removeCompiledMethod_", [self['@selectedMethod']]);})]));return smalltalk.send(self, "_selectMethod_", [nil]);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send((typeof window == 'undefined' ? nil : window), "_confirm_", [smalltalk.send(smalltalk.send("Do you really want to remove #", "__comma", [smalltalk.send(self['@selectedMethod'], "_selector", [])]), "__comma", ["?"])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){((($receiver = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@selectedClass'], "_removeCompiledMethod_", [self['@selectedMethod']]);})() : (function(){return smalltalk.send(smalltalk.send(self['@selectedClass'], "_class", []), "_removeCompiledMethod_", [self['@selectedMethod']]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@selectedClass'], "_removeCompiledMethod_", [self['@selectedMethod']]);}), (function(){return smalltalk.send(smalltalk.send(self['@selectedClass'], "_class", []), "_removeCompiledMethod_", [self['@selectedMethod']]);})]));return smalltalk.send(self, "_selectMethod_", [nil]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){((($receiver = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@selectedClass'], "_removeCompiledMethod_", [self['@selectedMethod']]);})() : (function(){return smalltalk.send(smalltalk.send(self['@selectedClass'], "_class", []), "_removeCompiledMethod_", [self['@selectedMethod']]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@selectedClass'], "_removeCompiledMethod_", [self['@selectedMethod']]);}), (function(){return smalltalk.send(smalltalk.send(self['@selectedClass'], "_class", []), "_removeCompiledMethod_", [self['@selectedMethod']]);})]));return smalltalk.send(self, "_selectMethod_", [nil]);})]));})]));
  1349. return self;}
  1350. }),
  1351. smalltalk.Browser);
  1352. smalltalk.addMethod(
  1353. "_removePackage",
  1354. smalltalk.method({
  1355. selector: "removePackage",
  1356. fn: function () {
  1357. var self=this;
  1358. ((($receiver = smalltalk.send((typeof window == 'undefined' ? nil : window), "_confirm_", [smalltalk.send(smalltalk.send("Do you really want to remove the whole package ", "__comma", [self['@selectedPackage']]), "__comma", [" with all its classes?"])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_removePackage_", [self['@selectedPackage']]);return smalltalk.send(self, "_updateCategoriesList", []);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_removePackage_", [self['@selectedPackage']]);return smalltalk.send(self, "_updateCategoriesList", []);})]));
  1359. return self;}
  1360. }),
  1361. smalltalk.Browser);
  1362. smalltalk.addMethod(
  1363. "_renameClass",
  1364. smalltalk.method({
  1365. selector: "renameClass",
  1366. fn: function () {
  1367. var self=this;
  1368. var newName=nil;
  1369. (newName=smalltalk.send((typeof window == 'undefined' ? nil : window), "_prompt_", [smalltalk.send("Rename class ", "__comma", [smalltalk.send(self['@selectedClass'], "_name", [])])]));
  1370. ((($receiver = smalltalk.send(smalltalk.send(newName, "_notNil", []), "_and_", [(function(){return smalltalk.send(newName, "_notEmpty", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self['@selectedClass'], "_rename_", [newName]);return (function($rec){smalltalk.send($rec, "_updateClassesList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(self['@selectedClass'], "_rename_", [newName]);return (function($rec){smalltalk.send($rec, "_updateClassesList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})]));
  1371. return self;}
  1372. }),
  1373. smalltalk.Browser);
  1374. smalltalk.addMethod(
  1375. "_renamePackage",
  1376. smalltalk.method({
  1377. selector: "renamePackage",
  1378. fn: function () {
  1379. var self=this;
  1380. var newName=nil;
  1381. (newName=smalltalk.send((typeof window == 'undefined' ? nil : window), "_prompt_", [smalltalk.send("Rename package ", "__comma", [self['@selectedPackage']])]));
  1382. (($receiver = newName) != nil && $receiver != undefined) ? (function(){return ((($receiver = smalltalk.send(newName, "_notEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_renamePackage_to_", [self['@selectedPackage'], newName]);return smalltalk.send(self, "_updateCategoriesList", []);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_renamePackage_to_", [self['@selectedPackage'], newName]);return smalltalk.send(self, "_updateCategoriesList", []);})]));})() : nil;
  1383. return self;}
  1384. }),
  1385. smalltalk.Browser);
  1386. smalltalk.addMethod(
  1387. "_renderBottomPanelOn_",
  1388. smalltalk.method({
  1389. selector: "renderBottomPanelOn:",
  1390. fn: function (html) {
  1391. var self=this;
  1392. (function($rec){smalltalk.send($rec, "_class_", ["amber_sourceCode"]);return smalltalk.send($rec, "_with_", [(function(){(self['@sourceArea']=smalltalk.send((smalltalk.SourceArea || SourceArea), "_new", []));smalltalk.send(self['@sourceArea'], "_renderOn_", [html]);smalltalk.send(self['@sourceArea'], "_onKeyDown_", [(function(e){return smalltalk.send(self, "_handleSourceAreaKeyDown_", [e]);})]);return smalltalk.send(self['@sourceArea'], "_onKeyUp_", [(function(){return smalltalk.send(self, "_updateStatus", []);})]);})]);})(smalltalk.send(html, "_div", []));
  1393. return self;}
  1394. }),
  1395. smalltalk.Browser);
  1396. smalltalk.addMethod(
  1397. "_renderBoxOn_",
  1398. smalltalk.method({
  1399. selector: "renderBoxOn:",
  1400. fn: function (html) {
  1401. var self=this;
  1402. (function($rec){smalltalk.send($rec, "_renderTopPanelOn_", [html]);smalltalk.send($rec, "_renderTabsOn_", [html]);return smalltalk.send($rec, "_renderBottomPanelOn_", [html]);})(self);
  1403. return self;}
  1404. }),
  1405. smalltalk.Browser);
  1406. smalltalk.addMethod(
  1407. "_renderButtonsOn_",
  1408. smalltalk.method({
  1409. selector: "renderButtonsOn:",
  1410. fn: function (html) {
  1411. var self=this;
  1412. (self['@saveButton']=smalltalk.send(html, "_button", []));
  1413. (function($rec){smalltalk.send($rec, "_with_", ["Save"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_compile", []);})]);})(self['@saveButton']);
  1414. (self['@methodButtons']=smalltalk.send(html, "_span", []));
  1415. (self['@classButtons']=smalltalk.send(html, "_span", []));
  1416. (function($rec){smalltalk.send($rec, "_class_", ["right"]);return smalltalk.send($rec, "_with_", [(function(){(function($rec){smalltalk.send($rec, "_with_", ["DoIt"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self['@sourceArea'], "_doIt", []);})]);})(smalltalk.send(html, "_button", []));(function($rec){smalltalk.send($rec, "_with_", ["PrintIt"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self['@sourceArea'], "_printIt", []);})]);})(smalltalk.send(html, "_button", []));return (function($rec){smalltalk.send($rec, "_with_", ["InspectIt"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self['@sourceArea'], "_inspectIt", []);})]);})(smalltalk.send(html, "_button", []));})]);})(smalltalk.send(html, "_div", []));
  1417. smalltalk.send(self, "_updateSourceAndButtons", []);
  1418. return self;}
  1419. }),
  1420. smalltalk.Browser);
  1421. smalltalk.addMethod(
  1422. "_renderTabsOn_",
  1423. smalltalk.method({
  1424. selector: "renderTabsOn:",
  1425. fn: function (html) {
  1426. var self=this;
  1427. (self['@tabsList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_tabs amber_browser"]));
  1428. smalltalk.send(self, "_updateTabsList", []);
  1429. return self;}
  1430. }),
  1431. smalltalk.Browser);
  1432. smalltalk.addMethod(
  1433. "_renderTopPanelOn_",
  1434. smalltalk.method({
  1435. selector: "renderTopPanelOn:",
  1436. fn: function (html) {
  1437. var self=this;
  1438. (function($rec){smalltalk.send($rec, "_class_", ["top"]);return smalltalk.send($rec, "_with_", [(function(){(self['@packagesList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column browser packages"]));(function($rec){smalltalk.send($rec, "_class_", ["amber_packagesButtons"]);return smalltalk.send($rec, "_with_", [(function(){(function($rec){smalltalk.send($rec, "_title_", ["Commit classes in this package to disk"]);smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_commitPackage", []);})]);return smalltalk.send($rec, "_with_", ["Commit"]);})(smalltalk.send(html, "_button", []));(function($rec){smalltalk.send($rec, "_title_", ["Rename package"]);smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_renamePackage", []);})]);return smalltalk.send($rec, "_with_", ["Rename"]);})(smalltalk.send(html, "_button", []));return (function($rec){smalltalk.send($rec, "_title_", ["Remove this package from the system"]);smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_removePackage", []);})]);return smalltalk.send($rec, "_with_", ["Remove"]);})(smalltalk.send(html, "_button", []));})]);})(smalltalk.send(html, "_div", []));(self['@classesList']=smalltalk.send((smalltalk.ClassesList || ClassesList), "_on_", [self]));smalltalk.send(self['@classesList'], "_renderOn_", [html]);(self['@protocolsList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column browser protocols"]));(self['@methodsList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column browser methods"]));(function($rec){smalltalk.send($rec, "_updateCategoriesList", []);smalltalk.send($rec, "_updateClassesList", []);smalltalk.send($rec, "_updateProtocolsList", []);return smalltalk.send($rec, "_updateMethodsList", []);})(self);return smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["amber_clear"]);})]);})(smalltalk.send(html, "_div", []));
  1439. return self;}
  1440. }),
  1441. smalltalk.Browser);
  1442. smalltalk.addMethod(
  1443. "_resetClassesList",
  1444. smalltalk.method({
  1445. selector: "resetClassesList",
  1446. fn: function () {
  1447. var self=this;
  1448. smalltalk.send(self['@classesList'], "_resetNodes", []);
  1449. return self;}
  1450. }),
  1451. smalltalk.Browser);
  1452. smalltalk.addMethod(
  1453. "_search_",
  1454. smalltalk.method({
  1455. selector: "search:",
  1456. fn: function (aString) {
  1457. var self=this;
  1458. ((($receiver = smalltalk.send(self, "_cancelChanges", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){var searchedClass=nil;
  1459. (searchedClass=smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_at_", [aString]));return ((($receiver = smalltalk.send(searchedClass, "_isClass", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_openOn_", [searchedClass]);})() : (function(){return smalltalk.send(self, "_searchReferencesOf_", [aString]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_openOn_", [searchedClass]);}), (function(){return smalltalk.send(self, "_searchReferencesOf_", [aString]);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){var searchedClass=nil;
  1460. (searchedClass=smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_at_", [aString]));return ((($receiver = smalltalk.send(searchedClass, "_isClass", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_openOn_", [searchedClass]);})() : (function(){return smalltalk.send(self, "_searchReferencesOf_", [aString]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_openOn_", [searchedClass]);}), (function(){return smalltalk.send(self, "_searchReferencesOf_", [aString]);})]));})]));
  1461. return self;}
  1462. }),
  1463. smalltalk.Browser);
  1464. smalltalk.addMethod(
  1465. "_searchClassReferences",
  1466. smalltalk.method({
  1467. selector: "searchClassReferences",
  1468. fn: function () {
  1469. var self=this;
  1470. smalltalk.send((smalltalk.ReferencesBrowser || ReferencesBrowser), "_search_", [smalltalk.send(self['@selectedClass'], "_name", [])]);
  1471. return self;}
  1472. }),
  1473. smalltalk.Browser);
  1474. smalltalk.addMethod(
  1475. "_searchReferencesOf_",
  1476. smalltalk.method({
  1477. selector: "searchReferencesOf:",
  1478. fn: function (aString) {
  1479. var self=this;
  1480. smalltalk.send((smalltalk.ReferencesBrowser || ReferencesBrowser), "_search_", [aString]);
  1481. return self;}
  1482. }),
  1483. smalltalk.Browser);
  1484. smalltalk.addMethod(
  1485. "_selectCategory_",
  1486. smalltalk.method({
  1487. selector: "selectCategory:",
  1488. fn: function (aCategory) {
  1489. var self=this;
  1490. ((($receiver = smalltalk.send(self, "_cancelChanges", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){(self['@selectedPackage']=aCategory);(self['@selectedClass']=(self['@selectedProtocol']=(self['@selectedMethod']=nil)));smalltalk.send(self, "_resetClassesList", []);return (function($rec){smalltalk.send($rec, "_updateCategoriesList", []);smalltalk.send($rec, "_updateClassesList", []);smalltalk.send($rec, "_updateProtocolsList", []);smalltalk.send($rec, "_updateMethodsList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){(self['@selectedPackage']=aCategory);(self['@selectedClass']=(self['@selectedProtocol']=(self['@selectedMethod']=nil)));smalltalk.send(self, "_resetClassesList", []);return (function($rec){smalltalk.send($rec, "_updateCategoriesList", []);smalltalk.send($rec, "_updateClassesList", []);smalltalk.send($rec, "_updateProtocolsList", []);smalltalk.send($rec, "_updateMethodsList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})]));
  1491. return self;}
  1492. }),
  1493. smalltalk.Browser);
  1494. smalltalk.addMethod(
  1495. "_selectClass_",
  1496. smalltalk.method({
  1497. selector: "selectClass:",
  1498. fn: function (aClass) {
  1499. var self=this;
  1500. ((($receiver = smalltalk.send(self, "_cancelChanges", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){(self['@selectedClass']=aClass);(self['@selectedProtocol']=(self['@selectedMethod']=nil));return (function($rec){smalltalk.send($rec, "_updateClassesList", []);smalltalk.send($rec, "_updateProtocolsList", []);smalltalk.send($rec, "_updateMethodsList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){(self['@selectedClass']=aClass);(self['@selectedProtocol']=(self['@selectedMethod']=nil));return (function($rec){smalltalk.send($rec, "_updateClassesList", []);smalltalk.send($rec, "_updateProtocolsList", []);smalltalk.send($rec, "_updateMethodsList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})]));
  1501. return self;}
  1502. }),
  1503. smalltalk.Browser);
  1504. smalltalk.addMethod(
  1505. "_selectMethod_",
  1506. smalltalk.method({
  1507. selector: "selectMethod:",
  1508. fn: function (aMethod) {
  1509. var self=this;
  1510. ((($receiver = smalltalk.send(self, "_cancelChanges", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){(self['@selectedMethod']=aMethod);return (function($rec){smalltalk.send($rec, "_updateProtocolsList", []);smalltalk.send($rec, "_updateMethodsList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){(self['@selectedMethod']=aMethod);return (function($rec){smalltalk.send($rec, "_updateProtocolsList", []);smalltalk.send($rec, "_updateMethodsList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})]));
  1511. return self;}
  1512. }),
  1513. smalltalk.Browser);
  1514. smalltalk.addMethod(
  1515. "_selectProtocol_",
  1516. smalltalk.method({
  1517. selector: "selectProtocol:",
  1518. fn: function (aString) {
  1519. var self=this;
  1520. ((($receiver = smalltalk.send(self, "_cancelChanges", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){(self['@selectedProtocol']=aString);(self['@selectedMethod']=nil);return (function($rec){smalltalk.send($rec, "_updateProtocolsList", []);smalltalk.send($rec, "_updateMethodsList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){(self['@selectedProtocol']=aString);(self['@selectedMethod']=nil);return (function($rec){smalltalk.send($rec, "_updateProtocolsList", []);smalltalk.send($rec, "_updateMethodsList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})]));
  1521. return self;}
  1522. }),
  1523. smalltalk.Browser);
  1524. smalltalk.addMethod(
  1525. "_selectTab_",
  1526. smalltalk.method({
  1527. selector: "selectTab:",
  1528. fn: function (aString) {
  1529. var self=this;
  1530. ((($receiver = smalltalk.send(self, "_cancelChanges", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){(self['@selectedTab']=aString);smalltalk.send(self, "_selectProtocol_", [nil]);return smalltalk.send(self, "_updateTabsList", []);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){(self['@selectedTab']=aString);smalltalk.send(self, "_selectProtocol_", [nil]);return smalltalk.send(self, "_updateTabsList", []);})]));
  1531. return self;}
  1532. }),
  1533. smalltalk.Browser);
  1534. smalltalk.addMethod(
  1535. "_selectedClass",
  1536. smalltalk.method({
  1537. selector: "selectedClass",
  1538. fn: function () {
  1539. var self=this;
  1540. return self['@selectedClass'];
  1541. return self;}
  1542. }),
  1543. smalltalk.Browser);
  1544. smalltalk.addMethod(
  1545. "_selectedPackage",
  1546. smalltalk.method({
  1547. selector: "selectedPackage",
  1548. fn: function () {
  1549. var self=this;
  1550. return self['@selectedPackage'];
  1551. return self;}
  1552. }),
  1553. smalltalk.Browser);
  1554. smalltalk.addMethod(
  1555. "_setMethodProtocol_",
  1556. smalltalk.method({
  1557. selector: "setMethodProtocol:",
  1558. fn: function (aString) {
  1559. var self=this;
  1560. ((($receiver = smalltalk.send(self, "_cancelChanges", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_protocols", []), "_includes_", [aString])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_addNewProtocol", []);})() : (function(){smalltalk.send(self['@selectedMethod'], "_category_", [aString]);(self['@selectedProtocol']=aString);(self['@selectedMethod']=self['@selectedMethod']);return (function($rec){smalltalk.send($rec, "_updateProtocolsList", []);smalltalk.send($rec, "_updateMethodsList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(self, "_addNewProtocol", []);}), (function(){smalltalk.send(self['@selectedMethod'], "_category_", [aString]);(self['@selectedProtocol']=aString);(self['@selectedMethod']=self['@selectedMethod']);return (function($rec){smalltalk.send($rec, "_updateProtocolsList", []);smalltalk.send($rec, "_updateMethodsList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_protocols", []), "_includes_", [aString])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_addNewProtocol", []);})() : (function(){smalltalk.send(self['@selectedMethod'], "_category_", [aString]);(self['@selectedProtocol']=aString);(self['@selectedMethod']=self['@selectedMethod']);return (function($rec){smalltalk.send($rec, "_updateProtocolsList", []);smalltalk.send($rec, "_updateMethodsList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(self, "_addNewProtocol", []);}), (function(){smalltalk.send(self['@selectedMethod'], "_category_", [aString]);(self['@selectedProtocol']=aString);(self['@selectedMethod']=self['@selectedMethod']);return (function($rec){smalltalk.send($rec, "_updateProtocolsList", []);smalltalk.send($rec, "_updateMethodsList", []);return smalltalk.send($rec, "_updateSourceAndButtons", []);})(self);})]));})]));
  1561. return self;}
  1562. }),
  1563. smalltalk.Browser);
  1564. smalltalk.addMethod(
  1565. "_showClassButtons",
  1566. smalltalk.method({
  1567. selector: "showClassButtons",
  1568. fn: function () {
  1569. var self=this;
  1570. smalltalk.send(smalltalk.send(self['@classButtons'], "_asJQuery", []), "_show", []);
  1571. return self;}
  1572. }),
  1573. smalltalk.Browser);
  1574. smalltalk.addMethod(
  1575. "_showMethodButtons",
  1576. smalltalk.method({
  1577. selector: "showMethodButtons",
  1578. fn: function () {
  1579. var self=this;
  1580. smalltalk.send(smalltalk.send(self['@methodButtons'], "_asJQuery", []), "_show", []);
  1581. return self;}
  1582. }),
  1583. smalltalk.Browser);
  1584. smalltalk.addMethod(
  1585. "_source",
  1586. smalltalk.method({
  1587. selector: "source",
  1588. fn: function () {
  1589. var self=this;
  1590. var $early={};
  1591. try{((($receiver = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("comment")])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw $early=[((($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, "_declarationSource", []);})() : (function(){return smalltalk.send(self, "_methodSource", []);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(self, "_declarationSource", []);}), (function(){return smalltalk.send(self, "_methodSource", []);})]))]})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw $early=[((($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, "_declarationSource", []);})() : (function(){return smalltalk.send(self, "_methodSource", []);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(self, "_declarationSource", []);}), (function(){return smalltalk.send(self, "_methodSource", []);})]))]})();})]));
  1592. return (($receiver = self['@selectedClass']) == nil || $receiver == undefined) ? (function(){return "";})() : (function(){return smalltalk.send(self, "_classCommentSource", []);})();
  1593. return self;
  1594. } catch(e) {if(e===$early)return e[0]; throw e}}
  1595. }),
  1596. smalltalk.Browser);
  1597. smalltalk.addMethod(
  1598. "_updateCategoriesList",
  1599. smalltalk.method({
  1600. selector: "updateCategoriesList",
  1601. fn: function () {
  1602. var self=this;
  1603. smalltalk.send(self['@packagesList'], "_contents_", [(function(html){return smalltalk.send(smalltalk.send(self, "_packages", []), "_do_", [(function(each){var li=nil;
  1604. var label=nil;
  1605. ((($receiver = smalltalk.send(each, "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (label="Unclassified");})() : (function(){return (label=each);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return (label="Unclassified");}), (function(){return (label=each);})]));(li=smalltalk.send(html, "_li", []));((($receiver = smalltalk.send(self['@selectedPackage'], "__eq", [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_", [label]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectCategory_", [each]);})]);})(li);})]);})]);
  1606. return self;}
  1607. }),
  1608. smalltalk.Browser);
  1609. smalltalk.addMethod(
  1610. "_updateClassesList",
  1611. smalltalk.method({
  1612. selector: "updateClassesList",
  1613. fn: function () {
  1614. var self=this;
  1615. smalltalk.send(smalltalk.send((smalltalk.TabManager || TabManager), "_current", []), "_update", []);
  1616. smalltalk.send(self['@classesList'], "_updateNodes", []);
  1617. return self;}
  1618. }),
  1619. smalltalk.Browser);
  1620. smalltalk.addMethod(
  1621. "_updateMethodsList",
  1622. smalltalk.method({
  1623. selector: "updateMethodsList",
  1624. fn: function () {
  1625. var self=this;
  1626. smalltalk.send(self['@methodsList'], "_contents_", [(function(html){return smalltalk.send(smalltalk.send(self, "_methods", []), "_do_", [(function(each){var li=nil;
  1627. (li=smalltalk.send(html, "_li", []));((($receiver = smalltalk.send(self['@selectedMethod'], "__eq", [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, "_selector", [])]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectMethod_", [each]);})]);})(li);})]);})]);
  1628. return self;}
  1629. }),
  1630. smalltalk.Browser);
  1631. smalltalk.addMethod(
  1632. "_updateProtocolsList",
  1633. smalltalk.method({
  1634. selector: "updateProtocolsList",
  1635. fn: function () {
  1636. var self=this;
  1637. smalltalk.send(self['@protocolsList'], "_contents_", [(function(html){return smalltalk.send(smalltalk.send(self, "_protocols", []), "_do_", [(function(each){var li=nil;
  1638. (li=smalltalk.send(html, "_li", []));((($receiver = smalltalk.send(self['@selectedProtocol'], "__eq", [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, "_selectProtocol_", [each]);})]);})(li);})]);})]);
  1639. return self;}
  1640. }),
  1641. smalltalk.Browser);
  1642. smalltalk.addMethod(
  1643. "_updateSourceAndButtons",
  1644. smalltalk.method({
  1645. selector: "updateSourceAndButtons",
  1646. fn: function () {
  1647. var self=this;
  1648. smalltalk.send(self, "_disableSaveButton", []);
  1649. smalltalk.send(self['@classButtons'], "_contents_", [(function(html){(function($rec){smalltalk.send($rec, "_title_", ["Create a new class"]);smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_addNewClass", []);})]);return smalltalk.send($rec, "_with_", ["New class"]);})(smalltalk.send(html, "_button", []));(function($rec){smalltalk.send($rec, "_with_", ["Rename class"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_renameClass", []);})]);})(smalltalk.send(html, "_button", []));(function($rec){smalltalk.send($rec, "_with_", ["Copy class"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_copyClass", []);})]);})(smalltalk.send(html, "_button", []));(function($rec){smalltalk.send($rec, "_with_", ["Remove class"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_removeClass", []);})]);})(smalltalk.send(html, "_button", []));return (function($rec){smalltalk.send($rec, "_with_", ["References"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_searchClassReferences", []);})]);})(smalltalk.send(html, "_button", []));})]);
  1650. smalltalk.send(self['@methodButtons'], "_contents_", [(function(html){var protocolSelect=nil;
  1651. var referencesSelect=nil;
  1652. (function($rec){smalltalk.send($rec, "_with_", ["Remove method"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_removeMethod", []);})]);})(smalltalk.send(html, "_button", []));(protocolSelect=smalltalk.send(html, "_select", []));(function($rec){smalltalk.send($rec, "_onChange_", [(function(){return smalltalk.send(self, "_setMethodProtocol_", [smalltalk.send(smalltalk.send(protocolSelect, "_asJQuery", []), "_val", [])]);})]);return smalltalk.send($rec, "_with_", [(function(){(function($rec){smalltalk.send($rec, "_with_", ["Method protocol"]);return smalltalk.send($rec, "_at_put_", ["disabled", "disabled"]);})(smalltalk.send(html, "_option", []));(function($rec){smalltalk.send($rec, "_class_", ["important"]);return smalltalk.send($rec, "_with_", ["New..."]);})(smalltalk.send(html, "_option", []));return smalltalk.send(smalltalk.send(self, "_protocols", []), "_do_", [(function(each){(option=smalltalk.send(smalltalk.send(html, "_option", []), "_with_", [each]));return ((($receiver = smalltalk.send(self['@selectedProtocol'], "__eq", [each])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send((typeof option == 'undefined' ? nil : option), "_at_put_", ["selected", "selected"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send((typeof option == 'undefined' ? nil : option), "_at_put_", ["selected", "selected"]);})]));})]);})]);})(protocolSelect);return ((($receiver = smalltalk.send(self['@selectedMethod'], "_isNil", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){(referencesSelect=smalltalk.send(html, "_select", []));return (function($rec){smalltalk.send($rec, "_onChange_", [(function(){return smalltalk.send(self, "_searchReferencesOf_", [smalltalk.send(smalltalk.send(referencesSelect, "_asJQuery", []), "_val", [])]);})]);return smalltalk.send($rec, "_with_", [(function(){var option=nil;
  1653. (function($rec){smalltalk.send($rec, "_with_", ["References"]);return smalltalk.send($rec, "_at_put_", ["disabled", "disabled"]);})(smalltalk.send(html, "_option", []));(function($rec){smalltalk.send($rec, "_class_", ["important"]);return smalltalk.send($rec, "_with_", [smalltalk.send(self['@selectedMethod'], "_selector", [])]);})(smalltalk.send(html, "_option", []));return smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedMethod'], "_messageSends", []), "_sorted", []), "_do_", [(function(each){return smalltalk.send(smalltalk.send(html, "_option", []), "_with_", [each]);})]);})]);})(referencesSelect);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){(referencesSelect=smalltalk.send(html, "_select", []));return (function($rec){smalltalk.send($rec, "_onChange_", [(function(){return smalltalk.send(self, "_searchReferencesOf_", [smalltalk.send(smalltalk.send(referencesSelect, "_asJQuery", []), "_val", [])]);})]);return smalltalk.send($rec, "_with_", [(function(){var option=nil;
  1654. (function($rec){smalltalk.send($rec, "_with_", ["References"]);return smalltalk.send($rec, "_at_put_", ["disabled", "disabled"]);})(smalltalk.send(html, "_option", []));(function($rec){smalltalk.send($rec, "_class_", ["important"]);return smalltalk.send($rec, "_with_", [smalltalk.send(self['@selectedMethod'], "_selector", [])]);})(smalltalk.send(html, "_option", []));return smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedMethod'], "_messageSends", []), "_sorted", []), "_do_", [(function(each){return smalltalk.send(smalltalk.send(html, "_option", []), "_with_", [each]);})]);})]);})(referencesSelect);})]));})]);
  1655. ((($receiver = smalltalk.send(self['@selectedMethod'], "_isNil", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(self, "_hideMethodButtons", []);return ((($receiver = smalltalk.send(smalltalk.send(self['@selectedClass'], "_isNil", []), "_or_", [(function(){return smalltalk.send(self['@selectedProtocol'], "_notNil", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_hideClassButtons", []);})() : (function(){return smalltalk.send(self, "_showClassButtons", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_hideClassButtons", []);}), (function(){return smalltalk.send(self, "_showClassButtons", []);})]));})() : (function(){smalltalk.send(self, "_hideClassButtons", []);return smalltalk.send(self, "_showMethodButtons", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(self, "_hideMethodButtons", []);return ((($receiver = smalltalk.send(smalltalk.send(self['@selectedClass'], "_isNil", []), "_or_", [(function(){return smalltalk.send(self['@selectedProtocol'], "_notNil", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_hideClassButtons", []);})() : (function(){return smalltalk.send(self, "_showClassButtons", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_hideClassButtons", []);}), (function(){return smalltalk.send(self, "_showClassButtons", []);})]));}), (function(){smalltalk.send(self, "_hideClassButtons", []);return smalltalk.send(self, "_showMethodButtons", []);})]));
  1656. smalltalk.send(self['@sourceArea'], "_val_", [smalltalk.send(self, "_source", [])]);
  1657. return self;}
  1658. }),
  1659. smalltalk.Browser);
  1660. smalltalk.addMethod(
  1661. "_updateStatus",
  1662. smalltalk.method({
  1663. selector: "updateStatus",
  1664. fn: function () {
  1665. var self=this;
  1666. ((($receiver = smalltalk.send(smalltalk.send(self['@sourceArea'], "_val", []), "__eq", [smalltalk.send(self, "_source", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){(($receiver = self['@saveButton']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self['@saveButton'], "_at_put_", ["disabled", true]);})() : nil;return (self['@unsavedChanges']=false);})() : (function(){(($receiver = self['@saveButton']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self['@saveButton'], "_removeAt_", ["disabled"]);})() : nil;return (self['@unsavedChanges']=true);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){(($receiver = self['@saveButton']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self['@saveButton'], "_at_put_", ["disabled", true]);})() : nil;return (self['@unsavedChanges']=false);}), (function(){(($receiver = self['@saveButton']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self['@saveButton'], "_removeAt_", ["disabled"]);})() : nil;return (self['@unsavedChanges']=true);})]));
  1667. return self;}
  1668. }),
  1669. smalltalk.Browser);
  1670. smalltalk.addMethod(
  1671. "_updateTabsList",
  1672. smalltalk.method({
  1673. selector: "updateTabsList",
  1674. fn: function () {
  1675. var self=this;
  1676. smalltalk.send(self['@tabsList'], "_contents_", [(function(html){var li=nil;
  1677. (li=smalltalk.send(html, "_li", []));((($receiver = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")])).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_", ["Instance"]);})(smalltalk.send(html, "_span", []));return smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["rtab"]);})]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectTab_", [smalltalk.symbolFor("instance")]);})]);})(li);(li=smalltalk.send(html, "_li", []));((($receiver = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("class")])).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_", ["Class"]);})(smalltalk.send(html, "_span", []));return smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["rtab"]);})]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectTab_", [smalltalk.symbolFor("class")]);})]);})(li);(li=smalltalk.send(html, "_li", []));((($receiver = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("comment")])).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_", [(function(){smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["ltab"]);(function($rec){smalltalk.send($rec, "_class_", ["mtab"]);return smalltalk.send($rec, "_with_", ["Comment"]);})(smalltalk.send(html, "_span", []));return smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["rtab"]);})]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectTab_", [smalltalk.symbolFor("comment")]);})]);})(li);})]);
  1678. return self;}
  1679. }),
  1680. smalltalk.Browser);
  1681. smalltalk.addMethod(
  1682. "_commitPathJs",
  1683. smalltalk.method({
  1684. selector: "commitPathJs",
  1685. fn: function () {
  1686. var self=this;
  1687. return "js";
  1688. return self;}
  1689. }),
  1690. smalltalk.Browser.klass);
  1691. smalltalk.addMethod(
  1692. "_commitPathSt",
  1693. smalltalk.method({
  1694. selector: "commitPathSt",
  1695. fn: function () {
  1696. var self=this;
  1697. return "st";
  1698. return self;}
  1699. }),
  1700. smalltalk.Browser.klass);
  1701. smalltalk.addMethod(
  1702. "_open",
  1703. smalltalk.method({
  1704. selector: "open",
  1705. fn: function () {
  1706. var self=this;
  1707. smalltalk.send(smalltalk.send(self, "_new", []), "_open", []);
  1708. return self;}
  1709. }),
  1710. smalltalk.Browser.klass);
  1711. smalltalk.addMethod(
  1712. "_openOn_",
  1713. smalltalk.method({
  1714. selector: "openOn:",
  1715. fn: function (aClass) {
  1716. var self=this;
  1717. return (function($rec){smalltalk.send($rec, "_open", []);smalltalk.send($rec, "_selectCategory_", [smalltalk.send(aClass, "_category", [])]);return smalltalk.send($rec, "_selectClass_", [aClass]);})(smalltalk.send(self, "_new", []));
  1718. return self;}
  1719. }),
  1720. smalltalk.Browser.klass);
  1721. smalltalk.addClass('Debugger', smalltalk.TabWidget, ['error', 'selectedContext', 'sourceArea', 'ul', 'ul2', 'inspector', 'saveButton', 'unsavedChanges', 'selectedVariable', 'selectedVariableName', 'inspectButton'], 'IDE');
  1722. smalltalk.addMethod(
  1723. "_arguments",
  1724. smalltalk.method({
  1725. selector: "arguments",
  1726. fn: function () {
  1727. var self=this;
  1728. return (($receiver = smalltalk.send(self, "_method", [])) == nil || $receiver == undefined) ? (function(){return smalltalk.send(smalltalk.send(self['@selectedContext'], "_temps", []), "_collect_", [(function(each){return nil;})]);})() : (function(){return smalltalk.send(smalltalk.send(self, "_method", []), "_arguments", []);})();
  1729. return self;}
  1730. }),
  1731. smalltalk.Debugger);
  1732. smalltalk.addMethod(
  1733. "_canBeClosed",
  1734. smalltalk.method({
  1735. selector: "canBeClosed",
  1736. fn: function () {
  1737. var self=this;
  1738. return true;
  1739. return self;}
  1740. }),
  1741. smalltalk.Debugger);
  1742. smalltalk.addMethod(
  1743. "_error",
  1744. smalltalk.method({
  1745. selector: "error",
  1746. fn: function () {
  1747. var self=this;
  1748. return self['@error'];
  1749. return self;}
  1750. }),
  1751. smalltalk.Debugger);
  1752. smalltalk.addMethod(
  1753. "_error_",
  1754. smalltalk.method({
  1755. selector: "error:",
  1756. fn: function (anError) {
  1757. var self=this;
  1758. (self['@error']=anError);
  1759. return self;}
  1760. }),
  1761. smalltalk.Debugger);
  1762. smalltalk.addMethod(
  1763. "_initialize",
  1764. smalltalk.method({
  1765. selector: "initialize",
  1766. fn: function () {
  1767. var self=this;
  1768. smalltalk.send(self, "_initialize", [], smalltalk.Debugger.superclass || nil);
  1769. smalltalk.send(self['@unsavedChanges'], "__eq", [false]);
  1770. return self;}
  1771. }),
  1772. smalltalk.Debugger);
  1773. smalltalk.addMethod(
  1774. "_inspectSelectedVariable",
  1775. smalltalk.method({
  1776. selector: "inspectSelectedVariable",
  1777. fn: function () {
  1778. var self=this;
  1779. smalltalk.send(self['@selectedVariable'], "_inspect", []);
  1780. return self;}
  1781. }),
  1782. smalltalk.Debugger);
  1783. smalltalk.addMethod(
  1784. "_label",
  1785. smalltalk.method({
  1786. selector: "label",
  1787. fn: function () {
  1788. var self=this;
  1789. return "[Debugger]";
  1790. return self;}
  1791. }),
  1792. smalltalk.Debugger);
  1793. smalltalk.addMethod(
  1794. "_method",
  1795. smalltalk.method({
  1796. selector: "method",
  1797. fn: function () {
  1798. var self=this;
  1799. return smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_class", []), "_methodAt_", [smalltalk.send(self['@selectedContext'], "_selector", [])]);
  1800. return self;}
  1801. }),
  1802. smalltalk.Debugger);
  1803. smalltalk.addMethod(
  1804. "_proceed",
  1805. smalltalk.method({
  1806. selector: "proceed",
  1807. fn: function () {
  1808. var self=this;
  1809. smalltalk.send(self, "_close", []);
  1810. smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_perform_withArguments_", [smalltalk.send(self['@selectedContext'], "_selector", []), smalltalk.send(self['@selectedContext'], "_temps", [])]);
  1811. return self;}
  1812. }),
  1813. smalltalk.Debugger);
  1814. smalltalk.addMethod(
  1815. "_receiver",
  1816. smalltalk.method({
  1817. selector: "receiver",
  1818. fn: function () {
  1819. var self=this;
  1820. return smalltalk.send(self['@selectedContext'], "_receiver", []);
  1821. return self;}
  1822. }),
  1823. smalltalk.Debugger);
  1824. smalltalk.addMethod(
  1825. "_renderBottomPanelOn_",
  1826. smalltalk.method({
  1827. selector: "renderBottomPanelOn:",
  1828. fn: function (html) {
  1829. var self=this;
  1830. (function($rec){smalltalk.send($rec, "_class_", ["amber_sourceCode debugger"]);return smalltalk.send($rec, "_with_", [(function(){(self['@sourceArea']=smalltalk.send((smalltalk.SourceArea || SourceArea), "_new", []));return smalltalk.send(self['@sourceArea'], "_renderOn_", [html]);})]);})(smalltalk.send(html, "_div", []));
  1831. (self['@ul2']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column debugger variables"]));
  1832. (self['@inspector']=smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["amber_column debugger inspector"]));
  1833. smalltalk.send(self['@sourceArea'], "_onKeyUp_", [(function(){return smalltalk.send(self, "_updateStatus", []);})]);
  1834. return self;}
  1835. }),
  1836. smalltalk.Debugger);
  1837. smalltalk.addMethod(
  1838. "_renderBoxOn_",
  1839. smalltalk.method({
  1840. selector: "renderBoxOn:",
  1841. fn: function (html) {
  1842. var self=this;
  1843. (function($rec){smalltalk.send($rec, "_renderTopPanelOn_", [html]);return smalltalk.send($rec, "_renderBottomPanelOn_", [html]);})(self);
  1844. return self;}
  1845. }),
  1846. smalltalk.Debugger);
  1847. smalltalk.addMethod(
  1848. "_renderButtonsOn_",
  1849. smalltalk.method({
  1850. selector: "renderButtonsOn:",
  1851. fn: function (html) {
  1852. var self=this;
  1853. (self['@saveButton']=(function($rec){smalltalk.send($rec, "_with_", ["Save"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_save", []);})]);})(smalltalk.send(html, "_button", [])));
  1854. (function($rec){smalltalk.send($rec, "_with_", ["DoIt"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self['@sourceArea'], "_doIt", []);})]);})(smalltalk.send(html, "_button", []));
  1855. (function($rec){smalltalk.send($rec, "_with_", ["PrintIt"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self['@sourceArea'], "_printIt", []);})]);})(smalltalk.send(html, "_button", []));
  1856. (function($rec){smalltalk.send($rec, "_with_", ["InspectIt"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self['@sourceArea'], "_inspectIt", []);})]);})(smalltalk.send(html, "_button", []));
  1857. (function($rec){smalltalk.send($rec, "_with_", ["Proceed"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_proceed", []);})]);})(smalltalk.send(html, "_button", []));
  1858. (function($rec){smalltalk.send($rec, "_with_", ["Abandon"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_close", []);})]);})(smalltalk.send(html, "_button", []));
  1859. (self['@inspectButton']=(function($rec){smalltalk.send($rec, "_class_", ["amber_button debugger inspect"]);smalltalk.send($rec, "_with_", ["Inspect"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_inspectSelectedVariable", []);})]);})(smalltalk.send(html, "_button", [])));
  1860. (function($rec){smalltalk.send($rec, "_updateSourceArea", []);smalltalk.send($rec, "_updateStatus", []);smalltalk.send($rec, "_updateVariablesList", []);return smalltalk.send($rec, "_updateInspector", []);})(self);
  1861. return self;}
  1862. }),
  1863. smalltalk.Debugger);
  1864. smalltalk.addMethod(
  1865. "_renderContext_on_",
  1866. smalltalk.method({
  1867. selector: "renderContext:on:",
  1868. fn: function (aContext, html) {
  1869. var self=this;
  1870. var li=nil;
  1871. (li=smalltalk.send(html, "_li", []));
  1872. ((($receiver = smalltalk.send(self['@selectedContext'], "__eq", [aContext])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(li, "_class_", ["selected"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(li, "_class_", ["selected"]);})]));
  1873. (function($rec){smalltalk.send($rec, "_with_", [smalltalk.send(aContext, "_asString", [])]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectContext_", [aContext]);})]);})(li);
  1874. (($receiver = smalltalk.send(aContext, "_home", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_renderContext_on_", [smalltalk.send(aContext, "_home", []), html]);})() : nil;
  1875. return self;}
  1876. }),
  1877. smalltalk.Debugger);
  1878. smalltalk.addMethod(
  1879. "_renderTopPanelOn_",
  1880. smalltalk.method({
  1881. selector: "renderTopPanelOn:",
  1882. fn: function (html) {
  1883. var self=this;
  1884. (self['@selectedContext']=smalltalk.send(smalltalk.send(self, "_error", []), "_context", []));
  1885. (function($rec){smalltalk.send($rec, "_class_", ["top"]);return smalltalk.send($rec, "_with_", [(function(){(function($rec){smalltalk.send($rec, "_class_", ["label"]);return smalltalk.send($rec, "_with_", [smalltalk.send(smalltalk.send(self, "_error", []), "_messageText", [])]);})(smalltalk.send(html, "_div", []));return (self['@ul']=(function($rec){smalltalk.send($rec, "_class_", ["amber_column debugger contexts"]);return smalltalk.send($rec, "_with_", [(function(){return smalltalk.send(self, "_renderContext_on_", [smalltalk.send(smalltalk.send(self, "_error", []), "_context", []), html]);})]);})(smalltalk.send(html, "_ul", [])));})]);})(smalltalk.send(html, "_div", []));
  1886. return self;}
  1887. }),
  1888. smalltalk.Debugger);
  1889. smalltalk.addMethod(
  1890. "_save",
  1891. smalltalk.method({
  1892. selector: "save",
  1893. fn: function () {
  1894. var self=this;
  1895. var protocol=nil;
  1896. (protocol=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_class", []), "_methodDictionary", []), "_at_", [smalltalk.send(self['@selectedContext'], "_selector", [])]), "_category", []));
  1897. smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_class", []), "_compile_category_", [smalltalk.send(self['@sourceArea'], "_val", []), protocol]);
  1898. smalltalk.send(self, "_updateStatus", []);
  1899. return self;}
  1900. }),
  1901. smalltalk.Debugger);
  1902. smalltalk.addMethod(
  1903. "_selectContext_",
  1904. smalltalk.method({
  1905. selector: "selectContext:",
  1906. fn: function (aContext) {
  1907. var self=this;
  1908. (self['@selectedContext']=aContext);
  1909. (self['@selectedVariable']=nil);
  1910. (self['@selectedVariableName']=nil);
  1911. (function($rec){smalltalk.send($rec, "_updateContextsList", []);smalltalk.send($rec, "_updateSourceArea", []);smalltalk.send($rec, "_updateInspector", []);smalltalk.send($rec, "_updateVariablesList", []);return smalltalk.send($rec, "_updateStatus", []);})(self);
  1912. return self;}
  1913. }),
  1914. smalltalk.Debugger);
  1915. smalltalk.addMethod(
  1916. "_selectVariable_named_",
  1917. smalltalk.method({
  1918. selector: "selectVariable:named:",
  1919. fn: function (anObject, aString) {
  1920. var self=this;
  1921. (self['@selectedVariable']=anObject);
  1922. (self['@selectedVariableName']=aString);
  1923. smalltalk.send(self['@inspector'], "_contents_", [(function(html){return smalltalk.send(html, "_with_", [smalltalk.send(anObject, "_printString", [])]);})]);
  1924. smalltalk.send(self, "_updateVariablesList", []);
  1925. return self;}
  1926. }),
  1927. smalltalk.Debugger);
  1928. smalltalk.addMethod(
  1929. "_source",
  1930. smalltalk.method({
  1931. selector: "source",
  1932. fn: function () {
  1933. var self=this;
  1934. return (($receiver = smalltalk.send(self, "_method", [])) == nil || $receiver == undefined) ? (function(){return "Method doesn't exist!";})() : (function(){return smalltalk.send(smalltalk.send(self, "_method", []), "_source", []);})();
  1935. return self;}
  1936. }),
  1937. smalltalk.Debugger);
  1938. smalltalk.addMethod(
  1939. "_updateContextsList",
  1940. smalltalk.method({
  1941. selector: "updateContextsList",
  1942. fn: function () {
  1943. var self=this;
  1944. smalltalk.send(self['@ul'], "_contents_", [(function(html){return smalltalk.send(self, "_renderContext_on_", [smalltalk.send(smalltalk.send(self, "_error", []), "_context", []), html]);})]);
  1945. return self;}
  1946. }),
  1947. smalltalk.Debugger);
  1948. smalltalk.addMethod(
  1949. "_updateInspector",
  1950. smalltalk.method({
  1951. selector: "updateInspector",
  1952. fn: function () {
  1953. var self=this;
  1954. smalltalk.send(self['@inspector'], "_contents_", [(function(html){return nil;})]);
  1955. return self;}
  1956. }),
  1957. smalltalk.Debugger);
  1958. smalltalk.addMethod(
  1959. "_updateSourceArea",
  1960. smalltalk.method({
  1961. selector: "updateSourceArea",
  1962. fn: function () {
  1963. var self=this;
  1964. smalltalk.send(self['@sourceArea'], "_val_", [smalltalk.send(self, "_source", [])]);
  1965. return self;}
  1966. }),
  1967. smalltalk.Debugger);
  1968. smalltalk.addMethod(
  1969. "_updateStatus",
  1970. smalltalk.method({
  1971. selector: "updateStatus",
  1972. fn: function () {
  1973. var self=this;
  1974. ((($receiver = smalltalk.send(smalltalk.send(self['@sourceArea'], "_val", []), "__eq", [smalltalk.send(self, "_source", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){(($receiver = self['@saveButton']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self['@saveButton'], "_at_put_", ["disabled", true]);})() : nil;return (self['@unsavedChanges']=false);})() : (function(){(($receiver = self['@saveButton']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self['@saveButton'], "_removeAt_", ["disabled"]);})() : nil;return (self['@unsavedChanges']=true);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){(($receiver = self['@saveButton']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self['@saveButton'], "_at_put_", ["disabled", true]);})() : nil;return (self['@unsavedChanges']=false);}), (function(){(($receiver = self['@saveButton']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self['@saveButton'], "_removeAt_", ["disabled"]);})() : nil;return (self['@unsavedChanges']=true);})]));
  1975. return self;}
  1976. }),
  1977. smalltalk.Debugger);
  1978. smalltalk.addMethod(
  1979. "_updateVariablesList",
  1980. smalltalk.method({
  1981. selector: "updateVariablesList",
  1982. fn: function () {
  1983. var self=this;
  1984. smalltalk.send(self['@ul2'], "_contents_", [(function(html){var li=nil;
  1985. (li=(function($rec){smalltalk.send($rec, "_with_", ["self"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectVariable_named_", [smalltalk.send(self, "_receiver", []), "self"]);})]);})(smalltalk.send(html, "_li", [])));((($receiver = smalltalk.send(self['@selectedVariableName'], "__eq", ["self"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(li, "_class_", ["selected"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(li, "_class_", ["selected"]);})]));smalltalk.send(smalltalk.send(self, "_arguments", []), "_withIndexDo_", [(function(each, index){var param=nil;
  1986. (param=smalltalk.send(smalltalk.send(self['@selectedContext'], "_temps", []), "_at_", [index]));(li=(function($rec){smalltalk.send($rec, "_with_", [each]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectVariable_named_", [param, each]);})]);})(smalltalk.send(html, "_li", [])));return ((($receiver = smalltalk.send(self['@selectedVariableName'], "__eq", [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 smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_receiver", []), "_class", []), "_allInstanceVariableNames", []), "_do_", [(function(each){var ivar=nil;
  1987. (ivar=smalltalk.send(smalltalk.send(self, "_receiver", []), "_instVarAt_", [each]));(li=(function($rec){smalltalk.send($rec, "_with_", [each]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectVariable_named_", [ivar, each]);})]);})(smalltalk.send(html, "_li", [])));return ((($receiver = smalltalk.send(self['@selectedVariableName'], "__eq", [each])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(li, "_class_", ["selected"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(li, "_class_", ["selected"]);})]));})]);})]);
  1988. (($receiver = self['@selectedVariable']) == nil || $receiver == undefined) ? (function(){return smalltalk.send(self['@inspectButton'], "_at_put_", ["disabled", true]);})() : (function(){return smalltalk.send(self['@inspectButton'], "_removeAt_", ["disabled"]);})();
  1989. return self;}
  1990. }),
  1991. smalltalk.Debugger);
  1992. smalltalk.addClass('IDETranscript', smalltalk.TabWidget, ['textarea'], 'IDE');
  1993. smalltalk.addMethod(
  1994. "_clear",
  1995. smalltalk.method({
  1996. selector: "clear",
  1997. fn: function () {
  1998. var self=this;
  1999. smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val_", [""]);
  2000. return self;}
  2001. }),
  2002. smalltalk.IDETranscript);
  2003. smalltalk.addMethod(
  2004. "_cr",
  2005. smalltalk.method({
  2006. selector: "cr",
  2007. fn: function () {
  2008. var self=this;
  2009. smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val_", [smalltalk.send(smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val", []), "__comma", [smalltalk.send((smalltalk.String || String), "_cr", [])])]);
  2010. return self;}
  2011. }),
  2012. smalltalk.IDETranscript);
  2013. smalltalk.addMethod(
  2014. "_label",
  2015. smalltalk.method({
  2016. selector: "label",
  2017. fn: function () {
  2018. var self=this;
  2019. return "Transcript";
  2020. return self;}
  2021. }),
  2022. smalltalk.IDETranscript);
  2023. smalltalk.addMethod(
  2024. "_open",
  2025. smalltalk.method({
  2026. selector: "open",
  2027. fn: function () {
  2028. var self=this;
  2029. (function($rec){smalltalk.send($rec, "_open", []);return smalltalk.send($rec, "_selectTab_", [self]);})(smalltalk.send((smalltalk.TabManager || TabManager), "_current", []));
  2030. return self;}
  2031. }),
  2032. smalltalk.IDETranscript);
  2033. smalltalk.addMethod(
  2034. "_renderBoxOn_",
  2035. smalltalk.method({
  2036. selector: "renderBoxOn:",
  2037. fn: function (html) {
  2038. var self=this;
  2039. (self['@textarea']=smalltalk.send(html, "_textarea", []));
  2040. (function($rec){smalltalk.send($rec, "_class_", ["amber_transcript"]);return smalltalk.send($rec, "_at_put_", ["spellcheck", "false"]);})(self['@textarea']);
  2041. return self;}
  2042. }),
  2043. smalltalk.IDETranscript);
  2044. smalltalk.addMethod(
  2045. "_renderButtonsOn_",
  2046. smalltalk.method({
  2047. selector: "renderButtonsOn:",
  2048. fn: function (html) {
  2049. var self=this;
  2050. (function($rec){smalltalk.send($rec, "_with_", ["Clear transcript"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_clear", []);})]);})(smalltalk.send(html, "_button", []));
  2051. return self;}
  2052. }),
  2053. smalltalk.IDETranscript);
  2054. smalltalk.addMethod(
  2055. "_show_",
  2056. smalltalk.method({
  2057. selector: "show:",
  2058. fn: function (anObject) {
  2059. var self=this;
  2060. (($receiver = self['@textarea']) == nil || $receiver == undefined) ? (function(){return smalltalk.send(self, "_open", []);})() : $receiver;
  2061. smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val_", [smalltalk.send(smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val", []), "__comma", [smalltalk.send(anObject, "_asString", [])])]);
  2062. return self;}
  2063. }),
  2064. smalltalk.IDETranscript);
  2065. smalltalk.IDETranscript.klass.iVarNames = ['current'];
  2066. smalltalk.addMethod(
  2067. "_current",
  2068. smalltalk.method({
  2069. selector: "current",
  2070. fn: function () {
  2071. var self=this;
  2072. return (($receiver = self['@current']) == nil || $receiver == undefined) ? (function(){return (self['@current']=smalltalk.send(self, "_new", [], smalltalk.IDETranscript.klass.superclass || nil));})() : $receiver;
  2073. return self;}
  2074. }),
  2075. smalltalk.IDETranscript.klass);
  2076. smalltalk.addMethod(
  2077. "_initialize",
  2078. smalltalk.method({
  2079. selector: "initialize",
  2080. fn: function () {
  2081. var self=this;
  2082. smalltalk.send((smalltalk.Transcript || Transcript), "_register_", [smalltalk.send(self, "_current", [])]);
  2083. return self;}
  2084. }),
  2085. smalltalk.IDETranscript.klass);
  2086. smalltalk.addMethod(
  2087. "_new",
  2088. smalltalk.method({
  2089. selector: "new",
  2090. fn: function () {
  2091. var self=this;
  2092. smalltalk.send(self, "_shouldNotImplement", []);
  2093. return self;}
  2094. }),
  2095. smalltalk.IDETranscript.klass);
  2096. smalltalk.addMethod(
  2097. "_open",
  2098. smalltalk.method({
  2099. selector: "open",
  2100. fn: function () {
  2101. var self=this;
  2102. (function($rec){smalltalk.send($rec, "_open", []);return smalltalk.send($rec, "_selectTab_", [smalltalk.send(self, "_current", [])]);})(smalltalk.send((smalltalk.TabManager || TabManager), "_current", []));
  2103. return self;}
  2104. }),
  2105. smalltalk.IDETranscript.klass);
  2106. smalltalk.addClass('Inspector', smalltalk.TabWidget, ['label', 'variables', 'object', 'selectedVariable', 'variablesList', 'valueTextarea', 'diveButton', 'sourceArea'], 'IDE');
  2107. smalltalk.addMethod(
  2108. "_canBeClosed",
  2109. smalltalk.method({
  2110. selector: "canBeClosed",
  2111. fn: function () {
  2112. var self=this;
  2113. return true;
  2114. return self;}
  2115. }),
  2116. smalltalk.Inspector);
  2117. smalltalk.addMethod(
  2118. "_dive",
  2119. smalltalk.method({
  2120. selector: "dive",
  2121. fn: function () {
  2122. var self=this;
  2123. smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_at_", [smalltalk.send(self, "_selectedVariable", [])]), "_inspect", []);
  2124. return self;}
  2125. }),
  2126. smalltalk.Inspector);
  2127. smalltalk.addMethod(
  2128. "_inspect_",
  2129. smalltalk.method({
  2130. selector: "inspect:",
  2131. fn: function (anObject) {
  2132. var self=this;
  2133. (self['@object']=anObject);
  2134. (self['@variables']=[]);
  2135. smalltalk.send(self['@object'], "_inspectOn_", [self]);
  2136. return self;}
  2137. }),
  2138. smalltalk.Inspector);
  2139. smalltalk.addMethod(
  2140. "_label",
  2141. smalltalk.method({
  2142. selector: "label",
  2143. fn: function () {
  2144. var self=this;
  2145. return (($receiver = self['@label']) == nil || $receiver == undefined) ? (function(){return "Inspector (nil)";})() : $receiver;
  2146. return self;}
  2147. }),
  2148. smalltalk.Inspector);
  2149. smalltalk.addMethod(
  2150. "_refresh",
  2151. smalltalk.method({
  2152. selector: "refresh",
  2153. fn: function () {
  2154. var self=this;
  2155. (function($rec){smalltalk.send($rec, "_inspect_", [self['@object']]);smalltalk.send($rec, "_updateVariablesList", []);return smalltalk.send($rec, "_updateValueTextarea", []);})(self);
  2156. return self;}
  2157. }),
  2158. smalltalk.Inspector);
  2159. smalltalk.addMethod(
  2160. "_renderBottomPanelOn_",
  2161. smalltalk.method({
  2162. selector: "renderBottomPanelOn:",
  2163. fn: function (html) {
  2164. var self=this;
  2165. (function($rec){smalltalk.send($rec, "_class_", ["amber_sourceCode"]);return smalltalk.send($rec, "_with_", [(function(){(self['@sourceArea']=(function($rec){smalltalk.send($rec, "_receiver_", [self['@object']]);smalltalk.send($rec, "_onDoIt_", [(function(){return smalltalk.send(self, "_refresh", []);})]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.SourceArea || SourceArea), "_new", [])));return smalltalk.send(self['@sourceArea'], "_renderOn_", [html]);})]);})(smalltalk.send(html, "_div", []));
  2166. return self;}
  2167. }),
  2168. smalltalk.Inspector);
  2169. smalltalk.addMethod(
  2170. "_renderBoxOn_",
  2171. smalltalk.method({
  2172. selector: "renderBoxOn:",
  2173. fn: function (html) {
  2174. var self=this;
  2175. (function($rec){smalltalk.send($rec, "_renderTopPanelOn_", [html]);return smalltalk.send($rec, "_renderBottomPanelOn_", [html]);})(self);
  2176. return self;}
  2177. }),
  2178. smalltalk.Inspector);
  2179. smalltalk.addMethod(
  2180. "_renderButtonsOn_",
  2181. smalltalk.method({
  2182. selector: "renderButtonsOn:",
  2183. fn: function (html) {
  2184. var self=this;
  2185. (function($rec){smalltalk.send($rec, "_with_", ["DoIt"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_doIt", []);})]);})(smalltalk.send(html, "_button", []));
  2186. (function($rec){smalltalk.send($rec, "_with_", ["PrintIt"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_printIt", []);})]);})(smalltalk.send(html, "_button", []));
  2187. (function($rec){smalltalk.send($rec, "_with_", ["InspectIt"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_inspectIt", []);})]);})(smalltalk.send(html, "_button", []));
  2188. smalltalk.send(self, "_updateButtons", []);
  2189. return self;}
  2190. }),
  2191. smalltalk.Inspector);
  2192. smalltalk.addMethod(
  2193. "_renderTopPanelOn_",
  2194. smalltalk.method({
  2195. selector: "renderTopPanelOn:",
  2196. fn: function (html) {
  2197. var self=this;
  2198. (function($rec){smalltalk.send($rec, "_class_", ["top"]);return smalltalk.send($rec, "_with_", [(function(){(self['@variablesList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column variables"]));(self['@valueTextarea']=(function($rec){smalltalk.send($rec, "_class_", ["amber_column value"]);return smalltalk.send($rec, "_at_put_", ["readonly", "readonly"]);})(smalltalk.send(html, "_textarea", [])));(function($rec){smalltalk.send($rec, "_class_", ["amber_tabs inspector"]);return smalltalk.send($rec, "_with_", [(function(){(function($rec){smalltalk.send($rec, "_class_", ["amber_button inspector refresh"]);smalltalk.send($rec, "_with_", ["Refresh"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_refresh", []);})]);})(smalltalk.send(html, "_button", []));return (self['@diveButton']=(function($rec){smalltalk.send($rec, "_class_", ["amber_button inspector dive"]);smalltalk.send($rec, "_with_", ["Dive"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_dive", []);})]);})(smalltalk.send(html, "_button", [])));})]);})(smalltalk.send(html, "_div", []));return smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["amber_clear"]);})]);})(smalltalk.send(html, "_div", []));
  2199. (function($rec){smalltalk.send($rec, "_updateVariablesList", []);return smalltalk.send($rec, "_updateValueTextarea", []);})(self);
  2200. return self;}
  2201. }),
  2202. smalltalk.Inspector);
  2203. smalltalk.addMethod(
  2204. "_selectVariable_",
  2205. smalltalk.method({
  2206. selector: "selectVariable:",
  2207. fn: function (aString) {
  2208. var self=this;
  2209. smalltalk.send(self, "_selectedVariable_", [aString]);
  2210. (function($rec){smalltalk.send($rec, "_updateVariablesList", []);smalltalk.send($rec, "_updateValueTextarea", []);return smalltalk.send($rec, "_updateButtons", []);})(self);
  2211. return self;}
  2212. }),
  2213. smalltalk.Inspector);
  2214. smalltalk.addMethod(
  2215. "_selectedVariable",
  2216. smalltalk.method({
  2217. selector: "selectedVariable",
  2218. fn: function () {
  2219. var self=this;
  2220. return self['@selectedVariable'];
  2221. return self;}
  2222. }),
  2223. smalltalk.Inspector);
  2224. smalltalk.addMethod(
  2225. "_selectedVariable_",
  2226. smalltalk.method({
  2227. selector: "selectedVariable:",
  2228. fn: function (aString) {
  2229. var self=this;
  2230. (self['@selectedVariable']=aString);
  2231. return self;}
  2232. }),
  2233. smalltalk.Inspector);
  2234. smalltalk.addMethod(
  2235. "_setLabel_",
  2236. smalltalk.method({
  2237. selector: "setLabel:",
  2238. fn: function (aString) {
  2239. var self=this;
  2240. (self['@label']=aString);
  2241. return self;}
  2242. }),
  2243. smalltalk.Inspector);
  2244. smalltalk.addMethod(
  2245. "_setVariables_",
  2246. smalltalk.method({
  2247. selector: "setVariables:",
  2248. fn: function (aCollection) {
  2249. var self=this;
  2250. (self['@variables']=aCollection);
  2251. return self;}
  2252. }),
  2253. smalltalk.Inspector);
  2254. smalltalk.addMethod(
  2255. "_sourceArea",
  2256. smalltalk.method({
  2257. selector: "sourceArea",
  2258. fn: function () {
  2259. var self=this;
  2260. return self['@sourceArea'];
  2261. return self;}
  2262. }),
  2263. smalltalk.Inspector);
  2264. smalltalk.addMethod(
  2265. "_updateButtons",
  2266. smalltalk.method({
  2267. selector: "updateButtons",
  2268. fn: function () {
  2269. var self=this;
  2270. ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(self, "_selectedVariable", []), "_notNil", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_at_", [smalltalk.send(self, "_selectedVariable", [])]), "_notNil", []);})])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self['@diveButton'], "_at_put_", ["disabled", true]);})() : (function(){return smalltalk.send(self['@diveButton'], "_removeAt_", ["disabled"]);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(self['@diveButton'], "_at_put_", ["disabled", true]);}), (function(){return smalltalk.send(self['@diveButton'], "_removeAt_", ["disabled"]);})]));
  2271. return self;}
  2272. }),
  2273. smalltalk.Inspector);
  2274. smalltalk.addMethod(
  2275. "_updateValueTextarea",
  2276. smalltalk.method({
  2277. selector: "updateValueTextarea",
  2278. fn: function () {
  2279. var self=this;
  2280. smalltalk.send(smalltalk.send(self['@valueTextarea'], "_asJQuery", []), "_val_", [((($receiver = smalltalk.send(smalltalk.send(self, "_selectedVariable", []), "_isNil", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "";})() : (function(){return smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_at_", [smalltalk.send(self, "_selectedVariable", [])]), "_printString", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "";}), (function(){return smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_at_", [smalltalk.send(self, "_selectedVariable", [])]), "_printString", []);})]))]);
  2281. return self;}
  2282. }),
  2283. smalltalk.Inspector);
  2284. smalltalk.addMethod(
  2285. "_updateVariablesList",
  2286. smalltalk.method({
  2287. selector: "updateVariablesList",
  2288. fn: function () {
  2289. var self=this;
  2290. smalltalk.send(self['@variablesList'], "_contents_", [(function(html){return smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_keys", []), "_do_", [(function(each){var li=nil;
  2291. (li=smalltalk.send(html, "_li", []));(function($rec){smalltalk.send($rec, "_with_", [each]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectVariable_", [each]);})]);})(li);return ((($receiver = smalltalk.send(smalltalk.send(self, "_selectedVariable", []), "__eq", [each])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(li, "_class_", ["selected"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(li, "_class_", ["selected"]);})]));})]);})]);
  2292. return self;}
  2293. }),
  2294. smalltalk.Inspector);
  2295. smalltalk.addMethod(
  2296. "_variables",
  2297. smalltalk.method({
  2298. selector: "variables",
  2299. fn: function () {
  2300. var self=this;
  2301. return self['@variables'];
  2302. return self;}
  2303. }),
  2304. smalltalk.Inspector);
  2305. smalltalk.addMethod(
  2306. "_on_",
  2307. smalltalk.method({
  2308. selector: "on:",
  2309. fn: function (anObject) {
  2310. var self=this;
  2311. return (function($rec){smalltalk.send($rec, "_inspect_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  2312. return self;}
  2313. }),
  2314. smalltalk.Inspector.klass);
  2315. smalltalk.addClass('ProgressBar', smalltalk.TabWidget, ['percent', 'progressDiv', 'div'], 'IDE');
  2316. smalltalk.addMethod(
  2317. "_percent",
  2318. smalltalk.method({
  2319. selector: "percent",
  2320. fn: function () {
  2321. var self=this;
  2322. return (($receiver = self['@percent']) == nil || $receiver == undefined) ? (function(){return (0);})() : $receiver;
  2323. return self;}
  2324. }),
  2325. smalltalk.ProgressBar);
  2326. smalltalk.addMethod(
  2327. "_percent_",
  2328. smalltalk.method({
  2329. selector: "percent:",
  2330. fn: function (aNumber) {
  2331. var self=this;
  2332. (self['@percent']=aNumber);
  2333. return self;}
  2334. }),
  2335. smalltalk.ProgressBar);
  2336. smalltalk.addMethod(
  2337. "_renderOn_",
  2338. smalltalk.method({
  2339. selector: "renderOn:",
  2340. fn: function (html) {
  2341. var self=this;
  2342. (self['@div']=(function($rec){smalltalk.send($rec, "_class_", ["progress_bar"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(html, "_div", [])));
  2343. smalltalk.send(self, "_renderProgressBar", []);
  2344. return self;}
  2345. }),
  2346. smalltalk.ProgressBar);
  2347. smalltalk.addMethod(
  2348. "_renderProgressBar",
  2349. smalltalk.method({
  2350. selector: "renderProgressBar",
  2351. fn: function () {
  2352. var self=this;
  2353. smalltalk.send(self['@div'], "_contents_", [(function(html){return (function($rec){smalltalk.send($rec, "_class_", ["progress"]);return smalltalk.send($rec, "_style_", [smalltalk.send(smalltalk.send("width:", "__comma", [smalltalk.send(smalltalk.send(self, "_percent", []), "_asString", [])]), "__comma", ["%"])]);})(smalltalk.send(html, "_div", []));})]);
  2354. return self;}
  2355. }),
  2356. smalltalk.ProgressBar);
  2357. smalltalk.addMethod(
  2358. "_updatePercent_",
  2359. smalltalk.method({
  2360. selector: "updatePercent:",
  2361. fn: function (aNumber) {
  2362. var self=this;
  2363. smalltalk.send(self, "_percent_", [aNumber]);
  2364. smalltalk.send(self, "_renderProgressBar", []);
  2365. return self;}
  2366. }),
  2367. smalltalk.ProgressBar);
  2368. smalltalk.addClass('ReferencesBrowser', smalltalk.TabWidget, ['implementors', 'senders', 'implementorsList', 'input', 'timer', 'selector', 'sendersList', 'referencedClasses', 'referencedClassesList', 'matches', 'matchesList'], 'IDE');
  2369. smalltalk.addMethod(
  2370. "_canBeClosed",
  2371. smalltalk.method({
  2372. selector: "canBeClosed",
  2373. fn: function () {
  2374. var self=this;
  2375. return true;
  2376. return self;}
  2377. }),
  2378. smalltalk.ReferencesBrowser);
  2379. smalltalk.addMethod(
  2380. "_classesAndMetaclasses",
  2381. smalltalk.method({
  2382. selector: "classesAndMetaclasses",
  2383. fn: function () {
  2384. var self=this;
  2385. return smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_classes", []), "__comma", [smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_classes", []), "_collect_", [(function(each){return smalltalk.send(each, "_class", []);})])]);
  2386. return self;}
  2387. }),
  2388. smalltalk.ReferencesBrowser);
  2389. smalltalk.addMethod(
  2390. "_implementors",
  2391. smalltalk.method({
  2392. selector: "implementors",
  2393. fn: function () {
  2394. var self=this;
  2395. return (($receiver = self['@implementors']) == nil || $receiver == undefined) ? (function(){return (self['@implementors']=smalltalk.send((smalltalk.Array || Array), "_new", []));})() : $receiver;
  2396. return self;}
  2397. }),
  2398. smalltalk.ReferencesBrowser);
  2399. smalltalk.addMethod(
  2400. "_initialize",
  2401. smalltalk.method({
  2402. selector: "initialize",
  2403. fn: function () {
  2404. var self=this;
  2405. smalltalk.send(self, "_initialize", [], smalltalk.ReferencesBrowser.superclass || nil);
  2406. (self['@selector']="");
  2407. return self;}
  2408. }),
  2409. smalltalk.ReferencesBrowser);
  2410. smalltalk.addMethod(
  2411. "_label",
  2412. smalltalk.method({
  2413. selector: "label",
  2414. fn: function () {
  2415. var self=this;
  2416. return "[References]";
  2417. return self;}
  2418. }),
  2419. smalltalk.ReferencesBrowser);
  2420. smalltalk.addMethod(
  2421. "_matches",
  2422. smalltalk.method({
  2423. selector: "matches",
  2424. fn: function () {
  2425. var self=this;
  2426. return (($receiver = self['@matches']) == nil || $receiver == undefined) ? (function(){return (self['@matches']=smalltalk.send((smalltalk.Array || Array), "_new", []));})() : $receiver;
  2427. return self;}
  2428. }),
  2429. smalltalk.ReferencesBrowser);
  2430. smalltalk.addMethod(
  2431. "_openBrowserOn_",
  2432. smalltalk.method({
  2433. selector: "openBrowserOn:",
  2434. fn: function (aMethod) {
  2435. var self=this;
  2436. var browser=nil;
  2437. (browser=smalltalk.send((smalltalk.Browser || Browser), "_openOn_", [((($receiver = smalltalk.send(smalltalk.send(aMethod, "_methodClass", []), "_isMetaclass", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(aMethod, "_methodClass", []), "_instanceClass", []);})() : (function(){return smalltalk.send(aMethod, "_methodClass", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(aMethod, "_methodClass", []), "_instanceClass", []);}), (function(){return smalltalk.send(aMethod, "_methodClass", []);})]))]));
  2438. ((($receiver = smalltalk.send(smalltalk.send(aMethod, "_methodClass", []), "_isMetaclass", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(browser, "_selectTab_", [smalltalk.symbolFor("class")]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(browser, "_selectTab_", [smalltalk.symbolFor("class")]);})]));
  2439. (function($rec){smalltalk.send($rec, "_selectProtocol_", [smalltalk.send(aMethod, "_category", [])]);return smalltalk.send($rec, "_selectMethod_", [aMethod]);})(browser);
  2440. return self;}
  2441. }),
  2442. smalltalk.ReferencesBrowser);
  2443. smalltalk.addMethod(
  2444. "_referencedClasses",
  2445. smalltalk.method({
  2446. selector: "referencedClasses",
  2447. fn: function () {
  2448. var self=this;
  2449. return (($receiver = self['@referencedClasses']) == nil || $receiver == undefined) ? (function(){return (self['@referencedClasses']=smalltalk.send((smalltalk.Array || Array), "_new", []));})() : $receiver;
  2450. return self;}
  2451. }),
  2452. smalltalk.ReferencesBrowser);
  2453. smalltalk.addMethod(
  2454. "_renderBoxOn_",
  2455. smalltalk.method({
  2456. selector: "renderBoxOn:",
  2457. fn: function (html) {
  2458. var self=this;
  2459. (function($rec){smalltalk.send($rec, "_renderInputOn_", [html]);smalltalk.send($rec, "_renderImplementorsOn_", [html]);smalltalk.send($rec, "_renderSendersOn_", [html]);smalltalk.send($rec, "_renderReferencedClassesOn_", [html]);return smalltalk.send($rec, "_renderMatchesOn_", [html]);})(self);
  2460. return self;}
  2461. }),
  2462. smalltalk.ReferencesBrowser);
  2463. smalltalk.addMethod(
  2464. "_renderImplementorsOn_",
  2465. smalltalk.method({
  2466. selector: "renderImplementorsOn:",
  2467. fn: function (html) {
  2468. var self=this;
  2469. (self['@implementorsList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column implementors"]));
  2470. smalltalk.send(self, "_updateImplementorsList", []);
  2471. return self;}
  2472. }),
  2473. smalltalk.ReferencesBrowser);
  2474. smalltalk.addMethod(
  2475. "_renderInputOn_",
  2476. smalltalk.method({
  2477. selector: "renderInputOn:",
  2478. fn: function (html) {
  2479. var self=this;
  2480. (self['@input']=(function($rec){smalltalk.send($rec, "_class_", ["implementors"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(html, "_input", [])));
  2481. smalltalk.send(smalltalk.send(self['@input'], "_asJQuery", []), "_val_", [self['@selector']]);
  2482. smalltalk.send(self, "_setInputEvents", []);
  2483. return self;}
  2484. }),
  2485. smalltalk.ReferencesBrowser);
  2486. smalltalk.addMethod(
  2487. "_renderMatchesOn_",
  2488. smalltalk.method({
  2489. selector: "renderMatchesOn:",
  2490. fn: function (html) {
  2491. var self=this;
  2492. (self['@matchesList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column matches"]));
  2493. smalltalk.send(self, "_updateMatchesList", []);
  2494. return self;}
  2495. }),
  2496. smalltalk.ReferencesBrowser);
  2497. smalltalk.addMethod(
  2498. "_renderReferencedClassesOn_",
  2499. smalltalk.method({
  2500. selector: "renderReferencedClassesOn:",
  2501. fn: function (html) {
  2502. var self=this;
  2503. (self['@referencedClassesList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column referenced_classes"]));
  2504. smalltalk.send(self, "_updateReferencedClassesList", []);
  2505. return self;}
  2506. }),
  2507. smalltalk.ReferencesBrowser);
  2508. smalltalk.addMethod(
  2509. "_renderSendersOn_",
  2510. smalltalk.method({
  2511. selector: "renderSendersOn:",
  2512. fn: function (html) {
  2513. var self=this;
  2514. (self['@sendersList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column senders"]));
  2515. smalltalk.send(self, "_updateSendersList", []);
  2516. return self;}
  2517. }),
  2518. smalltalk.ReferencesBrowser);
  2519. smalltalk.addMethod(
  2520. "_search_",
  2521. smalltalk.method({
  2522. selector: "search:",
  2523. fn: function (aString) {
  2524. var self=this;
  2525. (function($rec){smalltalk.send($rec, "_searchReferencesFor_", [aString]);smalltalk.send($rec, "_updateImplementorsList", []);smalltalk.send($rec, "_updateSendersList", []);smalltalk.send($rec, "_updateReferencedClassesList", []);return smalltalk.send($rec, "_updateMatchesList", []);})(self);
  2526. return self;}
  2527. }),
  2528. smalltalk.ReferencesBrowser);
  2529. smalltalk.addMethod(
  2530. "_searchMethodSource",
  2531. smalltalk.method({
  2532. selector: "searchMethodSource",
  2533. fn: function () {
  2534. var self=this;
  2535. var regex=nil;
  2536. (regex=smalltalk.send(self['@selector'], "_allButFirst", []));
  2537. smalltalk.send(smalltalk.send(self, "_classesAndMetaclasses", []), "_do_", [(function(each){return smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodDictionary", []), "_values", []), "_do_", [(function(value){return ((($receiver = smalltalk.send(smalltalk.send(value, "_source", []), "_match_", [regex])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(self, "_matches", []), "_add_", [value]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(smalltalk.send(self, "_matches", []), "_add_", [value]);})]));})]);})]);
  2538. return self;}
  2539. }),
  2540. smalltalk.ReferencesBrowser);
  2541. smalltalk.addMethod(
  2542. "_searchReferencedClasses",
  2543. smalltalk.method({
  2544. selector: "searchReferencedClasses",
  2545. fn: function () {
  2546. var self=this;
  2547. smalltalk.send(smalltalk.send(self, "_classesAndMetaclasses", []), "_do_", [(function(each){return smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodDictionary", []), "_values", []), "_do_", [(function(value){return ((($receiver = smalltalk.send(smalltalk.send(value, "_referencedClasses", []), "_includes_", [self['@selector']])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(self, "_referencedClasses", []), "_add_", [value]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(smalltalk.send(self, "_referencedClasses", []), "_add_", [value]);})]));})]);})]);
  2548. return self;}
  2549. }),
  2550. smalltalk.ReferencesBrowser);
  2551. smalltalk.addMethod(
  2552. "_searchReferencesFor_",
  2553. smalltalk.method({
  2554. selector: "searchReferencesFor:",
  2555. fn: function (aString) {
  2556. var self=this;
  2557. (self['@selector']=aString);
  2558. (self['@implementors']=smalltalk.send((smalltalk.Array || Array), "_new", []));
  2559. (self['@senders']=smalltalk.send((smalltalk.Array || Array), "_new", []));
  2560. (self['@referencedClasses']=smalltalk.send((smalltalk.Array || Array), "_new", []));
  2561. (self['@matches']=smalltalk.send((smalltalk.Array || Array), "_new", []));
  2562. smalltalk.send(self, "_searchMethodSource", []);
  2563. ((($receiver = smalltalk.send(self['@selector'], "_match_", ["^[A-Z]"])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_searchSelectorReferences", []);})() : (function(){return smalltalk.send(self, "_searchReferencedClasses", []);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(self, "_searchSelectorReferences", []);}), (function(){return smalltalk.send(self, "_searchReferencedClasses", []);})]));
  2564. return self;}
  2565. }),
  2566. smalltalk.ReferencesBrowser);
  2567. smalltalk.addMethod(
  2568. "_searchSelectorReferences",
  2569. smalltalk.method({
  2570. selector: "searchSelectorReferences",
  2571. fn: function () {
  2572. var self=this;
  2573. smalltalk.send(smalltalk.send(self, "_classesAndMetaclasses", []), "_do_", [(function(each){return smalltalk.send(smalltalk.send(each, "_methodDictionary", []), "_keysAndValuesDo_", [(function(key, value){((($receiver = smalltalk.send(key, "__eq", [self['@selector']])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(self, "_implementors", []), "_add_", [value]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(smalltalk.send(self, "_implementors", []), "_add_", [value]);})]));return ((($receiver = smalltalk.send(smalltalk.send(value, "_messageSends", []), "_includes_", [self['@selector']])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(self, "_senders", []), "_add_", [value]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(smalltalk.send(self, "_senders", []), "_add_", [value]);})]));})]);})]);
  2574. return self;}
  2575. }),
  2576. smalltalk.ReferencesBrowser);
  2577. smalltalk.addMethod(
  2578. "_selector",
  2579. smalltalk.method({
  2580. selector: "selector",
  2581. fn: function () {
  2582. var self=this;
  2583. return self['@selector'];
  2584. return self;}
  2585. }),
  2586. smalltalk.ReferencesBrowser);
  2587. smalltalk.addMethod(
  2588. "_senders",
  2589. smalltalk.method({
  2590. selector: "senders",
  2591. fn: function () {
  2592. var self=this;
  2593. return (($receiver = self['@senders']) == nil || $receiver == undefined) ? (function(){return (self['@senders']=smalltalk.send((smalltalk.Array || Array), "_new", []));})() : $receiver;
  2594. return self;}
  2595. }),
  2596. smalltalk.ReferencesBrowser);
  2597. smalltalk.addMethod(
  2598. "_setInputEvents",
  2599. smalltalk.method({
  2600. selector: "setInputEvents",
  2601. fn: function () {
  2602. var self=this;
  2603. (function($rec){smalltalk.send($rec, "_onKeyUp_", [(function(){return (self['@timer']=smalltalk.send((function(){return smalltalk.send(self, "_search_", [smalltalk.send(smalltalk.send(self['@input'], "_asJQuery", []), "_val", [])]);}), "_valueWithTimeout_", [(100)]));})]);return smalltalk.send($rec, "_onKeyDown_", [(function(){return (($receiver = self['@timer']) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self['@timer'], "_clearTimeout", []);})() : nil;})]);})(self['@input']);
  2604. return self;}
  2605. }),
  2606. smalltalk.ReferencesBrowser);
  2607. smalltalk.addMethod(
  2608. "_updateImplementorsList",
  2609. smalltalk.method({
  2610. selector: "updateImplementorsList",
  2611. fn: function () {
  2612. var self=this;
  2613. smalltalk.send(self['@implementorsList'], "_contents_", [(function(html){(function($rec){smalltalk.send($rec, "_class_", ["column_label"]);smalltalk.send($rec, "_with_", [smalltalk.send(smalltalk.send("Implementors (", "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_implementors", []), "_size", []), "_asString", [])]), "__comma", [")"])]);return smalltalk.send($rec, "_style_", ["font-weight: bold"]);})(smalltalk.send(html, "_li", []));return smalltalk.send(smalltalk.send(self, "_implementors", []), "_do_", [(function(each){var li=nil;
  2614. (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(self, "_selector", [])])]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_openBrowserOn_", [each]);})]);})(li);})]);})]);
  2615. return self;}
  2616. }),
  2617. smalltalk.ReferencesBrowser);
  2618. smalltalk.addMethod(
  2619. "_updateMatchesList",
  2620. smalltalk.method({
  2621. selector: "updateMatchesList",
  2622. fn: function () {
  2623. var self=this;
  2624. 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;
  2625. (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);})]);})]);
  2626. return self;}
  2627. }),
  2628. smalltalk.ReferencesBrowser);
  2629. smalltalk.addMethod(
  2630. "_updateReferencedClassesList",
  2631. smalltalk.method({
  2632. selector: "updateReferencedClassesList",
  2633. fn: function () {
  2634. var self=this;
  2635. 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", []));})]);})]);
  2636. return self;}
  2637. }),
  2638. smalltalk.ReferencesBrowser);
  2639. smalltalk.addMethod(
  2640. "_updateSendersList",
  2641. smalltalk.method({
  2642. selector: "updateSendersList",
  2643. fn: function () {
  2644. var self=this;
  2645. 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", []));})]);})]);
  2646. return self;}
  2647. }),
  2648. smalltalk.ReferencesBrowser);
  2649. smalltalk.addMethod(
  2650. "_search_",
  2651. smalltalk.method({
  2652. selector: "search:",
  2653. fn: function (aString) {
  2654. var self=this;
  2655. return (function($rec){smalltalk.send($rec, "_searchReferencesFor_", [aString]);return smalltalk.send($rec, "_open", []);})(smalltalk.send(self, "_new", []));
  2656. return self;}
  2657. }),
  2658. smalltalk.ReferencesBrowser.klass);
  2659. smalltalk.addClass('TestRunner', smalltalk.TabWidget, ['selectedCategories', 'packagesList', 'selectedClasses', 'classesList', 'selectedMethods', 'progressBar', 'methodsList', 'result', 'statusDiv'], 'IDE');
  2660. smalltalk.addMethod(
  2661. "_allClasses",
  2662. smalltalk.method({
  2663. selector: "allClasses",
  2664. fn: function () {
  2665. var self=this;
  2666. return smalltalk.send(smalltalk.send((smalltalk.TestCase || TestCase), "_allSubclasses", []), "_select_", [(function(each){return smalltalk.send(smalltalk.send(each, "_isAbstract", []), "_not", []);})]);
  2667. return self;}
  2668. }),
  2669. smalltalk.TestRunner);
  2670. smalltalk.addMethod(
  2671. "_classes",
  2672. smalltalk.method({
  2673. selector: "classes",
  2674. fn: function () {
  2675. var self=this;
  2676. 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", [])]));})]);
  2677. return self;}
  2678. }),
  2679. smalltalk.TestRunner);
  2680. smalltalk.addMethod(
  2681. "_initialize",
  2682. smalltalk.method({
  2683. selector: "initialize",
  2684. fn: function () {
  2685. var self=this;
  2686. smalltalk.send(self, "_initialize", [], smalltalk.TestRunner.superclass || nil);
  2687. (self['@result']=smalltalk.send((smalltalk.TestResult || TestResult), "_new", []));
  2688. return self;}
  2689. }),
  2690. smalltalk.TestRunner);
  2691. smalltalk.addMethod(
  2692. "_isSelectedCategory_",
  2693. smalltalk.method({
  2694. selector: "isSelectedCategory:",
  2695. fn: function (aCategory) {
  2696. var self=this;
  2697. return smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_includes_", [aCategory]);
  2698. return self;}
  2699. }),
  2700. smalltalk.TestRunner);
  2701. smalltalk.addMethod(
  2702. "_isSelectedClass_",
  2703. smalltalk.method({
  2704. selector: "isSelectedClass:",
  2705. fn: function (aClass) {
  2706. var self=this;
  2707. return smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_includes_", [aClass]);
  2708. return self;}
  2709. }),
  2710. smalltalk.TestRunner);
  2711. smalltalk.addMethod(
  2712. "_label",
  2713. smalltalk.method({
  2714. selector: "label",
  2715. fn: function () {
  2716. var self=this;
  2717. return "SUnit";
  2718. return self;}
  2719. }),
  2720. smalltalk.TestRunner);
  2721. smalltalk.addMethod(
  2722. "_packages",
  2723. smalltalk.method({
  2724. selector: "packages",
  2725. fn: function () {
  2726. var self=this;
  2727. var packages=nil;
  2728. (packages=smalltalk.send((smalltalk.Array || Array), "_new", []));
  2729. 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", [])]);})]));})]);
  2730. return smalltalk.send(packages, "_sort", []);
  2731. return self;}
  2732. }),
  2733. smalltalk.TestRunner);
  2734. smalltalk.addMethod(
  2735. "_performFailure_",
  2736. smalltalk.method({
  2737. selector: "performFailure:",
  2738. fn: function (aTestCase) {
  2739. var self=this;
  2740. smalltalk.send(aTestCase, "_perform_", [smalltalk.send(aTestCase, "_selector", [])]);
  2741. return self;}
  2742. }),
  2743. smalltalk.TestRunner);
  2744. smalltalk.addMethod(
  2745. "_printErrors",
  2746. smalltalk.method({
  2747. selector: "printErrors",
  2748. fn: function () {
  2749. var self=this;
  2750. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_errors", []), "_size", []), "_asString", []), "__comma", [" errors, "]);
  2751. return self;}
  2752. }),
  2753. smalltalk.TestRunner);
  2754. smalltalk.addMethod(
  2755. "_printFailures",
  2756. smalltalk.method({
  2757. selector: "printFailures",
  2758. fn: function () {
  2759. var self=this;
  2760. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_failures", []), "_size", []), "_asString", []), "__comma", [" failures"]);
  2761. return self;}
  2762. }),
  2763. smalltalk.TestRunner);
  2764. smalltalk.addMethod(
  2765. "_printPasses",
  2766. smalltalk.method({
  2767. selector: "printPasses",
  2768. fn: function () {
  2769. var self=this;
  2770. 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, "]);
  2771. return self;}
  2772. }),
  2773. smalltalk.TestRunner);
  2774. smalltalk.addMethod(
  2775. "_printTotal",
  2776. smalltalk.method({
  2777. selector: "printTotal",
  2778. fn: function () {
  2779. var self=this;
  2780. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_total", []), "_asString", []), "__comma", [" runs, "]);
  2781. return self;}
  2782. }),
  2783. smalltalk.TestRunner);
  2784. smalltalk.addMethod(
  2785. "_progressBar",
  2786. smalltalk.method({
  2787. selector: "progressBar",
  2788. fn: function () {
  2789. var self=this;
  2790. return (($receiver = self['@progressBar']) == nil || $receiver == undefined) ? (function(){return (self['@progressBar']=smalltalk.send((smalltalk.ProgressBar || ProgressBar), "_new", []));})() : $receiver;
  2791. return self;}
  2792. }),
  2793. smalltalk.TestRunner);
  2794. smalltalk.addMethod(
  2795. "_renderBoxOn_",
  2796. smalltalk.method({
  2797. selector: "renderBoxOn:",
  2798. fn: function (html) {
  2799. var self=this;
  2800. (function($rec){smalltalk.send($rec, "_renderCategoriesOn_", [html]);smalltalk.send($rec, "_renderClassesOn_", [html]);return smalltalk.send($rec, "_renderResultsOn_", [html]);})(self);
  2801. return self;}
  2802. }),
  2803. smalltalk.TestRunner);
  2804. smalltalk.addMethod(
  2805. "_renderButtonsOn_",
  2806. smalltalk.method({
  2807. selector: "renderButtonsOn:",
  2808. fn: function (html) {
  2809. var self=this;
  2810. (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", []));
  2811. return self;}
  2812. }),
  2813. smalltalk.TestRunner);
  2814. smalltalk.addMethod(
  2815. "_renderCategoriesOn_",
  2816. smalltalk.method({
  2817. selector: "renderCategoriesOn:",
  2818. fn: function (html) {
  2819. var self=this;
  2820. (self['@packagesList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column sunit packages"]));
  2821. smalltalk.send(self, "_updateCategoriesList", []);
  2822. return self;}
  2823. }),
  2824. smalltalk.TestRunner);
  2825. smalltalk.addMethod(
  2826. "_renderClassesOn_",
  2827. smalltalk.method({
  2828. selector: "renderClassesOn:",
  2829. fn: function (html) {
  2830. var self=this;
  2831. (self['@classesList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column sunit classes"]));
  2832. smalltalk.send(self, "_updateClassesList", []);
  2833. return self;}
  2834. }),
  2835. smalltalk.TestRunner);
  2836. smalltalk.addMethod(
  2837. "_renderErrorsOn_",
  2838. smalltalk.method({
  2839. selector: "renderErrorsOn:",
  2840. fn: function (html) {
  2841. var self=this;
  2842. 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", []));})]);
  2843. return self;}
  2844. }),
  2845. smalltalk.TestRunner);
  2846. smalltalk.addMethod(
  2847. "_renderFailuresOn_",
  2848. smalltalk.method({
  2849. selector: "renderFailuresOn:",
  2850. fn: function (html) {
  2851. var self=this;
  2852. 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", []));})]);
  2853. return self;}
  2854. }),
  2855. smalltalk.TestRunner);
  2856. smalltalk.addMethod(
  2857. "_renderResultsOn_",
  2858. smalltalk.method({
  2859. selector: "renderResultsOn:",
  2860. fn: function (html) {
  2861. var self=this;
  2862. (self['@statusDiv']=smalltalk.send(html, "_div", []));
  2863. smalltalk.send(html, "_with_", [smalltalk.send(self, "_progressBar", [])]);
  2864. (self['@methodsList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column sunit results"]));
  2865. smalltalk.send(self, "_updateMethodsList", []);
  2866. smalltalk.send(self, "_updateStatusDiv", []);
  2867. return self;}
  2868. }),
  2869. smalltalk.TestRunner);
  2870. smalltalk.addMethod(
  2871. "_result",
  2872. smalltalk.method({
  2873. selector: "result",
  2874. fn: function () {
  2875. var self=this;
  2876. return self['@result'];
  2877. return self;}
  2878. }),
  2879. smalltalk.TestRunner);
  2880. smalltalk.addMethod(
  2881. "_run_",
  2882. smalltalk.method({
  2883. selector: "run:",
  2884. fn: function (aCollection) {
  2885. var self=this;
  2886. (self['@result']=smalltalk.send((smalltalk.TestResult || TestResult), "_new", []));
  2887. (function($rec){smalltalk.send($rec, "_updateStatusDiv", []);return smalltalk.send($rec, "_updateMethodsList", []);})(self);
  2888. smalltalk.send(smalltalk.send(self, "_progressBar", []), "_updatePercent_", [(0)]);
  2889. smalltalk.send(self['@result'], "_total_", [smalltalk.send(aCollection, "_size", [])]);
  2890. 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)]);})]);
  2891. return self;}
  2892. }),
  2893. smalltalk.TestRunner);
  2894. smalltalk.addMethod(
  2895. "_selectAllCategories",
  2896. smalltalk.method({
  2897. selector: "selectAllCategories",
  2898. fn: function () {
  2899. var self=this;
  2900. 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]);})]));})]);
  2901. (function($rec){smalltalk.send($rec, "_updateCategoriesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self);
  2902. return self;}
  2903. }),
  2904. smalltalk.TestRunner);
  2905. smalltalk.addMethod(
  2906. "_selectAllClasses",
  2907. smalltalk.method({
  2908. selector: "selectAllClasses",
  2909. fn: function () {
  2910. var self=this;
  2911. 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]);})]));})]);
  2912. (function($rec){smalltalk.send($rec, "_updateCategoriesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self);
  2913. return self;}
  2914. }),
  2915. smalltalk.TestRunner);
  2916. smalltalk.addMethod(
  2917. "_selectedCategories",
  2918. smalltalk.method({
  2919. selector: "selectedCategories",
  2920. fn: function () {
  2921. var self=this;
  2922. return (($receiver = self['@selectedCategories']) == nil || $receiver == undefined) ? (function(){return (self['@selectedCategories']=smalltalk.send((smalltalk.Array || Array), "_new", []));})() : $receiver;
  2923. return self;}
  2924. }),
  2925. smalltalk.TestRunner);
  2926. smalltalk.addMethod(
  2927. "_selectedClasses",
  2928. smalltalk.method({
  2929. selector: "selectedClasses",
  2930. fn: function () {
  2931. var self=this;
  2932. return (($receiver = self['@selectedClasses']) == nil || $receiver == undefined) ? (function(){return (self['@selectedClasses']=smalltalk.send((smalltalk.Array || Array), "_new", []));})() : $receiver;
  2933. return self;}
  2934. }),
  2935. smalltalk.TestRunner);
  2936. smalltalk.addMethod(
  2937. "_statusInfo",
  2938. smalltalk.method({
  2939. selector: "statusInfo",
  2940. fn: function () {
  2941. var self=this;
  2942. 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", [])]);
  2943. return self;}
  2944. }),
  2945. smalltalk.TestRunner);
  2946. smalltalk.addMethod(
  2947. "_testCases",
  2948. smalltalk.method({
  2949. selector: "testCases",
  2950. fn: function (){
  2951. var self=this;
  2952. var testCases=nil;
  2953. (testCases=[]);
  2954. smalltalk.send(smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_select_", [(function(each){return smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_includes_", [smalltalk.send(each, "_category", [])]);})]), "_do_", [(function(each){return smalltalk.send(testCases, "_addAll_", [smalltalk.send(each, "_buildSuite", [])]);})]);
  2955. return testCases;
  2956. return self;}
  2957. }),
  2958. smalltalk.TestRunner);
  2959. smalltalk.addMethod(
  2960. "_toggleCategory_",
  2961. smalltalk.method({
  2962. selector: "toggleCategory:",
  2963. fn: function (aCategory) {
  2964. var self=this;
  2965. ((($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]);})]));
  2966. (function($rec){smalltalk.send($rec, "_updateCategoriesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self);
  2967. return self;}
  2968. }),
  2969. smalltalk.TestRunner);
  2970. smalltalk.addMethod(
  2971. "_toggleClass_",
  2972. smalltalk.method({
  2973. selector: "toggleClass:",
  2974. fn: function (aClass) {
  2975. var self=this;
  2976. ((($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]);})]));
  2977. smalltalk.send(self, "_updateClassesList", []);
  2978. return self;}
  2979. }),
  2980. smalltalk.TestRunner);
  2981. smalltalk.addMethod(
  2982. "_updateCategoriesList",
  2983. smalltalk.method({
  2984. selector: "updateCategoriesList",
  2985. fn: function () {
  2986. var self=this;
  2987. 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;
  2988. (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);})]);})]);
  2989. return self;}
  2990. }),
  2991. smalltalk.TestRunner);
  2992. smalltalk.addMethod(
  2993. "_updateClassesList",
  2994. smalltalk.method({
  2995. selector: "updateClassesList",
  2996. fn: function () {
  2997. var self=this;
  2998. 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;
  2999. (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);})]);})]);
  3000. return self;}
  3001. }),
  3002. smalltalk.TestRunner);
  3003. smalltalk.addMethod(
  3004. "_updateMethodsList",
  3005. smalltalk.method({
  3006. selector: "updateMethodsList",
  3007. fn: function () {
  3008. var self=this;
  3009. smalltalk.send(self['@methodsList'], "_contents_", [(function(html){smalltalk.send(self, "_renderErrorsOn_", [html]);return smalltalk.send(self, "_renderFailuresOn_", [html]);})]);
  3010. return self;}
  3011. }),
  3012. smalltalk.TestRunner);
  3013. smalltalk.addMethod(
  3014. "_updateStatusDiv",
  3015. smalltalk.method({
  3016. selector: "updateStatusDiv",
  3017. fn: function () {
  3018. var self=this;
  3019. smalltalk.send(self['@statusDiv'], "_class_", [smalltalk.send("sunit status ", "__comma", [smalltalk.send(self['@result'], "_status", [])])]);
  3020. smalltalk.send(self['@statusDiv'], "_contents_", [(function(html){return smalltalk.send(smalltalk.send(html, "_span", []), "_with_", [smalltalk.send(self, "_statusInfo", [])]);})]);
  3021. return self;}
  3022. }),
  3023. smalltalk.TestRunner);
  3024. smalltalk.addClass('Workspace', smalltalk.TabWidget, ['sourceArea'], 'IDE');
  3025. smalltalk.addMethod(
  3026. "_clearWorkspace",
  3027. smalltalk.method({
  3028. selector: "clearWorkspace",
  3029. fn: function () {
  3030. var self=this;
  3031. smalltalk.send(self['@sourceArea'], "_clear", []);
  3032. return self;}
  3033. }),
  3034. smalltalk.Workspace);
  3035. smalltalk.addMethod(
  3036. "_doIt",
  3037. smalltalk.method({
  3038. selector: "doIt",
  3039. fn: function () {
  3040. var self=this;
  3041. smalltalk.send(self['@sourceArea'], "_doIt", []);
  3042. return self;}
  3043. }),
  3044. smalltalk.Workspace);
  3045. smalltalk.addMethod(
  3046. "_fileIn",
  3047. smalltalk.method({
  3048. selector: "fileIn",
  3049. fn: function () {
  3050. var self=this;
  3051. smalltalk.send(self['@sourceArea'], "_fileIn", []);
  3052. return self;}
  3053. }),
  3054. smalltalk.Workspace);
  3055. smalltalk.addMethod(
  3056. "_inspectIt",
  3057. smalltalk.method({
  3058. selector: "inspectIt",
  3059. fn: function () {
  3060. var self=this;
  3061. smalltalk.send(self['@sourceArea'], "_inspectIt", []);
  3062. return self;}
  3063. }),
  3064. smalltalk.Workspace);
  3065. smalltalk.addMethod(
  3066. "_label",
  3067. smalltalk.method({
  3068. selector: "label",
  3069. fn: function () {
  3070. var self=this;
  3071. return "Workspace";
  3072. return self;}
  3073. }),
  3074. smalltalk.Workspace);
  3075. smalltalk.addMethod(
  3076. "_printIt",
  3077. smalltalk.method({
  3078. selector: "printIt",
  3079. fn: function () {
  3080. var self=this;
  3081. smalltalk.send(self['@sourceArea'], "_printIt", []);
  3082. return self;}
  3083. }),
  3084. smalltalk.Workspace);
  3085. smalltalk.addMethod(
  3086. "_renderBoxOn_",
  3087. smalltalk.method({
  3088. selector: "renderBoxOn:",
  3089. fn: function (html) {
  3090. var self=this;
  3091. (self['@sourceArea']=smalltalk.send((smalltalk.SourceArea || SourceArea), "_new", []));
  3092. smalltalk.send(self['@sourceArea'], "_renderOn_", [html]);
  3093. return self;}
  3094. }),
  3095. smalltalk.Workspace);
  3096. smalltalk.addMethod(
  3097. "_renderButtonsOn_",
  3098. smalltalk.method({
  3099. selector: "renderButtonsOn:",
  3100. fn: function (html) {
  3101. var self=this;
  3102. (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", []));
  3103. (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", []));
  3104. (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", []));
  3105. (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", []));
  3106. (function($rec){smalltalk.send($rec, "_with_", ["Clear workspace"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_clearWorkspace", []);})]);})(smalltalk.send(html, "_button", []));
  3107. return self;}
  3108. }),
  3109. smalltalk.Workspace);
  3110. smalltalk.addMethod(
  3111. "_inspect",
  3112. smalltalk.method({
  3113. selector: "inspect",
  3114. fn: function () {
  3115. var self=this;
  3116. (function($rec){smalltalk.send($rec, "_inspect_", [self]);return smalltalk.send($rec, "_open", []);})(smalltalk.send((smalltalk.Inspector || Inspector), "_new", []));
  3117. return self;}
  3118. }),
  3119. smalltalk.Object);
  3120. smalltalk.addMethod(
  3121. "_inspectOn_",
  3122. smalltalk.method({
  3123. selector: "inspectOn:",
  3124. fn: function (anInspector) {
  3125. var self=this;
  3126. var variables=nil;
  3127. (variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));
  3128. smalltalk.send(variables, "_at_put_", ["#self", self]);
  3129. smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_allInstanceVariableNames", []), "_do_", [(function(each){return smalltalk.send(variables, "_at_put_", [each, smalltalk.send(self, "_instVarAt_", [each])]);})]);
  3130. (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector);
  3131. return self;}
  3132. }),
  3133. smalltalk.Object);
  3134. smalltalk.addMethod(
  3135. "_inspectOn_",
  3136. smalltalk.method({
  3137. selector: "inspectOn:",
  3138. fn: function (anInspector) {
  3139. var self=this;
  3140. var variables=nil;
  3141. (variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));
  3142. smalltalk.send(variables, "_at_put_", ["#self", self]);
  3143. smalltalk.send(self, "_withIndexDo_", [(function(each, i){return smalltalk.send(variables, "_at_put_", [i, each]);})]);
  3144. (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector);
  3145. return self;}
  3146. }),
  3147. smalltalk.Collection);
  3148. smalltalk.addMethod(
  3149. "_inspectOn_",
  3150. smalltalk.method({
  3151. selector: "inspectOn:",
  3152. fn: function (anInspector) {
  3153. var self=this;
  3154. var variables=nil;
  3155. (variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));
  3156. smalltalk.send(variables, "_at_put_", ["#self", self]);
  3157. smalltalk.send(variables, "_at_put_", ["#keys", smalltalk.send(self, "_keys", [])]);
  3158. smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return smalltalk.send(variables, "_at_put_", [key, value]);})]);
  3159. (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector);
  3160. return self;}
  3161. }),
  3162. smalltalk.HashedCollection);
  3163. smalltalk.addMethod(
  3164. "_inspectOn_",
  3165. smalltalk.method({
  3166. selector: "inspectOn:",
  3167. fn: function (anInspector) {
  3168. var self=this;
  3169. var label=nil;
  3170. smalltalk.send(self, "_inspectOn_", [anInspector], smalltalk.String.superclass || nil);
  3171. ((($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", []));})]));
  3172. smalltalk.send(anInspector, "_setLabel_", [label]);
  3173. return self;}
  3174. }),
  3175. smalltalk.String);
  3176. smalltalk.addMethod(
  3177. "_inspectOn_",
  3178. smalltalk.method({
  3179. selector: "inspectOn:",
  3180. fn: function (anInspector) {
  3181. var self=this;
  3182. var variables=nil;
  3183. (variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));
  3184. smalltalk.send(variables, "_at_put_", ["#self", self]);
  3185. smalltalk.send(self['@elements'], "_withIndexDo_", [(function(each, i){return smalltalk.send(variables, "_at_put_", [i, each]);})]);
  3186. (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector);
  3187. return self;}
  3188. }),
  3189. smalltalk.Set);
  3190. smalltalk.addMethod(
  3191. "_inspectOn_",
  3192. smalltalk.method({
  3193. selector: "inspectOn:",
  3194. fn: function (anInspector) {
  3195. var self=this;
  3196. var variables=nil;
  3197. (variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));
  3198. smalltalk.send(variables, "_at_put_", ["#self", self]);
  3199. smalltalk.send(variables, "_at_put_", ["#year", smalltalk.send(self, "_year", [])]);
  3200. smalltalk.send(variables, "_at_put_", ["#month", smalltalk.send(self, "_month", [])]);
  3201. smalltalk.send(variables, "_at_put_", ["#day", smalltalk.send(self, "_day", [])]);
  3202. smalltalk.send(variables, "_at_put_", ["#hours", smalltalk.send(self, "_hours", [])]);
  3203. smalltalk.send(variables, "_at_put_", ["#minutes", smalltalk.send(self, "_minutes", [])]);
  3204. smalltalk.send(variables, "_at_put_", ["#seconds", smalltalk.send(self, "_seconds", [])]);
  3205. smalltalk.send(variables, "_at_put_", ["#milliseconds", smalltalk.send(self, "_milliseconds", [])]);
  3206. (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector);
  3207. return self;}
  3208. }),
  3209. smalltalk.Date);
  3210. smalltalk.addMethod(
  3211. "_inspectOn_",
  3212. smalltalk.method({
  3213. selector: "inspectOn:",
  3214. fn: function (anInspector) {
  3215. var self=this;
  3216. var variables=nil;
  3217. (variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));
  3218. smalltalk.send(variables, "_at_put_", ["#self", self]);
  3219. smalltalk.send(variables, "_at_put_", ["#year", smalltalk.send(self, "_year", [])]);
  3220. smalltalk.send(variables, "_at_put_", ["#month", smalltalk.send(self, "_month", [])]);
  3221. smalltalk.send(variables, "_at_put_", ["#day", smalltalk.send(self, "_day", [])]);
  3222. smalltalk.send(variables, "_at_put_", ["#hours", smalltalk.send(self, "_hours", [])]);
  3223. smalltalk.send(variables, "_at_put_", ["#minutes", smalltalk.send(self, "_minutes", [])]);
  3224. smalltalk.send(variables, "_at_put_", ["#seconds", smalltalk.send(self, "_seconds", [])]);
  3225. smalltalk.send(variables, "_at_put_", ["#milliseconds", smalltalk.send(self, "_milliseconds", [])]);
  3226. (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector);
  3227. return self;}
  3228. }),
  3229. smalltalk.Date);
  3230. smalltalk.addMethod(
  3231. "_inspectOn_",
  3232. smalltalk.method({
  3233. selector: "inspectOn:",
  3234. fn: function (anInspector) {
  3235. var self=this;
  3236. var variables=nil;
  3237. (variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));
  3238. smalltalk.send(variables, "_at_put_", ["#self", self]);
  3239. smalltalk.send(variables, "_at_put_", ["#home", smalltalk.send(self, "_home", [])]);
  3240. smalltalk.send(variables, "_at_put_", ["#receiver", smalltalk.send(self, "_receiver", [])]);
  3241. smalltalk.send(variables, "_at_put_", ["#selector", smalltalk.send(self, "_selector", [])]);
  3242. smalltalk.send(variables, "_at_put_", ["#temps", smalltalk.send(self, "_temps", [])]);
  3243. smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_instanceVariableNames", []), "_do_", [(function(each){return smalltalk.send(variables, "_at_put_", [each, smalltalk.send(self, "_instVarAt_", [each])]);})]);
  3244. (function($rec){smalltalk.send($rec, "_setLabel_", [smalltalk.send(self, "_printString", [])]);return smalltalk.send($rec, "_setVariables_", [variables]);})(anInspector);
  3245. return self;}
  3246. }),
  3247. smalltalk.MethodContext);