1
0

IDE.deploy.js 192 KB

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