IDE.deploy.js 138 KB

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