1
0

Helios-Browser.js 153 KB

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