Helios-Browser.js 154 KB

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