IDE.deploy.js 153 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726
  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. }
  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. }),
  23. smalltalk.ClassesList);
  24. smalltalk.addMethod(
  25. "_category",
  26. smalltalk.method({
  27. selector: "category",
  28. fn: function () {
  29. var self = this;
  30. var $1;
  31. $1 = smalltalk.send(smalltalk.send(self, "_browser", []), "_selectedPackage", []);
  32. return $1;
  33. }
  34. }),
  35. smalltalk.ClassesList);
  36. smalltalk.addMethod(
  37. "_getNodes",
  38. smalltalk.method({
  39. selector: "getNodes",
  40. fn: function () {
  41. var self = this;
  42. var $1, $2;
  43. var classes;
  44. var children;
  45. var others;
  46. classes = smalltalk.send(smalltalk.send(self, "_browser", []), "_classes", []);
  47. children = [];
  48. others = [];
  49. smalltalk.send(classes, "_do_", [function (each) {$1 = smalltalk.send(classes, "_includes_", [smalltalk.send(each, "_superclass", [])]);if (smalltalk.assert($1)) {return smalltalk.send(others, "_add_", [each]);} else {return smalltalk.send(children, "_add_", [each]);}}]);
  50. $2 = smalltalk.send(children, "_collect_", [function (each) {return smalltalk.send(smalltalk.ClassesListNode || ClassesListNode, "_on_browser_classes_level_", [each, smalltalk.send(self, "_browser", []), others, 0]);}]);
  51. return $2;
  52. }
  53. }),
  54. smalltalk.ClassesList);
  55. smalltalk.addMethod(
  56. "_nodes",
  57. smalltalk.method({
  58. selector: "nodes",
  59. fn: function () {
  60. var self = this;
  61. if (($receiver = self['@nodes']) == nil || $receiver == undefined) {
  62. self['@nodes'] = smalltalk.send(self, "_getNodes", []);
  63. self['@nodes'];
  64. } else {
  65. self['@nodes'];
  66. }
  67. return self['@nodes'];
  68. }
  69. }),
  70. smalltalk.ClassesList);
  71. smalltalk.addMethod(
  72. "_renderOn_",
  73. smalltalk.method({
  74. selector: "renderOn:",
  75. fn: function (html) {
  76. var self = this;
  77. var $1, $2;
  78. $1 = smalltalk.send(html, "_ul", []);
  79. smalltalk.send($1, "_class_", ["amber_column browser classes"]);
  80. $2 = smalltalk.send($1, "_yourself", []);
  81. self['@ul'] = $2;
  82. smalltalk.send(self, "_updateNodes", []);
  83. return self;
  84. }
  85. }),
  86. smalltalk.ClassesList);
  87. smalltalk.addMethod(
  88. "_resetNodes",
  89. smalltalk.method({
  90. selector: "resetNodes",
  91. fn: function () {
  92. var self = this;
  93. self['@nodes'] = nil;
  94. return self;
  95. }
  96. }),
  97. smalltalk.ClassesList);
  98. smalltalk.addMethod(
  99. "_updateNodes",
  100. smalltalk.method({
  101. selector: "updateNodes",
  102. fn: function () {
  103. var self = this;
  104. smalltalk.send(self['@ul'], "_contents_", [function (html) {return smalltalk.send(smalltalk.send(self, "_nodes", []), "_do_", [function (each) {return smalltalk.send(each, "_renderOn_", [html]);}]);}]);
  105. return self;
  106. }
  107. }),
  108. smalltalk.ClassesList);
  109. smalltalk.addMethod(
  110. "_on_",
  111. smalltalk.method({
  112. selector: "on:",
  113. fn: function (aBrowser) {
  114. var self = this;
  115. var $2, $3, $1;
  116. $2 = smalltalk.send(self, "_new", []);
  117. smalltalk.send($2, "_browser_", [aBrowser]);
  118. $3 = smalltalk.send($2, "_yourself", []);
  119. $1 = $3;
  120. return $1;
  121. }
  122. }),
  123. smalltalk.ClassesList.klass);
  124. smalltalk.addClass('ClassesListNode', smalltalk.Widget, ['browser', 'theClass', 'level', 'nodes'], 'IDE');
  125. smalltalk.addMethod(
  126. "_browser",
  127. smalltalk.method({
  128. selector: "browser",
  129. fn: function () {
  130. var self = this;
  131. return self['@browser'];
  132. }
  133. }),
  134. smalltalk.ClassesListNode);
  135. smalltalk.addMethod(
  136. "_browser_",
  137. smalltalk.method({
  138. selector: "browser:",
  139. fn: function (aBrowser) {
  140. var self = this;
  141. self['@browser'] = aBrowser;
  142. return self;
  143. }
  144. }),
  145. smalltalk.ClassesListNode);
  146. smalltalk.addMethod(
  147. "_getNodesFrom_",
  148. smalltalk.method({
  149. selector: "getNodesFrom:",
  150. fn: function (aCollection) {
  151. var self = this;
  152. var $1;
  153. var children;
  154. var others;
  155. children = [];
  156. others = [];
  157. smalltalk.send(aCollection, "_do_", [function (each) {$1 = smalltalk.send(smalltalk.send(each, "_superclass", []), "__eq", [smalltalk.send(self, "_theClass", [])]);if (smalltalk.assert($1)) {return smalltalk.send(children, "_add_", [each]);} else {return smalltalk.send(others, "_add_", [each]);}}]);
  158. self['@nodes'] = smalltalk.send(children, "_collect_", [function (each) {return smalltalk.send(smalltalk.ClassesListNode || ClassesListNode, "_on_browser_classes_level_", [each, smalltalk.send(self, "_browser", []), others, smalltalk.send(smalltalk.send(self, "_level", []), "__plus", [1])]);}]);
  159. return self;
  160. }
  161. }),
  162. smalltalk.ClassesListNode);
  163. smalltalk.addMethod(
  164. "_label",
  165. smalltalk.method({
  166. selector: "label",
  167. fn: function () {
  168. var self = this;
  169. var $1;
  170. var str;
  171. str = smalltalk.send(smalltalk.send(smalltalk.String || String, "_new", []), "_writeStream", []);
  172. smalltalk.send(smalltalk.send(self, "_level", []), "_timesRepeat_", [function () {return smalltalk.send(str, "_nextPutAll_", ["    "]);}]);
  173. smalltalk.send(str, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_theClass", []), "_name", [])]);
  174. $1 = smalltalk.send(str, "_contents", []);
  175. return $1;
  176. }
  177. }),
  178. smalltalk.ClassesListNode);
  179. smalltalk.addMethod(
  180. "_level",
  181. smalltalk.method({
  182. selector: "level",
  183. fn: function () {
  184. var self = this;
  185. return self['@level'];
  186. }
  187. }),
  188. smalltalk.ClassesListNode);
  189. smalltalk.addMethod(
  190. "_level_",
  191. smalltalk.method({
  192. selector: "level:",
  193. fn: function (anInteger) {
  194. var self = this;
  195. self['@level'] = anInteger;
  196. return self;
  197. }
  198. }),
  199. smalltalk.ClassesListNode);
  200. smalltalk.addMethod(
  201. "_nodes",
  202. smalltalk.method({
  203. selector: "nodes",
  204. fn: function () {
  205. var self = this;
  206. return self['@nodes'];
  207. }
  208. }),
  209. smalltalk.ClassesListNode);
  210. smalltalk.addMethod(
  211. "_renderOn_",
  212. smalltalk.method({
  213. selector: "renderOn:",
  214. fn: function (html) {
  215. var self = this;
  216. var $1, $2;
  217. var li;
  218. var cssClass;
  219. cssClass = "";
  220. li = smalltalk.send(smalltalk.send(html, "_li", []), "_onClick_", [function () {return smalltalk.send(smalltalk.send(self, "_browser", []), "_selectClass_", [smalltalk.send(self, "_theClass", [])]);}]);
  221. smalltalk.send(smalltalk.send(li, "_asJQuery", []), "_html_", [smalltalk.send(self, "_label", [])]);
  222. $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_browser", []), "_selectedClass", []), "__eq", [smalltalk.send(self, "_theClass", [])]);
  223. if (smalltalk.assert($1)) {
  224. cssClass = smalltalk.send(cssClass, "__comma", [" selected"]);
  225. }
  226. $2 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_theClass", []), "_comment", []), "_isEmpty", []);
  227. if (!smalltalk.assert($2)) {
  228. cssClass = smalltalk.send(cssClass, "__comma", [" commented"]);
  229. }
  230. smalltalk.send(li, "_class_", [cssClass]);
  231. smalltalk.send(smalltalk.send(self, "_nodes", []), "_do_", [function (each) {return smalltalk.send(each, "_renderOn_", [html]);}]);
  232. return self;
  233. }
  234. }),
  235. smalltalk.ClassesListNode);
  236. smalltalk.addMethod(
  237. "_theClass",
  238. smalltalk.method({
  239. selector: "theClass",
  240. fn: function () {
  241. var self = this;
  242. return self['@theClass'];
  243. }
  244. }),
  245. smalltalk.ClassesListNode);
  246. smalltalk.addMethod(
  247. "_theClass_",
  248. smalltalk.method({
  249. selector: "theClass:",
  250. fn: function (aClass) {
  251. var self = this;
  252. self['@theClass'] = aClass;
  253. return self;
  254. }
  255. }),
  256. smalltalk.ClassesListNode);
  257. smalltalk.addMethod(
  258. "_on_browser_classes_level_",
  259. smalltalk.method({
  260. selector: "on:browser:classes:level:",
  261. fn: function (aClass, aBrowser, aCollection, anInteger) {
  262. var self = this;
  263. var $2, $3, $1;
  264. $2 = smalltalk.send(self, "_new", []);
  265. smalltalk.send($2, "_theClass_", [aClass]);
  266. smalltalk.send($2, "_browser_", [aBrowser]);
  267. smalltalk.send($2, "_level_", [anInteger]);
  268. smalltalk.send($2, "_getNodesFrom_", [aCollection]);
  269. $3 = smalltalk.send($2, "_yourself", []);
  270. $1 = $3;
  271. return $1;
  272. }
  273. }),
  274. smalltalk.ClassesListNode.klass);
  275. smalltalk.addClass('DebugErrorHandler', smalltalk.ErrorHandler, [], 'IDE');
  276. smalltalk.addMethod(
  277. "_handleError_",
  278. smalltalk.method({
  279. selector: "handleError:",
  280. fn: function (anError) {
  281. var self = this;
  282. var $1, $2;
  283. smalltalk.send(function () {$1 = smalltalk.send(smalltalk.Debugger || Debugger, "_new", []);smalltalk.send($1, "_error_", [anError]);$2 = smalltalk.send($1, "_open", []);return $2;}, "_on_do_", [smalltalk.Error || Error, function (error) {return smalltalk.send(smalltalk.send(smalltalk.ErrorHandler || ErrorHandler, "_new", []), "_handleError_", [error]);}]);
  284. return self;
  285. }
  286. }),
  287. smalltalk.DebugErrorHandler);
  288. smalltalk.addMethod(
  289. "_initialize",
  290. smalltalk.method({
  291. selector: "initialize",
  292. fn: function () {
  293. var self = this;
  294. smalltalk.send(self, "_register", []);
  295. return self;
  296. }
  297. }),
  298. smalltalk.DebugErrorHandler.klass);
  299. smalltalk.addClass('SourceArea', smalltalk.Widget, ['editor', 'div', 'receiver', 'onDoIt'], 'IDE');
  300. smalltalk.addMethod(
  301. "_clear",
  302. smalltalk.method({
  303. selector: "clear",
  304. fn: function () {
  305. var self = this;
  306. smalltalk.send(self, "_val_", [""]);
  307. return self;
  308. }
  309. }),
  310. smalltalk.SourceArea);
  311. smalltalk.addMethod(
  312. "_currentLine",
  313. smalltalk.method({
  314. selector: "currentLine",
  315. fn: function () {
  316. var self = this;
  317. var $1;
  318. $1 = smalltalk.send(self['@editor'], "_getLine_", [smalltalk.send(smalltalk.send(self['@editor'], "_getCursor", []), "_line", [])]);
  319. return $1;
  320. }
  321. }),
  322. smalltalk.SourceArea);
  323. smalltalk.addMethod(
  324. "_currentLineOrSelection",
  325. smalltalk.method({
  326. selector: "currentLineOrSelection",
  327. fn: function () {
  328. var self = this;
  329. var $2, $1;
  330. $2 = smalltalk.send(self['@editor'], "_somethingSelected", []);
  331. if (smalltalk.assert($2)) {
  332. $1 = smalltalk.send(self, "_selection", []);
  333. } else {
  334. $1 = smalltalk.send(self, "_currentLine", []);
  335. }
  336. return $1;
  337. }
  338. }),
  339. smalltalk.SourceArea);
  340. smalltalk.addMethod(
  341. "_doIt",
  342. smalltalk.method({
  343. selector: "doIt",
  344. fn: function () {
  345. var self = this;
  346. var $1;
  347. var result;
  348. result = smalltalk.send(self, "_eval_", [smalltalk.send(self, "_currentLineOrSelection", [])]);
  349. $1 = smalltalk.send(self, "_onDoIt", []);
  350. if (($receiver = $1) == nil || $receiver == undefined) {
  351. } else {
  352. smalltalk.send(smalltalk.send(self, "_onDoIt", []), "_value", []);
  353. }
  354. return result;
  355. }
  356. }),
  357. smalltalk.SourceArea);
  358. smalltalk.addMethod(
  359. "_editor",
  360. smalltalk.method({
  361. selector: "editor",
  362. fn: function () {
  363. var self = this;
  364. return self['@editor'];
  365. }
  366. }),
  367. smalltalk.SourceArea);
  368. smalltalk.addMethod(
  369. "_eval_",
  370. smalltalk.method({
  371. selector: "eval:",
  372. fn: function (aString) {
  373. var self = this;
  374. var $1, $2;
  375. var $early = {};
  376. try {
  377. var compiler;
  378. compiler = smalltalk.send(smalltalk.Compiler || Compiler, "_new", []);
  379. smalltalk.send(function () {return smalltalk.send(compiler, "_parseExpression_", [aString]);}, "_on_do_", [smalltalk.Error || Error, function (ex) {$1 = smalltalk.send(window, "_alert_", [smalltalk.send(ex, "_messageText", [])]);throw $early = [$1];}]);
  380. $2 = 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", []), []]);
  381. return $2;
  382. } catch (e) {
  383. if (e === $early) {
  384. return e[0];
  385. }
  386. throw e;
  387. }
  388. }
  389. }),
  390. smalltalk.SourceArea);
  391. smalltalk.addMethod(
  392. "_fileIn",
  393. smalltalk.method({
  394. selector: "fileIn",
  395. fn: function () {
  396. var self = this;
  397. smalltalk.send(smalltalk.send(smalltalk.Importer || Importer, "_new", []), "_import_", [smalltalk.send(smalltalk.send(self, "_currentLineOrSelection", []), "_readStream", [])]);
  398. return self;
  399. }
  400. }),
  401. smalltalk.SourceArea);
  402. smalltalk.addMethod(
  403. "_focus",
  404. smalltalk.method({
  405. selector: "focus",
  406. fn: function (){
  407. var self=this;
  408. smalltalk.send(smalltalk.send(self,"_editor",[]),"_focus",[]);
  409. return self}
  410. }),
  411. smalltalk.SourceArea);
  412. smalltalk.addMethod(
  413. "_handleKeyDown_",
  414. smalltalk.method({
  415. selector: "handleKeyDown:",
  416. fn: function (anEvent) {
  417. var self = this;
  418. if (anEvent.ctrlKey) {
  419. if (anEvent.keyCode === 80) {
  420. self._printIt();
  421. anEvent.preventDefault();
  422. return false;
  423. }
  424. if (anEvent.keyCode === 68) {
  425. self._doIt();
  426. anEvent.preventDefault();
  427. return false;
  428. }
  429. if (anEvent.keyCode === 73) {
  430. self._inspectIt();
  431. anEvent.preventDefault();
  432. return false;
  433. }
  434. }
  435. return self;
  436. }
  437. }),
  438. smalltalk.SourceArea);
  439. smalltalk.addMethod(
  440. "_inspectIt",
  441. smalltalk.method({
  442. selector: "inspectIt",
  443. fn: function () {
  444. var self = this;
  445. smalltalk.send(smalltalk.send(self, "_doIt", []), "_inspect", []);
  446. return self;
  447. }
  448. }),
  449. smalltalk.SourceArea);
  450. smalltalk.addMethod(
  451. "_onDoIt",
  452. smalltalk.method({
  453. selector: "onDoIt",
  454. fn: function () {
  455. var self = this;
  456. return self['@onDoIt'];
  457. }
  458. }),
  459. smalltalk.SourceArea);
  460. smalltalk.addMethod(
  461. "_onDoIt_",
  462. smalltalk.method({
  463. selector: "onDoIt:",
  464. fn: function (aBlock) {
  465. var self = this;
  466. self['@onDoIt'] = aBlock;
  467. return self;
  468. }
  469. }),
  470. smalltalk.SourceArea);
  471. smalltalk.addMethod(
  472. "_onKeyDown_",
  473. smalltalk.method({
  474. selector: "onKeyDown:",
  475. fn: function (aBlock) {
  476. var self = this;
  477. smalltalk.send(self['@div'], "_onKeyDown_", [aBlock]);
  478. return self;
  479. }
  480. }),
  481. smalltalk.SourceArea);
  482. smalltalk.addMethod(
  483. "_onKeyUp_",
  484. smalltalk.method({
  485. selector: "onKeyUp:",
  486. fn: function (aBlock) {
  487. var self = this;
  488. smalltalk.send(self['@div'], "_onKeyUp_", [aBlock]);
  489. return self;
  490. }
  491. }),
  492. smalltalk.SourceArea);
  493. smalltalk.addMethod(
  494. "_print_",
  495. smalltalk.method({
  496. selector: "print:",
  497. fn: function (aString){
  498. var self=this;
  499. var start;
  500. var stop;
  501. var currentLine;
  502. currentLine=smalltalk.send(smalltalk.send(self["@editor"],"_getCursor_",[false]),"_line",[]);
  503. start=smalltalk.send((smalltalk.HashedCollection || HashedCollection),"_new",[]);
  504. smalltalk.send(start,"_at_put_",["line",currentLine]);
  505. smalltalk.send(start,"_at_put_",["ch",smalltalk.send(smalltalk.send(self["@editor"],"_getCursor_",[false]),"_ch",[])]);
  506. smalltalk.send(smalltalk.send(self["@editor"],"_getSelection",[]),"_ifEmpty_",[(function(){
  507. smalltalk.send(start,"_at_put_",["ch",smalltalk.send(smalltalk.send(self["@editor"],"_getLine_",[currentLine]),"_size",[])]);
  508. return smalltalk.send(self["@editor"],"_setSelection_end_",[smalltalk.HashedCollection._fromPairs_([smalltalk.send("line","__minus_gt",[currentLine]),smalltalk.send("ch","__minus_gt",[(0)])]),start]);
  509. })]);
  510. stop=smalltalk.send((smalltalk.HashedCollection || HashedCollection),"_new",[]);
  511. smalltalk.send(stop,"_at_put_",["line",currentLine]);
  512. smalltalk.send(stop,"_at_put_",["ch",smalltalk.send(smalltalk.send(smalltalk.send(start,"_at_",["ch"]),"__plus",[smalltalk.send(aString,"_size",[])]),"__plus",[(2)])]);
  513. smalltalk.send(self["@editor"],"_replaceSelection_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self["@editor"],"_getSelection",[]),"__comma",[" "]),"__comma",[aString]),"__comma",[" "])]);
  514. smalltalk.send(self["@editor"],"_setCursor_",[smalltalk.send(self["@editor"],"_getCursor_",[true])]);
  515. smalltalk.send(self["@editor"],"_setSelection_end_",[stop,start]);
  516. return self}
  517. }),
  518. smalltalk.SourceArea);
  519. smalltalk.addMethod(
  520. "_printIt",
  521. smalltalk.method({
  522. selector: "printIt",
  523. fn: function (){
  524. var self=this;
  525. smalltalk.send(self,"_print_",[smalltalk.send(smalltalk.send(self,"_doIt",[]),"_printString",[])]);
  526. smalltalk.send(self,"_focus",[]);
  527. return self}
  528. }),
  529. smalltalk.SourceArea);
  530. smalltalk.addMethod(
  531. "_receiver",
  532. smalltalk.method({
  533. selector: "receiver",
  534. fn: function () {
  535. var self = this;
  536. var $1;
  537. if (($receiver = self['@receiver']) == nil || $receiver == undefined) {
  538. $1 = smalltalk.send(smalltalk.DoIt || DoIt, "_new", []);
  539. } else {
  540. $1 = self['@receiver'];
  541. }
  542. return $1;
  543. }
  544. }),
  545. smalltalk.SourceArea);
  546. smalltalk.addMethod(
  547. "_receiver_",
  548. smalltalk.method({
  549. selector: "receiver:",
  550. fn: function (anObject) {
  551. var self = this;
  552. self['@receiver'] = anObject;
  553. return self;
  554. }
  555. }),
  556. smalltalk.SourceArea);
  557. smalltalk.addMethod(
  558. "_renderOn_",
  559. smalltalk.method({
  560. selector: "renderOn:",
  561. fn: function (html) {
  562. var self = this;
  563. var textarea;
  564. self['@div'] = smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["source"]);
  565. smalltalk.send(self['@div'], "_with_", [function () {textarea = smalltalk.send(html, "_textarea", []);return textarea;}]);
  566. smalltalk.send(self, "_setEditorOn_", [smalltalk.send(textarea, "_element", [])]);
  567. smalltalk.send(self['@div'], "_onKeyDown_", [function (e) {return smalltalk.send(self, "_handleKeyDown_", [e]);}]);
  568. return self;
  569. }
  570. }),
  571. smalltalk.SourceArea);
  572. smalltalk.addMethod(
  573. "_selection",
  574. smalltalk.method({
  575. selector: "selection",
  576. fn: function () {
  577. var self = this;
  578. var $1;
  579. $1 = smalltalk.send(self['@editor'], "_getSelection", []);
  580. return $1;
  581. }
  582. }),
  583. smalltalk.SourceArea);
  584. smalltalk.addMethod(
  585. "_selectionEnd",
  586. smalltalk.method({
  587. selector: "selectionEnd",
  588. fn: function () {
  589. var self = this;
  590. var $1;
  591. $1 = smalltalk.send(smalltalk.send(textarea, "_element", []), "_selectionEnd", []);
  592. return $1;
  593. }
  594. }),
  595. smalltalk.SourceArea);
  596. smalltalk.addMethod(
  597. "_selectionEnd_",
  598. smalltalk.method({
  599. selector: "selectionEnd:",
  600. fn: function (anInteger) {
  601. var self = this;
  602. smalltalk.send(smalltalk.send(textarea, "_element", []), "_selectionEnd_", [anInteger]);
  603. return self;
  604. }
  605. }),
  606. smalltalk.SourceArea);
  607. smalltalk.addMethod(
  608. "_selectionStart",
  609. smalltalk.method({
  610. selector: "selectionStart",
  611. fn: function () {
  612. var self = this;
  613. var $1;
  614. $1 = smalltalk.send(smalltalk.send(textarea, "_element", []), "_selectionStart", []);
  615. return $1;
  616. }
  617. }),
  618. smalltalk.SourceArea);
  619. smalltalk.addMethod(
  620. "_selectionStart_",
  621. smalltalk.method({
  622. selector: "selectionStart:",
  623. fn: function (anInteger) {
  624. var self = this;
  625. smalltalk.send(smalltalk.send(textarea, "_element", []), "_selectionStart_", [anInteger]);
  626. return self;
  627. }
  628. }),
  629. smalltalk.SourceArea);
  630. smalltalk.addMethod(
  631. "_setEditorOn_",
  632. smalltalk.method({
  633. selector: "setEditorOn:",
  634. fn: function (aTextarea) {
  635. var self = this;
  636. self['@editor'] = CodeMirror.fromTextArea(aTextarea, {theme: "amber", lineNumbers: true, enterMode: "flat", matchBrackets: true, electricChars: false});
  637. return self;
  638. }
  639. }),
  640. smalltalk.SourceArea);
  641. smalltalk.addMethod(
  642. "_val",
  643. smalltalk.method({
  644. selector: "val",
  645. fn: function () {
  646. var self = this;
  647. var $1;
  648. $1 = smalltalk.send(self['@editor'], "_getValue", []);
  649. return $1;
  650. }
  651. }),
  652. smalltalk.SourceArea);
  653. smalltalk.addMethod(
  654. "_val_",
  655. smalltalk.method({
  656. selector: "val:",
  657. fn: function (aString) {
  658. var self = this;
  659. smalltalk.send(self['@editor'], "_setValue_", [aString]);
  660. return self;
  661. }
  662. }),
  663. smalltalk.SourceArea);
  664. smalltalk.addClass('TabManager', smalltalk.Widget, ['selectedTab', 'tabs', 'opened', 'ul', 'input'], 'IDE');
  665. smalltalk.addMethod(
  666. "_addTab_",
  667. smalltalk.method({
  668. selector: "addTab:",
  669. fn: function (aWidget) {
  670. var self = this;
  671. smalltalk.send(smalltalk.send(self, "_tabs", []), "_add_", [aWidget]);
  672. smalltalk.send(aWidget, "_appendToJQuery_", [smalltalk.send("#amber", "_asJQuery", [])]);
  673. smalltalk.send(aWidget, "_hide", []);
  674. return self;
  675. }
  676. }),
  677. smalltalk.TabManager);
  678. smalltalk.addMethod(
  679. "_close",
  680. smalltalk.method({
  681. selector: "close",
  682. fn: function () {
  683. var self = this;
  684. if (smalltalk.assert(self['@opened'])) {
  685. smalltalk.send(smalltalk.send("#amber", "_asJQuery", []), "_hide", []);
  686. smalltalk.send(smalltalk.send(self['@ul'], "_asJQuery", []), "_hide", []);
  687. smalltalk.send(self['@selectedTab'], "_hide", []);
  688. smalltalk.send(self, "_removeBodyMargin", []);
  689. smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_removeClass_", ["amberBody"]);
  690. self['@opened'] = false;
  691. self['@opened'];
  692. }
  693. return self;
  694. }
  695. }),
  696. smalltalk.TabManager);
  697. smalltalk.addMethod(
  698. "_closeTab_",
  699. smalltalk.method({
  700. selector: "closeTab:",
  701. fn: function (aWidget) {
  702. var self = this;
  703. smalltalk.send(self, "_removeTab_", [aWidget]);
  704. smalltalk.send(self, "_selectTab_", [smalltalk.send(smalltalk.send(self, "_tabs", []), "_last", [])]);
  705. smalltalk.send(aWidget, "_remove", []);
  706. smalltalk.send(self, "_update", []);
  707. return self;
  708. }
  709. }),
  710. smalltalk.TabManager);
  711. smalltalk.addMethod(
  712. "_initialize",
  713. smalltalk.method({
  714. selector: "initialize",
  715. fn: function () {
  716. var self = this;
  717. var $1, $2, $3;
  718. smalltalk.send(self, "_initialize", [], smalltalk.Widget);
  719. self['@opened'] = true;
  720. smalltalk.send(function (html) {return smalltalk.send(smalltalk.send(html, "_div", []), "_id_", ["amber"]);}, "_appendToJQuery_", [smalltalk.send("body", "_asJQuery", [])]);
  721. smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_addClass_", ["amberBody"]);
  722. smalltalk.send(self, "_appendToJQuery_", [smalltalk.send("#amber", "_asJQuery", [])]);
  723. smalltalk.send(self, "_addTab_", [smalltalk.send(smalltalk.IDETranscript || IDETranscript, "_current", [])]);
  724. smalltalk.send(self, "_addTab_", [smalltalk.send(smalltalk.Workspace || Workspace, "_new", [])]);
  725. $1 = smalltalk.send(self, "_addTab_", [smalltalk.send(smalltalk.TestRunner || TestRunner, "_new", [])]);
  726. smalltalk.send(self, "_selectTab_", [smalltalk.send(smalltalk.send(self, "_tabs", []), "_last", [])]);
  727. smalltalk.send(self, "_onResize_", [function () {smalltalk.send(self, "_updateBodyMargin", []);$2 = smalltalk.send(self, "_updatePosition", []);return $2;}]);
  728. $3 = smalltalk.send(self, "_onWindowResize_", [function () {return smalltalk.send(self, "_updatePosition", []);}]);
  729. return self;
  730. }
  731. }),
  732. smalltalk.TabManager);
  733. smalltalk.addMethod(
  734. "_labelFor_",
  735. smalltalk.method({
  736. selector: "labelFor:",
  737. fn: function (aWidget) {
  738. var self = this;
  739. var $1;
  740. var label;
  741. var maxSize;
  742. maxSize = 15;
  743. label = smalltalk.send(smalltalk.send(aWidget, "_label", []), "_copyFrom_to_", [0, smalltalk.send(smalltalk.send(smalltalk.send(aWidget, "_label", []), "_size", []), "_min_", [maxSize])]);
  744. $1 = smalltalk.send(smalltalk.send(smalltalk.send(aWidget, "_label", []), "_size", []), "__gt", [maxSize]);
  745. if (smalltalk.assert($1)) {
  746. label = smalltalk.send(label, "__comma", ["..."]);
  747. }
  748. return label;
  749. }
  750. }),
  751. smalltalk.TabManager);
  752. smalltalk.addMethod(
  753. "_newBrowserTab",
  754. smalltalk.method({
  755. selector: "newBrowserTab",
  756. fn: function () {
  757. var self = this;
  758. smalltalk.send(smalltalk.Browser || Browser, "_open", []);
  759. return self;
  760. }
  761. }),
  762. smalltalk.TabManager);
  763. smalltalk.addMethod(
  764. "_onResize_",
  765. smalltalk.method({
  766. selector: "onResize:",
  767. fn: function (aBlock) {
  768. var self = this;
  769. jQuery("#amber").resizable({handles: "n", resize: aBlock, minHeight: 230});
  770. return self;
  771. }
  772. }),
  773. smalltalk.TabManager);
  774. smalltalk.addMethod(
  775. "_onWindowResize_",
  776. smalltalk.method({
  777. selector: "onWindowResize:",
  778. fn: function (aBlock) {
  779. var self = this;
  780. jQuery(window).resize(aBlock);
  781. return self;
  782. }
  783. }),
  784. smalltalk.TabManager);
  785. smalltalk.addMethod(
  786. "_open",
  787. smalltalk.method({
  788. selector: "open",
  789. fn: function () {
  790. var self = this;
  791. if (!smalltalk.assert(self['@opened'])) {
  792. smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_addClass_", ["amberBody"]);
  793. smalltalk.send(smalltalk.send("#amber", "_asJQuery", []), "_show", []);
  794. smalltalk.send(smalltalk.send(self['@ul'], "_asJQuery", []), "_show", []);
  795. smalltalk.send(self, "_updateBodyMargin", []);
  796. smalltalk.send(self['@selectedTab'], "_show", []);
  797. self['@opened'] = true;
  798. self['@opened'];
  799. }
  800. return self;
  801. }
  802. }),
  803. smalltalk.TabManager);
  804. smalltalk.addMethod(
  805. "_removeBodyMargin",
  806. smalltalk.method({
  807. selector: "removeBodyMargin",
  808. fn: function () {
  809. var self = this;
  810. smalltalk.send(self, "_setBodyMargin_", [0]);
  811. return self;
  812. }
  813. }),
  814. smalltalk.TabManager);
  815. smalltalk.addMethod(
  816. "_removeTab_",
  817. smalltalk.method({
  818. selector: "removeTab:",
  819. fn: function (aWidget) {
  820. var self = this;
  821. smalltalk.send(smalltalk.send(self, "_tabs", []), "_remove_", [aWidget]);
  822. smalltalk.send(self, "_update", []);
  823. return self;
  824. }
  825. }),
  826. smalltalk.TabManager);
  827. smalltalk.addMethod(
  828. "_renderOn_",
  829. smalltalk.method({
  830. selector: "renderOn:",
  831. fn: function (html) {
  832. var self = this;
  833. var $1, $2;
  834. smalltalk.send(smalltalk.send(html, "_div", []), "_id_", ["logo"]);
  835. smalltalk.send(self, "_renderToolbarOn_", [html]);
  836. $1 = smalltalk.send(html, "_ul", []);
  837. smalltalk.send($1, "_id_", ["amberTabs"]);
  838. $2 = smalltalk.send($1, "_yourself", []);
  839. self['@ul'] = $2;
  840. smalltalk.send(self, "_renderTabs", []);
  841. return self;
  842. }
  843. }),
  844. smalltalk.TabManager);
  845. smalltalk.addMethod(
  846. "_renderTabFor_on_",
  847. smalltalk.method({
  848. selector: "renderTabFor:on:",
  849. fn: function (aWidget, html) {
  850. var self = this;
  851. var $1, $2, $4, $5, $6, $3, $7;
  852. var li;
  853. li = smalltalk.send(html, "_li", []);
  854. $1 = smalltalk.send(self['@selectedTab'], "__eq", [aWidget]);
  855. if (smalltalk.assert($1)) {
  856. smalltalk.send(li, "_class_", ["selected"]);
  857. }
  858. smalltalk.send(li, "_with_", [function () {smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["ltab"]);$2 = smalltalk.send(html, "_span", []);smalltalk.send($2, "_class_", ["mtab"]);$3 = smalltalk.send($2, "_with_", [function () {$4 = smalltalk.send(aWidget, "_canBeClosed", []);if (smalltalk.assert($4)) {$5 = smalltalk.send(html, "_span", []);smalltalk.send($5, "_class_", ["close"]);smalltalk.send($5, "_with_", ["x"]);$6 = smalltalk.send($5, "_onClick_", [function () {return smalltalk.send(self, "_closeTab_", [aWidget]);}]);$6;}return smalltalk.send(smalltalk.send(html, "_span", []), "_with_", [smalltalk.send(self, "_labelFor_", [aWidget])]);}]);$3;return smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["rtab"]);}]);
  859. $7 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectTab_", [aWidget]);}]);
  860. return self;
  861. }
  862. }),
  863. smalltalk.TabManager);
  864. smalltalk.addMethod(
  865. "_renderTabs",
  866. smalltalk.method({
  867. selector: "renderTabs",
  868. fn: function () {
  869. var self = this;
  870. var $1, $2, $3, $4;
  871. smalltalk.send(self['@ul'], "_contents_", [function (html) {smalltalk.send(smalltalk.send(self, "_tabs", []), "_do_", [function (each) {return smalltalk.send(self, "_renderTabFor_on_", [each, html]);}]);$1 = smalltalk.send(html, "_li", []);smalltalk.send($1, "_class_", ["newtab"]);smalltalk.send($1, "_with_", [function () {smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["ltab"]);$2 = smalltalk.send(html, "_span", []);smalltalk.send($2, "_class_", ["mtab"]);$3 = smalltalk.send($2, "_with_", [" + "]);$3;return smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["rtab"]);}]);$4 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_newBrowserTab", []);}]);return $4;}]);
  872. return self;
  873. }
  874. }),
  875. smalltalk.TabManager);
  876. smalltalk.addMethod(
  877. "_renderToolbarOn_",
  878. smalltalk.method({
  879. selector: "renderToolbarOn:",
  880. fn: function (html) {
  881. var self = this;
  882. var $1, $3, $4, $5, $6, $7, $2;
  883. $1 = smalltalk.send(html, "_div", []);
  884. smalltalk.send($1, "_id_", ["amber_toolbar"]);
  885. $2 = smalltalk.send($1, "_with_", [function () {$3 = smalltalk.send(html, "_input", []);smalltalk.send($3, "_class_", ["implementors"]);$4 = smalltalk.send($3, "_yourself", []);self['@input'] = $4;self['@input'];smalltalk.send(self['@input'], "_onKeyPress_", [function (event) {$5 = smalltalk.send(smalltalk.send(event, "_keyCode", []), "__eq", [13]);if (smalltalk.assert($5)) {return smalltalk.send(self, "_search_", [smalltalk.send(smalltalk.send(self['@input'], "_asJQuery", []), "_val", [])]);}}]);$6 = smalltalk.send(html, "_div", []);smalltalk.send($6, "_id_", ["amber_close"]);$7 = smalltalk.send($6, "_onClick_", [function () {return smalltalk.send(self, "_close", []);}]);return $7;}]);
  886. return self;
  887. }
  888. }),
  889. smalltalk.TabManager);
  890. smalltalk.addMethod(
  891. "_search_",
  892. smalltalk.method({
  893. selector: "search:",
  894. fn: function (aString) {
  895. var self = this;
  896. var $1;
  897. var searchedClass;
  898. searchedClass = smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_at_", [aString]);
  899. $1 = smalltalk.send(searchedClass, "_isClass", []);
  900. if (smalltalk.assert($1)) {
  901. smalltalk.send(smalltalk.Browser || Browser, "_openOn_", [searchedClass]);
  902. } else {
  903. smalltalk.send(smalltalk.ReferencesBrowser || ReferencesBrowser, "_search_", [aString]);
  904. }
  905. return self;
  906. }
  907. }),
  908. smalltalk.TabManager);
  909. smalltalk.addMethod(
  910. "_selectTab_",
  911. smalltalk.method({
  912. selector: "selectTab:",
  913. fn: function (aWidget) {
  914. var self = this;
  915. smalltalk.send(self, "_open", []);
  916. self['@selectedTab'] = aWidget;
  917. smalltalk.send(smalltalk.send(self, "_tabs", []), "_do_", [function (each) {return smalltalk.send(each, "_hide", []);}]);
  918. smalltalk.send(aWidget, "_show", []);
  919. smalltalk.send(self, "_update", []);
  920. return self;
  921. }
  922. }),
  923. smalltalk.TabManager);
  924. smalltalk.addMethod(
  925. "_setBodyMargin_",
  926. smalltalk.method({
  927. selector: "setBodyMargin:",
  928. fn: function (anInteger) {
  929. var self = this;
  930. smalltalk.send(smalltalk.send(".amberBody", "_asJQuery", []), "_css_put_", ["margin-bottom", smalltalk.send(smalltalk.send(anInteger, "_asString", []), "__comma", ["px"])]);
  931. return self;
  932. }
  933. }),
  934. smalltalk.TabManager);
  935. smalltalk.addMethod(
  936. "_tabs",
  937. smalltalk.method({
  938. selector: "tabs",
  939. fn: function () {
  940. var self = this;
  941. var $1;
  942. if (($receiver = self['@tabs']) == nil || $receiver == undefined) {
  943. self['@tabs'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  944. $1 = self['@tabs'];
  945. } else {
  946. $1 = self['@tabs'];
  947. }
  948. return $1;
  949. }
  950. }),
  951. smalltalk.TabManager);
  952. smalltalk.addMethod(
  953. "_update",
  954. smalltalk.method({
  955. selector: "update",
  956. fn: function () {
  957. var self = this;
  958. smalltalk.send(self, "_renderTabs", []);
  959. return self;
  960. }
  961. }),
  962. smalltalk.TabManager);
  963. smalltalk.addMethod(
  964. "_updateBodyMargin",
  965. smalltalk.method({
  966. selector: "updateBodyMargin",
  967. fn: function () {
  968. var self = this;
  969. smalltalk.send(self, "_setBodyMargin_", [smalltalk.send(smalltalk.send("#amber", "_asJQuery", []), "_height", [])]);
  970. return self;
  971. }
  972. }),
  973. smalltalk.TabManager);
  974. smalltalk.addMethod(
  975. "_updatePosition",
  976. smalltalk.method({
  977. selector: "updatePosition",
  978. fn: function () {
  979. var self = this;
  980. jQuery("#amber").css("top", "").css("bottom", "0px");
  981. return self;
  982. }
  983. }),
  984. smalltalk.TabManager);
  985. smalltalk.TabManager.klass.iVarNames = ['current'];
  986. smalltalk.addMethod(
  987. "_current",
  988. smalltalk.method({
  989. selector: "current",
  990. fn: function () {
  991. var self = this;
  992. var $1;
  993. if (($receiver = self['@current']) == nil || $receiver == undefined) {
  994. self['@current'] = smalltalk.send(self, "_new", [], smalltalk.Widget.klass);
  995. $1 = self['@current'];
  996. } else {
  997. $1 = self['@current'];
  998. }
  999. return $1;
  1000. }
  1001. }),
  1002. smalltalk.TabManager.klass);
  1003. smalltalk.addMethod(
  1004. "_new",
  1005. smalltalk.method({
  1006. selector: "new",
  1007. fn: function () {
  1008. var self = this;
  1009. smalltalk.send(self, "_shouldNotImplement", []);
  1010. return self;
  1011. }
  1012. }),
  1013. smalltalk.TabManager.klass);
  1014. smalltalk.addClass('TabWidget', smalltalk.Widget, ['div'], 'IDE');
  1015. smalltalk.addMethod(
  1016. "_canBeClosed",
  1017. smalltalk.method({
  1018. selector: "canBeClosed",
  1019. fn: function () {
  1020. var self = this;
  1021. return false;
  1022. }
  1023. }),
  1024. smalltalk.TabWidget);
  1025. smalltalk.addMethod(
  1026. "_close",
  1027. smalltalk.method({
  1028. selector: "close",
  1029. fn: function () {
  1030. var self = this;
  1031. smalltalk.send(smalltalk.send(smalltalk.TabManager || TabManager, "_current", []), "_closeTab_", [self]);
  1032. return self;
  1033. }
  1034. }),
  1035. smalltalk.TabWidget);
  1036. smalltalk.addMethod(
  1037. "_hide",
  1038. smalltalk.method({
  1039. selector: "hide",
  1040. fn: function () {
  1041. var self = this;
  1042. smalltalk.send(smalltalk.send(self['@div'], "_asJQuery", []), "_hide", []);
  1043. return self;
  1044. }
  1045. }),
  1046. smalltalk.TabWidget);
  1047. smalltalk.addMethod(
  1048. "_label",
  1049. smalltalk.method({
  1050. selector: "label",
  1051. fn: function () {
  1052. var self = this;
  1053. smalltalk.send(self, "_subclassResponsibility", []);
  1054. return self;
  1055. }
  1056. }),
  1057. smalltalk.TabWidget);
  1058. smalltalk.addMethod(
  1059. "_open",
  1060. smalltalk.method({
  1061. selector: "open",
  1062. fn: function () {
  1063. var self = this;
  1064. smalltalk.send(smalltalk.send(smalltalk.TabManager || TabManager, "_current", []), "_addTab_", [self]);
  1065. smalltalk.send(smalltalk.send(smalltalk.TabManager || TabManager, "_current", []), "_selectTab_", [self]);
  1066. return self;
  1067. }
  1068. }),
  1069. smalltalk.TabWidget);
  1070. smalltalk.addMethod(
  1071. "_remove",
  1072. smalltalk.method({
  1073. selector: "remove",
  1074. fn: function () {
  1075. var self = this;
  1076. smalltalk.send(smalltalk.send(self['@div'], "_asJQuery", []), "_remove", []);
  1077. return self;
  1078. }
  1079. }),
  1080. smalltalk.TabWidget);
  1081. smalltalk.addMethod(
  1082. "_renderBoxOn_",
  1083. smalltalk.method({
  1084. selector: "renderBoxOn:",
  1085. fn: function (html) {
  1086. var self = this;
  1087. return self;
  1088. }
  1089. }),
  1090. smalltalk.TabWidget);
  1091. smalltalk.addMethod(
  1092. "_renderButtonsOn_",
  1093. smalltalk.method({
  1094. selector: "renderButtonsOn:",
  1095. fn: function (html) {
  1096. var self = this;
  1097. return self;
  1098. }
  1099. }),
  1100. smalltalk.TabWidget);
  1101. smalltalk.addMethod(
  1102. "_renderOn_",
  1103. smalltalk.method({
  1104. selector: "renderOn:",
  1105. fn: function (html) {
  1106. var self = this;
  1107. var $1, $2;
  1108. $1 = smalltalk.send(html, "_div", []);
  1109. smalltalk.send($1, "_class_", ["amberTool"]);
  1110. $2 = smalltalk.send($1, "_yourself", []);
  1111. self['@div'] = $2;
  1112. smalltalk.send(self, "_renderTab", []);
  1113. return self;
  1114. }
  1115. }),
  1116. smalltalk.TabWidget);
  1117. smalltalk.addMethod(
  1118. "_renderTab",
  1119. smalltalk.method({
  1120. selector: "renderTab",
  1121. fn: function () {
  1122. var self = this;
  1123. var $1, $2, $3, $4;
  1124. smalltalk.send(self['@div'], "_contents_", [function (html) {$1 = smalltalk.send(html, "_div", []);smalltalk.send($1, "_class_", ["amber_box"]);$2 = smalltalk.send($1, "_with_", [function () {return smalltalk.send(self, "_renderBoxOn_", [html]);}]);$2;$3 = smalltalk.send(html, "_div", []);smalltalk.send($3, "_class_", ["amber_buttons"]);$4 = smalltalk.send($3, "_with_", [function () {return smalltalk.send(self, "_renderButtonsOn_", [html]);}]);return $4;}]);
  1125. return self;
  1126. }
  1127. }),
  1128. smalltalk.TabWidget);
  1129. smalltalk.addMethod(
  1130. "_show",
  1131. smalltalk.method({
  1132. selector: "show",
  1133. fn: function () {
  1134. var self = this;
  1135. smalltalk.send(smalltalk.send(self['@div'], "_asJQuery", []), "_show", []);
  1136. return self;
  1137. }
  1138. }),
  1139. smalltalk.TabWidget);
  1140. smalltalk.addMethod(
  1141. "_update",
  1142. smalltalk.method({
  1143. selector: "update",
  1144. fn: function () {
  1145. var self = this;
  1146. smalltalk.send(self, "_renderTab", []);
  1147. return self;
  1148. }
  1149. }),
  1150. smalltalk.TabWidget);
  1151. smalltalk.addMethod(
  1152. "_open",
  1153. smalltalk.method({
  1154. selector: "open",
  1155. fn: function () {
  1156. var self = this;
  1157. var $1;
  1158. $1 = smalltalk.send(smalltalk.send(self, "_new", []), "_open", []);
  1159. return $1;
  1160. }
  1161. }),
  1162. smalltalk.TabWidget.klass);
  1163. smalltalk.addClass('Browser', smalltalk.TabWidget, ['selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedMethod', 'packagesList', 'classesList', 'protocolsList', 'methodsList', 'sourceArea', 'tabsList', 'selectedTab', 'saveButton', 'classButtons', 'methodButtons', 'unsavedChanges'], 'IDE');
  1164. smalltalk.addMethod(
  1165. "_addInstanceVariableNamed_toClass_",
  1166. smalltalk.method({
  1167. selector: "addInstanceVariableNamed:toClass:",
  1168. fn: function (aString, aClass) {
  1169. var self = this;
  1170. var $1, $2;
  1171. $1 = smalltalk.send(smalltalk.send(aClass, "_instanceVariableNames", []), "_copy", []);
  1172. smalltalk.send($1, "_add_", [aString]);
  1173. $2 = smalltalk.send($1, "_yourself", []);
  1174. smalltalk.send(smalltalk.send(smalltalk.ClassBuilder || ClassBuilder, "_new", []), "_addSubclassOf_named_instanceVariableNames_package_", [smalltalk.send(aClass, "_superclass", []), smalltalk.send(aClass, "_name", []), $2, smalltalk.send(smalltalk.send(aClass, "_package", []), "_name", [])]);
  1175. return self;
  1176. }
  1177. }),
  1178. smalltalk.Browser);
  1179. smalltalk.addMethod(
  1180. "_addNewClass",
  1181. smalltalk.method({
  1182. selector: "addNewClass",
  1183. fn: function () {
  1184. var self = this;
  1185. var $1, $2;
  1186. var className;
  1187. className = smalltalk.send(window, "_prompt_", ["New class"]);
  1188. $1 = smalltalk.send(smalltalk.send(className, "_notNil", []), "_and_", [function () {return smalltalk.send(className, "_notEmpty", []);}]);
  1189. if (smalltalk.assert($1)) {
  1190. smalltalk.send(smalltalk.Object || Object, "_subclass_instanceVariableNames_package_", [className, "", smalltalk.send(self, "_selectedPackage", [])]);
  1191. smalltalk.send(self, "_resetClassesList", []);
  1192. $2 = smalltalk.send(self, "_updateClassesList", []);
  1193. smalltalk.send(self, "_selectClass_", [smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_at_", [className])]);
  1194. }
  1195. return self;
  1196. }
  1197. }),
  1198. smalltalk.Browser);
  1199. smalltalk.addMethod(
  1200. "_addNewProtocol",
  1201. smalltalk.method({
  1202. selector: "addNewProtocol",
  1203. fn: function () {
  1204. var self = this;
  1205. var $1;
  1206. var newProtocol;
  1207. newProtocol = smalltalk.send(window, "_prompt_", ["New method protocol"]);
  1208. $1 = smalltalk.send(smalltalk.send(newProtocol, "_notNil", []), "_and_", [function () {return smalltalk.send(newProtocol, "_notEmpty", []);}]);
  1209. if (smalltalk.assert($1)) {
  1210. smalltalk.send(self['@selectedMethod'], "_category_", [newProtocol]);
  1211. smalltalk.send(self, "_setMethodProtocol_", [newProtocol]);
  1212. }
  1213. return self;
  1214. }
  1215. }),
  1216. smalltalk.Browser);
  1217. smalltalk.addMethod(
  1218. "_ajaxPutAt_data_",
  1219. smalltalk.method({
  1220. selector: "ajaxPutAt:data:",
  1221. fn: function (aURL,aString){
  1222. var self=this;
  1223. smalltalk.send(jQuery,"_ajax_options_",[aURL,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(xhr){
  1224. return smalltalk.send(window,"_alert_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("Commiting ","__comma",[aURL]),"__comma",[" failed with reason: \x22"]),"__comma",[smalltalk.send(xhr,"_responseText",[])]),"__comma",["\x22"])]);
  1225. })])])]);
  1226. return self}
  1227. }),
  1228. smalltalk.Browser);
  1229. smalltalk.addMethod(
  1230. "_canBeClosed",
  1231. smalltalk.method({
  1232. selector: "canBeClosed",
  1233. fn: function () {
  1234. var self = this;
  1235. return true;
  1236. }
  1237. }),
  1238. smalltalk.Browser);
  1239. smalltalk.addMethod(
  1240. "_cancelChanges",
  1241. smalltalk.method({
  1242. selector: "cancelChanges",
  1243. fn: function () {
  1244. var self = this;
  1245. var $1;
  1246. if (smalltalk.assert(self['@unsavedChanges'])) {
  1247. $1 = smalltalk.send(window, "_confirm_", ["Cancel changes?"]);
  1248. } else {
  1249. $1 = true;
  1250. }
  1251. return $1;
  1252. }
  1253. }),
  1254. smalltalk.Browser);
  1255. smalltalk.addMethod(
  1256. "_classCommentSource",
  1257. smalltalk.method({
  1258. selector: "classCommentSource",
  1259. fn: function () {
  1260. var self = this;
  1261. var $1;
  1262. $1 = smalltalk.send(self['@selectedClass'], "_comment", []);
  1263. return $1;
  1264. }
  1265. }),
  1266. smalltalk.Browser);
  1267. smalltalk.addMethod(
  1268. "_classDeclarationSource",
  1269. smalltalk.method({
  1270. selector: "classDeclarationSource",
  1271. fn: function () {
  1272. var self = this;
  1273. var $1, $2, $3, $4;
  1274. var stream;
  1275. stream = smalltalk.send("", "_writeStream", []);
  1276. if (($receiver = self['@selectedClass']) == nil ||
  1277. $receiver == undefined) {
  1278. $1 = smalltalk.send(self, "_classDeclarationTemplate", []);
  1279. return $1;
  1280. } else {
  1281. self['@selectedClass'];
  1282. }
  1283. smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(smalltalk.send(self['@selectedClass'], "_superclass", []), "_asString", [])]);
  1284. smalltalk.send(stream, "_nextPutAll_", [" subclass: #"]);
  1285. smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(self['@selectedClass'], "_name", [])]);
  1286. smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.String || String, "_lf", []), "__comma", [smalltalk.send(smalltalk.String || String, "_tab", [])])]);
  1287. $2 = smalltalk.send(stream, "_nextPutAll_", ["instanceVariableNames: '"]);
  1288. smalltalk.send(smalltalk.send(self['@selectedClass'], "_instanceVariableNames", []), "_do_separatedBy_", [function (each) {return smalltalk.send(stream, "_nextPutAll_", [each]);}, function () {return smalltalk.send(stream, "_nextPutAll_", [" "]);}]);
  1289. smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(smalltalk.send("'", "__comma", [smalltalk.send(smalltalk.String || String, "_lf", [])]), "__comma", [smalltalk.send(smalltalk.String || String, "_tab", [])])]);
  1290. smalltalk.send(stream, "_nextPutAll_", ["package: '"]);
  1291. smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(self['@selectedClass'], "_category", [])]);
  1292. $3 = smalltalk.send(stream, "_nextPutAll_", ["'"]);
  1293. $4 = smalltalk.send(stream, "_contents", []);
  1294. return $4;
  1295. }
  1296. }),
  1297. smalltalk.Browser);
  1298. smalltalk.addMethod(
  1299. "_classDeclarationTemplate",
  1300. smalltalk.method({
  1301. selector: "classDeclarationTemplate",
  1302. fn: function () {
  1303. var self = this;
  1304. var $1;
  1305. $1 = smalltalk.send(smalltalk.send("Object subclass: #NameOfSubclass\n\tinstanceVariableNames: ''\n\tpackage: '", "__comma", [smalltalk.send(self, "_selectedPackage", [])]), "__comma", ["'"]);
  1306. return $1;
  1307. }
  1308. }),
  1309. smalltalk.Browser);
  1310. smalltalk.addMethod(
  1311. "_classes",
  1312. smalltalk.method({
  1313. selector: "classes",
  1314. fn: function () {
  1315. var self = this;
  1316. var $1;
  1317. $1 = 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 smalltalk.send(smalltalk.send(a, "_name", []), "__lt", [smalltalk.send(b, "_name", [])]);}]), "_asSet", []);
  1318. return $1;
  1319. }
  1320. }),
  1321. smalltalk.Browser);
  1322. smalltalk.addMethod(
  1323. "_commitPackage",
  1324. smalltalk.method({
  1325. selector: "commitPackage",
  1326. fn: function (){
  1327. var self=this;
  1328. if(($receiver = self["@selectedPackage"]) == nil || $receiver == undefined){
  1329. self["@selectedPackage"];
  1330. } else {
  1331. var package;
  1332. package=smalltalk.send((smalltalk.Package || Package),"_named_",[self["@selectedPackage"]]);
  1333. package;
  1334. 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){
  1335. var fileContents;
  1336. fileContents=smalltalk.send(smalltalk.send(smalltalk.send(commitStrategy,"_key",[]),"_new",[]),"_exportPackage_",[self["@selectedPackage"]]);
  1337. fileContents;
  1338. return smalltalk.send(self,"_ajaxPutAt_data_",[smalltalk.send(commitStrategy,"_value",[]),fileContents]);
  1339. })]);
  1340. };
  1341. return self}
  1342. }),
  1343. smalltalk.Browser);
  1344. smalltalk.addMethod(
  1345. "_compile",
  1346. smalltalk.method({
  1347. selector: "compile",
  1348. fn: function () {
  1349. var self = this;
  1350. var $1, $2;
  1351. var currentEditLine;
  1352. smalltalk.send(self, "_disableSaveButton", []);
  1353. currentEditLine = smalltalk.send(smalltalk.send(self['@sourceArea'], "_editor", []), "_getCursor", []);
  1354. $1 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("comment")]);
  1355. if (smalltalk.assert($1)) {
  1356. if (($receiver = self['@selectedClass']) == nil ||
  1357. $receiver == undefined) {
  1358. self['@selectedClass'];
  1359. } else {
  1360. smalltalk.send(self, "_compileClassComment", []);
  1361. }
  1362. } else {
  1363. $2 = smalltalk.send(smalltalk.send(self['@selectedProtocol'], "_notNil", []), "_or_", [function () {return smalltalk.send(self['@selectedMethod'], "_notNil", []);}]);
  1364. if (smalltalk.assert($2)) {
  1365. smalltalk.send(self, "_compileMethodDefinition", []);
  1366. } else {
  1367. smalltalk.send(self, "_compileDefinition", []);
  1368. }
  1369. }
  1370. smalltalk.send(smalltalk.send(self['@sourceArea'], "_editor", []), "_setCursor_", [currentEditLine]);
  1371. return self;
  1372. }
  1373. }),
  1374. smalltalk.Browser);
  1375. smalltalk.addMethod(
  1376. "_compileClassComment",
  1377. smalltalk.method({
  1378. selector: "compileClassComment",
  1379. fn: function () {
  1380. var self = this;
  1381. smalltalk.send(self['@selectedClass'], "_comment_", [smalltalk.send(self['@sourceArea'], "_val", [])]);
  1382. return self;
  1383. }
  1384. }),
  1385. smalltalk.Browser);
  1386. smalltalk.addMethod(
  1387. "_compileDefinition",
  1388. smalltalk.method({
  1389. selector: "compileDefinition",
  1390. fn: function () {
  1391. var self = this;
  1392. var $1;
  1393. var newClass;
  1394. newClass = smalltalk.send(smalltalk.send(smalltalk.Compiler || Compiler, "_new", []), "_evaluateExpression_", [smalltalk.send(self['@sourceArea'], "_val", [])]);
  1395. smalltalk.send(self, "_resetClassesList", []);
  1396. smalltalk.send(self, "_updateCategoriesList", []);
  1397. $1 = smalltalk.send(self, "_updateClassesList", []);
  1398. smalltalk.send(self, "_selectClass_", [newClass]);
  1399. return self;
  1400. }
  1401. }),
  1402. smalltalk.Browser);
  1403. smalltalk.addMethod(
  1404. "_compileMethodDefinition",
  1405. smalltalk.method({
  1406. selector: "compileMethodDefinition",
  1407. fn: function () {
  1408. var self = this;
  1409. var $1;
  1410. $1 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")]);
  1411. if (smalltalk.assert($1)) {
  1412. smalltalk.send(self, "_compileMethodDefinitionFor_", [self['@selectedClass']]);
  1413. } else {
  1414. smalltalk.send(self, "_compileMethodDefinitionFor_", [smalltalk.send(self['@selectedClass'], "_class", [])]);
  1415. }
  1416. return self;
  1417. }
  1418. }),
  1419. smalltalk.Browser);
  1420. smalltalk.addMethod(
  1421. "_compileMethodDefinitionFor_",
  1422. smalltalk.method({
  1423. selector: "compileMethodDefinitionFor:",
  1424. fn: function (aClass) {
  1425. var self = this;
  1426. var $1, $2, $3, $4, $5;
  1427. var $early = {};
  1428. try {
  1429. var compiler;
  1430. var method;
  1431. var source;
  1432. var node;
  1433. source = smalltalk.send(self['@sourceArea'], "_val", []);
  1434. if (($receiver = self['@selectedProtocol']) == nil ||
  1435. $receiver == undefined) {
  1436. self['@selectedProtocol'] = smalltalk.send(self['@selectedMethod'], "_category", []);
  1437. self['@selectedProtocol'];
  1438. } else {
  1439. self['@selectedProtocol'];
  1440. }
  1441. compiler = smalltalk.send(smalltalk.Compiler || Compiler, "_new", []);
  1442. smalltalk.send(compiler, "_source_", [source]);
  1443. node = smalltalk.send(compiler, "_parse_", [source]);
  1444. $1 = smalltalk.send(node, "_isParseFailure", []);
  1445. if (smalltalk.assert($1)) {
  1446. $2 = smalltalk.send(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", [])])]);
  1447. return $2;
  1448. }
  1449. smalltalk.send(compiler, "_currentClass_", [aClass]);
  1450. method = smalltalk.send(compiler, "_eval_", [smalltalk.send(compiler, "_compileNode_", [node])]);
  1451. smalltalk.send(method, "_category_", [self['@selectedProtocol']]);
  1452. smalltalk.send(smalltalk.send(compiler, "_unknownVariables", []), "_do_", [function (each) {$3 = smalltalk.send(window, "_at_", [each]);if (($receiver = $3) == nil || $receiver == undefined) {$4 = smalltalk.send(window, "_confirm_", [smalltalk.send(smalltalk.send("Declare '", "__comma", [each]), "__comma", ["' as instance variable?"])]);if (smalltalk.assert($4)) {smalltalk.send(self, "_addInstanceVariableNamed_toClass_", [each, aClass]);$5 = smalltalk.send(self, "_compileMethodDefinitionFor_", [aClass]);throw $early = [$5];}} else {return $3;}}]);
  1453. smalltalk.send(aClass, "_addCompiledMethod_", [method]);
  1454. smalltalk.send(compiler, "_setupClass_", [aClass]);
  1455. smalltalk.send(self, "_updateMethodsList", []);
  1456. smalltalk.send(self, "_selectMethod_", [method]);
  1457. return self;
  1458. } catch (e) {
  1459. if (e === $early) {
  1460. return e[0];
  1461. }
  1462. throw e;
  1463. }
  1464. }
  1465. }),
  1466. smalltalk.Browser);
  1467. smalltalk.addMethod(
  1468. "_copyClass",
  1469. smalltalk.method({
  1470. selector: "copyClass",
  1471. fn: function () {
  1472. var self = this;
  1473. var $1, $2;
  1474. var className;
  1475. className = smalltalk.send(window, "_prompt_", ["Copy class"]);
  1476. $1 = smalltalk.send(smalltalk.send(className, "_notNil", []), "_and_", [function () {return smalltalk.send(className, "_notEmpty", []);}]);
  1477. if (smalltalk.assert($1)) {
  1478. smalltalk.send(smalltalk.send(smalltalk.ClassBuilder || ClassBuilder, "_new", []), "_copyClass_named_", [smalltalk.send(self, "_selectedClass", []), className]);
  1479. smalltalk.send(self, "_resetClassesList", []);
  1480. $2 = smalltalk.send(self, "_updateClassesList", []);
  1481. smalltalk.send(self, "_selectClass_", [smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_at_", [className])]);
  1482. }
  1483. return self;
  1484. }
  1485. }),
  1486. smalltalk.Browser);
  1487. smalltalk.addMethod(
  1488. "_declarationSource",
  1489. smalltalk.method({
  1490. selector: "declarationSource",
  1491. fn: function () {
  1492. var self = this;
  1493. var $2, $1;
  1494. $2 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")]);
  1495. if (smalltalk.assert($2)) {
  1496. $1 = smalltalk.send(self, "_classDeclarationSource", []);
  1497. } else {
  1498. $1 = smalltalk.send(self, "_metaclassDeclarationSource", []);
  1499. }
  1500. return $1;
  1501. }
  1502. }),
  1503. smalltalk.Browser);
  1504. smalltalk.addMethod(
  1505. "_disableSaveButton",
  1506. smalltalk.method({
  1507. selector: "disableSaveButton",
  1508. fn: function () {
  1509. var self = this;
  1510. if (($receiver = self['@saveButton']) == nil || $receiver == undefined) {
  1511. self['@saveButton'];
  1512. } else {
  1513. smalltalk.send(self['@saveButton'], "_at_put_", ["disabled", true]);
  1514. }
  1515. self['@unsavedChanges'] = false;
  1516. return self;
  1517. }
  1518. }),
  1519. smalltalk.Browser);
  1520. smalltalk.addMethod(
  1521. "_dummyMethodSource",
  1522. smalltalk.method({
  1523. selector: "dummyMethodSource",
  1524. fn: function () {
  1525. var self = this;
  1526. return "messageSelectorAndArgumentNames\n\t\"comment stating purpose of message\"\n\n\t| temporary variable names |\n\tstatements";
  1527. }
  1528. }),
  1529. smalltalk.Browser);
  1530. smalltalk.addMethod(
  1531. "_handleSourceAreaKeyDown_",
  1532. smalltalk.method({
  1533. selector: "handleSourceAreaKeyDown:",
  1534. fn: function (anEvent) {
  1535. var self = this;
  1536. if (anEvent.ctrlKey) {
  1537. if (anEvent.keyCode === 83) {
  1538. self._compile();
  1539. anEvent.preventDefault();
  1540. return false;
  1541. }
  1542. }
  1543. return self;
  1544. }
  1545. }),
  1546. smalltalk.Browser);
  1547. smalltalk.addMethod(
  1548. "_hideClassButtons",
  1549. smalltalk.method({
  1550. selector: "hideClassButtons",
  1551. fn: function () {
  1552. var self = this;
  1553. smalltalk.send(smalltalk.send(self['@classButtons'], "_asJQuery", []), "_hide", []);
  1554. return self;
  1555. }
  1556. }),
  1557. smalltalk.Browser);
  1558. smalltalk.addMethod(
  1559. "_hideMethodButtons",
  1560. smalltalk.method({
  1561. selector: "hideMethodButtons",
  1562. fn: function () {
  1563. var self = this;
  1564. smalltalk.send(smalltalk.send(self['@methodButtons'], "_asJQuery", []), "_hide", []);
  1565. return self;
  1566. }
  1567. }),
  1568. smalltalk.Browser);
  1569. smalltalk.addMethod(
  1570. "_initialize",
  1571. smalltalk.method({
  1572. selector: "initialize",
  1573. fn: function () {
  1574. var self = this;
  1575. smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
  1576. self['@selectedTab'] = smalltalk.symbolFor("instance");
  1577. self['@selectedPackage'] = smalltalk.send(smalltalk.send(self, "_packages", []), "_first", []);
  1578. self['@unsavedChanges'] = false;
  1579. return self;
  1580. }
  1581. }),
  1582. smalltalk.Browser);
  1583. smalltalk.addMethod(
  1584. "_label",
  1585. smalltalk.method({
  1586. selector: "label",
  1587. fn: function () {
  1588. var self = this;
  1589. var $1;
  1590. if (($receiver = self['@selectedClass']) == nil ||
  1591. $receiver == undefined) {
  1592. $1 = "Browser (nil)";
  1593. } else {
  1594. $1 = smalltalk.send("Browser: ", "__comma", [smalltalk.send(self['@selectedClass'], "_name", [])]);
  1595. }
  1596. return $1;
  1597. }
  1598. }),
  1599. smalltalk.Browser);
  1600. smalltalk.addMethod(
  1601. "_metaclassDeclarationSource",
  1602. smalltalk.method({
  1603. selector: "metaclassDeclarationSource",
  1604. fn: function () {
  1605. var self = this;
  1606. var $1, $2;
  1607. var stream;
  1608. stream = smalltalk.send("", "_writeStream", []);
  1609. if (($receiver = self['@selectedClass']) == nil ||
  1610. $receiver == undefined) {
  1611. self['@selectedClass'];
  1612. } else {
  1613. smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(self['@selectedClass'], "_asString", [])]);
  1614. smalltalk.send(stream, "_nextPutAll_", [" class "]);
  1615. $1 = smalltalk.send(stream, "_nextPutAll_", ["instanceVariableNames: '"]);
  1616. 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_", [" "]);}]);
  1617. smalltalk.send(stream, "_nextPutAll_", ["'"]);
  1618. }
  1619. $2 = smalltalk.send(stream, "_contents", []);
  1620. return $2;
  1621. }
  1622. }),
  1623. smalltalk.Browser);
  1624. smalltalk.addMethod(
  1625. "_methodSource",
  1626. smalltalk.method({
  1627. selector: "methodSource",
  1628. fn: function () {
  1629. var self = this;
  1630. var $1;
  1631. if (($receiver = self['@selectedMethod']) == nil ||
  1632. $receiver == undefined) {
  1633. $1 = smalltalk.send(self, "_dummyMethodSource", []);
  1634. } else {
  1635. $1 = smalltalk.send(self['@selectedMethod'], "_source", []);
  1636. }
  1637. return $1;
  1638. }
  1639. }),
  1640. smalltalk.Browser);
  1641. smalltalk.addMethod(
  1642. "_methods",
  1643. smalltalk.method({
  1644. selector: "methods",
  1645. fn: function () {
  1646. var self = this;
  1647. var $1, $2, $4, $3;
  1648. var klass;
  1649. $1 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("comment")]);
  1650. if (smalltalk.assert($1)) {
  1651. return [];
  1652. }
  1653. if (($receiver = self['@selectedClass']) == nil ||
  1654. $receiver == undefined) {
  1655. self['@selectedClass'];
  1656. } else {
  1657. $2 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")]);
  1658. if (smalltalk.assert($2)) {
  1659. klass = self['@selectedClass'];
  1660. } else {
  1661. klass = smalltalk.send(self['@selectedClass'], "_class", []);
  1662. }
  1663. }
  1664. if (($receiver = self['@selectedProtocol']) == nil ||
  1665. $receiver == undefined) {
  1666. if (($receiver = klass) == nil || $receiver == undefined) {
  1667. $4 = [];
  1668. } else {
  1669. $4 = smalltalk.send(smalltalk.send(klass, "_methodDictionary", []), "_values", []);
  1670. }
  1671. } else {
  1672. $4 = smalltalk.send(smalltalk.send(smalltalk.send(klass, "_methodDictionary", []), "_values", []), "_select_", [function (each) {return smalltalk.send(smalltalk.send(each, "_category", []), "__eq", [self['@selectedProtocol']]);}]);
  1673. }
  1674. $3 = smalltalk.send($4, "_sort_", [function (a, b) {return smalltalk.send(smalltalk.send(a, "_selector", []), "__lt", [smalltalk.send(b, "_selector", [])]);}]);
  1675. return $3;
  1676. }
  1677. }),
  1678. smalltalk.Browser);
  1679. smalltalk.addMethod(
  1680. "_packages",
  1681. smalltalk.method({
  1682. selector: "packages",
  1683. fn: function () {
  1684. var self = this;
  1685. var $1, $2;
  1686. var packages;
  1687. packages = smalltalk.send(smalltalk.Array || Array, "_new", []);
  1688. smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_classes", []), "_do_", [function (each) {$1 = smalltalk.send(packages, "_includes_", [smalltalk.send(each, "_category", [])]);if (!smalltalk.assert($1)) {return smalltalk.send(packages, "_add_", [smalltalk.send(each, "_category", [])]);}}]);
  1689. $2 = smalltalk.send(packages, "_sort", []);
  1690. return $2;
  1691. }
  1692. }),
  1693. smalltalk.Browser);
  1694. smalltalk.addMethod(
  1695. "_protocols",
  1696. smalltalk.method({
  1697. selector: "protocols",
  1698. fn: function () {
  1699. var self = this;
  1700. var $1, $2, $3, $4, $5, $6;
  1701. var klass;
  1702. if (($receiver = self['@selectedClass']) == nil ||
  1703. $receiver == undefined) {
  1704. self['@selectedClass'];
  1705. } else {
  1706. $1 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("comment")]);
  1707. if (smalltalk.assert($1)) {
  1708. return [];
  1709. }
  1710. $2 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")]);
  1711. if (smalltalk.assert($2)) {
  1712. klass = self['@selectedClass'];
  1713. } else {
  1714. klass = smalltalk.send(self['@selectedClass'], "_class", []);
  1715. }
  1716. $3 = smalltalk.send(smalltalk.send(klass, "_methodDictionary", []), "_isEmpty", []);
  1717. if (smalltalk.assert($3)) {
  1718. $4 = smalltalk.send(smalltalk.Array || Array, "_with_", ["not yet classified"]);
  1719. return $4;
  1720. }
  1721. $5 = smalltalk.send(klass, "_protocols", []);
  1722. return $5;
  1723. }
  1724. $6 = smalltalk.send(smalltalk.Array || Array, "_new", []);
  1725. return $6;
  1726. }
  1727. }),
  1728. smalltalk.Browser);
  1729. smalltalk.addMethod(
  1730. "_removeClass",
  1731. smalltalk.method({
  1732. selector: "removeClass",
  1733. fn: function () {
  1734. var self = this;
  1735. var $1;
  1736. $1 = smalltalk.send(window, "_confirm_", [smalltalk.send(smalltalk.send("Do you really want to remove ", "__comma", [smalltalk.send(self['@selectedClass'], "_name", [])]), "__comma", ["?"])]);
  1737. if (smalltalk.assert($1)) {
  1738. smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_removeClass_", [self['@selectedClass']]);
  1739. smalltalk.send(self, "_resetClassesList", []);
  1740. smalltalk.send(self, "_selectClass_", [nil]);
  1741. }
  1742. return self;
  1743. }
  1744. }),
  1745. smalltalk.Browser);
  1746. smalltalk.addMethod(
  1747. "_removeMethod",
  1748. smalltalk.method({
  1749. selector: "removeMethod",
  1750. fn: function () {
  1751. var self = this;
  1752. var $1, $2, $3;
  1753. $1 = smalltalk.send(self, "_cancelChanges", []);
  1754. if (smalltalk.assert($1)) {
  1755. $2 = smalltalk.send(window, "_confirm_", [smalltalk.send(smalltalk.send("Do you really want to remove #", "__comma", [smalltalk.send(self['@selectedMethod'], "_selector", [])]), "__comma", ["?"])]);
  1756. if (smalltalk.assert($2)) {
  1757. $3 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")]);
  1758. if (smalltalk.assert($3)) {
  1759. smalltalk.send(self['@selectedClass'], "_removeCompiledMethod_", [self['@selectedMethod']]);
  1760. } else {
  1761. smalltalk.send(smalltalk.send(self['@selectedClass'], "_class", []), "_removeCompiledMethod_", [self['@selectedMethod']]);
  1762. }
  1763. smalltalk.send(self, "_selectMethod_", [nil]);
  1764. }
  1765. }
  1766. return self;
  1767. }
  1768. }),
  1769. smalltalk.Browser);
  1770. smalltalk.addMethod(
  1771. "_removePackage",
  1772. smalltalk.method({
  1773. selector: "removePackage",
  1774. fn: function () {
  1775. var self = this;
  1776. var $1;
  1777. $1 = smalltalk.send(window, "_confirm_", [smalltalk.send(smalltalk.send("Do you really want to remove the whole package ", "__comma", [self['@selectedPackage']]), "__comma", [" with all its classes?"])]);
  1778. if (smalltalk.assert($1)) {
  1779. smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_removePackage_", [self['@selectedPackage']]);
  1780. smalltalk.send(self, "_updateCategoriesList", []);
  1781. }
  1782. return self;
  1783. }
  1784. }),
  1785. smalltalk.Browser);
  1786. smalltalk.addMethod(
  1787. "_renameClass",
  1788. smalltalk.method({
  1789. selector: "renameClass",
  1790. fn: function () {
  1791. var self = this;
  1792. var $1, $2;
  1793. var newName;
  1794. newName = smalltalk.send(window, "_prompt_", [smalltalk.send("Rename class ", "__comma", [smalltalk.send(self['@selectedClass'], "_name", [])])]);
  1795. $1 = smalltalk.send(smalltalk.send(newName, "_notNil", []), "_and_", [function () {return smalltalk.send(newName, "_notEmpty", []);}]);
  1796. if (smalltalk.assert($1)) {
  1797. smalltalk.send(self['@selectedClass'], "_rename_", [newName]);
  1798. smalltalk.send(self, "_updateClassesList", []);
  1799. $2 = smalltalk.send(self, "_updateSourceAndButtons", []);
  1800. }
  1801. return self;
  1802. }
  1803. }),
  1804. smalltalk.Browser);
  1805. smalltalk.addMethod(
  1806. "_renamePackage",
  1807. smalltalk.method({
  1808. selector: "renamePackage",
  1809. fn: function () {
  1810. var self = this;
  1811. var $1;
  1812. var newName;
  1813. newName = smalltalk.send(window, "_prompt_", [smalltalk.send("Rename package ", "__comma", [self['@selectedPackage']])]);
  1814. if (($receiver = newName) == nil || $receiver == undefined) {
  1815. } else {
  1816. $1 = smalltalk.send(newName, "_notEmpty", []);
  1817. if (smalltalk.assert($1)) {
  1818. smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_renamePackage_to_", [self['@selectedPackage'], newName]);
  1819. smalltalk.send(self, "_updateCategoriesList", []);
  1820. }
  1821. }
  1822. return self;
  1823. }
  1824. }),
  1825. smalltalk.Browser);
  1826. smalltalk.addMethod(
  1827. "_renderBottomPanelOn_",
  1828. smalltalk.method({
  1829. selector: "renderBottomPanelOn:",
  1830. fn: function (html) {
  1831. var self = this;
  1832. var $1, $2;
  1833. $1 = smalltalk.send(html, "_div", []);
  1834. smalltalk.send($1, "_class_", ["amber_sourceCode"]);
  1835. $2 = smalltalk.send($1, "_with_", [function () {self['@sourceArea'] = smalltalk.send(smalltalk.SourceArea || SourceArea, "_new", []);self['@sourceArea'];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", []);}]);}]);
  1836. return self;
  1837. }
  1838. }),
  1839. smalltalk.Browser);
  1840. smalltalk.addMethod(
  1841. "_renderBoxOn_",
  1842. smalltalk.method({
  1843. selector: "renderBoxOn:",
  1844. fn: function (html) {
  1845. var self = this;
  1846. var $1;
  1847. smalltalk.send(self, "_renderTopPanelOn_", [html]);
  1848. smalltalk.send(self, "_renderTabsOn_", [html]);
  1849. $1 = smalltalk.send(self, "_renderBottomPanelOn_", [html]);
  1850. return self;
  1851. }
  1852. }),
  1853. smalltalk.Browser);
  1854. smalltalk.addMethod(
  1855. "_renderButtonsOn_",
  1856. smalltalk.method({
  1857. selector: "renderButtonsOn:",
  1858. fn: function (html) {
  1859. var self = this;
  1860. var $1, $2, $4, $5, $6, $7, $8, $9, $3;
  1861. self['@saveButton'] = smalltalk.send(html, "_button", []);
  1862. smalltalk.send(self['@saveButton'], "_with_", ["Save"]);
  1863. $1 = smalltalk.send(self['@saveButton'], "_onClick_", [function () {return smalltalk.send(self, "_compile", []);}]);
  1864. self['@methodButtons'] = smalltalk.send(html, "_span", []);
  1865. self['@classButtons'] = smalltalk.send(html, "_span", []);
  1866. $2 = smalltalk.send(html, "_div", []);
  1867. smalltalk.send($2, "_class_", ["right"]);
  1868. $3 = smalltalk.send($2, "_with_", [function () {$4 = smalltalk.send(html, "_button", []);smalltalk.send($4, "_with_", ["DoIt"]);$5 = smalltalk.send($4, "_onClick_", [function () {return smalltalk.send(self['@sourceArea'], "_doIt", []);}]);$5;$6 = smalltalk.send(html, "_button", []);smalltalk.send($6, "_with_", ["PrintIt"]);$7 = smalltalk.send($6, "_onClick_", [function () {return smalltalk.send(self['@sourceArea'], "_printIt", []);}]);$7;$8 = smalltalk.send(html, "_button", []);smalltalk.send($8, "_with_", ["InspectIt"]);$9 = smalltalk.send($8, "_onClick_", [function () {return smalltalk.send(self['@sourceArea'], "_inspectIt", []);}]);return $9;}]);
  1869. smalltalk.send(self, "_updateSourceAndButtons", []);
  1870. return self;
  1871. }
  1872. }),
  1873. smalltalk.Browser);
  1874. smalltalk.addMethod(
  1875. "_renderTabsOn_",
  1876. smalltalk.method({
  1877. selector: "renderTabsOn:",
  1878. fn: function (html) {
  1879. var self = this;
  1880. self['@tabsList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_tabs amber_browser"]);
  1881. smalltalk.send(self, "_updateTabsList", []);
  1882. return self;
  1883. }
  1884. }),
  1885. smalltalk.Browser);
  1886. smalltalk.addMethod(
  1887. "_renderTopPanelOn_",
  1888. smalltalk.method({
  1889. selector: "renderTopPanelOn:",
  1890. fn: function (html) {
  1891. var self = this;
  1892. var $1, $3, $5, $6, $7, $8, $9, $10, $4, $11, $2;
  1893. $1 = smalltalk.send(html, "_div", []);
  1894. smalltalk.send($1, "_class_", ["top"]);
  1895. $2 = smalltalk.send($1, "_with_", [function () {self['@packagesList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column browser packages"]);self['@packagesList'];$3 = smalltalk.send(html, "_div", []);smalltalk.send($3, "_class_", ["amber_packagesButtons"]);$4 = smalltalk.send($3, "_with_", [function () {$5 = smalltalk.send(html, "_button", []);smalltalk.send($5, "_title_", ["Commit classes in this package to disk"]);smalltalk.send($5, "_onClick_", [function () {return smalltalk.send(self, "_commitPackage", []);}]);$6 = smalltalk.send($5, "_with_", ["Commit"]);$6;$7 = smalltalk.send(html, "_button", []);smalltalk.send($7, "_title_", ["Rename package"]);smalltalk.send($7, "_onClick_", [function () {return smalltalk.send(self, "_renamePackage", []);}]);$8 = smalltalk.send($7, "_with_", ["Rename"]);$8;$9 = smalltalk.send(html, "_button", []);smalltalk.send($9, "_title_", ["Remove this package from the system"]);smalltalk.send($9, "_onClick_", [function () {return smalltalk.send(self, "_removePackage", []);}]);$10 = smalltalk.send($9, "_with_", ["Remove"]);return $10;}]);$4;self['@classesList'] = smalltalk.send(smalltalk.ClassesList || ClassesList, "_on_", [self]);self['@classesList'];smalltalk.send(self['@classesList'], "_renderOn_", [html]);self['@protocolsList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column browser protocols"]);self['@protocolsList'];self['@methodsList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column browser methods"]);self['@methodsList'];smalltalk.send(self, "_updateCategoriesList", []);smalltalk.send(self, "_updateClassesList", []);smalltalk.send(self, "_updateProtocolsList", []);$11 = smalltalk.send(self, "_updateMethodsList", []);$11;return smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["amber_clear"]);}]);
  1896. return self;
  1897. }
  1898. }),
  1899. smalltalk.Browser);
  1900. smalltalk.addMethod(
  1901. "_resetClassesList",
  1902. smalltalk.method({
  1903. selector: "resetClassesList",
  1904. fn: function () {
  1905. var self = this;
  1906. smalltalk.send(self['@classesList'], "_resetNodes", []);
  1907. return self;
  1908. }
  1909. }),
  1910. smalltalk.Browser);
  1911. smalltalk.addMethod(
  1912. "_search_",
  1913. smalltalk.method({
  1914. selector: "search:",
  1915. fn: function (aString) {
  1916. var self = this;
  1917. var $1, $2;
  1918. $1 = smalltalk.send(self, "_cancelChanges", []);
  1919. if (smalltalk.assert($1)) {
  1920. var searchedClass;
  1921. searchedClass = smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_at_", [aString]);
  1922. $2 = smalltalk.send(searchedClass, "_isClass", []);
  1923. if (smalltalk.assert($2)) {
  1924. smalltalk.send(smalltalk.send(self, "_class", []), "_openOn_", [searchedClass]);
  1925. } else {
  1926. smalltalk.send(self, "_searchReferencesOf_", [aString]);
  1927. }
  1928. }
  1929. return self;
  1930. }
  1931. }),
  1932. smalltalk.Browser);
  1933. smalltalk.addMethod(
  1934. "_searchClassReferences",
  1935. smalltalk.method({
  1936. selector: "searchClassReferences",
  1937. fn: function () {
  1938. var self = this;
  1939. smalltalk.send(smalltalk.ReferencesBrowser || ReferencesBrowser, "_search_", [smalltalk.send(self['@selectedClass'], "_name", [])]);
  1940. return self;
  1941. }
  1942. }),
  1943. smalltalk.Browser);
  1944. smalltalk.addMethod(
  1945. "_searchReferencesOf_",
  1946. smalltalk.method({
  1947. selector: "searchReferencesOf:",
  1948. fn: function (aString) {
  1949. var self = this;
  1950. smalltalk.send(smalltalk.ReferencesBrowser || ReferencesBrowser, "_search_", [aString]);
  1951. return self;
  1952. }
  1953. }),
  1954. smalltalk.Browser);
  1955. smalltalk.addMethod(
  1956. "_selectCategory_",
  1957. smalltalk.method({
  1958. selector: "selectCategory:",
  1959. fn: function (aCategory) {
  1960. var self = this;
  1961. var $1, $2;
  1962. $1 = smalltalk.send(self, "_cancelChanges", []);
  1963. if (smalltalk.assert($1)) {
  1964. self['@selectedPackage'] = aCategory;
  1965. self['@selectedPackage'];
  1966. self['@selectedMethod'] = nil;
  1967. self['@selectedProtocol'] = self['@selectedMethod'];
  1968. self['@selectedClass'] = self['@selectedProtocol'];
  1969. self['@selectedClass'];
  1970. smalltalk.send(self, "_resetClassesList", []);
  1971. smalltalk.send(self, "_updateCategoriesList", []);
  1972. smalltalk.send(self, "_updateClassesList", []);
  1973. smalltalk.send(self, "_updateProtocolsList", []);
  1974. smalltalk.send(self, "_updateMethodsList", []);
  1975. $2 = smalltalk.send(self, "_updateSourceAndButtons", []);
  1976. }
  1977. return self;
  1978. }
  1979. }),
  1980. smalltalk.Browser);
  1981. smalltalk.addMethod(
  1982. "_selectClass_",
  1983. smalltalk.method({
  1984. selector: "selectClass:",
  1985. fn: function (aClass) {
  1986. var self = this;
  1987. var $1, $2;
  1988. $1 = smalltalk.send(self, "_cancelChanges", []);
  1989. if (smalltalk.assert($1)) {
  1990. self['@selectedClass'] = aClass;
  1991. self['@selectedClass'];
  1992. self['@selectedMethod'] = nil;
  1993. self['@selectedProtocol'] = self['@selectedMethod'];
  1994. self['@selectedProtocol'];
  1995. smalltalk.send(self, "_updateClassesList", []);
  1996. smalltalk.send(self, "_updateProtocolsList", []);
  1997. smalltalk.send(self, "_updateMethodsList", []);
  1998. $2 = smalltalk.send(self, "_updateSourceAndButtons", []);
  1999. }
  2000. return self;
  2001. }
  2002. }),
  2003. smalltalk.Browser);
  2004. smalltalk.addMethod(
  2005. "_selectMethod_",
  2006. smalltalk.method({
  2007. selector: "selectMethod:",
  2008. fn: function (aMethod) {
  2009. var self = this;
  2010. var $1, $2;
  2011. $1 = smalltalk.send(self, "_cancelChanges", []);
  2012. if (smalltalk.assert($1)) {
  2013. self['@selectedMethod'] = aMethod;
  2014. self['@selectedMethod'];
  2015. smalltalk.send(self, "_updateProtocolsList", []);
  2016. smalltalk.send(self, "_updateMethodsList", []);
  2017. $2 = smalltalk.send(self, "_updateSourceAndButtons", []);
  2018. }
  2019. return self;
  2020. }
  2021. }),
  2022. smalltalk.Browser);
  2023. smalltalk.addMethod(
  2024. "_selectProtocol_",
  2025. smalltalk.method({
  2026. selector: "selectProtocol:",
  2027. fn: function (aString) {
  2028. var self = this;
  2029. var $1, $2;
  2030. $1 = smalltalk.send(self, "_cancelChanges", []);
  2031. if (smalltalk.assert($1)) {
  2032. self['@selectedProtocol'] = aString;
  2033. self['@selectedProtocol'];
  2034. self['@selectedMethod'] = nil;
  2035. self['@selectedMethod'];
  2036. smalltalk.send(self, "_updateProtocolsList", []);
  2037. smalltalk.send(self, "_updateMethodsList", []);
  2038. $2 = smalltalk.send(self, "_updateSourceAndButtons", []);
  2039. }
  2040. return self;
  2041. }
  2042. }),
  2043. smalltalk.Browser);
  2044. smalltalk.addMethod(
  2045. "_selectTab_",
  2046. smalltalk.method({
  2047. selector: "selectTab:",
  2048. fn: function (aString) {
  2049. var self = this;
  2050. var $1;
  2051. $1 = smalltalk.send(self, "_cancelChanges", []);
  2052. if (smalltalk.assert($1)) {
  2053. self['@selectedTab'] = aString;
  2054. self['@selectedTab'];
  2055. smalltalk.send(self, "_selectProtocol_", [nil]);
  2056. smalltalk.send(self, "_updateTabsList", []);
  2057. }
  2058. return self;
  2059. }
  2060. }),
  2061. smalltalk.Browser);
  2062. smalltalk.addMethod(
  2063. "_selectedClass",
  2064. smalltalk.method({
  2065. selector: "selectedClass",
  2066. fn: function () {
  2067. var self = this;
  2068. return self['@selectedClass'];
  2069. }
  2070. }),
  2071. smalltalk.Browser);
  2072. smalltalk.addMethod(
  2073. "_selectedPackage",
  2074. smalltalk.method({
  2075. selector: "selectedPackage",
  2076. fn: function () {
  2077. var self = this;
  2078. return self['@selectedPackage'];
  2079. }
  2080. }),
  2081. smalltalk.Browser);
  2082. smalltalk.addMethod(
  2083. "_setMethodProtocol_",
  2084. smalltalk.method({
  2085. selector: "setMethodProtocol:",
  2086. fn: function (aString) {
  2087. var self = this;
  2088. var $1, $2, $3;
  2089. $1 = smalltalk.send(self, "_cancelChanges", []);
  2090. if (smalltalk.assert($1)) {
  2091. $2 = smalltalk.send(smalltalk.send(self, "_protocols", []), "_includes_", [aString]);
  2092. if (smalltalk.assert($2)) {
  2093. smalltalk.send(self['@selectedMethod'], "_category_", [aString]);
  2094. self['@selectedProtocol'] = aString;
  2095. self['@selectedProtocol'];
  2096. self['@selectedMethod'] = self['@selectedMethod'];
  2097. self['@selectedMethod'];
  2098. smalltalk.send(self, "_updateProtocolsList", []);
  2099. smalltalk.send(self, "_updateMethodsList", []);
  2100. $3 = smalltalk.send(self, "_updateSourceAndButtons", []);
  2101. } else {
  2102. smalltalk.send(self, "_addNewProtocol", []);
  2103. }
  2104. }
  2105. return self;
  2106. }
  2107. }),
  2108. smalltalk.Browser);
  2109. smalltalk.addMethod(
  2110. "_showClassButtons",
  2111. smalltalk.method({
  2112. selector: "showClassButtons",
  2113. fn: function () {
  2114. var self = this;
  2115. smalltalk.send(smalltalk.send(self['@classButtons'], "_asJQuery", []), "_show", []);
  2116. return self;
  2117. }
  2118. }),
  2119. smalltalk.Browser);
  2120. smalltalk.addMethod(
  2121. "_showMethodButtons",
  2122. smalltalk.method({
  2123. selector: "showMethodButtons",
  2124. fn: function () {
  2125. var self = this;
  2126. smalltalk.send(smalltalk.send(self['@methodButtons'], "_asJQuery", []), "_show", []);
  2127. return self;
  2128. }
  2129. }),
  2130. smalltalk.Browser);
  2131. smalltalk.addMethod(
  2132. "_source",
  2133. smalltalk.method({
  2134. selector: "source",
  2135. fn: function () {
  2136. var self = this;
  2137. var $1, $3, $2, $4;
  2138. $1 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("comment")]);
  2139. if (!smalltalk.assert($1)) {
  2140. $3 = smalltalk.send(smalltalk.send(self['@selectedProtocol'], "_notNil", []), "_or_", [function () {return smalltalk.send(self['@selectedMethod'], "_notNil", []);}]);
  2141. if (smalltalk.assert($3)) {
  2142. $2 = smalltalk.send(self, "_methodSource", []);
  2143. } else {
  2144. $2 = smalltalk.send(self, "_declarationSource", []);
  2145. }
  2146. return $2;
  2147. }
  2148. if (($receiver = self['@selectedClass']) == nil ||
  2149. $receiver == undefined) {
  2150. $4 = "";
  2151. } else {
  2152. $4 = smalltalk.send(self, "_classCommentSource", []);
  2153. }
  2154. return $4;
  2155. }
  2156. }),
  2157. smalltalk.Browser);
  2158. smalltalk.addMethod(
  2159. "_updateCategoriesList",
  2160. smalltalk.method({
  2161. selector: "updateCategoriesList",
  2162. fn: function () {
  2163. var self = this;
  2164. var $1, $2, $3;
  2165. smalltalk.send(self['@packagesList'], "_contents_", [function (html) {return smalltalk.send(smalltalk.send(self, "_packages", []), "_do_", [function (each) {var li;var label;$1 = smalltalk.send(each, "_isEmpty", []);if (smalltalk.assert($1)) {label = "Unclassified";} else {label = each;}li = smalltalk.send(html, "_li", []);$2 = smalltalk.send(self['@selectedPackage'], "__eq", [each]);if (smalltalk.assert($2)) {smalltalk.send(li, "_class_", ["selected"]);}smalltalk.send(li, "_with_", [label]);$3 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectCategory_", [each]);}]);return $3;}]);}]);
  2166. return self;
  2167. }
  2168. }),
  2169. smalltalk.Browser);
  2170. smalltalk.addMethod(
  2171. "_updateClassesList",
  2172. smalltalk.method({
  2173. selector: "updateClassesList",
  2174. fn: function () {
  2175. var self = this;
  2176. smalltalk.send(smalltalk.send(smalltalk.TabManager || TabManager, "_current", []), "_update", []);
  2177. smalltalk.send(self['@classesList'], "_updateNodes", []);
  2178. return self;
  2179. }
  2180. }),
  2181. smalltalk.Browser);
  2182. smalltalk.addMethod(
  2183. "_updateMethodsList",
  2184. smalltalk.method({
  2185. selector: "updateMethodsList",
  2186. fn: function () {
  2187. var self = this;
  2188. var $1, $2;
  2189. smalltalk.send(self['@methodsList'], "_contents_", [function (html) {return smalltalk.send(smalltalk.send(self, "_methods", []), "_do_", [function (each) {var li;li = smalltalk.send(html, "_li", []);$1 = smalltalk.send(self['@selectedMethod'], "__eq", [each]);if (smalltalk.assert($1)) {smalltalk.send(li, "_class_", ["selected"]);}smalltalk.send(li, "_with_", [smalltalk.send(each, "_selector", [])]);$2 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectMethod_", [each]);}]);return $2;}]);}]);
  2190. return self;
  2191. }
  2192. }),
  2193. smalltalk.Browser);
  2194. smalltalk.addMethod(
  2195. "_updateProtocolsList",
  2196. smalltalk.method({
  2197. selector: "updateProtocolsList",
  2198. fn: function () {
  2199. var self = this;
  2200. var $1, $2;
  2201. smalltalk.send(self['@protocolsList'], "_contents_", [function (html) {return smalltalk.send(smalltalk.send(self, "_protocols", []), "_do_", [function (each) {var li;li = smalltalk.send(html, "_li", []);$1 = smalltalk.send(self['@selectedProtocol'], "__eq", [each]);if (smalltalk.assert($1)) {smalltalk.send(li, "_class_", ["selected"]);}smalltalk.send(li, "_with_", [each]);$2 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectProtocol_", [each]);}]);return $2;}]);}]);
  2202. return self;
  2203. }
  2204. }),
  2205. smalltalk.Browser);
  2206. smalltalk.addMethod(
  2207. "_updateSourceAndButtons",
  2208. smalltalk.method({
  2209. selector: "updateSourceAndButtons",
  2210. fn: function (){
  2211. var self=this;
  2212. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$14,$15,$16,$17,$18,$19,$13,$20,$22,$23,$24,$25,$21,$26,$27;
  2213. var currentProtocol;
  2214. smalltalk.send(self,"_disableSaveButton",[]);
  2215. smalltalk.send(self["@classButtons"],"_contents_",[(function(html){
  2216. $1=smalltalk.send(html,"_button",[]);
  2217. smalltalk.send($1,"_title_",["Create a new class"]);
  2218. smalltalk.send($1,"_onClick_",[(function(){
  2219. return smalltalk.send(self,"_addNewClass",[]);
  2220. })]);
  2221. $2=smalltalk.send($1,"_with_",["New class"]);
  2222. $2;
  2223. $3=smalltalk.send(html,"_button",[]);
  2224. smalltalk.send($3,"_with_",["Rename class"]);
  2225. $4=smalltalk.send($3,"_onClick_",[(function(){
  2226. return smalltalk.send(self,"_renameClass",[]);
  2227. })]);
  2228. $4;
  2229. $5=smalltalk.send(html,"_button",[]);
  2230. smalltalk.send($5,"_with_",["Copy class"]);
  2231. $6=smalltalk.send($5,"_onClick_",[(function(){
  2232. return smalltalk.send(self,"_copyClass",[]);
  2233. })]);
  2234. $6;
  2235. $7=smalltalk.send(html,"_button",[]);
  2236. smalltalk.send($7,"_with_",["Remove class"]);
  2237. $8=smalltalk.send($7,"_onClick_",[(function(){
  2238. return smalltalk.send(self,"_removeClass",[]);
  2239. })]);
  2240. $8;
  2241. $9=smalltalk.send(html,"_button",[]);
  2242. smalltalk.send($9,"_with_",["References"]);
  2243. $10=smalltalk.send($9,"_onClick_",[(function(){
  2244. return smalltalk.send(self,"_searchClassReferences",[]);
  2245. })]);
  2246. return $10;
  2247. })]);
  2248. smalltalk.send(self["@methodButtons"],"_contents_",[(function(html){
  2249. var protocolSelect;
  2250. var referencesSelect;
  2251. $11=smalltalk.send(html,"_button",[]);
  2252. smalltalk.send($11,"_with_",["Remove method"]);
  2253. $12=smalltalk.send($11,"_onClick_",[(function(){
  2254. return smalltalk.send(self,"_removeMethod",[]);
  2255. })]);
  2256. $12;
  2257. protocolSelect=smalltalk.send(html,"_select",[]);
  2258. protocolSelect;
  2259. smalltalk.send(protocolSelect,"_onChange_",[(function(){
  2260. return smalltalk.send(self,"_setMethodProtocol_",[smalltalk.send(smalltalk.send(protocolSelect,"_asJQuery",[]),"_val",[])]);
  2261. })]);
  2262. $13=smalltalk.send(protocolSelect,"_with_",[(function(){
  2263. $14=smalltalk.send(html,"_option",[]);
  2264. smalltalk.send($14,"_with_",["Method protocol"]);
  2265. $15=smalltalk.send($14,"_at_put_",["disabled","disabled"]);
  2266. $15;
  2267. $16=smalltalk.send(html,"_option",[]);
  2268. smalltalk.send($16,"_class_",["important"]);
  2269. $17=smalltalk.send($16,"_with_",["New..."]);
  2270. $17;
  2271. currentProtocol=self["@selectedProtocol"];
  2272. currentProtocol;
  2273. $18=smalltalk.send(smalltalk.send(currentProtocol,"_isNil",[]),"_and_",[(function(){
  2274. return smalltalk.send(self["@selectedMethod"],"_notNil",[]);
  2275. })]);
  2276. if(smalltalk.assert($18)){
  2277. currentProtocol=smalltalk.send(self["@selectedMethod"],"_category",[]);
  2278. currentProtocol;
  2279. };
  2280. return smalltalk.send(smalltalk.send(self,"_protocols",[]),"_do_",[(function(each){
  2281. option=smalltalk.send(smalltalk.send(html,"_option",[]),"_with_",[each]);
  2282. option;
  2283. $19=smalltalk.send(currentProtocol,"__eq",[each]);
  2284. if(smalltalk.assert($19)){
  2285. return smalltalk.send(option,"_at_put_",["selected","selected"]);
  2286. };
  2287. })]);
  2288. })]);
  2289. $13;
  2290. $20=smalltalk.send(self["@selectedMethod"],"_isNil",[]);
  2291. if(! smalltalk.assert($20)){
  2292. referencesSelect=smalltalk.send(html,"_select",[]);
  2293. referencesSelect;
  2294. smalltalk.send(referencesSelect,"_onChange_",[(function(){
  2295. return smalltalk.send(self,"_searchReferencesOf_",[smalltalk.send(smalltalk.send(referencesSelect,"_asJQuery",[]),"_val",[])]);
  2296. })]);
  2297. $21=smalltalk.send(referencesSelect,"_with_",[(function(){
  2298. var option;
  2299. $22=smalltalk.send(html,"_option",[]);
  2300. smalltalk.send($22,"_with_",["References"]);
  2301. smalltalk.send($22,"_at_put_",["disabled","disabled"]);
  2302. $23=smalltalk.send($22,"_at_put_",["selected","selected"]);
  2303. $23;
  2304. $24=smalltalk.send(html,"_option",[]);
  2305. smalltalk.send($24,"_class_",["important"]);
  2306. $25=smalltalk.send($24,"_with_",[smalltalk.send(self["@selectedMethod"],"_selector",[])]);
  2307. $25;
  2308. return smalltalk.send(smalltalk.send(smalltalk.send(self["@selectedMethod"],"_messageSends",[]),"_sorted",[]),"_do_",[(function(each){
  2309. return smalltalk.send(smalltalk.send(html,"_option",[]),"_with_",[each]);
  2310. })]);
  2311. })]);
  2312. return $21;
  2313. };
  2314. })]);
  2315. $26=smalltalk.send(self["@selectedMethod"],"_isNil",[]);
  2316. if(smalltalk.assert($26)){
  2317. smalltalk.send(self,"_hideMethodButtons",[]);
  2318. $27=smalltalk.send(smalltalk.send(self["@selectedClass"],"_isNil",[]),"_or_",[(function(){
  2319. return smalltalk.send(self["@selectedProtocol"],"_notNil",[]);
  2320. })]);
  2321. if(smalltalk.assert($27)){
  2322. smalltalk.send(self,"_hideClassButtons",[]);
  2323. } else {
  2324. smalltalk.send(self,"_showClassButtons",[]);
  2325. };
  2326. } else {
  2327. smalltalk.send(self,"_hideClassButtons",[]);
  2328. smalltalk.send(self,"_showMethodButtons",[]);
  2329. };
  2330. smalltalk.send(self["@sourceArea"],"_val_",[smalltalk.send(self,"_source",[])]);
  2331. return self}
  2332. }),
  2333. smalltalk.Browser);
  2334. smalltalk.addMethod(
  2335. "_updateStatus",
  2336. smalltalk.method({
  2337. selector: "updateStatus",
  2338. fn: function () {
  2339. var self = this;
  2340. var $1;
  2341. $1 = smalltalk.send(smalltalk.send(self['@sourceArea'], "_val", []), "__eq", [smalltalk.send(self, "_source", [])]);
  2342. if (smalltalk.assert($1)) {
  2343. if (($receiver = self['@saveButton']) == nil ||
  2344. $receiver == undefined) {
  2345. self['@saveButton'];
  2346. } else {
  2347. smalltalk.send(self['@saveButton'], "_at_put_", ["disabled", true]);
  2348. }
  2349. self['@unsavedChanges'] = false;
  2350. self['@unsavedChanges'];
  2351. } else {
  2352. if (($receiver = self['@saveButton']) == nil ||
  2353. $receiver == undefined) {
  2354. self['@saveButton'];
  2355. } else {
  2356. smalltalk.send(self['@saveButton'], "_removeAt_", ["disabled"]);
  2357. }
  2358. self['@unsavedChanges'] = true;
  2359. self['@unsavedChanges'];
  2360. }
  2361. return self;
  2362. }
  2363. }),
  2364. smalltalk.Browser);
  2365. smalltalk.addMethod(
  2366. "_updateTabsList",
  2367. smalltalk.method({
  2368. selector: "updateTabsList",
  2369. fn: function () {
  2370. var self = this;
  2371. var $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12;
  2372. smalltalk.send(self['@tabsList'], "_contents_", [function (html) {var li;li = smalltalk.send(html, "_li", []);$1 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")]);if (smalltalk.assert($1)) {smalltalk.send(li, "_class_", ["selected"]);}smalltalk.send(li, "_with_", [function () {smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["ltab"]);$2 = smalltalk.send(html, "_span", []);smalltalk.send($2, "_class_", ["mtab"]);$3 = smalltalk.send($2, "_with_", ["Instance"]);$3;return smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["rtab"]);}]);$4 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectTab_", [smalltalk.symbolFor("instance")]);}]);$4;li = smalltalk.send(html, "_li", []);$5 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("class")]);if (smalltalk.assert($5)) {smalltalk.send(li, "_class_", ["selected"]);}smalltalk.send(li, "_with_", [function () {smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["ltab"]);$6 = smalltalk.send(html, "_span", []);smalltalk.send($6, "_class_", ["mtab"]);$7 = smalltalk.send($6, "_with_", ["Class"]);$7;return smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["rtab"]);}]);$8 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectTab_", [smalltalk.symbolFor("class")]);}]);$8;li = smalltalk.send(html, "_li", []);$9 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("comment")]);if (smalltalk.assert($9)) {smalltalk.send(li, "_class_", ["selected"]);}smalltalk.send(li, "_with_", [function () {smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["ltab"]);$10 = smalltalk.send(html, "_span", []);smalltalk.send($10, "_class_", ["mtab"]);$11 = smalltalk.send($10, "_with_", ["Comment"]);$11;return smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["rtab"]);}]);$12 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectTab_", [smalltalk.symbolFor("comment")]);}]);return $12;}]);
  2373. return self;
  2374. }
  2375. }),
  2376. smalltalk.Browser);
  2377. smalltalk.addMethod(
  2378. "_commitPathJs",
  2379. smalltalk.method({
  2380. selector: "commitPathJs",
  2381. fn: function () {
  2382. var self = this;
  2383. return "js";
  2384. }
  2385. }),
  2386. smalltalk.Browser.klass);
  2387. smalltalk.addMethod(
  2388. "_commitPathSt",
  2389. smalltalk.method({
  2390. selector: "commitPathSt",
  2391. fn: function () {
  2392. var self = this;
  2393. return "st";
  2394. }
  2395. }),
  2396. smalltalk.Browser.klass);
  2397. smalltalk.addMethod(
  2398. "_open",
  2399. smalltalk.method({
  2400. selector: "open",
  2401. fn: function () {
  2402. var self = this;
  2403. smalltalk.send(smalltalk.send(self, "_new", []), "_open", []);
  2404. return self;
  2405. }
  2406. }),
  2407. smalltalk.Browser.klass);
  2408. smalltalk.addMethod(
  2409. "_openOn_",
  2410. smalltalk.method({
  2411. selector: "openOn:",
  2412. fn: function (aClass) {
  2413. var self = this;
  2414. var $2, $3, $1;
  2415. $2 = smalltalk.send(self, "_new", []);
  2416. smalltalk.send($2, "_open", []);
  2417. smalltalk.send($2, "_selectCategory_", [smalltalk.send(aClass, "_category", [])]);
  2418. $3 = smalltalk.send($2, "_selectClass_", [aClass]);
  2419. $1 = $3;
  2420. return $1;
  2421. }
  2422. }),
  2423. smalltalk.Browser.klass);
  2424. smalltalk.addClass('Debugger', smalltalk.TabWidget, ['error', 'selectedContext', 'sourceArea', 'ul', 'ul2', 'inspector', 'saveButton', 'unsavedChanges', 'selectedVariable', 'selectedVariableName', 'inspectButton'], 'IDE');
  2425. smalltalk.addMethod(
  2426. "_arguments",
  2427. smalltalk.method({
  2428. selector: "arguments",
  2429. fn: function () {
  2430. var self = this;
  2431. var $2, $1;
  2432. $2 = smalltalk.send(self, "_method", []);
  2433. if (($receiver = $2) == nil || $receiver == undefined) {
  2434. $1 = smalltalk.send(smalltalk.send(self['@selectedContext'], "_temps", []), "_collect_", [function (each) {return nil;}]);
  2435. } else {
  2436. $1 = smalltalk.send(smalltalk.send(self, "_method", []), "_arguments", []);
  2437. }
  2438. return $1;
  2439. }
  2440. }),
  2441. smalltalk.Debugger);
  2442. smalltalk.addMethod(
  2443. "_canBeClosed",
  2444. smalltalk.method({
  2445. selector: "canBeClosed",
  2446. fn: function () {
  2447. var self = this;
  2448. return true;
  2449. }
  2450. }),
  2451. smalltalk.Debugger);
  2452. smalltalk.addMethod(
  2453. "_error",
  2454. smalltalk.method({
  2455. selector: "error",
  2456. fn: function () {
  2457. var self = this;
  2458. return self['@error'];
  2459. }
  2460. }),
  2461. smalltalk.Debugger);
  2462. smalltalk.addMethod(
  2463. "_error_",
  2464. smalltalk.method({
  2465. selector: "error:",
  2466. fn: function (anError) {
  2467. var self = this;
  2468. self['@error'] = anError;
  2469. return self;
  2470. }
  2471. }),
  2472. smalltalk.Debugger);
  2473. smalltalk.addMethod(
  2474. "_initialize",
  2475. smalltalk.method({
  2476. selector: "initialize",
  2477. fn: function () {
  2478. var self = this;
  2479. smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
  2480. smalltalk.send(self['@unsavedChanges'], "__eq", [false]);
  2481. return self;
  2482. }
  2483. }),
  2484. smalltalk.Debugger);
  2485. smalltalk.addMethod(
  2486. "_inspectSelectedVariable",
  2487. smalltalk.method({
  2488. selector: "inspectSelectedVariable",
  2489. fn: function () {
  2490. var self = this;
  2491. smalltalk.send(self['@selectedVariable'], "_inspect", []);
  2492. return self;
  2493. }
  2494. }),
  2495. smalltalk.Debugger);
  2496. smalltalk.addMethod(
  2497. "_label",
  2498. smalltalk.method({
  2499. selector: "label",
  2500. fn: function () {
  2501. var self = this;
  2502. return "[Debugger]";
  2503. }
  2504. }),
  2505. smalltalk.Debugger);
  2506. smalltalk.addMethod(
  2507. "_method",
  2508. smalltalk.method({
  2509. selector: "method",
  2510. fn: function () {
  2511. var self = this;
  2512. var $1;
  2513. $1 = smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_class", []), "_methodAt_", [smalltalk.send(self['@selectedContext'], "_selector", [])]);
  2514. return $1;
  2515. }
  2516. }),
  2517. smalltalk.Debugger);
  2518. smalltalk.addMethod(
  2519. "_proceed",
  2520. smalltalk.method({
  2521. selector: "proceed",
  2522. fn: function () {
  2523. var self = this;
  2524. smalltalk.send(self, "_close", []);
  2525. smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_perform_withArguments_", [smalltalk.send(self['@selectedContext'], "_selector", []), smalltalk.send(self['@selectedContext'], "_temps", [])]);
  2526. return self;
  2527. }
  2528. }),
  2529. smalltalk.Debugger);
  2530. smalltalk.addMethod(
  2531. "_receiver",
  2532. smalltalk.method({
  2533. selector: "receiver",
  2534. fn: function () {
  2535. var self = this;
  2536. var $1;
  2537. $1 = smalltalk.send(self['@selectedContext'], "_receiver", []);
  2538. return $1;
  2539. }
  2540. }),
  2541. smalltalk.Debugger);
  2542. smalltalk.addMethod(
  2543. "_renderBottomPanelOn_",
  2544. smalltalk.method({
  2545. selector: "renderBottomPanelOn:",
  2546. fn: function (html) {
  2547. var self = this;
  2548. var $1, $2;
  2549. $1 = smalltalk.send(html, "_div", []);
  2550. smalltalk.send($1, "_class_", ["amber_sourceCode debugger"]);
  2551. $2 = smalltalk.send($1, "_with_", [function () {self['@sourceArea'] = smalltalk.send(smalltalk.SourceArea || SourceArea, "_new", []);self['@sourceArea'];return smalltalk.send(self['@sourceArea'], "_renderOn_", [html]);}]);
  2552. self['@ul2'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column debugger variables"]);
  2553. self['@inspector'] = smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["amber_column debugger inspector"]);
  2554. smalltalk.send(self['@sourceArea'], "_onKeyUp_", [function () {return smalltalk.send(self, "_updateStatus", []);}]);
  2555. return self;
  2556. }
  2557. }),
  2558. smalltalk.Debugger);
  2559. smalltalk.addMethod(
  2560. "_renderBoxOn_",
  2561. smalltalk.method({
  2562. selector: "renderBoxOn:",
  2563. fn: function (html) {
  2564. var self = this;
  2565. var $1;
  2566. smalltalk.send(self, "_renderTopPanelOn_", [html]);
  2567. $1 = smalltalk.send(self, "_renderBottomPanelOn_", [html]);
  2568. return self;
  2569. }
  2570. }),
  2571. smalltalk.Debugger);
  2572. smalltalk.addMethod(
  2573. "_renderButtonsOn_",
  2574. smalltalk.method({
  2575. selector: "renderButtonsOn:",
  2576. fn: function (html) {
  2577. var self = this;
  2578. var $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15;
  2579. $1 = smalltalk.send(html, "_button", []);
  2580. smalltalk.send($1, "_with_", ["Save"]);
  2581. $2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_save", []);}]);
  2582. self['@saveButton'] = $2;
  2583. $3 = smalltalk.send(html, "_button", []);
  2584. smalltalk.send($3, "_with_", ["DoIt"]);
  2585. $4 = smalltalk.send($3, "_onClick_", [function () {return smalltalk.send(self['@sourceArea'], "_doIt", []);}]);
  2586. $5 = smalltalk.send(html, "_button", []);
  2587. smalltalk.send($5, "_with_", ["PrintIt"]);
  2588. $6 = smalltalk.send($5, "_onClick_", [function () {return smalltalk.send(self['@sourceArea'], "_printIt", []);}]);
  2589. $7 = smalltalk.send(html, "_button", []);
  2590. smalltalk.send($7, "_with_", ["InspectIt"]);
  2591. $8 = smalltalk.send($7, "_onClick_", [function () {return smalltalk.send(self['@sourceArea'], "_inspectIt", []);}]);
  2592. $9 = smalltalk.send(html, "_button", []);
  2593. smalltalk.send($9, "_with_", ["Proceed"]);
  2594. $10 = smalltalk.send($9, "_onClick_", [function () {return smalltalk.send(self, "_proceed", []);}]);
  2595. $11 = smalltalk.send(html, "_button", []);
  2596. smalltalk.send($11, "_with_", ["Abandon"]);
  2597. $12 = smalltalk.send($11, "_onClick_", [function () {return smalltalk.send(self, "_close", []);}]);
  2598. $13 = smalltalk.send(html, "_button", []);
  2599. smalltalk.send($13, "_class_", ["amber_button debugger inspect"]);
  2600. smalltalk.send($13, "_with_", ["Inspect"]);
  2601. $14 = smalltalk.send($13, "_onClick_", [function () {return smalltalk.send(self, "_inspectSelectedVariable", []);}]);
  2602. self['@inspectButton'] = $14;
  2603. smalltalk.send(self, "_updateSourceArea", []);
  2604. smalltalk.send(self, "_updateStatus", []);
  2605. smalltalk.send(self, "_updateVariablesList", []);
  2606. $15 = smalltalk.send(self, "_updateInspector", []);
  2607. return self;
  2608. }
  2609. }),
  2610. smalltalk.Debugger);
  2611. smalltalk.addMethod(
  2612. "_renderContext_on_",
  2613. smalltalk.method({
  2614. selector: "renderContext:on:",
  2615. fn: function (aContext, html) {
  2616. var self = this;
  2617. var $1, $2, $3;
  2618. var li;
  2619. li = smalltalk.send(html, "_li", []);
  2620. $1 = smalltalk.send(self['@selectedContext'], "__eq", [aContext]);
  2621. if (smalltalk.assert($1)) {
  2622. smalltalk.send(li, "_class_", ["selected"]);
  2623. }
  2624. smalltalk.send(li, "_with_", [smalltalk.send(aContext, "_asString", [])]);
  2625. $2 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectContext_", [aContext]);}]);
  2626. $3 = smalltalk.send(aContext, "_home", []);
  2627. if (($receiver = $3) == nil || $receiver == undefined) {
  2628. } else {
  2629. smalltalk.send(self, "_renderContext_on_", [smalltalk.send(aContext, "_home", []), html]);
  2630. }
  2631. return self;
  2632. }
  2633. }),
  2634. smalltalk.Debugger);
  2635. smalltalk.addMethod(
  2636. "_renderTopPanelOn_",
  2637. smalltalk.method({
  2638. selector: "renderTopPanelOn:",
  2639. fn: function (html) {
  2640. var self = this;
  2641. var $1, $3, $4, $5, $6, $2;
  2642. self['@selectedContext'] = smalltalk.send(smalltalk.send(self, "_error", []), "_context", []);
  2643. $1 = smalltalk.send(html, "_div", []);
  2644. smalltalk.send($1, "_class_", ["top"]);
  2645. $2 = smalltalk.send($1, "_with_", [function () {$3 = smalltalk.send(html, "_div", []);smalltalk.send($3, "_class_", ["label"]);$4 = smalltalk.send($3, "_with_", [smalltalk.send(smalltalk.send(self, "_error", []), "_messageText", [])]);$4;$5 = smalltalk.send(html, "_ul", []);smalltalk.send($5, "_class_", ["amber_column debugger contexts"]);$6 = smalltalk.send($5, "_with_", [function () {return smalltalk.send(self, "_renderContext_on_", [smalltalk.send(smalltalk.send(self, "_error", []), "_context", []), html]);}]);self['@ul'] = $6;return self['@ul'];}]);
  2646. return self;
  2647. }
  2648. }),
  2649. smalltalk.Debugger);
  2650. smalltalk.addMethod(
  2651. "_save",
  2652. smalltalk.method({
  2653. selector: "save",
  2654. fn: function () {
  2655. var self = this;
  2656. var protocol;
  2657. protocol = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_class", []), "_methodDictionary", []), "_at_", [smalltalk.send(self['@selectedContext'], "_selector", [])]), "_category", []);
  2658. smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_class", []), "_compile_category_", [smalltalk.send(self['@sourceArea'], "_val", []), protocol]);
  2659. smalltalk.send(self, "_updateStatus", []);
  2660. return self;
  2661. }
  2662. }),
  2663. smalltalk.Debugger);
  2664. smalltalk.addMethod(
  2665. "_selectContext_",
  2666. smalltalk.method({
  2667. selector: "selectContext:",
  2668. fn: function (aContext) {
  2669. var self = this;
  2670. var $1;
  2671. self['@selectedContext'] = aContext;
  2672. self['@selectedVariable'] = nil;
  2673. self['@selectedVariableName'] = nil;
  2674. smalltalk.send(self, "_updateContextsList", []);
  2675. smalltalk.send(self, "_updateSourceArea", []);
  2676. smalltalk.send(self, "_updateInspector", []);
  2677. smalltalk.send(self, "_updateVariablesList", []);
  2678. $1 = smalltalk.send(self, "_updateStatus", []);
  2679. return self;
  2680. }
  2681. }),
  2682. smalltalk.Debugger);
  2683. smalltalk.addMethod(
  2684. "_selectVariable_named_",
  2685. smalltalk.method({
  2686. selector: "selectVariable:named:",
  2687. fn: function (anObject, aString) {
  2688. var self = this;
  2689. self['@selectedVariable'] = anObject;
  2690. self['@selectedVariableName'] = aString;
  2691. smalltalk.send(self['@inspector'], "_contents_", [function (html) {return smalltalk.send(html, "_with_", [smalltalk.send(anObject, "_printString", [])]);}]);
  2692. smalltalk.send(self, "_updateVariablesList", []);
  2693. return self;
  2694. }
  2695. }),
  2696. smalltalk.Debugger);
  2697. smalltalk.addMethod(
  2698. "_source",
  2699. smalltalk.method({
  2700. selector: "source",
  2701. fn: function () {
  2702. var self = this;
  2703. var $2, $1;
  2704. $2 = smalltalk.send(self, "_method", []);
  2705. if (($receiver = $2) == nil || $receiver == undefined) {
  2706. $1 = "Method doesn't exist!";
  2707. } else {
  2708. $1 = smalltalk.send(smalltalk.send(self, "_method", []), "_source", []);
  2709. }
  2710. return $1;
  2711. }
  2712. }),
  2713. smalltalk.Debugger);
  2714. smalltalk.addMethod(
  2715. "_updateContextsList",
  2716. smalltalk.method({
  2717. selector: "updateContextsList",
  2718. fn: function () {
  2719. var self = this;
  2720. smalltalk.send(self['@ul'], "_contents_", [function (html) {return smalltalk.send(self, "_renderContext_on_", [smalltalk.send(smalltalk.send(self, "_error", []), "_context", []), html]);}]);
  2721. return self;
  2722. }
  2723. }),
  2724. smalltalk.Debugger);
  2725. smalltalk.addMethod(
  2726. "_updateInspector",
  2727. smalltalk.method({
  2728. selector: "updateInspector",
  2729. fn: function () {
  2730. var self = this;
  2731. smalltalk.send(self['@inspector'], "_contents_", [function (html) {}]);
  2732. return self;
  2733. }
  2734. }),
  2735. smalltalk.Debugger);
  2736. smalltalk.addMethod(
  2737. "_updateSourceArea",
  2738. smalltalk.method({
  2739. selector: "updateSourceArea",
  2740. fn: function () {
  2741. var self = this;
  2742. smalltalk.send(self['@sourceArea'], "_val_", [smalltalk.send(self, "_source", [])]);
  2743. return self;
  2744. }
  2745. }),
  2746. smalltalk.Debugger);
  2747. smalltalk.addMethod(
  2748. "_updateStatus",
  2749. smalltalk.method({
  2750. selector: "updateStatus",
  2751. fn: function () {
  2752. var self = this;
  2753. var $1;
  2754. $1 = smalltalk.send(smalltalk.send(self['@sourceArea'], "_val", []), "__eq", [smalltalk.send(self, "_source", [])]);
  2755. if (smalltalk.assert($1)) {
  2756. if (($receiver = self['@saveButton']) == nil ||
  2757. $receiver == undefined) {
  2758. self['@saveButton'];
  2759. } else {
  2760. smalltalk.send(self['@saveButton'], "_at_put_", ["disabled", true]);
  2761. }
  2762. self['@unsavedChanges'] = false;
  2763. self['@unsavedChanges'];
  2764. } else {
  2765. if (($receiver = self['@saveButton']) == nil ||
  2766. $receiver == undefined) {
  2767. self['@saveButton'];
  2768. } else {
  2769. smalltalk.send(self['@saveButton'], "_removeAt_", ["disabled"]);
  2770. }
  2771. self['@unsavedChanges'] = true;
  2772. self['@unsavedChanges'];
  2773. }
  2774. return self;
  2775. }
  2776. }),
  2777. smalltalk.Debugger);
  2778. smalltalk.addMethod(
  2779. "_updateVariablesList",
  2780. smalltalk.method({
  2781. selector: "updateVariablesList",
  2782. fn: function () {
  2783. var self = this;
  2784. var $1, $2, $3, $4, $5, $6, $7, $8, $9;
  2785. smalltalk.send(self['@ul2'], "_contents_", [function (html) {var li;$1 = smalltalk.send(html, "_li", []);smalltalk.send($1, "_with_", ["self"]);$2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_selectVariable_named_", [smalltalk.send(self, "_receiver", []), "self"]);}]);li = $2;$3 = smalltalk.send(self['@selectedVariableName'], "__eq", ["self"]);if (smalltalk.assert($3)) {smalltalk.send(li, "_class_", ["selected"]);}smalltalk.send(smalltalk.send(self, "_arguments", []), "_withIndexDo_", [function (each, index) {var param;param = smalltalk.send(smalltalk.send(self['@selectedContext'], "_temps", []), "_at_", [index]);$4 = smalltalk.send(html, "_li", []);smalltalk.send($4, "_with_", [each]);$5 = smalltalk.send($4, "_onClick_", [function () {return smalltalk.send(self, "_selectVariable_named_", [param, each]);}]);li = $5;li;$6 = smalltalk.send(self['@selectedVariableName'], "__eq", [each]);if (smalltalk.assert($6)) {return smalltalk.send(li, "_class_", ["selected"]);}}]);return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_receiver", []), "_class", []), "_allInstanceVariableNames", []), "_do_", [function (each) {var ivar;ivar = smalltalk.send(smalltalk.send(self, "_receiver", []), "_instVarAt_", [each]);$7 = smalltalk.send(html, "_li", []);smalltalk.send($7, "_with_", [each]);$8 = smalltalk.send($7, "_onClick_", [function () {return smalltalk.send(self, "_selectVariable_named_", [ivar, each]);}]);li = $8;li;$9 = smalltalk.send(self['@selectedVariableName'], "__eq", [each]);if (smalltalk.assert($9)) {return smalltalk.send(li, "_class_", ["selected"]);}}]);}]);
  2786. if (($receiver = self['@selectedVariable']) == nil ||
  2787. $receiver == undefined) {
  2788. smalltalk.send(self['@inspectButton'], "_at_put_", ["disabled", true]);
  2789. } else {
  2790. smalltalk.send(self['@inspectButton'], "_removeAt_", ["disabled"]);
  2791. }
  2792. return self;
  2793. }
  2794. }),
  2795. smalltalk.Debugger);
  2796. smalltalk.addClass('IDETranscript', smalltalk.TabWidget, ['textarea'], 'IDE');
  2797. smalltalk.addMethod(
  2798. "_clear",
  2799. smalltalk.method({
  2800. selector: "clear",
  2801. fn: function () {
  2802. var self = this;
  2803. smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val_", [""]);
  2804. return self;
  2805. }
  2806. }),
  2807. smalltalk.IDETranscript);
  2808. smalltalk.addMethod(
  2809. "_cr",
  2810. smalltalk.method({
  2811. selector: "cr",
  2812. fn: function () {
  2813. var self = this;
  2814. 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", [])])]);
  2815. return self;
  2816. }
  2817. }),
  2818. smalltalk.IDETranscript);
  2819. smalltalk.addMethod(
  2820. "_label",
  2821. smalltalk.method({
  2822. selector: "label",
  2823. fn: function () {
  2824. var self = this;
  2825. return "Transcript";
  2826. }
  2827. }),
  2828. smalltalk.IDETranscript);
  2829. smalltalk.addMethod(
  2830. "_open",
  2831. smalltalk.method({
  2832. selector: "open",
  2833. fn: function () {
  2834. var self = this;
  2835. var $1, $2;
  2836. $1 = smalltalk.send(smalltalk.TabManager || TabManager, "_current", []);
  2837. smalltalk.send($1, "_open", []);
  2838. $2 = smalltalk.send($1, "_selectTab_", [self]);
  2839. return self;
  2840. }
  2841. }),
  2842. smalltalk.IDETranscript);
  2843. smalltalk.addMethod(
  2844. "_renderBoxOn_",
  2845. smalltalk.method({
  2846. selector: "renderBoxOn:",
  2847. fn: function (html) {
  2848. var self = this;
  2849. var $1;
  2850. self['@textarea'] = smalltalk.send(html, "_textarea", []);
  2851. smalltalk.send(self['@textarea'], "_class_", ["amber_transcript"]);
  2852. $1 = smalltalk.send(self['@textarea'], "_at_put_", ["spellcheck", "false"]);
  2853. return self;
  2854. }
  2855. }),
  2856. smalltalk.IDETranscript);
  2857. smalltalk.addMethod(
  2858. "_renderButtonsOn_",
  2859. smalltalk.method({
  2860. selector: "renderButtonsOn:",
  2861. fn: function (html) {
  2862. var self = this;
  2863. var $1, $2;
  2864. $1 = smalltalk.send(html, "_button", []);
  2865. smalltalk.send($1, "_with_", ["Clear transcript"]);
  2866. $2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_clear", []);}]);
  2867. return self;
  2868. }
  2869. }),
  2870. smalltalk.IDETranscript);
  2871. smalltalk.addMethod(
  2872. "_show_",
  2873. smalltalk.method({
  2874. selector: "show:",
  2875. fn: function (anObject) {
  2876. var self = this;
  2877. if (($receiver = self['@textarea']) == nil || $receiver == undefined) {
  2878. smalltalk.send(self, "_open", []);
  2879. } else {
  2880. self['@textarea'];
  2881. }
  2882. smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val_", [smalltalk.send(smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val", []), "__comma", [smalltalk.send(anObject, "_asString", [])])]);
  2883. return self;
  2884. }
  2885. }),
  2886. smalltalk.IDETranscript);
  2887. smalltalk.IDETranscript.klass.iVarNames = ['current'];
  2888. smalltalk.addMethod(
  2889. "_current",
  2890. smalltalk.method({
  2891. selector: "current",
  2892. fn: function () {
  2893. var self = this;
  2894. var $1;
  2895. if (($receiver = self['@current']) == nil || $receiver == undefined) {
  2896. self['@current'] = smalltalk.send(self, "_new", [], smalltalk.TabWidget.klass);
  2897. $1 = self['@current'];
  2898. } else {
  2899. $1 = self['@current'];
  2900. }
  2901. return $1;
  2902. }
  2903. }),
  2904. smalltalk.IDETranscript.klass);
  2905. smalltalk.addMethod(
  2906. "_initialize",
  2907. smalltalk.method({
  2908. selector: "initialize",
  2909. fn: function () {
  2910. var self = this;
  2911. smalltalk.send(smalltalk.Transcript || Transcript, "_register_", [smalltalk.send(self, "_current", [])]);
  2912. return self;
  2913. }
  2914. }),
  2915. smalltalk.IDETranscript.klass);
  2916. smalltalk.addMethod(
  2917. "_new",
  2918. smalltalk.method({
  2919. selector: "new",
  2920. fn: function () {
  2921. var self = this;
  2922. smalltalk.send(self, "_shouldNotImplement", []);
  2923. return self;
  2924. }
  2925. }),
  2926. smalltalk.IDETranscript.klass);
  2927. smalltalk.addMethod(
  2928. "_open",
  2929. smalltalk.method({
  2930. selector: "open",
  2931. fn: function () {
  2932. var self = this;
  2933. var $1, $2;
  2934. $1 = smalltalk.send(smalltalk.TabManager || TabManager, "_current", []);
  2935. smalltalk.send($1, "_open", []);
  2936. $2 = smalltalk.send($1, "_selectTab_", [smalltalk.send(self, "_current", [])]);
  2937. return self;
  2938. }
  2939. }),
  2940. smalltalk.IDETranscript.klass);
  2941. smalltalk.addClass('Inspector', smalltalk.TabWidget, ['label', 'variables', 'object', 'selectedVariable', 'variablesList', 'valueTextarea', 'diveButton', 'sourceArea'], 'IDE');
  2942. smalltalk.addMethod(
  2943. "_canBeClosed",
  2944. smalltalk.method({
  2945. selector: "canBeClosed",
  2946. fn: function () {
  2947. var self = this;
  2948. return true;
  2949. }
  2950. }),
  2951. smalltalk.Inspector);
  2952. smalltalk.addMethod(
  2953. "_dive",
  2954. smalltalk.method({
  2955. selector: "dive",
  2956. fn: function () {
  2957. var self = this;
  2958. smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_at_", [smalltalk.send(self, "_selectedVariable", [])]), "_inspect", []);
  2959. return self;
  2960. }
  2961. }),
  2962. smalltalk.Inspector);
  2963. smalltalk.addMethod(
  2964. "_inspect_",
  2965. smalltalk.method({
  2966. selector: "inspect:",
  2967. fn: function (anObject) {
  2968. var self = this;
  2969. self['@object'] = anObject;
  2970. self['@variables'] = [];
  2971. smalltalk.send(self['@object'], "_inspectOn_", [self]);
  2972. return self;
  2973. }
  2974. }),
  2975. smalltalk.Inspector);
  2976. smalltalk.addMethod(
  2977. "_label",
  2978. smalltalk.method({
  2979. selector: "label",
  2980. fn: function () {
  2981. var self = this;
  2982. var $1;
  2983. if (($receiver = self['@label']) == nil || $receiver == undefined) {
  2984. $1 = "Inspector (nil)";
  2985. } else {
  2986. $1 = self['@label'];
  2987. }
  2988. return $1;
  2989. }
  2990. }),
  2991. smalltalk.Inspector);
  2992. smalltalk.addMethod(
  2993. "_refresh",
  2994. smalltalk.method({
  2995. selector: "refresh",
  2996. fn: function () {
  2997. var self = this;
  2998. var $1;
  2999. smalltalk.send(self, "_inspect_", [self['@object']]);
  3000. smalltalk.send(self, "_updateVariablesList", []);
  3001. $1 = smalltalk.send(self, "_updateValueTextarea", []);
  3002. return self;
  3003. }
  3004. }),
  3005. smalltalk.Inspector);
  3006. smalltalk.addMethod(
  3007. "_renderBottomPanelOn_",
  3008. smalltalk.method({
  3009. selector: "renderBottomPanelOn:",
  3010. fn: function (html) {
  3011. var self = this;
  3012. var $1, $3, $4, $2;
  3013. $1 = smalltalk.send(html, "_div", []);
  3014. smalltalk.send($1, "_class_", ["amber_sourceCode"]);
  3015. $2 = smalltalk.send($1, "_with_", [function () {$3 = smalltalk.send(smalltalk.SourceArea || SourceArea, "_new", []);smalltalk.send($3, "_receiver_", [self['@object']]);smalltalk.send($3, "_onDoIt_", [function () {return smalltalk.send(self, "_refresh", []);}]);$4 = smalltalk.send($3, "_yourself", []);self['@sourceArea'] = $4;self['@sourceArea'];return smalltalk.send(self['@sourceArea'], "_renderOn_", [html]);}]);
  3016. return self;
  3017. }
  3018. }),
  3019. smalltalk.Inspector);
  3020. smalltalk.addMethod(
  3021. "_renderBoxOn_",
  3022. smalltalk.method({
  3023. selector: "renderBoxOn:",
  3024. fn: function (html) {
  3025. var self = this;
  3026. var $1;
  3027. smalltalk.send(self, "_renderTopPanelOn_", [html]);
  3028. $1 = smalltalk.send(self, "_renderBottomPanelOn_", [html]);
  3029. return self;
  3030. }
  3031. }),
  3032. smalltalk.Inspector);
  3033. smalltalk.addMethod(
  3034. "_renderButtonsOn_",
  3035. smalltalk.method({
  3036. selector: "renderButtonsOn:",
  3037. fn: function (html) {
  3038. var self = this;
  3039. var $1, $2, $3, $4, $5, $6;
  3040. $1 = smalltalk.send(html, "_button", []);
  3041. smalltalk.send($1, "_with_", ["DoIt"]);
  3042. $2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_doIt", []);}]);
  3043. $3 = smalltalk.send(html, "_button", []);
  3044. smalltalk.send($3, "_with_", ["PrintIt"]);
  3045. $4 = smalltalk.send($3, "_onClick_", [function () {return smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_printIt", []);}]);
  3046. $5 = smalltalk.send(html, "_button", []);
  3047. smalltalk.send($5, "_with_", ["InspectIt"]);
  3048. $6 = smalltalk.send($5, "_onClick_", [function () {return smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_inspectIt", []);}]);
  3049. smalltalk.send(self, "_updateButtons", []);
  3050. return self;
  3051. }
  3052. }),
  3053. smalltalk.Inspector);
  3054. smalltalk.addMethod(
  3055. "_renderTopPanelOn_",
  3056. smalltalk.method({
  3057. selector: "renderTopPanelOn:",
  3058. fn: function (html) {
  3059. var self = this;
  3060. var $1, $3, $4, $5, $7, $8, $9, $10, $6, $2, $11;
  3061. $1 = smalltalk.send(html, "_div", []);
  3062. smalltalk.send($1, "_class_", ["top"]);
  3063. $2 = smalltalk.send($1, "_with_", [function () {self['@variablesList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column variables"]);self['@variablesList'];$3 = smalltalk.send(html, "_textarea", []);smalltalk.send($3, "_class_", ["amber_column value"]);$4 = smalltalk.send($3, "_at_put_", ["readonly", "readonly"]);self['@valueTextarea'] = $4;self['@valueTextarea'];$5 = smalltalk.send(html, "_div", []);smalltalk.send($5, "_class_", ["amber_tabs inspector"]);$6 = smalltalk.send($5, "_with_", [function () {$7 = smalltalk.send(html, "_button", []);smalltalk.send($7, "_class_", ["amber_button inspector refresh"]);smalltalk.send($7, "_with_", ["Refresh"]);$8 = smalltalk.send($7, "_onClick_", [function () {return smalltalk.send(self, "_refresh", []);}]);$8;$9 = smalltalk.send(html, "_button", []);smalltalk.send($9, "_class_", ["amber_button inspector dive"]);smalltalk.send($9, "_with_", ["Dive"]);$10 = smalltalk.send($9, "_onClick_", [function () {return smalltalk.send(self, "_dive", []);}]);self['@diveButton'] = $10;return self['@diveButton'];}]);$6;return smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["amber_clear"]);}]);
  3064. smalltalk.send(self, "_updateVariablesList", []);
  3065. $11 = smalltalk.send(self, "_updateValueTextarea", []);
  3066. return self;
  3067. }
  3068. }),
  3069. smalltalk.Inspector);
  3070. smalltalk.addMethod(
  3071. "_selectVariable_",
  3072. smalltalk.method({
  3073. selector: "selectVariable:",
  3074. fn: function (aString) {
  3075. var self = this;
  3076. var $1;
  3077. smalltalk.send(self, "_selectedVariable_", [aString]);
  3078. smalltalk.send(self, "_updateVariablesList", []);
  3079. smalltalk.send(self, "_updateValueTextarea", []);
  3080. $1 = smalltalk.send(self, "_updateButtons", []);
  3081. return self;
  3082. }
  3083. }),
  3084. smalltalk.Inspector);
  3085. smalltalk.addMethod(
  3086. "_selectedVariable",
  3087. smalltalk.method({
  3088. selector: "selectedVariable",
  3089. fn: function () {
  3090. var self = this;
  3091. return self['@selectedVariable'];
  3092. }
  3093. }),
  3094. smalltalk.Inspector);
  3095. smalltalk.addMethod(
  3096. "_selectedVariable_",
  3097. smalltalk.method({
  3098. selector: "selectedVariable:",
  3099. fn: function (aString) {
  3100. var self = this;
  3101. self['@selectedVariable'] = aString;
  3102. return self;
  3103. }
  3104. }),
  3105. smalltalk.Inspector);
  3106. smalltalk.addMethod(
  3107. "_setLabel_",
  3108. smalltalk.method({
  3109. selector: "setLabel:",
  3110. fn: function (aString) {
  3111. var self = this;
  3112. self['@label'] = aString;
  3113. return self;
  3114. }
  3115. }),
  3116. smalltalk.Inspector);
  3117. smalltalk.addMethod(
  3118. "_setVariables_",
  3119. smalltalk.method({
  3120. selector: "setVariables:",
  3121. fn: function (aCollection) {
  3122. var self = this;
  3123. self['@variables'] = aCollection;
  3124. return self;
  3125. }
  3126. }),
  3127. smalltalk.Inspector);
  3128. smalltalk.addMethod(
  3129. "_sourceArea",
  3130. smalltalk.method({
  3131. selector: "sourceArea",
  3132. fn: function () {
  3133. var self = this;
  3134. return self['@sourceArea'];
  3135. }
  3136. }),
  3137. smalltalk.Inspector);
  3138. smalltalk.addMethod(
  3139. "_updateButtons",
  3140. smalltalk.method({
  3141. selector: "updateButtons",
  3142. fn: function () {
  3143. var self = this;
  3144. var $1;
  3145. $1 = 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", []);}]);
  3146. if (smalltalk.assert($1)) {
  3147. smalltalk.send(self['@diveButton'], "_removeAt_", ["disabled"]);
  3148. } else {
  3149. smalltalk.send(self['@diveButton'], "_at_put_", ["disabled", true]);
  3150. }
  3151. return self;
  3152. }
  3153. }),
  3154. smalltalk.Inspector);
  3155. smalltalk.addMethod(
  3156. "_updateValueTextarea",
  3157. smalltalk.method({
  3158. selector: "updateValueTextarea",
  3159. fn: function () {
  3160. var self = this;
  3161. var $2, $1;
  3162. $2 = smalltalk.send(smalltalk.send(self, "_selectedVariable", []), "_isNil", []);
  3163. if (smalltalk.assert($2)) {
  3164. $1 = "";
  3165. } else {
  3166. $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_at_", [smalltalk.send(self, "_selectedVariable", [])]), "_printString", []);
  3167. }
  3168. smalltalk.send(smalltalk.send(self['@valueTextarea'], "_asJQuery", []), "_val_", [$1]);
  3169. return self;
  3170. }
  3171. }),
  3172. smalltalk.Inspector);
  3173. smalltalk.addMethod(
  3174. "_updateVariablesList",
  3175. smalltalk.method({
  3176. selector: "updateVariablesList",
  3177. fn: function () {
  3178. var self = this;
  3179. var $1, $2;
  3180. smalltalk.send(self['@variablesList'], "_contents_", [function (html) {return smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_keys", []), "_do_", [function (each) {var li;li = smalltalk.send(html, "_li", []);smalltalk.send(li, "_with_", [each]);$1 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectVariable_", [each]);}]);$1;$2 = smalltalk.send(smalltalk.send(self, "_selectedVariable", []), "__eq", [each]);if (smalltalk.assert($2)) {return smalltalk.send(li, "_class_", ["selected"]);}}]);}]);
  3181. return self;
  3182. }
  3183. }),
  3184. smalltalk.Inspector);
  3185. smalltalk.addMethod(
  3186. "_variables",
  3187. smalltalk.method({
  3188. selector: "variables",
  3189. fn: function () {
  3190. var self = this;
  3191. return self['@variables'];
  3192. }
  3193. }),
  3194. smalltalk.Inspector);
  3195. smalltalk.addMethod(
  3196. "_on_",
  3197. smalltalk.method({
  3198. selector: "on:",
  3199. fn: function (anObject) {
  3200. var self = this;
  3201. var $2, $3, $1;
  3202. $2 = smalltalk.send(self, "_new", []);
  3203. smalltalk.send($2, "_inspect_", [anObject]);
  3204. $3 = smalltalk.send($2, "_yourself", []);
  3205. $1 = $3;
  3206. return $1;
  3207. }
  3208. }),
  3209. smalltalk.Inspector.klass);
  3210. smalltalk.addClass('ProgressBar', smalltalk.TabWidget, ['percent', 'progressDiv', 'div'], 'IDE');
  3211. smalltalk.addMethod(
  3212. "_percent",
  3213. smalltalk.method({
  3214. selector: "percent",
  3215. fn: function () {
  3216. var self = this;
  3217. var $1;
  3218. if (($receiver = self['@percent']) == nil || $receiver == undefined) {
  3219. $1 = 0;
  3220. } else {
  3221. $1 = self['@percent'];
  3222. }
  3223. return $1;
  3224. }
  3225. }),
  3226. smalltalk.ProgressBar);
  3227. smalltalk.addMethod(
  3228. "_percent_",
  3229. smalltalk.method({
  3230. selector: "percent:",
  3231. fn: function (aNumber) {
  3232. var self = this;
  3233. self['@percent'] = aNumber;
  3234. return self;
  3235. }
  3236. }),
  3237. smalltalk.ProgressBar);
  3238. smalltalk.addMethod(
  3239. "_renderOn_",
  3240. smalltalk.method({
  3241. selector: "renderOn:",
  3242. fn: function (html) {
  3243. var self = this;
  3244. var $1, $2;
  3245. $1 = smalltalk.send(html, "_div", []);
  3246. smalltalk.send($1, "_class_", ["progress_bar"]);
  3247. $2 = smalltalk.send($1, "_yourself", []);
  3248. self['@div'] = $2;
  3249. smalltalk.send(self, "_renderProgressBar", []);
  3250. return self;
  3251. }
  3252. }),
  3253. smalltalk.ProgressBar);
  3254. smalltalk.addMethod(
  3255. "_renderProgressBar",
  3256. smalltalk.method({
  3257. selector: "renderProgressBar",
  3258. fn: function () {
  3259. var self = this;
  3260. var $1, $2;
  3261. smalltalk.send(self['@div'], "_contents_", [function (html) {$1 = smalltalk.send(html, "_div", []);smalltalk.send($1, "_class_", ["progress"]);$2 = smalltalk.send($1, "_style_", [smalltalk.send(smalltalk.send("width:", "__comma", [smalltalk.send(smalltalk.send(self, "_percent", []), "_asString", [])]), "__comma", ["%"])]);return $2;}]);
  3262. return self;
  3263. }
  3264. }),
  3265. smalltalk.ProgressBar);
  3266. smalltalk.addMethod(
  3267. "_updatePercent_",
  3268. smalltalk.method({
  3269. selector: "updatePercent:",
  3270. fn: function (aNumber) {
  3271. var self = this;
  3272. smalltalk.send(self, "_percent_", [aNumber]);
  3273. smalltalk.send(self, "_renderProgressBar", []);
  3274. return self;
  3275. }
  3276. }),
  3277. smalltalk.ProgressBar);
  3278. smalltalk.addClass('ReferencesBrowser', smalltalk.TabWidget, ['implementors', 'senders', 'implementorsList', 'input', 'timer', 'selector', 'sendersList', 'referencedClasses', 'referencedClassesList', 'matches', 'matchesList'], 'IDE');
  3279. smalltalk.addMethod(
  3280. "_canBeClosed",
  3281. smalltalk.method({
  3282. selector: "canBeClosed",
  3283. fn: function () {
  3284. var self = this;
  3285. return true;
  3286. }
  3287. }),
  3288. smalltalk.ReferencesBrowser);
  3289. smalltalk.addMethod(
  3290. "_classesAndMetaclasses",
  3291. smalltalk.method({
  3292. selector: "classesAndMetaclasses",
  3293. fn: function () {
  3294. var self = this;
  3295. var $1;
  3296. $1 = 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", []);}])]);
  3297. return $1;
  3298. }
  3299. }),
  3300. smalltalk.ReferencesBrowser);
  3301. smalltalk.addMethod(
  3302. "_implementors",
  3303. smalltalk.method({
  3304. selector: "implementors",
  3305. fn: function () {
  3306. var self = this;
  3307. var $1;
  3308. if (($receiver = self['@implementors']) == nil ||
  3309. $receiver == undefined) {
  3310. self['@implementors'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3311. $1 = self['@implementors'];
  3312. } else {
  3313. $1 = self['@implementors'];
  3314. }
  3315. return $1;
  3316. }
  3317. }),
  3318. smalltalk.ReferencesBrowser);
  3319. smalltalk.addMethod(
  3320. "_initialize",
  3321. smalltalk.method({
  3322. selector: "initialize",
  3323. fn: function () {
  3324. var self = this;
  3325. smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
  3326. self['@selector'] = "";
  3327. return self;
  3328. }
  3329. }),
  3330. smalltalk.ReferencesBrowser);
  3331. smalltalk.addMethod(
  3332. "_label",
  3333. smalltalk.method({
  3334. selector: "label",
  3335. fn: function () {
  3336. var self = this;
  3337. return "[References]";
  3338. }
  3339. }),
  3340. smalltalk.ReferencesBrowser);
  3341. smalltalk.addMethod(
  3342. "_matches",
  3343. smalltalk.method({
  3344. selector: "matches",
  3345. fn: function () {
  3346. var self = this;
  3347. var $1;
  3348. if (($receiver = self['@matches']) == nil || $receiver == undefined) {
  3349. self['@matches'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3350. $1 = self['@matches'];
  3351. } else {
  3352. $1 = self['@matches'];
  3353. }
  3354. return $1;
  3355. }
  3356. }),
  3357. smalltalk.ReferencesBrowser);
  3358. smalltalk.addMethod(
  3359. "_openBrowserOn_",
  3360. smalltalk.method({
  3361. selector: "openBrowserOn:",
  3362. fn: function (aMethod) {
  3363. var self = this;
  3364. var $2, $1, $3, $4;
  3365. var browser;
  3366. $2 = smalltalk.send(smalltalk.send(aMethod, "_methodClass", []), "_isMetaclass", []);
  3367. if (smalltalk.assert($2)) {
  3368. $1 = smalltalk.send(smalltalk.send(aMethod, "_methodClass", []), "_instanceClass", []);
  3369. } else {
  3370. $1 = smalltalk.send(aMethod, "_methodClass", []);
  3371. }
  3372. browser = smalltalk.send(smalltalk.Browser || Browser, "_openOn_", [$1]);
  3373. $3 = smalltalk.send(smalltalk.send(aMethod, "_methodClass", []), "_isMetaclass", []);
  3374. if (smalltalk.assert($3)) {
  3375. smalltalk.send(browser, "_selectTab_", [smalltalk.symbolFor("class")]);
  3376. }
  3377. smalltalk.send(browser, "_selectProtocol_", [smalltalk.send(aMethod, "_category", [])]);
  3378. $4 = smalltalk.send(browser, "_selectMethod_", [aMethod]);
  3379. return self;
  3380. }
  3381. }),
  3382. smalltalk.ReferencesBrowser);
  3383. smalltalk.addMethod(
  3384. "_referencedClasses",
  3385. smalltalk.method({
  3386. selector: "referencedClasses",
  3387. fn: function () {
  3388. var self = this;
  3389. var $1;
  3390. if (($receiver = self['@referencedClasses']) == nil ||
  3391. $receiver == undefined) {
  3392. self['@referencedClasses'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3393. $1 = self['@referencedClasses'];
  3394. } else {
  3395. $1 = self['@referencedClasses'];
  3396. }
  3397. return $1;
  3398. }
  3399. }),
  3400. smalltalk.ReferencesBrowser);
  3401. smalltalk.addMethod(
  3402. "_renderBoxOn_",
  3403. smalltalk.method({
  3404. selector: "renderBoxOn:",
  3405. fn: function (html) {
  3406. var self = this;
  3407. var $1;
  3408. smalltalk.send(self, "_renderInputOn_", [html]);
  3409. smalltalk.send(self, "_renderImplementorsOn_", [html]);
  3410. smalltalk.send(self, "_renderSendersOn_", [html]);
  3411. smalltalk.send(self, "_renderReferencedClassesOn_", [html]);
  3412. $1 = smalltalk.send(self, "_renderMatchesOn_", [html]);
  3413. return self;
  3414. }
  3415. }),
  3416. smalltalk.ReferencesBrowser);
  3417. smalltalk.addMethod(
  3418. "_renderImplementorsOn_",
  3419. smalltalk.method({
  3420. selector: "renderImplementorsOn:",
  3421. fn: function (html) {
  3422. var self = this;
  3423. self['@implementorsList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column implementors"]);
  3424. smalltalk.send(self, "_updateImplementorsList", []);
  3425. return self;
  3426. }
  3427. }),
  3428. smalltalk.ReferencesBrowser);
  3429. smalltalk.addMethod(
  3430. "_renderInputOn_",
  3431. smalltalk.method({
  3432. selector: "renderInputOn:",
  3433. fn: function (html) {
  3434. var self = this;
  3435. var $1, $2;
  3436. $1 = smalltalk.send(html, "_input", []);
  3437. smalltalk.send($1, "_class_", ["implementors"]);
  3438. $2 = smalltalk.send($1, "_yourself", []);
  3439. self['@input'] = $2;
  3440. smalltalk.send(smalltalk.send(self['@input'], "_asJQuery", []), "_val_", [self['@selector']]);
  3441. smalltalk.send(self, "_setInputEvents", []);
  3442. return self;
  3443. }
  3444. }),
  3445. smalltalk.ReferencesBrowser);
  3446. smalltalk.addMethod(
  3447. "_renderMatchesOn_",
  3448. smalltalk.method({
  3449. selector: "renderMatchesOn:",
  3450. fn: function (html) {
  3451. var self = this;
  3452. self['@matchesList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column matches"]);
  3453. smalltalk.send(self, "_updateMatchesList", []);
  3454. return self;
  3455. }
  3456. }),
  3457. smalltalk.ReferencesBrowser);
  3458. smalltalk.addMethod(
  3459. "_renderReferencedClassesOn_",
  3460. smalltalk.method({
  3461. selector: "renderReferencedClassesOn:",
  3462. fn: function (html) {
  3463. var self = this;
  3464. self['@referencedClassesList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column referenced_classes"]);
  3465. smalltalk.send(self, "_updateReferencedClassesList", []);
  3466. return self;
  3467. }
  3468. }),
  3469. smalltalk.ReferencesBrowser);
  3470. smalltalk.addMethod(
  3471. "_renderSendersOn_",
  3472. smalltalk.method({
  3473. selector: "renderSendersOn:",
  3474. fn: function (html) {
  3475. var self = this;
  3476. self['@sendersList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column senders"]);
  3477. smalltalk.send(self, "_updateSendersList", []);
  3478. return self;
  3479. }
  3480. }),
  3481. smalltalk.ReferencesBrowser);
  3482. smalltalk.addMethod(
  3483. "_search_",
  3484. smalltalk.method({
  3485. selector: "search:",
  3486. fn: function (aString) {
  3487. var self = this;
  3488. var $1;
  3489. smalltalk.send(self, "_searchReferencesFor_", [aString]);
  3490. smalltalk.send(self, "_updateImplementorsList", []);
  3491. smalltalk.send(self, "_updateSendersList", []);
  3492. smalltalk.send(self, "_updateReferencedClassesList", []);
  3493. $1 = smalltalk.send(self, "_updateMatchesList", []);
  3494. return self;
  3495. }
  3496. }),
  3497. smalltalk.ReferencesBrowser);
  3498. smalltalk.addMethod(
  3499. "_searchMethodSource",
  3500. smalltalk.method({
  3501. selector: "searchMethodSource",
  3502. fn: function () {
  3503. var self = this;
  3504. var $1;
  3505. var regex;
  3506. regex = smalltalk.send(self['@selector'], "_allButFirst", []);
  3507. smalltalk.send(smalltalk.send(self, "_classesAndMetaclasses", []), "_do_", [function (each) {return smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodDictionary", []), "_values", []), "_do_", [function (value) {$1 = smalltalk.send(smalltalk.send(value, "_source", []), "_match_", [regex]);if (smalltalk.assert($1)) {return smalltalk.send(smalltalk.send(self, "_matches", []), "_add_", [value]);}}]);}]);
  3508. return self;
  3509. }
  3510. }),
  3511. smalltalk.ReferencesBrowser);
  3512. smalltalk.addMethod(
  3513. "_searchReferencedClasses",
  3514. smalltalk.method({
  3515. selector: "searchReferencedClasses",
  3516. fn: function () {
  3517. var self = this;
  3518. var $1;
  3519. smalltalk.send(smalltalk.send(self, "_classesAndMetaclasses", []), "_do_", [function (each) {return smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodDictionary", []), "_values", []), "_do_", [function (value) {$1 = smalltalk.send(smalltalk.send(value, "_referencedClasses", []), "_includes_", [self['@selector']]);if (smalltalk.assert($1)) {return smalltalk.send(smalltalk.send(self, "_referencedClasses", []), "_add_", [value]);}}]);}]);
  3520. return self;
  3521. }
  3522. }),
  3523. smalltalk.ReferencesBrowser);
  3524. smalltalk.addMethod(
  3525. "_searchReferencesFor_",
  3526. smalltalk.method({
  3527. selector: "searchReferencesFor:",
  3528. fn: function (aString) {
  3529. var self = this;
  3530. var $1;
  3531. self['@selector'] = aString;
  3532. self['@implementors'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3533. self['@senders'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3534. self['@referencedClasses'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3535. self['@matches'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3536. smalltalk.send(self, "_searchMethodSource", []);
  3537. $1 = smalltalk.send(self['@selector'], "_match_", ["^[A-Z]"]);
  3538. if (smalltalk.assert($1)) {
  3539. smalltalk.send(self, "_searchReferencedClasses", []);
  3540. } else {
  3541. smalltalk.send(self, "_searchSelectorReferences", []);
  3542. }
  3543. return self;
  3544. }
  3545. }),
  3546. smalltalk.ReferencesBrowser);
  3547. smalltalk.addMethod(
  3548. "_searchSelectorReferences",
  3549. smalltalk.method({
  3550. selector: "searchSelectorReferences",
  3551. fn: function () {
  3552. var self = this;
  3553. var $1, $2;
  3554. smalltalk.send(smalltalk.send(self, "_classesAndMetaclasses", []), "_do_", [function (each) {return smalltalk.send(smalltalk.send(each, "_methodDictionary", []), "_keysAndValuesDo_", [function (key, value) {$1 = smalltalk.send(key, "__eq", [self['@selector']]);if (smalltalk.assert($1)) {smalltalk.send(smalltalk.send(self, "_implementors", []), "_add_", [value]);}$2 = smalltalk.send(smalltalk.send(value, "_messageSends", []), "_includes_", [self['@selector']]);if (smalltalk.assert($2)) {return smalltalk.send(smalltalk.send(self, "_senders", []), "_add_", [value]);}}]);}]);
  3555. return self;
  3556. }
  3557. }),
  3558. smalltalk.ReferencesBrowser);
  3559. smalltalk.addMethod(
  3560. "_selector",
  3561. smalltalk.method({
  3562. selector: "selector",
  3563. fn: function () {
  3564. var self = this;
  3565. return self['@selector'];
  3566. }
  3567. }),
  3568. smalltalk.ReferencesBrowser);
  3569. smalltalk.addMethod(
  3570. "_senders",
  3571. smalltalk.method({
  3572. selector: "senders",
  3573. fn: function () {
  3574. var self = this;
  3575. var $1;
  3576. if (($receiver = self['@senders']) == nil || $receiver == undefined) {
  3577. self['@senders'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3578. $1 = self['@senders'];
  3579. } else {
  3580. $1 = self['@senders'];
  3581. }
  3582. return $1;
  3583. }
  3584. }),
  3585. smalltalk.ReferencesBrowser);
  3586. smalltalk.addMethod(
  3587. "_setInputEvents",
  3588. smalltalk.method({
  3589. selector: "setInputEvents",
  3590. fn: function () {
  3591. var self = this;
  3592. var $1;
  3593. smalltalk.send(self['@input'], "_onKeyUp_", [function () {self['@timer'] = smalltalk.send(function () {return smalltalk.send(self, "_search_", [smalltalk.send(smalltalk.send(self['@input'], "_asJQuery", []), "_val", [])]);}, "_valueWithTimeout_", [100]);return self['@timer'];}]);
  3594. $1 = smalltalk.send(self['@input'], "_onKeyDown_", [function () {if (($receiver = self['@timer']) == nil || $receiver == undefined) {return self['@timer'];} else {return smalltalk.send(self['@timer'], "_clearTimeout", []);}}]);
  3595. return self;
  3596. }
  3597. }),
  3598. smalltalk.ReferencesBrowser);
  3599. smalltalk.addMethod(
  3600. "_updateImplementorsList",
  3601. smalltalk.method({
  3602. selector: "updateImplementorsList",
  3603. fn: function () {
  3604. var self = this;
  3605. var $1, $2, $3;
  3606. smalltalk.send(self['@implementorsList'], "_contents_", [function (html) {$1 = smalltalk.send(html, "_li", []);smalltalk.send($1, "_class_", ["column_label"]);smalltalk.send($1, "_with_", [smalltalk.send(smalltalk.send("Implementors (", "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_implementors", []), "_size", []), "_asString", [])]), "__comma", [")"])]);$2 = smalltalk.send($1, "_style_", ["font-weight: bold"]);$2;return smalltalk.send(smalltalk.send(self, "_implementors", []), "_do_", [function (each) {var li;li = smalltalk.send(html, "_li", []);smalltalk.send(li, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodClass", []), "_asString", []), "__comma", [" >> "]), "__comma", [smalltalk.send(self, "_selector", [])])]);$3 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_openBrowserOn_", [each]);}]);return $3;}]);}]);
  3607. return self;
  3608. }
  3609. }),
  3610. smalltalk.ReferencesBrowser);
  3611. smalltalk.addMethod(
  3612. "_updateMatchesList",
  3613. smalltalk.method({
  3614. selector: "updateMatchesList",
  3615. fn: function () {
  3616. var self = this;
  3617. var $1, $2, $3;
  3618. smalltalk.send(self['@matchesList'], "_contents_", [function (html) {$1 = smalltalk.send(html, "_li", []);smalltalk.send($1, "_class_", ["column_label"]);smalltalk.send($1, "_with_", [smalltalk.send(smalltalk.send("Regex matches (", "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_matches", []), "_size", []), "_asString", [])]), "__comma", [")"])]);$2 = smalltalk.send($1, "_style_", ["font-weight: bold"]);$2;return smalltalk.send(smalltalk.send(self, "_matches", []), "_do_", [function (each) {var li;li = smalltalk.send(html, "_li", []);smalltalk.send(li, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodClass", []), "_asString", []), "__comma", [" >> "]), "__comma", [smalltalk.send(each, "_selector", [])])]);$3 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_openBrowserOn_", [each]);}]);return $3;}]);}]);
  3619. return self;
  3620. }
  3621. }),
  3622. smalltalk.ReferencesBrowser);
  3623. smalltalk.addMethod(
  3624. "_updateReferencedClassesList",
  3625. smalltalk.method({
  3626. selector: "updateReferencedClassesList",
  3627. fn: function () {
  3628. var self = this;
  3629. var $1, $2, $3, $4;
  3630. smalltalk.send(self['@referencedClassesList'], "_contents_", [function (html) {$1 = smalltalk.send(html, "_li", []);smalltalk.send($1, "_class_", ["column_label"]);smalltalk.send($1, "_with_", [smalltalk.send(smalltalk.send("Class references (", "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_referencedClasses", []), "_size", []), "_asString", [])]), "__comma", [")"])]);$2 = smalltalk.send($1, "_style_", ["font-weight: bold"]);$2;return smalltalk.send(smalltalk.send(self, "_referencedClasses", []), "_do_", [function (each) {$3 = smalltalk.send(html, "_li", []);smalltalk.send($3, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodClass", []), "_asString", []), "__comma", [" >> "]), "__comma", [smalltalk.send(each, "_selector", [])])]);$4 = smalltalk.send($3, "_onClick_", [function () {return smalltalk.send(self, "_openBrowserOn_", [each]);}]);return $4;}]);}]);
  3631. return self;
  3632. }
  3633. }),
  3634. smalltalk.ReferencesBrowser);
  3635. smalltalk.addMethod(
  3636. "_updateSendersList",
  3637. smalltalk.method({
  3638. selector: "updateSendersList",
  3639. fn: function () {
  3640. var self = this;
  3641. var $1, $2, $3, $4;
  3642. smalltalk.send(self['@sendersList'], "_contents_", [function (html) {$1 = smalltalk.send(html, "_li", []);smalltalk.send($1, "_class_", ["column_label"]);smalltalk.send($1, "_with_", [smalltalk.send(smalltalk.send("Senders (", "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_senders", []), "_size", []), "_asString", [])]), "__comma", [")"])]);$2 = smalltalk.send($1, "_style_", ["font-weight: bold"]);$2;return smalltalk.send(smalltalk.send(self, "_senders", []), "_do_", [function (each) {$3 = smalltalk.send(html, "_li", []);smalltalk.send($3, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodClass", []), "_asString", []), "__comma", [" >> "]), "__comma", [smalltalk.send(each, "_selector", [])])]);$4 = smalltalk.send($3, "_onClick_", [function () {return smalltalk.send(self, "_openBrowserOn_", [each]);}]);return $4;}]);}]);
  3643. return self;
  3644. }
  3645. }),
  3646. smalltalk.ReferencesBrowser);
  3647. smalltalk.addMethod(
  3648. "_search_",
  3649. smalltalk.method({
  3650. selector: "search:",
  3651. fn: function (aString) {
  3652. var self = this;
  3653. var $2, $3, $1;
  3654. $2 = smalltalk.send(self, "_new", []);
  3655. smalltalk.send($2, "_searchReferencesFor_", [aString]);
  3656. $3 = smalltalk.send($2, "_open", []);
  3657. $1 = $3;
  3658. return $1;
  3659. }
  3660. }),
  3661. smalltalk.ReferencesBrowser.klass);
  3662. smalltalk.addClass('TestRunner', smalltalk.TabWidget, ['selectedCategories', 'packagesList', 'selectedClasses', 'classesList', 'selectedMethods', 'progressBar', 'methodsList', 'result', 'statusDiv'], 'IDE');
  3663. smalltalk.addMethod(
  3664. "_allClasses",
  3665. smalltalk.method({
  3666. selector: "allClasses",
  3667. fn: function () {
  3668. var self = this;
  3669. var $1;
  3670. $1 = smalltalk.send(smalltalk.send(smalltalk.TestCase || TestCase, "_allSubclasses", []), "_select_", [function (each) {return smalltalk.send(smalltalk.send(each, "_isAbstract", []), "_not", []);}]);
  3671. return $1;
  3672. }
  3673. }),
  3674. smalltalk.TestRunner);
  3675. smalltalk.addMethod(
  3676. "_classes",
  3677. smalltalk.method({
  3678. selector: "classes",
  3679. fn: function () {
  3680. var self = this;
  3681. var $1;
  3682. $1 = 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 smalltalk.send(smalltalk.send(a, "_name", []), "__gt", [smalltalk.send(b, "_name", [])]);}]);
  3683. return $1;
  3684. }
  3685. }),
  3686. smalltalk.TestRunner);
  3687. smalltalk.addMethod(
  3688. "_initialize",
  3689. smalltalk.method({
  3690. selector: "initialize",
  3691. fn: function () {
  3692. var self = this;
  3693. smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
  3694. self['@result'] = smalltalk.send(smalltalk.TestResult || TestResult, "_new", []);
  3695. return self;
  3696. }
  3697. }),
  3698. smalltalk.TestRunner);
  3699. smalltalk.addMethod(
  3700. "_isSelectedCategory_",
  3701. smalltalk.method({
  3702. selector: "isSelectedCategory:",
  3703. fn: function (aCategory) {
  3704. var self = this;
  3705. var $1;
  3706. $1 = smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_includes_", [aCategory]);
  3707. return $1;
  3708. }
  3709. }),
  3710. smalltalk.TestRunner);
  3711. smalltalk.addMethod(
  3712. "_isSelectedClass_",
  3713. smalltalk.method({
  3714. selector: "isSelectedClass:",
  3715. fn: function (aClass) {
  3716. var self = this;
  3717. var $1;
  3718. $1 = smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_includes_", [aClass]);
  3719. return $1;
  3720. }
  3721. }),
  3722. smalltalk.TestRunner);
  3723. smalltalk.addMethod(
  3724. "_label",
  3725. smalltalk.method({
  3726. selector: "label",
  3727. fn: function () {
  3728. var self = this;
  3729. return "SUnit";
  3730. }
  3731. }),
  3732. smalltalk.TestRunner);
  3733. smalltalk.addMethod(
  3734. "_packages",
  3735. smalltalk.method({
  3736. selector: "packages",
  3737. fn: function () {
  3738. var self = this;
  3739. var $1, $2;
  3740. var packages;
  3741. packages = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3742. smalltalk.send(smalltalk.send(self, "_allClasses", []), "_do_", [function (each) {$1 = smalltalk.send(packages, "_includes_", [smalltalk.send(each, "_category", [])]);if (!smalltalk.assert($1)) {return smalltalk.send(packages, "_add_", [smalltalk.send(each, "_category", [])]);}}]);
  3743. $2 = smalltalk.send(packages, "_sort", []);
  3744. return $2;
  3745. }
  3746. }),
  3747. smalltalk.TestRunner);
  3748. smalltalk.addMethod(
  3749. "_performFailure_",
  3750. smalltalk.method({
  3751. selector: "performFailure:",
  3752. fn: function (aTestCase){
  3753. var self=this;
  3754. smalltalk.send(aTestCase,"_runCase",[]);
  3755. return self}
  3756. }),
  3757. smalltalk.TestRunner);
  3758. smalltalk.addMethod(
  3759. "_printErrors",
  3760. smalltalk.method({
  3761. selector: "printErrors",
  3762. fn: function () {
  3763. var self = this;
  3764. var $1;
  3765. $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_errors", []), "_size", []), "_asString", []), "__comma", [" errors, "]);
  3766. return $1;
  3767. }
  3768. }),
  3769. smalltalk.TestRunner);
  3770. smalltalk.addMethod(
  3771. "_printFailures",
  3772. smalltalk.method({
  3773. selector: "printFailures",
  3774. fn: function () {
  3775. var self = this;
  3776. var $1;
  3777. $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_failures", []), "_size", []), "_asString", []), "__comma", [" failures"]);
  3778. return $1;
  3779. }
  3780. }),
  3781. smalltalk.TestRunner);
  3782. smalltalk.addMethod(
  3783. "_printPasses",
  3784. smalltalk.method({
  3785. selector: "printPasses",
  3786. fn: function (){
  3787. var self=this;
  3788. var $1;
  3789. $1=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self,"_result",[]),"_runs",[]),"__minus",[smalltalk.send(smalltalk.send(smalltalk.send(self,"_result",[]),"_errors",[]),"_size",[])]),"__minus",[smalltalk.send(smalltalk.send(smalltalk.send(self,"_result",[]),"_failures",[]),"_size",[])]),"_asString",[]),"__comma",[" passes, "]);
  3790. return $1;
  3791. }
  3792. }),
  3793. smalltalk.TestRunner);
  3794. smalltalk.addMethod(
  3795. "_printTotal",
  3796. smalltalk.method({
  3797. selector: "printTotal",
  3798. fn: function () {
  3799. var self = this;
  3800. var $1;
  3801. $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_total", []), "_asString", []), "__comma", [" runs, "]);
  3802. return $1;
  3803. }
  3804. }),
  3805. smalltalk.TestRunner);
  3806. smalltalk.addMethod(
  3807. "_progressBar",
  3808. smalltalk.method({
  3809. selector: "progressBar",
  3810. fn: function () {
  3811. var self = this;
  3812. var $1;
  3813. if (($receiver = self['@progressBar']) == nil || $receiver == undefined) {
  3814. self['@progressBar'] = smalltalk.send(smalltalk.ProgressBar || ProgressBar, "_new", []);
  3815. $1 = self['@progressBar'];
  3816. } else {
  3817. $1 = self['@progressBar'];
  3818. }
  3819. return $1;
  3820. }
  3821. }),
  3822. smalltalk.TestRunner);
  3823. smalltalk.addMethod(
  3824. "_renderBoxOn_",
  3825. smalltalk.method({
  3826. selector: "renderBoxOn:",
  3827. fn: function (html) {
  3828. var self = this;
  3829. var $1;
  3830. smalltalk.send(self, "_renderCategoriesOn_", [html]);
  3831. smalltalk.send(self, "_renderClassesOn_", [html]);
  3832. $1 = smalltalk.send(self, "_renderResultsOn_", [html]);
  3833. return self;
  3834. }
  3835. }),
  3836. smalltalk.TestRunner);
  3837. smalltalk.addMethod(
  3838. "_renderButtonsOn_",
  3839. smalltalk.method({
  3840. selector: "renderButtonsOn:",
  3841. fn: function (html) {
  3842. var self = this;
  3843. var $1, $2;
  3844. $1 = smalltalk.send(html, "_button", []);
  3845. smalltalk.send($1, "_with_", ["Run selected"]);
  3846. $2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_run_", [smalltalk.send(self, "_testCases", [])]);}]);
  3847. return self;
  3848. }
  3849. }),
  3850. smalltalk.TestRunner);
  3851. smalltalk.addMethod(
  3852. "_renderCategoriesOn_",
  3853. smalltalk.method({
  3854. selector: "renderCategoriesOn:",
  3855. fn: function (html) {
  3856. var self = this;
  3857. self['@packagesList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column sunit packages"]);
  3858. smalltalk.send(self, "_updateCategoriesList", []);
  3859. return self;
  3860. }
  3861. }),
  3862. smalltalk.TestRunner);
  3863. smalltalk.addMethod(
  3864. "_renderClassesOn_",
  3865. smalltalk.method({
  3866. selector: "renderClassesOn:",
  3867. fn: function (html) {
  3868. var self = this;
  3869. self['@classesList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column sunit classes"]);
  3870. smalltalk.send(self, "_updateClassesList", []);
  3871. return self;
  3872. }
  3873. }),
  3874. smalltalk.TestRunner);
  3875. smalltalk.addMethod(
  3876. "_renderErrorsOn_",
  3877. smalltalk.method({
  3878. selector: "renderErrorsOn:",
  3879. fn: function (html) {
  3880. var self = this;
  3881. var $1, $2;
  3882. smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_errors", []), "_do_", [function (each) {$1 = smalltalk.send(html, "_li", []);smalltalk.send($1, "_class_", ["errors"]);smalltalk.send($1, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_class", []), "_name", []), "__comma", [" >> "]), "__comma", [smalltalk.send(each, "_selector", [])])]);$2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_performFailure_", [each]);}]);return $2;}]);
  3883. return self;
  3884. }
  3885. }),
  3886. smalltalk.TestRunner);
  3887. smalltalk.addMethod(
  3888. "_renderFailuresOn_",
  3889. smalltalk.method({
  3890. selector: "renderFailuresOn:",
  3891. fn: function (html) {
  3892. var self = this;
  3893. var $1, $2;
  3894. smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_failures", []), "_do_", [function (each) {$1 = smalltalk.send(html, "_li", []);smalltalk.send($1, "_class_", ["failures"]);smalltalk.send($1, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_class", []), "_name", []), "__comma", [" >> "]), "__comma", [smalltalk.send(each, "_selector", [])])]);$2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_performFailure_", [each]);}]);return $2;}]);
  3895. return self;
  3896. }
  3897. }),
  3898. smalltalk.TestRunner);
  3899. smalltalk.addMethod(
  3900. "_renderResultsOn_",
  3901. smalltalk.method({
  3902. selector: "renderResultsOn:",
  3903. fn: function (html) {
  3904. var self = this;
  3905. self['@statusDiv'] = smalltalk.send(html, "_div", []);
  3906. smalltalk.send(html, "_with_", [smalltalk.send(self, "_progressBar", [])]);
  3907. self['@methodsList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column sunit results"]);
  3908. smalltalk.send(self, "_updateMethodsList", []);
  3909. smalltalk.send(self, "_updateStatusDiv", []);
  3910. return self;
  3911. }
  3912. }),
  3913. smalltalk.TestRunner);
  3914. smalltalk.addMethod(
  3915. "_result",
  3916. smalltalk.method({
  3917. selector: "result",
  3918. fn: function () {
  3919. var self = this;
  3920. return self['@result'];
  3921. }
  3922. }),
  3923. smalltalk.TestRunner);
  3924. smalltalk.addMethod(
  3925. "_run_",
  3926. smalltalk.method({
  3927. selector: "run:",
  3928. fn: function (aCollection){
  3929. var self=this;
  3930. var $1;
  3931. var worker;
  3932. worker=smalltalk.send((smalltalk.TestSuiteRunner || TestSuiteRunner),"_on_",[aCollection]);
  3933. self["@result"]=smalltalk.send(worker,"_result",[]);
  3934. smalltalk.send(smalltalk.send(worker,"_announcer",[]),"_on_do_",[(smalltalk.ResultAnnouncement || ResultAnnouncement),(function(ann){
  3935. $1=smalltalk.send(smalltalk.send(ann,"_result",[]),"__eq_eq",[self["@result"]]);
  3936. if(smalltalk.assert($1)){
  3937. smalltalk.send(smalltalk.send(self,"_progressBar",[]),"_updatePercent_",[smalltalk.send(smalltalk.send(smalltalk.send(self["@result"],"_runs",[]),"__slash",[smalltalk.send(self["@result"],"_total",[])]),"__star",[(100)])]);
  3938. smalltalk.send(self,"_updateStatusDiv",[]);
  3939. return smalltalk.send(self,"_updateMethodsList",[]);
  3940. };
  3941. })]);
  3942. smalltalk.send(worker,"_run",[]);
  3943. return self}
  3944. }),
  3945. smalltalk.TestRunner);
  3946. smalltalk.addMethod(
  3947. "_selectAllCategories",
  3948. smalltalk.method({
  3949. selector: "selectAllCategories",
  3950. fn: function () {
  3951. var self = this;
  3952. var $1, $2;
  3953. smalltalk.send(smalltalk.send(self, "_packages", []), "_do_", [function (each) {$1 = smalltalk.send(self['@selectedCategories'], "_includes_", [each]);if (!smalltalk.assert($1)) {return smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_add_", [each]);}}]);
  3954. smalltalk.send(self, "_updateCategoriesList", []);
  3955. $2 = smalltalk.send(self, "_updateClassesList", []);
  3956. return self;
  3957. }
  3958. }),
  3959. smalltalk.TestRunner);
  3960. smalltalk.addMethod(
  3961. "_selectAllClasses",
  3962. smalltalk.method({
  3963. selector: "selectAllClasses",
  3964. fn: function () {
  3965. var self = this;
  3966. var $1, $2;
  3967. smalltalk.send(smalltalk.send(self, "_classes", []), "_do_", [function (each) {$1 = smalltalk.send(self['@selectedClasses'], "_includes_", [each]);if (!smalltalk.assert($1)) {return smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_add_", [each]);}}]);
  3968. smalltalk.send(self, "_updateCategoriesList", []);
  3969. $2 = smalltalk.send(self, "_updateClassesList", []);
  3970. return self;
  3971. }
  3972. }),
  3973. smalltalk.TestRunner);
  3974. smalltalk.addMethod(
  3975. "_selectedCategories",
  3976. smalltalk.method({
  3977. selector: "selectedCategories",
  3978. fn: function () {
  3979. var self = this;
  3980. var $1;
  3981. if (($receiver = self['@selectedCategories']) == nil ||
  3982. $receiver == undefined) {
  3983. self['@selectedCategories'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  3984. $1 = self['@selectedCategories'];
  3985. } else {
  3986. $1 = self['@selectedCategories'];
  3987. }
  3988. return $1;
  3989. }
  3990. }),
  3991. smalltalk.TestRunner);
  3992. smalltalk.addMethod(
  3993. "_selectedClasses",
  3994. smalltalk.method({
  3995. selector: "selectedClasses",
  3996. fn: function () {
  3997. var self = this;
  3998. var $1;
  3999. if (($receiver = self['@selectedClasses']) == nil ||
  4000. $receiver == undefined) {
  4001. self['@selectedClasses'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  4002. $1 = self['@selectedClasses'];
  4003. } else {
  4004. $1 = self['@selectedClasses'];
  4005. }
  4006. return $1;
  4007. }
  4008. }),
  4009. smalltalk.TestRunner);
  4010. smalltalk.addMethod(
  4011. "_statusInfo",
  4012. smalltalk.method({
  4013. selector: "statusInfo",
  4014. fn: function () {
  4015. var self = this;
  4016. var $1;
  4017. $1 = 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", [])]);
  4018. return $1;
  4019. }
  4020. }),
  4021. smalltalk.TestRunner);
  4022. smalltalk.addMethod(
  4023. "_testCases",
  4024. smalltalk.method({
  4025. selector: "testCases",
  4026. fn: function () {
  4027. var self = this;
  4028. var testCases;
  4029. testCases = [];
  4030. 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", [])]);}]);
  4031. return testCases;
  4032. }
  4033. }),
  4034. smalltalk.TestRunner);
  4035. smalltalk.addMethod(
  4036. "_toggleCategory_",
  4037. smalltalk.method({
  4038. selector: "toggleCategory:",
  4039. fn: function (aCategory) {
  4040. var self = this;
  4041. var $1, $2;
  4042. $1 = smalltalk.send(self, "_isSelectedCategory_", [aCategory]);
  4043. if (smalltalk.assert($1)) {
  4044. smalltalk.send(self['@selectedCategories'], "_remove_", [aCategory]);
  4045. } else {
  4046. smalltalk.send(self['@selectedCategories'], "_add_", [aCategory]);
  4047. }
  4048. smalltalk.send(self, "_updateCategoriesList", []);
  4049. $2 = smalltalk.send(self, "_updateClassesList", []);
  4050. return self;
  4051. }
  4052. }),
  4053. smalltalk.TestRunner);
  4054. smalltalk.addMethod(
  4055. "_toggleClass_",
  4056. smalltalk.method({
  4057. selector: "toggleClass:",
  4058. fn: function (aClass) {
  4059. var self = this;
  4060. var $1;
  4061. $1 = smalltalk.send(self, "_isSelectedClass_", [aClass]);
  4062. if (smalltalk.assert($1)) {
  4063. smalltalk.send(self['@selectedClasses'], "_remove_", [aClass]);
  4064. } else {
  4065. smalltalk.send(self['@selectedClasses'], "_add_", [aClass]);
  4066. }
  4067. smalltalk.send(self, "_updateClassesList", []);
  4068. return self;
  4069. }
  4070. }),
  4071. smalltalk.TestRunner);
  4072. smalltalk.addMethod(
  4073. "_updateCategoriesList",
  4074. smalltalk.method({
  4075. selector: "updateCategoriesList",
  4076. fn: function () {
  4077. var self = this;
  4078. var $1, $2, $3, $4;
  4079. smalltalk.send(self['@packagesList'], "_contents_", [function (html) {$1 = smalltalk.send(html, "_li", []);smalltalk.send($1, "_class_", ["all"]);smalltalk.send($1, "_with_", ["All"]);$2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_selectAllCategories", []);}]);$2;return smalltalk.send(smalltalk.send(self, "_packages", []), "_do_", [function (each) {var li;li = smalltalk.send(html, "_li", []);$3 = smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_includes_", [each]);if (smalltalk.assert($3)) {smalltalk.send(li, "_class_", ["selected"]);}smalltalk.send(li, "_with_", [each]);$4 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_toggleCategory_", [each]);}]);return $4;}]);}]);
  4080. return self;
  4081. }
  4082. }),
  4083. smalltalk.TestRunner);
  4084. smalltalk.addMethod(
  4085. "_updateClassesList",
  4086. smalltalk.method({
  4087. selector: "updateClassesList",
  4088. fn: function () {
  4089. var self = this;
  4090. var $1, $2, $3, $4, $5;
  4091. smalltalk.send(self['@classesList'], "_contents_", [function (html) {$1 = smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_isEmpty", []);if (!smalltalk.assert($1)) {$2 = smalltalk.send(html, "_li", []);smalltalk.send($2, "_class_", ["all"]);smalltalk.send($2, "_with_", ["All"]);$3 = smalltalk.send($2, "_onClick_", [function () {return smalltalk.send(self, "_selectAllClasses", []);}]);$3;}return smalltalk.send(smalltalk.send(self, "_classes", []), "_do_", [function (each) {var li;li = smalltalk.send(html, "_li", []);$4 = smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_includes_", [each]);if (smalltalk.assert($4)) {smalltalk.send(li, "_class_", ["selected"]);}smalltalk.send(li, "_with_", [smalltalk.send(each, "_name", [])]);$5 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_toggleClass_", [each]);}]);return $5;}]);}]);
  4092. return self;
  4093. }
  4094. }),
  4095. smalltalk.TestRunner);
  4096. smalltalk.addMethod(
  4097. "_updateMethodsList",
  4098. smalltalk.method({
  4099. selector: "updateMethodsList",
  4100. fn: function () {
  4101. var self = this;
  4102. smalltalk.send(self['@methodsList'], "_contents_", [function (html) {smalltalk.send(self, "_renderErrorsOn_", [html]);return smalltalk.send(self, "_renderFailuresOn_", [html]);}]);
  4103. return self;
  4104. }
  4105. }),
  4106. smalltalk.TestRunner);
  4107. smalltalk.addMethod(
  4108. "_updateStatusDiv",
  4109. smalltalk.method({
  4110. selector: "updateStatusDiv",
  4111. fn: function () {
  4112. var self = this;
  4113. smalltalk.send(self['@statusDiv'], "_class_", [smalltalk.send("sunit status ", "__comma", [smalltalk.send(self['@result'], "_status", [])])]);
  4114. smalltalk.send(self['@statusDiv'], "_contents_", [function (html) {return smalltalk.send(smalltalk.send(html, "_span", []), "_with_", [smalltalk.send(self, "_statusInfo", [])]);}]);
  4115. return self;
  4116. }
  4117. }),
  4118. smalltalk.TestRunner);
  4119. smalltalk.addClass('Workspace', smalltalk.TabWidget, ['sourceArea'], 'IDE');
  4120. smalltalk.addMethod(
  4121. "_clearWorkspace",
  4122. smalltalk.method({
  4123. selector: "clearWorkspace",
  4124. fn: function () {
  4125. var self = this;
  4126. smalltalk.send(self['@sourceArea'], "_clear", []);
  4127. return self;
  4128. }
  4129. }),
  4130. smalltalk.Workspace);
  4131. smalltalk.addMethod(
  4132. "_doIt",
  4133. smalltalk.method({
  4134. selector: "doIt",
  4135. fn: function () {
  4136. var self = this;
  4137. smalltalk.send(self['@sourceArea'], "_doIt", []);
  4138. return self;
  4139. }
  4140. }),
  4141. smalltalk.Workspace);
  4142. smalltalk.addMethod(
  4143. "_fileIn",
  4144. smalltalk.method({
  4145. selector: "fileIn",
  4146. fn: function () {
  4147. var self = this;
  4148. smalltalk.send(self['@sourceArea'], "_fileIn", []);
  4149. return self;
  4150. }
  4151. }),
  4152. smalltalk.Workspace);
  4153. smalltalk.addMethod(
  4154. "_inspectIt",
  4155. smalltalk.method({
  4156. selector: "inspectIt",
  4157. fn: function () {
  4158. var self = this;
  4159. smalltalk.send(self['@sourceArea'], "_inspectIt", []);
  4160. return self;
  4161. }
  4162. }),
  4163. smalltalk.Workspace);
  4164. smalltalk.addMethod(
  4165. "_label",
  4166. smalltalk.method({
  4167. selector: "label",
  4168. fn: function () {
  4169. var self = this;
  4170. return "Workspace";
  4171. }
  4172. }),
  4173. smalltalk.Workspace);
  4174. smalltalk.addMethod(
  4175. "_printIt",
  4176. smalltalk.method({
  4177. selector: "printIt",
  4178. fn: function () {
  4179. var self = this;
  4180. smalltalk.send(self['@sourceArea'], "_printIt", []);
  4181. return self;
  4182. }
  4183. }),
  4184. smalltalk.Workspace);
  4185. smalltalk.addMethod(
  4186. "_renderBoxOn_",
  4187. smalltalk.method({
  4188. selector: "renderBoxOn:",
  4189. fn: function (html) {
  4190. var self = this;
  4191. self['@sourceArea'] = smalltalk.send(smalltalk.SourceArea || SourceArea, "_new", []);
  4192. smalltalk.send(self['@sourceArea'], "_renderOn_", [html]);
  4193. return self;
  4194. }
  4195. }),
  4196. smalltalk.Workspace);
  4197. smalltalk.addMethod(
  4198. "_renderButtonsOn_",
  4199. smalltalk.method({
  4200. selector: "renderButtonsOn:",
  4201. fn: function (html) {
  4202. var self = this;
  4203. var $1, $2, $3, $4, $5, $6, $7, $8, $9, $10;
  4204. $1 = smalltalk.send(html, "_button", []);
  4205. smalltalk.send($1, "_with_", ["DoIt"]);
  4206. smalltalk.send($1, "_title_", ["ctrl+d"]);
  4207. $2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_doIt", []);}]);
  4208. $3 = smalltalk.send(html, "_button", []);
  4209. smalltalk.send($3, "_with_", ["PrintIt"]);
  4210. smalltalk.send($3, "_title_", ["ctrl+p"]);
  4211. $4 = smalltalk.send($3, "_onClick_", [function () {return smalltalk.send(self, "_printIt", []);}]);
  4212. $5 = smalltalk.send(html, "_button", []);
  4213. smalltalk.send($5, "_with_", ["InspectIt"]);
  4214. smalltalk.send($5, "_title_", ["ctrl+i"]);
  4215. $6 = smalltalk.send($5, "_onClick_", [function () {return smalltalk.send(self, "_inspectIt", []);}]);
  4216. $7 = smalltalk.send(html, "_button", []);
  4217. smalltalk.send($7, "_with_", ["FileIn"]);
  4218. smalltalk.send($7, "_title_", ["ctrl+f"]);
  4219. $8 = smalltalk.send($7, "_onClick_", [function () {return smalltalk.send(self, "_fileIn", []);}]);
  4220. $9 = smalltalk.send(html, "_button", []);
  4221. smalltalk.send($9, "_with_", ["Clear workspace"]);
  4222. $10 = smalltalk.send($9, "_onClick_", [function () {return smalltalk.send(self, "_clearWorkspace", []);}]);
  4223. return self;
  4224. }
  4225. }),
  4226. smalltalk.Workspace);
  4227. smalltalk.addMethod(
  4228. "_show",
  4229. smalltalk.method({
  4230. selector: "show",
  4231. fn: function (){
  4232. var self=this;
  4233. smalltalk.send(self,"_show",[],smalltalk.TabWidget);
  4234. smalltalk.send(self["@sourceArea"],"_focus",[]);
  4235. return self}
  4236. }),
  4237. smalltalk.Workspace);
  4238. smalltalk.addMethod(
  4239. "_inspect",
  4240. smalltalk.method({
  4241. selector: "inspect",
  4242. fn: function () {
  4243. var self = this;
  4244. var $1, $2;
  4245. $1 = smalltalk.send(smalltalk.Inspector || Inspector, "_new", []);
  4246. smalltalk.send($1, "_inspect_", [self]);
  4247. $2 = smalltalk.send($1, "_open", []);
  4248. return self;
  4249. }
  4250. }),
  4251. smalltalk.Object);
  4252. smalltalk.addMethod(
  4253. "_inspectOn_",
  4254. smalltalk.method({
  4255. selector: "inspectOn:",
  4256. fn: function (anInspector) {
  4257. var self = this;
  4258. var $1;
  4259. var variables;
  4260. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4261. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4262. smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_allInstanceVariableNames", []), "_do_", [function (each) {return smalltalk.send(variables, "_at_put_", [each, smalltalk.send(self, "_instVarAt_", [each])]);}]);
  4263. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4264. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4265. return self;
  4266. }
  4267. }),
  4268. smalltalk.Object);
  4269. smalltalk.addMethod(
  4270. "_inspectOn_",
  4271. smalltalk.method({
  4272. selector: "inspectOn:",
  4273. fn: function (anInspector) {
  4274. var self = this;
  4275. var $1;
  4276. var variables;
  4277. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4278. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4279. smalltalk.send(self, "_withIndexDo_", [function (each, i) {return smalltalk.send(variables, "_at_put_", [i, each]);}]);
  4280. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4281. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4282. return self;
  4283. }
  4284. }),
  4285. smalltalk.Collection);
  4286. smalltalk.addMethod(
  4287. "_inspectOn_",
  4288. smalltalk.method({
  4289. selector: "inspectOn:",
  4290. fn: function (anInspector) {
  4291. var self = this;
  4292. var $1;
  4293. var variables;
  4294. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4295. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4296. smalltalk.send(variables, "_at_put_", ["#keys", smalltalk.send(self, "_keys", [])]);
  4297. smalltalk.send(self, "_keysAndValuesDo_", [function (key, value) {return smalltalk.send(variables, "_at_put_", [key, value]);}]);
  4298. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4299. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4300. return self;
  4301. }
  4302. }),
  4303. smalltalk.HashedCollection);
  4304. smalltalk.addMethod(
  4305. "_inspectOn_",
  4306. smalltalk.method({
  4307. selector: "inspectOn:",
  4308. fn: function (anInspector) {
  4309. var self = this;
  4310. var $1;
  4311. var label;
  4312. smalltalk.send(self, "_inspectOn_", [anInspector], smalltalk.CharacterArray);
  4313. $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_printString", []), "_size", []), "__gt", [30]);
  4314. if (smalltalk.assert($1)) {
  4315. label = smalltalk.send(smalltalk.send(smalltalk.send(self, "_printString", []), "_copyFrom_to_", [1, 30]), "__comma", ["...'"]);
  4316. } else {
  4317. label = smalltalk.send(self, "_printString", []);
  4318. }
  4319. smalltalk.send(anInspector, "_setLabel_", [label]);
  4320. return self;
  4321. }
  4322. }),
  4323. smalltalk.String);
  4324. smalltalk.addMethod(
  4325. "_inspectOn_",
  4326. smalltalk.method({
  4327. selector: "inspectOn:",
  4328. fn: function (anInspector) {
  4329. var self = this;
  4330. var $1;
  4331. var variables;
  4332. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4333. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4334. smalltalk.send(self['@elements'], "_withIndexDo_", [function (each, i) {return smalltalk.send(variables, "_at_put_", [i, each]);}]);
  4335. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4336. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4337. return self;
  4338. }
  4339. }),
  4340. smalltalk.Set);
  4341. smalltalk.addMethod(
  4342. "_inspectOn_",
  4343. smalltalk.method({
  4344. selector: "inspectOn:",
  4345. fn: function (anInspector) {
  4346. var self = this;
  4347. var $1;
  4348. var variables;
  4349. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4350. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4351. smalltalk.send(variables, "_at_put_", ["#year", smalltalk.send(self, "_year", [])]);
  4352. smalltalk.send(variables, "_at_put_", ["#month", smalltalk.send(self, "_month", [])]);
  4353. smalltalk.send(variables, "_at_put_", ["#day", smalltalk.send(self, "_day", [])]);
  4354. smalltalk.send(variables, "_at_put_", ["#hours", smalltalk.send(self, "_hours", [])]);
  4355. smalltalk.send(variables, "_at_put_", ["#minutes", smalltalk.send(self, "_minutes", [])]);
  4356. smalltalk.send(variables, "_at_put_", ["#seconds", smalltalk.send(self, "_seconds", [])]);
  4357. smalltalk.send(variables, "_at_put_", ["#milliseconds", smalltalk.send(self, "_milliseconds", [])]);
  4358. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4359. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4360. return self;
  4361. }
  4362. }),
  4363. smalltalk.Date);
  4364. smalltalk.addMethod(
  4365. "_inspectOn_",
  4366. smalltalk.method({
  4367. selector: "inspectOn:",
  4368. fn: function (anInspector) {
  4369. var self = this;
  4370. var $1;
  4371. var variables;
  4372. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4373. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4374. smalltalk.send(variables, "_at_put_", ["#year", smalltalk.send(self, "_year", [])]);
  4375. smalltalk.send(variables, "_at_put_", ["#month", smalltalk.send(self, "_month", [])]);
  4376. smalltalk.send(variables, "_at_put_", ["#day", smalltalk.send(self, "_day", [])]);
  4377. smalltalk.send(variables, "_at_put_", ["#hours", smalltalk.send(self, "_hours", [])]);
  4378. smalltalk.send(variables, "_at_put_", ["#minutes", smalltalk.send(self, "_minutes", [])]);
  4379. smalltalk.send(variables, "_at_put_", ["#seconds", smalltalk.send(self, "_seconds", [])]);
  4380. smalltalk.send(variables, "_at_put_", ["#milliseconds", smalltalk.send(self, "_milliseconds", [])]);
  4381. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4382. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4383. return self;
  4384. }
  4385. }),
  4386. smalltalk.Date);
  4387. smalltalk.addMethod(
  4388. "_inspectOn_",
  4389. smalltalk.method({
  4390. selector: "inspectOn:",
  4391. fn: function (anInspector) {
  4392. var self = this;
  4393. var $1;
  4394. var variables;
  4395. variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
  4396. smalltalk.send(variables, "_at_put_", ["#self", self]);
  4397. smalltalk.send(variables, "_at_put_", ["#home", smalltalk.send(self, "_home", [])]);
  4398. smalltalk.send(variables, "_at_put_", ["#receiver", smalltalk.send(self, "_receiver", [])]);
  4399. smalltalk.send(variables, "_at_put_", ["#selector", smalltalk.send(self, "_selector", [])]);
  4400. smalltalk.send(variables, "_at_put_", ["#temps", smalltalk.send(self, "_temps", [])]);
  4401. smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_instanceVariableNames", []), "_do_", [function (each) {return smalltalk.send(variables, "_at_put_", [each, smalltalk.send(self, "_instVarAt_", [each])]);}]);
  4402. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  4403. $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
  4404. return self;
  4405. }
  4406. }),
  4407. smalltalk.MethodContext);