2
0

IDE.deploy.js 188 KB

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