IDE.deploy.js 189 KB

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