1
0

IDE.deploy.js 193 KB

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