IDE.deploy.js 153 KB

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