Helios-Browser.js 154 KB

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