IDE.deploy.js 174 KB

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