Helios-Browser.js 165 KB

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