IDE.deploy.js 157 KB

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