IDE.deploy.js 173 KB

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