Helios-Browser.js 156 KB

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