IDE.deploy.js 198 KB

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