Helios-Browser.js 154 KB

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