Helios-Browser.js 184 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707
  1. smalltalk.addPackage('Helios-Browser');
  2. smalltalk.addClass('HLBrowser', smalltalk.HLWidget, ['model', 'packagesListWidget', 'classesListWidget', 'protocolsListWidget', 'methodsListWidget', 'sourceWidget', 'bottomDiv'], 'Helios-Browser');
  3. smalltalk.addMethod(
  4. smalltalk.method({
  5. selector: "canHaveFocus",
  6. category: 'testing',
  7. fn: function (){
  8. var self=this;
  9. return smalltalk.withContext(function($ctx1) {
  10. return true;
  11. }, function($ctx1) {$ctx1.fill(self,"canHaveFocus",{},smalltalk.HLBrowser)})},
  12. args: [],
  13. source: "canHaveFocus\x0a\x09^ true",
  14. messageSends: [],
  15. referencedClasses: []
  16. }),
  17. smalltalk.HLBrowser);
  18. smalltalk.addMethod(
  19. smalltalk.method({
  20. selector: "classesListWidget",
  21. category: 'widgets',
  22. fn: function (){
  23. var self=this;
  24. function $HLClassesListWidget(){return smalltalk.HLClassesListWidget||(typeof HLClassesListWidget=="undefined"?nil:HLClassesListWidget)}
  25. return smalltalk.withContext(function($ctx1) {
  26. var $2,$1;
  27. $2=self["@classesListWidget"];
  28. if(($receiver = $2) == nil || $receiver == undefined){
  29. self["@classesListWidget"]=_st($HLClassesListWidget())._on_(_st(self)._model());
  30. self["@classesListWidget"];
  31. $1=_st(self["@classesListWidget"])._next_(_st(self)._protocolsListWidget());
  32. } else {
  33. $1=$2;
  34. };
  35. return $1;
  36. }, function($ctx1) {$ctx1.fill(self,"classesListWidget",{},smalltalk.HLBrowser)})},
  37. args: [],
  38. source: "classesListWidget\x0a\x09^ classesListWidget ifNil: [\x0a \x09classesListWidget := HLClassesListWidget on: self model.\x0a\x09\x09classesListWidget next: self protocolsListWidget ]",
  39. messageSends: ["ifNil:", "on:", "model", "next:", "protocolsListWidget"],
  40. referencedClasses: ["HLClassesListWidget"]
  41. }),
  42. smalltalk.HLBrowser);
  43. smalltalk.addMethod(
  44. smalltalk.method({
  45. selector: "environment",
  46. category: 'accessing',
  47. fn: function (){
  48. var self=this;
  49. return smalltalk.withContext(function($ctx1) {
  50. var $1;
  51. $1=_st(_st(self)._model())._environment();
  52. return $1;
  53. }, function($ctx1) {$ctx1.fill(self,"environment",{},smalltalk.HLBrowser)})},
  54. args: [],
  55. source: "environment\x0a\x09^ self model environment",
  56. messageSends: ["environment", "model"],
  57. referencedClasses: []
  58. }),
  59. smalltalk.HLBrowser);
  60. smalltalk.addMethod(
  61. smalltalk.method({
  62. selector: "focus",
  63. category: 'actions',
  64. fn: function (){
  65. var self=this;
  66. return smalltalk.withContext(function($ctx1) {
  67. var $1;
  68. $1=_st(_st(self)._packagesListWidget())._focus();
  69. return $1;
  70. }, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLBrowser)})},
  71. args: [],
  72. source: "focus\x0a\x09^ self packagesListWidget focus",
  73. messageSends: ["focus", "packagesListWidget"],
  74. referencedClasses: []
  75. }),
  76. smalltalk.HLBrowser);
  77. smalltalk.addMethod(
  78. smalltalk.method({
  79. selector: "methodsListWidget",
  80. category: 'widgets',
  81. fn: function (){
  82. var self=this;
  83. function $HLMethodsListWidget(){return smalltalk.HLMethodsListWidget||(typeof HLMethodsListWidget=="undefined"?nil:HLMethodsListWidget)}
  84. return smalltalk.withContext(function($ctx1) {
  85. var $2,$1;
  86. $2=self["@methodsListWidget"];
  87. if(($receiver = $2) == nil || $receiver == undefined){
  88. self["@methodsListWidget"]=_st($HLMethodsListWidget())._on_(_st(self)._model());
  89. self["@methodsListWidget"];
  90. $1=_st(self["@methodsListWidget"])._next_(_st(self)._sourceWidget());
  91. } else {
  92. $1=$2;
  93. };
  94. return $1;
  95. }, function($ctx1) {$ctx1.fill(self,"methodsListWidget",{},smalltalk.HLBrowser)})},
  96. args: [],
  97. source: "methodsListWidget\x0a\x09^ methodsListWidget ifNil: [\x0a \x09methodsListWidget := HLMethodsListWidget on: self model.\x0a\x09\x09methodsListWidget next: self sourceWidget ]",
  98. messageSends: ["ifNil:", "on:", "model", "next:", "sourceWidget"],
  99. referencedClasses: ["HLMethodsListWidget"]
  100. }),
  101. smalltalk.HLBrowser);
  102. smalltalk.addMethod(
  103. smalltalk.method({
  104. selector: "model",
  105. category: 'accessing',
  106. fn: function (){
  107. var self=this;
  108. function $HLBrowserModel(){return smalltalk.HLBrowserModel||(typeof HLBrowserModel=="undefined"?nil:HLBrowserModel)}
  109. return smalltalk.withContext(function($ctx1) {
  110. var $2,$1;
  111. $2=self["@model"];
  112. if(($receiver = $2) == nil || $receiver == undefined){
  113. self["@model"]=_st($HLBrowserModel())._new();
  114. $1=self["@model"];
  115. } else {
  116. $1=$2;
  117. };
  118. return $1;
  119. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLBrowser)})},
  120. args: [],
  121. source: "model\x0a\x09^ model ifNil: [ model := HLBrowserModel new ]",
  122. messageSends: ["ifNil:", "new"],
  123. referencedClasses: ["HLBrowserModel"]
  124. }),
  125. smalltalk.HLBrowser);
  126. smalltalk.addMethod(
  127. smalltalk.method({
  128. selector: "model:",
  129. category: 'accessing',
  130. fn: function (aModel){
  131. var self=this;
  132. return smalltalk.withContext(function($ctx1) {
  133. self["@model"]=aModel;
  134. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLBrowser)})},
  135. args: ["aModel"],
  136. source: "model: aModel\x0a\x09model := aModel",
  137. messageSends: [],
  138. referencedClasses: []
  139. }),
  140. smalltalk.HLBrowser);
  141. smalltalk.addMethod(
  142. smalltalk.method({
  143. selector: "packagesListWidget",
  144. category: 'widgets',
  145. fn: function (){
  146. var self=this;
  147. function $HLPackagesListWidget(){return smalltalk.HLPackagesListWidget||(typeof HLPackagesListWidget=="undefined"?nil:HLPackagesListWidget)}
  148. return smalltalk.withContext(function($ctx1) {
  149. var $2,$1;
  150. $2=self["@packagesListWidget"];
  151. if(($receiver = $2) == nil || $receiver == undefined){
  152. self["@packagesListWidget"]=_st($HLPackagesListWidget())._on_(_st(self)._model());
  153. self["@packagesListWidget"];
  154. $1=_st(self["@packagesListWidget"])._next_(_st(self)._classesListWidget());
  155. } else {
  156. $1=$2;
  157. };
  158. return $1;
  159. }, function($ctx1) {$ctx1.fill(self,"packagesListWidget",{},smalltalk.HLBrowser)})},
  160. args: [],
  161. source: "packagesListWidget\x0a\x09^ packagesListWidget ifNil: [\x0a \x09packagesListWidget := HLPackagesListWidget on: self model.\x0a\x09\x09packagesListWidget next: self classesListWidget ]",
  162. messageSends: ["ifNil:", "on:", "model", "next:", "classesListWidget"],
  163. referencedClasses: ["HLPackagesListWidget"]
  164. }),
  165. smalltalk.HLBrowser);
  166. smalltalk.addMethod(
  167. smalltalk.method({
  168. selector: "protocolsListWidget",
  169. category: 'widgets',
  170. fn: function (){
  171. var self=this;
  172. function $HLProtocolsListWidget(){return smalltalk.HLProtocolsListWidget||(typeof HLProtocolsListWidget=="undefined"?nil:HLProtocolsListWidget)}
  173. return smalltalk.withContext(function($ctx1) {
  174. var $2,$1;
  175. $2=self["@protocolsListWidget"];
  176. if(($receiver = $2) == nil || $receiver == undefined){
  177. self["@protocolsListWidget"]=_st($HLProtocolsListWidget())._on_(_st(self)._model());
  178. self["@protocolsListWidget"];
  179. $1=_st(self["@protocolsListWidget"])._next_(_st(self)._methodsListWidget());
  180. } else {
  181. $1=$2;
  182. };
  183. return $1;
  184. }, function($ctx1) {$ctx1.fill(self,"protocolsListWidget",{},smalltalk.HLBrowser)})},
  185. args: [],
  186. source: "protocolsListWidget\x0a\x09^ protocolsListWidget ifNil: [\x0a \x09protocolsListWidget := HLProtocolsListWidget on: self model.\x0a\x09\x09protocolsListWidget next: self methodsListWidget ]",
  187. messageSends: ["ifNil:", "on:", "model", "next:", "methodsListWidget"],
  188. referencedClasses: ["HLProtocolsListWidget"]
  189. }),
  190. smalltalk.HLBrowser);
  191. smalltalk.addMethod(
  192. smalltalk.method({
  193. selector: "registerBindingsOn:",
  194. category: 'keybindings',
  195. fn: function (aBindingGroup){
  196. var self=this;
  197. function $HLBrowserCommand(){return smalltalk.HLBrowserCommand||(typeof HLBrowserCommand=="undefined"?nil:HLBrowserCommand)}
  198. return smalltalk.withContext(function($ctx1) {
  199. _st($HLBrowserCommand())._registerConcreteClassesOn_for_(aBindingGroup,_st(self)._model());
  200. return self}, function($ctx1) {$ctx1.fill(self,"registerBindingsOn:",{aBindingGroup:aBindingGroup},smalltalk.HLBrowser)})},
  201. args: ["aBindingGroup"],
  202. source: "registerBindingsOn: aBindingGroup\x0a\x09HLBrowserCommand \x0a\x09\x09registerConcreteClassesOn: aBindingGroup \x0a\x09\x09for: self model",
  203. messageSends: ["registerConcreteClassesOn:for:", "model"],
  204. referencedClasses: ["HLBrowserCommand"]
  205. }),
  206. smalltalk.HLBrowser);
  207. smalltalk.addMethod(
  208. smalltalk.method({
  209. selector: "renderContentOn:",
  210. category: 'rendering',
  211. fn: function (html){
  212. var self=this;
  213. function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
  214. function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  215. function $HLContainer(){return smalltalk.HLContainer||(typeof HLContainer=="undefined"?nil:HLContainer)}
  216. return smalltalk.withContext(function($ctx1) {
  217. _st(html)._with_(_st($HLContainer())._with_(_st($HLHorizontalSplitter())._with_with_(_st($HLVerticalSplitter())._with_with_(_st($HLVerticalSplitter())._with_with_(_st(self)._packagesListWidget(),_st(self)._classesListWidget()),_st($HLVerticalSplitter())._with_with_(_st(self)._protocolsListWidget(),_st(self)._methodsListWidget())),_st(self)._sourceWidget())));
  218. _st(_st(self)._packagesListWidget())._focus();
  219. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLBrowser)})},
  220. args: ["html"],
  221. source: "renderContentOn: html\x0a\x09html with: (HLContainer with: (HLHorizontalSplitter \x0a \x09with: (HLVerticalSplitter\x0a \x09with: (HLVerticalSplitter\x0a \x09with: self packagesListWidget\x0a with: self classesListWidget)\x0a with: (HLVerticalSplitter\x0a \x09with: self protocolsListWidget\x0a with: self methodsListWidget)) \x0a with: self sourceWidget)).\x0a\x09\x0a\x09self packagesListWidget focus",
  222. messageSends: ["with:", "with:with:", "packagesListWidget", "classesListWidget", "protocolsListWidget", "methodsListWidget", "sourceWidget", "focus"],
  223. referencedClasses: ["HLVerticalSplitter", "HLHorizontalSplitter", "HLContainer"]
  224. }),
  225. smalltalk.HLBrowser);
  226. smalltalk.addMethod(
  227. smalltalk.method({
  228. selector: "sourceWidget",
  229. category: 'widgets',
  230. fn: function (){
  231. var self=this;
  232. function $HLBrowserBottomWidget(){return smalltalk.HLBrowserBottomWidget||(typeof HLBrowserBottomWidget=="undefined"?nil:HLBrowserBottomWidget)}
  233. return smalltalk.withContext(function($ctx1) {
  234. var $2,$3,$4,$1;
  235. $2=self["@sourceWidget"];
  236. if(($receiver = $2) == nil || $receiver == undefined){
  237. $3=_st($HLBrowserBottomWidget())._new();
  238. _st($3)._model_(_st(self)._model());
  239. $4=_st($3)._yourself();
  240. self["@sourceWidget"]=$4;
  241. $1=self["@sourceWidget"];
  242. } else {
  243. $1=$2;
  244. };
  245. return $1;
  246. }, function($ctx1) {$ctx1.fill(self,"sourceWidget",{},smalltalk.HLBrowser)})},
  247. args: [],
  248. source: "sourceWidget\x0a\x09^ sourceWidget ifNil: [\x0a \x09sourceWidget := HLBrowserBottomWidget new\x0a\x09\x09\x09model: self model;\x0a\x09\x09\x09yourself ]",
  249. messageSends: ["ifNil:", "model:", "model", "new", "yourself"],
  250. referencedClasses: ["HLBrowserBottomWidget"]
  251. }),
  252. smalltalk.HLBrowser);
  253. smalltalk.HLBrowser.klass.iVarNames = ['nextId'];
  254. smalltalk.addMethod(
  255. smalltalk.method({
  256. selector: "canBeOpenAsTab",
  257. category: 'testing',
  258. fn: function (){
  259. var self=this;
  260. return smalltalk.withContext(function($ctx1) {
  261. return true;
  262. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLBrowser.klass)})},
  263. args: [],
  264. source: "canBeOpenAsTab\x0a\x09^ true",
  265. messageSends: [],
  266. referencedClasses: []
  267. }),
  268. smalltalk.HLBrowser.klass);
  269. smalltalk.addMethod(
  270. smalltalk.method({
  271. selector: "nextId",
  272. category: 'accessing',
  273. fn: function (){
  274. var self=this;
  275. return smalltalk.withContext(function($ctx1) {
  276. var $1,$2;
  277. $1=self["@nextId"];
  278. if(($receiver = $1) == nil || $receiver == undefined){
  279. self["@nextId"]=(0);
  280. self["@nextId"];
  281. } else {
  282. $1;
  283. };
  284. $2=_st("browser_").__comma(_st(_st(self["@nextId"]).__plus((1)))._asString());
  285. return $2;
  286. }, function($ctx1) {$ctx1.fill(self,"nextId",{},smalltalk.HLBrowser.klass)})},
  287. args: [],
  288. source: "nextId\x0a\x09nextId ifNil: [ nextId := 0 ].\x0a ^ 'browser_', (nextId + 1) asString",
  289. messageSends: ["ifNil:", ",", "asString", "+"],
  290. referencedClasses: []
  291. }),
  292. smalltalk.HLBrowser.klass);
  293. smalltalk.addMethod(
  294. smalltalk.method({
  295. selector: "tabLabel",
  296. category: 'accessing',
  297. fn: function (){
  298. var self=this;
  299. return smalltalk.withContext(function($ctx1) {
  300. return "Browser";
  301. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLBrowser.klass)})},
  302. args: [],
  303. source: "tabLabel\x0a\x09^ 'Browser'",
  304. messageSends: [],
  305. referencedClasses: []
  306. }),
  307. smalltalk.HLBrowser.klass);
  308. smalltalk.addMethod(
  309. smalltalk.method({
  310. selector: "tabPriority",
  311. category: 'accessing',
  312. fn: function (){
  313. var self=this;
  314. return smalltalk.withContext(function($ctx1) {
  315. var $1;
  316. $1=(0);
  317. return $1;
  318. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLBrowser.klass)})},
  319. args: [],
  320. source: "tabPriority\x0a\x09^ 0",
  321. messageSends: [],
  322. referencedClasses: []
  323. }),
  324. smalltalk.HLBrowser.klass);
  325. smalltalk.addClass('HLBrowserBottomWidget', smalltalk.HLWidget, ['model', 'codeWidget', 'documentationWidget', 'selectedWidget'], 'Helios-Browser');
  326. smalltalk.addMethod(
  327. smalltalk.method({
  328. selector: "canHaveFocus",
  329. category: 'testing',
  330. fn: function (){
  331. var self=this;
  332. return smalltalk.withContext(function($ctx1) {
  333. return true;
  334. }, function($ctx1) {$ctx1.fill(self,"canHaveFocus",{},smalltalk.HLBrowserBottomWidget)})},
  335. args: [],
  336. source: "canHaveFocus\x0a\x09^ true",
  337. messageSends: [],
  338. referencedClasses: []
  339. }),
  340. smalltalk.HLBrowserBottomWidget);
  341. smalltalk.addMethod(
  342. smalltalk.method({
  343. selector: "codeWidget",
  344. category: 'accessing',
  345. fn: function (){
  346. var self=this;
  347. function $HLBrowserCodeWidget(){return smalltalk.HLBrowserCodeWidget||(typeof HLBrowserCodeWidget=="undefined"?nil:HLBrowserCodeWidget)}
  348. return smalltalk.withContext(function($ctx1) {
  349. var $2,$3,$4,$1;
  350. $2=self["@codeWidget"];
  351. if(($receiver = $2) == nil || $receiver == undefined){
  352. $3=_st($HLBrowserCodeWidget())._new();
  353. _st($3)._browserModel_(_st(self)._model());
  354. $4=_st($3)._yourself();
  355. self["@codeWidget"]=$4;
  356. $1=self["@codeWidget"];
  357. } else {
  358. $1=$2;
  359. };
  360. return $1;
  361. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{},smalltalk.HLBrowserBottomWidget)})},
  362. args: [],
  363. source: "codeWidget\x0a\x09^ codeWidget ifNil: [ codeWidget := HLBrowserCodeWidget new\x0a\x09\x09browserModel: self model;\x0a\x09\x09yourself ]",
  364. messageSends: ["ifNil:", "browserModel:", "model", "new", "yourself"],
  365. referencedClasses: ["HLBrowserCodeWidget"]
  366. }),
  367. smalltalk.HLBrowserBottomWidget);
  368. smalltalk.addMethod(
  369. smalltalk.method({
  370. selector: "documentationWidget",
  371. category: 'accessing',
  372. fn: function (){
  373. var self=this;
  374. function $HLDocumentationWidget(){return smalltalk.HLDocumentationWidget||(typeof HLDocumentationWidget=="undefined"?nil:HLDocumentationWidget)}
  375. return smalltalk.withContext(function($ctx1) {
  376. var $2,$3,$4,$1;
  377. $2=self["@documentationWidget"];
  378. if(($receiver = $2) == nil || $receiver == undefined){
  379. $3=_st($HLDocumentationWidget())._new();
  380. _st($3)._model_(_st(self)._model());
  381. $4=_st($3)._yourself();
  382. self["@documentationWidget"]=$4;
  383. $1=self["@documentationWidget"];
  384. } else {
  385. $1=$2;
  386. };
  387. return $1;
  388. }, function($ctx1) {$ctx1.fill(self,"documentationWidget",{},smalltalk.HLBrowserBottomWidget)})},
  389. args: [],
  390. source: "documentationWidget\x0a\x09^ documentationWidget ifNil: [ documentationWidget := HLDocumentationWidget new\x0a\x09\x09model: self model;\x0a\x09\x09yourself ]",
  391. messageSends: ["ifNil:", "model:", "model", "new", "yourself"],
  392. referencedClasses: ["HLDocumentationWidget"]
  393. }),
  394. smalltalk.HLBrowserBottomWidget);
  395. smalltalk.addMethod(
  396. smalltalk.method({
  397. selector: "focus",
  398. category: 'actions',
  399. fn: function (){
  400. var self=this;
  401. return smalltalk.withContext(function($ctx1) {
  402. _st(_st(self)._selectedWidget())._focus();
  403. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLBrowserBottomWidget)})},
  404. args: [],
  405. source: "focus\x0a\x09self selectedWidget focus",
  406. messageSends: ["focus", "selectedWidget"],
  407. referencedClasses: []
  408. }),
  409. smalltalk.HLBrowserBottomWidget);
  410. smalltalk.addMethod(
  411. smalltalk.method({
  412. selector: "model",
  413. category: 'accessing',
  414. fn: function (){
  415. var self=this;
  416. return smalltalk.withContext(function($ctx1) {
  417. var $1;
  418. $1=self["@model"];
  419. return $1;
  420. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLBrowserBottomWidget)})},
  421. args: [],
  422. source: "model\x0a\x09^ model",
  423. messageSends: [],
  424. referencedClasses: []
  425. }),
  426. smalltalk.HLBrowserBottomWidget);
  427. smalltalk.addMethod(
  428. smalltalk.method({
  429. selector: "model:",
  430. category: 'accessing',
  431. fn: function (aModel){
  432. var self=this;
  433. return smalltalk.withContext(function($ctx1) {
  434. self["@model"]=aModel;
  435. _st(self)._observeModel();
  436. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLBrowserBottomWidget)})},
  437. args: ["aModel"],
  438. source: "model: aModel\x0a\x09model := aModel.\x0a\x09self observeModel",
  439. messageSends: ["observeModel"],
  440. referencedClasses: []
  441. }),
  442. smalltalk.HLBrowserBottomWidget);
  443. smalltalk.addMethod(
  444. smalltalk.method({
  445. selector: "observeModel",
  446. category: 'actions',
  447. fn: function (){
  448. var self=this;
  449. function $HLShowInstanceToggled(){return smalltalk.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
  450. function $HLShowCommentToggled(){return smalltalk.HLShowCommentToggled||(typeof HLShowCommentToggled=="undefined"?nil:HLShowCommentToggled)}
  451. return smalltalk.withContext(function($ctx1) {
  452. var $1,$2;
  453. $1=_st(_st(self)._model())._announcer();
  454. _st($1)._on_do_($HLShowInstanceToggled(),(function(){
  455. return smalltalk.withContext(function($ctx2) {
  456. return _st(self)._onShowInstanceToggled();
  457. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  458. $2=_st($1)._on_do_($HLShowCommentToggled(),(function(){
  459. return smalltalk.withContext(function($ctx2) {
  460. return _st(self)._onShowCommentToggled();
  461. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  462. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLBrowserBottomWidget)})},
  463. args: [],
  464. source: "observeModel\x0a\x09self model announcer \x0a\x09\x09on: HLShowInstanceToggled\x0a\x09\x09do: [ self onShowInstanceToggled ];\x0a\x09\x09on: HLShowCommentToggled\x0a\x09\x09do: [ self onShowCommentToggled ]",
  465. messageSends: ["on:do:", "onShowInstanceToggled", "announcer", "model", "onShowCommentToggled"],
  466. referencedClasses: ["HLShowInstanceToggled", "HLShowCommentToggled"]
  467. }),
  468. smalltalk.HLBrowserBottomWidget);
  469. smalltalk.addMethod(
  470. smalltalk.method({
  471. selector: "onShowCommentToggled",
  472. category: 'reactions',
  473. fn: function (){
  474. var self=this;
  475. return smalltalk.withContext(function($ctx1) {
  476. _st(self)._selectWidget_(_st(self)._documentationWidget());
  477. return self}, function($ctx1) {$ctx1.fill(self,"onShowCommentToggled",{},smalltalk.HLBrowserBottomWidget)})},
  478. args: [],
  479. source: "onShowCommentToggled\x0a\x09self selectWidget: self documentationWidget",
  480. messageSends: ["selectWidget:", "documentationWidget"],
  481. referencedClasses: []
  482. }),
  483. smalltalk.HLBrowserBottomWidget);
  484. smalltalk.addMethod(
  485. smalltalk.method({
  486. selector: "onShowInstanceToggled",
  487. category: 'reactions',
  488. fn: function (){
  489. var self=this;
  490. return smalltalk.withContext(function($ctx1) {
  491. _st(self)._selectWidget_(_st(self)._codeWidget());
  492. return self}, function($ctx1) {$ctx1.fill(self,"onShowInstanceToggled",{},smalltalk.HLBrowserBottomWidget)})},
  493. args: [],
  494. source: "onShowInstanceToggled\x0a\x09self selectWidget: self codeWidget",
  495. messageSends: ["selectWidget:", "codeWidget"],
  496. referencedClasses: []
  497. }),
  498. smalltalk.HLBrowserBottomWidget);
  499. smalltalk.addMethod(
  500. smalltalk.method({
  501. selector: "previous",
  502. category: 'accessing',
  503. fn: function (){
  504. var self=this;
  505. return smalltalk.withContext(function($ctx1) {
  506. return self}, function($ctx1) {$ctx1.fill(self,"previous",{},smalltalk.HLBrowserBottomWidget)})},
  507. args: [],
  508. source: "previous\x0a\x09\x22For navigation\x22",
  509. messageSends: [],
  510. referencedClasses: []
  511. }),
  512. smalltalk.HLBrowserBottomWidget);
  513. smalltalk.addMethod(
  514. smalltalk.method({
  515. selector: "previous:",
  516. category: 'accessing',
  517. fn: function (aWidget){
  518. var self=this;
  519. return smalltalk.withContext(function($ctx1) {
  520. return self}, function($ctx1) {$ctx1.fill(self,"previous:",{aWidget:aWidget},smalltalk.HLBrowserBottomWidget)})},
  521. args: ["aWidget"],
  522. source: "previous: aWidget\x0a\x09\x22For navigation\x22",
  523. messageSends: [],
  524. referencedClasses: []
  525. }),
  526. smalltalk.HLBrowserBottomWidget);
  527. smalltalk.addMethod(
  528. smalltalk.method({
  529. selector: "renderContentOn:",
  530. category: 'rendering',
  531. fn: function (html){
  532. var self=this;
  533. return smalltalk.withContext(function($ctx1) {
  534. _st(html)._with_(_st(self)._selectedWidget());
  535. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLBrowserBottomWidget)})},
  536. args: ["html"],
  537. source: "renderContentOn: html\x0a\x09html with: self selectedWidget",
  538. messageSends: ["with:", "selectedWidget"],
  539. referencedClasses: []
  540. }),
  541. smalltalk.HLBrowserBottomWidget);
  542. smalltalk.addMethod(
  543. smalltalk.method({
  544. selector: "selectWidget:",
  545. category: 'actions',
  546. fn: function (aWidget){
  547. var self=this;
  548. return smalltalk.withContext(function($ctx1) {
  549. self["@selectedWidget"]=aWidget;
  550. _st(self)._refresh();
  551. return self}, function($ctx1) {$ctx1.fill(self,"selectWidget:",{aWidget:aWidget},smalltalk.HLBrowserBottomWidget)})},
  552. args: ["aWidget"],
  553. source: "selectWidget: aWidget\x0a\x09selectedWidget := aWidget.\x0a\x09self refresh",
  554. messageSends: ["refresh"],
  555. referencedClasses: []
  556. }),
  557. smalltalk.HLBrowserBottomWidget);
  558. smalltalk.addMethod(
  559. smalltalk.method({
  560. selector: "selectedWidget",
  561. category: 'accessing',
  562. fn: function (){
  563. var self=this;
  564. return smalltalk.withContext(function($ctx1) {
  565. var $2,$1;
  566. $2=self["@selectedWidget"];
  567. if(($receiver = $2) == nil || $receiver == undefined){
  568. self["@selectedWidget"]=_st(self)._codeWidget();
  569. $1=self["@selectedWidget"];
  570. } else {
  571. $1=$2;
  572. };
  573. return $1;
  574. }, function($ctx1) {$ctx1.fill(self,"selectedWidget",{},smalltalk.HLBrowserBottomWidget)})},
  575. args: [],
  576. source: "selectedWidget\x0a\x09^ selectedWidget ifNil: [ selectedWidget := self codeWidget ]",
  577. messageSends: ["ifNil:", "codeWidget"],
  578. referencedClasses: []
  579. }),
  580. smalltalk.HLBrowserBottomWidget);
  581. smalltalk.addClass('HLBrowserListWidget', smalltalk.HLNavigationListWidget, ['model'], 'Helios-Browser');
  582. smalltalk.addMethod(
  583. smalltalk.method({
  584. selector: "activateListItem:",
  585. category: 'actions',
  586. fn: function (anItem){
  587. var self=this;
  588. return smalltalk.withContext(function($ctx1) {
  589. _st(_st(self)._model())._withChangesDo_((function(){
  590. return smalltalk.withContext(function($ctx2) {
  591. return smalltalk.HLNavigationListWidget.fn.prototype._activateListItem_.apply(_st(self), [anItem]);
  592. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  593. return self}, function($ctx1) {$ctx1.fill(self,"activateListItem:",{anItem:anItem},smalltalk.HLBrowserListWidget)})},
  594. args: ["anItem"],
  595. source: "activateListItem: anItem\x0a\x09self model withChangesDo: [ super activateListItem: anItem ]",
  596. messageSends: ["withChangesDo:", "activateListItem:", "model"],
  597. referencedClasses: []
  598. }),
  599. smalltalk.HLBrowserListWidget);
  600. smalltalk.addMethod(
  601. smalltalk.method({
  602. selector: "activateNextListItem",
  603. category: 'actions',
  604. fn: function (){
  605. var self=this;
  606. return smalltalk.withContext(function($ctx1) {
  607. _st(_st(self)._model())._withChangesDo_((function(){
  608. return smalltalk.withContext(function($ctx2) {
  609. return smalltalk.HLNavigationListWidget.fn.prototype._activateNextListItem.apply(_st(self), []);
  610. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  611. return self}, function($ctx1) {$ctx1.fill(self,"activateNextListItem",{},smalltalk.HLBrowserListWidget)})},
  612. args: [],
  613. source: "activateNextListItem\x0a\x09self model withChangesDo: [ super activateNextListItem ]",
  614. messageSends: ["withChangesDo:", "activateNextListItem", "model"],
  615. referencedClasses: []
  616. }),
  617. smalltalk.HLBrowserListWidget);
  618. smalltalk.addMethod(
  619. smalltalk.method({
  620. selector: "activatePreviousListItem",
  621. category: 'actions',
  622. fn: function (){
  623. var self=this;
  624. return smalltalk.withContext(function($ctx1) {
  625. _st(_st(self)._model())._withChangesDo_((function(){
  626. return smalltalk.withContext(function($ctx2) {
  627. return smalltalk.HLNavigationListWidget.fn.prototype._activatePreviousListItem.apply(_st(self), []);
  628. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  629. return self}, function($ctx1) {$ctx1.fill(self,"activatePreviousListItem",{},smalltalk.HLBrowserListWidget)})},
  630. args: [],
  631. source: "activatePreviousListItem\x0a\x09self model withChangesDo: [ super activatePreviousListItem ]",
  632. messageSends: ["withChangesDo:", "activatePreviousListItem", "model"],
  633. referencedClasses: []
  634. }),
  635. smalltalk.HLBrowserListWidget);
  636. smalltalk.addMethod(
  637. smalltalk.method({
  638. selector: "commandCategory",
  639. category: 'accessing',
  640. fn: function (){
  641. var self=this;
  642. return smalltalk.withContext(function($ctx1) {
  643. var $1;
  644. $1=_st(self)._label();
  645. return $1;
  646. }, function($ctx1) {$ctx1.fill(self,"commandCategory",{},smalltalk.HLBrowserListWidget)})},
  647. args: [],
  648. source: "commandCategory\x0a\x09^ self label",
  649. messageSends: ["label"],
  650. referencedClasses: []
  651. }),
  652. smalltalk.HLBrowserListWidget);
  653. smalltalk.addMethod(
  654. smalltalk.method({
  655. selector: "label",
  656. category: 'accessing',
  657. fn: function (){
  658. var self=this;
  659. return smalltalk.withContext(function($ctx1) {
  660. return "List";
  661. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLBrowserListWidget)})},
  662. args: [],
  663. source: "label\x0a\x09^ 'List'",
  664. messageSends: [],
  665. referencedClasses: []
  666. }),
  667. smalltalk.HLBrowserListWidget);
  668. smalltalk.addMethod(
  669. smalltalk.method({
  670. selector: "menuCommands",
  671. category: 'accessing',
  672. fn: function (){
  673. var self=this;
  674. function $HLBrowserCommand(){return smalltalk.HLBrowserCommand||(typeof HLBrowserCommand=="undefined"?nil:HLBrowserCommand)}
  675. return smalltalk.withContext(function($ctx1) {
  676. var $1;
  677. $1=_st(_st(_st($HLBrowserCommand())._concreteClasses())._collect_((function(each){
  678. return smalltalk.withContext(function($ctx2) {
  679. return _st(each)._for_(_st(self)._model());
  680. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._select_((function(each){
  681. return smalltalk.withContext(function($ctx2) {
  682. return _st(_st(_st(each)._category()).__eq(_st(self)._commandCategory()))._and_((function(){
  683. return smalltalk.withContext(function($ctx3) {
  684. return _st(_st(each)._isAction())._and_((function(){
  685. return smalltalk.withContext(function($ctx4) {
  686. return _st(each)._isActive();
  687. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  688. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  689. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  690. return $1;
  691. }, function($ctx1) {$ctx1.fill(self,"menuCommands",{},smalltalk.HLBrowserListWidget)})},
  692. args: [],
  693. source: "menuCommands\x0a\x09\x22Answer a collection of commands to be put in the cog menu\x22\x0a\x09\x0a\x09^ (HLBrowserCommand concreteClasses \x0a\x09\x09collect: [ :each | each for: self model ])\x0a\x09\x09select: [ :each | \x0a\x09\x09\x09each category = self commandCategory and: [ \x0a\x09\x09\x09\x09each isAction and: [ each isActive ] ] ]",
  694. messageSends: ["select:", "and:", "isActive", "isAction", "=", "commandCategory", "category", "collect:", "for:", "model", "concreteClasses"],
  695. referencedClasses: ["HLBrowserCommand"]
  696. }),
  697. smalltalk.HLBrowserListWidget);
  698. smalltalk.addMethod(
  699. smalltalk.method({
  700. selector: "model",
  701. category: 'accessing',
  702. fn: function (){
  703. var self=this;
  704. return smalltalk.withContext(function($ctx1) {
  705. var $1;
  706. $1=self["@model"];
  707. return $1;
  708. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLBrowserListWidget)})},
  709. args: [],
  710. source: "model\x0a\x09^ model",
  711. messageSends: [],
  712. referencedClasses: []
  713. }),
  714. smalltalk.HLBrowserListWidget);
  715. smalltalk.addMethod(
  716. smalltalk.method({
  717. selector: "model:",
  718. category: 'accessing',
  719. fn: function (aBrowserModel){
  720. var self=this;
  721. return smalltalk.withContext(function($ctx1) {
  722. var $1,$2;
  723. self["@model"]=aBrowserModel;
  724. $1=self;
  725. _st($1)._observeSystem();
  726. $2=_st($1)._observeModel();
  727. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel},smalltalk.HLBrowserListWidget)})},
  728. args: ["aBrowserModel"],
  729. source: "model: aBrowserModel\x0a\x09model := aBrowserModel.\x0a \x0a self \x0a\x09\x09observeSystem;\x0a\x09\x09observeModel",
  730. messageSends: ["observeSystem", "observeModel"],
  731. referencedClasses: []
  732. }),
  733. smalltalk.HLBrowserListWidget);
  734. smalltalk.addMethod(
  735. smalltalk.method({
  736. selector: "observeModel",
  737. category: 'actions',
  738. fn: function (){
  739. var self=this;
  740. return smalltalk.withContext(function($ctx1) {
  741. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLBrowserListWidget)})},
  742. args: [],
  743. source: "observeModel",
  744. messageSends: [],
  745. referencedClasses: []
  746. }),
  747. smalltalk.HLBrowserListWidget);
  748. smalltalk.addMethod(
  749. smalltalk.method({
  750. selector: "observeSystem",
  751. category: 'actions',
  752. fn: function (){
  753. var self=this;
  754. return smalltalk.withContext(function($ctx1) {
  755. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLBrowserListWidget)})},
  756. args: [],
  757. source: "observeSystem",
  758. messageSends: [],
  759. referencedClasses: []
  760. }),
  761. smalltalk.HLBrowserListWidget);
  762. smalltalk.addMethod(
  763. smalltalk.method({
  764. selector: "renderContentOn:",
  765. category: 'rendering',
  766. fn: function (html){
  767. var self=this;
  768. return smalltalk.withContext(function($ctx1) {
  769. _st(self)._renderHeadOn_(html);
  770. smalltalk.HLNavigationListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  771. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLBrowserListWidget)})},
  772. args: ["html"],
  773. source: "renderContentOn: html\x0a\x09self renderHeadOn: html.\x09\x0a\x09super renderContentOn: html",
  774. messageSends: ["renderHeadOn:", "renderContentOn:"],
  775. referencedClasses: []
  776. }),
  777. smalltalk.HLBrowserListWidget);
  778. smalltalk.addMethod(
  779. smalltalk.method({
  780. selector: "renderHeadOn:",
  781. category: 'rendering',
  782. fn: function (html){
  783. var self=this;
  784. return smalltalk.withContext(function($ctx1) {
  785. var $1,$2;
  786. $1=_st(html)._div();
  787. _st($1)._class_("list-label");
  788. $2=_st($1)._with_((function(){
  789. return smalltalk.withContext(function($ctx2) {
  790. _st(html)._with_(_st(self)._label());
  791. return _st(self)._renderMenuOn_(html);
  792. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  793. return self}, function($ctx1) {$ctx1.fill(self,"renderHeadOn:",{html:html},smalltalk.HLBrowserListWidget)})},
  794. args: ["html"],
  795. source: "renderHeadOn: html\x0a\x09html div \x0a\x09\x09class: 'list-label';\x0a\x09\x09with: [\x0a\x09\x09\x09html with: self label.\x0a\x09\x09\x09self renderMenuOn: html ]",
  796. messageSends: ["class:", "div", "with:", "label", "renderMenuOn:"],
  797. referencedClasses: []
  798. }),
  799. smalltalk.HLBrowserListWidget);
  800. smalltalk.addMethod(
  801. smalltalk.method({
  802. selector: "renderMenuOn:",
  803. category: 'rendering',
  804. fn: function (html){
  805. var self=this;
  806. var commands;
  807. return smalltalk.withContext(function($ctx1) {
  808. var $1,$2,$3,$5,$6,$7,$9,$10,$8,$4;
  809. commands=_st(self)._menuCommands();
  810. $1=_st(commands)._isEmpty();
  811. if(smalltalk.assert($1)){
  812. $2=self;
  813. return $2;
  814. };
  815. $3=_st(html)._div();
  816. _st($3)._class_("btn-group cog");
  817. $4=_st($3)._with_((function(){
  818. return smalltalk.withContext(function($ctx2) {
  819. $5=_st(html)._a();
  820. _st($5)._class_("btn dropdown-toggle");
  821. _st($5)._at_put_("data-toggle","dropdown");
  822. $6=_st($5)._with_((function(){
  823. return smalltalk.withContext(function($ctx3) {
  824. return _st(_st(html)._tag_("i"))._class_("icon-cog");
  825. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  826. $6;
  827. $7=_st(html)._ul();
  828. _st($7)._class_("dropdown-menu pull-right");
  829. $8=_st($7)._with_((function(){
  830. return smalltalk.withContext(function($ctx3) {
  831. return _st(_st(self)._menuCommands())._do_((function(each){
  832. return smalltalk.withContext(function($ctx4) {
  833. return _st(_st(html)._li())._with_((function(){
  834. return smalltalk.withContext(function($ctx5) {
  835. $9=_st(html)._a();
  836. _st($9)._with_(_st(each)._menuLabel());
  837. $10=_st($9)._onClick_((function(){
  838. return smalltalk.withContext(function($ctx6) {
  839. return _st(self)._execute_(each);
  840. }, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}));
  841. return $10;
  842. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  843. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})}));
  844. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  845. return $8;
  846. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  847. return self}, function($ctx1) {$ctx1.fill(self,"renderMenuOn:",{html:html,commands:commands},smalltalk.HLBrowserListWidget)})},
  848. args: ["html"],
  849. source: "renderMenuOn: html\x0a\x09| commands |\x0a\x09\x0a\x09commands := self menuCommands.\x0a\x09commands isEmpty ifTrue: [ ^ self ].\x0a\x09\x0a\x09html div \x0a\x09\x09class: 'btn-group cog';\x0a\x09\x09with: [\x0a\x09\x09\x09html a\x0a\x09\x09\x09\x09class: 'btn dropdown-toggle';\x0a\x09\x09\x09\x09at: 'data-toggle' put: 'dropdown';\x0a\x09\x09\x09\x09with: [ (html tag: 'i') class: 'icon-cog' ].\x0a\x09\x09html ul \x0a\x09\x09\x09class: 'dropdown-menu pull-right';\x0a\x09\x09\x09with: [ \x0a\x09\x09\x09\x09self menuCommands do: [ :each | \x0a\x09\x09\x09\x09\x09html li with: [ html a \x0a\x09\x09\x09\x09\x09\x09with: each menuLabel;\x0a\x09\x09\x09\x09\x09\x09onClick: [ self execute: each ] ] ] ] ]",
  850. messageSends: ["menuCommands", "ifTrue:", "isEmpty", "class:", "div", "with:", "a", "at:put:", "tag:", "ul", "do:", "menuLabel", "onClick:", "execute:", "li"],
  851. referencedClasses: []
  852. }),
  853. smalltalk.HLBrowserListWidget);
  854. smalltalk.addMethod(
  855. smalltalk.method({
  856. selector: "selectedItem:",
  857. category: 'accessing',
  858. fn: function (anItem){
  859. var self=this;
  860. return smalltalk.withContext(function($ctx1) {
  861. smalltalk.HLNavigationListWidget.fn.prototype._selectedItem_.apply(_st(self), [anItem]);
  862. _st(self)._updateMenu();
  863. return self}, function($ctx1) {$ctx1.fill(self,"selectedItem:",{anItem:anItem},smalltalk.HLBrowserListWidget)})},
  864. args: ["anItem"],
  865. source: "selectedItem: anItem\x0a\x09\x22Selection changed, update the cog menu\x22\x0a\x09\x0a\x09super selectedItem: anItem.\x0a\x09self updateMenu",
  866. messageSends: ["selectedItem:", "updateMenu"],
  867. referencedClasses: []
  868. }),
  869. smalltalk.HLBrowserListWidget);
  870. smalltalk.addMethod(
  871. smalltalk.method({
  872. selector: "updateMenu",
  873. category: 'updating',
  874. fn: function (){
  875. var self=this;
  876. return smalltalk.withContext(function($ctx1) {
  877. _st(_st(_st(_st(self)._wrapper())._asJQuery())._find_(".cog"))._remove();
  878. _st((function(html){
  879. return smalltalk.withContext(function($ctx2) {
  880. return _st(self)._renderMenuOn_(html);
  881. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}))._appendToJQuery_(_st(_st(_st(self)._wrapper())._asJQuery())._find_(".list-label"));
  882. return self}, function($ctx1) {$ctx1.fill(self,"updateMenu",{},smalltalk.HLBrowserListWidget)})},
  883. args: [],
  884. source: "updateMenu\x0a\x09(self wrapper asJQuery find: '.cog') remove.\x0a\x09\x0a\x09[ :html | self renderMenuOn: html ] \x0a\x09\x09appendToJQuery: (self wrapper asJQuery find: '.list-label')",
  885. messageSends: ["remove", "find:", "asJQuery", "wrapper", "appendToJQuery:", "renderMenuOn:"],
  886. referencedClasses: []
  887. }),
  888. smalltalk.HLBrowserListWidget);
  889. smalltalk.addMethod(
  890. smalltalk.method({
  891. selector: "on:",
  892. category: 'instance creation',
  893. fn: function (aModel){
  894. var self=this;
  895. return smalltalk.withContext(function($ctx1) {
  896. var $2,$3,$1;
  897. $2=_st(self)._new();
  898. _st($2)._model_(aModel);
  899. $3=_st($2)._yourself();
  900. $1=$3;
  901. return $1;
  902. }, function($ctx1) {$ctx1.fill(self,"on:",{aModel:aModel},smalltalk.HLBrowserListWidget.klass)})},
  903. args: ["aModel"],
  904. source: "on: aModel\x0a\x09^ self new \x0a \x09model: aModel;\x0a yourself",
  905. messageSends: ["model:", "new", "yourself"],
  906. referencedClasses: []
  907. }),
  908. smalltalk.HLBrowserListWidget.klass);
  909. smalltalk.addClass('HLClassesListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  910. smalltalk.addMethod(
  911. smalltalk.method({
  912. selector: "focusMethodsListWidget",
  913. category: 'actions',
  914. fn: function (){
  915. var self=this;
  916. function $HLMethodsListFocus(){return smalltalk.HLMethodsListFocus||(typeof HLMethodsListFocus=="undefined"?nil:HLMethodsListFocus)}
  917. return smalltalk.withContext(function($ctx1) {
  918. _st(_st(_st(self)._model())._announcer())._announce_(_st($HLMethodsListFocus())._new());
  919. return self}, function($ctx1) {$ctx1.fill(self,"focusMethodsListWidget",{},smalltalk.HLClassesListWidget)})},
  920. args: [],
  921. source: "focusMethodsListWidget\x0a\x09self model announcer announce: HLMethodsListFocus new",
  922. messageSends: ["announce:", "new", "announcer", "model"],
  923. referencedClasses: ["HLMethodsListFocus"]
  924. }),
  925. smalltalk.HLClassesListWidget);
  926. smalltalk.addMethod(
  927. smalltalk.method({
  928. selector: "focusProtocolsListWidget",
  929. category: 'actions',
  930. fn: function (){
  931. var self=this;
  932. function $HLProtocolsListFocus(){return smalltalk.HLProtocolsListFocus||(typeof HLProtocolsListFocus=="undefined"?nil:HLProtocolsListFocus)}
  933. return smalltalk.withContext(function($ctx1) {
  934. _st(_st(_st(self)._model())._announcer())._announce_(_st($HLProtocolsListFocus())._new());
  935. return self}, function($ctx1) {$ctx1.fill(self,"focusProtocolsListWidget",{},smalltalk.HLClassesListWidget)})},
  936. args: [],
  937. source: "focusProtocolsListWidget\x0a\x09self model announcer announce: HLProtocolsListFocus new",
  938. messageSends: ["announce:", "new", "announcer", "model"],
  939. referencedClasses: ["HLProtocolsListFocus"]
  940. }),
  941. smalltalk.HLClassesListWidget);
  942. smalltalk.addMethod(
  943. smalltalk.method({
  944. selector: "getChildrenOf:",
  945. category: 'accessing',
  946. fn: function (aClass){
  947. var self=this;
  948. return smalltalk.withContext(function($ctx1) {
  949. var $1;
  950. $1=_st(_st(self)._items())._select_((function(each){
  951. return smalltalk.withContext(function($ctx2) {
  952. return _st(_st(each)._superclass()).__eq(aClass);
  953. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  954. return $1;
  955. }, function($ctx1) {$ctx1.fill(self,"getChildrenOf:",{aClass:aClass},smalltalk.HLClassesListWidget)})},
  956. args: ["aClass"],
  957. source: "getChildrenOf: aClass\x0a\x09^ self items select: [ :each | each superclass = aClass ]",
  958. messageSends: ["select:", "=", "superclass", "items"],
  959. referencedClasses: []
  960. }),
  961. smalltalk.HLClassesListWidget);
  962. smalltalk.addMethod(
  963. smalltalk.method({
  964. selector: "getRootClassesOf:",
  965. category: 'accessing',
  966. fn: function (aCollection){
  967. var self=this;
  968. return smalltalk.withContext(function($ctx1) {
  969. var $1;
  970. $1=_st(aCollection)._select_((function(each){
  971. return smalltalk.withContext(function($ctx2) {
  972. return _st(_st(aCollection)._includes_(_st(each)._superclass()))._not();
  973. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  974. return $1;
  975. }, function($ctx1) {$ctx1.fill(self,"getRootClassesOf:",{aCollection:aCollection},smalltalk.HLClassesListWidget)})},
  976. args: ["aCollection"],
  977. source: "getRootClassesOf: aCollection\x0a\x09^ aCollection select: [ :each |\x0a \x09\x09(aCollection includes: each superclass) not ]",
  978. messageSends: ["select:", "not", "includes:", "superclass"],
  979. referencedClasses: []
  980. }),
  981. smalltalk.HLClassesListWidget);
  982. smalltalk.addMethod(
  983. smalltalk.method({
  984. selector: "iconForItem:",
  985. category: 'accessing',
  986. fn: function (aClass){
  987. var self=this;
  988. return smalltalk.withContext(function($ctx1) {
  989. var $2,$1;
  990. $2=_st(_st(_st(aClass)._theNonMetaClass())._comment())._isEmpty();
  991. if(smalltalk.assert($2)){
  992. $1="icon-question-sign";
  993. } else {
  994. $1="icon-none";
  995. };
  996. return $1;
  997. }, function($ctx1) {$ctx1.fill(self,"iconForItem:",{aClass:aClass},smalltalk.HLClassesListWidget)})},
  998. args: ["aClass"],
  999. source: "iconForItem: aClass\x0a\x09^ aClass theNonMetaClass comment isEmpty\x0a \x09ifFalse: [ 'icon-none' ]\x0a \x09ifTrue: [ 'icon-question-sign' ]",
  1000. messageSends: ["ifFalse:ifTrue:", "isEmpty", "comment", "theNonMetaClass"],
  1001. referencedClasses: []
  1002. }),
  1003. smalltalk.HLClassesListWidget);
  1004. smalltalk.addMethod(
  1005. smalltalk.method({
  1006. selector: "label",
  1007. category: 'accessing',
  1008. fn: function (){
  1009. var self=this;
  1010. return smalltalk.withContext(function($ctx1) {
  1011. return "Classes";
  1012. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLClassesListWidget)})},
  1013. args: [],
  1014. source: "label\x0a\x09^ 'Classes'",
  1015. messageSends: [],
  1016. referencedClasses: []
  1017. }),
  1018. smalltalk.HLClassesListWidget);
  1019. smalltalk.addMethod(
  1020. smalltalk.method({
  1021. selector: "observeModel",
  1022. category: 'actions',
  1023. fn: function (){
  1024. var self=this;
  1025. function $HLPackageSelected(){return smalltalk.HLPackageSelected||(typeof HLPackageSelected=="undefined"?nil:HLPackageSelected)}
  1026. function $HLShowInstanceToggled(){return smalltalk.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
  1027. function $HLShowCommentToggled(){return smalltalk.HLShowCommentToggled||(typeof HLShowCommentToggled=="undefined"?nil:HLShowCommentToggled)}
  1028. function $HLClassSelected(){return smalltalk.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
  1029. function $HLClassesFocusRequested(){return smalltalk.HLClassesFocusRequested||(typeof HLClassesFocusRequested=="undefined"?nil:HLClassesFocusRequested)}
  1030. return smalltalk.withContext(function($ctx1) {
  1031. var $1,$2;
  1032. $1=_st(_st(self)._model())._announcer();
  1033. _st($1)._on_do_($HLPackageSelected(),(function(ann){
  1034. return smalltalk.withContext(function($ctx2) {
  1035. return _st(self)._onPackageSelected_(_st(ann)._item());
  1036. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1037. _st($1)._on_do_($HLShowInstanceToggled(),(function(ann){
  1038. return smalltalk.withContext(function($ctx2) {
  1039. return _st(self)._onShowInstanceToggled();
  1040. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1041. _st($1)._on_do_($HLShowCommentToggled(),(function(ann){
  1042. return smalltalk.withContext(function($ctx2) {
  1043. return _st(self)._onShowCommentToggled();
  1044. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1045. _st($1)._on_do_($HLClassSelected(),(function(ann){
  1046. return smalltalk.withContext(function($ctx2) {
  1047. return _st(self)._onClassSelected_(_st(ann)._item());
  1048. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1049. $2=_st($1)._on_do_($HLClassesFocusRequested(),(function(ann){
  1050. return smalltalk.withContext(function($ctx2) {
  1051. return _st(self)._onClassesFocusRequested();
  1052. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1053. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLClassesListWidget)})},
  1054. args: [],
  1055. source: "observeModel\x0a\x09self model announcer \x0a \x09on: HLPackageSelected do: [ :ann | self onPackageSelected: ann item ];\x0a \x09on: HLShowInstanceToggled do: [ :ann | self onShowInstanceToggled ];\x0a\x09\x09on: HLShowCommentToggled do: [ :ann | self onShowCommentToggled ];\x0a\x09\x09on: HLClassSelected do: [ :ann | self onClassSelected: ann item ];\x0a\x09\x09on: HLClassesFocusRequested do: [ :ann | self onClassesFocusRequested ]",
  1056. messageSends: ["on:do:", "onPackageSelected:", "item", "announcer", "model", "onShowInstanceToggled", "onShowCommentToggled", "onClassSelected:", "onClassesFocusRequested"],
  1057. referencedClasses: ["HLPackageSelected", "HLShowInstanceToggled", "HLShowCommentToggled", "HLClassSelected", "HLClassesFocusRequested"]
  1058. }),
  1059. smalltalk.HLClassesListWidget);
  1060. smalltalk.addMethod(
  1061. smalltalk.method({
  1062. selector: "observeSystem",
  1063. category: 'actions',
  1064. fn: function (){
  1065. var self=this;
  1066. function $ClassAdded(){return smalltalk.ClassAdded||(typeof ClassAdded=="undefined"?nil:ClassAdded)}
  1067. function $ClassRemoved(){return smalltalk.ClassRemoved||(typeof ClassRemoved=="undefined"?nil:ClassRemoved)}
  1068. function $ClassMoved(){return smalltalk.ClassMoved||(typeof ClassMoved=="undefined"?nil:ClassMoved)}
  1069. function $ClassRenamed(){return smalltalk.ClassRenamed||(typeof ClassRenamed=="undefined"?nil:ClassRenamed)}
  1070. return smalltalk.withContext(function($ctx1) {
  1071. var $1,$2;
  1072. $1=_st(_st(self)._model())._systemAnnouncer();
  1073. _st($1)._on_do_($ClassAdded(),(function(ann){
  1074. return smalltalk.withContext(function($ctx2) {
  1075. return _st(self)._onClassAdded_(_st(ann)._theClass());
  1076. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1077. _st($1)._on_do_($ClassRemoved(),(function(ann){
  1078. return smalltalk.withContext(function($ctx2) {
  1079. return _st(self)._onClassRemoved_(_st(ann)._theClass());
  1080. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1081. _st($1)._on_do_($ClassMoved(),(function(ann){
  1082. return smalltalk.withContext(function($ctx2) {
  1083. return _st(self)._onClassMoved_from_(_st(ann)._theClass(),_st(ann)._oldPackage());
  1084. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1085. $2=_st($1)._on_do_($ClassRenamed(),(function(ann){
  1086. return smalltalk.withContext(function($ctx2) {
  1087. return _st(self)._onClassRenamed_(_st(ann)._theClass());
  1088. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1089. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLClassesListWidget)})},
  1090. args: [],
  1091. source: "observeSystem\x0a\x09self model systemAnnouncer\x0a \x09on: ClassAdded\x0a do: [ :ann | self onClassAdded: ann theClass ];\x0a on: ClassRemoved\x0a do: [ :ann | self onClassRemoved: ann theClass ];\x0a\x09\x09on: ClassMoved\x0a do: [ :ann | self onClassMoved: ann theClass from: ann oldPackage ];\x0a\x09\x09on: ClassRenamed\x0a do: [ :ann | self onClassRenamed: ann theClass ]",
  1092. messageSends: ["on:do:", "onClassAdded:", "theClass", "systemAnnouncer", "model", "onClassRemoved:", "onClassMoved:from:", "oldPackage", "onClassRenamed:"],
  1093. referencedClasses: ["ClassAdded", "ClassRemoved", "ClassMoved", "ClassRenamed"]
  1094. }),
  1095. smalltalk.HLClassesListWidget);
  1096. smalltalk.addMethod(
  1097. smalltalk.method({
  1098. selector: "onClassAdded:",
  1099. category: 'reactions',
  1100. fn: function (aClass){
  1101. var self=this;
  1102. return smalltalk.withContext(function($ctx1) {
  1103. var $1,$2;
  1104. $1=_st(_st(_st(aClass)._package()).__eq(_st(_st(self)._model())._selectedPackage()))._or_((function(){
  1105. return smalltalk.withContext(function($ctx2) {
  1106. return _st(_st(self)._items())._includes_(aClass);
  1107. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1108. if(! smalltalk.assert($1)){
  1109. $2=self;
  1110. return $2;
  1111. };
  1112. _st(self)._setItemsForSelectedPackage();
  1113. _st(self)._refresh();
  1114. return self}, function($ctx1) {$ctx1.fill(self,"onClassAdded:",{aClass:aClass},smalltalk.HLClassesListWidget)})},
  1115. args: ["aClass"],
  1116. source: "onClassAdded: aClass\x0a\x09(aClass package = self model selectedPackage or: [\x0a\x09\x09self items includes: aClass ]) ifFalse: [ ^ self ].\x0a \x0a self setItemsForSelectedPackage.\x0a self refresh",
  1117. messageSends: ["ifFalse:", "or:", "includes:", "items", "=", "selectedPackage", "model", "package", "setItemsForSelectedPackage", "refresh"],
  1118. referencedClasses: []
  1119. }),
  1120. smalltalk.HLClassesListWidget);
  1121. smalltalk.addMethod(
  1122. smalltalk.method({
  1123. selector: "onClassMoved:from:",
  1124. category: 'reactions',
  1125. fn: function (aClass,aPackage){
  1126. var self=this;
  1127. return smalltalk.withContext(function($ctx1) {
  1128. var $1,$2,$3,$4,$5;
  1129. $1=_st(_st(aPackage).__eq(_st(_st(self)._model())._selectedPackage()))._or_((function(){
  1130. return smalltalk.withContext(function($ctx2) {
  1131. return _st(_st(aClass)._package()).__eq(_st(_st(self)._model())._selectedPackage());
  1132. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1133. if(! smalltalk.assert($1)){
  1134. $2=self;
  1135. return $2;
  1136. };
  1137. $3=_st(aPackage).__eq(_st(_st(self)._model())._selectedPackage());
  1138. if(smalltalk.assert($3)){
  1139. $4=self;
  1140. _st($4)._selectedItem_(nil);
  1141. $5=_st($4)._selectItem_(nil);
  1142. $5;
  1143. };
  1144. _st(self)._setItemsForSelectedPackage();
  1145. _st(self)._refresh();
  1146. return self}, function($ctx1) {$ctx1.fill(self,"onClassMoved:from:",{aClass:aClass,aPackage:aPackage},smalltalk.HLClassesListWidget)})},
  1147. args: ["aClass", "aPackage"],
  1148. source: "onClassMoved: aClass from: aPackage\x0a\x09(aPackage = self model selectedPackage or: [\x0a\x09\x09aClass package = self model selectedPackage ])\x0a\x09\x09\x09ifFalse: [ ^ self ].\x0a\x09\x0a\x09aPackage = self model selectedPackage ifTrue: [ \x0a\x09\x09self \x0a\x09\x09\x09selectedItem: nil;\x0a\x09\x09\x09selectItem: nil ].\x0a \x0a self setItemsForSelectedPackage.\x0a self refresh",
  1149. messageSends: ["ifFalse:", "or:", "=", "selectedPackage", "model", "package", "ifTrue:", "selectedItem:", "selectItem:", "setItemsForSelectedPackage", "refresh"],
  1150. referencedClasses: []
  1151. }),
  1152. smalltalk.HLClassesListWidget);
  1153. smalltalk.addMethod(
  1154. smalltalk.method({
  1155. selector: "onClassRemoved:",
  1156. category: 'reactions',
  1157. fn: function (aClass){
  1158. var self=this;
  1159. return smalltalk.withContext(function($ctx1) {
  1160. var $1,$2,$3;
  1161. $1=_st(_st(aClass)._package()).__eq(_st(_st(self)._model())._selectedPackage());
  1162. if(! smalltalk.assert($1)){
  1163. $2=self;
  1164. return $2;
  1165. };
  1166. $3=_st(aClass).__eq(_st(_st(self)._model())._selectedClass());
  1167. if(smalltalk.assert($3)){
  1168. _st(self)._selectItem_(nil);
  1169. };
  1170. _st(self)._setItemsForSelectedPackage();
  1171. _st(self)._refresh();
  1172. return self}, function($ctx1) {$ctx1.fill(self,"onClassRemoved:",{aClass:aClass},smalltalk.HLClassesListWidget)})},
  1173. args: ["aClass"],
  1174. source: "onClassRemoved: aClass\x0a\x09aClass package = self model selectedPackage ifFalse: [ ^ self ].\x0a aClass = self model selectedClass ifTrue: [ self selectItem: nil ].\x0a \x0a self setItemsForSelectedPackage.\x0a self refresh",
  1175. messageSends: ["ifFalse:", "=", "selectedPackage", "model", "package", "ifTrue:", "selectItem:", "selectedClass", "setItemsForSelectedPackage", "refresh"],
  1176. referencedClasses: []
  1177. }),
  1178. smalltalk.HLClassesListWidget);
  1179. smalltalk.addMethod(
  1180. smalltalk.method({
  1181. selector: "onClassRenamed:",
  1182. category: 'reactions',
  1183. fn: function (aClass){
  1184. var self=this;
  1185. return smalltalk.withContext(function($ctx1) {
  1186. var $1,$2;
  1187. $1=_st(_st(aClass)._package()).__eq(_st(_st(self)._model())._selectedPackage());
  1188. if(! smalltalk.assert($1)){
  1189. $2=self;
  1190. return $2;
  1191. };
  1192. _st(self)._setItemsForSelectedPackage();
  1193. _st(self)._refresh();
  1194. return self}, function($ctx1) {$ctx1.fill(self,"onClassRenamed:",{aClass:aClass},smalltalk.HLClassesListWidget)})},
  1195. args: ["aClass"],
  1196. source: "onClassRenamed: aClass\x0a\x09aClass package = self model selectedPackage ifFalse: [ ^ self ].\x0a \x0a self setItemsForSelectedPackage.\x0a self refresh",
  1197. messageSends: ["ifFalse:", "=", "selectedPackage", "model", "package", "setItemsForSelectedPackage", "refresh"],
  1198. referencedClasses: []
  1199. }),
  1200. smalltalk.HLClassesListWidget);
  1201. smalltalk.addMethod(
  1202. smalltalk.method({
  1203. selector: "onClassSelected:",
  1204. category: 'reactions',
  1205. fn: function (aClass){
  1206. var self=this;
  1207. var selectedClass;
  1208. return smalltalk.withContext(function($ctx1) {
  1209. var $1,$2,$3,$4,$5;
  1210. $1=aClass;
  1211. if(($receiver = $1) == nil || $receiver == undefined){
  1212. $2=self;
  1213. return $2;
  1214. } else {
  1215. $1;
  1216. };
  1217. selectedClass=_st(aClass)._theNonMetaClass();
  1218. _st(self)._selectedItem_(selectedClass);
  1219. $3=_st(self)._hasFocus();
  1220. if(! smalltalk.assert($3)){
  1221. $4=self;
  1222. _st($4)._activateItem_(selectedClass);
  1223. $5=_st($4)._focus();
  1224. $5;
  1225. };
  1226. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass,selectedClass:selectedClass},smalltalk.HLClassesListWidget)})},
  1227. args: ["aClass"],
  1228. source: "onClassSelected: aClass\x0a\x09| selectedClass |\x0a\x09\x0a\x09aClass ifNil: [ ^ self ].\x0a\x09\x0a\x09selectedClass := aClass theNonMetaClass.\x0a\x09self selectedItem: selectedClass.\x0a\x0a\x09self hasFocus ifFalse: [\x0a\x09\x09self \x0a\x09\x09\x09activateItem: selectedClass;\x0a\x09\x09\x09focus ]",
  1229. messageSends: ["ifNil:", "theNonMetaClass", "selectedItem:", "ifFalse:", "activateItem:", "focus", "hasFocus"],
  1230. referencedClasses: []
  1231. }),
  1232. smalltalk.HLClassesListWidget);
  1233. smalltalk.addMethod(
  1234. smalltalk.method({
  1235. selector: "onClassesFocusRequested",
  1236. category: 'reactions',
  1237. fn: function (){
  1238. var self=this;
  1239. return smalltalk.withContext(function($ctx1) {
  1240. _st(self)._focus();
  1241. return self}, function($ctx1) {$ctx1.fill(self,"onClassesFocusRequested",{},smalltalk.HLClassesListWidget)})},
  1242. args: [],
  1243. source: "onClassesFocusRequested\x0a\x09self focus",
  1244. messageSends: ["focus"],
  1245. referencedClasses: []
  1246. }),
  1247. smalltalk.HLClassesListWidget);
  1248. smalltalk.addMethod(
  1249. smalltalk.method({
  1250. selector: "onPackageSelected:",
  1251. category: 'reactions',
  1252. fn: function (aPackage){
  1253. var self=this;
  1254. return smalltalk.withContext(function($ctx1) {
  1255. _st(self)._selectedItem_(nil);
  1256. _st(self)._setItemsForSelectedPackage();
  1257. _st(self)._refresh();
  1258. return self}, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{aPackage:aPackage},smalltalk.HLClassesListWidget)})},
  1259. args: ["aPackage"],
  1260. source: "onPackageSelected: aPackage\x0a self selectedItem: nil.\x0a \x0a self setItemsForSelectedPackage.\x0a self refresh",
  1261. messageSends: ["selectedItem:", "setItemsForSelectedPackage", "refresh"],
  1262. referencedClasses: []
  1263. }),
  1264. smalltalk.HLClassesListWidget);
  1265. smalltalk.addMethod(
  1266. smalltalk.method({
  1267. selector: "onShowCommentToggled",
  1268. category: 'reactions',
  1269. fn: function (){
  1270. var self=this;
  1271. return smalltalk.withContext(function($ctx1) {
  1272. _st(self)._refresh();
  1273. return self}, function($ctx1) {$ctx1.fill(self,"onShowCommentToggled",{},smalltalk.HLClassesListWidget)})},
  1274. args: [],
  1275. source: "onShowCommentToggled\x0a\x09self refresh",
  1276. messageSends: ["refresh"],
  1277. referencedClasses: []
  1278. }),
  1279. smalltalk.HLClassesListWidget);
  1280. smalltalk.addMethod(
  1281. smalltalk.method({
  1282. selector: "onShowInstanceToggled",
  1283. category: 'reactions',
  1284. fn: function (){
  1285. var self=this;
  1286. return smalltalk.withContext(function($ctx1) {
  1287. _st(self)._refresh();
  1288. return self}, function($ctx1) {$ctx1.fill(self,"onShowInstanceToggled",{},smalltalk.HLClassesListWidget)})},
  1289. args: [],
  1290. source: "onShowInstanceToggled\x0a\x09self refresh",
  1291. messageSends: ["refresh"],
  1292. referencedClasses: []
  1293. }),
  1294. smalltalk.HLClassesListWidget);
  1295. smalltalk.addMethod(
  1296. smalltalk.method({
  1297. selector: "renderButtonsOn:",
  1298. category: 'rendering',
  1299. fn: function (html){
  1300. var self=this;
  1301. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  1302. return smalltalk.withContext(function($ctx1) {
  1303. var $1,$3,$4,$5,$6,$7,$8,$9,$10,$11,$2;
  1304. $1=_st(html)._div();
  1305. _st($1)._class_("btn-group");
  1306. $2=_st($1)._with_((function(){
  1307. return smalltalk.withContext(function($ctx2) {
  1308. $3=_st(html)._button();
  1309. _st($3)._class_(_st($String())._streamContents_((function(str){
  1310. return smalltalk.withContext(function($ctx3) {
  1311. _st(str)._nextPutAll_("btn");
  1312. $4=_st(self)._showInstance();
  1313. if(smalltalk.assert($4)){
  1314. return _st(str)._nextPutAll_(" active");
  1315. };
  1316. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  1317. _st($3)._with_("Instance");
  1318. $5=_st($3)._onClick_((function(){
  1319. return smalltalk.withContext(function($ctx3) {
  1320. return _st(self)._showInstance_(true);
  1321. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1322. $5;
  1323. $6=_st(html)._button();
  1324. _st($6)._class_(_st($String())._streamContents_((function(str){
  1325. return smalltalk.withContext(function($ctx3) {
  1326. _st(str)._nextPutAll_("btn");
  1327. $7=_st(self)._showClass();
  1328. if(smalltalk.assert($7)){
  1329. return _st(str)._nextPutAll_(" active");
  1330. };
  1331. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  1332. _st($6)._with_("Class");
  1333. $8=_st($6)._onClick_((function(){
  1334. return smalltalk.withContext(function($ctx3) {
  1335. return _st(self)._showInstance_(false);
  1336. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1337. $8;
  1338. $9=_st(html)._button();
  1339. _st($9)._class_(_st($String())._streamContents_((function(str){
  1340. return smalltalk.withContext(function($ctx3) {
  1341. _st(str)._nextPutAll_("btn");
  1342. $10=_st(self)._showComment();
  1343. if(smalltalk.assert($10)){
  1344. return _st(str)._nextPutAll_(" active");
  1345. };
  1346. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  1347. _st($9)._with_("Doc");
  1348. $11=_st($9)._onClick_((function(){
  1349. return smalltalk.withContext(function($ctx3) {
  1350. return _st(self)._showComment_(true);
  1351. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1352. return $11;
  1353. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1354. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLClassesListWidget)})},
  1355. args: ["html"],
  1356. source: "renderButtonsOn: html\x0a\x09html div \x0a class: 'btn-group';\x0a\x09\x09with: [ \x0a \x09html button \x0a class: (String streamContents: [ :str |\x0a \x09str nextPutAll: 'btn'.\x0a self showInstance ifTrue: [ \x0a \x09str nextPutAll: ' active' ] ]);\x0a \x09\x09\x09\x09with: 'Instance';\x0a onClick: [ self showInstance: true ].\x0a \x09\x09\x09html button\x0a \x09\x09\x09\x09class: (String streamContents: [ :str |\x0a \x09str nextPutAll: 'btn'.\x0a self showClass ifTrue: [ \x0a \x09str nextPutAll: ' active' ] ]);\x0a \x09\x09\x09\x09with: 'Class';\x0a\x09\x09\x09\x09onClick: [ self showInstance: false ].\x0a\x09\x09\x09html button\x0a \x09\x09\x09\x09class: (String streamContents: [ :str |\x0a \x09str nextPutAll: 'btn'.\x0a self showComment ifTrue: [ \x0a \x09str nextPutAll: ' active' ] ]);\x0a \x09\x09\x09\x09with: 'Doc';\x0a\x09\x09\x09\x09onClick: [ self showComment: true ] ]",
  1357. messageSends: ["class:", "div", "with:", "streamContents:", "nextPutAll:", "ifTrue:", "showInstance", "button", "onClick:", "showInstance:", "showClass", "showComment", "showComment:"],
  1358. referencedClasses: ["String"]
  1359. }),
  1360. smalltalk.HLClassesListWidget);
  1361. smalltalk.addMethod(
  1362. smalltalk.method({
  1363. selector: "renderItem:level:on:",
  1364. category: 'rendering',
  1365. fn: function (aClass,anInteger,html){
  1366. var self=this;
  1367. var li;
  1368. return smalltalk.withContext(function($ctx1) {
  1369. var $1,$3,$4,$2;
  1370. li=_st(html)._li();
  1371. _st(self)._registerMappingFrom_to_(aClass,li);
  1372. $1=li;
  1373. _st($1)._at_put_("list-data",_st(_st(self)._items())._indexOf_(aClass));
  1374. _st($1)._class_(_st(self)._cssClassForItem_(aClass));
  1375. $2=_st($1)._with_((function(){
  1376. return smalltalk.withContext(function($ctx2) {
  1377. $3=_st(html)._a();
  1378. _st($3)._with_((function(){
  1379. return smalltalk.withContext(function($ctx3) {
  1380. _st(_st(html)._tag_("i"))._class_(_st(self)._iconForItem_(aClass));
  1381. return _st(self)._renderItemLabel_level_on_(aClass,anInteger,html);
  1382. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1383. $4=_st($3)._onClick_((function(){
  1384. return smalltalk.withContext(function($ctx3) {
  1385. return _st(self)._activateListItem_(_st(li)._asJQuery());
  1386. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1387. return $4;
  1388. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1389. _st(_st(self)._getChildrenOf_(aClass))._do_((function(each){
  1390. return smalltalk.withContext(function($ctx2) {
  1391. return _st(self)._renderItem_level_on_(each,_st(anInteger).__plus((1)),html);
  1392. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1393. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:level:on:",{aClass:aClass,anInteger:anInteger,html:html,li:li},smalltalk.HLClassesListWidget)})},
  1394. args: ["aClass", "anInteger", "html"],
  1395. source: "renderItem: aClass level: anInteger on: html\x0a\x09| li |\x0a \x0a\x09li := html li.\x0a\x09self registerMappingFrom: aClass to: li.\x0a\x09\x0a li\x0a \x09at: 'list-data' put: (self items indexOf: aClass);\x0a \x09class: (self cssClassForItem: aClass);\x0a with: [ \x0a \x09html a\x0a \x09with: [ \x0a \x09\x09(html tag: 'i') class: (self iconForItem: aClass).\x0a \x09\x09\x09\x09\x09self renderItemLabel: aClass level: anInteger on: html ];\x0a\x09\x09\x09\x09onClick: [\x0a \x09self activateListItem: li asJQuery ] ].\x0a \x0a (self getChildrenOf: aClass) do: [ :each |\x0a \x09self renderItem: each level: anInteger + 1 on: html ]",
  1396. messageSends: ["li", "registerMappingFrom:to:", "at:put:", "indexOf:", "items", "class:", "cssClassForItem:", "with:", "iconForItem:", "tag:", "renderItemLabel:level:on:", "a", "onClick:", "activateListItem:", "asJQuery", "do:", "renderItem:level:on:", "+", "getChildrenOf:"],
  1397. referencedClasses: []
  1398. }),
  1399. smalltalk.HLClassesListWidget);
  1400. smalltalk.addMethod(
  1401. smalltalk.method({
  1402. selector: "renderItem:on:",
  1403. category: 'rendering',
  1404. fn: function (aClass,html){
  1405. var self=this;
  1406. return smalltalk.withContext(function($ctx1) {
  1407. smalltalk.HLBrowserListWidget.fn.prototype._renderItem_on_.apply(_st(self), [aClass,html]);
  1408. _st(_st(self)._getChildrenOf_(aClass))._do_((function(each){
  1409. return smalltalk.withContext(function($ctx2) {
  1410. return _st(self)._renderItem_level_on_(each,(1),html);
  1411. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1412. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:on:",{aClass:aClass,html:html},smalltalk.HLClassesListWidget)})},
  1413. args: ["aClass", "html"],
  1414. source: "renderItem: aClass on: html\x0a\x09super renderItem: aClass on: html.\x0a (self getChildrenOf: aClass) do: [ :each |\x0a \x09self renderItem: each level: 1 on: html ]",
  1415. messageSends: ["renderItem:on:", "do:", "renderItem:level:on:", "getChildrenOf:"],
  1416. referencedClasses: []
  1417. }),
  1418. smalltalk.HLClassesListWidget);
  1419. smalltalk.addMethod(
  1420. smalltalk.method({
  1421. selector: "renderItemLabel:level:on:",
  1422. category: 'rendering',
  1423. fn: function (aClass,anInteger,html){
  1424. var self=this;
  1425. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  1426. return smalltalk.withContext(function($ctx1) {
  1427. _st(_st(_st(html)._span())._asJQuery())._html_(_st($String())._streamContents_((function(str){
  1428. return smalltalk.withContext(function($ctx2) {
  1429. _st(anInteger)._timesRepeat_((function(){
  1430. return smalltalk.withContext(function($ctx3) {
  1431. return _st(str)._nextPutAll_("    ");
  1432. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1433. return _st(str)._nextPutAll_(_st(aClass)._name());
  1434. }, function($ctx2) {$ctx2.fillBlock({str:str},$ctx1)})})));
  1435. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:level:on:",{aClass:aClass,anInteger:anInteger,html:html},smalltalk.HLClassesListWidget)})},
  1436. args: ["aClass", "anInteger", "html"],
  1437. source: "renderItemLabel: aClass level: anInteger on: html\x0a\x09html span asJQuery html: (String streamContents: [ :str |\x0a\x09\x09anInteger timesRepeat: [\x0a\x09\x09\x09str nextPutAll: '    '].\x0a\x09\x09\x09str nextPutAll: aClass name ])",
  1438. messageSends: ["html:", "streamContents:", "timesRepeat:", "nextPutAll:", "name", "asJQuery", "span"],
  1439. referencedClasses: ["String"]
  1440. }),
  1441. smalltalk.HLClassesListWidget);
  1442. smalltalk.addMethod(
  1443. smalltalk.method({
  1444. selector: "renderItemLabel:on:",
  1445. category: 'rendering',
  1446. fn: function (aClass,html){
  1447. var self=this;
  1448. return smalltalk.withContext(function($ctx1) {
  1449. _st(self)._renderItemLabel_level_on_(aClass,(0),html);
  1450. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aClass:aClass,html:html},smalltalk.HLClassesListWidget)})},
  1451. args: ["aClass", "html"],
  1452. source: "renderItemLabel: aClass on: html\x0a\x09self renderItemLabel: aClass level: 0 on: html",
  1453. messageSends: ["renderItemLabel:level:on:"],
  1454. referencedClasses: []
  1455. }),
  1456. smalltalk.HLClassesListWidget);
  1457. smalltalk.addMethod(
  1458. smalltalk.method({
  1459. selector: "renderListOn:",
  1460. category: 'rendering',
  1461. fn: function (html){
  1462. var self=this;
  1463. return smalltalk.withContext(function($ctx1) {
  1464. _st(_st(self)._getRootClassesOf_(_st(self)._items()))._do_((function(each){
  1465. return smalltalk.withContext(function($ctx2) {
  1466. return _st(self)._renderItem_on_(each,html);
  1467. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1468. return self}, function($ctx1) {$ctx1.fill(self,"renderListOn:",{html:html},smalltalk.HLClassesListWidget)})},
  1469. args: ["html"],
  1470. source: "renderListOn: html\x0a\x09(self getRootClassesOf: self items)\x0a \x09do: [ :each | self renderItem: each on: html ]",
  1471. messageSends: ["do:", "renderItem:on:", "getRootClassesOf:", "items"],
  1472. referencedClasses: []
  1473. }),
  1474. smalltalk.HLClassesListWidget);
  1475. smalltalk.addMethod(
  1476. smalltalk.method({
  1477. selector: "selectItem:",
  1478. category: 'actions',
  1479. fn: function (aClass){
  1480. var self=this;
  1481. return smalltalk.withContext(function($ctx1) {
  1482. _st(_st(self)._model())._selectedClass_(aClass);
  1483. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aClass:aClass},smalltalk.HLClassesListWidget)})},
  1484. args: ["aClass"],
  1485. source: "selectItem: aClass\x0a self model selectedClass: aClass",
  1486. messageSends: ["selectedClass:", "model"],
  1487. referencedClasses: []
  1488. }),
  1489. smalltalk.HLClassesListWidget);
  1490. smalltalk.addMethod(
  1491. smalltalk.method({
  1492. selector: "setItemsForPackage:",
  1493. category: 'private',
  1494. fn: function (aPackage){
  1495. var self=this;
  1496. return smalltalk.withContext(function($ctx1) {
  1497. var $1,$3,$2;
  1498. $1=self;
  1499. $3=aPackage;
  1500. if(($receiver = $3) == nil || $receiver == undefined){
  1501. $2=[];
  1502. } else {
  1503. $2=_st(_st(_st(_st(_st(aPackage)._classes())._collect_((function(each){
  1504. return smalltalk.withContext(function($ctx2) {
  1505. return _st(each)._theNonMetaClass();
  1506. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._asSet())._asArray())._sort_((function(a,b){
  1507. return smalltalk.withContext(function($ctx2) {
  1508. return _st(_st(a)._name()).__lt(_st(b)._name());
  1509. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  1510. };
  1511. _st($1)._items_($2);
  1512. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForPackage:",{aPackage:aPackage},smalltalk.HLClassesListWidget)})},
  1513. args: ["aPackage"],
  1514. source: "setItemsForPackage: aPackage\x0a\x09self items: (aPackage \x0a \x09ifNil: [ #() ]\x0a \x09\x09ifNotNil: [ ((aPackage classes \x0a \x09collect: [ :each | each theNonMetaClass ]) asSet asArray) \x0a \x09sort: [:a :b | a name < b name ] ]).",
  1515. messageSends: ["items:", "ifNil:ifNotNil:", "sort:", "<", "name", "asArray", "asSet", "collect:", "theNonMetaClass", "classes"],
  1516. referencedClasses: []
  1517. }),
  1518. smalltalk.HLClassesListWidget);
  1519. smalltalk.addMethod(
  1520. smalltalk.method({
  1521. selector: "setItemsForSelectedPackage",
  1522. category: 'private',
  1523. fn: function (){
  1524. var self=this;
  1525. return smalltalk.withContext(function($ctx1) {
  1526. _st(self)._setItemsForPackage_(_st(_st(self)._model())._selectedPackage());
  1527. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedPackage",{},smalltalk.HLClassesListWidget)})},
  1528. args: [],
  1529. source: "setItemsForSelectedPackage\x0a\x09self setItemsForPackage: self model selectedPackage",
  1530. messageSends: ["setItemsForPackage:", "selectedPackage", "model"],
  1531. referencedClasses: []
  1532. }),
  1533. smalltalk.HLClassesListWidget);
  1534. smalltalk.addMethod(
  1535. smalltalk.method({
  1536. selector: "showClass",
  1537. category: 'accessing',
  1538. fn: function (){
  1539. var self=this;
  1540. return smalltalk.withContext(function($ctx1) {
  1541. var $1;
  1542. $1=_st(_st(_st(_st(self)._model())._showInstance())._not())._and_((function(){
  1543. return smalltalk.withContext(function($ctx2) {
  1544. return _st(_st(_st(self)._model())._showComment())._not();
  1545. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1546. return $1;
  1547. }, function($ctx1) {$ctx1.fill(self,"showClass",{},smalltalk.HLClassesListWidget)})},
  1548. args: [],
  1549. source: "showClass\x0a\x09^ self model showInstance not and: [\x0a\x09\x09self model showComment not ]",
  1550. messageSends: ["and:", "not", "showComment", "model", "showInstance"],
  1551. referencedClasses: []
  1552. }),
  1553. smalltalk.HLClassesListWidget);
  1554. smalltalk.addMethod(
  1555. smalltalk.method({
  1556. selector: "showComment",
  1557. category: 'accessing',
  1558. fn: function (){
  1559. var self=this;
  1560. return smalltalk.withContext(function($ctx1) {
  1561. var $1;
  1562. $1=_st(_st(self)._model())._showComment();
  1563. return $1;
  1564. }, function($ctx1) {$ctx1.fill(self,"showComment",{},smalltalk.HLClassesListWidget)})},
  1565. args: [],
  1566. source: "showComment\x0a\x09^ self model showComment",
  1567. messageSends: ["showComment", "model"],
  1568. referencedClasses: []
  1569. }),
  1570. smalltalk.HLClassesListWidget);
  1571. smalltalk.addMethod(
  1572. smalltalk.method({
  1573. selector: "showComment:",
  1574. category: 'actions',
  1575. fn: function (aBoolean){
  1576. var self=this;
  1577. return smalltalk.withContext(function($ctx1) {
  1578. _st(_st(self)._model())._showComment_(aBoolean);
  1579. return self}, function($ctx1) {$ctx1.fill(self,"showComment:",{aBoolean:aBoolean},smalltalk.HLClassesListWidget)})},
  1580. args: ["aBoolean"],
  1581. source: "showComment: aBoolean\x0a\x09self model showComment: aBoolean",
  1582. messageSends: ["showComment:", "model"],
  1583. referencedClasses: []
  1584. }),
  1585. smalltalk.HLClassesListWidget);
  1586. smalltalk.addMethod(
  1587. smalltalk.method({
  1588. selector: "showInstance",
  1589. category: 'accessing',
  1590. fn: function (){
  1591. var self=this;
  1592. return smalltalk.withContext(function($ctx1) {
  1593. var $1;
  1594. $1=_st(_st(_st(self)._model())._showInstance())._and_((function(){
  1595. return smalltalk.withContext(function($ctx2) {
  1596. return _st(_st(_st(self)._model())._showComment())._not();
  1597. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1598. return $1;
  1599. }, function($ctx1) {$ctx1.fill(self,"showInstance",{},smalltalk.HLClassesListWidget)})},
  1600. args: [],
  1601. source: "showInstance\x0a\x09^ self model showInstance and: [\x0a\x09\x09self model showComment not ]",
  1602. messageSends: ["and:", "not", "showComment", "model", "showInstance"],
  1603. referencedClasses: []
  1604. }),
  1605. smalltalk.HLClassesListWidget);
  1606. smalltalk.addMethod(
  1607. smalltalk.method({
  1608. selector: "showInstance:",
  1609. category: 'actions',
  1610. fn: function (aBoolean){
  1611. var self=this;
  1612. return smalltalk.withContext(function($ctx1) {
  1613. _st(_st(self)._model())._showInstance_(aBoolean);
  1614. return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean},smalltalk.HLClassesListWidget)})},
  1615. args: ["aBoolean"],
  1616. source: "showInstance: aBoolean\x0a\x09self model showInstance: aBoolean",
  1617. messageSends: ["showInstance:", "model"],
  1618. referencedClasses: []
  1619. }),
  1620. smalltalk.HLClassesListWidget);
  1621. smalltalk.addClass('HLMethodsListWidget', smalltalk.HLBrowserListWidget, ['selectorsCache'], 'Helios-Browser');
  1622. smalltalk.addMethod(
  1623. smalltalk.method({
  1624. selector: "allProtocol",
  1625. category: 'accessing',
  1626. fn: function (){
  1627. var self=this;
  1628. return smalltalk.withContext(function($ctx1) {
  1629. var $1;
  1630. $1=_st(_st(self)._model())._allProtocol();
  1631. return $1;
  1632. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{},smalltalk.HLMethodsListWidget)})},
  1633. args: [],
  1634. source: "allProtocol\x0a\x09^ self model allProtocol",
  1635. messageSends: ["allProtocol", "model"],
  1636. referencedClasses: []
  1637. }),
  1638. smalltalk.HLMethodsListWidget);
  1639. smalltalk.addMethod(
  1640. smalltalk.method({
  1641. selector: "iconForItem:",
  1642. category: 'accessing',
  1643. fn: function (aSelector){
  1644. var self=this;
  1645. var override,overriden,method;
  1646. return smalltalk.withContext(function($ctx1) {
  1647. var $2,$3,$4,$1;
  1648. method=_st(self)._methodForSelector_(aSelector);
  1649. override=_st(self)._isOverride_(method);
  1650. overriden=_st(self)._isOverridden_(method);
  1651. $2=override;
  1652. if(smalltalk.assert($2)){
  1653. $3=overriden;
  1654. if(smalltalk.assert($3)){
  1655. $1="icon-resize-vertical";
  1656. } else {
  1657. $1="icon-arrow-up";
  1658. };
  1659. } else {
  1660. $4=overriden;
  1661. if(smalltalk.assert($4)){
  1662. $1="icon-arrow-down";
  1663. } else {
  1664. $1="icon-none";
  1665. };
  1666. };
  1667. return $1;
  1668. }, function($ctx1) {$ctx1.fill(self,"iconForItem:",{aSelector:aSelector,override:override,overriden:overriden,method:method},smalltalk.HLMethodsListWidget)})},
  1669. args: ["aSelector"],
  1670. source: "iconForItem: aSelector\x0a\x09| override overriden method |\x0a \x0a method := self methodForSelector: aSelector.\x0a override := self isOverride: method.\x0a overriden := self isOverridden: method.\x0a \x0a\x09^ override\x0a \x09ifTrue: [ overriden\x0a\x09\x09\x09ifTrue: [ 'icon-resize-vertical' ]\x0a\x09\x09\x09ifFalse: [ 'icon-arrow-up' ] ]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09overriden\x0a\x09\x09\x09ifTrue: [ 'icon-arrow-down' ]\x0a\x09\x09\x09ifFalse: [ 'icon-none' ] ]",
  1671. messageSends: ["methodForSelector:", "isOverride:", "isOverridden:", "ifTrue:ifFalse:"],
  1672. referencedClasses: []
  1673. }),
  1674. smalltalk.HLMethodsListWidget);
  1675. smalltalk.addMethod(
  1676. smalltalk.method({
  1677. selector: "isOverridden:",
  1678. category: 'testing',
  1679. fn: function (aMethod){
  1680. var self=this;
  1681. return smalltalk.withContext(function($ctx1) {
  1682. var $1;
  1683. $1=_st(_st(self)._selectorsCache())._isOverridden_(aMethod);
  1684. return $1;
  1685. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod},smalltalk.HLMethodsListWidget)})},
  1686. args: ["aMethod"],
  1687. source: "isOverridden: aMethod\x0a ^ self selectorsCache isOverridden: aMethod",
  1688. messageSends: ["isOverridden:", "selectorsCache"],
  1689. referencedClasses: []
  1690. }),
  1691. smalltalk.HLMethodsListWidget);
  1692. smalltalk.addMethod(
  1693. smalltalk.method({
  1694. selector: "isOverride:",
  1695. category: 'testing',
  1696. fn: function (aMethod){
  1697. var self=this;
  1698. return smalltalk.withContext(function($ctx1) {
  1699. var $1;
  1700. $1=_st(_st(self)._selectorsCache())._isOverride_(aMethod);
  1701. return $1;
  1702. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod},smalltalk.HLMethodsListWidget)})},
  1703. args: ["aMethod"],
  1704. source: "isOverride: aMethod\x0a ^ self selectorsCache isOverride: aMethod",
  1705. messageSends: ["isOverride:", "selectorsCache"],
  1706. referencedClasses: []
  1707. }),
  1708. smalltalk.HLMethodsListWidget);
  1709. smalltalk.addMethod(
  1710. smalltalk.method({
  1711. selector: "label",
  1712. category: 'accessing',
  1713. fn: function (){
  1714. var self=this;
  1715. return smalltalk.withContext(function($ctx1) {
  1716. return "Methods";
  1717. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLMethodsListWidget)})},
  1718. args: [],
  1719. source: "label\x0a\x09^ 'Methods'",
  1720. messageSends: [],
  1721. referencedClasses: []
  1722. }),
  1723. smalltalk.HLMethodsListWidget);
  1724. smalltalk.addMethod(
  1725. smalltalk.method({
  1726. selector: "methodForSelector:",
  1727. category: 'accessing',
  1728. fn: function (aSelector){
  1729. var self=this;
  1730. return smalltalk.withContext(function($ctx1) {
  1731. var $1;
  1732. $1=_st(_st(_st(_st(self)._model())._selectedClass())._methodDictionary())._at_(aSelector);
  1733. return $1;
  1734. }, function($ctx1) {$ctx1.fill(self,"methodForSelector:",{aSelector:aSelector},smalltalk.HLMethodsListWidget)})},
  1735. args: ["aSelector"],
  1736. source: "methodForSelector: aSelector\x0a\x09^ self model selectedClass\x0a \x09methodDictionary at: aSelector",
  1737. messageSends: ["at:", "methodDictionary", "selectedClass", "model"],
  1738. referencedClasses: []
  1739. }),
  1740. smalltalk.HLMethodsListWidget);
  1741. smalltalk.addMethod(
  1742. smalltalk.method({
  1743. selector: "methodsInProtocol:",
  1744. category: 'accessing',
  1745. fn: function (aString){
  1746. var self=this;
  1747. return smalltalk.withContext(function($ctx1) {
  1748. var $1,$2,$4,$3;
  1749. $1=_st(_st(self)._model())._selectedClass();
  1750. if(($receiver = $1) == nil || $receiver == undefined){
  1751. $2=[];
  1752. return $2;
  1753. } else {
  1754. $1;
  1755. };
  1756. $4=_st(aString).__eq(_st(self)._allProtocol());
  1757. if(smalltalk.assert($4)){
  1758. $3=_st(_st(_st(self)._model())._selectedClass())._methods();
  1759. } else {
  1760. $3=_st(_st(_st(self)._model())._selectedClass())._methodsInProtocol_(aString);
  1761. };
  1762. return $3;
  1763. }, function($ctx1) {$ctx1.fill(self,"methodsInProtocol:",{aString:aString},smalltalk.HLMethodsListWidget)})},
  1764. args: ["aString"],
  1765. source: "methodsInProtocol: aString\x0a\x09self model selectedClass ifNil: [ ^ #() ].\x0a \x0a\x09^ aString = self allProtocol\x0a \x09ifTrue: [ self model selectedClass methods ]\x0a \x09ifFalse: [ self model selectedClass methodsInProtocol: aString ]",
  1766. messageSends: ["ifNil:", "selectedClass", "model", "ifTrue:ifFalse:", "methods", "methodsInProtocol:", "=", "allProtocol"],
  1767. referencedClasses: []
  1768. }),
  1769. smalltalk.HLMethodsListWidget);
  1770. smalltalk.addMethod(
  1771. smalltalk.method({
  1772. selector: "observeModel",
  1773. category: 'actions',
  1774. fn: function (){
  1775. var self=this;
  1776. function $HLProtocolSelected(){return smalltalk.HLProtocolSelected||(typeof HLProtocolSelected=="undefined"?nil:HLProtocolSelected)}
  1777. function $HLShowInstanceToggled(){return smalltalk.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
  1778. function $HLMethodSelected(){return smalltalk.HLMethodSelected||(typeof HLMethodSelected=="undefined"?nil:HLMethodSelected)}
  1779. function $HLMethodsFocusRequested(){return smalltalk.HLMethodsFocusRequested||(typeof HLMethodsFocusRequested=="undefined"?nil:HLMethodsFocusRequested)}
  1780. return smalltalk.withContext(function($ctx1) {
  1781. var $1,$2;
  1782. $1=_st(_st(self)._model())._announcer();
  1783. _st($1)._on_do_($HLProtocolSelected(),(function(ann){
  1784. return smalltalk.withContext(function($ctx2) {
  1785. return _st(self)._onProtocolSelected_(_st(ann)._item());
  1786. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1787. _st($1)._on_do_($HLShowInstanceToggled(),(function(ann){
  1788. return smalltalk.withContext(function($ctx2) {
  1789. return _st(self)._onProtocolSelected_(nil);
  1790. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1791. _st($1)._on_do_($HLMethodSelected(),(function(ann){
  1792. return smalltalk.withContext(function($ctx2) {
  1793. return _st(self)._onMethodSelected_(_st(ann)._item());
  1794. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1795. $2=_st($1)._on_do_($HLMethodsFocusRequested(),(function(ann){
  1796. return smalltalk.withContext(function($ctx2) {
  1797. return _st(self)._onMethodsFocusRequested();
  1798. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1799. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLMethodsListWidget)})},
  1800. args: [],
  1801. source: "observeModel\x0a\x09self model announcer \x0a\x09\x09on: HLProtocolSelected \x0a\x09\x09do: [ :ann | self onProtocolSelected: ann item ];\x0a\x09\x09on: HLShowInstanceToggled \x0a\x09\x09do: [ :ann | self onProtocolSelected: nil ];\x0a\x09\x09on: HLMethodSelected \x0a\x09\x09do: [ :ann | self onMethodSelected: ann item ];\x0a\x09\x09on: HLMethodsFocusRequested \x0a\x09\x09do: [ :ann | self onMethodsFocusRequested ]",
  1802. messageSends: ["on:do:", "onProtocolSelected:", "item", "announcer", "model", "onMethodSelected:", "onMethodsFocusRequested"],
  1803. referencedClasses: ["HLProtocolSelected", "HLShowInstanceToggled", "HLMethodSelected", "HLMethodsFocusRequested"]
  1804. }),
  1805. smalltalk.HLMethodsListWidget);
  1806. smalltalk.addMethod(
  1807. smalltalk.method({
  1808. selector: "observeSystem",
  1809. category: 'actions',
  1810. fn: function (){
  1811. var self=this;
  1812. function $ProtocolAdded(){return smalltalk.ProtocolAdded||(typeof ProtocolAdded=="undefined"?nil:ProtocolAdded)}
  1813. function $ProtocolRemoved(){return smalltalk.ProtocolRemoved||(typeof ProtocolRemoved=="undefined"?nil:ProtocolRemoved)}
  1814. function $MethodAdded(){return smalltalk.MethodAdded||(typeof MethodAdded=="undefined"?nil:MethodAdded)}
  1815. function $MethodRemoved(){return smalltalk.MethodRemoved||(typeof MethodRemoved=="undefined"?nil:MethodRemoved)}
  1816. function $MethodMoved(){return smalltalk.MethodMoved||(typeof MethodMoved=="undefined"?nil:MethodMoved)}
  1817. return smalltalk.withContext(function($ctx1) {
  1818. var $1,$2;
  1819. $1=_st(_st(self)._model())._systemAnnouncer();
  1820. _st($1)._on_do_($ProtocolAdded(),(function(ann){
  1821. return smalltalk.withContext(function($ctx2) {
  1822. return _st(self)._onProtocolAdded_(_st(ann)._theClass());
  1823. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1824. _st($1)._on_do_($ProtocolRemoved(),(function(ann){
  1825. return smalltalk.withContext(function($ctx2) {
  1826. return _st(self)._onProtocolRemoved_(_st(ann)._theClass());
  1827. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1828. _st($1)._on_do_($MethodAdded(),(function(ann){
  1829. return smalltalk.withContext(function($ctx2) {
  1830. return _st(self)._onMethodAdded_(_st(ann)._method());
  1831. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1832. _st($1)._on_do_($MethodRemoved(),(function(ann){
  1833. return smalltalk.withContext(function($ctx2) {
  1834. return _st(self)._onMethodRemoved_(_st(ann)._method());
  1835. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1836. $2=_st($1)._on_do_($MethodMoved(),(function(ann){
  1837. return smalltalk.withContext(function($ctx2) {
  1838. return _st(self)._onMethodMoved_(_st(ann)._method());
  1839. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1840. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLMethodsListWidget)})},
  1841. args: [],
  1842. source: "observeSystem\x0a\x09self model systemAnnouncer \x0a \x09on: ProtocolAdded\x0a do: [ :ann | self onProtocolAdded: ann theClass ];\x0a \x09on: ProtocolRemoved\x0a do: [ :ann | self onProtocolRemoved: ann theClass ];\x0a \x09on: MethodAdded \x0a do: [ :ann | self onMethodAdded: ann method ];\x0a on: MethodRemoved \x0a do: [ :ann | self onMethodRemoved: ann method ];\x0a\x09\x09on: MethodMoved \x0a do: [ :ann | self onMethodMoved: ann method ]",
  1843. messageSends: ["on:do:", "onProtocolAdded:", "theClass", "systemAnnouncer", "model", "onProtocolRemoved:", "onMethodAdded:", "method", "onMethodRemoved:", "onMethodMoved:"],
  1844. referencedClasses: ["ProtocolAdded", "ProtocolRemoved", "MethodAdded", "MethodRemoved", "MethodMoved"]
  1845. }),
  1846. smalltalk.HLMethodsListWidget);
  1847. smalltalk.addMethod(
  1848. smalltalk.method({
  1849. selector: "onMethodAdded:",
  1850. category: 'reactions',
  1851. fn: function (aMethod){
  1852. var self=this;
  1853. return smalltalk.withContext(function($ctx1) {
  1854. var $1,$2;
  1855. $1=_st(_st(_st(self)._model())._selectedClass()).__eq(_st(aMethod)._methodClass());
  1856. if(! smalltalk.assert($1)){
  1857. $2=self;
  1858. return $2;
  1859. };
  1860. _st(self)._setItemsForSelectedProtocol();
  1861. _st(self)._refresh();
  1862. return self}, function($ctx1) {$ctx1.fill(self,"onMethodAdded:",{aMethod:aMethod},smalltalk.HLMethodsListWidget)})},
  1863. args: ["aMethod"],
  1864. source: "onMethodAdded: aMethod\x0a\x09self model selectedClass = aMethod methodClass ifFalse: [ ^ self ].\x0a \x0a self setItemsForSelectedProtocol.\x0a self refresh",
  1865. messageSends: ["ifFalse:", "=", "methodClass", "selectedClass", "model", "setItemsForSelectedProtocol", "refresh"],
  1866. referencedClasses: []
  1867. }),
  1868. smalltalk.HLMethodsListWidget);
  1869. smalltalk.addMethod(
  1870. smalltalk.method({
  1871. selector: "onMethodMoved:",
  1872. category: 'reactions',
  1873. fn: function (aMethod){
  1874. var self=this;
  1875. return smalltalk.withContext(function($ctx1) {
  1876. var $1,$2,$3,$4,$5;
  1877. $1=_st(_st(_st(self)._model())._selectedMethod()).__eq(aMethod);
  1878. if(! smalltalk.assert($1)){
  1879. $2=self;
  1880. return $2;
  1881. };
  1882. $3=_st(_st(_st(self)._model())._selectedProtocol()).__eq(_st(_st(self)._model())._allProtocol());
  1883. if(! smalltalk.assert($3)){
  1884. $4=self;
  1885. _st($4)._selectedItem_(nil);
  1886. _st($4)._selectItem_(nil);
  1887. _st($4)._setItemsForSelectedProtocol();
  1888. $5=_st($4)._refresh();
  1889. $5;
  1890. };
  1891. return self}, function($ctx1) {$ctx1.fill(self,"onMethodMoved:",{aMethod:aMethod},smalltalk.HLMethodsListWidget)})},
  1892. args: ["aMethod"],
  1893. source: "onMethodMoved: aMethod\x0a\x09self model selectedMethod = aMethod ifFalse: [ ^ self ].\x0a \x0a\x09self model selectedProtocol = self model allProtocol ifFalse: [\x0a\x09\x09self \x0a\x09\x09\x09selectedItem: nil; \x0a\x09\x09\x09selectItem: nil;\x0a\x09\x09\x09setItemsForSelectedProtocol;\x0a \x09\x09refresh ]",
  1894. messageSends: ["ifFalse:", "=", "selectedMethod", "model", "selectedItem:", "selectItem:", "setItemsForSelectedProtocol", "refresh", "allProtocol", "selectedProtocol"],
  1895. referencedClasses: []
  1896. }),
  1897. smalltalk.HLMethodsListWidget);
  1898. smalltalk.addMethod(
  1899. smalltalk.method({
  1900. selector: "onMethodRemoved:",
  1901. category: 'reactions',
  1902. fn: function (aMethod){
  1903. var self=this;
  1904. return smalltalk.withContext(function($ctx1) {
  1905. var $1,$2,$3,$4,$5;
  1906. var $early={};
  1907. try {
  1908. _st(_st(self)._items())._detect_ifNone_((function(each){
  1909. return smalltalk.withContext(function($ctx2) {
  1910. return _st(each).__eq(_st(aMethod)._selector());
  1911. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  1912. return smalltalk.withContext(function($ctx2) {
  1913. $1=self;
  1914. throw $early=[$1];
  1915. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1916. $2=_st(self)._selectedItem();
  1917. if(($receiver = $2) == nil || $receiver == undefined){
  1918. $2;
  1919. } else {
  1920. $3=_st(_st(_st(aMethod)._methodClass()).__eq(_st(_st(self)._model())._selectedClass()))._and_((function(){
  1921. return smalltalk.withContext(function($ctx2) {
  1922. return _st(_st(aMethod)._selector()).__eq(_st(self)._selectedItem());
  1923. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1924. if(smalltalk.assert($3)){
  1925. $4=self;
  1926. _st($4)._selectedItem_(nil);
  1927. $5=_st($4)._selectItem_(nil);
  1928. $5;
  1929. };
  1930. };
  1931. _st(self)._setItemsForSelectedProtocol();
  1932. _st(self)._refresh();
  1933. return self}
  1934. catch(e) {if(e===$early)return e[0]; throw e}
  1935. }, function($ctx1) {$ctx1.fill(self,"onMethodRemoved:",{aMethod:aMethod},smalltalk.HLMethodsListWidget)})},
  1936. args: ["aMethod"],
  1937. source: "onMethodRemoved: aMethod\x0a\x09self items detect: [ :each | each = aMethod selector ] ifNone: [ ^ self ].\x0a\x0a self selectedItem ifNotNil: [\x0a \x09(aMethod methodClass = self model selectedClass and: [ aMethod selector = self selectedItem ])\x0a \x09\x09\x09ifTrue: [ \x0a\x09\x09\x09\x09self selectedItem: nil; \x0a\x09\x09\x09\x09selectItem: nil ] ].\x0a\x0a self setItemsForSelectedProtocol.\x0a\x09self refresh",
  1938. messageSends: ["detect:ifNone:", "=", "selector", "items", "ifNotNil:", "ifTrue:", "selectedItem:", "selectItem:", "and:", "selectedItem", "selectedClass", "model", "methodClass", "setItemsForSelectedProtocol", "refresh"],
  1939. referencedClasses: []
  1940. }),
  1941. smalltalk.HLMethodsListWidget);
  1942. smalltalk.addMethod(
  1943. smalltalk.method({
  1944. selector: "onMethodSelected:",
  1945. category: 'reactions',
  1946. fn: function (aMethod){
  1947. var self=this;
  1948. var selector;
  1949. return smalltalk.withContext(function($ctx1) {
  1950. var $1,$2,$3;
  1951. $1=_st(aMethod)._isCompiledMethod();
  1952. if(smalltalk.assert($1)){
  1953. selector=_st(aMethod)._selector();
  1954. } else {
  1955. selector=nil;
  1956. };
  1957. $2=self;
  1958. _st($2)._selectedItem_(selector);
  1959. $3=_st($2)._activateItem_(selector);
  1960. return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aMethod:aMethod,selector:selector},smalltalk.HLMethodsListWidget)})},
  1961. args: ["aMethod"],
  1962. source: "onMethodSelected: aMethod\x0a\x09| selector |\x0a\x09selector := aMethod isCompiledMethod \x0a\x09\x09ifTrue: [ aMethod selector ]\x0a\x09\x09ifFalse: [ nil ].\x0a\x09\x09\x0a\x09self \x0a\x09\x09selectedItem: selector;\x0a\x09\x09activateItem: selector",
  1963. messageSends: ["ifTrue:ifFalse:", "selector", "isCompiledMethod", "selectedItem:", "activateItem:"],
  1964. referencedClasses: []
  1965. }),
  1966. smalltalk.HLMethodsListWidget);
  1967. smalltalk.addMethod(
  1968. smalltalk.method({
  1969. selector: "onMethodsFocusRequested",
  1970. category: 'reactions',
  1971. fn: function (){
  1972. var self=this;
  1973. return smalltalk.withContext(function($ctx1) {
  1974. _st(self)._focus();
  1975. return self}, function($ctx1) {$ctx1.fill(self,"onMethodsFocusRequested",{},smalltalk.HLMethodsListWidget)})},
  1976. args: [],
  1977. source: "onMethodsFocusRequested\x0a\x09self focus",
  1978. messageSends: ["focus"],
  1979. referencedClasses: []
  1980. }),
  1981. smalltalk.HLMethodsListWidget);
  1982. smalltalk.addMethod(
  1983. smalltalk.method({
  1984. selector: "onProtocolAdded:",
  1985. category: 'reactions',
  1986. fn: function (aClass){
  1987. var self=this;
  1988. return smalltalk.withContext(function($ctx1) {
  1989. var $1,$2;
  1990. $1=_st(_st(_st(self)._model())._selectedClass()).__eq(aClass);
  1991. if(! smalltalk.assert($1)){
  1992. $2=self;
  1993. return $2;
  1994. };
  1995. _st(self)._setItemsForSelectedProtocol();
  1996. _st(self)._refresh();
  1997. _st(self)._focus();
  1998. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolAdded:",{aClass:aClass},smalltalk.HLMethodsListWidget)})},
  1999. args: ["aClass"],
  2000. source: "onProtocolAdded: aClass\x0a\x09self model selectedClass = aClass ifFalse: [ ^ self ].\x0a\x09\x0a\x09self setItemsForSelectedProtocol.\x0a self refresh.\x0a\x09self focus",
  2001. messageSends: ["ifFalse:", "=", "selectedClass", "model", "setItemsForSelectedProtocol", "refresh", "focus"],
  2002. referencedClasses: []
  2003. }),
  2004. smalltalk.HLMethodsListWidget);
  2005. smalltalk.addMethod(
  2006. smalltalk.method({
  2007. selector: "onProtocolRemoved:",
  2008. category: 'reactions',
  2009. fn: function (aClass){
  2010. var self=this;
  2011. return smalltalk.withContext(function($ctx1) {
  2012. var $1,$2;
  2013. $1=_st(_st(_st(self)._model())._selectedClass()).__eq(aClass);
  2014. if(! smalltalk.assert($1)){
  2015. $2=self;
  2016. return $2;
  2017. };
  2018. _st(self)._setItemsForSelectedProtocol();
  2019. _st(self)._refresh();
  2020. _st(self)._focus();
  2021. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolRemoved:",{aClass:aClass},smalltalk.HLMethodsListWidget)})},
  2022. args: ["aClass"],
  2023. source: "onProtocolRemoved: aClass\x0a\x09self model selectedClass = aClass ifFalse: [ ^ self ].\x0a\x09\x0a\x09self setItemsForSelectedProtocol.\x0a self refresh.\x0a\x09self focus",
  2024. messageSends: ["ifFalse:", "=", "selectedClass", "model", "setItemsForSelectedProtocol", "refresh", "focus"],
  2025. referencedClasses: []
  2026. }),
  2027. smalltalk.HLMethodsListWidget);
  2028. smalltalk.addMethod(
  2029. smalltalk.method({
  2030. selector: "onProtocolSelected:",
  2031. category: 'reactions',
  2032. fn: function (aString){
  2033. var self=this;
  2034. return smalltalk.withContext(function($ctx1) {
  2035. _st(self)._selectedItem_(nil);
  2036. _st(self)._setItemsForSelectedProtocol();
  2037. _st(self)._refresh();
  2038. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString},smalltalk.HLMethodsListWidget)})},
  2039. args: ["aString"],
  2040. source: "onProtocolSelected: aString\x0a self selectedItem: nil.\x0a \x0a\x09self setItemsForSelectedProtocol.\x0a self refresh",
  2041. messageSends: ["selectedItem:", "setItemsForSelectedProtocol", "refresh"],
  2042. referencedClasses: []
  2043. }),
  2044. smalltalk.HLMethodsListWidget);
  2045. smalltalk.addMethod(
  2046. smalltalk.method({
  2047. selector: "overrideSelectors",
  2048. category: 'accessing',
  2049. fn: function (){
  2050. var self=this;
  2051. function $Set(){return smalltalk.Set||(typeof Set=="undefined"?nil:Set)}
  2052. return smalltalk.withContext(function($ctx1) {
  2053. var $2,$3,$1;
  2054. $1=_st(_st(self)._selectorsCache())._at_ifAbsentPut_("override",(function(){
  2055. return smalltalk.withContext(function($ctx2) {
  2056. return _st(_st(_st(_st(self)._model())._selectedClass())._allSuperclasses())._inject_into_(_st($Set())._new(),(function(acc,each){
  2057. return smalltalk.withContext(function($ctx3) {
  2058. $2=acc;
  2059. _st($2)._addAll_(_st(each)._selectors());
  2060. $3=_st($2)._yourself();
  2061. return $3;
  2062. }, function($ctx3) {$ctx3.fillBlock({acc:acc,each:each},$ctx1)})}));
  2063. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2064. return $1;
  2065. }, function($ctx1) {$ctx1.fill(self,"overrideSelectors",{},smalltalk.HLMethodsListWidget)})},
  2066. args: [],
  2067. source: "overrideSelectors\x0a\x09^ self selectorsCache \x0a \x09at: 'override'\x0a ifAbsentPut: [ \x0a \x09self model selectedClass allSuperclasses\x0a\x09\x09\x09\x09inject: Set new into: [ :acc :each | acc addAll: each selectors; yourself ] ]",
  2068. messageSends: ["at:ifAbsentPut:", "inject:into:", "new", "addAll:", "selectors", "yourself", "allSuperclasses", "selectedClass", "model", "selectorsCache"],
  2069. referencedClasses: ["Set"]
  2070. }),
  2071. smalltalk.HLMethodsListWidget);
  2072. smalltalk.addMethod(
  2073. smalltalk.method({
  2074. selector: "overridenSelectors",
  2075. category: 'accessing',
  2076. fn: function (){
  2077. var self=this;
  2078. function $Set(){return smalltalk.Set||(typeof Set=="undefined"?nil:Set)}
  2079. return smalltalk.withContext(function($ctx1) {
  2080. var $2,$3,$1;
  2081. $1=_st(_st(self)._selectorsCache())._at_ifAbsentPut_("overriden",(function(){
  2082. return smalltalk.withContext(function($ctx2) {
  2083. return _st(_st(_st(_st(self)._model())._selectedClass())._allSubclasses())._inject_into_(_st($Set())._new(),(function(acc,each){
  2084. return smalltalk.withContext(function($ctx3) {
  2085. $2=acc;
  2086. _st($2)._addAll_(_st(each)._selectors());
  2087. $3=_st($2)._yourself();
  2088. return $3;
  2089. }, function($ctx3) {$ctx3.fillBlock({acc:acc,each:each},$ctx1)})}));
  2090. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2091. return $1;
  2092. }, function($ctx1) {$ctx1.fill(self,"overridenSelectors",{},smalltalk.HLMethodsListWidget)})},
  2093. args: [],
  2094. source: "overridenSelectors\x0a\x09^ self selectorsCache \x0a \x09at: 'overriden'\x0a ifAbsentPut: [ \x0a \x09self model selectedClass allSubclasses\x0a\x09\x09\x09\x09inject: Set new into: [ :acc :each | acc addAll: each selectors; yourself ] ]",
  2095. messageSends: ["at:ifAbsentPut:", "inject:into:", "new", "addAll:", "selectors", "yourself", "allSubclasses", "selectedClass", "model", "selectorsCache"],
  2096. referencedClasses: ["Set"]
  2097. }),
  2098. smalltalk.HLMethodsListWidget);
  2099. smalltalk.addMethod(
  2100. smalltalk.method({
  2101. selector: "renderContentOn:",
  2102. category: 'rendering',
  2103. fn: function (html){
  2104. var self=this;
  2105. return smalltalk.withContext(function($ctx1) {
  2106. var $1,$2,$3;
  2107. $1=_st(_st(self)._model())._showInstance();
  2108. if(smalltalk.assert($1)){
  2109. smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  2110. } else {
  2111. $2=_st(html)._div();
  2112. _st($2)._class_("class_side");
  2113. $3=_st($2)._with_((function(){
  2114. return smalltalk.withContext(function($ctx2) {
  2115. return smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  2116. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2117. $3;
  2118. };
  2119. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLMethodsListWidget)})},
  2120. args: ["html"],
  2121. source: "renderContentOn: html\x0a\x09self model showInstance\x0a \x09ifFalse: [ html div \x0a \x09class: 'class_side'; \x0a with: [ super renderContentOn: html ] ]\x0a \x09ifTrue: [ super renderContentOn: html ]",
  2122. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model"],
  2123. referencedClasses: []
  2124. }),
  2125. smalltalk.HLMethodsListWidget);
  2126. smalltalk.addMethod(
  2127. smalltalk.method({
  2128. selector: "renderItemLabel:on:",
  2129. category: 'rendering',
  2130. fn: function (aSelector,html){
  2131. var self=this;
  2132. return smalltalk.withContext(function($ctx1) {
  2133. _st(html)._with_(aSelector);
  2134. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aSelector:aSelector,html:html},smalltalk.HLMethodsListWidget)})},
  2135. args: ["aSelector", "html"],
  2136. source: "renderItemLabel: aSelector on: html\x0a\x09html with: aSelector",
  2137. messageSends: ["with:"],
  2138. referencedClasses: []
  2139. }),
  2140. smalltalk.HLMethodsListWidget);
  2141. smalltalk.addMethod(
  2142. smalltalk.method({
  2143. selector: "selectItem:",
  2144. category: 'actions',
  2145. fn: function (aSelector){
  2146. var self=this;
  2147. return smalltalk.withContext(function($ctx1) {
  2148. var $1,$2;
  2149. $1=aSelector;
  2150. if(($receiver = $1) == nil || $receiver == undefined){
  2151. $2=_st(_st(self)._model())._selectedMethod_(nil);
  2152. return $2;
  2153. } else {
  2154. $1;
  2155. };
  2156. _st(_st(self)._model())._selectedMethod_(_st(self)._methodForSelector_(aSelector));
  2157. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aSelector:aSelector},smalltalk.HLMethodsListWidget)})},
  2158. args: ["aSelector"],
  2159. source: "selectItem: aSelector\x0a\x09aSelector ifNil: [ ^ self model selectedMethod: nil ].\x0a\x0a \x09self model selectedMethod: (self methodForSelector: aSelector)\x0a ",
  2160. messageSends: ["ifNil:", "selectedMethod:", "model", "methodForSelector:"],
  2161. referencedClasses: []
  2162. }),
  2163. smalltalk.HLMethodsListWidget);
  2164. smalltalk.addMethod(
  2165. smalltalk.method({
  2166. selector: "selectorsCache",
  2167. category: 'accessing',
  2168. fn: function (){
  2169. var self=this;
  2170. return smalltalk.withContext(function($ctx1) {
  2171. var $1;
  2172. $1=_st(_st(self)._class())._selectorsCache();
  2173. return $1;
  2174. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{},smalltalk.HLMethodsListWidget)})},
  2175. args: [],
  2176. source: "selectorsCache\x0a\x09^ self class selectorsCache",
  2177. messageSends: ["selectorsCache", "class"],
  2178. referencedClasses: []
  2179. }),
  2180. smalltalk.HLMethodsListWidget);
  2181. smalltalk.addMethod(
  2182. smalltalk.method({
  2183. selector: "selectorsInProtocol:",
  2184. category: 'accessing',
  2185. fn: function (aString){
  2186. var self=this;
  2187. return smalltalk.withContext(function($ctx1) {
  2188. var $1;
  2189. $1=_st(_st(_st(self)._methodsInProtocol_(aString))._collect_((function(each){
  2190. return smalltalk.withContext(function($ctx2) {
  2191. return _st(each)._selector();
  2192. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._sorted();
  2193. return $1;
  2194. }, function($ctx1) {$ctx1.fill(self,"selectorsInProtocol:",{aString:aString},smalltalk.HLMethodsListWidget)})},
  2195. args: ["aString"],
  2196. source: "selectorsInProtocol: aString\x0a\x09^ ((self methodsInProtocol: aString)\x0a \x09collect: [ :each | each selector ]) sorted",
  2197. messageSends: ["sorted", "collect:", "selector", "methodsInProtocol:"],
  2198. referencedClasses: []
  2199. }),
  2200. smalltalk.HLMethodsListWidget);
  2201. smalltalk.addMethod(
  2202. smalltalk.method({
  2203. selector: "setItemsForProtocol:",
  2204. category: 'private',
  2205. fn: function (aString){
  2206. var self=this;
  2207. return smalltalk.withContext(function($ctx1) {
  2208. var $2,$4,$3,$1;
  2209. $2=self;
  2210. $4=aString;
  2211. if(($receiver = $4) == nil || $receiver == undefined){
  2212. $3=[];
  2213. } else {
  2214. $3=_st(self)._selectorsInProtocol_(aString);
  2215. };
  2216. $1=_st($2)._items_($3);
  2217. return $1;
  2218. }, function($ctx1) {$ctx1.fill(self,"setItemsForProtocol:",{aString:aString},smalltalk.HLMethodsListWidget)})},
  2219. args: ["aString"],
  2220. source: "setItemsForProtocol: aString\x0a\x09^ self items: (aString\x0a \x09ifNil: [ #() ]\x0a \x09ifNotNil: [ self selectorsInProtocol: aString ])",
  2221. messageSends: ["items:", "ifNil:ifNotNil:", "selectorsInProtocol:"],
  2222. referencedClasses: []
  2223. }),
  2224. smalltalk.HLMethodsListWidget);
  2225. smalltalk.addMethod(
  2226. smalltalk.method({
  2227. selector: "setItemsForSelectedProtocol",
  2228. category: 'private',
  2229. fn: function (){
  2230. var self=this;
  2231. return smalltalk.withContext(function($ctx1) {
  2232. _st(self)._setItemsForProtocol_(_st(_st(self)._model())._selectedProtocol());
  2233. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedProtocol",{},smalltalk.HLMethodsListWidget)})},
  2234. args: [],
  2235. source: "setItemsForSelectedProtocol\x0a\x09self setItemsForProtocol: self model selectedProtocol",
  2236. messageSends: ["setItemsForProtocol:", "selectedProtocol", "model"],
  2237. referencedClasses: []
  2238. }),
  2239. smalltalk.HLMethodsListWidget);
  2240. smalltalk.HLMethodsListWidget.klass.iVarNames = ['selectorsCache'];
  2241. smalltalk.addMethod(
  2242. smalltalk.method({
  2243. selector: "selectorsCache",
  2244. category: 'accessing',
  2245. fn: function (){
  2246. var self=this;
  2247. function $HLSelectorsCache(){return smalltalk.HLSelectorsCache||(typeof HLSelectorsCache=="undefined"?nil:HLSelectorsCache)}
  2248. return smalltalk.withContext(function($ctx1) {
  2249. var $1;
  2250. $1=_st($HLSelectorsCache())._current();
  2251. return $1;
  2252. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{},smalltalk.HLMethodsListWidget.klass)})},
  2253. args: [],
  2254. source: "selectorsCache\x0a\x09^ HLSelectorsCache current",
  2255. messageSends: ["current"],
  2256. referencedClasses: ["HLSelectorsCache"]
  2257. }),
  2258. smalltalk.HLMethodsListWidget.klass);
  2259. smalltalk.addClass('HLPackagesListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  2260. smalltalk.addMethod(
  2261. smalltalk.method({
  2262. selector: "commitPackage",
  2263. category: 'actions',
  2264. fn: function (){
  2265. var self=this;
  2266. return smalltalk.withContext(function($ctx1) {
  2267. _st(_st(self)._model())._commitPackage();
  2268. return self}, function($ctx1) {$ctx1.fill(self,"commitPackage",{},smalltalk.HLPackagesListWidget)})},
  2269. args: [],
  2270. source: "commitPackage\x0a\x09self model commitPackage",
  2271. messageSends: ["commitPackage", "model"],
  2272. referencedClasses: []
  2273. }),
  2274. smalltalk.HLPackagesListWidget);
  2275. smalltalk.addMethod(
  2276. smalltalk.method({
  2277. selector: "focusClassesListWidget",
  2278. category: 'actions',
  2279. fn: function (){
  2280. var self=this;
  2281. function $HLClassesListFocus(){return smalltalk.HLClassesListFocus||(typeof HLClassesListFocus=="undefined"?nil:HLClassesListFocus)}
  2282. return smalltalk.withContext(function($ctx1) {
  2283. _st(_st(_st(self)._model())._announcer())._announce_(_st($HLClassesListFocus())._new());
  2284. return self}, function($ctx1) {$ctx1.fill(self,"focusClassesListWidget",{},smalltalk.HLPackagesListWidget)})},
  2285. args: [],
  2286. source: "focusClassesListWidget\x0a\x09self model announcer announce: HLClassesListFocus new",
  2287. messageSends: ["announce:", "new", "announcer", "model"],
  2288. referencedClasses: ["HLClassesListFocus"]
  2289. }),
  2290. smalltalk.HLPackagesListWidget);
  2291. smalltalk.addMethod(
  2292. smalltalk.method({
  2293. selector: "initializeItems",
  2294. category: 'initialization',
  2295. fn: function (){
  2296. var self=this;
  2297. return smalltalk.withContext(function($ctx1) {
  2298. var $1;
  2299. self["@items"]=_st(_st(_st(self)._model())._packages())._sort_((function(a,b){
  2300. return smalltalk.withContext(function($ctx2) {
  2301. return _st(_st(a)._name()).__lt(_st(b)._name());
  2302. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  2303. $1=self["@items"];
  2304. return $1;
  2305. }, function($ctx1) {$ctx1.fill(self,"initializeItems",{},smalltalk.HLPackagesListWidget)})},
  2306. args: [],
  2307. source: "initializeItems\x0a\x09^ items := self model packages \x0a\x09\x09sort: [ :a :b | a name < b name ]",
  2308. messageSends: ["sort:", "<", "name", "packages", "model"],
  2309. referencedClasses: []
  2310. }),
  2311. smalltalk.HLPackagesListWidget);
  2312. smalltalk.addMethod(
  2313. smalltalk.method({
  2314. selector: "items",
  2315. category: 'accessing',
  2316. fn: function (){
  2317. var self=this;
  2318. return smalltalk.withContext(function($ctx1) {
  2319. var $2,$1;
  2320. $2=self["@items"];
  2321. if(($receiver = $2) == nil || $receiver == undefined){
  2322. $1=_st(self)._initializeItems();
  2323. } else {
  2324. $1=$2;
  2325. };
  2326. return $1;
  2327. }, function($ctx1) {$ctx1.fill(self,"items",{},smalltalk.HLPackagesListWidget)})},
  2328. args: [],
  2329. source: "items\x0a\x09^ items ifNil: [self initializeItems]",
  2330. messageSends: ["ifNil:", "initializeItems"],
  2331. referencedClasses: []
  2332. }),
  2333. smalltalk.HLPackagesListWidget);
  2334. smalltalk.addMethod(
  2335. smalltalk.method({
  2336. selector: "label",
  2337. category: 'accessing',
  2338. fn: function (){
  2339. var self=this;
  2340. return smalltalk.withContext(function($ctx1) {
  2341. return "Packages";
  2342. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLPackagesListWidget)})},
  2343. args: [],
  2344. source: "label\x0a\x09^ 'Packages'",
  2345. messageSends: [],
  2346. referencedClasses: []
  2347. }),
  2348. smalltalk.HLPackagesListWidget);
  2349. smalltalk.addMethod(
  2350. smalltalk.method({
  2351. selector: "observeModel",
  2352. category: 'actions',
  2353. fn: function (){
  2354. var self=this;
  2355. function $HLPackageSelected(){return smalltalk.HLPackageSelected||(typeof HLPackageSelected=="undefined"?nil:HLPackageSelected)}
  2356. function $HLPackagesFocusRequested(){return smalltalk.HLPackagesFocusRequested||(typeof HLPackagesFocusRequested=="undefined"?nil:HLPackagesFocusRequested)}
  2357. return smalltalk.withContext(function($ctx1) {
  2358. var $1,$2;
  2359. $1=_st(_st(self)._model())._announcer();
  2360. _st($1)._on_do_($HLPackageSelected(),(function(ann){
  2361. return smalltalk.withContext(function($ctx2) {
  2362. return _st(self)._onPackageSelected_(_st(ann)._item());
  2363. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2364. $2=_st($1)._on_do_($HLPackagesFocusRequested(),(function(ann){
  2365. return smalltalk.withContext(function($ctx2) {
  2366. return _st(self)._onPackagesFocusRequested();
  2367. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2368. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLPackagesListWidget)})},
  2369. args: [],
  2370. source: "observeModel\x0a self model announcer \x0a\x09\x09on: HLPackageSelected \x0a\x09\x09do: [ :ann | self onPackageSelected: ann item ];\x0a\x09\x09on: HLPackagesFocusRequested \x0a\x09\x09do: [ :ann | self onPackagesFocusRequested ]",
  2371. messageSends: ["on:do:", "onPackageSelected:", "item", "announcer", "model", "onPackagesFocusRequested"],
  2372. referencedClasses: ["HLPackageSelected", "HLPackagesFocusRequested"]
  2373. }),
  2374. smalltalk.HLPackagesListWidget);
  2375. smalltalk.addMethod(
  2376. smalltalk.method({
  2377. selector: "observeSystem",
  2378. category: 'actions',
  2379. fn: function (){
  2380. var self=this;
  2381. function $ClassAdded(){return smalltalk.ClassAdded||(typeof ClassAdded=="undefined"?nil:ClassAdded)}
  2382. return smalltalk.withContext(function($ctx1) {
  2383. _st(_st(_st(self)._model())._systemAnnouncer())._on_do_($ClassAdded(),(function(ann){
  2384. return smalltalk.withContext(function($ctx2) {
  2385. return _st(self)._onClassAdded_(_st(ann)._theClass());
  2386. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2387. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLPackagesListWidget)})},
  2388. args: [],
  2389. source: "observeSystem\x0a self model systemAnnouncer \x0a\x09\x09on: ClassAdded \x0a\x09\x09do: [ :ann | self onClassAdded: ann theClass ]",
  2390. messageSends: ["on:do:", "onClassAdded:", "theClass", "systemAnnouncer", "model"],
  2391. referencedClasses: ["ClassAdded"]
  2392. }),
  2393. smalltalk.HLPackagesListWidget);
  2394. smalltalk.addMethod(
  2395. smalltalk.method({
  2396. selector: "onClassAdded:",
  2397. category: 'reactions',
  2398. fn: function (aClass){
  2399. var self=this;
  2400. return smalltalk.withContext(function($ctx1) {
  2401. var $1,$2,$3;
  2402. $1=_st(_st(self)._items())._includes_(_st(aClass)._package());
  2403. if(! smalltalk.assert($1)){
  2404. $2=self;
  2405. _st($2)._initializeItems();
  2406. $3=_st($2)._refresh();
  2407. $3;
  2408. };
  2409. return self}, function($ctx1) {$ctx1.fill(self,"onClassAdded:",{aClass:aClass},smalltalk.HLPackagesListWidget)})},
  2410. args: ["aClass"],
  2411. source: "onClassAdded: aClass\x0a\x09\x22Amber doesn't have yet a global organizer for packages\x22\x0a\x09\x0a\x09(self items includes: aClass package) ifFalse: [ \x0a\x09\x09self \x0a\x09\x09\x09initializeItems;\x0a\x09\x09\x09refresh ]",
  2412. messageSends: ["ifFalse:", "initializeItems", "refresh", "includes:", "package", "items"],
  2413. referencedClasses: []
  2414. }),
  2415. smalltalk.HLPackagesListWidget);
  2416. smalltalk.addMethod(
  2417. smalltalk.method({
  2418. selector: "onPackageSelected:",
  2419. category: 'reactions',
  2420. fn: function (aPackage){
  2421. var self=this;
  2422. return smalltalk.withContext(function($ctx1) {
  2423. var $1,$2,$3;
  2424. _st(self)._selectedItem_(aPackage);
  2425. $1=_st(self)._hasFocus();
  2426. if(! smalltalk.assert($1)){
  2427. $2=self;
  2428. _st($2)._activateItem_(aPackage);
  2429. $3=_st($2)._focus();
  2430. $3;
  2431. };
  2432. return self}, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{aPackage:aPackage},smalltalk.HLPackagesListWidget)})},
  2433. args: ["aPackage"],
  2434. source: "onPackageSelected: aPackage\x0a\x09self selectedItem: aPackage.\x0a\x09self hasFocus ifFalse: [\x0a\x09\x09self\x0a\x09\x09\x09activateItem: aPackage;\x0a\x09\x09\x09focus ]",
  2435. messageSends: ["selectedItem:", "ifFalse:", "activateItem:", "focus", "hasFocus"],
  2436. referencedClasses: []
  2437. }),
  2438. smalltalk.HLPackagesListWidget);
  2439. smalltalk.addMethod(
  2440. smalltalk.method({
  2441. selector: "onPackagesFocusRequested",
  2442. category: 'reactions',
  2443. fn: function (){
  2444. var self=this;
  2445. return smalltalk.withContext(function($ctx1) {
  2446. _st(self)._focus();
  2447. return self}, function($ctx1) {$ctx1.fill(self,"onPackagesFocusRequested",{},smalltalk.HLPackagesListWidget)})},
  2448. args: [],
  2449. source: "onPackagesFocusRequested\x0a\x09self focus",
  2450. messageSends: ["focus"],
  2451. referencedClasses: []
  2452. }),
  2453. smalltalk.HLPackagesListWidget);
  2454. smalltalk.addMethod(
  2455. smalltalk.method({
  2456. selector: "renderButtonsOn:",
  2457. category: 'rendering',
  2458. fn: function (html){
  2459. var self=this;
  2460. return smalltalk.withContext(function($ctx1) {
  2461. var $1,$3,$4,$2;
  2462. $1=_st(html)._div();
  2463. _st($1)._class_("buttons");
  2464. $2=_st($1)._with_((function(){
  2465. return smalltalk.withContext(function($ctx2) {
  2466. $3=_st(html)._button();
  2467. _st($3)._class_("btn");
  2468. _st($3)._with_("Commit");
  2469. $4=_st($3)._onClick_((function(){
  2470. return smalltalk.withContext(function($ctx3) {
  2471. return _st(self)._commitPackage();
  2472. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2473. return $4;
  2474. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2475. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLPackagesListWidget)})},
  2476. args: ["html"],
  2477. source: "renderButtonsOn: html\x0a\x09html div \x0a\x09\x09class: 'buttons';\x0a\x09\x09with: [\x0a\x09\x09\x09html button \x0a\x09\x09\x09\x09class: 'btn';\x0a\x09\x09\x09\x09with: 'Commit';\x0a\x09\x09\x09\x09onClick: [ self commitPackage ] ]",
  2478. messageSends: ["class:", "div", "with:", "button", "onClick:", "commitPackage"],
  2479. referencedClasses: []
  2480. }),
  2481. smalltalk.HLPackagesListWidget);
  2482. smalltalk.addMethod(
  2483. smalltalk.method({
  2484. selector: "renderItemLabel:on:",
  2485. category: 'rendering',
  2486. fn: function (aPackage,html){
  2487. var self=this;
  2488. return smalltalk.withContext(function($ctx1) {
  2489. _st(html)._with_(_st(aPackage)._name());
  2490. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aPackage:aPackage,html:html},smalltalk.HLPackagesListWidget)})},
  2491. args: ["aPackage", "html"],
  2492. source: "renderItemLabel: aPackage on: html\x0a\x09html with: aPackage name",
  2493. messageSends: ["with:", "name"],
  2494. referencedClasses: []
  2495. }),
  2496. smalltalk.HLPackagesListWidget);
  2497. smalltalk.addMethod(
  2498. smalltalk.method({
  2499. selector: "selectItem:",
  2500. category: 'actions',
  2501. fn: function (aPackage){
  2502. var self=this;
  2503. return smalltalk.withContext(function($ctx1) {
  2504. _st(_st(self)._model())._selectedPackage_(aPackage);
  2505. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aPackage:aPackage},smalltalk.HLPackagesListWidget)})},
  2506. args: ["aPackage"],
  2507. source: "selectItem: aPackage\x0a\x09self model selectedPackage: aPackage",
  2508. messageSends: ["selectedPackage:", "model"],
  2509. referencedClasses: []
  2510. }),
  2511. smalltalk.HLPackagesListWidget);
  2512. smalltalk.addClass('HLProtocolsListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  2513. smalltalk.addMethod(
  2514. smalltalk.method({
  2515. selector: "allProtocol",
  2516. category: 'accessing',
  2517. fn: function (){
  2518. var self=this;
  2519. return smalltalk.withContext(function($ctx1) {
  2520. var $1;
  2521. $1=_st(_st(self)._model())._allProtocol();
  2522. return $1;
  2523. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{},smalltalk.HLProtocolsListWidget)})},
  2524. args: [],
  2525. source: "allProtocol\x0a\x09^ self model allProtocol",
  2526. messageSends: ["allProtocol", "model"],
  2527. referencedClasses: []
  2528. }),
  2529. smalltalk.HLProtocolsListWidget);
  2530. smalltalk.addMethod(
  2531. smalltalk.method({
  2532. selector: "label",
  2533. category: 'accessing',
  2534. fn: function (){
  2535. var self=this;
  2536. return smalltalk.withContext(function($ctx1) {
  2537. return "Protocols";
  2538. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLProtocolsListWidget)})},
  2539. args: [],
  2540. source: "label\x0a\x09^ 'Protocols'",
  2541. messageSends: [],
  2542. referencedClasses: []
  2543. }),
  2544. smalltalk.HLProtocolsListWidget);
  2545. smalltalk.addMethod(
  2546. smalltalk.method({
  2547. selector: "observeModel",
  2548. category: 'actions',
  2549. fn: function (){
  2550. var self=this;
  2551. function $HLClassSelected(){return smalltalk.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
  2552. function $HLShowInstanceToggled(){return smalltalk.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
  2553. function $HLProtocolSelected(){return smalltalk.HLProtocolSelected||(typeof HLProtocolSelected=="undefined"?nil:HLProtocolSelected)}
  2554. function $HLProtocolsFocusRequested(){return smalltalk.HLProtocolsFocusRequested||(typeof HLProtocolsFocusRequested=="undefined"?nil:HLProtocolsFocusRequested)}
  2555. return smalltalk.withContext(function($ctx1) {
  2556. var $1,$2;
  2557. $1=_st(_st(self)._model())._announcer();
  2558. _st($1)._on_do_($HLClassSelected(),(function(ann){
  2559. return smalltalk.withContext(function($ctx2) {
  2560. return _st(self)._onClassSelected_(_st(ann)._item());
  2561. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2562. _st($1)._on_do_($HLShowInstanceToggled(),(function(ann){
  2563. return smalltalk.withContext(function($ctx2) {
  2564. return _st(self)._onClassSelected_(_st(_st(self)._model())._selectedClass());
  2565. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2566. _st($1)._on_do_($HLProtocolSelected(),(function(ann){
  2567. return smalltalk.withContext(function($ctx2) {
  2568. return _st(self)._onProtocolSelected_(_st(ann)._item());
  2569. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2570. $2=_st($1)._on_do_($HLProtocolsFocusRequested(),(function(ann){
  2571. return smalltalk.withContext(function($ctx2) {
  2572. return _st(self)._onProtocolsFocusRequested();
  2573. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2574. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLProtocolsListWidget)})},
  2575. args: [],
  2576. source: "observeModel\x0a self model announcer \x0a\x09\x09on: HLClassSelected \x0a\x09\x09do: [ :ann | self onClassSelected: ann item ];\x0a \x09on: HLShowInstanceToggled \x0a\x09\x09do: [ :ann | self onClassSelected: self model selectedClass ];\x0a \x09on: HLProtocolSelected\x0a\x09\x09do: [ :ann | self onProtocolSelected: ann item ];\x0a\x09\x09on: HLProtocolsFocusRequested \x0a\x09\x09do: [ :ann | self onProtocolsFocusRequested ]",
  2577. messageSends: ["on:do:", "onClassSelected:", "item", "announcer", "model", "selectedClass", "onProtocolSelected:", "onProtocolsFocusRequested"],
  2578. referencedClasses: ["HLClassSelected", "HLShowInstanceToggled", "HLProtocolSelected", "HLProtocolsFocusRequested"]
  2579. }),
  2580. smalltalk.HLProtocolsListWidget);
  2581. smalltalk.addMethod(
  2582. smalltalk.method({
  2583. selector: "observeSystem",
  2584. category: 'actions',
  2585. fn: function (){
  2586. var self=this;
  2587. function $ProtocolAdded(){return smalltalk.ProtocolAdded||(typeof ProtocolAdded=="undefined"?nil:ProtocolAdded)}
  2588. function $ProtocolRemoved(){return smalltalk.ProtocolRemoved||(typeof ProtocolRemoved=="undefined"?nil:ProtocolRemoved)}
  2589. return smalltalk.withContext(function($ctx1) {
  2590. var $1,$2;
  2591. $1=_st(_st(self)._model())._systemAnnouncer();
  2592. _st($1)._on_do_($ProtocolAdded(),(function(ann){
  2593. return smalltalk.withContext(function($ctx2) {
  2594. return _st(self)._onProtocolAdded_to_(_st(ann)._protocol(),_st(ann)._theClass());
  2595. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2596. $2=_st($1)._on_do_($ProtocolRemoved(),(function(ann){
  2597. return smalltalk.withContext(function($ctx2) {
  2598. return _st(self)._onProtocolRemoved_from_(_st(ann)._protocol(),_st(ann)._theClass());
  2599. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2600. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLProtocolsListWidget)})},
  2601. args: [],
  2602. source: "observeSystem\x0a\x09self model systemAnnouncer\x0a\x09\x09on: ProtocolAdded \x0a\x09 do: [ :ann | self onProtocolAdded: ann protocol to: ann theClass ];\x0a\x09 on: ProtocolRemoved\x0a\x09 do: [ :ann | self onProtocolRemoved: ann protocol from: ann theClass ]",
  2603. messageSends: ["on:do:", "onProtocolAdded:to:", "protocol", "theClass", "systemAnnouncer", "model", "onProtocolRemoved:from:"],
  2604. referencedClasses: ["ProtocolAdded", "ProtocolRemoved"]
  2605. }),
  2606. smalltalk.HLProtocolsListWidget);
  2607. smalltalk.addMethod(
  2608. smalltalk.method({
  2609. selector: "onClassSelected:",
  2610. category: 'reactions',
  2611. fn: function (aClass){
  2612. var self=this;
  2613. return smalltalk.withContext(function($ctx1) {
  2614. _st(self)._selectedItem_(nil);
  2615. _st(self)._setItemsForSelectedClass();
  2616. _st(self)._refresh();
  2617. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass},smalltalk.HLProtocolsListWidget)})},
  2618. args: ["aClass"],
  2619. source: "onClassSelected: aClass\x0a self selectedItem: nil.\x0a \x0a self setItemsForSelectedClass.\x0a self refresh",
  2620. messageSends: ["selectedItem:", "setItemsForSelectedClass", "refresh"],
  2621. referencedClasses: []
  2622. }),
  2623. smalltalk.HLProtocolsListWidget);
  2624. smalltalk.addMethod(
  2625. smalltalk.method({
  2626. selector: "onProtocolAdded:to:",
  2627. category: 'reactions',
  2628. fn: function (aString,aClass){
  2629. var self=this;
  2630. return smalltalk.withContext(function($ctx1) {
  2631. var $1,$2;
  2632. $1=_st(aClass).__eq(_st(_st(self)._model())._selectedClass());
  2633. if(! smalltalk.assert($1)){
  2634. $2=self;
  2635. return $2;
  2636. };
  2637. _st(self)._setItemsForSelectedClass();
  2638. _st(self)._refresh();
  2639. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolAdded:to:",{aString:aString,aClass:aClass},smalltalk.HLProtocolsListWidget)})},
  2640. args: ["aString", "aClass"],
  2641. source: "onProtocolAdded: aString to: aClass\x0a\x09aClass = self model selectedClass ifFalse: [ ^ self ].\x0a \x0a self setItemsForSelectedClass.\x0a self refresh",
  2642. messageSends: ["ifFalse:", "=", "selectedClass", "model", "setItemsForSelectedClass", "refresh"],
  2643. referencedClasses: []
  2644. }),
  2645. smalltalk.HLProtocolsListWidget);
  2646. smalltalk.addMethod(
  2647. smalltalk.method({
  2648. selector: "onProtocolRemoved:from:",
  2649. category: 'reactions',
  2650. fn: function (aString,aClass){
  2651. var self=this;
  2652. return smalltalk.withContext(function($ctx1) {
  2653. var $1,$2,$3,$4,$5;
  2654. $1=_st(aClass).__eq(_st(_st(self)._model())._selectedClass());
  2655. if(! smalltalk.assert($1)){
  2656. $2=self;
  2657. return $2;
  2658. };
  2659. $3=_st(_st(_st(self)._model())._selectedProtocol()).__eq(aString);
  2660. if(smalltalk.assert($3)){
  2661. $4=self;
  2662. _st($4)._selectedItem_(nil);
  2663. $5=_st($4)._selectItem_(nil);
  2664. $5;
  2665. };
  2666. _st(self)._setItemsForSelectedClass();
  2667. _st(self)._refresh();
  2668. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolRemoved:from:",{aString:aString,aClass:aClass},smalltalk.HLProtocolsListWidget)})},
  2669. args: ["aString", "aClass"],
  2670. source: "onProtocolRemoved: aString from: aClass\x0a\x09aClass = self model selectedClass ifFalse: [ ^ self ].\x0a \x0a self model selectedProtocol = aString \x0a \x09ifTrue: [ \x0a\x09\x09\x09self \x0a\x09\x09\x09\x09selectedItem: nil;\x0a\x09\x09\x09\x09selectItem: nil ].\x0a \x0a self setItemsForSelectedClass.\x0a self refresh",
  2671. messageSends: ["ifFalse:", "=", "selectedClass", "model", "ifTrue:", "selectedItem:", "selectItem:", "selectedProtocol", "setItemsForSelectedClass", "refresh"],
  2672. referencedClasses: []
  2673. }),
  2674. smalltalk.HLProtocolsListWidget);
  2675. smalltalk.addMethod(
  2676. smalltalk.method({
  2677. selector: "onProtocolSelected:",
  2678. category: 'reactions',
  2679. fn: function (aString){
  2680. var self=this;
  2681. return smalltalk.withContext(function($ctx1) {
  2682. var $1,$2,$3,$4,$5;
  2683. _st(self)._selectedItem_(aString);
  2684. $1=aString;
  2685. if(($receiver = $1) == nil || $receiver == undefined){
  2686. $2=self;
  2687. return $2;
  2688. } else {
  2689. $1;
  2690. };
  2691. $3=_st(self)._hasFocus();
  2692. if(! smalltalk.assert($3)){
  2693. $4=self;
  2694. _st($4)._activateItem_(aString);
  2695. $5=_st($4)._focus();
  2696. $5;
  2697. };
  2698. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString},smalltalk.HLProtocolsListWidget)})},
  2699. args: ["aString"],
  2700. source: "onProtocolSelected: aString\x0a\x09self selectedItem: aString.\x0a\x09aString ifNil: [ ^ self ].\x0a \x0a\x09self hasFocus ifFalse: [\x0a\x09\x09self \x0a\x09\x09\x09activateItem: aString;\x0a\x09\x09\x09focus ]",
  2701. messageSends: ["selectedItem:", "ifNil:", "ifFalse:", "activateItem:", "focus", "hasFocus"],
  2702. referencedClasses: []
  2703. }),
  2704. smalltalk.HLProtocolsListWidget);
  2705. smalltalk.addMethod(
  2706. smalltalk.method({
  2707. selector: "onProtocolsFocusRequested",
  2708. category: 'reactions',
  2709. fn: function (){
  2710. var self=this;
  2711. return smalltalk.withContext(function($ctx1) {
  2712. _st(self)._focus();
  2713. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolsFocusRequested",{},smalltalk.HLProtocolsListWidget)})},
  2714. args: [],
  2715. source: "onProtocolsFocusRequested\x0a\x09self focus",
  2716. messageSends: ["focus"],
  2717. referencedClasses: []
  2718. }),
  2719. smalltalk.HLProtocolsListWidget);
  2720. smalltalk.addMethod(
  2721. smalltalk.method({
  2722. selector: "renderContentOn:",
  2723. category: 'rendering',
  2724. fn: function (html){
  2725. var self=this;
  2726. return smalltalk.withContext(function($ctx1) {
  2727. var $1,$2,$3;
  2728. $1=_st(_st(self)._model())._showInstance();
  2729. if(smalltalk.assert($1)){
  2730. smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  2731. } else {
  2732. $2=_st(html)._div();
  2733. _st($2)._class_("class_side");
  2734. $3=_st($2)._with_((function(){
  2735. return smalltalk.withContext(function($ctx2) {
  2736. return smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  2737. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2738. $3;
  2739. };
  2740. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLProtocolsListWidget)})},
  2741. args: ["html"],
  2742. source: "renderContentOn: html\x0a\x09self model showInstance\x0a \x09ifFalse: [ html div \x0a \x09class: 'class_side'; \x0a with: [ super renderContentOn: html ] ]\x0a \x09ifTrue: [ super renderContentOn: html ]",
  2743. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model"],
  2744. referencedClasses: []
  2745. }),
  2746. smalltalk.HLProtocolsListWidget);
  2747. smalltalk.addMethod(
  2748. smalltalk.method({
  2749. selector: "selectItem:",
  2750. category: 'actions',
  2751. fn: function (aString){
  2752. var self=this;
  2753. return smalltalk.withContext(function($ctx1) {
  2754. _st(_st(self)._model())._selectedProtocol_(aString);
  2755. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aString:aString},smalltalk.HLProtocolsListWidget)})},
  2756. args: ["aString"],
  2757. source: "selectItem: aString\x0a self model selectedProtocol: aString",
  2758. messageSends: ["selectedProtocol:", "model"],
  2759. referencedClasses: []
  2760. }),
  2761. smalltalk.HLProtocolsListWidget);
  2762. smalltalk.addMethod(
  2763. smalltalk.method({
  2764. selector: "selectedItem",
  2765. category: 'accessing',
  2766. fn: function (){
  2767. var self=this;
  2768. return smalltalk.withContext(function($ctx1) {
  2769. var $1;
  2770. $1=smalltalk.HLBrowserListWidget.fn.prototype._selectedItem.apply(_st(self), []);
  2771. return $1;
  2772. }, function($ctx1) {$ctx1.fill(self,"selectedItem",{},smalltalk.HLProtocolsListWidget)})},
  2773. args: [],
  2774. source: "selectedItem\x0a\x09^ super selectedItem\x22 ifNil: [ self allProtocol ]\x22",
  2775. messageSends: ["selectedItem"],
  2776. referencedClasses: []
  2777. }),
  2778. smalltalk.HLProtocolsListWidget);
  2779. smalltalk.addMethod(
  2780. smalltalk.method({
  2781. selector: "setItemsForClass:",
  2782. category: 'private',
  2783. fn: function (aClass){
  2784. var self=this;
  2785. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  2786. return smalltalk.withContext(function($ctx1) {
  2787. var $1,$3,$4,$5,$2;
  2788. $1=self;
  2789. $3=aClass;
  2790. if(($receiver = $3) == nil || $receiver == undefined){
  2791. $2=_st($Array())._with_(_st(self)._allProtocol());
  2792. } else {
  2793. $4=_st($Array())._with_(_st(self)._allProtocol());
  2794. _st($4)._addAll_(_st(aClass)._protocols());
  2795. $5=_st($4)._yourself();
  2796. $2=$5;
  2797. };
  2798. _st($1)._items_($2);
  2799. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForClass:",{aClass:aClass},smalltalk.HLProtocolsListWidget)})},
  2800. args: ["aClass"],
  2801. source: "setItemsForClass: aClass\x0a\x09self items: (aClass\x0a \x09ifNil: [ Array with: self allProtocol ]\x0a \x09ifNotNil: [ \x0a \x09(Array with: self allProtocol) \x0a \x09addAll: aClass protocols; \x0a yourself ])",
  2802. messageSends: ["items:", "ifNil:ifNotNil:", "with:", "allProtocol", "addAll:", "protocols", "yourself"],
  2803. referencedClasses: ["Array"]
  2804. }),
  2805. smalltalk.HLProtocolsListWidget);
  2806. smalltalk.addMethod(
  2807. smalltalk.method({
  2808. selector: "setItemsForSelectedClass",
  2809. category: 'private',
  2810. fn: function (){
  2811. var self=this;
  2812. return smalltalk.withContext(function($ctx1) {
  2813. _st(self)._setItemsForClass_(_st(_st(self)._model())._selectedClass());
  2814. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedClass",{},smalltalk.HLProtocolsListWidget)})},
  2815. args: [],
  2816. source: "setItemsForSelectedClass\x0a\x09self setItemsForClass: self model selectedClass",
  2817. messageSends: ["setItemsForClass:", "selectedClass", "model"],
  2818. referencedClasses: []
  2819. }),
  2820. smalltalk.HLProtocolsListWidget);
  2821. smalltalk.addClass('HLBrowserModel', smalltalk.HLModel, ['selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedSelector', 'showInstance', 'showComment'], 'Helios-Browser');
  2822. smalltalk.addMethod(
  2823. smalltalk.method({
  2824. selector: "addInstVarNamed:",
  2825. category: 'actions',
  2826. fn: function (aString){
  2827. var self=this;
  2828. function $HLInstVarAdded(){return smalltalk.HLInstVarAdded||(typeof HLInstVarAdded=="undefined"?nil:HLInstVarAdded)}
  2829. return smalltalk.withContext(function($ctx1) {
  2830. var $1,$2;
  2831. _st(_st(self)._environment())._addInstVarNamed_to_(aString,_st(self)._selectedClass());
  2832. $1=_st($HLInstVarAdded())._new();
  2833. _st($1)._theClass_(_st(self)._selectedClass());
  2834. _st($1)._variableName_(aString);
  2835. $2=_st($1)._yourself();
  2836. _st(_st(self)._announcer())._announce_($2);
  2837. return self}, function($ctx1) {$ctx1.fill(self,"addInstVarNamed:",{aString:aString},smalltalk.HLBrowserModel)})},
  2838. args: ["aString"],
  2839. source: "addInstVarNamed: aString\x0a\x09self environment addInstVarNamed: aString to: self selectedClass.\x0a\x09self announcer announce: (HLInstVarAdded new\x0a\x09\x09theClass: self selectedClass;\x0a\x09\x09variableName: aString;\x0a\x09\x09yourself)",
  2840. messageSends: ["addInstVarNamed:to:", "selectedClass", "environment", "announce:", "theClass:", "new", "variableName:", "yourself", "announcer"],
  2841. referencedClasses: ["HLInstVarAdded"]
  2842. }),
  2843. smalltalk.HLBrowserModel);
  2844. smalltalk.addMethod(
  2845. smalltalk.method({
  2846. selector: "allProtocol",
  2847. category: 'defaults',
  2848. fn: function (){
  2849. var self=this;
  2850. return smalltalk.withContext(function($ctx1) {
  2851. return "-- all --";
  2852. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{},smalltalk.HLBrowserModel)})},
  2853. args: [],
  2854. source: "allProtocol\x0a\x09^ '-- all --'",
  2855. messageSends: [],
  2856. referencedClasses: []
  2857. }),
  2858. smalltalk.HLBrowserModel);
  2859. smalltalk.addMethod(
  2860. smalltalk.method({
  2861. selector: "allSelectors",
  2862. category: 'accessing',
  2863. fn: function (){
  2864. var self=this;
  2865. return smalltalk.withContext(function($ctx1) {
  2866. var $1;
  2867. $1=_st(_st(self)._environment())._allSelectors();
  2868. return $1;
  2869. }, function($ctx1) {$ctx1.fill(self,"allSelectors",{},smalltalk.HLBrowserModel)})},
  2870. args: [],
  2871. source: "allSelectors\x0a\x09^ self environment allSelectors",
  2872. messageSends: ["allSelectors", "environment"],
  2873. referencedClasses: []
  2874. }),
  2875. smalltalk.HLBrowserModel);
  2876. smalltalk.addMethod(
  2877. smalltalk.method({
  2878. selector: "availableClassNames",
  2879. category: 'accessing',
  2880. fn: function (){
  2881. var self=this;
  2882. return smalltalk.withContext(function($ctx1) {
  2883. var $1;
  2884. $1=_st(_st(self)._environment())._availableClassNames();
  2885. return $1;
  2886. }, function($ctx1) {$ctx1.fill(self,"availableClassNames",{},smalltalk.HLBrowserModel)})},
  2887. args: [],
  2888. source: "availableClassNames\x0a\x09^ self environment availableClassNames",
  2889. messageSends: ["availableClassNames", "environment"],
  2890. referencedClasses: []
  2891. }),
  2892. smalltalk.HLBrowserModel);
  2893. smalltalk.addMethod(
  2894. smalltalk.method({
  2895. selector: "availablePackageNames",
  2896. category: 'accessing',
  2897. fn: function (){
  2898. var self=this;
  2899. return smalltalk.withContext(function($ctx1) {
  2900. var $1;
  2901. $1=_st(_st(self)._environment())._availablePackageNames();
  2902. return $1;
  2903. }, function($ctx1) {$ctx1.fill(self,"availablePackageNames",{},smalltalk.HLBrowserModel)})},
  2904. args: [],
  2905. source: "availablePackageNames\x0a\x09^ self environment availablePackageNames",
  2906. messageSends: ["availablePackageNames", "environment"],
  2907. referencedClasses: []
  2908. }),
  2909. smalltalk.HLBrowserModel);
  2910. smalltalk.addMethod(
  2911. smalltalk.method({
  2912. selector: "availablePackages",
  2913. category: 'accessing',
  2914. fn: function (){
  2915. var self=this;
  2916. return smalltalk.withContext(function($ctx1) {
  2917. var $1;
  2918. $1=_st(_st(self)._environment())._availablePackageNames();
  2919. return $1;
  2920. }, function($ctx1) {$ctx1.fill(self,"availablePackages",{},smalltalk.HLBrowserModel)})},
  2921. args: [],
  2922. source: "availablePackages\x0a\x09^ self environment availablePackageNames",
  2923. messageSends: ["availablePackageNames", "environment"],
  2924. referencedClasses: []
  2925. }),
  2926. smalltalk.HLBrowserModel);
  2927. smalltalk.addMethod(
  2928. smalltalk.method({
  2929. selector: "availableProtocols",
  2930. category: 'accessing',
  2931. fn: function (){
  2932. var self=this;
  2933. return smalltalk.withContext(function($ctx1) {
  2934. var $1;
  2935. $1=_st(_st(self)._environment())._availableProtocolsFor_(_st(self)._selectedClass());
  2936. return $1;
  2937. }, function($ctx1) {$ctx1.fill(self,"availableProtocols",{},smalltalk.HLBrowserModel)})},
  2938. args: [],
  2939. source: "availableProtocols\x0a\x09^ self environment availableProtocolsFor: self selectedClass",
  2940. messageSends: ["availableProtocolsFor:", "selectedClass", "environment"],
  2941. referencedClasses: []
  2942. }),
  2943. smalltalk.HLBrowserModel);
  2944. smalltalk.addMethod(
  2945. smalltalk.method({
  2946. selector: "commitPackage",
  2947. category: 'commands actions',
  2948. fn: function (){
  2949. var self=this;
  2950. return smalltalk.withContext(function($ctx1) {
  2951. _st(self)._withHelperLabelled_do_(_st(_st("Committing package ").__comma(_st(_st(self)._selectedPackage())._name())).__comma("..."),(function(){
  2952. return smalltalk.withContext(function($ctx2) {
  2953. return _st(_st(self)._environment())._commitPackage_(_st(self)._selectedPackage());
  2954. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2955. return self}, function($ctx1) {$ctx1.fill(self,"commitPackage",{},smalltalk.HLBrowserModel)})},
  2956. args: [],
  2957. source: "commitPackage\x0a\x09self \x0a\x09\x09withHelperLabelled: 'Committing package ', self selectedPackage name, '...'\x0a\x09\x09do: [ self environment commitPackage: self selectedPackage ]",
  2958. messageSends: ["withHelperLabelled:do:", ",", "name", "selectedPackage", "commitPackage:", "environment"],
  2959. referencedClasses: []
  2960. }),
  2961. smalltalk.HLBrowserModel);
  2962. smalltalk.addMethod(
  2963. smalltalk.method({
  2964. selector: "compilationProtocol",
  2965. category: 'private',
  2966. fn: function (){
  2967. var self=this;
  2968. var currentProtocol;
  2969. return smalltalk.withContext(function($ctx1) {
  2970. var $1,$2,$4,$3;
  2971. currentProtocol=_st(self)._selectedProtocol();
  2972. $1=currentProtocol;
  2973. if(($receiver = $1) == nil || $receiver == undefined){
  2974. currentProtocol=_st(self)._unclassifiedProtocol();
  2975. currentProtocol;
  2976. } else {
  2977. $1;
  2978. };
  2979. $2=_st(self)._selectedMethod();
  2980. if(($receiver = $2) == nil || $receiver == undefined){
  2981. $2;
  2982. } else {
  2983. currentProtocol=_st(_st(self)._selectedMethod())._protocol();
  2984. currentProtocol;
  2985. };
  2986. $4=_st(currentProtocol).__eq(_st(self)._allProtocol());
  2987. if(smalltalk.assert($4)){
  2988. $3=_st(self)._unclassifiedProtocol();
  2989. } else {
  2990. $3=currentProtocol;
  2991. };
  2992. return $3;
  2993. }, function($ctx1) {$ctx1.fill(self,"compilationProtocol",{currentProtocol:currentProtocol},smalltalk.HLBrowserModel)})},
  2994. args: [],
  2995. source: "compilationProtocol\x0a\x09| currentProtocol |\x0a\x09\x0a\x09currentProtocol := self selectedProtocol.\x0a\x09currentProtocol ifNil: [ currentProtocol := self unclassifiedProtocol ].\x0a\x09self selectedMethod ifNotNil: [ currentProtocol := self selectedMethod protocol ].\x0a\x0a\x09^ currentProtocol = self allProtocol\x0a\x09\x09ifTrue: [ self unclassifiedProtocol ]\x0a\x09\x09ifFalse: [ currentProtocol ]",
  2996. messageSends: ["selectedProtocol", "ifNil:", "unclassifiedProtocol", "ifNotNil:", "protocol", "selectedMethod", "ifTrue:ifFalse:", "=", "allProtocol"],
  2997. referencedClasses: []
  2998. }),
  2999. smalltalk.HLBrowserModel);
  3000. smalltalk.addMethod(
  3001. smalltalk.method({
  3002. selector: "compileClassComment:",
  3003. category: 'compiling',
  3004. fn: function (aString){
  3005. var self=this;
  3006. return smalltalk.withContext(function($ctx1) {
  3007. _st(_st(self)._environment())._compileClassComment_for_(aString,_st(self)._selectedClass());
  3008. return self}, function($ctx1) {$ctx1.fill(self,"compileClassComment:",{aString:aString},smalltalk.HLBrowserModel)})},
  3009. args: ["aString"],
  3010. source: "compileClassComment: aString\x0a\x09self environment \x0a\x09\x09compileClassComment: aString \x0a\x09\x09for: self selectedClass",
  3011. messageSends: ["compileClassComment:for:", "selectedClass", "environment"],
  3012. referencedClasses: []
  3013. }),
  3014. smalltalk.HLBrowserModel);
  3015. smalltalk.addMethod(
  3016. smalltalk.method({
  3017. selector: "compileClassDefinition:",
  3018. category: 'compiling',
  3019. fn: function (aString){
  3020. var self=this;
  3021. return smalltalk.withContext(function($ctx1) {
  3022. _st(_st(self)._environment())._compileClassDefinition_(aString);
  3023. return self}, function($ctx1) {$ctx1.fill(self,"compileClassDefinition:",{aString:aString},smalltalk.HLBrowserModel)})},
  3024. args: ["aString"],
  3025. source: "compileClassDefinition: aString\x0a\x09self environment compileClassDefinition: aString",
  3026. messageSends: ["compileClassDefinition:", "environment"],
  3027. referencedClasses: []
  3028. }),
  3029. smalltalk.HLBrowserModel);
  3030. smalltalk.addMethod(
  3031. smalltalk.method({
  3032. selector: "compileMethod:",
  3033. category: 'compiling',
  3034. fn: function (aString){
  3035. var self=this;
  3036. var method;
  3037. return smalltalk.withContext(function($ctx1) {
  3038. _st(self)._withCompileErrorHandling_((function(){
  3039. return smalltalk.withContext(function($ctx2) {
  3040. method=_st(_st(self)._environment())._compileMethod_for_protocol_(aString,_st(self)._selectedClass(),_st(self)._compilationProtocol());
  3041. method;
  3042. return _st(self)._selectedMethod_(method);
  3043. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3044. return self}, function($ctx1) {$ctx1.fill(self,"compileMethod:",{aString:aString,method:method},smalltalk.HLBrowserModel)})},
  3045. args: ["aString"],
  3046. source: "compileMethod: aString\x0a\x09| method |\x0a\x09\x0a\x09self withCompileErrorHandling: [ \x0a\x09\x09method := self environment \x0a\x09\x09\x09compileMethod: aString \x0a\x09\x09\x09for: self selectedClass\x0a\x09\x09\x09protocol: self compilationProtocol.\x0a\x0a\x09\x09self selectedMethod: method ]",
  3047. messageSends: ["withCompileErrorHandling:", "compileMethod:for:protocol:", "selectedClass", "compilationProtocol", "environment", "selectedMethod:"],
  3048. referencedClasses: []
  3049. }),
  3050. smalltalk.HLBrowserModel);
  3051. smalltalk.addMethod(
  3052. smalltalk.method({
  3053. selector: "copyClassTo:",
  3054. category: 'commands actions',
  3055. fn: function (aClassName){
  3056. var self=this;
  3057. return smalltalk.withContext(function($ctx1) {
  3058. _st(self)._withChangesDo_((function(){
  3059. return smalltalk.withContext(function($ctx2) {
  3060. return _st(_st(self)._environment())._copyClass_to_(_st(_st(self)._selectedClass())._theNonMetaClass(),aClassName);
  3061. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3062. return self}, function($ctx1) {$ctx1.fill(self,"copyClassTo:",{aClassName:aClassName},smalltalk.HLBrowserModel)})},
  3063. args: ["aClassName"],
  3064. source: "copyClassTo: aClassName\x0a\x09self withChangesDo: [ \x0a\x09\x09self environment \x0a\x09\x09\x09copyClass: self selectedClass theNonMetaClass\x0a\x09\x09\x09to: aClassName ]",
  3065. messageSends: ["withChangesDo:", "copyClass:to:", "theNonMetaClass", "selectedClass", "environment"],
  3066. referencedClasses: []
  3067. }),
  3068. smalltalk.HLBrowserModel);
  3069. smalltalk.addMethod(
  3070. smalltalk.method({
  3071. selector: "focusOnClasses",
  3072. category: 'actions',
  3073. fn: function (){
  3074. var self=this;
  3075. function $HLClassesFocusRequested(){return smalltalk.HLClassesFocusRequested||(typeof HLClassesFocusRequested=="undefined"?nil:HLClassesFocusRequested)}
  3076. return smalltalk.withContext(function($ctx1) {
  3077. _st(_st(self)._announcer())._announce_(_st($HLClassesFocusRequested())._new());
  3078. return self}, function($ctx1) {$ctx1.fill(self,"focusOnClasses",{},smalltalk.HLBrowserModel)})},
  3079. args: [],
  3080. source: "focusOnClasses\x0a\x09self announcer announce: HLClassesFocusRequested new",
  3081. messageSends: ["announce:", "new", "announcer"],
  3082. referencedClasses: ["HLClassesFocusRequested"]
  3083. }),
  3084. smalltalk.HLBrowserModel);
  3085. smalltalk.addMethod(
  3086. smalltalk.method({
  3087. selector: "focusOnMethods",
  3088. category: 'actions',
  3089. fn: function (){
  3090. var self=this;
  3091. function $HLMethodsFocusRequested(){return smalltalk.HLMethodsFocusRequested||(typeof HLMethodsFocusRequested=="undefined"?nil:HLMethodsFocusRequested)}
  3092. return smalltalk.withContext(function($ctx1) {
  3093. _st(_st(self)._announcer())._announce_(_st($HLMethodsFocusRequested())._new());
  3094. return self}, function($ctx1) {$ctx1.fill(self,"focusOnMethods",{},smalltalk.HLBrowserModel)})},
  3095. args: [],
  3096. source: "focusOnMethods\x0a\x09self announcer announce: HLMethodsFocusRequested new",
  3097. messageSends: ["announce:", "new", "announcer"],
  3098. referencedClasses: ["HLMethodsFocusRequested"]
  3099. }),
  3100. smalltalk.HLBrowserModel);
  3101. smalltalk.addMethod(
  3102. smalltalk.method({
  3103. selector: "focusOnPackages",
  3104. category: 'actions',
  3105. fn: function (){
  3106. var self=this;
  3107. function $HLPackagesFocusRequested(){return smalltalk.HLPackagesFocusRequested||(typeof HLPackagesFocusRequested=="undefined"?nil:HLPackagesFocusRequested)}
  3108. return smalltalk.withContext(function($ctx1) {
  3109. _st(_st(self)._announcer())._announce_(_st($HLPackagesFocusRequested())._new());
  3110. return self}, function($ctx1) {$ctx1.fill(self,"focusOnPackages",{},smalltalk.HLBrowserModel)})},
  3111. args: [],
  3112. source: "focusOnPackages\x0a\x09self announcer announce: HLPackagesFocusRequested new",
  3113. messageSends: ["announce:", "new", "announcer"],
  3114. referencedClasses: ["HLPackagesFocusRequested"]
  3115. }),
  3116. smalltalk.HLBrowserModel);
  3117. smalltalk.addMethod(
  3118. smalltalk.method({
  3119. selector: "focusOnProtocols",
  3120. category: 'actions',
  3121. fn: function (){
  3122. var self=this;
  3123. function $HLProtocolsFocusRequested(){return smalltalk.HLProtocolsFocusRequested||(typeof HLProtocolsFocusRequested=="undefined"?nil:HLProtocolsFocusRequested)}
  3124. return smalltalk.withContext(function($ctx1) {
  3125. _st(_st(self)._announcer())._announce_(_st($HLProtocolsFocusRequested())._new());
  3126. return self}, function($ctx1) {$ctx1.fill(self,"focusOnProtocols",{},smalltalk.HLBrowserModel)})},
  3127. args: [],
  3128. source: "focusOnProtocols\x0a\x09self announcer announce: HLProtocolsFocusRequested new",
  3129. messageSends: ["announce:", "new", "announcer"],
  3130. referencedClasses: ["HLProtocolsFocusRequested"]
  3131. }),
  3132. smalltalk.HLBrowserModel);
  3133. smalltalk.addMethod(
  3134. smalltalk.method({
  3135. selector: "focusOnSourceCode",
  3136. category: 'actions',
  3137. fn: function (){
  3138. var self=this;
  3139. function $HLSourceCodeFocusRequested(){return smalltalk.HLSourceCodeFocusRequested||(typeof HLSourceCodeFocusRequested=="undefined"?nil:HLSourceCodeFocusRequested)}
  3140. return smalltalk.withContext(function($ctx1) {
  3141. _st(_st(self)._announcer())._announce_(_st($HLSourceCodeFocusRequested())._new());
  3142. return self}, function($ctx1) {$ctx1.fill(self,"focusOnSourceCode",{},smalltalk.HLBrowserModel)})},
  3143. args: [],
  3144. source: "focusOnSourceCode\x0a\x09self announcer announce: HLSourceCodeFocusRequested new",
  3145. messageSends: ["announce:", "new", "announcer"],
  3146. referencedClasses: ["HLSourceCodeFocusRequested"]
  3147. }),
  3148. smalltalk.HLBrowserModel);
  3149. smalltalk.addMethod(
  3150. smalltalk.method({
  3151. selector: "handleCompileError:",
  3152. category: 'error handling',
  3153. fn: function (anError){
  3154. var self=this;
  3155. function $HLCompileErrorRaised(){return smalltalk.HLCompileErrorRaised||(typeof HLCompileErrorRaised=="undefined"?nil:HLCompileErrorRaised)}
  3156. return smalltalk.withContext(function($ctx1) {
  3157. var $1,$2;
  3158. $1=_st($HLCompileErrorRaised())._new();
  3159. _st($1)._error_(anError);
  3160. $2=_st($1)._yourself();
  3161. _st(_st(self)._announcer())._announce_($2);
  3162. return self}, function($ctx1) {$ctx1.fill(self,"handleCompileError:",{anError:anError},smalltalk.HLBrowserModel)})},
  3163. args: ["anError"],
  3164. source: "handleCompileError: anError\x0a\x09self announcer announce: (HLCompileErrorRaised new\x0a\x09\x09error: anError;\x0a\x09\x09yourself)",
  3165. messageSends: ["announce:", "error:", "new", "yourself", "announcer"],
  3166. referencedClasses: ["HLCompileErrorRaised"]
  3167. }),
  3168. smalltalk.HLBrowserModel);
  3169. smalltalk.addMethod(
  3170. smalltalk.method({
  3171. selector: "handleParseError:",
  3172. category: 'error handling',
  3173. fn: function (anError){
  3174. var self=this;
  3175. var split,line,column,messageToInsert;
  3176. function $HLParseErrorRaised(){return smalltalk.HLParseErrorRaised||(typeof HLParseErrorRaised=="undefined"?nil:HLParseErrorRaised)}
  3177. return smalltalk.withContext(function($ctx1) {
  3178. var $1,$2;
  3179. split=_st(_st(anError)._messageText())._tokenize_(" : ");
  3180. messageToInsert=_st(split)._second();
  3181. split=_st(_st(split)._first())._copyFrom_to_((21),_st(_st(split)._first())._size());
  3182. split=_st(split)._tokenize_(" column ");
  3183. line=_st(split)._first();
  3184. column=_st(split)._second();
  3185. $1=_st($HLParseErrorRaised())._new();
  3186. _st($1)._line_(_st(line)._asNumber());
  3187. _st($1)._column_(_st(column)._asNumber());
  3188. _st($1)._message_(messageToInsert);
  3189. _st($1)._error_(anError);
  3190. $2=_st($1)._yourself();
  3191. _st(_st(self)._announcer())._announce_($2);
  3192. return self}, function($ctx1) {$ctx1.fill(self,"handleParseError:",{anError:anError,split:split,line:line,column:column,messageToInsert:messageToInsert},smalltalk.HLBrowserModel)})},
  3193. args: ["anError"],
  3194. source: "handleParseError: anError\x0a\x09| split line column messageToInsert |\x0a\x09\x0a\x09split := anError messageText tokenize: ' : '.\x0a\x09messageToInsert := split second.\x0a\x0a\x09\x2221 = 'Parse error on line ' size + 1\x22\x0a\x09split := split first copyFrom: 21 to: split first size.\x0a\x09\x0a\x09split := split tokenize: ' column '.\x0a\x09line := split first.\x0a\x09column := split second.\x0a\x09\x0a\x09self announcer announce: (HLParseErrorRaised new\x0a\x09\x09line: line asNumber;\x0a\x09\x09column: column asNumber;\x0a\x09\x09message: messageToInsert;\x0a\x09\x09error: anError;\x0a\x09\x09yourself)",
  3195. messageSends: ["tokenize:", "messageText", "second", "copyFrom:to:", "size", "first", "announce:", "line:", "asNumber", "new", "column:", "message:", "error:", "yourself", "announcer"],
  3196. referencedClasses: ["HLParseErrorRaised"]
  3197. }),
  3198. smalltalk.HLBrowserModel);
  3199. smalltalk.addMethod(
  3200. smalltalk.method({
  3201. selector: "handleUnkownVariableError:",
  3202. category: 'accessing',
  3203. fn: function (anError){
  3204. var self=this;
  3205. function $HLUnknownVariableErrorRaised(){return smalltalk.HLUnknownVariableErrorRaised||(typeof HLUnknownVariableErrorRaised=="undefined"?nil:HLUnknownVariableErrorRaised)}
  3206. return smalltalk.withContext(function($ctx1) {
  3207. var $1,$2;
  3208. $1=_st($HLUnknownVariableErrorRaised())._new();
  3209. _st($1)._error_(anError);
  3210. $2=_st($1)._yourself();
  3211. _st(_st(self)._announcer())._announce_($2);
  3212. return self}, function($ctx1) {$ctx1.fill(self,"handleUnkownVariableError:",{anError:anError},smalltalk.HLBrowserModel)})},
  3213. args: ["anError"],
  3214. source: "handleUnkownVariableError: anError\x0a\x09self announcer announce: (HLUnknownVariableErrorRaised new\x0a\x09\x09error: anError;\x0a\x09\x09yourself)",
  3215. messageSends: ["announce:", "error:", "new", "yourself", "announcer"],
  3216. referencedClasses: ["HLUnknownVariableErrorRaised"]
  3217. }),
  3218. smalltalk.HLBrowserModel);
  3219. smalltalk.addMethod(
  3220. smalltalk.method({
  3221. selector: "moveClassToPackage:",
  3222. category: 'commands actions',
  3223. fn: function (aPackageName){
  3224. var self=this;
  3225. return smalltalk.withContext(function($ctx1) {
  3226. _st(self)._withChangesDo_((function(){
  3227. return smalltalk.withContext(function($ctx2) {
  3228. return _st(_st(self)._environment())._moveClass_toPackage_(_st(_st(self)._selectedClass())._theNonMetaClass(),aPackageName);
  3229. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3230. return self}, function($ctx1) {$ctx1.fill(self,"moveClassToPackage:",{aPackageName:aPackageName},smalltalk.HLBrowserModel)})},
  3231. args: ["aPackageName"],
  3232. source: "moveClassToPackage: aPackageName\x0a\x09self withChangesDo: [\x0a\x09\x09self environment \x0a\x09\x09\x09moveClass: self selectedClass theNonMetaClass\x0a\x09\x09\x09toPackage: aPackageName ]",
  3233. messageSends: ["withChangesDo:", "moveClass:toPackage:", "theNonMetaClass", "selectedClass", "environment"],
  3234. referencedClasses: []
  3235. }),
  3236. smalltalk.HLBrowserModel);
  3237. smalltalk.addMethod(
  3238. smalltalk.method({
  3239. selector: "moveMethodToClass:",
  3240. category: 'commands actions',
  3241. fn: function (aClassName){
  3242. var self=this;
  3243. return smalltalk.withContext(function($ctx1) {
  3244. _st(self)._withChangesDo_((function(){
  3245. return smalltalk.withContext(function($ctx2) {
  3246. return _st(_st(self)._environment())._moveMethod_toClass_(_st(self)._selectedMethod(),aClassName);
  3247. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3248. return self}, function($ctx1) {$ctx1.fill(self,"moveMethodToClass:",{aClassName:aClassName},smalltalk.HLBrowserModel)})},
  3249. args: ["aClassName"],
  3250. source: "moveMethodToClass: aClassName\x0a\x09self withChangesDo: [\x0a\x09\x09self environment \x0a\x09\x09\x09moveMethod: self selectedMethod \x0a\x09\x09\x09toClass: aClassName ]",
  3251. messageSends: ["withChangesDo:", "moveMethod:toClass:", "selectedMethod", "environment"],
  3252. referencedClasses: []
  3253. }),
  3254. smalltalk.HLBrowserModel);
  3255. smalltalk.addMethod(
  3256. smalltalk.method({
  3257. selector: "moveMethodToProtocol:",
  3258. category: 'commands actions',
  3259. fn: function (aProtocol){
  3260. var self=this;
  3261. return smalltalk.withContext(function($ctx1) {
  3262. _st(self)._withChangesDo_((function(){
  3263. return smalltalk.withContext(function($ctx2) {
  3264. return _st(_st(self)._environment())._moveMethod_toProtocol_(_st(self)._selectedMethod(),aProtocol);
  3265. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3266. return self}, function($ctx1) {$ctx1.fill(self,"moveMethodToProtocol:",{aProtocol:aProtocol},smalltalk.HLBrowserModel)})},
  3267. args: ["aProtocol"],
  3268. source: "moveMethodToProtocol: aProtocol\x0a\x09self withChangesDo: [\x0a\x09\x09self environment \x0a\x09\x09\x09moveMethod: self selectedMethod \x0a\x09\x09\x09toProtocol: aProtocol ]",
  3269. messageSends: ["withChangesDo:", "moveMethod:toProtocol:", "selectedMethod", "environment"],
  3270. referencedClasses: []
  3271. }),
  3272. smalltalk.HLBrowserModel);
  3273. smalltalk.addMethod(
  3274. smalltalk.method({
  3275. selector: "openClassNamed:",
  3276. category: 'commands actions',
  3277. fn: function (aString){
  3278. var self=this;
  3279. var class_;
  3280. return smalltalk.withContext(function($ctx1) {
  3281. _st(self)._withChangesDo_((function(){
  3282. return smalltalk.withContext(function($ctx2) {
  3283. class_=_st(_st(self)._environment())._classNamed_(aString);
  3284. class_;
  3285. _st(self)._selectedPackage_(_st(class_)._package());
  3286. return _st(self)._selectedClass_(class_);
  3287. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3288. return self}, function($ctx1) {$ctx1.fill(self,"openClassNamed:",{aString:aString,class_:class_},smalltalk.HLBrowserModel)})},
  3289. args: ["aString"],
  3290. source: "openClassNamed: aString\x0a\x09| class |\x0a\x09\x0a\x09self withChangesDo: [\x0a\x09\x09class := self environment classNamed: aString.\x0a\x09\x09self selectedPackage: class package.\x0a\x09\x09self selectedClass: class ]",
  3291. messageSends: ["withChangesDo:", "classNamed:", "environment", "selectedPackage:", "package", "selectedClass:"],
  3292. referencedClasses: []
  3293. }),
  3294. smalltalk.HLBrowserModel);
  3295. smalltalk.addMethod(
  3296. smalltalk.method({
  3297. selector: "packages",
  3298. category: 'accessing',
  3299. fn: function (){
  3300. var self=this;
  3301. return smalltalk.withContext(function($ctx1) {
  3302. var $1;
  3303. $1=_st(_st(self)._environment())._packages();
  3304. return $1;
  3305. }, function($ctx1) {$ctx1.fill(self,"packages",{},smalltalk.HLBrowserModel)})},
  3306. args: [],
  3307. source: "packages\x0a\x09^ self environment packages",
  3308. messageSends: ["packages", "environment"],
  3309. referencedClasses: []
  3310. }),
  3311. smalltalk.HLBrowserModel);
  3312. smalltalk.addMethod(
  3313. smalltalk.method({
  3314. selector: "removeClass",
  3315. category: 'commands actions',
  3316. fn: function (){
  3317. var self=this;
  3318. return smalltalk.withContext(function($ctx1) {
  3319. _st(self)._withChangesDo_((function(){
  3320. return smalltalk.withContext(function($ctx2) {
  3321. return _st(_st(self)._manager())._confirm_ifTrue_(_st("Do you REALLY want to remove class ").__comma(_st(_st(self)._selectedClass())._name()),(function(){
  3322. return smalltalk.withContext(function($ctx3) {
  3323. return _st(_st(self)._environment())._removeClass_(_st(self)._selectedClass());
  3324. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  3325. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3326. return self}, function($ctx1) {$ctx1.fill(self,"removeClass",{},smalltalk.HLBrowserModel)})},
  3327. args: [],
  3328. source: "removeClass\x0a\x09self withChangesDo: [\x0a\x09\x09self manager \x0a\x09\x09\x09confirm: 'Do you REALLY want to remove class ', self selectedClass name\x0a\x09\x09\x09ifTrue: [ self environment removeClass: self selectedClass ] ]",
  3329. messageSends: ["withChangesDo:", "confirm:ifTrue:", ",", "name", "selectedClass", "removeClass:", "environment", "manager"],
  3330. referencedClasses: []
  3331. }),
  3332. smalltalk.HLBrowserModel);
  3333. smalltalk.addMethod(
  3334. smalltalk.method({
  3335. selector: "removeMethod",
  3336. category: 'commands actions',
  3337. fn: function (){
  3338. var self=this;
  3339. return smalltalk.withContext(function($ctx1) {
  3340. _st(self)._withChangesDo_((function(){
  3341. return smalltalk.withContext(function($ctx2) {
  3342. return _st(_st(self)._manager())._confirm_ifTrue_(_st(_st(_st("Do you REALLY want to remove method ").__comma(_st(_st(_st(self)._selectedMethod())._methodClass())._name())).__comma(" >> #")).__comma(_st(_st(self)._selectedMethod())._selector()),(function(){
  3343. return smalltalk.withContext(function($ctx3) {
  3344. return _st(_st(self)._environment())._removeMethod_(_st(self)._selectedMethod());
  3345. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  3346. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3347. return self}, function($ctx1) {$ctx1.fill(self,"removeMethod",{},smalltalk.HLBrowserModel)})},
  3348. args: [],
  3349. source: "removeMethod\x0a\x09self withChangesDo: [\x0a\x09\x09self manager \x0a\x09\x09\x09confirm: 'Do you REALLY want to remove method ', self selectedMethod methodClass name,' >> #', self selectedMethod selector\x0a\x09\x09\x09ifTrue: [ self environment removeMethod: self selectedMethod ] ]",
  3350. messageSends: ["withChangesDo:", "confirm:ifTrue:", ",", "selector", "selectedMethod", "name", "methodClass", "removeMethod:", "environment", "manager"],
  3351. referencedClasses: []
  3352. }),
  3353. smalltalk.HLBrowserModel);
  3354. smalltalk.addMethod(
  3355. smalltalk.method({
  3356. selector: "removeProtocol",
  3357. category: 'commands actions',
  3358. fn: function (){
  3359. var self=this;
  3360. return smalltalk.withContext(function($ctx1) {
  3361. _st(self)._withChangesDo_((function(){
  3362. return smalltalk.withContext(function($ctx2) {
  3363. return _st(_st(self)._manager())._confirm_ifTrue_(_st("Do you REALLY want to remove protocol ").__comma(_st(self)._selectedProtocol()),(function(){
  3364. return smalltalk.withContext(function($ctx3) {
  3365. return _st(_st(self)._environment())._removeProtocol_from_(_st(self)._selectedProtocol(),_st(self)._selectedClass());
  3366. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  3367. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3368. return self}, function($ctx1) {$ctx1.fill(self,"removeProtocol",{},smalltalk.HLBrowserModel)})},
  3369. args: [],
  3370. source: "removeProtocol\x0a\x09self withChangesDo: [\x0a\x09\x09self manager \x0a\x09\x09\x09confirm: 'Do you REALLY want to remove protocol ', self selectedProtocol\x0a\x09\x09\x09ifTrue: [ self environment \x0a\x09\x09\x09\x09removeProtocol: self selectedProtocol \x0a\x09\x09\x09\x09from: self selectedClass ] ]",
  3371. messageSends: ["withChangesDo:", "confirm:ifTrue:", ",", "selectedProtocol", "removeProtocol:from:", "selectedClass", "environment", "manager"],
  3372. referencedClasses: []
  3373. }),
  3374. smalltalk.HLBrowserModel);
  3375. smalltalk.addMethod(
  3376. smalltalk.method({
  3377. selector: "renameClassTo:",
  3378. category: 'commands actions',
  3379. fn: function (aClassName){
  3380. var self=this;
  3381. return smalltalk.withContext(function($ctx1) {
  3382. _st(self)._withChangesDo_((function(){
  3383. return smalltalk.withContext(function($ctx2) {
  3384. return _st(_st(self)._environment())._renameClass_to_(_st(_st(self)._selectedClass())._theNonMetaClass(),aClassName);
  3385. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3386. return self}, function($ctx1) {$ctx1.fill(self,"renameClassTo:",{aClassName:aClassName},smalltalk.HLBrowserModel)})},
  3387. args: ["aClassName"],
  3388. source: "renameClassTo: aClassName\x0a\x09self withChangesDo: [\x0a\x09\x09self environment \x0a\x09\x09\x09renameClass: self selectedClass theNonMetaClass\x0a\x09\x09\x09to: aClassName ]",
  3389. messageSends: ["withChangesDo:", "renameClass:to:", "theNonMetaClass", "selectedClass", "environment"],
  3390. referencedClasses: []
  3391. }),
  3392. smalltalk.HLBrowserModel);
  3393. smalltalk.addMethod(
  3394. smalltalk.method({
  3395. selector: "renameProtocolTo:",
  3396. category: 'commands actions',
  3397. fn: function (aString){
  3398. var self=this;
  3399. return smalltalk.withContext(function($ctx1) {
  3400. _st(self)._withChangesDo_((function(){
  3401. return smalltalk.withContext(function($ctx2) {
  3402. return _st(_st(self)._environment())._renameProtocol_to_in_(_st(self)._selectedProtocol(),aString,_st(self)._selectedClass());
  3403. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3404. return self}, function($ctx1) {$ctx1.fill(self,"renameProtocolTo:",{aString:aString},smalltalk.HLBrowserModel)})},
  3405. args: ["aString"],
  3406. source: "renameProtocolTo: aString\x0a\x09self withChangesDo: [\x0a\x09\x09self environment \x0a\x09\x09\x09renameProtocol: self selectedProtocol\x0a\x09\x09\x09to: aString\x0a\x09\x09\x09in: self selectedClass ]",
  3407. messageSends: ["withChangesDo:", "renameProtocol:to:in:", "selectedProtocol", "selectedClass", "environment"],
  3408. referencedClasses: []
  3409. }),
  3410. smalltalk.HLBrowserModel);
  3411. smalltalk.addMethod(
  3412. smalltalk.method({
  3413. selector: "save:",
  3414. category: 'actions',
  3415. fn: function (aString){
  3416. var self=this;
  3417. function $HLSourceCodeSaved(){return smalltalk.HLSourceCodeSaved||(typeof HLSourceCodeSaved=="undefined"?nil:HLSourceCodeSaved)}
  3418. return smalltalk.withContext(function($ctx1) {
  3419. var $1;
  3420. _st(_st(self)._announcer())._announce_(_st($HLSourceCodeSaved())._new());
  3421. $1=_st(self)._shouldCompileClassDefinition_(aString);
  3422. if(smalltalk.assert($1)){
  3423. _st(self)._compileClassDefinition_(aString);
  3424. } else {
  3425. _st(self)._compileMethod_(aString);
  3426. };
  3427. return self}, function($ctx1) {$ctx1.fill(self,"save:",{aString:aString},smalltalk.HLBrowserModel)})},
  3428. args: ["aString"],
  3429. source: "save: aString\x0a\x09self announcer announce: HLSourceCodeSaved new.\x0a\x09\x0a\x09(self shouldCompileClassDefinition: aString)\x0a\x09\x09ifTrue: [ self compileClassDefinition: aString ]\x0a\x09\x09ifFalse: [ self compileMethod: aString ]",
  3430. messageSends: ["announce:", "new", "announcer", "ifTrue:ifFalse:", "compileClassDefinition:", "compileMethod:", "shouldCompileClassDefinition:"],
  3431. referencedClasses: ["HLSourceCodeSaved"]
  3432. }),
  3433. smalltalk.HLBrowserModel);
  3434. smalltalk.addMethod(
  3435. smalltalk.method({
  3436. selector: "saveSourceCode",
  3437. category: 'actions',
  3438. fn: function (){
  3439. var self=this;
  3440. function $HLSaveSourceCode(){return smalltalk.HLSaveSourceCode||(typeof HLSaveSourceCode=="undefined"?nil:HLSaveSourceCode)}
  3441. return smalltalk.withContext(function($ctx1) {
  3442. _st(_st(self)._announcer())._announce_(_st($HLSaveSourceCode())._new());
  3443. return self}, function($ctx1) {$ctx1.fill(self,"saveSourceCode",{},smalltalk.HLBrowserModel)})},
  3444. args: [],
  3445. source: "saveSourceCode\x0a\x09self announcer announce: HLSaveSourceCode new",
  3446. messageSends: ["announce:", "new", "announcer"],
  3447. referencedClasses: ["HLSaveSourceCode"]
  3448. }),
  3449. smalltalk.HLBrowserModel);
  3450. smalltalk.addMethod(
  3451. smalltalk.method({
  3452. selector: "selectedClass",
  3453. category: 'accessing',
  3454. fn: function (){
  3455. var self=this;
  3456. return smalltalk.withContext(function($ctx1) {
  3457. var $1;
  3458. $1=self["@selectedClass"];
  3459. return $1;
  3460. }, function($ctx1) {$ctx1.fill(self,"selectedClass",{},smalltalk.HLBrowserModel)})},
  3461. args: [],
  3462. source: "selectedClass\x0a\x09^ selectedClass",
  3463. messageSends: [],
  3464. referencedClasses: []
  3465. }),
  3466. smalltalk.HLBrowserModel);
  3467. smalltalk.addMethod(
  3468. smalltalk.method({
  3469. selector: "selectedClass:",
  3470. category: 'accessing',
  3471. fn: function (aClass){
  3472. var self=this;
  3473. function $HLClassSelected(){return smalltalk.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
  3474. return smalltalk.withContext(function($ctx1) {
  3475. var $1,$2,$3,$4,$5;
  3476. $1=_st(_st(_st(self)._selectedClass()).__eq(aClass))._and_((function(){
  3477. return smalltalk.withContext(function($ctx2) {
  3478. return _st(aClass)._isNil();
  3479. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3480. if(smalltalk.assert($1)){
  3481. $2=self;
  3482. return $2;
  3483. };
  3484. _st(self)._withChangesDo_((function(){
  3485. return smalltalk.withContext(function($ctx2) {
  3486. $3=_st(self["@selectedClass"]).__eq(aClass);
  3487. if(smalltalk.assert($3)){
  3488. _st(self)._selectedProtocol_(nil);
  3489. };
  3490. $4=aClass;
  3491. if(($receiver = $4) == nil || $receiver == undefined){
  3492. self["@selectedClass"]=nil;
  3493. self["@selectedClass"];
  3494. } else {
  3495. $5=_st(self)._showInstance();
  3496. if(smalltalk.assert($5)){
  3497. self["@selectedClass"]=_st(aClass)._theNonMetaClass();
  3498. self["@selectedClass"];
  3499. } else {
  3500. self["@selectedClass"]=_st(aClass)._theMetaClass();
  3501. self["@selectedClass"];
  3502. };
  3503. };
  3504. _st(self)._selectedProtocol_(nil);
  3505. return _st(_st(self)._announcer())._announce_(_st($HLClassSelected())._on_(_st(self)._selectedClass()));
  3506. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3507. return self}, function($ctx1) {$ctx1.fill(self,"selectedClass:",{aClass:aClass},smalltalk.HLBrowserModel)})},
  3508. args: ["aClass"],
  3509. source: "selectedClass: aClass\x0a\x09(self selectedClass = aClass and: [ aClass isNil ]) \x0a\x09\x09ifTrue: [ ^ self ].\x0a\x09\x0a\x09self withChangesDo: [\x0a\x09\x09selectedClass = aClass ifTrue: [ \x0a\x09\x09\x09self selectedProtocol: nil ].\x0a \x0a\x09\x09aClass \x0a \x09\x09\x09ifNil: [ selectedClass := nil ]\x0a \x09\x09ifNotNil: [\x0a\x09\x09\x09\x09self showInstance \x0a \x09\x09\x09\x09\x09ifTrue: [ selectedClass := aClass theNonMetaClass ]\x0a \x09\x09\x09\x09ifFalse: [ selectedClass := aClass theMetaClass ] ].\x0a\x09\x09self selectedProtocol: nil.\x0a\x09\x09self announcer announce: (HLClassSelected on: self selectedClass) ]",
  3510. messageSends: ["ifTrue:", "and:", "isNil", "=", "selectedClass", "withChangesDo:", "selectedProtocol:", "ifNil:ifNotNil:", "ifTrue:ifFalse:", "theNonMetaClass", "theMetaClass", "showInstance", "announce:", "on:", "announcer"],
  3511. referencedClasses: ["HLClassSelected"]
  3512. }),
  3513. smalltalk.HLBrowserModel);
  3514. smalltalk.addMethod(
  3515. smalltalk.method({
  3516. selector: "selectedMethod",
  3517. category: 'accessing',
  3518. fn: function (){
  3519. var self=this;
  3520. return smalltalk.withContext(function($ctx1) {
  3521. var $2,$1;
  3522. $2=_st(self)._selectedClass();
  3523. if(($receiver = $2) == nil || $receiver == undefined){
  3524. $1=$2;
  3525. } else {
  3526. $1=_st(_st(_st(self)._selectedClass())._methodDictionary())._at_ifAbsent_(self["@selectedSelector"],(function(){
  3527. return smalltalk.withContext(function($ctx2) {
  3528. return nil;
  3529. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3530. };
  3531. return $1;
  3532. }, function($ctx1) {$ctx1.fill(self,"selectedMethod",{},smalltalk.HLBrowserModel)})},
  3533. args: [],
  3534. source: "selectedMethod\x0a\x09^ self selectedClass ifNotNil: [ \x0a\x09\x09\x09self selectedClass methodDictionary \x0a\x09\x09\x09\x09at: selectedSelector \x0a\x09\x09\x09\x09ifAbsent: [ nil ] ]",
  3535. messageSends: ["ifNotNil:", "at:ifAbsent:", "methodDictionary", "selectedClass"],
  3536. referencedClasses: []
  3537. }),
  3538. smalltalk.HLBrowserModel);
  3539. smalltalk.addMethod(
  3540. smalltalk.method({
  3541. selector: "selectedMethod:",
  3542. category: 'accessing',
  3543. fn: function (aCompiledMethod){
  3544. var self=this;
  3545. function $HLMethodSelected(){return smalltalk.HLMethodSelected||(typeof HLMethodSelected=="undefined"?nil:HLMethodSelected)}
  3546. return smalltalk.withContext(function($ctx1) {
  3547. var $1,$2,$3;
  3548. $1=_st(self["@selectedSelector"]).__eq(aCompiledMethod);
  3549. if(smalltalk.assert($1)){
  3550. $2=self;
  3551. return $2;
  3552. };
  3553. _st(self)._withChangesDo_((function(){
  3554. return smalltalk.withContext(function($ctx2) {
  3555. $3=aCompiledMethod;
  3556. if(($receiver = $3) == nil || $receiver == undefined){
  3557. self["@selectedSelector"]=nil;
  3558. self["@selectedSelector"];
  3559. } else {
  3560. self["@selectedSelector"]=_st(aCompiledMethod)._selector();
  3561. self["@selectedSelector"];
  3562. };
  3563. return _st(_st(self)._announcer())._announce_(_st($HLMethodSelected())._on_(aCompiledMethod));
  3564. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3565. return self}, function($ctx1) {$ctx1.fill(self,"selectedMethod:",{aCompiledMethod:aCompiledMethod},smalltalk.HLBrowserModel)})},
  3566. args: ["aCompiledMethod"],
  3567. source: "selectedMethod: aCompiledMethod\x0a\x09selectedSelector = aCompiledMethod ifTrue: [ ^ self ].\x0a \x0a self withChangesDo: [\x0a\x09\x09aCompiledMethod\x0a \x09\x09ifNil: [ selectedSelector := nil ]\x0a \x09\x09ifNotNil: [\x0a\x09\x09\x09\x09selectedSelector := aCompiledMethod selector ].\x0a\x0a\x09\x09self announcer announce: (HLMethodSelected on: aCompiledMethod) ]",
  3568. messageSends: ["ifTrue:", "=", "withChangesDo:", "ifNil:ifNotNil:", "selector", "announce:", "on:", "announcer"],
  3569. referencedClasses: ["HLMethodSelected"]
  3570. }),
  3571. smalltalk.HLBrowserModel);
  3572. smalltalk.addMethod(
  3573. smalltalk.method({
  3574. selector: "selectedPackage",
  3575. category: 'accessing',
  3576. fn: function (){
  3577. var self=this;
  3578. return smalltalk.withContext(function($ctx1) {
  3579. var $1;
  3580. $1=self["@selectedPackage"];
  3581. return $1;
  3582. }, function($ctx1) {$ctx1.fill(self,"selectedPackage",{},smalltalk.HLBrowserModel)})},
  3583. args: [],
  3584. source: "selectedPackage\x0a\x09^ selectedPackage",
  3585. messageSends: [],
  3586. referencedClasses: []
  3587. }),
  3588. smalltalk.HLBrowserModel);
  3589. smalltalk.addMethod(
  3590. smalltalk.method({
  3591. selector: "selectedPackage:",
  3592. category: 'accessing',
  3593. fn: function (aPackage){
  3594. var self=this;
  3595. function $HLPackageSelected(){return smalltalk.HLPackageSelected||(typeof HLPackageSelected=="undefined"?nil:HLPackageSelected)}
  3596. return smalltalk.withContext(function($ctx1) {
  3597. var $1,$2;
  3598. $1=_st(self["@selectedPackage"]).__eq(aPackage);
  3599. if(smalltalk.assert($1)){
  3600. $2=self;
  3601. return $2;
  3602. };
  3603. _st(self)._withChangesDo_((function(){
  3604. return smalltalk.withContext(function($ctx2) {
  3605. self["@selectedPackage"]=aPackage;
  3606. self["@selectedPackage"];
  3607. _st(self)._selectedClass_(nil);
  3608. return _st(_st(self)._announcer())._announce_(_st($HLPackageSelected())._on_(aPackage));
  3609. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3610. return self}, function($ctx1) {$ctx1.fill(self,"selectedPackage:",{aPackage:aPackage},smalltalk.HLBrowserModel)})},
  3611. args: ["aPackage"],
  3612. source: "selectedPackage: aPackage\x0a\x09selectedPackage = aPackage ifTrue: [ ^ self ].\x0a \x0a\x09self withChangesDo: [\x0a\x09\x09selectedPackage := aPackage.\x0a\x09\x09self selectedClass: nil.\x0a\x09\x09self announcer announce: (HLPackageSelected on: aPackage) ]",
  3613. messageSends: ["ifTrue:", "=", "withChangesDo:", "selectedClass:", "announce:", "on:", "announcer"],
  3614. referencedClasses: ["HLPackageSelected"]
  3615. }),
  3616. smalltalk.HLBrowserModel);
  3617. smalltalk.addMethod(
  3618. smalltalk.method({
  3619. selector: "selectedProtocol",
  3620. category: 'accessing',
  3621. fn: function (){
  3622. var self=this;
  3623. return smalltalk.withContext(function($ctx1) {
  3624. var $1;
  3625. $1=self["@selectedProtocol"];
  3626. return $1;
  3627. }, function($ctx1) {$ctx1.fill(self,"selectedProtocol",{},smalltalk.HLBrowserModel)})},
  3628. args: [],
  3629. source: "selectedProtocol\x0a\x09^ selectedProtocol",
  3630. messageSends: [],
  3631. referencedClasses: []
  3632. }),
  3633. smalltalk.HLBrowserModel);
  3634. smalltalk.addMethod(
  3635. smalltalk.method({
  3636. selector: "selectedProtocol:",
  3637. category: 'accessing',
  3638. fn: function (aString){
  3639. var self=this;
  3640. function $HLProtocolSelected(){return smalltalk.HLProtocolSelected||(typeof HLProtocolSelected=="undefined"?nil:HLProtocolSelected)}
  3641. return smalltalk.withContext(function($ctx1) {
  3642. var $1,$2;
  3643. $1=_st(self["@selectedProtocol"]).__eq(aString);
  3644. if(smalltalk.assert($1)){
  3645. $2=self;
  3646. return $2;
  3647. };
  3648. _st(self)._withChangesDo_((function(){
  3649. return smalltalk.withContext(function($ctx2) {
  3650. self["@selectedProtocol"]=aString;
  3651. self["@selectedProtocol"];
  3652. _st(self)._selectedMethod_(nil);
  3653. return _st(_st(self)._announcer())._announce_(_st($HLProtocolSelected())._on_(aString));
  3654. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3655. return self}, function($ctx1) {$ctx1.fill(self,"selectedProtocol:",{aString:aString},smalltalk.HLBrowserModel)})},
  3656. args: ["aString"],
  3657. source: "selectedProtocol: aString\x0a\x09selectedProtocol = aString ifTrue: [ ^ self ].\x0a\x0a\x09self withChangesDo: [\x0a\x09\x09selectedProtocol := aString.\x0a\x09\x09self selectedMethod: nil.\x0a\x09\x09self announcer announce: (HLProtocolSelected on: aString) ]",
  3658. messageSends: ["ifTrue:", "=", "withChangesDo:", "selectedMethod:", "announce:", "on:", "announcer"],
  3659. referencedClasses: ["HLProtocolSelected"]
  3660. }),
  3661. smalltalk.HLBrowserModel);
  3662. smalltalk.addMethod(
  3663. smalltalk.method({
  3664. selector: "shouldCompileClassDefinition:",
  3665. category: 'testing',
  3666. fn: function (aString){
  3667. var self=this;
  3668. return smalltalk.withContext(function($ctx1) {
  3669. var $1;
  3670. $1=_st(_st(_st(self)._selectedClass())._isNil())._or_((function(){
  3671. return smalltalk.withContext(function($ctx2) {
  3672. return _st(_st(_st(aString)._first())._asUppercase()).__eq(_st(aString)._first());
  3673. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3674. return $1;
  3675. }, function($ctx1) {$ctx1.fill(self,"shouldCompileClassDefinition:",{aString:aString},smalltalk.HLBrowserModel)})},
  3676. args: ["aString"],
  3677. source: "shouldCompileClassDefinition: aString\x0a\x09^ self selectedClass isNil or: [\x0a\x09\x09aString first asUppercase = aString first ]",
  3678. messageSends: ["or:", "=", "first", "asUppercase", "isNil", "selectedClass"],
  3679. referencedClasses: []
  3680. }),
  3681. smalltalk.HLBrowserModel);
  3682. smalltalk.addMethod(
  3683. smalltalk.method({
  3684. selector: "showComment",
  3685. category: 'accessing',
  3686. fn: function (){
  3687. var self=this;
  3688. return smalltalk.withContext(function($ctx1) {
  3689. var $2,$1;
  3690. $2=self["@showComment"];
  3691. if(($receiver = $2) == nil || $receiver == undefined){
  3692. $1=false;
  3693. } else {
  3694. $1=$2;
  3695. };
  3696. return $1;
  3697. }, function($ctx1) {$ctx1.fill(self,"showComment",{},smalltalk.HLBrowserModel)})},
  3698. args: [],
  3699. source: "showComment\x0a\x09^ showComment ifNil: [ false ]",
  3700. messageSends: ["ifNil:"],
  3701. referencedClasses: []
  3702. }),
  3703. smalltalk.HLBrowserModel);
  3704. smalltalk.addMethod(
  3705. smalltalk.method({
  3706. selector: "showComment:",
  3707. category: 'accessing',
  3708. fn: function (aBoolean){
  3709. var self=this;
  3710. function $HLShowCommentToggled(){return smalltalk.HLShowCommentToggled||(typeof HLShowCommentToggled=="undefined"?nil:HLShowCommentToggled)}
  3711. return smalltalk.withContext(function($ctx1) {
  3712. _st(self)._withChangesDo_((function(){
  3713. return smalltalk.withContext(function($ctx2) {
  3714. self["@showComment"]=aBoolean;
  3715. self["@showComment"];
  3716. return _st(_st(self)._announcer())._announce_(_st($HLShowCommentToggled())._new());
  3717. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3718. return self}, function($ctx1) {$ctx1.fill(self,"showComment:",{aBoolean:aBoolean},smalltalk.HLBrowserModel)})},
  3719. args: ["aBoolean"],
  3720. source: "showComment: aBoolean\x0a\x09self withChangesDo: [\x0a\x09\x09showComment := aBoolean.\x0a\x09\x09self announcer announce: HLShowCommentToggled new ]",
  3721. messageSends: ["withChangesDo:", "announce:", "new", "announcer"],
  3722. referencedClasses: ["HLShowCommentToggled"]
  3723. }),
  3724. smalltalk.HLBrowserModel);
  3725. smalltalk.addMethod(
  3726. smalltalk.method({
  3727. selector: "showInstance",
  3728. category: 'accessing',
  3729. fn: function (){
  3730. var self=this;
  3731. return smalltalk.withContext(function($ctx1) {
  3732. var $2,$1;
  3733. $2=self["@showInstance"];
  3734. if(($receiver = $2) == nil || $receiver == undefined){
  3735. $1=true;
  3736. } else {
  3737. $1=$2;
  3738. };
  3739. return $1;
  3740. }, function($ctx1) {$ctx1.fill(self,"showInstance",{},smalltalk.HLBrowserModel)})},
  3741. args: [],
  3742. source: "showInstance\x0a\x09^ showInstance ifNil: [ true ]",
  3743. messageSends: ["ifNil:"],
  3744. referencedClasses: []
  3745. }),
  3746. smalltalk.HLBrowserModel);
  3747. smalltalk.addMethod(
  3748. smalltalk.method({
  3749. selector: "showInstance:",
  3750. category: 'accessing',
  3751. fn: function (aBoolean){
  3752. var self=this;
  3753. function $HLShowInstanceToggled(){return smalltalk.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
  3754. return smalltalk.withContext(function($ctx1) {
  3755. var $1,$2,$4,$3;
  3756. _st(self)._withChangesDo_((function(){
  3757. return smalltalk.withContext(function($ctx2) {
  3758. self["@showInstance"]=aBoolean;
  3759. self["@showInstance"];
  3760. self["@showComment"]=false;
  3761. self["@showComment"];
  3762. $1=_st(self)._selectedClass();
  3763. if(($receiver = $1) == nil || $receiver == undefined){
  3764. $1;
  3765. } else {
  3766. $2=self;
  3767. $4=aBoolean;
  3768. if(smalltalk.assert($4)){
  3769. $3=_st(_st(self)._selectedClass())._theNonMetaClass();
  3770. } else {
  3771. $3=_st(_st(self)._selectedClass())._theMetaClass();
  3772. };
  3773. _st($2)._selectedClass_($3);
  3774. };
  3775. return _st(_st(self)._announcer())._announce_(_st($HLShowInstanceToggled())._new());
  3776. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3777. return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean},smalltalk.HLBrowserModel)})},
  3778. args: ["aBoolean"],
  3779. source: "showInstance: aBoolean\x0a\x0a\x09self withChangesDo: [\x0a\x09\x09showInstance := aBoolean.\x0a\x09\x09showComment := false.\x0a\x0a \x09self selectedClass ifNotNil: [\x0a \x09\x09self selectedClass: (aBoolean\x0a \x09\x09\x09ifTrue: [self selectedClass theNonMetaClass ]\x0a\x09 \x09 \x09ifFalse: [ self selectedClass theMetaClass ]) ].\x0a \x0a\x09\x09self announcer announce: HLShowInstanceToggled new ] ",
  3780. messageSends: ["withChangesDo:", "ifNotNil:", "selectedClass:", "ifTrue:ifFalse:", "theNonMetaClass", "selectedClass", "theMetaClass", "announce:", "new", "announcer"],
  3781. referencedClasses: ["HLShowInstanceToggled"]
  3782. }),
  3783. smalltalk.HLBrowserModel);
  3784. smalltalk.addMethod(
  3785. smalltalk.method({
  3786. selector: "unclassifiedProtocol",
  3787. category: 'defaults',
  3788. fn: function (){
  3789. var self=this;
  3790. return smalltalk.withContext(function($ctx1) {
  3791. return "as yet unclassified";
  3792. }, function($ctx1) {$ctx1.fill(self,"unclassifiedProtocol",{},smalltalk.HLBrowserModel)})},
  3793. args: [],
  3794. source: "unclassifiedProtocol\x0a\x09^ 'as yet unclassified'",
  3795. messageSends: [],
  3796. referencedClasses: []
  3797. }),
  3798. smalltalk.HLBrowserModel);
  3799. smalltalk.addMethod(
  3800. smalltalk.method({
  3801. selector: "withCompileErrorHandling:",
  3802. category: 'error handling',
  3803. fn: function (aBlock){
  3804. var self=this;
  3805. function $CompilerError(){return smalltalk.CompilerError||(typeof CompilerError=="undefined"?nil:CompilerError)}
  3806. function $UnknownVariableError(){return smalltalk.UnknownVariableError||(typeof UnknownVariableError=="undefined"?nil:UnknownVariableError)}
  3807. function $ParseError(){return smalltalk.ParseError||(typeof ParseError=="undefined"?nil:ParseError)}
  3808. return smalltalk.withContext(function($ctx1) {
  3809. _st((function(){
  3810. return smalltalk.withContext(function($ctx2) {
  3811. return _st((function(){
  3812. return smalltalk.withContext(function($ctx3) {
  3813. return _st(aBlock)._on_do_($ParseError(),(function(ex){
  3814. return smalltalk.withContext(function($ctx4) {
  3815. return _st(self)._handleParseError_(ex);
  3816. }, function($ctx4) {$ctx4.fillBlock({ex:ex},$ctx1)})}));
  3817. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._on_do_($UnknownVariableError(),(function(ex){
  3818. return smalltalk.withContext(function($ctx3) {
  3819. return _st(self)._handleUnkownVariableError_(ex);
  3820. }, function($ctx3) {$ctx3.fillBlock({ex:ex},$ctx1)})}));
  3821. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_($CompilerError(),(function(ex){
  3822. return smalltalk.withContext(function($ctx2) {
  3823. return _st(self)._handleCompileError_(ex);
  3824. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
  3825. return self}, function($ctx1) {$ctx1.fill(self,"withCompileErrorHandling:",{aBlock:aBlock},smalltalk.HLBrowserModel)})},
  3826. args: ["aBlock"],
  3827. source: "withCompileErrorHandling: aBlock\x0a\x09[\x0a\x09\x09[\x0a\x09\x09\x09aBlock \x0a\x09\x09\x09\x09on: ParseError\x0a\x09\x09\x09\x09do: [:ex | self handleParseError: ex ]\x0a\x09\x09]\x0a\x09\x09\x09on: UnknownVariableError\x0a\x09\x09\x09do: [ :ex | self handleUnkownVariableError: ex ]\x0a\x09]\x0a\x09\x09on: CompilerError\x0a\x09\x09do: [ :ex | self handleCompileError: ex ]",
  3828. messageSends: ["on:do:", "handleCompileError:", "handleUnkownVariableError:", "handleParseError:"],
  3829. referencedClasses: ["CompilerError", "UnknownVariableError", "ParseError"]
  3830. }),
  3831. smalltalk.HLBrowserModel);
  3832. smalltalk.addMethod(
  3833. smalltalk.method({
  3834. selector: "withHelperLabelled:do:",
  3835. category: 'private',
  3836. fn: function (aString,aBlock){
  3837. var self=this;
  3838. return smalltalk.withContext(function($ctx1) {
  3839. var $1,$2;
  3840. _st(_st(window)._jQuery_("#helper"))._remove();
  3841. _st((function(html){
  3842. return smalltalk.withContext(function($ctx2) {
  3843. $1=_st(html)._div();
  3844. _st($1)._id_("helper");
  3845. $2=_st($1)._with_(aString);
  3846. return $2;
  3847. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}))._appendToJQuery_(_st("body")._asJQuery());
  3848. _st((function(){
  3849. return smalltalk.withContext(function($ctx2) {
  3850. _st(aBlock)._value();
  3851. return _st(_st(window)._jQuery_("#helper"))._remove();
  3852. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._valueWithTimeout_((10));
  3853. return self}, function($ctx1) {$ctx1.fill(self,"withHelperLabelled:do:",{aString:aString,aBlock:aBlock},smalltalk.HLBrowserModel)})},
  3854. args: ["aString", "aBlock"],
  3855. source: "withHelperLabelled: aString do: aBlock\x0a\x09\x22TODO: doesn't belong here\x22\x0a\x0a\x09(window jQuery: '#helper') remove.\x0a\x0a\x09[ :html |\x0a\x09\x09html div \x0a\x09\x09\x09id: 'helper';\x0a\x09\x09\x09with: aString ] appendToJQuery: 'body' asJQuery.\x0a\x09\x0a\x09[\x0a\x09\x09aBlock value.\x0a\x09\x09(window jQuery: '#helper') remove\x0a\x09] \x0a\x09\x09valueWithTimeout: 10",
  3856. messageSends: ["remove", "jQuery:", "appendToJQuery:", "asJQuery", "id:", "div", "with:", "valueWithTimeout:", "value"],
  3857. referencedClasses: []
  3858. }),
  3859. smalltalk.HLBrowserModel);
  3860. smalltalk.addMethod(
  3861. smalltalk.method({
  3862. selector: "on:",
  3863. category: 'actions',
  3864. fn: function (anEnvironment){
  3865. var self=this;
  3866. return smalltalk.withContext(function($ctx1) {
  3867. var $2,$3,$1;
  3868. $2=_st(self)._new();
  3869. _st($2)._environment_(anEnvironment);
  3870. $3=_st($2)._yourself();
  3871. $1=$3;
  3872. return $1;
  3873. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment},smalltalk.HLBrowserModel.klass)})},
  3874. args: ["anEnvironment"],
  3875. source: "on: anEnvironment\x0a\x0a\x09^ self new\x0a \x09environment: anEnvironment;\x0a yourself",
  3876. messageSends: ["environment:", "new", "yourself"],
  3877. referencedClasses: []
  3878. }),
  3879. smalltalk.HLBrowserModel.klass);
  3880. smalltalk.addClass('HLClassCache', smalltalk.Object, ['class', 'selectorsCache', 'overrideCache', 'overriddenCache'], 'Helios-Browser');
  3881. smalltalk.addMethod(
  3882. smalltalk.method({
  3883. selector: "invalidateChildrenSelector:",
  3884. category: 'actions',
  3885. fn: function (aSelector){
  3886. var self=this;
  3887. return smalltalk.withContext(function($ctx1) {
  3888. var $1,$2;
  3889. _st(_st(_st(self)._theClass())._subclasses())._do_((function(each){
  3890. return smalltalk.withContext(function($ctx2) {
  3891. $1=_st(_st(self)._selectorsCache())._cacheFor_(each);
  3892. _st($1)._removeSelector_(aSelector);
  3893. $2=_st($1)._invalidateChildrenSelector_(aSelector);
  3894. return $2;
  3895. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3896. return self}, function($ctx1) {$ctx1.fill(self,"invalidateChildrenSelector:",{aSelector:aSelector},smalltalk.HLClassCache)})},
  3897. args: ["aSelector"],
  3898. source: "invalidateChildrenSelector: aSelector\x0a\x09self theClass subclasses do: [ :each |\x0a \x09(self selectorsCache cacheFor: each)\x0a \x09removeSelector: aSelector;\x0a \x09invalidateChildrenSelector: aSelector ]",
  3899. messageSends: ["do:", "removeSelector:", "cacheFor:", "selectorsCache", "invalidateChildrenSelector:", "subclasses", "theClass"],
  3900. referencedClasses: []
  3901. }),
  3902. smalltalk.HLClassCache);
  3903. smalltalk.addMethod(
  3904. smalltalk.method({
  3905. selector: "invalidateParentSelector:",
  3906. category: 'actions',
  3907. fn: function (aSelector){
  3908. var self=this;
  3909. return smalltalk.withContext(function($ctx1) {
  3910. var $1,$2,$3;
  3911. $1=_st(_st(self)._theClass())._superclass();
  3912. if(($receiver = $1) == nil || $receiver == undefined){
  3913. $1;
  3914. } else {
  3915. $2=_st(_st(self)._selectorsCache())._cacheFor_(_st(_st(self)._theClass())._superclass());
  3916. _st($2)._removeSelector_(aSelector);
  3917. $3=_st($2)._invalidateParentSelector_(aSelector);
  3918. $3;
  3919. };
  3920. return self}, function($ctx1) {$ctx1.fill(self,"invalidateParentSelector:",{aSelector:aSelector},smalltalk.HLClassCache)})},
  3921. args: ["aSelector"],
  3922. source: "invalidateParentSelector: aSelector\x0a\x09self theClass superclass ifNotNil: [\x0a \x09(self selectorsCache cacheFor: self theClass superclass)\x0a \x09removeSelector: aSelector;\x0a\x09\x09\x09invalidateParentSelector: aSelector ]",
  3923. messageSends: ["ifNotNil:", "removeSelector:", "cacheFor:", "superclass", "theClass", "selectorsCache", "invalidateParentSelector:"],
  3924. referencedClasses: []
  3925. }),
  3926. smalltalk.HLClassCache);
  3927. smalltalk.addMethod(
  3928. smalltalk.method({
  3929. selector: "invalidateSelector:",
  3930. category: 'actions',
  3931. fn: function (aSelector){
  3932. var self=this;
  3933. return smalltalk.withContext(function($ctx1) {
  3934. var $1,$2;
  3935. $1=self;
  3936. _st($1)._invalidateParentSelector_(aSelector);
  3937. _st($1)._invalidateChildrenSelector_(aSelector);
  3938. $2=_st($1)._removeSelector_(aSelector);
  3939. return self}, function($ctx1) {$ctx1.fill(self,"invalidateSelector:",{aSelector:aSelector},smalltalk.HLClassCache)})},
  3940. args: ["aSelector"],
  3941. source: "invalidateSelector: aSelector\x0a\x09self \x0a \x09invalidateParentSelector: aSelector;\x0a invalidateChildrenSelector: aSelector;\x0a removeSelector: aSelector",
  3942. messageSends: ["invalidateParentSelector:", "invalidateChildrenSelector:", "removeSelector:"],
  3943. referencedClasses: []
  3944. }),
  3945. smalltalk.HLClassCache);
  3946. smalltalk.addMethod(
  3947. smalltalk.method({
  3948. selector: "isOverridden:",
  3949. category: 'testing',
  3950. fn: function (aMethod){
  3951. var self=this;
  3952. return smalltalk.withContext(function($ctx1) {
  3953. var $1;
  3954. $1=_st(_st(self)._overriddenCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  3955. return smalltalk.withContext(function($ctx2) {
  3956. return _st(aMethod)._isOverridden();
  3957. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3958. return $1;
  3959. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod},smalltalk.HLClassCache)})},
  3960. args: ["aMethod"],
  3961. source: "isOverridden: aMethod\x0a\x09^ self overriddenCache \x0a \x09at: aMethod selector\x0a \x09ifAbsentPut: [ aMethod isOverridden ]",
  3962. messageSends: ["at:ifAbsentPut:", "selector", "isOverridden", "overriddenCache"],
  3963. referencedClasses: []
  3964. }),
  3965. smalltalk.HLClassCache);
  3966. smalltalk.addMethod(
  3967. smalltalk.method({
  3968. selector: "isOverride:",
  3969. category: 'testing',
  3970. fn: function (aMethod){
  3971. var self=this;
  3972. return smalltalk.withContext(function($ctx1) {
  3973. var $1;
  3974. $1=_st(_st(self)._overrideCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  3975. return smalltalk.withContext(function($ctx2) {
  3976. return _st(aMethod)._isOverride();
  3977. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3978. return $1;
  3979. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod},smalltalk.HLClassCache)})},
  3980. args: ["aMethod"],
  3981. source: "isOverride: aMethod\x0a\x09^ self overrideCache\x0a \x09at: aMethod selector\x0a \x09ifAbsentPut: [ aMethod isOverride ]",
  3982. messageSends: ["at:ifAbsentPut:", "selector", "isOverride", "overrideCache"],
  3983. referencedClasses: []
  3984. }),
  3985. smalltalk.HLClassCache);
  3986. smalltalk.addMethod(
  3987. smalltalk.method({
  3988. selector: "overriddenCache",
  3989. category: 'accessing',
  3990. fn: function (){
  3991. var self=this;
  3992. function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  3993. return smalltalk.withContext(function($ctx1) {
  3994. var $2,$1;
  3995. $2=self["@overriddenCache"];
  3996. if(($receiver = $2) == nil || $receiver == undefined){
  3997. self["@overriddenCache"]=_st($HashedCollection())._new();
  3998. $1=self["@overriddenCache"];
  3999. } else {
  4000. $1=$2;
  4001. };
  4002. return $1;
  4003. }, function($ctx1) {$ctx1.fill(self,"overriddenCache",{},smalltalk.HLClassCache)})},
  4004. args: [],
  4005. source: "overriddenCache\x0a\x09^ overriddenCache ifNil: [ overriddenCache := HashedCollection new ]",
  4006. messageSends: ["ifNil:", "new"],
  4007. referencedClasses: ["HashedCollection"]
  4008. }),
  4009. smalltalk.HLClassCache);
  4010. smalltalk.addMethod(
  4011. smalltalk.method({
  4012. selector: "overrideCache",
  4013. category: 'accessing',
  4014. fn: function (){
  4015. var self=this;
  4016. function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  4017. return smalltalk.withContext(function($ctx1) {
  4018. var $2,$1;
  4019. $2=self["@overrideCache"];
  4020. if(($receiver = $2) == nil || $receiver == undefined){
  4021. self["@overrideCache"]=_st($HashedCollection())._new();
  4022. $1=self["@overrideCache"];
  4023. } else {
  4024. $1=$2;
  4025. };
  4026. return $1;
  4027. }, function($ctx1) {$ctx1.fill(self,"overrideCache",{},smalltalk.HLClassCache)})},
  4028. args: [],
  4029. source: "overrideCache\x0a\x09^ overrideCache ifNil: [ overrideCache := HashedCollection new ]",
  4030. messageSends: ["ifNil:", "new"],
  4031. referencedClasses: ["HashedCollection"]
  4032. }),
  4033. smalltalk.HLClassCache);
  4034. smalltalk.addMethod(
  4035. smalltalk.method({
  4036. selector: "removeSelector:",
  4037. category: 'private',
  4038. fn: function (aSelector){
  4039. var self=this;
  4040. return smalltalk.withContext(function($ctx1) {
  4041. _st(_st(self)._overriddenCache())._removeKey_ifAbsent_(aSelector,(function(){
  4042. return smalltalk.withContext(function($ctx2) {
  4043. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  4044. _st(_st(self)._overrideCache())._removeKey_ifAbsent_(aSelector,(function(){
  4045. return smalltalk.withContext(function($ctx2) {
  4046. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  4047. return self}, function($ctx1) {$ctx1.fill(self,"removeSelector:",{aSelector:aSelector},smalltalk.HLClassCache)})},
  4048. args: ["aSelector"],
  4049. source: "removeSelector: aSelector\x0a\x09self overriddenCache \x0a \x09removeKey: aSelector\x0a ifAbsent: [ ].\x0a self overrideCache \x0a \x09removeKey: aSelector\x0a ifAbsent: [ ]",
  4050. messageSends: ["removeKey:ifAbsent:", "overriddenCache", "overrideCache"],
  4051. referencedClasses: []
  4052. }),
  4053. smalltalk.HLClassCache);
  4054. smalltalk.addMethod(
  4055. smalltalk.method({
  4056. selector: "selectorsCache",
  4057. category: 'accessing',
  4058. fn: function (){
  4059. var self=this;
  4060. return smalltalk.withContext(function($ctx1) {
  4061. var $1;
  4062. $1=self["@selectorsCache"];
  4063. return $1;
  4064. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{},smalltalk.HLClassCache)})},
  4065. args: [],
  4066. source: "selectorsCache\x0a\x09^ selectorsCache",
  4067. messageSends: [],
  4068. referencedClasses: []
  4069. }),
  4070. smalltalk.HLClassCache);
  4071. smalltalk.addMethod(
  4072. smalltalk.method({
  4073. selector: "selectorsCache:",
  4074. category: 'accessing',
  4075. fn: function (aCache){
  4076. var self=this;
  4077. return smalltalk.withContext(function($ctx1) {
  4078. self["@selectorsCache"]=aCache;
  4079. return self}, function($ctx1) {$ctx1.fill(self,"selectorsCache:",{aCache:aCache},smalltalk.HLClassCache)})},
  4080. args: ["aCache"],
  4081. source: "selectorsCache: aCache\x0a\x09selectorsCache := aCache",
  4082. messageSends: [],
  4083. referencedClasses: []
  4084. }),
  4085. smalltalk.HLClassCache);
  4086. smalltalk.addMethod(
  4087. smalltalk.method({
  4088. selector: "theClass",
  4089. category: 'accessing',
  4090. fn: function (){
  4091. var self=this;
  4092. return smalltalk.withContext(function($ctx1) {
  4093. var $1;
  4094. $1=self["@class"];
  4095. return $1;
  4096. }, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.HLClassCache)})},
  4097. args: [],
  4098. source: "theClass\x0a\x09^ class",
  4099. messageSends: [],
  4100. referencedClasses: []
  4101. }),
  4102. smalltalk.HLClassCache);
  4103. smalltalk.addMethod(
  4104. smalltalk.method({
  4105. selector: "theClass:",
  4106. category: 'accessing',
  4107. fn: function (aClass){
  4108. var self=this;
  4109. return smalltalk.withContext(function($ctx1) {
  4110. self["@class"]=aClass;
  4111. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.HLClassCache)})},
  4112. args: ["aClass"],
  4113. source: "theClass: aClass\x0a\x09class := aClass",
  4114. messageSends: [],
  4115. referencedClasses: []
  4116. }),
  4117. smalltalk.HLClassCache);
  4118. smalltalk.addMethod(
  4119. smalltalk.method({
  4120. selector: "on:selectorsCache:",
  4121. category: 'instance creation',
  4122. fn: function (aClass,aSelectorsCache){
  4123. var self=this;
  4124. return smalltalk.withContext(function($ctx1) {
  4125. var $2,$3,$1;
  4126. $2=_st(self)._new();
  4127. _st($2)._theClass_(aClass);
  4128. _st($2)._selectorsCache_(aSelectorsCache);
  4129. $3=_st($2)._yourself();
  4130. $1=$3;
  4131. return $1;
  4132. }, function($ctx1) {$ctx1.fill(self,"on:selectorsCache:",{aClass:aClass,aSelectorsCache:aSelectorsCache},smalltalk.HLClassCache.klass)})},
  4133. args: ["aClass", "aSelectorsCache"],
  4134. source: "on: aClass selectorsCache: aSelectorsCache\x0a\x09^ self new\x0a \x09theClass: aClass;\x0a selectorsCache: aSelectorsCache;\x0a yourself",
  4135. messageSends: ["theClass:", "new", "selectorsCache:", "yourself"],
  4136. referencedClasses: []
  4137. }),
  4138. smalltalk.HLClassCache.klass);
  4139. smalltalk.addClass('HLDocumentationWidget', smalltalk.HLFocusableWidget, ['model'], 'Helios-Browser');
  4140. smalltalk.addMethod(
  4141. smalltalk.method({
  4142. selector: "defaultDocumentation",
  4143. category: 'defaults',
  4144. fn: function (){
  4145. var self=this;
  4146. return smalltalk.withContext(function($ctx1) {
  4147. return "#No documentation available. \x0a##That's bad. Seriously.";
  4148. }, function($ctx1) {$ctx1.fill(self,"defaultDocumentation",{},smalltalk.HLDocumentationWidget)})},
  4149. args: [],
  4150. source: "defaultDocumentation\x0a\x09^ '#No documentation available. \x0a##That''s bad. Seriously.'",
  4151. messageSends: [],
  4152. referencedClasses: []
  4153. }),
  4154. smalltalk.HLDocumentationWidget);
  4155. smalltalk.addMethod(
  4156. smalltalk.method({
  4157. selector: "documentation",
  4158. category: 'accessing',
  4159. fn: function (){
  4160. var self=this;
  4161. return smalltalk.withContext(function($ctx1) {
  4162. var $2,$1;
  4163. $2=_st(_st(_st(_st(self)._model())._selectedClass())._theNonMetaClass())._comment();
  4164. if(($receiver = $2) == nil || $receiver == undefined){
  4165. $1=_st(self)._defaultDocumentation();
  4166. } else {
  4167. $1=$2;
  4168. };
  4169. return $1;
  4170. }, function($ctx1) {$ctx1.fill(self,"documentation",{},smalltalk.HLDocumentationWidget)})},
  4171. args: [],
  4172. source: "documentation\x0a\x09^ self model selectedClass theNonMetaClass comment ifNil: [ self defaultDocumentation ]",
  4173. messageSends: ["ifNil:", "defaultDocumentation", "comment", "theNonMetaClass", "selectedClass", "model"],
  4174. referencedClasses: []
  4175. }),
  4176. smalltalk.HLDocumentationWidget);
  4177. smalltalk.addMethod(
  4178. smalltalk.method({
  4179. selector: "model",
  4180. category: 'accessing',
  4181. fn: function (){
  4182. var self=this;
  4183. return smalltalk.withContext(function($ctx1) {
  4184. var $1;
  4185. $1=self["@model"];
  4186. return $1;
  4187. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLDocumentationWidget)})},
  4188. args: [],
  4189. source: "model\x0a\x09^ model",
  4190. messageSends: [],
  4191. referencedClasses: []
  4192. }),
  4193. smalltalk.HLDocumentationWidget);
  4194. smalltalk.addMethod(
  4195. smalltalk.method({
  4196. selector: "model:",
  4197. category: 'accessing',
  4198. fn: function (aModel){
  4199. var self=this;
  4200. return smalltalk.withContext(function($ctx1) {
  4201. self["@model"]=aModel;
  4202. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLDocumentationWidget)})},
  4203. args: ["aModel"],
  4204. source: "model: aModel\x0a\x09model := aModel",
  4205. messageSends: [],
  4206. referencedClasses: []
  4207. }),
  4208. smalltalk.HLDocumentationWidget);
  4209. smalltalk.addMethod(
  4210. smalltalk.method({
  4211. selector: "renderContentOn:",
  4212. category: 'rendering',
  4213. fn: function (html){
  4214. var self=this;
  4215. function $Showdown(){return smalltalk.Showdown||(typeof Showdown=="undefined"?nil:Showdown)}
  4216. return smalltalk.withContext(function($ctx1) {
  4217. var $1,$2;
  4218. $1=_st(html)._div();
  4219. _st($1)._class_("markdown");
  4220. $2=_st($1)._asJQuery();
  4221. _st($2)._html_(_st(_st(_st($Showdown())._at_("converter"))._new())._makeHtml_(_st(self)._documentation()));
  4222. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLDocumentationWidget)})},
  4223. args: ["html"],
  4224. source: "renderContentOn: html\x0a\x09(html div \x0a\x09\x09class: 'markdown';\x0a\x09\x09asJQuery) html: ((Showdown at: 'converter') new makeHtml: self documentation)",
  4225. messageSends: ["html:", "makeHtml:", "documentation", "new", "at:", "class:", "div", "asJQuery"],
  4226. referencedClasses: ["Showdown"]
  4227. }),
  4228. smalltalk.HLDocumentationWidget);
  4229. smalltalk.addClass('HLSelectorsCache', smalltalk.Object, ['classesCache'], 'Helios-Browser');
  4230. smalltalk.addMethod(
  4231. smalltalk.method({
  4232. selector: "cacheFor:",
  4233. category: 'accessing',
  4234. fn: function (aClass){
  4235. var self=this;
  4236. return smalltalk.withContext(function($ctx1) {
  4237. var $1,$2;
  4238. $1=aClass;
  4239. if(($receiver = $1) == nil || $receiver == undefined){
  4240. return nil;
  4241. } else {
  4242. $1;
  4243. };
  4244. $2=_st(_st(self)._classesCache())._at_ifAbsentPut_(_st(aClass)._name(),(function(){
  4245. return smalltalk.withContext(function($ctx2) {
  4246. return _st(self)._newCacheFor_(aClass);
  4247. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  4248. return $2;
  4249. }, function($ctx1) {$ctx1.fill(self,"cacheFor:",{aClass:aClass},smalltalk.HLSelectorsCache)})},
  4250. args: ["aClass"],
  4251. source: "cacheFor: aClass\x0a\x09aClass ifNil: [ ^ nil ].\x0a \x0a\x09^ self classesCache\x0a \x09at: aClass name\x0a ifAbsentPut: [ self newCacheFor: aClass ]",
  4252. messageSends: ["ifNil:", "at:ifAbsentPut:", "name", "newCacheFor:", "classesCache"],
  4253. referencedClasses: []
  4254. }),
  4255. smalltalk.HLSelectorsCache);
  4256. smalltalk.addMethod(
  4257. smalltalk.method({
  4258. selector: "classesCache",
  4259. category: 'accessing',
  4260. fn: function (){
  4261. var self=this;
  4262. function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  4263. return smalltalk.withContext(function($ctx1) {
  4264. var $2,$1;
  4265. $2=self["@classesCache"];
  4266. if(($receiver = $2) == nil || $receiver == undefined){
  4267. self["@classesCache"]=_st($HashedCollection())._new();
  4268. $1=self["@classesCache"];
  4269. } else {
  4270. $1=$2;
  4271. };
  4272. return $1;
  4273. }, function($ctx1) {$ctx1.fill(self,"classesCache",{},smalltalk.HLSelectorsCache)})},
  4274. args: [],
  4275. source: "classesCache\x0a\x09^ classesCache ifNil: [ classesCache := HashedCollection new ]",
  4276. messageSends: ["ifNil:", "new"],
  4277. referencedClasses: ["HashedCollection"]
  4278. }),
  4279. smalltalk.HLSelectorsCache);
  4280. smalltalk.addMethod(
  4281. smalltalk.method({
  4282. selector: "initialize",
  4283. category: 'initialization',
  4284. fn: function (){
  4285. var self=this;
  4286. return smalltalk.withContext(function($ctx1) {
  4287. smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  4288. _st(self)._observeSystem();
  4289. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLSelectorsCache)})},
  4290. args: [],
  4291. source: "initialize\x0a\x09super initialize.\x0a self observeSystem",
  4292. messageSends: ["initialize", "observeSystem"],
  4293. referencedClasses: []
  4294. }),
  4295. smalltalk.HLSelectorsCache);
  4296. smalltalk.addMethod(
  4297. smalltalk.method({
  4298. selector: "invalidateCacheFor:",
  4299. category: 'private',
  4300. fn: function (aMethod){
  4301. var self=this;
  4302. return smalltalk.withContext(function($ctx1) {
  4303. _st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._invalidateSelector_(_st(aMethod)._selector());
  4304. return self}, function($ctx1) {$ctx1.fill(self,"invalidateCacheFor:",{aMethod:aMethod},smalltalk.HLSelectorsCache)})},
  4305. args: ["aMethod"],
  4306. source: "invalidateCacheFor: aMethod\x0a\x09(self cacheFor: aMethod methodClass)\x0a \x09invalidateSelector: aMethod selector",
  4307. messageSends: ["invalidateSelector:", "selector", "cacheFor:", "methodClass"],
  4308. referencedClasses: []
  4309. }),
  4310. smalltalk.HLSelectorsCache);
  4311. smalltalk.addMethod(
  4312. smalltalk.method({
  4313. selector: "isOverridden:",
  4314. category: 'testing',
  4315. fn: function (aMethod){
  4316. var self=this;
  4317. return smalltalk.withContext(function($ctx1) {
  4318. var $1;
  4319. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverridden_(aMethod);
  4320. return $1;
  4321. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod},smalltalk.HLSelectorsCache)})},
  4322. args: ["aMethod"],
  4323. source: "isOverridden: aMethod\x0a\x09^ (self cacheFor: aMethod methodClass)\x0a \x09isOverridden: aMethod",
  4324. messageSends: ["isOverridden:", "cacheFor:", "methodClass"],
  4325. referencedClasses: []
  4326. }),
  4327. smalltalk.HLSelectorsCache);
  4328. smalltalk.addMethod(
  4329. smalltalk.method({
  4330. selector: "isOverride:",
  4331. category: 'testing',
  4332. fn: function (aMethod){
  4333. var self=this;
  4334. return smalltalk.withContext(function($ctx1) {
  4335. var $1;
  4336. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverride_(aMethod);
  4337. return $1;
  4338. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod},smalltalk.HLSelectorsCache)})},
  4339. args: ["aMethod"],
  4340. source: "isOverride: aMethod\x0a\x09^ (self cacheFor: aMethod methodClass)\x0a \x09isOverride: aMethod",
  4341. messageSends: ["isOverride:", "cacheFor:", "methodClass"],
  4342. referencedClasses: []
  4343. }),
  4344. smalltalk.HLSelectorsCache);
  4345. smalltalk.addMethod(
  4346. smalltalk.method({
  4347. selector: "newCacheFor:",
  4348. category: 'factory',
  4349. fn: function (aClass){
  4350. var self=this;
  4351. function $HLClassCache(){return smalltalk.HLClassCache||(typeof HLClassCache=="undefined"?nil:HLClassCache)}
  4352. return smalltalk.withContext(function($ctx1) {
  4353. var $1;
  4354. $1=_st($HLClassCache())._on_selectorsCache_(aClass,self);
  4355. return $1;
  4356. }, function($ctx1) {$ctx1.fill(self,"newCacheFor:",{aClass:aClass},smalltalk.HLSelectorsCache)})},
  4357. args: ["aClass"],
  4358. source: "newCacheFor: aClass\x0a\x09^ HLClassCache \x0a \x09on: aClass\x0a selectorsCache: self",
  4359. messageSends: ["on:selectorsCache:"],
  4360. referencedClasses: ["HLClassCache"]
  4361. }),
  4362. smalltalk.HLSelectorsCache);
  4363. smalltalk.addMethod(
  4364. smalltalk.method({
  4365. selector: "observeSystem",
  4366. category: 'actions',
  4367. fn: function (){
  4368. var self=this;
  4369. function $MethodAdded(){return smalltalk.MethodAdded||(typeof MethodAdded=="undefined"?nil:MethodAdded)}
  4370. function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
  4371. function $MethodRemoved(){return smalltalk.MethodRemoved||(typeof MethodRemoved=="undefined"?nil:MethodRemoved)}
  4372. return smalltalk.withContext(function($ctx1) {
  4373. var $1,$2;
  4374. $1=_st($SystemAnnouncer())._current();
  4375. _st($1)._on_do_($MethodAdded(),(function(ann){
  4376. return smalltalk.withContext(function($ctx2) {
  4377. return _st(self)._onMethodAdded_(_st(ann)._method());
  4378. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  4379. $2=_st($1)._on_do_($MethodRemoved(),(function(ann){
  4380. return smalltalk.withContext(function($ctx2) {
  4381. return _st(self)._onMethodRemoved_(_st(ann)._method());
  4382. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  4383. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLSelectorsCache)})},
  4384. args: [],
  4385. source: "observeSystem\x0a\x09SystemAnnouncer current\x0a\x09\x09on: MethodAdded\x0a do: [ :ann | self onMethodAdded: ann method ];\x0a on: MethodRemoved\x0a do: [ :ann | self onMethodRemoved: ann method ]",
  4386. messageSends: ["on:do:", "onMethodAdded:", "method", "current", "onMethodRemoved:"],
  4387. referencedClasses: ["MethodAdded", "SystemAnnouncer", "MethodRemoved"]
  4388. }),
  4389. smalltalk.HLSelectorsCache);
  4390. smalltalk.addMethod(
  4391. smalltalk.method({
  4392. selector: "onMethodAdded:",
  4393. category: 'reactions',
  4394. fn: function (aMethod){
  4395. var self=this;
  4396. return smalltalk.withContext(function($ctx1) {
  4397. _st(self)._invalidateCacheFor_(aMethod);
  4398. return self}, function($ctx1) {$ctx1.fill(self,"onMethodAdded:",{aMethod:aMethod},smalltalk.HLSelectorsCache)})},
  4399. args: ["aMethod"],
  4400. source: "onMethodAdded: aMethod\x0a\x09self invalidateCacheFor: aMethod",
  4401. messageSends: ["invalidateCacheFor:"],
  4402. referencedClasses: []
  4403. }),
  4404. smalltalk.HLSelectorsCache);
  4405. smalltalk.addMethod(
  4406. smalltalk.method({
  4407. selector: "onMethodRemoved:",
  4408. category: 'reactions',
  4409. fn: function (aMethod){
  4410. var self=this;
  4411. return smalltalk.withContext(function($ctx1) {
  4412. _st(self)._invalidateCacheFor_(aMethod);
  4413. return self}, function($ctx1) {$ctx1.fill(self,"onMethodRemoved:",{aMethod:aMethod},smalltalk.HLSelectorsCache)})},
  4414. args: ["aMethod"],
  4415. source: "onMethodRemoved: aMethod\x0a\x09self invalidateCacheFor: aMethod",
  4416. messageSends: ["invalidateCacheFor:"],
  4417. referencedClasses: []
  4418. }),
  4419. smalltalk.HLSelectorsCache);
  4420. smalltalk.HLSelectorsCache.klass.iVarNames = ['current'];
  4421. smalltalk.addMethod(
  4422. smalltalk.method({
  4423. selector: "current",
  4424. category: 'accessing',
  4425. fn: function (){
  4426. var self=this;
  4427. return smalltalk.withContext(function($ctx1) {
  4428. var $2,$1;
  4429. $2=self["@current"];
  4430. if(($receiver = $2) == nil || $receiver == undefined){
  4431. self["@current"]=smalltalk.Object.klass.fn.prototype._new.apply(_st(self), []);
  4432. $1=self["@current"];
  4433. } else {
  4434. $1=$2;
  4435. };
  4436. return $1;
  4437. }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.HLSelectorsCache.klass)})},
  4438. args: [],
  4439. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  4440. messageSends: ["ifNil:", "new"],
  4441. referencedClasses: []
  4442. }),
  4443. smalltalk.HLSelectorsCache.klass);
  4444. smalltalk.addMethod(
  4445. smalltalk.method({
  4446. selector: "flush",
  4447. category: 'accessing',
  4448. fn: function (){
  4449. var self=this;
  4450. return smalltalk.withContext(function($ctx1) {
  4451. self["@current"]=nil;
  4452. return self}, function($ctx1) {$ctx1.fill(self,"flush",{},smalltalk.HLSelectorsCache.klass)})},
  4453. args: [],
  4454. source: "flush\x0a\x09current := nil",
  4455. messageSends: [],
  4456. referencedClasses: []
  4457. }),
  4458. smalltalk.HLSelectorsCache.klass);
  4459. smalltalk.addMethod(
  4460. smalltalk.method({
  4461. selector: "new",
  4462. category: 'instance creation',
  4463. fn: function (){
  4464. var self=this;
  4465. return smalltalk.withContext(function($ctx1) {
  4466. _st(self)._shouldNotImplement();
  4467. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.HLSelectorsCache.klass)})},
  4468. args: [],
  4469. source: "new\x0a\x09self shouldNotImplement",
  4470. messageSends: ["shouldNotImplement"],
  4471. referencedClasses: []
  4472. }),
  4473. smalltalk.HLSelectorsCache.klass);