IDE.deploy.js 173 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362
  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(_st(_st(compiler)._eval_(_st(compiler)._compile_forClass_(_st(_st("doIt ^[").__comma(aString)).__comma("] value"),(smalltalk.DoIt || DoIt))))._fn())._applyTo_arguments_(_st(self)._receiver(),[]);
  428. return $2;
  429. }
  430. catch(e) {if(e===$early)return e[0]; throw e}
  431. }, function($ctx1) {$ctx1.fill(self,"eval:",{aString: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,$6,$8,$9,$7,$5;
  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(method)._category_(self["@selectedProtocol"]);
  1535. $4=_st(compiler)._unknownVariables();
  1536. $5=(function(each){
  1537. return smalltalk.withContext(function($ctx2) { $6=_st(window)._at_(each);
  1538. $7=(function(){
  1539. return smalltalk.withContext(function($ctx3) { $8=_st(window)._confirm_(_st(_st("Declare '").__comma(each)).__comma("' as instance variable?"));
  1540. if(smalltalk.assert($8)){
  1541. _st(self)._addInstanceVariableNamed_toClass_(each,aClass);
  1542. $9=_st(self)._compileMethodDefinitionFor_(aClass);
  1543. throw $early=[$9];
  1544. };
  1545. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
  1546. return _st($6)._ifNil_($7);
  1547. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
  1548. _st($4)._do_($5);
  1549. _st(aClass)._addCompiledMethod_(method);
  1550. _st(compiler)._setupClass_(aClass);
  1551. _st(self)._updateMethodsList();
  1552. _st(self)._selectMethod_(method);
  1553. return self}
  1554. catch(e) {if(e===$early)return e[0]; throw e}
  1555. }, function($ctx1) {$ctx1.fill(self,"compileMethodDefinitionFor:",{aClass:aClass,compiler:compiler,method:method,source:source,node:node}, smalltalk.Browser)})}
  1556. }),
  1557. smalltalk.Browser);
  1558. smalltalk.addMethod(
  1559. "_copyClass",
  1560. smalltalk.method({
  1561. selector: "copyClass",
  1562. fn: function (){
  1563. var self=this;
  1564. var className;
  1565. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1566. className=_st(window)._prompt_("Copy class");
  1567. $1=_st(_st(className)._notNil())._and_((function(){
  1568. return smalltalk.withContext(function($ctx2) { return _st(className)._notEmpty();
  1569. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1570. if(smalltalk.assert($1)){
  1571. _st(_st((smalltalk.ClassBuilder || ClassBuilder))._new())._copyClass_named_(_st(self)._selectedClass(),className);
  1572. $2=self;
  1573. _st($2)._resetClassesList();
  1574. $3=_st($2)._updateClassesList();
  1575. $3;
  1576. _st(self)._selectClass_(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_(className));
  1577. };
  1578. return self}, function($ctx1) {$ctx1.fill(self,"copyClass",{className:className}, smalltalk.Browser)})}
  1579. }),
  1580. smalltalk.Browser);
  1581. smalltalk.addMethod(
  1582. "_declarationSource",
  1583. smalltalk.method({
  1584. selector: "declarationSource",
  1585. fn: function (){
  1586. var self=this;
  1587. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1588. $2=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("instance"));
  1589. if(smalltalk.assert($2)){
  1590. $1=_st(self)._classDeclarationSource();
  1591. } else {
  1592. $1=_st(self)._metaclassDeclarationSource();
  1593. };
  1594. return $1;
  1595. }, function($ctx1) {$ctx1.fill(self,"declarationSource",{}, smalltalk.Browser)})}
  1596. }),
  1597. smalltalk.Browser);
  1598. smalltalk.addMethod(
  1599. "_disableSaveButton",
  1600. smalltalk.method({
  1601. selector: "disableSaveButton",
  1602. fn: function (){
  1603. var self=this;
  1604. return smalltalk.withContext(function($ctx1) { var $1;
  1605. $1=self["@saveButton"];
  1606. if(($receiver = $1) == nil || $receiver == undefined){
  1607. $1;
  1608. } else {
  1609. _st(self["@saveButton"])._at_put_("disabled",true);
  1610. };
  1611. self["@unsavedChanges"]=false;
  1612. return self}, function($ctx1) {$ctx1.fill(self,"disableSaveButton",{}, smalltalk.Browser)})}
  1613. }),
  1614. smalltalk.Browser);
  1615. smalltalk.addMethod(
  1616. "_dummyMethodSource",
  1617. smalltalk.method({
  1618. selector: "dummyMethodSource",
  1619. fn: function (){
  1620. var self=this;
  1621. return smalltalk.withContext(function($ctx1) { return "messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements";
  1622. }, function($ctx1) {$ctx1.fill(self,"dummyMethodSource",{}, smalltalk.Browser)})}
  1623. }),
  1624. smalltalk.Browser);
  1625. smalltalk.addMethod(
  1626. "_handleSourceAreaKeyDown_",
  1627. smalltalk.method({
  1628. selector: "handleSourceAreaKeyDown:",
  1629. fn: function (anEvent){
  1630. var self=this;
  1631. return smalltalk.withContext(function($ctx1) { if(anEvent.ctrlKey) {
  1632. if(anEvent.keyCode === 83) { //ctrl+s
  1633. self._compile();
  1634. anEvent.preventDefault();
  1635. return false;
  1636. }
  1637. }
  1638. ;
  1639. return self}, function($ctx1) {$ctx1.fill(self,"handleSourceAreaKeyDown:",{anEvent:anEvent}, smalltalk.Browser)})}
  1640. }),
  1641. smalltalk.Browser);
  1642. smalltalk.addMethod(
  1643. "_hideClassButtons",
  1644. smalltalk.method({
  1645. selector: "hideClassButtons",
  1646. fn: function (){
  1647. var self=this;
  1648. return smalltalk.withContext(function($ctx1) { _st(_st(self["@classButtons"])._asJQuery())._hide();
  1649. return self}, function($ctx1) {$ctx1.fill(self,"hideClassButtons",{}, smalltalk.Browser)})}
  1650. }),
  1651. smalltalk.Browser);
  1652. smalltalk.addMethod(
  1653. "_hideMethodButtons",
  1654. smalltalk.method({
  1655. selector: "hideMethodButtons",
  1656. fn: function (){
  1657. var self=this;
  1658. return smalltalk.withContext(function($ctx1) { _st(_st(self["@methodButtons"])._asJQuery())._hide();
  1659. return self}, function($ctx1) {$ctx1.fill(self,"hideMethodButtons",{}, smalltalk.Browser)})}
  1660. }),
  1661. smalltalk.Browser);
  1662. smalltalk.addMethod(
  1663. "_initialize",
  1664. smalltalk.method({
  1665. selector: "initialize",
  1666. fn: function (){
  1667. var self=this;
  1668. return smalltalk.withContext(function($ctx1) { smalltalk.TabWidget.fn.prototype._initialize.apply(_st(self), []);
  1669. self["@selectedTab"]=smalltalk.symbolFor("instance");
  1670. self["@selectedPackage"]=_st(_st(self)._packages())._first();
  1671. self["@unsavedChanges"]=false;
  1672. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.Browser)})}
  1673. }),
  1674. smalltalk.Browser);
  1675. smalltalk.addMethod(
  1676. "_label",
  1677. smalltalk.method({
  1678. selector: "label",
  1679. fn: function (){
  1680. var self=this;
  1681. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1682. $2=self["@selectedClass"];
  1683. if(($receiver = $2) == nil || $receiver == undefined){
  1684. $1="Browser (nil)";
  1685. } else {
  1686. $1=_st("Browser: ").__comma(_st(self["@selectedClass"])._name());
  1687. };
  1688. return $1;
  1689. }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.Browser)})}
  1690. }),
  1691. smalltalk.Browser);
  1692. smalltalk.addMethod(
  1693. "_metaclassDeclarationSource",
  1694. smalltalk.method({
  1695. selector: "metaclassDeclarationSource",
  1696. fn: function (){
  1697. var self=this;
  1698. var stream;
  1699. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  1700. stream=_st("")._writeStream();
  1701. $1=self["@selectedClass"];
  1702. if(($receiver = $1) == nil || $receiver == undefined){
  1703. $1;
  1704. } else {
  1705. $2=stream;
  1706. _st($2)._nextPutAll_(_st(self["@selectedClass"])._asString());
  1707. _st($2)._nextPutAll_(" class ");
  1708. $3=_st($2)._nextPutAll_("instanceVariableNames: '");
  1709. $3;
  1710. _st(_st(_st(self["@selectedClass"])._class())._instanceVariableNames())._do_separatedBy_((function(each){
  1711. return smalltalk.withContext(function($ctx2) { return _st(stream)._nextPutAll_(each);
  1712. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  1713. return smalltalk.withContext(function($ctx2) { return _st(stream)._nextPutAll_(" ");
  1714. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1715. _st(stream)._nextPutAll_("'");
  1716. };
  1717. $4=_st(stream)._contents();
  1718. return $4;
  1719. }, function($ctx1) {$ctx1.fill(self,"metaclassDeclarationSource",{stream:stream}, smalltalk.Browser)})}
  1720. }),
  1721. smalltalk.Browser);
  1722. smalltalk.addMethod(
  1723. "_methodSource",
  1724. smalltalk.method({
  1725. selector: "methodSource",
  1726. fn: function (){
  1727. var self=this;
  1728. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1729. $2=self["@selectedMethod"];
  1730. if(($receiver = $2) == nil || $receiver == undefined){
  1731. $1=_st(self)._dummyMethodSource();
  1732. } else {
  1733. $1=_st(self["@selectedMethod"])._source();
  1734. };
  1735. return $1;
  1736. }, function($ctx1) {$ctx1.fill(self,"methodSource",{}, smalltalk.Browser)})}
  1737. }),
  1738. smalltalk.Browser);
  1739. smalltalk.addMethod(
  1740. "_methods",
  1741. smalltalk.method({
  1742. selector: "methods",
  1743. fn: function (){
  1744. var self=this;
  1745. var klass;
  1746. return smalltalk.withContext(function($ctx1) { var $1,$2,$4,$3,$7,$9,$8,$6,$5;
  1747. $1=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("comment"));
  1748. if(smalltalk.assert($1)){
  1749. return [];
  1750. };
  1751. $2=self["@selectedClass"];
  1752. $3=(function(){
  1753. return smalltalk.withContext(function($ctx2) { $4=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("instance"));
  1754. if(smalltalk.assert($4)){
  1755. klass=self["@selectedClass"];
  1756. } else {
  1757. klass=_st(self["@selectedClass"])._class();
  1758. };
  1759. return klass;
  1760. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  1761. _st($2)._ifNotNil_($3);
  1762. $7=self["@selectedProtocol"];
  1763. $8=(function(){
  1764. return smalltalk.withContext(function($ctx2) { $9=klass;
  1765. if(($receiver = $9) == nil || $receiver == undefined){
  1766. return [];
  1767. } else {
  1768. return _st(_st(klass)._methodDictionary())._values();
  1769. };
  1770. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  1771. $6=_st($7)._ifNil_ifNotNil_($8,(function(){
  1772. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(klass)._methodDictionary())._values())._select_((function(each){
  1773. return smalltalk.withContext(function($ctx3) { return _st(_st(each)._category()).__eq(self["@selectedProtocol"]);
  1774. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  1775. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1776. $5=_st($6)._sort_((function(a,b){
  1777. return smalltalk.withContext(function($ctx2) { return _st(_st(a)._selector()).__lt(_st(b)._selector());
  1778. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  1779. return $5;
  1780. }, function($ctx1) {$ctx1.fill(self,"methods",{klass:klass}, smalltalk.Browser)})}
  1781. }),
  1782. smalltalk.Browser);
  1783. smalltalk.addMethod(
  1784. "_packages",
  1785. smalltalk.method({
  1786. selector: "packages",
  1787. fn: function (){
  1788. var self=this;
  1789. var packages;
  1790. return smalltalk.withContext(function($ctx1) { var $1,$3,$2,$4;
  1791. packages=_st((smalltalk.Array || Array))._new();
  1792. $1=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._classes();
  1793. $2=(function(each){
  1794. return smalltalk.withContext(function($ctx2) { $3=_st(packages)._includes_(_st(each)._category());
  1795. if(! smalltalk.assert($3)){
  1796. return _st(packages)._add_(_st(each)._category());
  1797. };
  1798. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
  1799. _st($1)._do_($2);
  1800. $4=_st(packages)._sort();
  1801. return $4;
  1802. }, function($ctx1) {$ctx1.fill(self,"packages",{packages:packages}, smalltalk.Browser)})}
  1803. }),
  1804. smalltalk.Browser);
  1805. smalltalk.addMethod(
  1806. "_protocols",
  1807. smalltalk.method({
  1808. selector: "protocols",
  1809. fn: function (){
  1810. var self=this;
  1811. var klass;
  1812. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$6,$7,$2,$8;
  1813. var $early={};
  1814. try {
  1815. $1=self["@selectedClass"];
  1816. $2=(function(){
  1817. return smalltalk.withContext(function($ctx2) { $3=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("comment"));
  1818. if(smalltalk.assert($3)){
  1819. throw $early=[[]];
  1820. };
  1821. $4=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("instance"));
  1822. if(smalltalk.assert($4)){
  1823. klass=self["@selectedClass"];
  1824. } else {
  1825. klass=_st(self["@selectedClass"])._class();
  1826. };
  1827. klass;
  1828. $5=_st(_st(klass)._methodDictionary())._isEmpty();
  1829. if(smalltalk.assert($5)){
  1830. $6=_st((smalltalk.Array || Array))._with_("not yet classified");
  1831. throw $early=[$6];
  1832. };
  1833. $7=_st(klass)._protocols();
  1834. throw $early=[$7];
  1835. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  1836. _st($1)._ifNotNil_($2);
  1837. $8=_st((smalltalk.Array || Array))._new();
  1838. return $8;
  1839. }
  1840. catch(e) {if(e===$early)return e[0]; throw e}
  1841. }, function($ctx1) {$ctx1.fill(self,"protocols",{klass:klass}, smalltalk.Browser)})}
  1842. }),
  1843. smalltalk.Browser);
  1844. smalltalk.addMethod(
  1845. "_removeClass",
  1846. smalltalk.method({
  1847. selector: "removeClass",
  1848. fn: function (){
  1849. var self=this;
  1850. return smalltalk.withContext(function($ctx1) { var $1;
  1851. $1=_st(window)._confirm_(_st(_st("Do you really want to remove ").__comma(_st(self["@selectedClass"])._name())).__comma("?"));
  1852. if(smalltalk.assert($1)){
  1853. _st(_st((smalltalk.Smalltalk || Smalltalk))._current())._removeClass_(self["@selectedClass"]);
  1854. _st(self)._resetClassesList();
  1855. _st(self)._selectClass_(nil);
  1856. };
  1857. return self}, function($ctx1) {$ctx1.fill(self,"removeClass",{}, smalltalk.Browser)})}
  1858. }),
  1859. smalltalk.Browser);
  1860. smalltalk.addMethod(
  1861. "_removeMethod",
  1862. smalltalk.method({
  1863. selector: "removeMethod",
  1864. fn: function (){
  1865. var self=this;
  1866. return smalltalk.withContext(function($ctx1) { var $1,$3,$5,$4,$2;
  1867. $1=_st(self)._cancelChanges();
  1868. $2=(function(){
  1869. return smalltalk.withContext(function($ctx2) { $3=_st(window)._confirm_(_st(_st("Do you really want to remove #").__comma(_st(self["@selectedMethod"])._selector())).__comma("?"));
  1870. $4=(function(){
  1871. return smalltalk.withContext(function($ctx3) { $5=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("instance"));
  1872. if(smalltalk.assert($5)){
  1873. _st(self["@selectedClass"])._removeCompiledMethod_(self["@selectedMethod"]);
  1874. } else {
  1875. _st(_st(self["@selectedClass"])._class())._removeCompiledMethod_(self["@selectedMethod"]);
  1876. };
  1877. return _st(self)._selectMethod_(nil);
  1878. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
  1879. return _st($3)._ifTrue_($4);
  1880. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  1881. _st($1)._ifTrue_($2);
  1882. return self}, function($ctx1) {$ctx1.fill(self,"removeMethod",{}, smalltalk.Browser)})}
  1883. }),
  1884. smalltalk.Browser);
  1885. smalltalk.addMethod(
  1886. "_removePackage",
  1887. smalltalk.method({
  1888. selector: "removePackage",
  1889. fn: function (){
  1890. var self=this;
  1891. return smalltalk.withContext(function($ctx1) { var $1;
  1892. $1=_st(window)._confirm_(_st(_st("Do you really want to remove the whole package ").__comma(self["@selectedPackage"])).__comma(" with all its classes?"));
  1893. if(smalltalk.assert($1)){
  1894. _st(_st((smalltalk.Smalltalk || Smalltalk))._current())._removePackage_(self["@selectedPackage"]);
  1895. _st(self)._updateCategoriesList();
  1896. };
  1897. return self}, function($ctx1) {$ctx1.fill(self,"removePackage",{}, smalltalk.Browser)})}
  1898. }),
  1899. smalltalk.Browser);
  1900. smalltalk.addMethod(
  1901. "_renameClass",
  1902. smalltalk.method({
  1903. selector: "renameClass",
  1904. fn: function (){
  1905. var self=this;
  1906. var newName;
  1907. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1908. newName=_st(window)._prompt_(_st("Rename class ").__comma(_st(self["@selectedClass"])._name()));
  1909. $1=_st(_st(newName)._notNil())._and_((function(){
  1910. return smalltalk.withContext(function($ctx2) { return _st(newName)._notEmpty();
  1911. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1912. if(smalltalk.assert($1)){
  1913. _st(self["@selectedClass"])._rename_(newName);
  1914. $2=self;
  1915. _st($2)._updateClassesList();
  1916. $3=_st($2)._updateSourceAndButtons();
  1917. $3;
  1918. };
  1919. return self}, function($ctx1) {$ctx1.fill(self,"renameClass",{newName:newName}, smalltalk.Browser)})}
  1920. }),
  1921. smalltalk.Browser);
  1922. smalltalk.addMethod(
  1923. "_renamePackage",
  1924. smalltalk.method({
  1925. selector: "renamePackage",
  1926. fn: function (){
  1927. var self=this;
  1928. var newName;
  1929. return smalltalk.withContext(function($ctx1) { var $1,$3,$2;
  1930. newName=_st(window)._prompt_(_st("Rename package ").__comma(self["@selectedPackage"]));
  1931. $1=newName;
  1932. $2=(function(){
  1933. return smalltalk.withContext(function($ctx2) { $3=_st(newName)._notEmpty();
  1934. if(smalltalk.assert($3)){
  1935. _st(_st((smalltalk.Smalltalk || Smalltalk))._current())._renamePackage_to_(self["@selectedPackage"],newName);
  1936. return _st(self)._updateCategoriesList();
  1937. };
  1938. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  1939. _st($1)._ifNotNil_($2);
  1940. return self}, function($ctx1) {$ctx1.fill(self,"renamePackage",{newName:newName}, smalltalk.Browser)})}
  1941. }),
  1942. smalltalk.Browser);
  1943. smalltalk.addMethod(
  1944. "_renderBottomPanelOn_",
  1945. smalltalk.method({
  1946. selector: "renderBottomPanelOn:",
  1947. fn: function (html){
  1948. var self=this;
  1949. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1950. $1=_st(html)._div();
  1951. _st($1)._class_("amber_sourceCode");
  1952. $2=_st($1)._with_((function(){
  1953. return smalltalk.withContext(function($ctx2) { self["@sourceArea"]=_st((smalltalk.SourceArea || SourceArea))._new();
  1954. self["@sourceArea"];
  1955. _st(self["@sourceArea"])._renderOn_(html);
  1956. _st(self["@sourceArea"])._onKeyDown_((function(e){
  1957. return smalltalk.withContext(function($ctx3) { return _st(self)._handleSourceAreaKeyDown_(e);
  1958. }, function($ctx3) {$ctx3.fillBlock({e:e},$ctx1)})}));
  1959. return _st(self["@sourceArea"])._onKeyUp_((function(){
  1960. return smalltalk.withContext(function($ctx3) { return _st(self)._updateStatus();
  1961. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1962. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1963. return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html}, smalltalk.Browser)})}
  1964. }),
  1965. smalltalk.Browser);
  1966. smalltalk.addMethod(
  1967. "_renderBoxOn_",
  1968. smalltalk.method({
  1969. selector: "renderBoxOn:",
  1970. fn: function (html){
  1971. var self=this;
  1972. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1973. $1=self;
  1974. _st($1)._renderTopPanelOn_(html);
  1975. _st($1)._renderTabsOn_(html);
  1976. $2=_st($1)._renderBottomPanelOn_(html);
  1977. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html}, smalltalk.Browser)})}
  1978. }),
  1979. smalltalk.Browser);
  1980. smalltalk.addMethod(
  1981. "_renderButtonsOn_",
  1982. smalltalk.method({
  1983. selector: "renderButtonsOn:",
  1984. fn: function (html){
  1985. var self=this;
  1986. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$5,$6,$7,$8,$9,$10,$4;
  1987. self["@saveButton"]=_st(html)._button();
  1988. $1=self["@saveButton"];
  1989. _st($1)._with_("Save");
  1990. $2=_st($1)._onClick_((function(){
  1991. return smalltalk.withContext(function($ctx2) { return _st(self)._compile();
  1992. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1993. self["@methodButtons"]=_st(html)._span();
  1994. self["@classButtons"]=_st(html)._span();
  1995. $3=_st(html)._div();
  1996. _st($3)._class_("right");
  1997. $4=_st($3)._with_((function(){
  1998. return smalltalk.withContext(function($ctx2) { $5=_st(html)._button();
  1999. _st($5)._with_("DoIt");
  2000. $6=_st($5)._onClick_((function(){
  2001. return smalltalk.withContext(function($ctx3) { return _st(self["@sourceArea"])._doIt();
  2002. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2003. $6;
  2004. $7=_st(html)._button();
  2005. _st($7)._with_("PrintIt");
  2006. $8=_st($7)._onClick_((function(){
  2007. return smalltalk.withContext(function($ctx3) { return _st(self["@sourceArea"])._printIt();
  2008. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2009. $8;
  2010. $9=_st(html)._button();
  2011. _st($9)._with_("InspectIt");
  2012. $10=_st($9)._onClick_((function(){
  2013. return smalltalk.withContext(function($ctx3) { return _st(self["@sourceArea"])._inspectIt();
  2014. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2015. return $10;
  2016. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2017. _st(self)._updateSourceAndButtons();
  2018. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.Browser)})}
  2019. }),
  2020. smalltalk.Browser);
  2021. smalltalk.addMethod(
  2022. "_renderTabsOn_",
  2023. smalltalk.method({
  2024. selector: "renderTabsOn:",
  2025. fn: function (html){
  2026. var self=this;
  2027. return smalltalk.withContext(function($ctx1) { self["@tabsList"]=_st(_st(html)._ul())._class_("amber_tabs amber_browser");
  2028. _st(self)._updateTabsList();
  2029. return self}, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html}, smalltalk.Browser)})}
  2030. }),
  2031. smalltalk.Browser);
  2032. smalltalk.addMethod(
  2033. "_renderTopPanelOn_",
  2034. smalltalk.method({
  2035. selector: "renderTopPanelOn:",
  2036. fn: function (html){
  2037. var self=this;
  2038. return smalltalk.withContext(function($ctx1) { var $1,$3,$5,$6,$7,$8,$9,$10,$4,$11,$12,$2;
  2039. $1=_st(html)._div();
  2040. _st($1)._class_("top");
  2041. $2=_st($1)._with_((function(){
  2042. return smalltalk.withContext(function($ctx2) { self["@packagesList"]=_st(_st(html)._ul())._class_("amber_column browser packages");
  2043. self["@packagesList"];
  2044. $3=_st(html)._div();
  2045. _st($3)._class_("amber_packagesButtons");
  2046. $4=_st($3)._with_((function(){
  2047. return smalltalk.withContext(function($ctx3) { $5=_st(html)._button();
  2048. _st($5)._title_("Commit classes in this package to disk");
  2049. _st($5)._onClick_((function(){
  2050. return smalltalk.withContext(function($ctx4) { return _st(self)._commitPackage();
  2051. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  2052. $6=_st($5)._with_("Commit");
  2053. $6;
  2054. $7=_st(html)._button();
  2055. _st($7)._title_("Rename package");
  2056. _st($7)._onClick_((function(){
  2057. return smalltalk.withContext(function($ctx4) { return _st(self)._renamePackage();
  2058. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  2059. $8=_st($7)._with_("Rename");
  2060. $8;
  2061. $9=_st(html)._button();
  2062. _st($9)._title_("Remove this package from the system");
  2063. _st($9)._onClick_((function(){
  2064. return smalltalk.withContext(function($ctx4) { return _st(self)._removePackage();
  2065. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  2066. $10=_st($9)._with_("Remove");
  2067. return $10;
  2068. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2069. $4;
  2070. self["@classesList"]=_st((smalltalk.ClassesList || ClassesList))._on_(self);
  2071. self["@classesList"];
  2072. _st(self["@classesList"])._renderOn_(html);
  2073. self["@protocolsList"]=_st(_st(html)._ul())._class_("amber_column browser protocols");
  2074. self["@protocolsList"];
  2075. self["@methodsList"]=_st(_st(html)._ul())._class_("amber_column browser methods");
  2076. self["@methodsList"];
  2077. $11=self;
  2078. _st($11)._updateCategoriesList();
  2079. _st($11)._updateClassesList();
  2080. _st($11)._updateProtocolsList();
  2081. $12=_st($11)._updateMethodsList();
  2082. $12;
  2083. return _st(_st(html)._div())._class_("amber_clear");
  2084. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2085. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html}, smalltalk.Browser)})}
  2086. }),
  2087. smalltalk.Browser);
  2088. smalltalk.addMethod(
  2089. "_resetClassesList",
  2090. smalltalk.method({
  2091. selector: "resetClassesList",
  2092. fn: function (){
  2093. var self=this;
  2094. return smalltalk.withContext(function($ctx1) { _st(self["@classesList"])._resetNodes();
  2095. return self}, function($ctx1) {$ctx1.fill(self,"resetClassesList",{}, smalltalk.Browser)})}
  2096. }),
  2097. smalltalk.Browser);
  2098. smalltalk.addMethod(
  2099. "_search_",
  2100. smalltalk.method({
  2101. selector: "search:",
  2102. fn: function (aString){
  2103. var self=this;
  2104. return smalltalk.withContext(function($ctx1) { var $1,$3,$2;
  2105. $1=_st(self)._cancelChanges();
  2106. $2=(function(){
  2107. var searchedClass;
  2108. return smalltalk.withContext(function($ctx2) { searchedClass=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_(aString);
  2109. searchedClass;
  2110. $3=_st(searchedClass)._isClass();
  2111. if(smalltalk.assert($3)){
  2112. return _st(_st(self)._class())._openOn_(searchedClass);
  2113. } else {
  2114. return _st(self)._searchReferencesOf_(aString);
  2115. };
  2116. }, function($ctx2) {$ctx2.fillBlock({searchedClass:searchedClass},$ctx1)})});
  2117. _st($1)._ifTrue_($2);
  2118. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString}, smalltalk.Browser)})}
  2119. }),
  2120. smalltalk.Browser);
  2121. smalltalk.addMethod(
  2122. "_searchClassReferences",
  2123. smalltalk.method({
  2124. selector: "searchClassReferences",
  2125. fn: function (){
  2126. var self=this;
  2127. return smalltalk.withContext(function($ctx1) { _st((smalltalk.ReferencesBrowser || ReferencesBrowser))._search_(_st(self["@selectedClass"])._name());
  2128. return self}, function($ctx1) {$ctx1.fill(self,"searchClassReferences",{}, smalltalk.Browser)})}
  2129. }),
  2130. smalltalk.Browser);
  2131. smalltalk.addMethod(
  2132. "_searchReferencesOf_",
  2133. smalltalk.method({
  2134. selector: "searchReferencesOf:",
  2135. fn: function (aString){
  2136. var self=this;
  2137. return smalltalk.withContext(function($ctx1) { _st((smalltalk.ReferencesBrowser || ReferencesBrowser))._search_(aString);
  2138. return self}, function($ctx1) {$ctx1.fill(self,"searchReferencesOf:",{aString:aString}, smalltalk.Browser)})}
  2139. }),
  2140. smalltalk.Browser);
  2141. smalltalk.addMethod(
  2142. "_selectCategory_",
  2143. smalltalk.method({
  2144. selector: "selectCategory:",
  2145. fn: function (aCategory){
  2146. var self=this;
  2147. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2148. $1=_st(self)._cancelChanges();
  2149. if(smalltalk.assert($1)){
  2150. self["@selectedPackage"]=aCategory;
  2151. self["@selectedPackage"];
  2152. self["@selectedMethod"]=nil;
  2153. self["@selectedProtocol"]=self["@selectedMethod"];
  2154. self["@selectedClass"]=self["@selectedProtocol"];
  2155. self["@selectedClass"];
  2156. _st(self)._resetClassesList();
  2157. $2=self;
  2158. _st($2)._updateCategoriesList();
  2159. _st($2)._updateClassesList();
  2160. _st($2)._updateProtocolsList();
  2161. _st($2)._updateMethodsList();
  2162. $3=_st($2)._updateSourceAndButtons();
  2163. $3;
  2164. };
  2165. return self}, function($ctx1) {$ctx1.fill(self,"selectCategory:",{aCategory:aCategory}, smalltalk.Browser)})}
  2166. }),
  2167. smalltalk.Browser);
  2168. smalltalk.addMethod(
  2169. "_selectClass_",
  2170. smalltalk.method({
  2171. selector: "selectClass:",
  2172. fn: function (aClass){
  2173. var self=this;
  2174. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2175. $1=_st(self)._cancelChanges();
  2176. if(smalltalk.assert($1)){
  2177. self["@selectedClass"]=aClass;
  2178. self["@selectedClass"];
  2179. self["@selectedMethod"]=nil;
  2180. self["@selectedProtocol"]=self["@selectedMethod"];
  2181. self["@selectedProtocol"];
  2182. $2=self;
  2183. _st($2)._updateClassesList();
  2184. _st($2)._updateProtocolsList();
  2185. _st($2)._updateMethodsList();
  2186. $3=_st($2)._updateSourceAndButtons();
  2187. $3;
  2188. };
  2189. return self}, function($ctx1) {$ctx1.fill(self,"selectClass:",{aClass:aClass}, smalltalk.Browser)})}
  2190. }),
  2191. smalltalk.Browser);
  2192. smalltalk.addMethod(
  2193. "_selectMethod_",
  2194. smalltalk.method({
  2195. selector: "selectMethod:",
  2196. fn: function (aMethod){
  2197. var self=this;
  2198. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2199. $1=_st(self)._cancelChanges();
  2200. if(smalltalk.assert($1)){
  2201. self["@selectedMethod"]=aMethod;
  2202. self["@selectedMethod"];
  2203. $2=self;
  2204. _st($2)._updateProtocolsList();
  2205. _st($2)._updateMethodsList();
  2206. $3=_st($2)._updateSourceAndButtons();
  2207. $3;
  2208. };
  2209. return self}, function($ctx1) {$ctx1.fill(self,"selectMethod:",{aMethod:aMethod}, smalltalk.Browser)})}
  2210. }),
  2211. smalltalk.Browser);
  2212. smalltalk.addMethod(
  2213. "_selectProtocol_",
  2214. smalltalk.method({
  2215. selector: "selectProtocol:",
  2216. fn: function (aString){
  2217. var self=this;
  2218. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2219. $1=_st(self)._cancelChanges();
  2220. if(smalltalk.assert($1)){
  2221. self["@selectedProtocol"]=aString;
  2222. self["@selectedProtocol"];
  2223. self["@selectedMethod"]=nil;
  2224. self["@selectedMethod"];
  2225. $2=self;
  2226. _st($2)._updateProtocolsList();
  2227. _st($2)._updateMethodsList();
  2228. $3=_st($2)._updateSourceAndButtons();
  2229. $3;
  2230. };
  2231. return self}, function($ctx1) {$ctx1.fill(self,"selectProtocol:",{aString:aString}, smalltalk.Browser)})}
  2232. }),
  2233. smalltalk.Browser);
  2234. smalltalk.addMethod(
  2235. "_selectTab_",
  2236. smalltalk.method({
  2237. selector: "selectTab:",
  2238. fn: function (aString){
  2239. var self=this;
  2240. return smalltalk.withContext(function($ctx1) { var $1;
  2241. $1=_st(self)._cancelChanges();
  2242. if(smalltalk.assert($1)){
  2243. self["@selectedTab"]=aString;
  2244. self["@selectedTab"];
  2245. _st(self)._selectProtocol_(nil);
  2246. _st(self)._updateTabsList();
  2247. };
  2248. return self}, function($ctx1) {$ctx1.fill(self,"selectTab:",{aString:aString}, smalltalk.Browser)})}
  2249. }),
  2250. smalltalk.Browser);
  2251. smalltalk.addMethod(
  2252. "_selectedClass",
  2253. smalltalk.method({
  2254. selector: "selectedClass",
  2255. fn: function (){
  2256. var self=this;
  2257. return smalltalk.withContext(function($ctx1) { var $1;
  2258. $1=self["@selectedClass"];
  2259. return $1;
  2260. }, function($ctx1) {$ctx1.fill(self,"selectedClass",{}, smalltalk.Browser)})}
  2261. }),
  2262. smalltalk.Browser);
  2263. smalltalk.addMethod(
  2264. "_selectedPackage",
  2265. smalltalk.method({
  2266. selector: "selectedPackage",
  2267. fn: function (){
  2268. var self=this;
  2269. return smalltalk.withContext(function($ctx1) { var $1;
  2270. $1=self["@selectedPackage"];
  2271. return $1;
  2272. }, function($ctx1) {$ctx1.fill(self,"selectedPackage",{}, smalltalk.Browser)})}
  2273. }),
  2274. smalltalk.Browser);
  2275. smalltalk.addMethod(
  2276. "_setMethodProtocol_",
  2277. smalltalk.method({
  2278. selector: "setMethodProtocol:",
  2279. fn: function (aString){
  2280. var self=this;
  2281. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$2;
  2282. $1=_st(self)._cancelChanges();
  2283. $2=(function(){
  2284. return smalltalk.withContext(function($ctx2) { $3=_st(_st(self)._protocols())._includes_(aString);
  2285. if(smalltalk.assert($3)){
  2286. _st(self["@selectedMethod"])._category_(aString);
  2287. self["@selectedProtocol"]=aString;
  2288. self["@selectedProtocol"];
  2289. self["@selectedMethod"]=self["@selectedMethod"];
  2290. self["@selectedMethod"];
  2291. $4=self;
  2292. _st($4)._updateProtocolsList();
  2293. _st($4)._updateMethodsList();
  2294. $5=_st($4)._updateSourceAndButtons();
  2295. return $5;
  2296. } else {
  2297. return _st(self)._addNewProtocol();
  2298. };
  2299. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  2300. _st($1)._ifTrue_($2);
  2301. return self}, function($ctx1) {$ctx1.fill(self,"setMethodProtocol:",{aString:aString}, smalltalk.Browser)})}
  2302. }),
  2303. smalltalk.Browser);
  2304. smalltalk.addMethod(
  2305. "_showClassButtons",
  2306. smalltalk.method({
  2307. selector: "showClassButtons",
  2308. fn: function (){
  2309. var self=this;
  2310. return smalltalk.withContext(function($ctx1) { _st(_st(self["@classButtons"])._asJQuery())._show();
  2311. return self}, function($ctx1) {$ctx1.fill(self,"showClassButtons",{}, smalltalk.Browser)})}
  2312. }),
  2313. smalltalk.Browser);
  2314. smalltalk.addMethod(
  2315. "_showMethodButtons",
  2316. smalltalk.method({
  2317. selector: "showMethodButtons",
  2318. fn: function (){
  2319. var self=this;
  2320. return smalltalk.withContext(function($ctx1) { _st(_st(self["@methodButtons"])._asJQuery())._show();
  2321. return self}, function($ctx1) {$ctx1.fill(self,"showMethodButtons",{}, smalltalk.Browser)})}
  2322. }),
  2323. smalltalk.Browser);
  2324. smalltalk.addMethod(
  2325. "_source",
  2326. smalltalk.method({
  2327. selector: "source",
  2328. fn: function (){
  2329. var self=this;
  2330. return smalltalk.withContext(function($ctx1) { var $1,$4,$3,$2,$6,$5;
  2331. var $early={};
  2332. try {
  2333. $1=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("comment"));
  2334. $2=(function(){
  2335. return smalltalk.withContext(function($ctx2) { $4=_st(_st(self["@selectedProtocol"])._notNil())._or_((function(){
  2336. return smalltalk.withContext(function($ctx3) { return _st(self["@selectedMethod"])._notNil();
  2337. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2338. if(smalltalk.assert($4)){
  2339. $3=_st(self)._methodSource();
  2340. } else {
  2341. $3=_st(self)._declarationSource();
  2342. };
  2343. throw $early=[$3];
  2344. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  2345. _st($1)._ifFalse_($2);
  2346. $6=self["@selectedClass"];
  2347. if(($receiver = $6) == nil || $receiver == undefined){
  2348. $5="";
  2349. } else {
  2350. $5=_st(self)._classCommentSource();
  2351. };
  2352. return $5;
  2353. }
  2354. catch(e) {if(e===$early)return e[0]; throw e}
  2355. }, function($ctx1) {$ctx1.fill(self,"source",{}, smalltalk.Browser)})}
  2356. }),
  2357. smalltalk.Browser);
  2358. smalltalk.addMethod(
  2359. "_updateCategoriesList",
  2360. smalltalk.method({
  2361. selector: "updateCategoriesList",
  2362. fn: function (){
  2363. var self=this;
  2364. return smalltalk.withContext(function($ctx1) { var $1,$3,$5,$6,$7,$8,$4,$2;
  2365. $1=self["@packagesList"];
  2366. $2=(function(html){
  2367. return smalltalk.withContext(function($ctx2) { $3=_st(self)._packages();
  2368. $4=(function(each){
  2369. var li,label;
  2370. return smalltalk.withContext(function($ctx3) { $5=_st(each)._isEmpty();
  2371. if(smalltalk.assert($5)){
  2372. label="Unclassified";
  2373. label;
  2374. } else {
  2375. label=each;
  2376. label;
  2377. };
  2378. li=_st(html)._li();
  2379. li;
  2380. $6=_st(self["@selectedPackage"]).__eq(each);
  2381. if(smalltalk.assert($6)){
  2382. _st(li)._class_("selected");
  2383. };
  2384. $7=li;
  2385. _st($7)._with_(label);
  2386. $8=_st($7)._onClick_((function(){
  2387. return smalltalk.withContext(function($ctx4) { return _st(self)._selectCategory_(each);
  2388. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  2389. return $8;
  2390. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li,label:label},$ctx1)})});
  2391. return _st($3)._do_($4);
  2392. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})});
  2393. _st($1)._contents_($2);
  2394. return self}, function($ctx1) {$ctx1.fill(self,"updateCategoriesList",{}, smalltalk.Browser)})}
  2395. }),
  2396. smalltalk.Browser);
  2397. smalltalk.addMethod(
  2398. "_updateClassesList",
  2399. smalltalk.method({
  2400. selector: "updateClassesList",
  2401. fn: function (){
  2402. var self=this;
  2403. return smalltalk.withContext(function($ctx1) { _st(_st((smalltalk.TabManager || TabManager))._current())._update();
  2404. _st(self["@classesList"])._updateNodes();
  2405. return self}, function($ctx1) {$ctx1.fill(self,"updateClassesList",{}, smalltalk.Browser)})}
  2406. }),
  2407. smalltalk.Browser);
  2408. smalltalk.addMethod(
  2409. "_updateMethodsList",
  2410. smalltalk.method({
  2411. selector: "updateMethodsList",
  2412. fn: function (){
  2413. var self=this;
  2414. return smalltalk.withContext(function($ctx1) { var $1,$3,$5,$6,$7,$4,$2;
  2415. $1=self["@methodsList"];
  2416. $2=(function(html){
  2417. return smalltalk.withContext(function($ctx2) { $3=_st(self)._methods();
  2418. $4=(function(each){
  2419. var li;
  2420. return smalltalk.withContext(function($ctx3) { li=_st(html)._li();
  2421. li;
  2422. $5=_st(self["@selectedMethod"]).__eq(each);
  2423. if(smalltalk.assert($5)){
  2424. _st(li)._class_("selected");
  2425. };
  2426. $6=li;
  2427. _st($6)._with_(_st(each)._selector());
  2428. $7=_st($6)._onClick_((function(){
  2429. return smalltalk.withContext(function($ctx4) { return _st(self)._selectMethod_(each);
  2430. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  2431. return $7;
  2432. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})});
  2433. return _st($3)._do_($4);
  2434. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})});
  2435. _st($1)._contents_($2);
  2436. return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsList",{}, smalltalk.Browser)})}
  2437. }),
  2438. smalltalk.Browser);
  2439. smalltalk.addMethod(
  2440. "_updateProtocolsList",
  2441. smalltalk.method({
  2442. selector: "updateProtocolsList",
  2443. fn: function (){
  2444. var self=this;
  2445. return smalltalk.withContext(function($ctx1) { var $1,$3,$5,$6,$7,$4,$2;
  2446. $1=self["@protocolsList"];
  2447. $2=(function(html){
  2448. return smalltalk.withContext(function($ctx2) { $3=_st(self)._protocols();
  2449. $4=(function(each){
  2450. var li;
  2451. return smalltalk.withContext(function($ctx3) { li=_st(html)._li();
  2452. li;
  2453. $5=_st(self["@selectedProtocol"]).__eq(each);
  2454. if(smalltalk.assert($5)){
  2455. _st(li)._class_("selected");
  2456. };
  2457. $6=li;
  2458. _st($6)._with_(each);
  2459. $7=_st($6)._onClick_((function(){
  2460. return smalltalk.withContext(function($ctx4) { return _st(self)._selectProtocol_(each);
  2461. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  2462. return $7;
  2463. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})});
  2464. return _st($3)._do_($4);
  2465. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})});
  2466. _st($1)._contents_($2);
  2467. return self}, function($ctx1) {$ctx1.fill(self,"updateProtocolsList",{}, smalltalk.Browser)})}
  2468. }),
  2469. smalltalk.Browser);
  2470. smalltalk.addMethod(
  2471. "_updateSourceAndButtons",
  2472. smalltalk.method({
  2473. selector: "updateSourceAndButtons",
  2474. fn: function (){
  2475. var self=this;
  2476. var currentProtocol;
  2477. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$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;
  2478. _st(self)._disableSaveButton();
  2479. _st(self["@classButtons"])._contents_((function(html){
  2480. return smalltalk.withContext(function($ctx2) { $1=_st(html)._button();
  2481. _st($1)._title_("Create a new class");
  2482. _st($1)._onClick_((function(){
  2483. return smalltalk.withContext(function($ctx3) { return _st(self)._addNewClass();
  2484. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2485. $2=_st($1)._with_("New class");
  2486. $2;
  2487. $3=_st(html)._button();
  2488. _st($3)._with_("Rename class");
  2489. $4=_st($3)._onClick_((function(){
  2490. return smalltalk.withContext(function($ctx3) { return _st(self)._renameClass();
  2491. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2492. $4;
  2493. $5=_st(html)._button();
  2494. _st($5)._with_("Copy class");
  2495. $6=_st($5)._onClick_((function(){
  2496. return smalltalk.withContext(function($ctx3) { return _st(self)._copyClass();
  2497. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2498. $6;
  2499. $7=_st(html)._button();
  2500. _st($7)._with_("Remove class");
  2501. $8=_st($7)._onClick_((function(){
  2502. return smalltalk.withContext(function($ctx3) { return _st(self)._removeClass();
  2503. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2504. $8;
  2505. $9=_st(html)._button();
  2506. _st($9)._with_("References");
  2507. $10=_st($9)._onClick_((function(){
  2508. return smalltalk.withContext(function($ctx3) { return _st(self)._searchClassReferences();
  2509. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2510. return $10;
  2511. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  2512. $11=self["@methodButtons"];
  2513. $12=(function(html){
  2514. var protocolSelect,referencesSelect;
  2515. return smalltalk.withContext(function($ctx2) { $13=_st(html)._button();
  2516. _st($13)._with_("Remove method");
  2517. $14=_st($13)._onClick_((function(){
  2518. return smalltalk.withContext(function($ctx3) { return _st(self)._removeMethod();
  2519. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2520. $14;
  2521. protocolSelect=_st(html)._select();
  2522. protocolSelect;
  2523. $15=protocolSelect;
  2524. _st($15)._onChange_((function(){
  2525. return smalltalk.withContext(function($ctx3) { return _st(self)._setMethodProtocol_(_st(_st(protocolSelect)._asJQuery())._val());
  2526. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2527. $17=$15;
  2528. $18=(function(){
  2529. return smalltalk.withContext(function($ctx3) { $19=_st(html)._option();
  2530. _st($19)._with_("Method protocol");
  2531. $20=_st($19)._at_put_("disabled","disabled");
  2532. $20;
  2533. $21=_st(html)._option();
  2534. _st($21)._class_("important");
  2535. $22=_st($21)._with_("New...");
  2536. $22;
  2537. currentProtocol=self["@selectedProtocol"];
  2538. currentProtocol;
  2539. $23=_st(_st(currentProtocol)._isNil())._and_((function(){
  2540. return smalltalk.withContext(function($ctx4) { return _st(self["@selectedMethod"])._notNil();
  2541. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  2542. if(smalltalk.assert($23)){
  2543. currentProtocol=_st(self["@selectedMethod"])._category();
  2544. currentProtocol;
  2545. };
  2546. $24=_st(self)._protocols();
  2547. $25=(function(each){
  2548. return smalltalk.withContext(function($ctx4) { option=_st(_st(html)._option())._with_(each);
  2549. option;
  2550. $26=_st(currentProtocol).__eq(each);
  2551. if(smalltalk.assert($26)){
  2552. return _st(option)._at_put_("selected","selected");
  2553. };
  2554. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})});
  2555. return _st($24)._do_($25);
  2556. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
  2557. $16=_st($17)._with_($18);
  2558. $16;
  2559. $27=_st(self["@selectedMethod"])._isNil();
  2560. if(! smalltalk.assert($27)){
  2561. referencesSelect=_st(html)._select();
  2562. referencesSelect;
  2563. $28=referencesSelect;
  2564. _st($28)._onChange_((function(){
  2565. return smalltalk.withContext(function($ctx3) { return _st(self)._searchReferencesOf_(_st(_st(referencesSelect)._asJQuery())._val());
  2566. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2567. $29=_st($28)._with_((function(){
  2568. var option;
  2569. return smalltalk.withContext(function($ctx3) { $30=_st(html)._option();
  2570. _st($30)._with_("References");
  2571. _st($30)._at_put_("disabled","disabled");
  2572. $31=_st($30)._at_put_("selected","selected");
  2573. $31;
  2574. $32=_st(html)._option();
  2575. _st($32)._class_("important");
  2576. $33=_st($32)._with_(_st(self["@selectedMethod"])._selector());
  2577. $33;
  2578. return _st(_st(_st(self["@selectedMethod"])._messageSends())._sorted())._do_((function(each){
  2579. return smalltalk.withContext(function($ctx4) { return _st(_st(html)._option())._with_(each);
  2580. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})}));
  2581. }, function($ctx3) {$ctx3.fillBlock({option:option},$ctx1)})}));
  2582. return $29;
  2583. };
  2584. }, function($ctx2) {$ctx2.fillBlock({html:html,protocolSelect:protocolSelect,referencesSelect:referencesSelect},$ctx1)})});
  2585. _st($11)._contents_($12);
  2586. $34=_st(self["@selectedMethod"])._isNil();
  2587. $35=(function(){
  2588. return smalltalk.withContext(function($ctx2) { _st(self)._hideMethodButtons();
  2589. $36=_st(_st(self["@selectedClass"])._isNil())._or_((function(){
  2590. return smalltalk.withContext(function($ctx3) { return _st(self["@selectedProtocol"])._notNil();
  2591. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2592. if(smalltalk.assert($36)){
  2593. return _st(self)._hideClassButtons();
  2594. } else {
  2595. return _st(self)._showClassButtons();
  2596. };
  2597. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  2598. _st($34)._ifTrue_ifFalse_($35,(function(){
  2599. return smalltalk.withContext(function($ctx2) { _st(self)._hideClassButtons();
  2600. return _st(self)._showMethodButtons();
  2601. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2602. _st(self["@sourceArea"])._val_(_st(self)._source());
  2603. return self}, function($ctx1) {$ctx1.fill(self,"updateSourceAndButtons",{currentProtocol:currentProtocol}, smalltalk.Browser)})}
  2604. }),
  2605. smalltalk.Browser);
  2606. smalltalk.addMethod(
  2607. "_updateStatus",
  2608. smalltalk.method({
  2609. selector: "updateStatus",
  2610. fn: function (){
  2611. var self=this;
  2612. return smalltalk.withContext(function($ctx1) { var $1,$3,$2,$5,$4;
  2613. $1=_st(_st(self["@sourceArea"])._val()).__eq(_st(self)._source());
  2614. $2=(function(){
  2615. return smalltalk.withContext(function($ctx2) { $3=self["@saveButton"];
  2616. if(($receiver = $3) == nil || $receiver == undefined){
  2617. $3;
  2618. } else {
  2619. _st(self["@saveButton"])._at_put_("disabled",true);
  2620. };
  2621. self["@unsavedChanges"]=false;
  2622. return self["@unsavedChanges"];
  2623. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  2624. $4=(function(){
  2625. return smalltalk.withContext(function($ctx2) { $5=self["@saveButton"];
  2626. if(($receiver = $5) == nil || $receiver == undefined){
  2627. $5;
  2628. } else {
  2629. _st(self["@saveButton"])._removeAt_("disabled");
  2630. };
  2631. self["@unsavedChanges"]=true;
  2632. return self["@unsavedChanges"];
  2633. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  2634. _st($1)._ifTrue_ifFalse_($2,$4);
  2635. return self}, function($ctx1) {$ctx1.fill(self,"updateStatus",{}, smalltalk.Browser)})}
  2636. }),
  2637. smalltalk.Browser);
  2638. smalltalk.addMethod(
  2639. "_updateTabsList",
  2640. smalltalk.method({
  2641. selector: "updateTabsList",
  2642. fn: function (){
  2643. var self=this;
  2644. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$2;
  2645. $1=self["@tabsList"];
  2646. $2=(function(html){
  2647. var li;
  2648. return smalltalk.withContext(function($ctx2) { li=_st(html)._li();
  2649. li;
  2650. $3=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("instance"));
  2651. if(smalltalk.assert($3)){
  2652. _st(li)._class_("selected");
  2653. };
  2654. $4=li;
  2655. _st($4)._with_((function(){
  2656. return smalltalk.withContext(function($ctx3) { _st(_st(html)._span())._class_("ltab");
  2657. $5=_st(html)._span();
  2658. _st($5)._class_("mtab");
  2659. $6=_st($5)._with_("Instance");
  2660. $6;
  2661. return _st(_st(html)._span())._class_("rtab");
  2662. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2663. $7=_st($4)._onClick_((function(){
  2664. return smalltalk.withContext(function($ctx3) { return _st(self)._selectTab_(smalltalk.symbolFor("instance"));
  2665. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2666. $7;
  2667. li=_st(html)._li();
  2668. li;
  2669. $8=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("class"));
  2670. if(smalltalk.assert($8)){
  2671. _st(li)._class_("selected");
  2672. };
  2673. $9=li;
  2674. _st($9)._with_((function(){
  2675. return smalltalk.withContext(function($ctx3) { _st(_st(html)._span())._class_("ltab");
  2676. $10=_st(html)._span();
  2677. _st($10)._class_("mtab");
  2678. $11=_st($10)._with_("Class");
  2679. $11;
  2680. return _st(_st(html)._span())._class_("rtab");
  2681. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2682. $12=_st($9)._onClick_((function(){
  2683. return smalltalk.withContext(function($ctx3) { return _st(self)._selectTab_(smalltalk.symbolFor("class"));
  2684. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2685. $12;
  2686. li=_st(html)._li();
  2687. li;
  2688. $13=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("comment"));
  2689. if(smalltalk.assert($13)){
  2690. _st(li)._class_("selected");
  2691. };
  2692. $14=li;
  2693. _st($14)._with_((function(){
  2694. return smalltalk.withContext(function($ctx3) { _st(_st(html)._span())._class_("ltab");
  2695. $15=_st(html)._span();
  2696. _st($15)._class_("mtab");
  2697. $16=_st($15)._with_("Comment");
  2698. $16;
  2699. return _st(_st(html)._span())._class_("rtab");
  2700. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2701. $17=_st($14)._onClick_((function(){
  2702. return smalltalk.withContext(function($ctx3) { return _st(self)._selectTab_(smalltalk.symbolFor("comment"));
  2703. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2704. return $17;
  2705. }, function($ctx2) {$ctx2.fillBlock({html:html,li:li},$ctx1)})});
  2706. _st($1)._contents_($2);
  2707. return self}, function($ctx1) {$ctx1.fill(self,"updateTabsList",{}, smalltalk.Browser)})}
  2708. }),
  2709. smalltalk.Browser);
  2710. smalltalk.addMethod(
  2711. "_open",
  2712. smalltalk.method({
  2713. selector: "open",
  2714. fn: function (){
  2715. var self=this;
  2716. return smalltalk.withContext(function($ctx1) { _st(_st(self)._new())._open();
  2717. return self}, function($ctx1) {$ctx1.fill(self,"open",{}, smalltalk.Browser.klass)})}
  2718. }),
  2719. smalltalk.Browser.klass);
  2720. smalltalk.addMethod(
  2721. "_openOn_",
  2722. smalltalk.method({
  2723. selector: "openOn:",
  2724. fn: function (aClass){
  2725. var self=this;
  2726. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  2727. $2=_st(self)._new();
  2728. _st($2)._open();
  2729. _st($2)._selectCategory_(_st(aClass)._category());
  2730. $3=_st($2)._selectClass_(aClass);
  2731. $1=$3;
  2732. return $1;
  2733. }, function($ctx1) {$ctx1.fill(self,"openOn:",{aClass:aClass}, smalltalk.Browser.klass)})}
  2734. }),
  2735. smalltalk.Browser.klass);
  2736. smalltalk.addClass('Debugger', smalltalk.TabWidget, ['error', 'selectedContext', 'sourceArea', 'ul', 'ul2', 'inspector', 'saveButton', 'unsavedChanges', 'selectedVariable', 'selectedVariableName', 'inspectButton'], 'IDE');
  2737. smalltalk.addMethod(
  2738. "_allVariables",
  2739. smalltalk.method({
  2740. selector: "allVariables",
  2741. fn: function (){
  2742. var self=this;
  2743. var all;
  2744. return smalltalk.withContext(function($ctx1) { var $1;
  2745. all=_st((smalltalk.Dictionary || Dictionary))._new();
  2746. _st(_st(_st(_st(self)._receiver())._class())._allInstanceVariableNames())._do_((function(each){
  2747. return smalltalk.withContext(function($ctx2) { return _st(all)._at_put_(each,_st(_st(self)._receiver())._instVarAt_(each));
  2748. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2749. _st(_st(self["@selectedContext"])._locals())._keysAndValuesDo_((function(key,value){
  2750. return smalltalk.withContext(function($ctx2) { return _st(all)._at_put_(key,value);
  2751. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1)})}));
  2752. $1=all;
  2753. return $1;
  2754. }, function($ctx1) {$ctx1.fill(self,"allVariables",{all:all}, smalltalk.Debugger)})}
  2755. }),
  2756. smalltalk.Debugger);
  2757. smalltalk.addMethod(
  2758. "_canBeClosed",
  2759. smalltalk.method({
  2760. selector: "canBeClosed",
  2761. fn: function (){
  2762. var self=this;
  2763. return smalltalk.withContext(function($ctx1) { return true;
  2764. }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{}, smalltalk.Debugger)})}
  2765. }),
  2766. smalltalk.Debugger);
  2767. smalltalk.addMethod(
  2768. "_error",
  2769. smalltalk.method({
  2770. selector: "error",
  2771. fn: function (){
  2772. var self=this;
  2773. return smalltalk.withContext(function($ctx1) { var $1;
  2774. $1=self["@error"];
  2775. return $1;
  2776. }, function($ctx1) {$ctx1.fill(self,"error",{}, smalltalk.Debugger)})}
  2777. }),
  2778. smalltalk.Debugger);
  2779. smalltalk.addMethod(
  2780. "_error_",
  2781. smalltalk.method({
  2782. selector: "error:",
  2783. fn: function (anError){
  2784. var self=this;
  2785. return smalltalk.withContext(function($ctx1) { self["@error"]=anError;
  2786. return self}, function($ctx1) {$ctx1.fill(self,"error:",{anError:anError}, smalltalk.Debugger)})}
  2787. }),
  2788. smalltalk.Debugger);
  2789. smalltalk.addMethod(
  2790. "_initialize",
  2791. smalltalk.method({
  2792. selector: "initialize",
  2793. fn: function (){
  2794. var self=this;
  2795. return smalltalk.withContext(function($ctx1) { smalltalk.TabWidget.fn.prototype._initialize.apply(_st(self), []);
  2796. _st(self["@unsavedChanges"]).__eq(false);
  2797. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.Debugger)})}
  2798. }),
  2799. smalltalk.Debugger);
  2800. smalltalk.addMethod(
  2801. "_inspectSelectedVariable",
  2802. smalltalk.method({
  2803. selector: "inspectSelectedVariable",
  2804. fn: function (){
  2805. var self=this;
  2806. return smalltalk.withContext(function($ctx1) { _st(self["@selectedVariable"])._inspect();
  2807. return self}, function($ctx1) {$ctx1.fill(self,"inspectSelectedVariable",{}, smalltalk.Debugger)})}
  2808. }),
  2809. smalltalk.Debugger);
  2810. smalltalk.addMethod(
  2811. "_label",
  2812. smalltalk.method({
  2813. selector: "label",
  2814. fn: function (){
  2815. var self=this;
  2816. return smalltalk.withContext(function($ctx1) { return "[Debugger]";
  2817. }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.Debugger)})}
  2818. }),
  2819. smalltalk.Debugger);
  2820. smalltalk.addMethod(
  2821. "_method",
  2822. smalltalk.method({
  2823. selector: "method",
  2824. fn: function (){
  2825. var self=this;
  2826. return smalltalk.withContext(function($ctx1) { var $1;
  2827. $1=_st(self["@selectedContext"])._method();
  2828. return $1;
  2829. }, function($ctx1) {$ctx1.fill(self,"method",{}, smalltalk.Debugger)})}
  2830. }),
  2831. smalltalk.Debugger);
  2832. smalltalk.addMethod(
  2833. "_proceed",
  2834. smalltalk.method({
  2835. selector: "proceed",
  2836. fn: function (){
  2837. var self=this;
  2838. return smalltalk.withContext(function($ctx1) { _st(self)._close();
  2839. _st(_st(self["@selectedContext"])._receiver())._perform_withArguments_(_st(self["@selectedContext"])._selector(),_st(self["@selectedContext"])._temps());
  2840. return self}, function($ctx1) {$ctx1.fill(self,"proceed",{}, smalltalk.Debugger)})}
  2841. }),
  2842. smalltalk.Debugger);
  2843. smalltalk.addMethod(
  2844. "_receiver",
  2845. smalltalk.method({
  2846. selector: "receiver",
  2847. fn: function (){
  2848. var self=this;
  2849. return smalltalk.withContext(function($ctx1) { var $1;
  2850. $1=_st(self["@selectedContext"])._receiver();
  2851. return $1;
  2852. }, function($ctx1) {$ctx1.fill(self,"receiver",{}, smalltalk.Debugger)})}
  2853. }),
  2854. smalltalk.Debugger);
  2855. smalltalk.addMethod(
  2856. "_renderBottomPanelOn_",
  2857. smalltalk.method({
  2858. selector: "renderBottomPanelOn:",
  2859. fn: function (html){
  2860. var self=this;
  2861. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2862. $1=_st(html)._div();
  2863. _st($1)._class_("amber_sourceCode debugger");
  2864. $2=_st($1)._with_((function(){
  2865. return smalltalk.withContext(function($ctx2) { self["@sourceArea"]=_st((smalltalk.SourceArea || SourceArea))._new();
  2866. self["@sourceArea"];
  2867. return _st(self["@sourceArea"])._renderOn_(html);
  2868. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2869. self["@ul2"]=_st(_st(html)._ul())._class_("amber_column debugger variables");
  2870. self["@inspector"]=_st(_st(html)._div())._class_("amber_column debugger inspector");
  2871. _st(self["@sourceArea"])._onKeyUp_((function(){
  2872. return smalltalk.withContext(function($ctx2) { return _st(self)._updateStatus();
  2873. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2874. return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html}, smalltalk.Debugger)})}
  2875. }),
  2876. smalltalk.Debugger);
  2877. smalltalk.addMethod(
  2878. "_renderBoxOn_",
  2879. smalltalk.method({
  2880. selector: "renderBoxOn:",
  2881. fn: function (html){
  2882. var self=this;
  2883. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2884. $1=self;
  2885. _st($1)._renderTopPanelOn_(html);
  2886. $2=_st($1)._renderBottomPanelOn_(html);
  2887. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html}, smalltalk.Debugger)})}
  2888. }),
  2889. smalltalk.Debugger);
  2890. smalltalk.addMethod(
  2891. "_renderButtonsOn_",
  2892. smalltalk.method({
  2893. selector: "renderButtonsOn:",
  2894. fn: function (html){
  2895. var self=this;
  2896. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16;
  2897. $1=_st(html)._button();
  2898. _st($1)._with_("Save");
  2899. $2=_st($1)._onClick_((function(){
  2900. return smalltalk.withContext(function($ctx2) { return _st(self)._save();
  2901. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2902. self["@saveButton"]=$2;
  2903. $3=_st(html)._button();
  2904. _st($3)._with_("DoIt");
  2905. $4=_st($3)._onClick_((function(){
  2906. return smalltalk.withContext(function($ctx2) { return _st(self["@sourceArea"])._doIt();
  2907. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2908. $5=_st(html)._button();
  2909. _st($5)._with_("PrintIt");
  2910. $6=_st($5)._onClick_((function(){
  2911. return smalltalk.withContext(function($ctx2) { return _st(self["@sourceArea"])._printIt();
  2912. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2913. $7=_st(html)._button();
  2914. _st($7)._with_("InspectIt");
  2915. $8=_st($7)._onClick_((function(){
  2916. return smalltalk.withContext(function($ctx2) { return _st(self["@sourceArea"])._inspectIt();
  2917. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2918. $9=_st(html)._button();
  2919. _st($9)._with_("Proceed");
  2920. $10=_st($9)._onClick_((function(){
  2921. return smalltalk.withContext(function($ctx2) { return _st(self)._proceed();
  2922. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2923. $11=_st(html)._button();
  2924. _st($11)._with_("Abandon");
  2925. $12=_st($11)._onClick_((function(){
  2926. return smalltalk.withContext(function($ctx2) { return _st(self)._close();
  2927. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2928. $13=_st(html)._button();
  2929. _st($13)._class_("amber_button debugger inspect");
  2930. _st($13)._with_("Inspect");
  2931. $14=_st($13)._onClick_((function(){
  2932. return smalltalk.withContext(function($ctx2) { return _st(self)._inspectSelectedVariable();
  2933. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2934. self["@inspectButton"]=$14;
  2935. $15=self;
  2936. _st($15)._updateSourceArea();
  2937. _st($15)._updateStatus();
  2938. _st($15)._updateVariablesList();
  2939. $16=_st($15)._updateInspector();
  2940. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.Debugger)})}
  2941. }),
  2942. smalltalk.Debugger);
  2943. smalltalk.addMethod(
  2944. "_renderContext_on_",
  2945. smalltalk.method({
  2946. selector: "renderContext:on:",
  2947. fn: function (aContext,html){
  2948. var self=this;
  2949. var li;
  2950. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  2951. li=_st(html)._li();
  2952. $1=_st(self["@selectedContext"]).__eq(aContext);
  2953. if(smalltalk.assert($1)){
  2954. _st(li)._class_("selected");
  2955. };
  2956. $2=li;
  2957. _st($2)._with_(_st(aContext)._asString());
  2958. $3=_st($2)._onClick_((function(){
  2959. return smalltalk.withContext(function($ctx2) { return _st(self)._selectContext_(aContext);
  2960. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2961. $4=_st(aContext)._outerContext();
  2962. if(($receiver = $4) == nil || $receiver == undefined){
  2963. $4;
  2964. } else {
  2965. _st(self)._renderContext_on_(_st(aContext)._outerContext(),html);
  2966. };
  2967. return self}, function($ctx1) {$ctx1.fill(self,"renderContext:on:",{aContext:aContext,html:html,li:li}, smalltalk.Debugger)})}
  2968. }),
  2969. smalltalk.Debugger);
  2970. smalltalk.addMethod(
  2971. "_renderTopPanelOn_",
  2972. smalltalk.method({
  2973. selector: "renderTopPanelOn:",
  2974. fn: function (html){
  2975. var self=this;
  2976. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$6,$2;
  2977. self["@selectedContext"]=_st(_st(self)._error())._context();
  2978. $1=_st(html)._div();
  2979. _st($1)._class_("top");
  2980. $2=_st($1)._with_((function(){
  2981. return smalltalk.withContext(function($ctx2) { $3=_st(html)._div();
  2982. _st($3)._class_("label");
  2983. $4=_st($3)._with_(_st(_st(self)._error())._messageText());
  2984. $4;
  2985. $5=_st(html)._ul();
  2986. _st($5)._class_("amber_column debugger contexts");
  2987. $6=_st($5)._with_((function(){
  2988. return smalltalk.withContext(function($ctx3) { return _st(self)._renderContext_on_(_st(_st(self)._error())._context(),html);
  2989. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2990. self["@ul"]=$6;
  2991. return self["@ul"];
  2992. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2993. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html}, smalltalk.Debugger)})}
  2994. }),
  2995. smalltalk.Debugger);
  2996. smalltalk.addMethod(
  2997. "_save",
  2998. smalltalk.method({
  2999. selector: "save",
  3000. fn: function (){
  3001. var self=this;
  3002. var protocol;
  3003. return smalltalk.withContext(function($ctx1) { protocol=_st(_st(_st(_st(_st(self["@selectedContext"])._receiver())._class())._methodDictionary())._at_(_st(self["@selectedContext"])._selector()))._category();
  3004. _st(_st(_st(self["@selectedContext"])._receiver())._class())._compile_category_(_st(self["@sourceArea"])._val(),protocol);
  3005. _st(self)._updateStatus();
  3006. return self}, function($ctx1) {$ctx1.fill(self,"save",{protocol:protocol}, smalltalk.Debugger)})}
  3007. }),
  3008. smalltalk.Debugger);
  3009. smalltalk.addMethod(
  3010. "_selectContext_",
  3011. smalltalk.method({
  3012. selector: "selectContext:",
  3013. fn: function (aContext){
  3014. var self=this;
  3015. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3016. self["@selectedContext"]=aContext;
  3017. self["@selectedVariable"]=nil;
  3018. self["@selectedVariableName"]=nil;
  3019. $1=self;
  3020. _st($1)._updateContextsList();
  3021. _st($1)._updateSourceArea();
  3022. _st($1)._updateInspector();
  3023. _st($1)._updateVariablesList();
  3024. $2=_st($1)._updateStatus();
  3025. return self}, function($ctx1) {$ctx1.fill(self,"selectContext:",{aContext:aContext}, smalltalk.Debugger)})}
  3026. }),
  3027. smalltalk.Debugger);
  3028. smalltalk.addMethod(
  3029. "_selectVariable_named_",
  3030. smalltalk.method({
  3031. selector: "selectVariable:named:",
  3032. fn: function (anObject,aString){
  3033. var self=this;
  3034. return smalltalk.withContext(function($ctx1) { self["@selectedVariable"]=anObject;
  3035. self["@selectedVariableName"]=aString;
  3036. _st(self["@inspector"])._contents_((function(html){
  3037. return smalltalk.withContext(function($ctx2) { return _st(html)._with_(_st(anObject)._printString());
  3038. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  3039. _st(self)._updateVariablesList();
  3040. return self}, function($ctx1) {$ctx1.fill(self,"selectVariable:named:",{anObject:anObject,aString:aString}, smalltalk.Debugger)})}
  3041. }),
  3042. smalltalk.Debugger);
  3043. smalltalk.addMethod(
  3044. "_source",
  3045. smalltalk.method({
  3046. selector: "source",
  3047. fn: function (){
  3048. var self=this;
  3049. return smalltalk.withContext(function($ctx1) { var $2,$1;
  3050. $2=_st(self)._method();
  3051. if(($receiver = $2) == nil || $receiver == undefined){
  3052. $1="Method doesn't exist!";
  3053. } else {
  3054. $1=_st(_st(self)._method())._source();
  3055. };
  3056. return $1;
  3057. }, function($ctx1) {$ctx1.fill(self,"source",{}, smalltalk.Debugger)})}
  3058. }),
  3059. smalltalk.Debugger);
  3060. smalltalk.addMethod(
  3061. "_updateContextsList",
  3062. smalltalk.method({
  3063. selector: "updateContextsList",
  3064. fn: function (){
  3065. var self=this;
  3066. return smalltalk.withContext(function($ctx1) { _st(self["@ul"])._contents_((function(html){
  3067. return smalltalk.withContext(function($ctx2) { return _st(self)._renderContext_on_(_st(_st(self)._error())._context(),html);
  3068. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  3069. return self}, function($ctx1) {$ctx1.fill(self,"updateContextsList",{}, smalltalk.Debugger)})}
  3070. }),
  3071. smalltalk.Debugger);
  3072. smalltalk.addMethod(
  3073. "_updateInspector",
  3074. smalltalk.method({
  3075. selector: "updateInspector",
  3076. fn: function (){
  3077. var self=this;
  3078. return smalltalk.withContext(function($ctx1) { _st(self["@inspector"])._contents_((function(html){
  3079. return smalltalk.withContext(function($ctx2) { }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  3080. return self}, function($ctx1) {$ctx1.fill(self,"updateInspector",{}, smalltalk.Debugger)})}
  3081. }),
  3082. smalltalk.Debugger);
  3083. smalltalk.addMethod(
  3084. "_updateSourceArea",
  3085. smalltalk.method({
  3086. selector: "updateSourceArea",
  3087. fn: function (){
  3088. var self=this;
  3089. return smalltalk.withContext(function($ctx1) { _st(self["@sourceArea"])._val_(_st(self)._source());
  3090. return self}, function($ctx1) {$ctx1.fill(self,"updateSourceArea",{}, smalltalk.Debugger)})}
  3091. }),
  3092. smalltalk.Debugger);
  3093. smalltalk.addMethod(
  3094. "_updateStatus",
  3095. smalltalk.method({
  3096. selector: "updateStatus",
  3097. fn: function (){
  3098. var self=this;
  3099. return smalltalk.withContext(function($ctx1) { var $1,$3,$2,$5,$4;
  3100. $1=_st(_st(self["@sourceArea"])._val()).__eq(_st(self)._source());
  3101. $2=(function(){
  3102. return smalltalk.withContext(function($ctx2) { $3=self["@saveButton"];
  3103. if(($receiver = $3) == nil || $receiver == undefined){
  3104. $3;
  3105. } else {
  3106. _st(self["@saveButton"])._at_put_("disabled",true);
  3107. };
  3108. self["@unsavedChanges"]=false;
  3109. return self["@unsavedChanges"];
  3110. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  3111. $4=(function(){
  3112. return smalltalk.withContext(function($ctx2) { $5=self["@saveButton"];
  3113. if(($receiver = $5) == nil || $receiver == undefined){
  3114. $5;
  3115. } else {
  3116. _st(self["@saveButton"])._removeAt_("disabled");
  3117. };
  3118. self["@unsavedChanges"]=true;
  3119. return self["@unsavedChanges"];
  3120. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  3121. _st($1)._ifTrue_ifFalse_($2,$4);
  3122. return self}, function($ctx1) {$ctx1.fill(self,"updateStatus",{}, smalltalk.Debugger)})}
  3123. }),
  3124. smalltalk.Debugger);
  3125. smalltalk.addMethod(
  3126. "_updateVariablesList",
  3127. smalltalk.method({
  3128. selector: "updateVariablesList",
  3129. fn: function (){
  3130. var self=this;
  3131. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$6,$8,$9,$10,$7,$2,$11;
  3132. $1=self["@ul2"];
  3133. $2=(function(html){
  3134. var li;
  3135. return smalltalk.withContext(function($ctx2) { $3=_st(html)._li();
  3136. _st($3)._with_("self");
  3137. $4=_st($3)._onClick_((function(){
  3138. return smalltalk.withContext(function($ctx3) { return _st(self)._selectVariable_named_(_st(self)._receiver(),"self");
  3139. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  3140. li=$4;
  3141. li;
  3142. $5=_st(self["@selectedVariableName"]).__eq("self");
  3143. if(smalltalk.assert($5)){
  3144. _st(li)._class_("selected");
  3145. };
  3146. $6=_st(self)._allVariables();
  3147. $7=(function(key,value){
  3148. return smalltalk.withContext(function($ctx3) { $8=_st(html)._li();
  3149. _st($8)._with_(key);
  3150. $9=_st($8)._onClick_((function(){
  3151. return smalltalk.withContext(function($ctx4) { return _st(self)._selectVariable_named_(value,key);
  3152. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  3153. li=$9;
  3154. li;
  3155. $10=_st(self["@selectedVariableName"]).__eq(key);
  3156. if(smalltalk.assert($10)){
  3157. return _st(li)._class_("selected");
  3158. };
  3159. }, function($ctx3) {$ctx3.fillBlock({key:key,value:value},$ctx1)})});
  3160. return _st($6)._keysAndValuesDo_($7);
  3161. }, function($ctx2) {$ctx2.fillBlock({html:html,li:li},$ctx1)})});
  3162. _st($1)._contents_($2);
  3163. $11=self["@selectedVariable"];
  3164. if(($receiver = $11) == nil || $receiver == undefined){
  3165. _st(self["@inspectButton"])._at_put_("disabled",true);
  3166. } else {
  3167. _st(self["@inspectButton"])._removeAt_("disabled");
  3168. };
  3169. return self}, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{}, smalltalk.Debugger)})}
  3170. }),
  3171. smalltalk.Debugger);
  3172. smalltalk.addClass('IDETranscript', smalltalk.TabWidget, ['textarea'], 'IDE');
  3173. smalltalk.addMethod(
  3174. "_clear",
  3175. smalltalk.method({
  3176. selector: "clear",
  3177. fn: function (){
  3178. var self=this;
  3179. return smalltalk.withContext(function($ctx1) { _st(_st(self["@textarea"])._asJQuery())._val_("");
  3180. return self}, function($ctx1) {$ctx1.fill(self,"clear",{}, smalltalk.IDETranscript)})}
  3181. }),
  3182. smalltalk.IDETranscript);
  3183. smalltalk.addMethod(
  3184. "_cr",
  3185. smalltalk.method({
  3186. selector: "cr",
  3187. fn: function (){
  3188. var self=this;
  3189. return smalltalk.withContext(function($ctx1) { _st(_st(self["@textarea"])._asJQuery())._val_(_st(_st(_st(self["@textarea"])._asJQuery())._val()).__comma(_st((smalltalk.String || String))._cr()));
  3190. return self}, function($ctx1) {$ctx1.fill(self,"cr",{}, smalltalk.IDETranscript)})}
  3191. }),
  3192. smalltalk.IDETranscript);
  3193. smalltalk.addMethod(
  3194. "_label",
  3195. smalltalk.method({
  3196. selector: "label",
  3197. fn: function (){
  3198. var self=this;
  3199. return smalltalk.withContext(function($ctx1) { return "Transcript";
  3200. }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.IDETranscript)})}
  3201. }),
  3202. smalltalk.IDETranscript);
  3203. smalltalk.addMethod(
  3204. "_open",
  3205. smalltalk.method({
  3206. selector: "open",
  3207. fn: function (){
  3208. var self=this;
  3209. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3210. $1=_st((smalltalk.TabManager || TabManager))._current();
  3211. _st($1)._open();
  3212. $2=_st($1)._selectTab_(self);
  3213. return self}, function($ctx1) {$ctx1.fill(self,"open",{}, smalltalk.IDETranscript)})}
  3214. }),
  3215. smalltalk.IDETranscript);
  3216. smalltalk.addMethod(
  3217. "_renderBoxOn_",
  3218. smalltalk.method({
  3219. selector: "renderBoxOn:",
  3220. fn: function (html){
  3221. var self=this;
  3222. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3223. self["@textarea"]=_st(html)._textarea();
  3224. $1=self["@textarea"];
  3225. _st($1)._class_("amber_transcript");
  3226. $2=_st($1)._at_put_("spellcheck","false");
  3227. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html}, smalltalk.IDETranscript)})}
  3228. }),
  3229. smalltalk.IDETranscript);
  3230. smalltalk.addMethod(
  3231. "_renderButtonsOn_",
  3232. smalltalk.method({
  3233. selector: "renderButtonsOn:",
  3234. fn: function (html){
  3235. var self=this;
  3236. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3237. $1=_st(html)._button();
  3238. _st($1)._with_("Clear transcript");
  3239. $2=_st($1)._onClick_((function(){
  3240. return smalltalk.withContext(function($ctx2) { return _st(self)._clear();
  3241. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3242. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.IDETranscript)})}
  3243. }),
  3244. smalltalk.IDETranscript);
  3245. smalltalk.addMethod(
  3246. "_show_",
  3247. smalltalk.method({
  3248. selector: "show:",
  3249. fn: function (anObject){
  3250. var self=this;
  3251. return smalltalk.withContext(function($ctx1) { var $1;
  3252. $1=self["@textarea"];
  3253. if(($receiver = $1) == nil || $receiver == undefined){
  3254. _st(self)._open();
  3255. } else {
  3256. $1;
  3257. };
  3258. _st(_st(self["@textarea"])._asJQuery())._val_(_st(_st(_st(self["@textarea"])._asJQuery())._val()).__comma(_st(anObject)._asString()));
  3259. return self}, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject}, smalltalk.IDETranscript)})}
  3260. }),
  3261. smalltalk.IDETranscript);
  3262. smalltalk.IDETranscript.klass.iVarNames = ['current'];
  3263. smalltalk.addMethod(
  3264. "_current",
  3265. smalltalk.method({
  3266. selector: "current",
  3267. fn: function (){
  3268. var self=this;
  3269. return smalltalk.withContext(function($ctx1) { var $2,$1;
  3270. $2=self["@current"];
  3271. if(($receiver = $2) == nil || $receiver == undefined){
  3272. self["@current"]=smalltalk.TabWidget.klass.fn.prototype._new.apply(_st(self), []);
  3273. $1=self["@current"];
  3274. } else {
  3275. $1=$2;
  3276. };
  3277. return $1;
  3278. }, function($ctx1) {$ctx1.fill(self,"current",{}, smalltalk.IDETranscript.klass)})}
  3279. }),
  3280. smalltalk.IDETranscript.klass);
  3281. smalltalk.addMethod(
  3282. "_initialize",
  3283. smalltalk.method({
  3284. selector: "initialize",
  3285. fn: function (){
  3286. var self=this;
  3287. return smalltalk.withContext(function($ctx1) { _st((smalltalk.Transcript || Transcript))._register_(_st(self)._current());
  3288. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.IDETranscript.klass)})}
  3289. }),
  3290. smalltalk.IDETranscript.klass);
  3291. smalltalk.addMethod(
  3292. "_new",
  3293. smalltalk.method({
  3294. selector: "new",
  3295. fn: function (){
  3296. var self=this;
  3297. return smalltalk.withContext(function($ctx1) { _st(self)._shouldNotImplement();
  3298. return self}, function($ctx1) {$ctx1.fill(self,"new",{}, smalltalk.IDETranscript.klass)})}
  3299. }),
  3300. smalltalk.IDETranscript.klass);
  3301. smalltalk.addMethod(
  3302. "_open",
  3303. smalltalk.method({
  3304. selector: "open",
  3305. fn: function (){
  3306. var self=this;
  3307. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3308. $1=_st((smalltalk.TabManager || TabManager))._current();
  3309. _st($1)._open();
  3310. $2=_st($1)._selectTab_(_st(self)._current());
  3311. return self}, function($ctx1) {$ctx1.fill(self,"open",{}, smalltalk.IDETranscript.klass)})}
  3312. }),
  3313. smalltalk.IDETranscript.klass);
  3314. smalltalk.addClass('Inspector', smalltalk.TabWidget, ['label', 'variables', 'object', 'selectedVariable', 'variablesList', 'valueTextarea', 'diveButton', 'sourceArea'], 'IDE');
  3315. smalltalk.addMethod(
  3316. "_canBeClosed",
  3317. smalltalk.method({
  3318. selector: "canBeClosed",
  3319. fn: function (){
  3320. var self=this;
  3321. return smalltalk.withContext(function($ctx1) { return true;
  3322. }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{}, smalltalk.Inspector)})}
  3323. }),
  3324. smalltalk.Inspector);
  3325. smalltalk.addMethod(
  3326. "_dive",
  3327. smalltalk.method({
  3328. selector: "dive",
  3329. fn: function (){
  3330. var self=this;
  3331. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._variables())._at_(_st(self)._selectedVariable()))._inspect();
  3332. return self}, function($ctx1) {$ctx1.fill(self,"dive",{}, smalltalk.Inspector)})}
  3333. }),
  3334. smalltalk.Inspector);
  3335. smalltalk.addMethod(
  3336. "_inspect_",
  3337. smalltalk.method({
  3338. selector: "inspect:",
  3339. fn: function (anObject){
  3340. var self=this;
  3341. return smalltalk.withContext(function($ctx1) { self["@object"]=anObject;
  3342. self["@variables"]=[];
  3343. _st(self["@object"])._inspectOn_(self);
  3344. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject}, smalltalk.Inspector)})}
  3345. }),
  3346. smalltalk.Inspector);
  3347. smalltalk.addMethod(
  3348. "_label",
  3349. smalltalk.method({
  3350. selector: "label",
  3351. fn: function (){
  3352. var self=this;
  3353. return smalltalk.withContext(function($ctx1) { var $2,$1;
  3354. $2=self["@label"];
  3355. if(($receiver = $2) == nil || $receiver == undefined){
  3356. $1="Inspector (nil)";
  3357. } else {
  3358. $1=$2;
  3359. };
  3360. return $1;
  3361. }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.Inspector)})}
  3362. }),
  3363. smalltalk.Inspector);
  3364. smalltalk.addMethod(
  3365. "_refresh",
  3366. smalltalk.method({
  3367. selector: "refresh",
  3368. fn: function (){
  3369. var self=this;
  3370. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3371. $1=self;
  3372. _st($1)._inspect_(self["@object"]);
  3373. _st($1)._updateVariablesList();
  3374. $2=_st($1)._updateValueTextarea();
  3375. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{}, smalltalk.Inspector)})}
  3376. }),
  3377. smalltalk.Inspector);
  3378. smalltalk.addMethod(
  3379. "_renderBottomPanelOn_",
  3380. smalltalk.method({
  3381. selector: "renderBottomPanelOn:",
  3382. fn: function (html){
  3383. var self=this;
  3384. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$2;
  3385. $1=_st(html)._div();
  3386. _st($1)._class_("amber_sourceCode");
  3387. $2=_st($1)._with_((function(){
  3388. return smalltalk.withContext(function($ctx2) { $3=_st((smalltalk.SourceArea || SourceArea))._new();
  3389. _st($3)._receiver_(self["@object"]);
  3390. _st($3)._onDoIt_((function(){
  3391. return smalltalk.withContext(function($ctx3) { return _st(self)._refresh();
  3392. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  3393. $4=_st($3)._yourself();
  3394. self["@sourceArea"]=$4;
  3395. self["@sourceArea"];
  3396. return _st(self["@sourceArea"])._renderOn_(html);
  3397. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3398. return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html}, smalltalk.Inspector)})}
  3399. }),
  3400. smalltalk.Inspector);
  3401. smalltalk.addMethod(
  3402. "_renderBoxOn_",
  3403. smalltalk.method({
  3404. selector: "renderBoxOn:",
  3405. fn: function (html){
  3406. var self=this;
  3407. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3408. $1=self;
  3409. _st($1)._renderTopPanelOn_(html);
  3410. $2=_st($1)._renderBottomPanelOn_(html);
  3411. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html}, smalltalk.Inspector)})}
  3412. }),
  3413. smalltalk.Inspector);
  3414. smalltalk.addMethod(
  3415. "_renderButtonsOn_",
  3416. smalltalk.method({
  3417. selector: "renderButtonsOn:",
  3418. fn: function (html){
  3419. var self=this;
  3420. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6;
  3421. $1=_st(html)._button();
  3422. _st($1)._with_("DoIt");
  3423. $2=_st($1)._onClick_((function(){
  3424. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._sourceArea())._doIt();
  3425. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3426. $3=_st(html)._button();
  3427. _st($3)._with_("PrintIt");
  3428. $4=_st($3)._onClick_((function(){
  3429. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._sourceArea())._printIt();
  3430. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3431. $5=_st(html)._button();
  3432. _st($5)._with_("InspectIt");
  3433. $6=_st($5)._onClick_((function(){
  3434. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._sourceArea())._inspectIt();
  3435. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3436. _st(self)._updateButtons();
  3437. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.Inspector)})}
  3438. }),
  3439. smalltalk.Inspector);
  3440. smalltalk.addMethod(
  3441. "_renderTopPanelOn_",
  3442. smalltalk.method({
  3443. selector: "renderTopPanelOn:",
  3444. fn: function (html){
  3445. var self=this;
  3446. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$7,$8,$9,$10,$6,$2,$11,$12;
  3447. $1=_st(html)._div();
  3448. _st($1)._class_("top");
  3449. $2=_st($1)._with_((function(){
  3450. return smalltalk.withContext(function($ctx2) { self["@variablesList"]=_st(_st(html)._ul())._class_("amber_column variables");
  3451. self["@variablesList"];
  3452. $3=_st(html)._textarea();
  3453. _st($3)._class_("amber_column value");
  3454. $4=_st($3)._at_put_("readonly","readonly");
  3455. self["@valueTextarea"]=$4;
  3456. self["@valueTextarea"];
  3457. $5=_st(html)._div();
  3458. _st($5)._class_("amber_tabs inspector");
  3459. $6=_st($5)._with_((function(){
  3460. return smalltalk.withContext(function($ctx3) { $7=_st(html)._button();
  3461. _st($7)._class_("amber_button inspector refresh");
  3462. _st($7)._with_("Refresh");
  3463. $8=_st($7)._onClick_((function(){
  3464. return smalltalk.withContext(function($ctx4) { return _st(self)._refresh();
  3465. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  3466. $8;
  3467. $9=_st(html)._button();
  3468. _st($9)._class_("amber_button inspector dive");
  3469. _st($9)._with_("Dive");
  3470. $10=_st($9)._onClick_((function(){
  3471. return smalltalk.withContext(function($ctx4) { return _st(self)._dive();
  3472. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  3473. self["@diveButton"]=$10;
  3474. return self["@diveButton"];
  3475. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  3476. $6;
  3477. return _st(_st(html)._div())._class_("amber_clear");
  3478. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3479. $11=self;
  3480. _st($11)._updateVariablesList();
  3481. $12=_st($11)._updateValueTextarea();
  3482. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html}, smalltalk.Inspector)})}
  3483. }),
  3484. smalltalk.Inspector);
  3485. smalltalk.addMethod(
  3486. "_selectVariable_",
  3487. smalltalk.method({
  3488. selector: "selectVariable:",
  3489. fn: function (aString){
  3490. var self=this;
  3491. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3492. _st(self)._selectedVariable_(aString);
  3493. $1=self;
  3494. _st($1)._updateVariablesList();
  3495. _st($1)._updateValueTextarea();
  3496. $2=_st($1)._updateButtons();
  3497. return self}, function($ctx1) {$ctx1.fill(self,"selectVariable:",{aString:aString}, smalltalk.Inspector)})}
  3498. }),
  3499. smalltalk.Inspector);
  3500. smalltalk.addMethod(
  3501. "_selectedVariable",
  3502. smalltalk.method({
  3503. selector: "selectedVariable",
  3504. fn: function (){
  3505. var self=this;
  3506. return smalltalk.withContext(function($ctx1) { var $1;
  3507. $1=self["@selectedVariable"];
  3508. return $1;
  3509. }, function($ctx1) {$ctx1.fill(self,"selectedVariable",{}, smalltalk.Inspector)})}
  3510. }),
  3511. smalltalk.Inspector);
  3512. smalltalk.addMethod(
  3513. "_selectedVariable_",
  3514. smalltalk.method({
  3515. selector: "selectedVariable:",
  3516. fn: function (aString){
  3517. var self=this;
  3518. return smalltalk.withContext(function($ctx1) { self["@selectedVariable"]=aString;
  3519. return self}, function($ctx1) {$ctx1.fill(self,"selectedVariable:",{aString:aString}, smalltalk.Inspector)})}
  3520. }),
  3521. smalltalk.Inspector);
  3522. smalltalk.addMethod(
  3523. "_setLabel_",
  3524. smalltalk.method({
  3525. selector: "setLabel:",
  3526. fn: function (aString){
  3527. var self=this;
  3528. return smalltalk.withContext(function($ctx1) { self["@label"]=aString;
  3529. return self}, function($ctx1) {$ctx1.fill(self,"setLabel:",{aString:aString}, smalltalk.Inspector)})}
  3530. }),
  3531. smalltalk.Inspector);
  3532. smalltalk.addMethod(
  3533. "_setVariables_",
  3534. smalltalk.method({
  3535. selector: "setVariables:",
  3536. fn: function (aCollection){
  3537. var self=this;
  3538. return smalltalk.withContext(function($ctx1) { self["@variables"]=aCollection;
  3539. return self}, function($ctx1) {$ctx1.fill(self,"setVariables:",{aCollection:aCollection}, smalltalk.Inspector)})}
  3540. }),
  3541. smalltalk.Inspector);
  3542. smalltalk.addMethod(
  3543. "_sourceArea",
  3544. smalltalk.method({
  3545. selector: "sourceArea",
  3546. fn: function (){
  3547. var self=this;
  3548. return smalltalk.withContext(function($ctx1) { var $1;
  3549. $1=self["@sourceArea"];
  3550. return $1;
  3551. }, function($ctx1) {$ctx1.fill(self,"sourceArea",{}, smalltalk.Inspector)})}
  3552. }),
  3553. smalltalk.Inspector);
  3554. smalltalk.addMethod(
  3555. "_updateButtons",
  3556. smalltalk.method({
  3557. selector: "updateButtons",
  3558. fn: function (){
  3559. var self=this;
  3560. return smalltalk.withContext(function($ctx1) { var $1;
  3561. $1=_st(_st(_st(self)._selectedVariable())._notNil())._and_((function(){
  3562. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(self)._variables())._at_(_st(self)._selectedVariable()))._notNil();
  3563. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3564. if(smalltalk.assert($1)){
  3565. _st(self["@diveButton"])._removeAt_("disabled");
  3566. } else {
  3567. _st(self["@diveButton"])._at_put_("disabled",true);
  3568. };
  3569. return self}, function($ctx1) {$ctx1.fill(self,"updateButtons",{}, smalltalk.Inspector)})}
  3570. }),
  3571. smalltalk.Inspector);
  3572. smalltalk.addMethod(
  3573. "_updateValueTextarea",
  3574. smalltalk.method({
  3575. selector: "updateValueTextarea",
  3576. fn: function (){
  3577. var self=this;
  3578. return smalltalk.withContext(function($ctx1) { var $1,$3,$2;
  3579. $1=_st(self["@valueTextarea"])._asJQuery();
  3580. $3=_st(_st(self)._selectedVariable())._isNil();
  3581. if(smalltalk.assert($3)){
  3582. $2="";
  3583. } else {
  3584. $2=_st(_st(_st(self)._variables())._at_(_st(self)._selectedVariable()))._printString();
  3585. };
  3586. _st($1)._val_($2);
  3587. return self}, function($ctx1) {$ctx1.fill(self,"updateValueTextarea",{}, smalltalk.Inspector)})}
  3588. }),
  3589. smalltalk.Inspector);
  3590. smalltalk.addMethod(
  3591. "_updateVariablesList",
  3592. smalltalk.method({
  3593. selector: "updateVariablesList",
  3594. fn: function (){
  3595. var self=this;
  3596. return smalltalk.withContext(function($ctx1) { var $1,$3,$5,$6,$7,$4,$2;
  3597. $1=self["@variablesList"];
  3598. $2=(function(html){
  3599. return smalltalk.withContext(function($ctx2) { $3=_st(_st(self)._variables())._keys();
  3600. $4=(function(each){
  3601. var li;
  3602. return smalltalk.withContext(function($ctx3) { li=_st(html)._li();
  3603. li;
  3604. $5=li;
  3605. _st($5)._with_(each);
  3606. $6=_st($5)._onClick_((function(){
  3607. return smalltalk.withContext(function($ctx4) { return _st(self)._selectVariable_(each);
  3608. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  3609. $6;
  3610. $7=_st(_st(self)._selectedVariable()).__eq(each);
  3611. if(smalltalk.assert($7)){
  3612. return _st(li)._class_("selected");
  3613. };
  3614. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})});
  3615. return _st($3)._do_($4);
  3616. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})});
  3617. _st($1)._contents_($2);
  3618. return self}, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{}, smalltalk.Inspector)})}
  3619. }),
  3620. smalltalk.Inspector);
  3621. smalltalk.addMethod(
  3622. "_variables",
  3623. smalltalk.method({
  3624. selector: "variables",
  3625. fn: function (){
  3626. var self=this;
  3627. return smalltalk.withContext(function($ctx1) { var $1;
  3628. $1=self["@variables"];
  3629. return $1;
  3630. }, function($ctx1) {$ctx1.fill(self,"variables",{}, smalltalk.Inspector)})}
  3631. }),
  3632. smalltalk.Inspector);
  3633. smalltalk.addMethod(
  3634. "_on_",
  3635. smalltalk.method({
  3636. selector: "on:",
  3637. fn: function (anObject){
  3638. var self=this;
  3639. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  3640. $2=_st(self)._new();
  3641. _st($2)._inspect_(anObject);
  3642. $3=_st($2)._yourself();
  3643. $1=$3;
  3644. return $1;
  3645. }, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject}, smalltalk.Inspector.klass)})}
  3646. }),
  3647. smalltalk.Inspector.klass);
  3648. smalltalk.addClass('ProgressBar', smalltalk.TabWidget, ['percent', 'progressDiv', 'div'], 'IDE');
  3649. smalltalk.addMethod(
  3650. "_percent",
  3651. smalltalk.method({
  3652. selector: "percent",
  3653. fn: function (){
  3654. var self=this;
  3655. return smalltalk.withContext(function($ctx1) { var $2,$1;
  3656. $2=self["@percent"];
  3657. if(($receiver = $2) == nil || $receiver == undefined){
  3658. $1=(0);
  3659. } else {
  3660. $1=$2;
  3661. };
  3662. return $1;
  3663. }, function($ctx1) {$ctx1.fill(self,"percent",{}, smalltalk.ProgressBar)})}
  3664. }),
  3665. smalltalk.ProgressBar);
  3666. smalltalk.addMethod(
  3667. "_percent_",
  3668. smalltalk.method({
  3669. selector: "percent:",
  3670. fn: function (aNumber){
  3671. var self=this;
  3672. return smalltalk.withContext(function($ctx1) { self["@percent"]=aNumber;
  3673. return self}, function($ctx1) {$ctx1.fill(self,"percent:",{aNumber:aNumber}, smalltalk.ProgressBar)})}
  3674. }),
  3675. smalltalk.ProgressBar);
  3676. smalltalk.addMethod(
  3677. "_renderOn_",
  3678. smalltalk.method({
  3679. selector: "renderOn:",
  3680. fn: function (html){
  3681. var self=this;
  3682. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3683. $1=_st(html)._div();
  3684. _st($1)._class_("progress_bar");
  3685. $2=_st($1)._yourself();
  3686. self["@div"]=$2;
  3687. _st(self)._renderProgressBar();
  3688. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html}, smalltalk.ProgressBar)})}
  3689. }),
  3690. smalltalk.ProgressBar);
  3691. smalltalk.addMethod(
  3692. "_renderProgressBar",
  3693. smalltalk.method({
  3694. selector: "renderProgressBar",
  3695. fn: function (){
  3696. var self=this;
  3697. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3698. _st(self["@div"])._contents_((function(html){
  3699. return smalltalk.withContext(function($ctx2) { $1=_st(html)._div();
  3700. _st($1)._class_("progress");
  3701. $2=_st($1)._style_(_st(_st("width:").__comma(_st(_st(self)._percent())._asString())).__comma("%"));
  3702. return $2;
  3703. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  3704. return self}, function($ctx1) {$ctx1.fill(self,"renderProgressBar",{}, smalltalk.ProgressBar)})}
  3705. }),
  3706. smalltalk.ProgressBar);
  3707. smalltalk.addMethod(
  3708. "_updatePercent_",
  3709. smalltalk.method({
  3710. selector: "updatePercent:",
  3711. fn: function (aNumber){
  3712. var self=this;
  3713. return smalltalk.withContext(function($ctx1) { _st(self)._percent_(aNumber);
  3714. _st(self)._renderProgressBar();
  3715. return self}, function($ctx1) {$ctx1.fill(self,"updatePercent:",{aNumber:aNumber}, smalltalk.ProgressBar)})}
  3716. }),
  3717. smalltalk.ProgressBar);
  3718. smalltalk.addClass('ReferencesBrowser', smalltalk.TabWidget, ['implementors', 'senders', 'implementorsList', 'input', 'timer', 'selector', 'sendersList', 'referencedClasses', 'referencedClassesList', 'matches', 'matchesList'], 'IDE');
  3719. smalltalk.addMethod(
  3720. "_canBeClosed",
  3721. smalltalk.method({
  3722. selector: "canBeClosed",
  3723. fn: function (){
  3724. var self=this;
  3725. return smalltalk.withContext(function($ctx1) { return true;
  3726. }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{}, smalltalk.ReferencesBrowser)})}
  3727. }),
  3728. smalltalk.ReferencesBrowser);
  3729. smalltalk.addMethod(
  3730. "_classesAndMetaclasses",
  3731. smalltalk.method({
  3732. selector: "classesAndMetaclasses",
  3733. fn: function (){
  3734. var self=this;
  3735. return smalltalk.withContext(function($ctx1) { var $1;
  3736. $1=_st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._classes()).__comma(_st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._classes())._collect_((function(each){
  3737. return smalltalk.withContext(function($ctx2) { return _st(each)._class();
  3738. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})));
  3739. return $1;
  3740. }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclasses",{}, smalltalk.ReferencesBrowser)})}
  3741. }),
  3742. smalltalk.ReferencesBrowser);
  3743. smalltalk.addMethod(
  3744. "_implementors",
  3745. smalltalk.method({
  3746. selector: "implementors",
  3747. fn: function (){
  3748. var self=this;
  3749. return smalltalk.withContext(function($ctx1) { var $2,$1;
  3750. $2=self["@implementors"];
  3751. if(($receiver = $2) == nil || $receiver == undefined){
  3752. self["@implementors"]=_st((smalltalk.Array || Array))._new();
  3753. $1=self["@implementors"];
  3754. } else {
  3755. $1=$2;
  3756. };
  3757. return $1;
  3758. }, function($ctx1) {$ctx1.fill(self,"implementors",{}, smalltalk.ReferencesBrowser)})}
  3759. }),
  3760. smalltalk.ReferencesBrowser);
  3761. smalltalk.addMethod(
  3762. "_initialize",
  3763. smalltalk.method({
  3764. selector: "initialize",
  3765. fn: function (){
  3766. var self=this;
  3767. return smalltalk.withContext(function($ctx1) { smalltalk.TabWidget.fn.prototype._initialize.apply(_st(self), []);
  3768. self["@selector"]="";
  3769. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.ReferencesBrowser)})}
  3770. }),
  3771. smalltalk.ReferencesBrowser);
  3772. smalltalk.addMethod(
  3773. "_label",
  3774. smalltalk.method({
  3775. selector: "label",
  3776. fn: function (){
  3777. var self=this;
  3778. return smalltalk.withContext(function($ctx1) { return "[References]";
  3779. }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.ReferencesBrowser)})}
  3780. }),
  3781. smalltalk.ReferencesBrowser);
  3782. smalltalk.addMethod(
  3783. "_matches",
  3784. smalltalk.method({
  3785. selector: "matches",
  3786. fn: function (){
  3787. var self=this;
  3788. return smalltalk.withContext(function($ctx1) { var $2,$1;
  3789. $2=self["@matches"];
  3790. if(($receiver = $2) == nil || $receiver == undefined){
  3791. self["@matches"]=_st((smalltalk.Array || Array))._new();
  3792. $1=self["@matches"];
  3793. } else {
  3794. $1=$2;
  3795. };
  3796. return $1;
  3797. }, function($ctx1) {$ctx1.fill(self,"matches",{}, smalltalk.ReferencesBrowser)})}
  3798. }),
  3799. smalltalk.ReferencesBrowser);
  3800. smalltalk.addMethod(
  3801. "_openBrowserOn_",
  3802. smalltalk.method({
  3803. selector: "openBrowserOn:",
  3804. fn: function (aMethod){
  3805. var self=this;
  3806. var browser;
  3807. return smalltalk.withContext(function($ctx1) { var $1,$3,$2,$4,$5,$6;
  3808. $1=(smalltalk.Browser || Browser);
  3809. $3=_st(_st(aMethod)._methodClass())._isMetaclass();
  3810. if(smalltalk.assert($3)){
  3811. $2=_st(_st(aMethod)._methodClass())._instanceClass();
  3812. } else {
  3813. $2=_st(aMethod)._methodClass();
  3814. };
  3815. browser=_st($1)._openOn_($2);
  3816. $4=_st(_st(aMethod)._methodClass())._isMetaclass();
  3817. if(smalltalk.assert($4)){
  3818. _st(browser)._selectTab_(smalltalk.symbolFor("class"));
  3819. };
  3820. $5=browser;
  3821. _st($5)._selectProtocol_(_st(aMethod)._category());
  3822. $6=_st($5)._selectMethod_(aMethod);
  3823. return self}, function($ctx1) {$ctx1.fill(self,"openBrowserOn:",{aMethod:aMethod,browser:browser}, smalltalk.ReferencesBrowser)})}
  3824. }),
  3825. smalltalk.ReferencesBrowser);
  3826. smalltalk.addMethod(
  3827. "_referencedClasses",
  3828. smalltalk.method({
  3829. selector: "referencedClasses",
  3830. fn: function (){
  3831. var self=this;
  3832. return smalltalk.withContext(function($ctx1) { var $2,$1;
  3833. $2=self["@referencedClasses"];
  3834. if(($receiver = $2) == nil || $receiver == undefined){
  3835. self["@referencedClasses"]=_st((smalltalk.Array || Array))._new();
  3836. $1=self["@referencedClasses"];
  3837. } else {
  3838. $1=$2;
  3839. };
  3840. return $1;
  3841. }, function($ctx1) {$ctx1.fill(self,"referencedClasses",{}, smalltalk.ReferencesBrowser)})}
  3842. }),
  3843. smalltalk.ReferencesBrowser);
  3844. smalltalk.addMethod(
  3845. "_renderBoxOn_",
  3846. smalltalk.method({
  3847. selector: "renderBoxOn:",
  3848. fn: function (html){
  3849. var self=this;
  3850. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3851. $1=self;
  3852. _st($1)._renderInputOn_(html);
  3853. _st($1)._renderImplementorsOn_(html);
  3854. _st($1)._renderSendersOn_(html);
  3855. _st($1)._renderReferencedClassesOn_(html);
  3856. $2=_st($1)._renderMatchesOn_(html);
  3857. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html}, smalltalk.ReferencesBrowser)})}
  3858. }),
  3859. smalltalk.ReferencesBrowser);
  3860. smalltalk.addMethod(
  3861. "_renderImplementorsOn_",
  3862. smalltalk.method({
  3863. selector: "renderImplementorsOn:",
  3864. fn: function (html){
  3865. var self=this;
  3866. return smalltalk.withContext(function($ctx1) { self["@implementorsList"]=_st(_st(html)._ul())._class_("amber_column implementors");
  3867. _st(self)._updateImplementorsList();
  3868. return self}, function($ctx1) {$ctx1.fill(self,"renderImplementorsOn:",{html:html}, smalltalk.ReferencesBrowser)})}
  3869. }),
  3870. smalltalk.ReferencesBrowser);
  3871. smalltalk.addMethod(
  3872. "_renderInputOn_",
  3873. smalltalk.method({
  3874. selector: "renderInputOn:",
  3875. fn: function (html){
  3876. var self=this;
  3877. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3878. $1=_st(html)._input();
  3879. _st($1)._class_("implementors");
  3880. $2=_st($1)._yourself();
  3881. self["@input"]=$2;
  3882. _st(_st(self["@input"])._asJQuery())._val_(self["@selector"]);
  3883. _st(self)._setInputEvents();
  3884. return self}, function($ctx1) {$ctx1.fill(self,"renderInputOn:",{html:html}, smalltalk.ReferencesBrowser)})}
  3885. }),
  3886. smalltalk.ReferencesBrowser);
  3887. smalltalk.addMethod(
  3888. "_renderMatchesOn_",
  3889. smalltalk.method({
  3890. selector: "renderMatchesOn:",
  3891. fn: function (html){
  3892. var self=this;
  3893. return smalltalk.withContext(function($ctx1) { self["@matchesList"]=_st(_st(html)._ul())._class_("amber_column matches");
  3894. _st(self)._updateMatchesList();
  3895. return self}, function($ctx1) {$ctx1.fill(self,"renderMatchesOn:",{html:html}, smalltalk.ReferencesBrowser)})}
  3896. }),
  3897. smalltalk.ReferencesBrowser);
  3898. smalltalk.addMethod(
  3899. "_renderReferencedClassesOn_",
  3900. smalltalk.method({
  3901. selector: "renderReferencedClassesOn:",
  3902. fn: function (html){
  3903. var self=this;
  3904. return smalltalk.withContext(function($ctx1) { self["@referencedClassesList"]=_st(_st(html)._ul())._class_("amber_column referenced_classes");
  3905. _st(self)._updateReferencedClassesList();
  3906. return self}, function($ctx1) {$ctx1.fill(self,"renderReferencedClassesOn:",{html:html}, smalltalk.ReferencesBrowser)})}
  3907. }),
  3908. smalltalk.ReferencesBrowser);
  3909. smalltalk.addMethod(
  3910. "_renderSendersOn_",
  3911. smalltalk.method({
  3912. selector: "renderSendersOn:",
  3913. fn: function (html){
  3914. var self=this;
  3915. return smalltalk.withContext(function($ctx1) { self["@sendersList"]=_st(_st(html)._ul())._class_("amber_column senders");
  3916. _st(self)._updateSendersList();
  3917. return self}, function($ctx1) {$ctx1.fill(self,"renderSendersOn:",{html:html}, smalltalk.ReferencesBrowser)})}
  3918. }),
  3919. smalltalk.ReferencesBrowser);
  3920. smalltalk.addMethod(
  3921. "_search_",
  3922. smalltalk.method({
  3923. selector: "search:",
  3924. fn: function (aString){
  3925. var self=this;
  3926. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3927. $1=self;
  3928. _st($1)._searchReferencesFor_(aString);
  3929. _st($1)._updateImplementorsList();
  3930. _st($1)._updateSendersList();
  3931. _st($1)._updateReferencedClassesList();
  3932. $2=_st($1)._updateMatchesList();
  3933. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString}, smalltalk.ReferencesBrowser)})}
  3934. }),
  3935. smalltalk.ReferencesBrowser);
  3936. smalltalk.addMethod(
  3937. "_searchMethodSource",
  3938. smalltalk.method({
  3939. selector: "searchMethodSource",
  3940. fn: function (){
  3941. var self=this;
  3942. var regex;
  3943. return smalltalk.withContext(function($ctx1) { var $1,$3,$5,$4,$2;
  3944. regex=_st(self["@selector"])._allButFirst();
  3945. $1=_st(self)._classesAndMetaclasses();
  3946. $2=(function(each){
  3947. return smalltalk.withContext(function($ctx2) { $3=_st(_st(each)._methodDictionary())._values();
  3948. $4=(function(value){
  3949. return smalltalk.withContext(function($ctx3) { $5=_st(_st(value)._source())._match_(regex);
  3950. if(smalltalk.assert($5)){
  3951. return _st(_st(self)._matches())._add_(value);
  3952. };
  3953. }, function($ctx3) {$ctx3.fillBlock({value:value},$ctx1)})});
  3954. return _st($3)._do_($4);
  3955. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
  3956. _st($1)._do_($2);
  3957. return self}, function($ctx1) {$ctx1.fill(self,"searchMethodSource",{regex:regex}, smalltalk.ReferencesBrowser)})}
  3958. }),
  3959. smalltalk.ReferencesBrowser);
  3960. smalltalk.addMethod(
  3961. "_searchReferencedClasses",
  3962. smalltalk.method({
  3963. selector: "searchReferencedClasses",
  3964. fn: function (){
  3965. var self=this;
  3966. return smalltalk.withContext(function($ctx1) { var $1,$3,$5,$4,$2;
  3967. $1=_st(self)._classesAndMetaclasses();
  3968. $2=(function(each){
  3969. return smalltalk.withContext(function($ctx2) { $3=_st(_st(each)._methodDictionary())._values();
  3970. $4=(function(value){
  3971. return smalltalk.withContext(function($ctx3) { $5=_st(_st(value)._referencedClasses())._includes_(self["@selector"]);
  3972. if(smalltalk.assert($5)){
  3973. return _st(_st(self)._referencedClasses())._add_(value);
  3974. };
  3975. }, function($ctx3) {$ctx3.fillBlock({value:value},$ctx1)})});
  3976. return _st($3)._do_($4);
  3977. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
  3978. _st($1)._do_($2);
  3979. return self}, function($ctx1) {$ctx1.fill(self,"searchReferencedClasses",{}, smalltalk.ReferencesBrowser)})}
  3980. }),
  3981. smalltalk.ReferencesBrowser);
  3982. smalltalk.addMethod(
  3983. "_searchReferencesFor_",
  3984. smalltalk.method({
  3985. selector: "searchReferencesFor:",
  3986. fn: function (aString){
  3987. var self=this;
  3988. return smalltalk.withContext(function($ctx1) { var $1;
  3989. self["@selector"]=aString;
  3990. self["@implementors"]=_st((smalltalk.Array || Array))._new();
  3991. self["@senders"]=_st((smalltalk.Array || Array))._new();
  3992. self["@referencedClasses"]=_st((smalltalk.Array || Array))._new();
  3993. self["@matches"]=_st((smalltalk.Array || Array))._new();
  3994. _st(self)._searchMethodSource();
  3995. $1=_st(self["@selector"])._match_("^[A-Z]");
  3996. if(smalltalk.assert($1)){
  3997. _st(self)._searchReferencedClasses();
  3998. } else {
  3999. _st(self)._searchSelectorReferences();
  4000. };
  4001. return self}, function($ctx1) {$ctx1.fill(self,"searchReferencesFor:",{aString:aString}, smalltalk.ReferencesBrowser)})}
  4002. }),
  4003. smalltalk.ReferencesBrowser);
  4004. smalltalk.addMethod(
  4005. "_searchSelectorReferences",
  4006. smalltalk.method({
  4007. selector: "searchSelectorReferences",
  4008. fn: function (){
  4009. var self=this;
  4010. return smalltalk.withContext(function($ctx1) { var $1,$3,$5,$6,$4,$2;
  4011. $1=_st(self)._classesAndMetaclasses();
  4012. $2=(function(each){
  4013. return smalltalk.withContext(function($ctx2) { $3=_st(each)._methodDictionary();
  4014. $4=(function(key,value){
  4015. return smalltalk.withContext(function($ctx3) { $5=_st(key).__eq(self["@selector"]);
  4016. if(smalltalk.assert($5)){
  4017. _st(_st(self)._implementors())._add_(value);
  4018. };
  4019. $6=_st(_st(value)._messageSends())._includes_(self["@selector"]);
  4020. if(smalltalk.assert($6)){
  4021. return _st(_st(self)._senders())._add_(value);
  4022. };
  4023. }, function($ctx3) {$ctx3.fillBlock({key:key,value:value},$ctx1)})});
  4024. return _st($3)._keysAndValuesDo_($4);
  4025. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
  4026. _st($1)._do_($2);
  4027. return self}, function($ctx1) {$ctx1.fill(self,"searchSelectorReferences",{}, smalltalk.ReferencesBrowser)})}
  4028. }),
  4029. smalltalk.ReferencesBrowser);
  4030. smalltalk.addMethod(
  4031. "_selector",
  4032. smalltalk.method({
  4033. selector: "selector",
  4034. fn: function (){
  4035. var self=this;
  4036. return smalltalk.withContext(function($ctx1) { var $1;
  4037. $1=self["@selector"];
  4038. return $1;
  4039. }, function($ctx1) {$ctx1.fill(self,"selector",{}, smalltalk.ReferencesBrowser)})}
  4040. }),
  4041. smalltalk.ReferencesBrowser);
  4042. smalltalk.addMethod(
  4043. "_senders",
  4044. smalltalk.method({
  4045. selector: "senders",
  4046. fn: function (){
  4047. var self=this;
  4048. return smalltalk.withContext(function($ctx1) { var $2,$1;
  4049. $2=self["@senders"];
  4050. if(($receiver = $2) == nil || $receiver == undefined){
  4051. self["@senders"]=_st((smalltalk.Array || Array))._new();
  4052. $1=self["@senders"];
  4053. } else {
  4054. $1=$2;
  4055. };
  4056. return $1;
  4057. }, function($ctx1) {$ctx1.fill(self,"senders",{}, smalltalk.ReferencesBrowser)})}
  4058. }),
  4059. smalltalk.ReferencesBrowser);
  4060. smalltalk.addMethod(
  4061. "_setInputEvents",
  4062. smalltalk.method({
  4063. selector: "setInputEvents",
  4064. fn: function (){
  4065. var self=this;
  4066. return smalltalk.withContext(function($ctx1) { var $1,$3,$5,$4,$2;
  4067. $1=self["@input"];
  4068. _st($1)._onKeyUp_((function(){
  4069. return smalltalk.withContext(function($ctx2) { self["@timer"]=_st((function(){
  4070. return smalltalk.withContext(function($ctx3) { return _st(self)._search_(_st(_st(self["@input"])._asJQuery())._val());
  4071. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._valueWithTimeout_((100));
  4072. return self["@timer"];
  4073. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  4074. $3=$1;
  4075. $4=(function(){
  4076. return smalltalk.withContext(function($ctx2) { $5=self["@timer"];
  4077. if(($receiver = $5) == nil || $receiver == undefined){
  4078. return $5;
  4079. } else {
  4080. return _st(self["@timer"])._clearTimeout();
  4081. };
  4082. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  4083. $2=_st($3)._onKeyDown_($4);
  4084. return self}, function($ctx1) {$ctx1.fill(self,"setInputEvents",{}, smalltalk.ReferencesBrowser)})}
  4085. }),
  4086. smalltalk.ReferencesBrowser);
  4087. smalltalk.addMethod(
  4088. "_updateImplementorsList",
  4089. smalltalk.method({
  4090. selector: "updateImplementorsList",
  4091. fn: function (){
  4092. var self=this;
  4093. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  4094. _st(self["@implementorsList"])._contents_((function(html){
  4095. return smalltalk.withContext(function($ctx2) { $1=_st(html)._li();
  4096. _st($1)._class_("column_label");
  4097. _st($1)._with_(_st(_st("Implementors (").__comma(_st(_st(_st(self)._implementors())._size())._asString())).__comma(")"));
  4098. $2=_st($1)._style_("font-weight: bold");
  4099. $2;
  4100. return _st(_st(self)._implementors())._do_((function(each){
  4101. var li;
  4102. return smalltalk.withContext(function($ctx3) { li=_st(html)._li();
  4103. li;
  4104. $3=li;
  4105. _st($3)._with_(_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(self)._selector()));
  4106. $4=_st($3)._onClick_((function(){
  4107. return smalltalk.withContext(function($ctx4) { return _st(self)._openBrowserOn_(each);
  4108. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  4109. return $4;
  4110. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})}));
  4111. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  4112. return self}, function($ctx1) {$ctx1.fill(self,"updateImplementorsList",{}, smalltalk.ReferencesBrowser)})}
  4113. }),
  4114. smalltalk.ReferencesBrowser);
  4115. smalltalk.addMethod(
  4116. "_updateMatchesList",
  4117. smalltalk.method({
  4118. selector: "updateMatchesList",
  4119. fn: function (){
  4120. var self=this;
  4121. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  4122. _st(self["@matchesList"])._contents_((function(html){
  4123. return smalltalk.withContext(function($ctx2) { $1=_st(html)._li();
  4124. _st($1)._class_("column_label");
  4125. _st($1)._with_(_st(_st("Regex matches (").__comma(_st(_st(_st(self)._matches())._size())._asString())).__comma(")"));
  4126. $2=_st($1)._style_("font-weight: bold");
  4127. $2;
  4128. return _st(_st(self)._matches())._do_((function(each){
  4129. var li;
  4130. return smalltalk.withContext(function($ctx3) { li=_st(html)._li();
  4131. li;
  4132. $3=li;
  4133. _st($3)._with_(_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector()));
  4134. $4=_st($3)._onClick_((function(){
  4135. return smalltalk.withContext(function($ctx4) { return _st(self)._openBrowserOn_(each);
  4136. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  4137. return $4;
  4138. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})}));
  4139. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  4140. return self}, function($ctx1) {$ctx1.fill(self,"updateMatchesList",{}, smalltalk.ReferencesBrowser)})}
  4141. }),
  4142. smalltalk.ReferencesBrowser);
  4143. smalltalk.addMethod(
  4144. "_updateReferencedClassesList",
  4145. smalltalk.method({
  4146. selector: "updateReferencedClassesList",
  4147. fn: function (){
  4148. var self=this;
  4149. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  4150. _st(self["@referencedClassesList"])._contents_((function(html){
  4151. return smalltalk.withContext(function($ctx2) { $1=_st(html)._li();
  4152. _st($1)._class_("column_label");
  4153. _st($1)._with_(_st(_st("Class references (").__comma(_st(_st(_st(self)._referencedClasses())._size())._asString())).__comma(")"));
  4154. $2=_st($1)._style_("font-weight: bold");
  4155. $2;
  4156. return _st(_st(self)._referencedClasses())._do_((function(each){
  4157. return smalltalk.withContext(function($ctx3) { $3=_st(html)._li();
  4158. _st($3)._with_(_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector()));
  4159. $4=_st($3)._onClick_((function(){
  4160. return smalltalk.withContext(function($ctx4) { return _st(self)._openBrowserOn_(each);
  4161. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  4162. return $4;
  4163. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  4164. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  4165. return self}, function($ctx1) {$ctx1.fill(self,"updateReferencedClassesList",{}, smalltalk.ReferencesBrowser)})}
  4166. }),
  4167. smalltalk.ReferencesBrowser);
  4168. smalltalk.addMethod(
  4169. "_updateSendersList",
  4170. smalltalk.method({
  4171. selector: "updateSendersList",
  4172. fn: function (){
  4173. var self=this;
  4174. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  4175. _st(self["@sendersList"])._contents_((function(html){
  4176. return smalltalk.withContext(function($ctx2) { $1=_st(html)._li();
  4177. _st($1)._class_("column_label");
  4178. _st($1)._with_(_st(_st("Senders (").__comma(_st(_st(_st(self)._senders())._size())._asString())).__comma(")"));
  4179. $2=_st($1)._style_("font-weight: bold");
  4180. $2;
  4181. return _st(_st(self)._senders())._do_((function(each){
  4182. return smalltalk.withContext(function($ctx3) { $3=_st(html)._li();
  4183. _st($3)._with_(_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector()));
  4184. $4=_st($3)._onClick_((function(){
  4185. return smalltalk.withContext(function($ctx4) { return _st(self)._openBrowserOn_(each);
  4186. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  4187. return $4;
  4188. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  4189. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  4190. return self}, function($ctx1) {$ctx1.fill(self,"updateSendersList",{}, smalltalk.ReferencesBrowser)})}
  4191. }),
  4192. smalltalk.ReferencesBrowser);
  4193. smalltalk.addMethod(
  4194. "_search_",
  4195. smalltalk.method({
  4196. selector: "search:",
  4197. fn: function (aString){
  4198. var self=this;
  4199. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  4200. $2=_st(self)._new();
  4201. _st($2)._searchReferencesFor_(aString);
  4202. $3=_st($2)._open();
  4203. $1=$3;
  4204. return $1;
  4205. }, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString}, smalltalk.ReferencesBrowser.klass)})}
  4206. }),
  4207. smalltalk.ReferencesBrowser.klass);
  4208. smalltalk.addClass('TestRunner', smalltalk.TabWidget, ['selectedCategories', 'packagesList', 'selectedClasses', 'classesList', 'selectedMethods', 'progressBar', 'methodsList', 'result', 'statusDiv'], 'IDE');
  4209. smalltalk.addMethod(
  4210. "_allClasses",
  4211. smalltalk.method({
  4212. selector: "allClasses",
  4213. fn: function (){
  4214. var self=this;
  4215. return smalltalk.withContext(function($ctx1) { var $1;
  4216. $1=_st(_st((smalltalk.TestCase || TestCase))._allSubclasses())._select_((function(each){
  4217. return smalltalk.withContext(function($ctx2) { return _st(_st(each)._isAbstract())._not();
  4218. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  4219. return $1;
  4220. }, function($ctx1) {$ctx1.fill(self,"allClasses",{}, smalltalk.TestRunner)})}
  4221. }),
  4222. smalltalk.TestRunner);
  4223. smalltalk.addMethod(
  4224. "_classes",
  4225. smalltalk.method({
  4226. selector: "classes",
  4227. fn: function (){
  4228. var self=this;
  4229. return smalltalk.withContext(function($ctx1) { var $1;
  4230. $1=_st(_st(_st(self)._allClasses())._select_((function(each){
  4231. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._selectedCategories())._includes_(_st(each)._category());
  4232. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._sort_((function(a,b){
  4233. return smalltalk.withContext(function($ctx2) { return _st(_st(a)._name()).__gt(_st(b)._name());
  4234. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  4235. return $1;
  4236. }, function($ctx1) {$ctx1.fill(self,"classes",{}, smalltalk.TestRunner)})}
  4237. }),
  4238. smalltalk.TestRunner);
  4239. smalltalk.addMethod(
  4240. "_initialize",
  4241. smalltalk.method({
  4242. selector: "initialize",
  4243. fn: function (){
  4244. var self=this;
  4245. return smalltalk.withContext(function($ctx1) { smalltalk.TabWidget.fn.prototype._initialize.apply(_st(self), []);
  4246. self["@result"]=_st((smalltalk.TestResult || TestResult))._new();
  4247. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.TestRunner)})}
  4248. }),
  4249. smalltalk.TestRunner);
  4250. smalltalk.addMethod(
  4251. "_isSelectedCategory_",
  4252. smalltalk.method({
  4253. selector: "isSelectedCategory:",
  4254. fn: function (aCategory){
  4255. var self=this;
  4256. return smalltalk.withContext(function($ctx1) { var $1;
  4257. $1=_st(_st(self)._selectedCategories())._includes_(aCategory);
  4258. return $1;
  4259. }, function($ctx1) {$ctx1.fill(self,"isSelectedCategory:",{aCategory:aCategory}, smalltalk.TestRunner)})}
  4260. }),
  4261. smalltalk.TestRunner);
  4262. smalltalk.addMethod(
  4263. "_isSelectedClass_",
  4264. smalltalk.method({
  4265. selector: "isSelectedClass:",
  4266. fn: function (aClass){
  4267. var self=this;
  4268. return smalltalk.withContext(function($ctx1) { var $1;
  4269. $1=_st(_st(self)._selectedClasses())._includes_(aClass);
  4270. return $1;
  4271. }, function($ctx1) {$ctx1.fill(self,"isSelectedClass:",{aClass:aClass}, smalltalk.TestRunner)})}
  4272. }),
  4273. smalltalk.TestRunner);
  4274. smalltalk.addMethod(
  4275. "_label",
  4276. smalltalk.method({
  4277. selector: "label",
  4278. fn: function (){
  4279. var self=this;
  4280. return smalltalk.withContext(function($ctx1) { return "SUnit";
  4281. }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.TestRunner)})}
  4282. }),
  4283. smalltalk.TestRunner);
  4284. smalltalk.addMethod(
  4285. "_packages",
  4286. smalltalk.method({
  4287. selector: "packages",
  4288. fn: function (){
  4289. var self=this;
  4290. var packages;
  4291. return smalltalk.withContext(function($ctx1) { var $1,$3,$2,$4;
  4292. packages=_st((smalltalk.Array || Array))._new();
  4293. $1=_st(self)._allClasses();
  4294. $2=(function(each){
  4295. return smalltalk.withContext(function($ctx2) { $3=_st(packages)._includes_(_st(each)._category());
  4296. if(! smalltalk.assert($3)){
  4297. return _st(packages)._add_(_st(each)._category());
  4298. };
  4299. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
  4300. _st($1)._do_($2);
  4301. $4=_st(packages)._sort();
  4302. return $4;
  4303. }, function($ctx1) {$ctx1.fill(self,"packages",{packages:packages}, smalltalk.TestRunner)})}
  4304. }),
  4305. smalltalk.TestRunner);
  4306. smalltalk.addMethod(
  4307. "_performFailure_",
  4308. smalltalk.method({
  4309. selector: "performFailure:",
  4310. fn: function (aTestCase){
  4311. var self=this;
  4312. return smalltalk.withContext(function($ctx1) { _st(aTestCase)._runCase();
  4313. return self}, function($ctx1) {$ctx1.fill(self,"performFailure:",{aTestCase:aTestCase}, smalltalk.TestRunner)})}
  4314. }),
  4315. smalltalk.TestRunner);
  4316. smalltalk.addMethod(
  4317. "_printErrors",
  4318. smalltalk.method({
  4319. selector: "printErrors",
  4320. fn: function (){
  4321. var self=this;
  4322. return smalltalk.withContext(function($ctx1) { var $1;
  4323. $1=_st(_st(_st(_st(_st(self)._result())._errors())._size())._asString()).__comma(" errors, ");
  4324. return $1;
  4325. }, function($ctx1) {$ctx1.fill(self,"printErrors",{}, smalltalk.TestRunner)})}
  4326. }),
  4327. smalltalk.TestRunner);
  4328. smalltalk.addMethod(
  4329. "_printFailures",
  4330. smalltalk.method({
  4331. selector: "printFailures",
  4332. fn: function (){
  4333. var self=this;
  4334. return smalltalk.withContext(function($ctx1) { var $1;
  4335. $1=_st(_st(_st(_st(_st(self)._result())._failures())._size())._asString()).__comma(" failures");
  4336. return $1;
  4337. }, function($ctx1) {$ctx1.fill(self,"printFailures",{}, smalltalk.TestRunner)})}
  4338. }),
  4339. smalltalk.TestRunner);
  4340. smalltalk.addMethod(
  4341. "_printPasses",
  4342. smalltalk.method({
  4343. selector: "printPasses",
  4344. fn: function (){
  4345. var self=this;
  4346. return smalltalk.withContext(function($ctx1) { var $1;
  4347. $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, ");
  4348. return $1;
  4349. }, function($ctx1) {$ctx1.fill(self,"printPasses",{}, smalltalk.TestRunner)})}
  4350. }),
  4351. smalltalk.TestRunner);
  4352. smalltalk.addMethod(
  4353. "_printTotal",
  4354. smalltalk.method({
  4355. selector: "printTotal",
  4356. fn: function (){
  4357. var self=this;
  4358. return smalltalk.withContext(function($ctx1) { var $1;
  4359. $1=_st(_st(_st(_st(self)._result())._total())._asString()).__comma(" runs, ");
  4360. return $1;
  4361. }, function($ctx1) {$ctx1.fill(self,"printTotal",{}, smalltalk.TestRunner)})}
  4362. }),
  4363. smalltalk.TestRunner);
  4364. smalltalk.addMethod(
  4365. "_progressBar",
  4366. smalltalk.method({
  4367. selector: "progressBar",
  4368. fn: function (){
  4369. var self=this;
  4370. return smalltalk.withContext(function($ctx1) { var $2,$1;
  4371. $2=self["@progressBar"];
  4372. if(($receiver = $2) == nil || $receiver == undefined){
  4373. self["@progressBar"]=_st((smalltalk.ProgressBar || ProgressBar))._new();
  4374. $1=self["@progressBar"];
  4375. } else {
  4376. $1=$2;
  4377. };
  4378. return $1;
  4379. }, function($ctx1) {$ctx1.fill(self,"progressBar",{}, smalltalk.TestRunner)})}
  4380. }),
  4381. smalltalk.TestRunner);
  4382. smalltalk.addMethod(
  4383. "_renderBoxOn_",
  4384. smalltalk.method({
  4385. selector: "renderBoxOn:",
  4386. fn: function (html){
  4387. var self=this;
  4388. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4389. $1=self;
  4390. _st($1)._renderCategoriesOn_(html);
  4391. _st($1)._renderClassesOn_(html);
  4392. $2=_st($1)._renderResultsOn_(html);
  4393. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html}, smalltalk.TestRunner)})}
  4394. }),
  4395. smalltalk.TestRunner);
  4396. smalltalk.addMethod(
  4397. "_renderButtonsOn_",
  4398. smalltalk.method({
  4399. selector: "renderButtonsOn:",
  4400. fn: function (html){
  4401. var self=this;
  4402. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4403. $1=_st(html)._button();
  4404. _st($1)._with_("Run selected");
  4405. $2=_st($1)._onClick_((function(){
  4406. return smalltalk.withContext(function($ctx2) { return _st(self)._run_(_st(self)._testCases());
  4407. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  4408. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.TestRunner)})}
  4409. }),
  4410. smalltalk.TestRunner);
  4411. smalltalk.addMethod(
  4412. "_renderCategoriesOn_",
  4413. smalltalk.method({
  4414. selector: "renderCategoriesOn:",
  4415. fn: function (html){
  4416. var self=this;
  4417. return smalltalk.withContext(function($ctx1) { self["@packagesList"]=_st(_st(html)._ul())._class_("amber_column sunit packages");
  4418. _st(self)._updateCategoriesList();
  4419. return self}, function($ctx1) {$ctx1.fill(self,"renderCategoriesOn:",{html:html}, smalltalk.TestRunner)})}
  4420. }),
  4421. smalltalk.TestRunner);
  4422. smalltalk.addMethod(
  4423. "_renderClassesOn_",
  4424. smalltalk.method({
  4425. selector: "renderClassesOn:",
  4426. fn: function (html){
  4427. var self=this;
  4428. return smalltalk.withContext(function($ctx1) { self["@classesList"]=_st(_st(html)._ul())._class_("amber_column sunit classes");
  4429. _st(self)._updateClassesList();
  4430. return self}, function($ctx1) {$ctx1.fill(self,"renderClassesOn:",{html:html}, smalltalk.TestRunner)})}
  4431. }),
  4432. smalltalk.TestRunner);
  4433. smalltalk.addMethod(
  4434. "_renderErrorsOn_",
  4435. smalltalk.method({
  4436. selector: "renderErrorsOn:",
  4437. fn: function (html){
  4438. var self=this;
  4439. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4440. _st(_st(_st(self)._result())._errors())._do_((function(each){
  4441. return smalltalk.withContext(function($ctx2) { $1=_st(html)._li();
  4442. _st($1)._class_("errors");
  4443. _st($1)._with_(_st(_st(_st(_st(each)._class())._name()).__comma(" >> ")).__comma(_st(each)._selector()));
  4444. $2=_st($1)._onClick_((function(){
  4445. return smalltalk.withContext(function($ctx3) { return _st(self)._performFailure_(each);
  4446. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  4447. return $2;
  4448. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  4449. return self}, function($ctx1) {$ctx1.fill(self,"renderErrorsOn:",{html:html}, smalltalk.TestRunner)})}
  4450. }),
  4451. smalltalk.TestRunner);
  4452. smalltalk.addMethod(
  4453. "_renderFailuresOn_",
  4454. smalltalk.method({
  4455. selector: "renderFailuresOn:",
  4456. fn: function (html){
  4457. var self=this;
  4458. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4459. _st(_st(_st(self)._result())._failures())._do_((function(each){
  4460. return smalltalk.withContext(function($ctx2) { $1=_st(html)._li();
  4461. _st($1)._class_("failures");
  4462. _st($1)._with_(_st(_st(_st(_st(each)._class())._name()).__comma(" >> ")).__comma(_st(each)._selector()));
  4463. $2=_st($1)._onClick_((function(){
  4464. return smalltalk.withContext(function($ctx3) { return _st(self)._performFailure_(each);
  4465. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  4466. return $2;
  4467. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  4468. return self}, function($ctx1) {$ctx1.fill(self,"renderFailuresOn:",{html:html}, smalltalk.TestRunner)})}
  4469. }),
  4470. smalltalk.TestRunner);
  4471. smalltalk.addMethod(
  4472. "_renderResultsOn_",
  4473. smalltalk.method({
  4474. selector: "renderResultsOn:",
  4475. fn: function (html){
  4476. var self=this;
  4477. return smalltalk.withContext(function($ctx1) { self["@statusDiv"]=_st(html)._div();
  4478. _st(html)._with_(_st(self)._progressBar());
  4479. self["@methodsList"]=_st(_st(html)._ul())._class_("amber_column sunit results");
  4480. _st(self)._updateMethodsList();
  4481. _st(self)._updateStatusDiv();
  4482. return self}, function($ctx1) {$ctx1.fill(self,"renderResultsOn:",{html:html}, smalltalk.TestRunner)})}
  4483. }),
  4484. smalltalk.TestRunner);
  4485. smalltalk.addMethod(
  4486. "_result",
  4487. smalltalk.method({
  4488. selector: "result",
  4489. fn: function (){
  4490. var self=this;
  4491. return smalltalk.withContext(function($ctx1) { var $1;
  4492. $1=self["@result"];
  4493. return $1;
  4494. }, function($ctx1) {$ctx1.fill(self,"result",{}, smalltalk.TestRunner)})}
  4495. }),
  4496. smalltalk.TestRunner);
  4497. smalltalk.addMethod(
  4498. "_run_",
  4499. smalltalk.method({
  4500. selector: "run:",
  4501. fn: function (aCollection){
  4502. var self=this;
  4503. var worker;
  4504. return smalltalk.withContext(function($ctx1) { var $1,$2,$4,$3;
  4505. worker=_st((smalltalk.TestSuiteRunner || TestSuiteRunner))._on_(aCollection);
  4506. self["@result"]=_st(worker)._result();
  4507. $1=_st(worker)._announcer();
  4508. $2=(smalltalk.ResultAnnouncement || ResultAnnouncement);
  4509. $3=(function(ann){
  4510. return smalltalk.withContext(function($ctx2) { $4=_st(_st(ann)._result()).__eq_eq(self["@result"]);
  4511. if(smalltalk.assert($4)){
  4512. _st(_st(self)._progressBar())._updatePercent_(_st(_st(_st(self["@result"])._runs()).__slash(_st(self["@result"])._total())).__star((100)));
  4513. _st(self)._updateStatusDiv();
  4514. return _st(self)._updateMethodsList();
  4515. };
  4516. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})});
  4517. _st($1)._on_do_($2,$3);
  4518. _st(worker)._run();
  4519. return self}, function($ctx1) {$ctx1.fill(self,"run:",{aCollection:aCollection,worker:worker}, smalltalk.TestRunner)})}
  4520. }),
  4521. smalltalk.TestRunner);
  4522. smalltalk.addMethod(
  4523. "_selectAllCategories",
  4524. smalltalk.method({
  4525. selector: "selectAllCategories",
  4526. fn: function (){
  4527. var self=this;
  4528. return smalltalk.withContext(function($ctx1) { var $1,$3,$2,$4,$5;
  4529. $1=_st(self)._packages();
  4530. $2=(function(each){
  4531. return smalltalk.withContext(function($ctx2) { $3=_st(self["@selectedCategories"])._includes_(each);
  4532. if(! smalltalk.assert($3)){
  4533. return _st(_st(self)._selectedCategories())._add_(each);
  4534. };
  4535. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
  4536. _st($1)._do_($2);
  4537. $4=self;
  4538. _st($4)._updateCategoriesList();
  4539. $5=_st($4)._updateClassesList();
  4540. return self}, function($ctx1) {$ctx1.fill(self,"selectAllCategories",{}, smalltalk.TestRunner)})}
  4541. }),
  4542. smalltalk.TestRunner);
  4543. smalltalk.addMethod(
  4544. "_selectAllClasses",
  4545. smalltalk.method({
  4546. selector: "selectAllClasses",
  4547. fn: function (){
  4548. var self=this;
  4549. return smalltalk.withContext(function($ctx1) { var $1,$3,$2,$4,$5;
  4550. $1=_st(self)._classes();
  4551. $2=(function(each){
  4552. return smalltalk.withContext(function($ctx2) { $3=_st(self["@selectedClasses"])._includes_(each);
  4553. if(! smalltalk.assert($3)){
  4554. return _st(_st(self)._selectedClasses())._add_(each);
  4555. };
  4556. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
  4557. _st($1)._do_($2);
  4558. $4=self;
  4559. _st($4)._updateCategoriesList();
  4560. $5=_st($4)._updateClassesList();
  4561. return self}, function($ctx1) {$ctx1.fill(self,"selectAllClasses",{}, smalltalk.TestRunner)})}
  4562. }),
  4563. smalltalk.TestRunner);
  4564. smalltalk.addMethod(
  4565. "_selectedCategories",
  4566. smalltalk.method({
  4567. selector: "selectedCategories",
  4568. fn: function (){
  4569. var self=this;
  4570. return smalltalk.withContext(function($ctx1) { var $2,$1;
  4571. $2=self["@selectedCategories"];
  4572. if(($receiver = $2) == nil || $receiver == undefined){
  4573. self["@selectedCategories"]=_st((smalltalk.Array || Array))._new();
  4574. $1=self["@selectedCategories"];
  4575. } else {
  4576. $1=$2;
  4577. };
  4578. return $1;
  4579. }, function($ctx1) {$ctx1.fill(self,"selectedCategories",{}, smalltalk.TestRunner)})}
  4580. }),
  4581. smalltalk.TestRunner);
  4582. smalltalk.addMethod(
  4583. "_selectedClasses",
  4584. smalltalk.method({
  4585. selector: "selectedClasses",
  4586. fn: function (){
  4587. var self=this;
  4588. return smalltalk.withContext(function($ctx1) { var $2,$1;
  4589. $2=self["@selectedClasses"];
  4590. if(($receiver = $2) == nil || $receiver == undefined){
  4591. self["@selectedClasses"]=_st((smalltalk.Array || Array))._new();
  4592. $1=self["@selectedClasses"];
  4593. } else {
  4594. $1=$2;
  4595. };
  4596. return $1;
  4597. }, function($ctx1) {$ctx1.fill(self,"selectedClasses",{}, smalltalk.TestRunner)})}
  4598. }),
  4599. smalltalk.TestRunner);
  4600. smalltalk.addMethod(
  4601. "_statusInfo",
  4602. smalltalk.method({
  4603. selector: "statusInfo",
  4604. fn: function (){
  4605. var self=this;
  4606. return smalltalk.withContext(function($ctx1) { var $1;
  4607. $1=_st(_st(_st(_st(self)._printTotal()).__comma(_st(self)._printPasses())).__comma(_st(self)._printErrors())).__comma(_st(self)._printFailures());
  4608. return $1;
  4609. }, function($ctx1) {$ctx1.fill(self,"statusInfo",{}, smalltalk.TestRunner)})}
  4610. }),
  4611. smalltalk.TestRunner);
  4612. smalltalk.addMethod(
  4613. "_testCases",
  4614. smalltalk.method({
  4615. selector: "testCases",
  4616. fn: function (){
  4617. var self=this;
  4618. var testCases;
  4619. return smalltalk.withContext(function($ctx1) { var $1;
  4620. testCases=[];
  4621. _st(_st(_st(self)._selectedClasses())._select_((function(each){
  4622. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._selectedCategories())._includes_(_st(each)._category());
  4623. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._do_((function(each){
  4624. return smalltalk.withContext(function($ctx2) { return _st(testCases)._addAll_(_st(each)._buildSuite());
  4625. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  4626. $1=testCases;
  4627. return $1;
  4628. }, function($ctx1) {$ctx1.fill(self,"testCases",{testCases:testCases}, smalltalk.TestRunner)})}
  4629. }),
  4630. smalltalk.TestRunner);
  4631. smalltalk.addMethod(
  4632. "_toggleCategory_",
  4633. smalltalk.method({
  4634. selector: "toggleCategory:",
  4635. fn: function (aCategory){
  4636. var self=this;
  4637. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  4638. $1=_st(self)._isSelectedCategory_(aCategory);
  4639. if(smalltalk.assert($1)){
  4640. _st(self["@selectedCategories"])._remove_(aCategory);
  4641. } else {
  4642. _st(self["@selectedCategories"])._add_(aCategory);
  4643. };
  4644. $2=self;
  4645. _st($2)._updateCategoriesList();
  4646. $3=_st($2)._updateClassesList();
  4647. return self}, function($ctx1) {$ctx1.fill(self,"toggleCategory:",{aCategory:aCategory}, smalltalk.TestRunner)})}
  4648. }),
  4649. smalltalk.TestRunner);
  4650. smalltalk.addMethod(
  4651. "_toggleClass_",
  4652. smalltalk.method({
  4653. selector: "toggleClass:",
  4654. fn: function (aClass){
  4655. var self=this;
  4656. return smalltalk.withContext(function($ctx1) { var $1;
  4657. $1=_st(self)._isSelectedClass_(aClass);
  4658. if(smalltalk.assert($1)){
  4659. _st(self["@selectedClasses"])._remove_(aClass);
  4660. } else {
  4661. _st(self["@selectedClasses"])._add_(aClass);
  4662. };
  4663. _st(self)._updateClassesList();
  4664. return self}, function($ctx1) {$ctx1.fill(self,"toggleClass:",{aClass:aClass}, smalltalk.TestRunner)})}
  4665. }),
  4666. smalltalk.TestRunner);
  4667. smalltalk.addMethod(
  4668. "_updateCategoriesList",
  4669. smalltalk.method({
  4670. selector: "updateCategoriesList",
  4671. fn: function (){
  4672. var self=this;
  4673. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$7,$8,$9,$6,$2;
  4674. $1=self["@packagesList"];
  4675. $2=(function(html){
  4676. return smalltalk.withContext(function($ctx2) { $3=_st(html)._li();
  4677. _st($3)._class_("all");
  4678. _st($3)._with_("All");
  4679. $4=_st($3)._onClick_((function(){
  4680. return smalltalk.withContext(function($ctx3) { return _st(self)._selectAllCategories();
  4681. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  4682. $4;
  4683. $5=_st(self)._packages();
  4684. $6=(function(each){
  4685. var li;
  4686. return smalltalk.withContext(function($ctx3) { li=_st(html)._li();
  4687. li;
  4688. $7=_st(_st(self)._selectedCategories())._includes_(each);
  4689. if(smalltalk.assert($7)){
  4690. _st(li)._class_("selected");
  4691. };
  4692. $8=li;
  4693. _st($8)._with_(each);
  4694. $9=_st($8)._onClick_((function(){
  4695. return smalltalk.withContext(function($ctx4) { return _st(self)._toggleCategory_(each);
  4696. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  4697. return $9;
  4698. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})});
  4699. return _st($5)._do_($6);
  4700. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})});
  4701. _st($1)._contents_($2);
  4702. return self}, function($ctx1) {$ctx1.fill(self,"updateCategoriesList",{}, smalltalk.TestRunner)})}
  4703. }),
  4704. smalltalk.TestRunner);
  4705. smalltalk.addMethod(
  4706. "_updateClassesList",
  4707. smalltalk.method({
  4708. selector: "updateClassesList",
  4709. fn: function (){
  4710. var self=this;
  4711. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$6,$8,$9,$10,$7,$2;
  4712. $1=self["@classesList"];
  4713. $2=(function(html){
  4714. return smalltalk.withContext(function($ctx2) { $3=_st(_st(self)._selectedCategories())._isEmpty();
  4715. if(! smalltalk.assert($3)){
  4716. $4=_st(html)._li();
  4717. _st($4)._class_("all");
  4718. _st($4)._with_("All");
  4719. $5=_st($4)._onClick_((function(){
  4720. return smalltalk.withContext(function($ctx3) { return _st(self)._selectAllClasses();
  4721. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  4722. $5;
  4723. };
  4724. $6=_st(self)._classes();
  4725. $7=(function(each){
  4726. var li;
  4727. return smalltalk.withContext(function($ctx3) { li=_st(html)._li();
  4728. li;
  4729. $8=_st(_st(self)._selectedClasses())._includes_(each);
  4730. if(smalltalk.assert($8)){
  4731. _st(li)._class_("selected");
  4732. };
  4733. $9=li;
  4734. _st($9)._with_(_st(each)._name());
  4735. $10=_st($9)._onClick_((function(){
  4736. return smalltalk.withContext(function($ctx4) { return _st(self)._toggleClass_(each);
  4737. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  4738. return $10;
  4739. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})});
  4740. return _st($6)._do_($7);
  4741. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})});
  4742. _st($1)._contents_($2);
  4743. return self}, function($ctx1) {$ctx1.fill(self,"updateClassesList",{}, smalltalk.TestRunner)})}
  4744. }),
  4745. smalltalk.TestRunner);
  4746. smalltalk.addMethod(
  4747. "_updateMethodsList",
  4748. smalltalk.method({
  4749. selector: "updateMethodsList",
  4750. fn: function (){
  4751. var self=this;
  4752. return smalltalk.withContext(function($ctx1) { _st(self["@methodsList"])._contents_((function(html){
  4753. return smalltalk.withContext(function($ctx2) { _st(self)._renderErrorsOn_(html);
  4754. return _st(self)._renderFailuresOn_(html);
  4755. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  4756. return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsList",{}, smalltalk.TestRunner)})}
  4757. }),
  4758. smalltalk.TestRunner);
  4759. smalltalk.addMethod(
  4760. "_updateStatusDiv",
  4761. smalltalk.method({
  4762. selector: "updateStatusDiv",
  4763. fn: function (){
  4764. var self=this;
  4765. return smalltalk.withContext(function($ctx1) { _st(self["@statusDiv"])._class_(_st("sunit status ").__comma(_st(self["@result"])._status()));
  4766. _st(self["@statusDiv"])._contents_((function(html){
  4767. return smalltalk.withContext(function($ctx2) { return _st(_st(html)._span())._with_(_st(self)._statusInfo());
  4768. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  4769. return self}, function($ctx1) {$ctx1.fill(self,"updateStatusDiv",{}, smalltalk.TestRunner)})}
  4770. }),
  4771. smalltalk.TestRunner);
  4772. smalltalk.addClass('Workspace', smalltalk.TabWidget, ['sourceArea'], 'IDE');
  4773. smalltalk.addMethod(
  4774. "_clearWorkspace",
  4775. smalltalk.method({
  4776. selector: "clearWorkspace",
  4777. fn: function (){
  4778. var self=this;
  4779. return smalltalk.withContext(function($ctx1) { _st(self["@sourceArea"])._clear();
  4780. return self}, function($ctx1) {$ctx1.fill(self,"clearWorkspace",{}, smalltalk.Workspace)})}
  4781. }),
  4782. smalltalk.Workspace);
  4783. smalltalk.addMethod(
  4784. "_doIt",
  4785. smalltalk.method({
  4786. selector: "doIt",
  4787. fn: function (){
  4788. var self=this;
  4789. return smalltalk.withContext(function($ctx1) { _st(self["@sourceArea"])._doIt();
  4790. return self}, function($ctx1) {$ctx1.fill(self,"doIt",{}, smalltalk.Workspace)})}
  4791. }),
  4792. smalltalk.Workspace);
  4793. smalltalk.addMethod(
  4794. "_fileIn",
  4795. smalltalk.method({
  4796. selector: "fileIn",
  4797. fn: function (){
  4798. var self=this;
  4799. return smalltalk.withContext(function($ctx1) { _st(self["@sourceArea"])._fileIn();
  4800. return self}, function($ctx1) {$ctx1.fill(self,"fileIn",{}, smalltalk.Workspace)})}
  4801. }),
  4802. smalltalk.Workspace);
  4803. smalltalk.addMethod(
  4804. "_inspectIt",
  4805. smalltalk.method({
  4806. selector: "inspectIt",
  4807. fn: function (){
  4808. var self=this;
  4809. return smalltalk.withContext(function($ctx1) { _st(self["@sourceArea"])._inspectIt();
  4810. return self}, function($ctx1) {$ctx1.fill(self,"inspectIt",{}, smalltalk.Workspace)})}
  4811. }),
  4812. smalltalk.Workspace);
  4813. smalltalk.addMethod(
  4814. "_label",
  4815. smalltalk.method({
  4816. selector: "label",
  4817. fn: function (){
  4818. var self=this;
  4819. return smalltalk.withContext(function($ctx1) { return "Workspace";
  4820. }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.Workspace)})}
  4821. }),
  4822. smalltalk.Workspace);
  4823. smalltalk.addMethod(
  4824. "_printIt",
  4825. smalltalk.method({
  4826. selector: "printIt",
  4827. fn: function (){
  4828. var self=this;
  4829. return smalltalk.withContext(function($ctx1) { _st(self["@sourceArea"])._printIt();
  4830. return self}, function($ctx1) {$ctx1.fill(self,"printIt",{}, smalltalk.Workspace)})}
  4831. }),
  4832. smalltalk.Workspace);
  4833. smalltalk.addMethod(
  4834. "_renderBoxOn_",
  4835. smalltalk.method({
  4836. selector: "renderBoxOn:",
  4837. fn: function (html){
  4838. var self=this;
  4839. return smalltalk.withContext(function($ctx1) { self["@sourceArea"]=_st((smalltalk.SourceArea || SourceArea))._new();
  4840. _st(self["@sourceArea"])._renderOn_(html);
  4841. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html}, smalltalk.Workspace)})}
  4842. }),
  4843. smalltalk.Workspace);
  4844. smalltalk.addMethod(
  4845. "_renderButtonsOn_",
  4846. smalltalk.method({
  4847. selector: "renderButtonsOn:",
  4848. fn: function (html){
  4849. var self=this;
  4850. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10;
  4851. $1=_st(html)._button();
  4852. _st($1)._with_("DoIt");
  4853. _st($1)._title_("ctrl+d");
  4854. $2=_st($1)._onClick_((function(){
  4855. return smalltalk.withContext(function($ctx2) { return _st(self)._doIt();
  4856. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  4857. $3=_st(html)._button();
  4858. _st($3)._with_("PrintIt");
  4859. _st($3)._title_("ctrl+p");
  4860. $4=_st($3)._onClick_((function(){
  4861. return smalltalk.withContext(function($ctx2) { return _st(self)._printIt();
  4862. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  4863. $5=_st(html)._button();
  4864. _st($5)._with_("InspectIt");
  4865. _st($5)._title_("ctrl+i");
  4866. $6=_st($5)._onClick_((function(){
  4867. return smalltalk.withContext(function($ctx2) { return _st(self)._inspectIt();
  4868. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  4869. $7=_st(html)._button();
  4870. _st($7)._with_("FileIn");
  4871. _st($7)._title_("ctrl+f");
  4872. $8=_st($7)._onClick_((function(){
  4873. return smalltalk.withContext(function($ctx2) { return _st(self)._fileIn();
  4874. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  4875. $9=_st(html)._button();
  4876. _st($9)._with_("Clear workspace");
  4877. $10=_st($9)._onClick_((function(){
  4878. return smalltalk.withContext(function($ctx2) { return _st(self)._clearWorkspace();
  4879. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  4880. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.Workspace)})}
  4881. }),
  4882. smalltalk.Workspace);
  4883. smalltalk.addMethod(
  4884. "_show",
  4885. smalltalk.method({
  4886. selector: "show",
  4887. fn: function (){
  4888. var self=this;
  4889. return smalltalk.withContext(function($ctx1) { smalltalk.TabWidget.fn.prototype._show.apply(_st(self), []);
  4890. _st(self["@sourceArea"])._focus();
  4891. return self}, function($ctx1) {$ctx1.fill(self,"show",{}, smalltalk.Workspace)})}
  4892. }),
  4893. smalltalk.Workspace);
  4894. smalltalk.addMethod(
  4895. "_inspect",
  4896. smalltalk.method({
  4897. selector: "inspect",
  4898. fn: function (){
  4899. var self=this;
  4900. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4901. $1=_st((smalltalk.Inspector || Inspector))._new();
  4902. _st($1)._inspect_(self);
  4903. $2=_st($1)._open();
  4904. return self}, function($ctx1) {$ctx1.fill(self,"inspect",{}, smalltalk.Object)})}
  4905. }),
  4906. smalltalk.Object);
  4907. smalltalk.addMethod(
  4908. "_inspectOn_",
  4909. smalltalk.method({
  4910. selector: "inspectOn:",
  4911. fn: function (anInspector){
  4912. var self=this;
  4913. var variables;
  4914. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4915. variables=_st((smalltalk.Dictionary || Dictionary))._new();
  4916. _st(variables)._at_put_("#self",self);
  4917. _st(_st(_st(self)._class())._allInstanceVariableNames())._do_((function(each){
  4918. return smalltalk.withContext(function($ctx2) { return _st(variables)._at_put_(each,_st(self)._instVarAt_(each));
  4919. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  4920. $1=anInspector;
  4921. _st($1)._setLabel_(_st(self)._printString());
  4922. $2=_st($1)._setVariables_(variables);
  4923. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables}, smalltalk.Object)})}
  4924. }),
  4925. smalltalk.Object);
  4926. smalltalk.addMethod(
  4927. "_inspectOn_",
  4928. smalltalk.method({
  4929. selector: "inspectOn:",
  4930. fn: function (anInspector){
  4931. var self=this;
  4932. var variables;
  4933. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4934. variables=_st((smalltalk.Dictionary || Dictionary))._new();
  4935. _st(variables)._at_put_("#self",self);
  4936. _st(self)._withIndexDo_((function(each,i){
  4937. return smalltalk.withContext(function($ctx2) { return _st(variables)._at_put_(i,each);
  4938. }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1)})}));
  4939. $1=anInspector;
  4940. _st($1)._setLabel_(_st(self)._printString());
  4941. $2=_st($1)._setVariables_(variables);
  4942. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables}, smalltalk.Collection)})}
  4943. }),
  4944. smalltalk.Collection);
  4945. smalltalk.addMethod(
  4946. "_inspectOn_",
  4947. smalltalk.method({
  4948. selector: "inspectOn:",
  4949. fn: function (anInspector){
  4950. var self=this;
  4951. var variables;
  4952. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4953. variables=_st((smalltalk.Dictionary || Dictionary))._new();
  4954. _st(variables)._at_put_("#self",self);
  4955. _st(variables)._at_put_("#keys",_st(self)._keys());
  4956. _st(self)._keysAndValuesDo_((function(key,value){
  4957. return smalltalk.withContext(function($ctx2) { return _st(variables)._at_put_(key,value);
  4958. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1)})}));
  4959. $1=anInspector;
  4960. _st($1)._setLabel_(_st(self)._printString());
  4961. $2=_st($1)._setVariables_(variables);
  4962. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables}, smalltalk.HashedCollection)})}
  4963. }),
  4964. smalltalk.HashedCollection);
  4965. smalltalk.addMethod(
  4966. "_inspectOn_",
  4967. smalltalk.method({
  4968. selector: "inspectOn:",
  4969. fn: function (anInspector){
  4970. var self=this;
  4971. var label;
  4972. return smalltalk.withContext(function($ctx1) { var $1;
  4973. smalltalk.CharacterArray.fn.prototype._inspectOn_.apply(_st(self), [anInspector]);
  4974. $1=_st(_st(_st(self)._printString())._size()).__gt((30));
  4975. if(smalltalk.assert($1)){
  4976. label=_st(_st(_st(self)._printString())._copyFrom_to_((1),(30))).__comma("...'");
  4977. label;
  4978. } else {
  4979. label=_st(self)._printString();
  4980. label;
  4981. };
  4982. _st(anInspector)._setLabel_(label);
  4983. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,label:label}, smalltalk.String)})}
  4984. }),
  4985. smalltalk.String);
  4986. smalltalk.addMethod(
  4987. "_inspectOn_",
  4988. smalltalk.method({
  4989. selector: "inspectOn:",
  4990. fn: function (anInspector){
  4991. var self=this;
  4992. var variables;
  4993. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4994. variables=_st((smalltalk.Dictionary || Dictionary))._new();
  4995. _st(variables)._at_put_("#self",self);
  4996. _st(self["@elements"])._withIndexDo_((function(each,i){
  4997. return smalltalk.withContext(function($ctx2) { return _st(variables)._at_put_(i,each);
  4998. }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1)})}));
  4999. $1=anInspector;
  5000. _st($1)._setLabel_(_st(self)._printString());
  5001. $2=_st($1)._setVariables_(variables);
  5002. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables}, smalltalk.Set)})}
  5003. }),
  5004. smalltalk.Set);
  5005. smalltalk.addMethod(
  5006. "_inspectOn_",
  5007. smalltalk.method({
  5008. selector: "inspectOn:",
  5009. fn: function (anInspector){
  5010. var self=this;
  5011. var variables;
  5012. return smalltalk.withContext(function($ctx1) { var $1,$2;
  5013. variables=_st((smalltalk.Dictionary || Dictionary))._new();
  5014. _st(variables)._at_put_("#self",self);
  5015. _st(variables)._at_put_("#year",_st(self)._year());
  5016. _st(variables)._at_put_("#month",_st(self)._month());
  5017. _st(variables)._at_put_("#day",_st(self)._day());
  5018. _st(variables)._at_put_("#hours",_st(self)._hours());
  5019. _st(variables)._at_put_("#minutes",_st(self)._minutes());
  5020. _st(variables)._at_put_("#seconds",_st(self)._seconds());
  5021. _st(variables)._at_put_("#milliseconds",_st(self)._milliseconds());
  5022. $1=anInspector;
  5023. _st($1)._setLabel_(_st(self)._printString());
  5024. $2=_st($1)._setVariables_(variables);
  5025. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables}, smalltalk.Date)})}
  5026. }),
  5027. smalltalk.Date);
  5028. smalltalk.addMethod(
  5029. "_inspectOn_",
  5030. smalltalk.method({
  5031. selector: "inspectOn:",
  5032. fn: function (anInspector){
  5033. var self=this;
  5034. var variables;
  5035. return smalltalk.withContext(function($ctx1) { var $1,$2;
  5036. variables=_st((smalltalk.Dictionary || Dictionary))._new();
  5037. _st(variables)._at_put_("#self",self);
  5038. _st(variables)._at_put_("#home",_st(self)._home());
  5039. _st(variables)._at_put_("#receiver",_st(self)._receiver());
  5040. _st(variables)._at_put_("#selector",_st(self)._selector());
  5041. _st(variables)._at_put_("#temps",_st(self)._temps());
  5042. _st(_st(_st(self)._class())._instanceVariableNames())._do_((function(each){
  5043. return smalltalk.withContext(function($ctx2) { return _st(variables)._at_put_(each,_st(self)._instVarAt_(each));
  5044. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  5045. $1=anInspector;
  5046. _st($1)._setLabel_(_st(self)._printString());
  5047. $2=_st($1)._setVariables_(variables);
  5048. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables}, smalltalk.MethodContext)})}
  5049. }),
  5050. smalltalk.MethodContext);