Helios-Browser.js 154 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086
  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,$2,$4,$6,$5,$3;
  1673. li=_st(html)._li();
  1674. $1=_st(li)._asJQuery();
  1675. $ctx1.sendIdx["asJQuery"]=1;
  1676. _st($1)._data_put_("item",aClass);
  1677. $2=li;
  1678. _st($2)._class_(self._listCssClassForItem_(aClass));
  1679. $ctx1.sendIdx["class:"]=1;
  1680. $3=_st($2)._with_((function(){
  1681. return smalltalk.withContext(function($ctx2) {
  1682. $4=_st(html)._a();
  1683. _st($4)._with_((function(){
  1684. return smalltalk.withContext(function($ctx3) {
  1685. _st(_st(html)._tag_("i"))._class_(self._cssClassForItem_(aClass));
  1686. return self._renderItemLabel_level_on_(aClass,anInteger,html);
  1687. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  1688. $5=_st($4)._onClick_((function(){
  1689. return smalltalk.withContext(function($ctx3) {
  1690. $6=_st(li)._asJQuery();
  1691. return self._activateListItem_($6);
  1692. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1693. return $5;
  1694. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1695. $ctx1.sendIdx["with:"]=1;
  1696. _st(self._getChildrenOf_(aClass))._do_((function(each){
  1697. return smalltalk.withContext(function($ctx2) {
  1698. return self._renderItem_level_on_(each,_st(anInteger).__plus((1)),html);
  1699. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
  1700. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:level:on:",{aClass:aClass,anInteger:anInteger,html:html,li:li},smalltalk.HLClassesListWidget)})},
  1701. args: ["aClass", "anInteger", "html"],
  1702. source: "renderItem: aClass level: anInteger on: html\x0a\x09| li |\x0a \x0a\x09li := html li.\x0a\x09li asJQuery data: 'item' put: aClass.\x0a li\x0a\x09\x09class: (self listCssClassForItem: aClass);\x0a\x09\x09with: [ \x0a \x09html a\x0a \x09with: [ \x0a \x09\x09(html tag: 'i') class: (self cssClassForItem: aClass).\x0a \x09\x09\x09\x09\x09self renderItemLabel: aClass level: anInteger on: html ];\x0a\x09\x09\x09\x09onClick: [\x0a \x09self activateListItem: li asJQuery ] ].\x0a \x0a (self getChildrenOf: aClass) do: [ :each |\x0a \x09self renderItem: each level: anInteger + 1 on: html ]",
  1703. messageSends: ["li", "data:put:", "asJQuery", "class:", "listCssClassForItem:", "with:", "a", "tag:", "cssClassForItem:", "renderItemLabel:level:on:", "onClick:", "activateListItem:", "do:", "getChildrenOf:", "renderItem:level:on:", "+"],
  1704. referencedClasses: []
  1705. }),
  1706. smalltalk.HLClassesListWidget);
  1707. smalltalk.addMethod(
  1708. smalltalk.method({
  1709. selector: "renderItem:on:",
  1710. category: 'rendering',
  1711. fn: function (aClass,html){
  1712. var self=this;
  1713. return smalltalk.withContext(function($ctx1) {
  1714. smalltalk.HLClassesListWidget.superclass.fn.prototype._renderItem_on_.apply(_st(self), [aClass,html]);
  1715. _st(self._getChildrenOf_(aClass))._do_((function(each){
  1716. return smalltalk.withContext(function($ctx2) {
  1717. return self._renderItem_level_on_(each,(1),html);
  1718. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  1719. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:on:",{aClass:aClass,html:html},smalltalk.HLClassesListWidget)})},
  1720. args: ["aClass", "html"],
  1721. 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 ]",
  1722. messageSends: ["renderItem:on:", "do:", "getChildrenOf:", "renderItem:level:on:"],
  1723. referencedClasses: []
  1724. }),
  1725. smalltalk.HLClassesListWidget);
  1726. smalltalk.addMethod(
  1727. smalltalk.method({
  1728. selector: "renderItemLabel:level:on:",
  1729. category: 'rendering',
  1730. fn: function (aClass,anInteger,html){
  1731. var self=this;
  1732. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  1733. return smalltalk.withContext(function($ctx1) {
  1734. _st(_st(_st(html)._span())._asJQuery())._html_(_st($String())._streamContents_((function(str){
  1735. return smalltalk.withContext(function($ctx2) {
  1736. _st(anInteger)._timesRepeat_((function(){
  1737. return smalltalk.withContext(function($ctx3) {
  1738. return _st(str)._nextPutAll_("    ");
  1739. $ctx3.sendIdx["nextPutAll:"]=1;
  1740. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  1741. return _st(str)._nextPutAll_(_st(aClass)._name());
  1742. }, function($ctx2) {$ctx2.fillBlock({str:str},$ctx1,1)})})));
  1743. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:level:on:",{aClass:aClass,anInteger:anInteger,html:html},smalltalk.HLClassesListWidget)})},
  1744. args: ["aClass", "anInteger", "html"],
  1745. 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 ])",
  1746. messageSends: ["html:", "asJQuery", "span", "streamContents:", "timesRepeat:", "nextPutAll:", "name"],
  1747. referencedClasses: ["String"]
  1748. }),
  1749. smalltalk.HLClassesListWidget);
  1750. smalltalk.addMethod(
  1751. smalltalk.method({
  1752. selector: "renderItemLabel:on:",
  1753. category: 'rendering',
  1754. fn: function (aClass,html){
  1755. var self=this;
  1756. return smalltalk.withContext(function($ctx1) {
  1757. self._renderItemLabel_level_on_(aClass,(0),html);
  1758. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aClass:aClass,html:html},smalltalk.HLClassesListWidget)})},
  1759. args: ["aClass", "html"],
  1760. source: "renderItemLabel: aClass on: html\x0a\x09self renderItemLabel: aClass level: 0 on: html",
  1761. messageSends: ["renderItemLabel:level:on:"],
  1762. referencedClasses: []
  1763. }),
  1764. smalltalk.HLClassesListWidget);
  1765. smalltalk.addMethod(
  1766. smalltalk.method({
  1767. selector: "renderListOn:",
  1768. category: 'rendering',
  1769. fn: function (html){
  1770. var self=this;
  1771. return smalltalk.withContext(function($ctx1) {
  1772. _st(self._getRootClassesOf_(self._items()))._do_((function(each){
  1773. return smalltalk.withContext(function($ctx2) {
  1774. return self._renderItem_on_(each,html);
  1775. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  1776. return self}, function($ctx1) {$ctx1.fill(self,"renderListOn:",{html:html},smalltalk.HLClassesListWidget)})},
  1777. args: ["html"],
  1778. source: "renderListOn: html\x0a\x09(self getRootClassesOf: self items)\x0a \x09do: [ :each | self renderItem: each on: html ]",
  1779. messageSends: ["do:", "getRootClassesOf:", "items", "renderItem:on:"],
  1780. referencedClasses: []
  1781. }),
  1782. smalltalk.HLClassesListWidget);
  1783. smalltalk.addMethod(
  1784. smalltalk.method({
  1785. selector: "selectItem:",
  1786. category: 'actions',
  1787. fn: function (aClass){
  1788. var self=this;
  1789. return smalltalk.withContext(function($ctx1) {
  1790. _st(self._model())._selectedClass_(aClass);
  1791. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aClass:aClass},smalltalk.HLClassesListWidget)})},
  1792. args: ["aClass"],
  1793. source: "selectItem: aClass\x0a self model selectedClass: aClass",
  1794. messageSends: ["selectedClass:", "model"],
  1795. referencedClasses: []
  1796. }),
  1797. smalltalk.HLClassesListWidget);
  1798. smalltalk.addMethod(
  1799. smalltalk.method({
  1800. selector: "setItemsForPackage:",
  1801. category: 'private',
  1802. fn: function (aPackage){
  1803. var self=this;
  1804. return smalltalk.withContext(function($ctx1) {
  1805. var $2,$3,$4,$1;
  1806. $2=aPackage;
  1807. if(($receiver = $2) == nil || $receiver == null){
  1808. $1=[];
  1809. } else {
  1810. $1=_st(_st(_st(_st(_st(aPackage)._classes())._collect_((function(each){
  1811. return smalltalk.withContext(function($ctx2) {
  1812. return _st(each)._theNonMetaClass();
  1813. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})})))._asSet())._asArray())._sort_((function(a,b){
  1814. return smalltalk.withContext(function($ctx2) {
  1815. $3=_st(a)._name();
  1816. $ctx2.sendIdx["name"]=1;
  1817. $4=_st(b)._name();
  1818. return _st($3).__lt($4);
  1819. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,4)})}));
  1820. };
  1821. self._items_($1);
  1822. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForPackage:",{aPackage:aPackage},smalltalk.HLClassesListWidget)})},
  1823. args: ["aPackage"],
  1824. 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 ] ]).",
  1825. messageSends: ["items:", "ifNil:ifNotNil:", "sort:", "asArray", "asSet", "collect:", "classes", "theNonMetaClass", "<", "name"],
  1826. referencedClasses: []
  1827. }),
  1828. smalltalk.HLClassesListWidget);
  1829. smalltalk.addMethod(
  1830. smalltalk.method({
  1831. selector: "setItemsForSelectedPackage",
  1832. category: 'private',
  1833. fn: function (){
  1834. var self=this;
  1835. return smalltalk.withContext(function($ctx1) {
  1836. self._setItemsForPackage_(_st(self._model())._selectedPackage());
  1837. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedPackage",{},smalltalk.HLClassesListWidget)})},
  1838. args: [],
  1839. source: "setItemsForSelectedPackage\x0a\x09self setItemsForPackage: self model selectedPackage",
  1840. messageSends: ["setItemsForPackage:", "selectedPackage", "model"],
  1841. referencedClasses: []
  1842. }),
  1843. smalltalk.HLClassesListWidget);
  1844. smalltalk.addMethod(
  1845. smalltalk.method({
  1846. selector: "showClass",
  1847. category: 'testing',
  1848. fn: function (){
  1849. var self=this;
  1850. return smalltalk.withContext(function($ctx1) {
  1851. var $1;
  1852. $1=_st(_st(self._model())._showInstance())._not();
  1853. return $1;
  1854. }, function($ctx1) {$ctx1.fill(self,"showClass",{},smalltalk.HLClassesListWidget)})},
  1855. args: [],
  1856. source: "showClass\x0a\x09^ self model showInstance not",
  1857. messageSends: ["not", "showInstance", "model"],
  1858. referencedClasses: []
  1859. }),
  1860. smalltalk.HLClassesListWidget);
  1861. smalltalk.addMethod(
  1862. smalltalk.method({
  1863. selector: "showComment",
  1864. category: 'testing',
  1865. fn: function (){
  1866. var self=this;
  1867. return smalltalk.withContext(function($ctx1) {
  1868. var $1;
  1869. $1=_st(self._model())._showComment();
  1870. return $1;
  1871. }, function($ctx1) {$ctx1.fill(self,"showComment",{},smalltalk.HLClassesListWidget)})},
  1872. args: [],
  1873. source: "showComment\x0a\x09^ self model showComment",
  1874. messageSends: ["showComment", "model"],
  1875. referencedClasses: []
  1876. }),
  1877. smalltalk.HLClassesListWidget);
  1878. smalltalk.addMethod(
  1879. smalltalk.method({
  1880. selector: "showComment:",
  1881. category: 'actions',
  1882. fn: function (aBoolean){
  1883. var self=this;
  1884. return smalltalk.withContext(function($ctx1) {
  1885. _st(self._model())._showComment_(aBoolean);
  1886. return self}, function($ctx1) {$ctx1.fill(self,"showComment:",{aBoolean:aBoolean},smalltalk.HLClassesListWidget)})},
  1887. args: ["aBoolean"],
  1888. source: "showComment: aBoolean\x0a\x09self model showComment: aBoolean",
  1889. messageSends: ["showComment:", "model"],
  1890. referencedClasses: []
  1891. }),
  1892. smalltalk.HLClassesListWidget);
  1893. smalltalk.addMethod(
  1894. smalltalk.method({
  1895. selector: "showInstance",
  1896. category: 'testing',
  1897. fn: function (){
  1898. var self=this;
  1899. return smalltalk.withContext(function($ctx1) {
  1900. var $1;
  1901. $1=_st(self._model())._showInstance();
  1902. return $1;
  1903. }, function($ctx1) {$ctx1.fill(self,"showInstance",{},smalltalk.HLClassesListWidget)})},
  1904. args: [],
  1905. source: "showInstance\x0a\x09^ self model showInstance",
  1906. messageSends: ["showInstance", "model"],
  1907. referencedClasses: []
  1908. }),
  1909. smalltalk.HLClassesListWidget);
  1910. smalltalk.addMethod(
  1911. smalltalk.method({
  1912. selector: "showInstance:",
  1913. category: 'actions',
  1914. fn: function (aBoolean){
  1915. var self=this;
  1916. return smalltalk.withContext(function($ctx1) {
  1917. _st(self._model())._showInstance_(aBoolean);
  1918. return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean},smalltalk.HLClassesListWidget)})},
  1919. args: ["aBoolean"],
  1920. source: "showInstance: aBoolean\x0a\x09self model showInstance: aBoolean",
  1921. messageSends: ["showInstance:", "model"],
  1922. referencedClasses: []
  1923. }),
  1924. smalltalk.HLClassesListWidget);
  1925. smalltalk.addMethod(
  1926. smalltalk.method({
  1927. selector: "toggleShowComment",
  1928. category: 'actions',
  1929. fn: function (){
  1930. var self=this;
  1931. return smalltalk.withContext(function($ctx1) {
  1932. _st(self._model())._showComment_(_st(self._showComment())._not());
  1933. return self}, function($ctx1) {$ctx1.fill(self,"toggleShowComment",{},smalltalk.HLClassesListWidget)})},
  1934. args: [],
  1935. source: "toggleShowComment\x0a\x09self model showComment: self showComment not",
  1936. messageSends: ["showComment:", "model", "not", "showComment"],
  1937. referencedClasses: []
  1938. }),
  1939. smalltalk.HLClassesListWidget);
  1940. smalltalk.addClass('HLDocumentationWidget', smalltalk.HLFocusableWidget, ['model'], 'Helios-Browser');
  1941. smalltalk.HLDocumentationWidget.comment="I render the documentation for the selected class";
  1942. smalltalk.addMethod(
  1943. smalltalk.method({
  1944. selector: "defaultDocumentation",
  1945. category: 'defaults',
  1946. fn: function (){
  1947. var self=this;
  1948. return smalltalk.withContext(function($ctx1) {
  1949. return "No documentation available. \x0a**That's bad. Seriously.**";
  1950. }, function($ctx1) {$ctx1.fill(self,"defaultDocumentation",{},smalltalk.HLDocumentationWidget)})},
  1951. args: [],
  1952. source: "defaultDocumentation\x0a\x09^ 'No documentation available. \x0a**That''s bad. Seriously.**'",
  1953. messageSends: [],
  1954. referencedClasses: []
  1955. }),
  1956. smalltalk.HLDocumentationWidget);
  1957. smalltalk.addMethod(
  1958. smalltalk.method({
  1959. selector: "defaultHead",
  1960. category: 'defaults',
  1961. fn: function (){
  1962. var self=this;
  1963. return smalltalk.withContext(function($ctx1) {
  1964. return "No class selected";
  1965. }, function($ctx1) {$ctx1.fill(self,"defaultHead",{},smalltalk.HLDocumentationWidget)})},
  1966. args: [],
  1967. source: "defaultHead\x0a\x09^ 'No class selected'",
  1968. messageSends: [],
  1969. referencedClasses: []
  1970. }),
  1971. smalltalk.HLDocumentationWidget);
  1972. smalltalk.addMethod(
  1973. smalltalk.method({
  1974. selector: "documentation",
  1975. category: 'accessing',
  1976. fn: function (){
  1977. var self=this;
  1978. return smalltalk.withContext(function($ctx1) {
  1979. var $2,$1;
  1980. $2=self._selectedItem();
  1981. if(($receiver = $2) == nil || $receiver == null){
  1982. $1="";
  1983. } else {
  1984. var item;
  1985. item=$receiver;
  1986. $1=_st(_st(item)._comment())._ifEmpty_((function(){
  1987. return smalltalk.withContext(function($ctx2) {
  1988. return self._defaultDocumentation();
  1989. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  1990. };
  1991. return $1;
  1992. }, function($ctx1) {$ctx1.fill(self,"documentation",{},smalltalk.HLDocumentationWidget)})},
  1993. args: [],
  1994. source: "documentation\x0a\x09^ self selectedItem \x0a\x09\x09ifNil: [ '' ]\x0a\x09\x09ifNotNil: [ :item | item comment ifEmpty: [ self defaultDocumentation ] ]",
  1995. messageSends: ["ifNil:ifNotNil:", "selectedItem", "ifEmpty:", "comment", "defaultDocumentation"],
  1996. referencedClasses: []
  1997. }),
  1998. smalltalk.HLDocumentationWidget);
  1999. smalltalk.addMethod(
  2000. smalltalk.method({
  2001. selector: "editDocumentation",
  2002. category: 'actions',
  2003. fn: function (){
  2004. var self=this;
  2005. return smalltalk.withContext(function($ctx1) {
  2006. _st(self._model())._editComment();
  2007. return self}, function($ctx1) {$ctx1.fill(self,"editDocumentation",{},smalltalk.HLDocumentationWidget)})},
  2008. args: [],
  2009. source: "editDocumentation\x0a\x09self model editComment",
  2010. messageSends: ["editComment", "model"],
  2011. referencedClasses: []
  2012. }),
  2013. smalltalk.HLDocumentationWidget);
  2014. smalltalk.addMethod(
  2015. smalltalk.method({
  2016. selector: "head",
  2017. category: 'accessing',
  2018. fn: function (){
  2019. var self=this;
  2020. return smalltalk.withContext(function($ctx1) {
  2021. var $2,$1;
  2022. $2=self._selectedItem();
  2023. if(($receiver = $2) == nil || $receiver == null){
  2024. $1=self._defaultHead();
  2025. } else {
  2026. var item;
  2027. item=$receiver;
  2028. $1=_st(item)._name();
  2029. };
  2030. return $1;
  2031. }, function($ctx1) {$ctx1.fill(self,"head",{},smalltalk.HLDocumentationWidget)})},
  2032. args: [],
  2033. source: "head\x0a\x09^ self selectedItem \x0a\x09\x09ifNil: [ self defaultHead ]\x0a\x09\x09ifNotNil: [ :item | item name ]",
  2034. messageSends: ["ifNil:ifNotNil:", "selectedItem", "defaultHead", "name"],
  2035. referencedClasses: []
  2036. }),
  2037. smalltalk.HLDocumentationWidget);
  2038. smalltalk.addMethod(
  2039. smalltalk.method({
  2040. selector: "model",
  2041. category: 'accessing',
  2042. fn: function (){
  2043. var self=this;
  2044. return smalltalk.withContext(function($ctx1) {
  2045. var $1;
  2046. $1=self["@model"];
  2047. return $1;
  2048. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLDocumentationWidget)})},
  2049. args: [],
  2050. source: "model\x0a\x09^ model",
  2051. messageSends: [],
  2052. referencedClasses: []
  2053. }),
  2054. smalltalk.HLDocumentationWidget);
  2055. smalltalk.addMethod(
  2056. smalltalk.method({
  2057. selector: "model:",
  2058. category: 'accessing',
  2059. fn: function (aModel){
  2060. var self=this;
  2061. return smalltalk.withContext(function($ctx1) {
  2062. var $1;
  2063. self["@model"]=aModel;
  2064. self._observeSystem();
  2065. $1=self._observeModel();
  2066. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLDocumentationWidget)})},
  2067. args: ["aModel"],
  2068. source: "model: aModel\x0a\x09model := aModel.\x0a\x09self \x0a\x09\x09observeSystem;\x0a\x09\x09observeModel",
  2069. messageSends: ["observeSystem", "observeModel"],
  2070. referencedClasses: []
  2071. }),
  2072. smalltalk.HLDocumentationWidget);
  2073. smalltalk.addMethod(
  2074. smalltalk.method({
  2075. selector: "observeModel",
  2076. category: 'actions',
  2077. fn: function (){
  2078. var self=this;
  2079. function $HLClassSelected(){return smalltalk.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
  2080. function $HLEditComment(){return smalltalk.HLEditComment||(typeof HLEditComment=="undefined"?nil:HLEditComment)}
  2081. return smalltalk.withContext(function($ctx1) {
  2082. var $1,$2;
  2083. $1=_st(self._model())._announcer();
  2084. _st($1)._on_send_to_($HLClassSelected(),"onClassSelected:",self);
  2085. $ctx1.sendIdx["on:send:to:"]=1;
  2086. $2=_st($1)._on_send_to_($HLEditComment(),"onEditDocumentation",self);
  2087. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLDocumentationWidget)})},
  2088. args: [],
  2089. 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",
  2090. messageSends: ["on:send:to:", "announcer", "model"],
  2091. referencedClasses: ["HLClassSelected", "HLEditComment"]
  2092. }),
  2093. smalltalk.HLDocumentationWidget);
  2094. smalltalk.addMethod(
  2095. smalltalk.method({
  2096. selector: "observeSystem",
  2097. category: 'actions',
  2098. fn: function (){
  2099. var self=this;
  2100. function $ClassCommentChanged(){return smalltalk.ClassCommentChanged||(typeof ClassCommentChanged=="undefined"?nil:ClassCommentChanged)}
  2101. return smalltalk.withContext(function($ctx1) {
  2102. _st(_st(self._model())._systemAnnouncer())._on_send_to_($ClassCommentChanged(),"onClassCommentChanged:",self);
  2103. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLDocumentationWidget)})},
  2104. args: [],
  2105. source: "observeSystem\x0a\x09self model systemAnnouncer \x0a\x09\x09on: ClassCommentChanged\x0a\x09\x09send: #onClassCommentChanged:\x0a\x09\x09to: self",
  2106. messageSends: ["on:send:to:", "systemAnnouncer", "model"],
  2107. referencedClasses: ["ClassCommentChanged"]
  2108. }),
  2109. smalltalk.HLDocumentationWidget);
  2110. smalltalk.addMethod(
  2111. smalltalk.method({
  2112. selector: "onClassCommentChanged:",
  2113. category: 'reactions',
  2114. fn: function (anAnnouncement){
  2115. var self=this;
  2116. return smalltalk.withContext(function($ctx1) {
  2117. var $1;
  2118. $1=_st(_st(anAnnouncement)._theClass()).__eq(_st(_st(self._model())._selectedClass())._theNonMetaClass());
  2119. if(smalltalk.assert($1)){
  2120. self._refresh();
  2121. };
  2122. return self}, function($ctx1) {$ctx1.fill(self,"onClassCommentChanged:",{anAnnouncement:anAnnouncement},smalltalk.HLDocumentationWidget)})},
  2123. args: ["anAnnouncement"],
  2124. source: "onClassCommentChanged: anAnnouncement\x0a\x09anAnnouncement theClass = self model selectedClass theNonMetaClass\x0a\x09\x09ifTrue: [ self refresh ]",
  2125. messageSends: ["ifTrue:", "=", "theClass", "theNonMetaClass", "selectedClass", "model", "refresh"],
  2126. referencedClasses: []
  2127. }),
  2128. smalltalk.HLDocumentationWidget);
  2129. smalltalk.addMethod(
  2130. smalltalk.method({
  2131. selector: "onClassSelected:",
  2132. category: 'reactions',
  2133. fn: function (anAnnouncement){
  2134. var self=this;
  2135. return smalltalk.withContext(function($ctx1) {
  2136. self._refresh();
  2137. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{anAnnouncement:anAnnouncement},smalltalk.HLDocumentationWidget)})},
  2138. args: ["anAnnouncement"],
  2139. source: "onClassSelected: anAnnouncement\x0a\x09self refresh",
  2140. messageSends: ["refresh"],
  2141. referencedClasses: []
  2142. }),
  2143. smalltalk.HLDocumentationWidget);
  2144. smalltalk.addMethod(
  2145. smalltalk.method({
  2146. selector: "onEditDocumentation",
  2147. category: 'reactions',
  2148. fn: function (){
  2149. var self=this;
  2150. return smalltalk.withContext(function($ctx1) {
  2151. var $5,$4,$3,$2,$1,$9,$8,$7,$6;
  2152. $5=self._model();
  2153. $ctx1.sendIdx["model"]=1;
  2154. $4=_st($5)._selectedClass();
  2155. $ctx1.sendIdx["selectedClass"]=1;
  2156. $3=_st($4)._theNonMetaClass();
  2157. $ctx1.sendIdx["theNonMetaClass"]=1;
  2158. $2=_st($3)._name();
  2159. $1=_st($2).__comma(" comment");
  2160. $9=self._model();
  2161. $8=_st($9)._selectedClass();
  2162. $7=_st($8)._theNonMetaClass();
  2163. $6=_st($7)._comment();
  2164. self._request_value_do_($1,$6,(function(comment){
  2165. return smalltalk.withContext(function($ctx2) {
  2166. return self._setClassComment_(comment);
  2167. }, function($ctx2) {$ctx2.fillBlock({comment:comment},$ctx1,1)})}));
  2168. return self}, function($ctx1) {$ctx1.fill(self,"onEditDocumentation",{},smalltalk.HLDocumentationWidget)})},
  2169. args: [],
  2170. 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 ]",
  2171. messageSends: ["request:value:do:", ",", "name", "theNonMetaClass", "selectedClass", "model", "comment", "setClassComment:"],
  2172. referencedClasses: []
  2173. }),
  2174. smalltalk.HLDocumentationWidget);
  2175. smalltalk.addMethod(
  2176. smalltalk.method({
  2177. selector: "renderContentOn:",
  2178. category: 'rendering',
  2179. fn: function (html){
  2180. var self=this;
  2181. return smalltalk.withContext(function($ctx1) {
  2182. var $1,$3,$2;
  2183. $1=_st(html)._div();
  2184. _st($1)._class_("doc");
  2185. $2=_st($1)._with_((function(){
  2186. return smalltalk.withContext(function($ctx2) {
  2187. self._renderHeadOn_(html);
  2188. $3=self._renderDocOn_(html);
  2189. return $3;
  2190. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2191. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLDocumentationWidget)})},
  2192. args: ["html"],
  2193. 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 ]",
  2194. messageSends: ["class:", "div", "with:", "renderHeadOn:", "renderDocOn:"],
  2195. referencedClasses: []
  2196. }),
  2197. smalltalk.HLDocumentationWidget);
  2198. smalltalk.addMethod(
  2199. smalltalk.method({
  2200. selector: "renderDocOn:",
  2201. category: 'rendering',
  2202. fn: function (html){
  2203. var self=this;
  2204. function $Showdown(){return smalltalk.Showdown||(typeof Showdown=="undefined"?nil:Showdown)}
  2205. return smalltalk.withContext(function($ctx1) {
  2206. var $1,$2,$4,$5,$3,$7,$8,$6;
  2207. $1=self._selectedItem();
  2208. if(($receiver = $1) == nil || $receiver == null){
  2209. $1;
  2210. } else {
  2211. self._renderInheritanceOn_(html);
  2212. $2=_st(html)._h1();
  2213. _st($2)._with_("Overview");
  2214. $ctx1.sendIdx["with:"]=1;
  2215. $3=_st($2)._with_((function(){
  2216. return smalltalk.withContext(function($ctx2) {
  2217. $4=_st(html)._button();
  2218. _st($4)._class_("button default");
  2219. $ctx2.sendIdx["class:"]=1;
  2220. _st($4)._with_("Edit");
  2221. $5=_st($4)._onClick_((function(){
  2222. return smalltalk.withContext(function($ctx3) {
  2223. return self._editDocumentation();
  2224. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  2225. return $5;
  2226. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  2227. $ctx1.sendIdx["with:"]=2;
  2228. $3;
  2229. $7=_st(html)._div();
  2230. _st($7)._class_("markdown");
  2231. $8=_st($7)._asJQuery();
  2232. $6=$8;
  2233. _st($6)._html_(_st(_st(_st($Showdown())._at_("converter"))._new())._makeHtml_(self._documentation()));
  2234. };
  2235. return self}, function($ctx1) {$ctx1.fill(self,"renderDocOn:",{html:html},smalltalk.HLDocumentationWidget)})},
  2236. args: ["html"],
  2237. 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) ]",
  2238. messageSends: ["ifNotNil:", "selectedItem", "renderInheritanceOn:", "with:", "h1", "class:", "button", "onClick:", "editDocumentation", "html:", "div", "asJQuery", "makeHtml:", "new", "at:", "documentation"],
  2239. referencedClasses: ["Showdown"]
  2240. }),
  2241. smalltalk.HLDocumentationWidget);
  2242. smalltalk.addMethod(
  2243. smalltalk.method({
  2244. selector: "renderHeadOn:",
  2245. category: 'rendering',
  2246. fn: function (html){
  2247. var self=this;
  2248. return smalltalk.withContext(function($ctx1) {
  2249. var $1,$2;
  2250. $1=_st(html)._div();
  2251. _st($1)._class_("head");
  2252. $2=_st($1)._with_(self._head());
  2253. return self}, function($ctx1) {$ctx1.fill(self,"renderHeadOn:",{html:html},smalltalk.HLDocumentationWidget)})},
  2254. args: ["html"],
  2255. source: "renderHeadOn: html\x0a\x09html div \x0a\x09\x09class: 'head';\x0a\x09\x09with: self head",
  2256. messageSends: ["class:", "div", "with:", "head"],
  2257. referencedClasses: []
  2258. }),
  2259. smalltalk.HLDocumentationWidget);
  2260. smalltalk.addMethod(
  2261. smalltalk.method({
  2262. selector: "renderInheritanceOn:",
  2263. category: 'rendering',
  2264. fn: function (html){
  2265. var self=this;
  2266. return smalltalk.withContext(function($ctx1) {
  2267. var $1,$4,$3,$5,$6,$9,$8,$7,$12,$11,$10,$2;
  2268. $1=_st(html)._div();
  2269. _st($1)._class_("inheritance");
  2270. $2=_st($1)._with_((function(){
  2271. return smalltalk.withContext(function($ctx2) {
  2272. _st(html)._with_("Subclass of ");
  2273. $ctx2.sendIdx["with:"]=2;
  2274. $4=self._selectedItem();
  2275. $ctx2.sendIdx["selectedItem"]=1;
  2276. $3=_st($4)._superclass();
  2277. $ctx2.sendIdx["superclass"]=1;
  2278. if(($receiver = $3) == nil || $receiver == null){
  2279. return _st(_st(html)._em())._with_("nil");
  2280. $ctx2.sendIdx["with:"]=3;
  2281. } else {
  2282. $5=_st(html)._a();
  2283. $6=$5;
  2284. $9=self._selectedItem();
  2285. $ctx2.sendIdx["selectedItem"]=2;
  2286. $8=_st($9)._superclass();
  2287. $ctx2.sendIdx["superclass"]=2;
  2288. $7=_st($8)._name();
  2289. _st($6)._with_($7);
  2290. $10=_st($5)._onClick_((function(){
  2291. return smalltalk.withContext(function($ctx3) {
  2292. $12=self._selectedItem();
  2293. $11=_st($12)._superclass();
  2294. return self._selectClass_($11);
  2295. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  2296. return $10;
  2297. };
  2298. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2299. $ctx1.sendIdx["with:"]=1;
  2300. return self}, function($ctx1) {$ctx1.fill(self,"renderInheritanceOn:",{html:html},smalltalk.HLDocumentationWidget)})},
  2301. args: ["html"],
  2302. 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 ] ] ]",
  2303. messageSends: ["class:", "div", "with:", "ifNil:ifNotNil:", "superclass", "selectedItem", "em", "a", "name", "onClick:", "selectClass:"],
  2304. referencedClasses: []
  2305. }),
  2306. smalltalk.HLDocumentationWidget);
  2307. smalltalk.addMethod(
  2308. smalltalk.method({
  2309. selector: "selectClass:",
  2310. category: 'actions',
  2311. fn: function (aClass){
  2312. var self=this;
  2313. return smalltalk.withContext(function($ctx1) {
  2314. _st(self._model())._selectedClass_(aClass);
  2315. return self}, function($ctx1) {$ctx1.fill(self,"selectClass:",{aClass:aClass},smalltalk.HLDocumentationWidget)})},
  2316. args: ["aClass"],
  2317. source: "selectClass: aClass\x0a\x09self model selectedClass: aClass",
  2318. messageSends: ["selectedClass:", "model"],
  2319. referencedClasses: []
  2320. }),
  2321. smalltalk.HLDocumentationWidget);
  2322. smalltalk.addMethod(
  2323. smalltalk.method({
  2324. selector: "selectedItem",
  2325. category: 'accessing',
  2326. fn: function (){
  2327. var self=this;
  2328. return smalltalk.withContext(function($ctx1) {
  2329. var $2,$1;
  2330. $2=_st(self._model())._selectedClass();
  2331. if(($receiver = $2) == nil || $receiver == null){
  2332. $1=$2;
  2333. } else {
  2334. var class_;
  2335. class_=$receiver;
  2336. $1=_st(class_)._theNonMetaClass();
  2337. };
  2338. return $1;
  2339. }, function($ctx1) {$ctx1.fill(self,"selectedItem",{},smalltalk.HLDocumentationWidget)})},
  2340. args: [],
  2341. source: "selectedItem\x0a\x09^ self model selectedClass ifNotNil: [ :class | class theNonMetaClass ]",
  2342. messageSends: ["ifNotNil:", "selectedClass", "model", "theNonMetaClass"],
  2343. referencedClasses: []
  2344. }),
  2345. smalltalk.HLDocumentationWidget);
  2346. smalltalk.addMethod(
  2347. smalltalk.method({
  2348. selector: "setClassComment:",
  2349. category: 'reactions',
  2350. fn: function (aString){
  2351. var self=this;
  2352. return smalltalk.withContext(function($ctx1) {
  2353. _st(self._model())._setClassComment_(aString);
  2354. return self}, function($ctx1) {$ctx1.fill(self,"setClassComment:",{aString:aString},smalltalk.HLDocumentationWidget)})},
  2355. args: ["aString"],
  2356. source: "setClassComment: aString\x0a\x09self model setClassComment: aString",
  2357. messageSends: ["setClassComment:", "model"],
  2358. referencedClasses: []
  2359. }),
  2360. smalltalk.HLDocumentationWidget);
  2361. smalltalk.addMethod(
  2362. smalltalk.method({
  2363. selector: "unregister",
  2364. category: 'actions',
  2365. fn: function (){
  2366. var self=this;
  2367. return smalltalk.withContext(function($ctx1) {
  2368. smalltalk.HLDocumentationWidget.superclass.fn.prototype._unregister.apply(_st(self), []);
  2369. _st(_st(self._model())._announcer())._unregister_(self);
  2370. return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLDocumentationWidget)})},
  2371. args: [],
  2372. source: "unregister\x0a\x09super unregister.\x0a\x09self model announcer unregister: self",
  2373. messageSends: ["unregister", "unregister:", "announcer", "model"],
  2374. referencedClasses: []
  2375. }),
  2376. smalltalk.HLDocumentationWidget);
  2377. smalltalk.addClass('HLMethodsListWidget', smalltalk.HLToolListWidget, ['selectorsCache'], 'Helios-Browser');
  2378. smalltalk.HLMethodsListWidget.comment="I render a list of methods for the selected protocol.";
  2379. smalltalk.addMethod(
  2380. smalltalk.method({
  2381. selector: "allProtocol",
  2382. category: 'accessing',
  2383. fn: function (){
  2384. var self=this;
  2385. return smalltalk.withContext(function($ctx1) {
  2386. var $1;
  2387. $1=_st(self._model())._allProtocol();
  2388. return $1;
  2389. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{},smalltalk.HLMethodsListWidget)})},
  2390. args: [],
  2391. source: "allProtocol\x0a\x09^ self model allProtocol",
  2392. messageSends: ["allProtocol", "model"],
  2393. referencedClasses: []
  2394. }),
  2395. smalltalk.HLMethodsListWidget);
  2396. smalltalk.addMethod(
  2397. smalltalk.method({
  2398. selector: "cssClassForItem:",
  2399. category: 'accessing',
  2400. fn: function (aSelector){
  2401. var self=this;
  2402. var override,overriden,method;
  2403. return smalltalk.withContext(function($ctx1) {
  2404. var $2,$3,$4,$1;
  2405. method=self._methodForSelector_(aSelector);
  2406. override=self._isOverride_(method);
  2407. overriden=self._isOverridden_(method);
  2408. $2=override;
  2409. if(smalltalk.assert($2)){
  2410. $3=overriden;
  2411. if(smalltalk.assert($3)){
  2412. $1="override-overridden";
  2413. } else {
  2414. $1="override";
  2415. };
  2416. } else {
  2417. $4=overriden;
  2418. if(smalltalk.assert($4)){
  2419. $1="overridden";
  2420. } else {
  2421. $1="";
  2422. };
  2423. };
  2424. return $1;
  2425. }, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{aSelector:aSelector,override:override,overriden:overriden,method:method},smalltalk.HLMethodsListWidget)})},
  2426. args: ["aSelector"],
  2427. 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: [ '' ] ]",
  2428. messageSends: ["methodForSelector:", "isOverride:", "isOverridden:", "ifTrue:ifFalse:"],
  2429. referencedClasses: []
  2430. }),
  2431. smalltalk.HLMethodsListWidget);
  2432. smalltalk.addMethod(
  2433. smalltalk.method({
  2434. selector: "isOverridden:",
  2435. category: 'testing',
  2436. fn: function (aMethod){
  2437. var self=this;
  2438. return smalltalk.withContext(function($ctx1) {
  2439. var $1;
  2440. $1=_st(self._selectorsCache())._isOverridden_(aMethod);
  2441. return $1;
  2442. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod},smalltalk.HLMethodsListWidget)})},
  2443. args: ["aMethod"],
  2444. source: "isOverridden: aMethod\x0a ^ self selectorsCache isOverridden: aMethod",
  2445. messageSends: ["isOverridden:", "selectorsCache"],
  2446. referencedClasses: []
  2447. }),
  2448. smalltalk.HLMethodsListWidget);
  2449. smalltalk.addMethod(
  2450. smalltalk.method({
  2451. selector: "isOverride:",
  2452. category: 'testing',
  2453. fn: function (aMethod){
  2454. var self=this;
  2455. return smalltalk.withContext(function($ctx1) {
  2456. var $1;
  2457. $1=_st(self._selectorsCache())._isOverride_(aMethod);
  2458. return $1;
  2459. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod},smalltalk.HLMethodsListWidget)})},
  2460. args: ["aMethod"],
  2461. source: "isOverride: aMethod\x0a ^ self selectorsCache isOverride: aMethod",
  2462. messageSends: ["isOverride:", "selectorsCache"],
  2463. referencedClasses: []
  2464. }),
  2465. smalltalk.HLMethodsListWidget);
  2466. smalltalk.addMethod(
  2467. smalltalk.method({
  2468. selector: "label",
  2469. category: 'accessing',
  2470. fn: function (){
  2471. var self=this;
  2472. return smalltalk.withContext(function($ctx1) {
  2473. return "Methods";
  2474. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLMethodsListWidget)})},
  2475. args: [],
  2476. source: "label\x0a\x09^ 'Methods'",
  2477. messageSends: [],
  2478. referencedClasses: []
  2479. }),
  2480. smalltalk.HLMethodsListWidget);
  2481. smalltalk.addMethod(
  2482. smalltalk.method({
  2483. selector: "methodForSelector:",
  2484. category: 'accessing',
  2485. fn: function (aSelector){
  2486. var self=this;
  2487. return smalltalk.withContext(function($ctx1) {
  2488. var $1;
  2489. $1=_st(_st(_st(self._model())._selectedClass())._methodDictionary())._at_(aSelector);
  2490. return $1;
  2491. }, function($ctx1) {$ctx1.fill(self,"methodForSelector:",{aSelector:aSelector},smalltalk.HLMethodsListWidget)})},
  2492. args: ["aSelector"],
  2493. source: "methodForSelector: aSelector\x0a\x09^ self model selectedClass\x0a \x09methodDictionary at: aSelector",
  2494. messageSends: ["at:", "methodDictionary", "selectedClass", "model"],
  2495. referencedClasses: []
  2496. }),
  2497. smalltalk.HLMethodsListWidget);
  2498. smalltalk.addMethod(
  2499. smalltalk.method({
  2500. selector: "methodsInProtocol:",
  2501. category: 'accessing',
  2502. fn: function (aString){
  2503. var self=this;
  2504. return smalltalk.withContext(function($ctx1) {
  2505. var $2,$1,$3,$5,$7,$6,$9,$8,$4;
  2506. $2=self._model();
  2507. $ctx1.sendIdx["model"]=1;
  2508. $1=_st($2)._selectedClass();
  2509. $ctx1.sendIdx["selectedClass"]=1;
  2510. if(($receiver = $1) == nil || $receiver == null){
  2511. $3=[];
  2512. return $3;
  2513. } else {
  2514. $1;
  2515. };
  2516. $5=_st(aString).__eq(self._allProtocol());
  2517. if(smalltalk.assert($5)){
  2518. $7=self._model();
  2519. $ctx1.sendIdx["model"]=2;
  2520. $6=_st($7)._selectedClass();
  2521. $ctx1.sendIdx["selectedClass"]=2;
  2522. $4=_st($6)._methods();
  2523. } else {
  2524. $9=self._model();
  2525. $8=_st($9)._selectedClass();
  2526. $4=_st($8)._methodsInProtocol_(aString);
  2527. };
  2528. return $4;
  2529. }, function($ctx1) {$ctx1.fill(self,"methodsInProtocol:",{aString:aString},smalltalk.HLMethodsListWidget)})},
  2530. args: ["aString"],
  2531. 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 ]",
  2532. messageSends: ["ifNil:", "selectedClass", "model", "ifTrue:ifFalse:", "=", "allProtocol", "methods", "methodsInProtocol:"],
  2533. referencedClasses: []
  2534. }),
  2535. smalltalk.HLMethodsListWidget);
  2536. smalltalk.addMethod(
  2537. smalltalk.method({
  2538. selector: "observeModel",
  2539. category: 'actions',
  2540. fn: function (){
  2541. var self=this;
  2542. function $HLProtocolSelected(){return smalltalk.HLProtocolSelected||(typeof HLProtocolSelected=="undefined"?nil:HLProtocolSelected)}
  2543. function $HLShowInstanceToggled(){return smalltalk.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
  2544. function $HLMethodSelected(){return smalltalk.HLMethodSelected||(typeof HLMethodSelected=="undefined"?nil:HLMethodSelected)}
  2545. function $HLMethodsFocusRequested(){return smalltalk.HLMethodsFocusRequested||(typeof HLMethodsFocusRequested=="undefined"?nil:HLMethodsFocusRequested)}
  2546. return smalltalk.withContext(function($ctx1) {
  2547. var $1,$2;
  2548. $1=_st(self._model())._announcer();
  2549. _st($1)._on_send_to_($HLProtocolSelected(),"onProtocolSelected:",self);
  2550. $ctx1.sendIdx["on:send:to:"]=1;
  2551. _st($1)._on_send_to_($HLShowInstanceToggled(),"onShowInstanceToggled",self);
  2552. $ctx1.sendIdx["on:send:to:"]=2;
  2553. _st($1)._on_send_to_($HLMethodSelected(),"onMethodSelected:",self);
  2554. $ctx1.sendIdx["on:send:to:"]=3;
  2555. $2=_st($1)._on_send_to_($HLMethodsFocusRequested(),"onMethodsFocusRequested",self);
  2556. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLMethodsListWidget)})},
  2557. args: [],
  2558. 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",
  2559. messageSends: ["on:send:to:", "announcer", "model"],
  2560. referencedClasses: ["HLProtocolSelected", "HLShowInstanceToggled", "HLMethodSelected", "HLMethodsFocusRequested"]
  2561. }),
  2562. smalltalk.HLMethodsListWidget);
  2563. smalltalk.addMethod(
  2564. smalltalk.method({
  2565. selector: "observeSystem",
  2566. category: 'actions',
  2567. fn: function (){
  2568. var self=this;
  2569. function $ProtocolAdded(){return smalltalk.ProtocolAdded||(typeof ProtocolAdded=="undefined"?nil:ProtocolAdded)}
  2570. function $ProtocolRemoved(){return smalltalk.ProtocolRemoved||(typeof ProtocolRemoved=="undefined"?nil:ProtocolRemoved)}
  2571. function $MethodAdded(){return smalltalk.MethodAdded||(typeof MethodAdded=="undefined"?nil:MethodAdded)}
  2572. function $MethodRemoved(){return smalltalk.MethodRemoved||(typeof MethodRemoved=="undefined"?nil:MethodRemoved)}
  2573. function $MethodMoved(){return smalltalk.MethodMoved||(typeof MethodMoved=="undefined"?nil:MethodMoved)}
  2574. return smalltalk.withContext(function($ctx1) {
  2575. var $1,$2;
  2576. $1=_st(self._model())._systemAnnouncer();
  2577. _st($1)._on_send_to_($ProtocolAdded(),"onProtocolAdded:",self);
  2578. $ctx1.sendIdx["on:send:to:"]=1;
  2579. _st($1)._on_send_to_($ProtocolRemoved(),"onProtocolRemoved:",self);
  2580. $ctx1.sendIdx["on:send:to:"]=2;
  2581. _st($1)._on_send_to_($MethodAdded(),"onMethodAdded:",self);
  2582. $ctx1.sendIdx["on:send:to:"]=3;
  2583. _st($1)._on_send_to_($MethodRemoved(),"onMethodRemoved:",self);
  2584. $ctx1.sendIdx["on:send:to:"]=4;
  2585. $2=_st($1)._on_send_to_($MethodMoved(),"onMethodMoved:",self);
  2586. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLMethodsListWidget)})},
  2587. args: [],
  2588. 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",
  2589. messageSends: ["on:send:to:", "systemAnnouncer", "model"],
  2590. referencedClasses: ["ProtocolAdded", "ProtocolRemoved", "MethodAdded", "MethodRemoved", "MethodMoved"]
  2591. }),
  2592. smalltalk.HLMethodsListWidget);
  2593. smalltalk.addMethod(
  2594. smalltalk.method({
  2595. selector: "onMethodAdded:",
  2596. category: 'reactions',
  2597. fn: function (anAnnouncement){
  2598. var self=this;
  2599. return smalltalk.withContext(function($ctx1) {
  2600. var $1;
  2601. $1=_st(_st(self._model())._selectedClass()).__eq(_st(_st(anAnnouncement)._method())._methodClass());
  2602. if(! smalltalk.assert($1)){
  2603. return self;
  2604. };
  2605. self._setItemsForSelectedProtocol();
  2606. self._refresh();
  2607. return self}, function($ctx1) {$ctx1.fill(self,"onMethodAdded:",{anAnnouncement:anAnnouncement},smalltalk.HLMethodsListWidget)})},
  2608. args: ["anAnnouncement"],
  2609. source: "onMethodAdded: anAnnouncement\x0a\x09self model selectedClass = anAnnouncement method methodClass ifFalse: [ ^ self ].\x0a \x0a self setItemsForSelectedProtocol.\x0a self refresh",
  2610. messageSends: ["ifFalse:", "=", "selectedClass", "model", "methodClass", "method", "setItemsForSelectedProtocol", "refresh"],
  2611. referencedClasses: []
  2612. }),
  2613. smalltalk.HLMethodsListWidget);
  2614. smalltalk.addMethod(
  2615. smalltalk.method({
  2616. selector: "onMethodMoved:",
  2617. category: 'reactions',
  2618. fn: function (anAnnouncement){
  2619. var self=this;
  2620. return smalltalk.withContext(function($ctx1) {
  2621. var $4,$3,$2,$1,$8,$7,$10,$9,$6,$11,$5;
  2622. $4=self._model();
  2623. $ctx1.sendIdx["model"]=1;
  2624. $3=_st($4)._selectedMethod();
  2625. $2=_st($3).__eq(_st(anAnnouncement)._method());
  2626. $ctx1.sendIdx["="]=1;
  2627. if(! smalltalk.assert($2)){
  2628. return self;
  2629. };
  2630. $8=self._model();
  2631. $ctx1.sendIdx["model"]=2;
  2632. $7=_st($8)._selectedProtocol();
  2633. $10=self._model();
  2634. $9=_st($10)._allProtocol();
  2635. $6=_st($7).__eq($9);
  2636. if(! smalltalk.assert($6)){
  2637. self._selectedItem_(nil);
  2638. self._selectItem_(nil);
  2639. self._setItemsForSelectedProtocol();
  2640. $11=self._refresh();
  2641. $5=$11;
  2642. };
  2643. return self}, function($ctx1) {$ctx1.fill(self,"onMethodMoved:",{anAnnouncement:anAnnouncement},smalltalk.HLMethodsListWidget)})},
  2644. args: ["anAnnouncement"],
  2645. 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 ]",
  2646. messageSends: ["ifFalse:", "=", "selectedMethod", "model", "method", "selectedProtocol", "allProtocol", "selectedItem:", "selectItem:", "setItemsForSelectedProtocol", "refresh"],
  2647. referencedClasses: []
  2648. }),
  2649. smalltalk.HLMethodsListWidget);
  2650. smalltalk.addMethod(
  2651. smalltalk.method({
  2652. selector: "onMethodRemoved:",
  2653. category: 'reactions',
  2654. fn: function (anAnnouncement){
  2655. var self=this;
  2656. var method;
  2657. return smalltalk.withContext(function($ctx1) {
  2658. var $1,$2,$3,$5,$6,$7,$4,$8;
  2659. var $early={};
  2660. try {
  2661. method=_st(anAnnouncement)._method();
  2662. _st(self._items())._detect_ifNone_((function(each){
  2663. return smalltalk.withContext(function($ctx2) {
  2664. $1=each;
  2665. $2=_st(method)._selector();
  2666. $ctx2.sendIdx["selector"]=1;
  2667. return _st($1).__eq($2);
  2668. $ctx2.sendIdx["="]=1;
  2669. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),(function(){
  2670. return smalltalk.withContext(function($ctx2) {
  2671. throw $early=[self];
  2672. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  2673. $3=self._selectedItem();
  2674. $ctx1.sendIdx["selectedItem"]=1;
  2675. if(($receiver = $3) == nil || $receiver == null){
  2676. $3;
  2677. } else {
  2678. $5=_st(_st(method)._methodClass()).__eq(_st(self._model())._selectedClass());
  2679. $ctx1.sendIdx["="]=2;
  2680. $4=_st($5)._and_((function(){
  2681. return smalltalk.withContext(function($ctx2) {
  2682. $6=_st(method)._selector();
  2683. $7=self._selectedItem();
  2684. return _st($6).__eq($7);
  2685. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
  2686. if(smalltalk.assert($4)){
  2687. self._selectedItem_(nil);
  2688. $8=self._selectItem_(nil);
  2689. $8;
  2690. };
  2691. };
  2692. self._setItemsForSelectedProtocol();
  2693. self._refresh();
  2694. return self}
  2695. catch(e) {if(e===$early)return e[0]; throw e}
  2696. }, function($ctx1) {$ctx1.fill(self,"onMethodRemoved:",{anAnnouncement:anAnnouncement,method:method},smalltalk.HLMethodsListWidget)})},
  2697. args: ["anAnnouncement"],
  2698. 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",
  2699. messageSends: ["method", "detect:ifNone:", "items", "=", "selector", "ifNotNil:", "selectedItem", "ifTrue:", "and:", "methodClass", "selectedClass", "model", "selectedItem:", "selectItem:", "setItemsForSelectedProtocol", "refresh"],
  2700. referencedClasses: []
  2701. }),
  2702. smalltalk.HLMethodsListWidget);
  2703. smalltalk.addMethod(
  2704. smalltalk.method({
  2705. selector: "onMethodSelected:",
  2706. category: 'reactions',
  2707. fn: function (anAnnouncement){
  2708. var self=this;
  2709. var selector,method;
  2710. return smalltalk.withContext(function($ctx1) {
  2711. var $1,$2;
  2712. method=_st(anAnnouncement)._item();
  2713. $1=_st(method)._isCompiledMethod();
  2714. if(smalltalk.assert($1)){
  2715. selector=_st(method)._selector();
  2716. } else {
  2717. selector=nil;
  2718. };
  2719. self._selectedItem_(selector);
  2720. $2=self._activateItem_(selector);
  2721. return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{anAnnouncement:anAnnouncement,selector:selector,method:method},smalltalk.HLMethodsListWidget)})},
  2722. args: ["anAnnouncement"],
  2723. 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",
  2724. messageSends: ["item", "ifTrue:ifFalse:", "isCompiledMethod", "selector", "selectedItem:", "activateItem:"],
  2725. referencedClasses: []
  2726. }),
  2727. smalltalk.HLMethodsListWidget);
  2728. smalltalk.addMethod(
  2729. smalltalk.method({
  2730. selector: "onMethodsFocusRequested",
  2731. category: 'reactions',
  2732. fn: function (){
  2733. var self=this;
  2734. return smalltalk.withContext(function($ctx1) {
  2735. self._focus();
  2736. return self}, function($ctx1) {$ctx1.fill(self,"onMethodsFocusRequested",{},smalltalk.HLMethodsListWidget)})},
  2737. args: [],
  2738. source: "onMethodsFocusRequested\x0a\x09self focus",
  2739. messageSends: ["focus"],
  2740. referencedClasses: []
  2741. }),
  2742. smalltalk.HLMethodsListWidget);
  2743. smalltalk.addMethod(
  2744. smalltalk.method({
  2745. selector: "onProtocolAdded:",
  2746. category: 'reactions',
  2747. fn: function (anAnnouncement){
  2748. var self=this;
  2749. return smalltalk.withContext(function($ctx1) {
  2750. var $1;
  2751. $1=_st(_st(self._model())._selectedClass()).__eq(_st(anAnnouncement)._theClass());
  2752. if(! smalltalk.assert($1)){
  2753. return self;
  2754. };
  2755. self._setItemsForSelectedProtocol();
  2756. self._refresh();
  2757. self._focus();
  2758. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolAdded:",{anAnnouncement:anAnnouncement},smalltalk.HLMethodsListWidget)})},
  2759. args: ["anAnnouncement"],
  2760. source: "onProtocolAdded: anAnnouncement\x0a\x09self model selectedClass = anAnnouncement theClass ifFalse: [ ^ self ].\x0a\x09\x0a\x09self setItemsForSelectedProtocol.\x0a self refresh.\x0a\x09self focus",
  2761. messageSends: ["ifFalse:", "=", "selectedClass", "model", "theClass", "setItemsForSelectedProtocol", "refresh", "focus"],
  2762. referencedClasses: []
  2763. }),
  2764. smalltalk.HLMethodsListWidget);
  2765. smalltalk.addMethod(
  2766. smalltalk.method({
  2767. selector: "onProtocolRemoved:",
  2768. category: 'reactions',
  2769. fn: function (anAnnouncement){
  2770. var self=this;
  2771. return smalltalk.withContext(function($ctx1) {
  2772. var $1;
  2773. $1=_st(_st(self._model())._selectedClass()).__eq(_st(anAnnouncement)._theClass());
  2774. if(! smalltalk.assert($1)){
  2775. return self;
  2776. };
  2777. self._setItemsForSelectedProtocol();
  2778. self._refresh();
  2779. self._focus();
  2780. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolRemoved:",{anAnnouncement:anAnnouncement},smalltalk.HLMethodsListWidget)})},
  2781. args: ["anAnnouncement"],
  2782. source: "onProtocolRemoved: anAnnouncement\x0a\x09self model selectedClass = anAnnouncement theClass ifFalse: [ ^ self ].\x0a\x09\x0a\x09self setItemsForSelectedProtocol.\x0a self refresh.\x0a\x09self focus",
  2783. messageSends: ["ifFalse:", "=", "selectedClass", "model", "theClass", "setItemsForSelectedProtocol", "refresh", "focus"],
  2784. referencedClasses: []
  2785. }),
  2786. smalltalk.HLMethodsListWidget);
  2787. smalltalk.addMethod(
  2788. smalltalk.method({
  2789. selector: "onProtocolSelected:",
  2790. category: 'reactions',
  2791. fn: function (anAnnouncement){
  2792. var self=this;
  2793. return smalltalk.withContext(function($ctx1) {
  2794. self._selectedItem_(nil);
  2795. self._setItemsForSelectedProtocol();
  2796. self._refresh();
  2797. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{anAnnouncement:anAnnouncement},smalltalk.HLMethodsListWidget)})},
  2798. args: ["anAnnouncement"],
  2799. source: "onProtocolSelected: anAnnouncement\x0a self selectedItem: nil.\x0a \x0a\x09self setItemsForSelectedProtocol.\x0a self refresh",
  2800. messageSends: ["selectedItem:", "setItemsForSelectedProtocol", "refresh"],
  2801. referencedClasses: []
  2802. }),
  2803. smalltalk.HLMethodsListWidget);
  2804. smalltalk.addMethod(
  2805. smalltalk.method({
  2806. selector: "onShowInstanceToggled",
  2807. category: 'reactions',
  2808. fn: function (){
  2809. var self=this;
  2810. return smalltalk.withContext(function($ctx1) {
  2811. self._onProtocolSelected_(nil);
  2812. return self}, function($ctx1) {$ctx1.fill(self,"onShowInstanceToggled",{},smalltalk.HLMethodsListWidget)})},
  2813. args: [],
  2814. source: "onShowInstanceToggled\x0a\x09self onProtocolSelected: nil",
  2815. messageSends: ["onProtocolSelected:"],
  2816. referencedClasses: []
  2817. }),
  2818. smalltalk.HLMethodsListWidget);
  2819. smalltalk.addMethod(
  2820. smalltalk.method({
  2821. selector: "overrideSelectors",
  2822. category: 'accessing',
  2823. fn: function (){
  2824. var self=this;
  2825. function $Set(){return smalltalk.Set||(typeof Set=="undefined"?nil:Set)}
  2826. return smalltalk.withContext(function($ctx1) {
  2827. var $2,$3,$1;
  2828. $1=_st(self._selectorsCache())._at_ifAbsentPut_("override",(function(){
  2829. return smalltalk.withContext(function($ctx2) {
  2830. return _st(_st(_st(self._model())._selectedClass())._allSuperclasses())._inject_into_(_st($Set())._new(),(function(acc,each){
  2831. return smalltalk.withContext(function($ctx3) {
  2832. $2=acc;
  2833. _st($2)._addAll_(_st(each)._selectors());
  2834. $3=_st($2)._yourself();
  2835. return $3;
  2836. }, function($ctx3) {$ctx3.fillBlock({acc:acc,each:each},$ctx2,2)})}));
  2837. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2838. return $1;
  2839. }, function($ctx1) {$ctx1.fill(self,"overrideSelectors",{},smalltalk.HLMethodsListWidget)})},
  2840. args: [],
  2841. 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 ] ]",
  2842. messageSends: ["at:ifAbsentPut:", "selectorsCache", "inject:into:", "allSuperclasses", "selectedClass", "model", "new", "addAll:", "selectors", "yourself"],
  2843. referencedClasses: ["Set"]
  2844. }),
  2845. smalltalk.HLMethodsListWidget);
  2846. smalltalk.addMethod(
  2847. smalltalk.method({
  2848. selector: "overridenSelectors",
  2849. category: 'accessing',
  2850. fn: function (){
  2851. var self=this;
  2852. function $Set(){return smalltalk.Set||(typeof Set=="undefined"?nil:Set)}
  2853. return smalltalk.withContext(function($ctx1) {
  2854. var $2,$3,$1;
  2855. $1=_st(self._selectorsCache())._at_ifAbsentPut_("overriden",(function(){
  2856. return smalltalk.withContext(function($ctx2) {
  2857. return _st(_st(_st(self._model())._selectedClass())._allSubclasses())._inject_into_(_st($Set())._new(),(function(acc,each){
  2858. return smalltalk.withContext(function($ctx3) {
  2859. $2=acc;
  2860. _st($2)._addAll_(_st(each)._selectors());
  2861. $3=_st($2)._yourself();
  2862. return $3;
  2863. }, function($ctx3) {$ctx3.fillBlock({acc:acc,each:each},$ctx2,2)})}));
  2864. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2865. return $1;
  2866. }, function($ctx1) {$ctx1.fill(self,"overridenSelectors",{},smalltalk.HLMethodsListWidget)})},
  2867. args: [],
  2868. 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 ] ]",
  2869. messageSends: ["at:ifAbsentPut:", "selectorsCache", "inject:into:", "allSubclasses", "selectedClass", "model", "new", "addAll:", "selectors", "yourself"],
  2870. referencedClasses: ["Set"]
  2871. }),
  2872. smalltalk.HLMethodsListWidget);
  2873. smalltalk.addMethod(
  2874. smalltalk.method({
  2875. selector: "renderContentOn:",
  2876. category: 'rendering',
  2877. fn: function (html){
  2878. var self=this;
  2879. return smalltalk.withContext(function($ctx1) {
  2880. var $1,$2,$3;
  2881. $1=_st(self._model())._showInstance();
  2882. if(smalltalk.assert($1)){
  2883. smalltalk.HLMethodsListWidget.superclass.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  2884. } else {
  2885. $2=_st(html)._div();
  2886. _st($2)._class_("class_side");
  2887. $3=_st($2)._with_((function(){
  2888. return smalltalk.withContext(function($ctx2) {
  2889. return smalltalk.HLMethodsListWidget.superclass.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  2890. $ctx2.sendIdx["renderContentOn:"]=1;
  2891. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  2892. $3;
  2893. };
  2894. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLMethodsListWidget)})},
  2895. args: ["html"],
  2896. 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 ]",
  2897. messageSends: ["ifFalse:ifTrue:", "showInstance", "model", "class:", "div", "with:", "renderContentOn:"],
  2898. referencedClasses: []
  2899. }),
  2900. smalltalk.HLMethodsListWidget);
  2901. smalltalk.addMethod(
  2902. smalltalk.method({
  2903. selector: "renderItemLabel:on:",
  2904. category: 'rendering',
  2905. fn: function (aSelector,html){
  2906. var self=this;
  2907. return smalltalk.withContext(function($ctx1) {
  2908. _st(html)._with_(aSelector);
  2909. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aSelector:aSelector,html:html},smalltalk.HLMethodsListWidget)})},
  2910. args: ["aSelector", "html"],
  2911. source: "renderItemLabel: aSelector on: html\x0a\x09html with: aSelector",
  2912. messageSends: ["with:"],
  2913. referencedClasses: []
  2914. }),
  2915. smalltalk.HLMethodsListWidget);
  2916. smalltalk.addMethod(
  2917. smalltalk.method({
  2918. selector: "selectItem:",
  2919. category: 'actions',
  2920. fn: function (aSelector){
  2921. var self=this;
  2922. return smalltalk.withContext(function($ctx1) {
  2923. var $1,$3,$2,$5,$4;
  2924. $1=aSelector;
  2925. if(($receiver = $1) == nil || $receiver == null){
  2926. $3=self._model();
  2927. $ctx1.sendIdx["model"]=1;
  2928. $2=_st($3)._selectedMethod_(nil);
  2929. $ctx1.sendIdx["selectedMethod:"]=1;
  2930. return $2;
  2931. } else {
  2932. $1;
  2933. };
  2934. $5=self._model();
  2935. $4=_st($5)._selectedMethod_(self._methodForSelector_(aSelector));
  2936. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aSelector:aSelector},smalltalk.HLMethodsListWidget)})},
  2937. args: ["aSelector"],
  2938. source: "selectItem: aSelector\x0a\x09aSelector ifNil: [ ^ self model selectedMethod: nil ].\x0a\x0a \x09self model selectedMethod: (self methodForSelector: aSelector)",
  2939. messageSends: ["ifNil:", "selectedMethod:", "model", "methodForSelector:"],
  2940. referencedClasses: []
  2941. }),
  2942. smalltalk.HLMethodsListWidget);
  2943. smalltalk.addMethod(
  2944. smalltalk.method({
  2945. selector: "selectorsCache",
  2946. category: 'accessing',
  2947. fn: function (){
  2948. var self=this;
  2949. return smalltalk.withContext(function($ctx1) {
  2950. var $1;
  2951. $1=_st(self._class())._selectorsCache();
  2952. return $1;
  2953. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{},smalltalk.HLMethodsListWidget)})},
  2954. args: [],
  2955. source: "selectorsCache\x0a\x09^ self class selectorsCache",
  2956. messageSends: ["selectorsCache", "class"],
  2957. referencedClasses: []
  2958. }),
  2959. smalltalk.HLMethodsListWidget);
  2960. smalltalk.addMethod(
  2961. smalltalk.method({
  2962. selector: "selectorsInProtocol:",
  2963. category: 'accessing',
  2964. fn: function (aString){
  2965. var self=this;
  2966. return smalltalk.withContext(function($ctx1) {
  2967. var $1;
  2968. $1=_st(_st(self._methodsInProtocol_(aString))._collect_((function(each){
  2969. return smalltalk.withContext(function($ctx2) {
  2970. return _st(each)._selector();
  2971. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._sorted();
  2972. return $1;
  2973. }, function($ctx1) {$ctx1.fill(self,"selectorsInProtocol:",{aString:aString},smalltalk.HLMethodsListWidget)})},
  2974. args: ["aString"],
  2975. source: "selectorsInProtocol: aString\x0a\x09^ ((self methodsInProtocol: aString)\x0a \x09collect: [ :each | each selector ]) sorted",
  2976. messageSends: ["sorted", "collect:", "methodsInProtocol:", "selector"],
  2977. referencedClasses: []
  2978. }),
  2979. smalltalk.HLMethodsListWidget);
  2980. smalltalk.addMethod(
  2981. smalltalk.method({
  2982. selector: "setItemsForProtocol:",
  2983. category: 'private',
  2984. fn: function (aString){
  2985. var self=this;
  2986. return smalltalk.withContext(function($ctx1) {
  2987. var $3,$2,$1;
  2988. $3=aString;
  2989. if(($receiver = $3) == nil || $receiver == null){
  2990. $2=[];
  2991. } else {
  2992. $2=self._selectorsInProtocol_(aString);
  2993. };
  2994. $1=self._items_($2);
  2995. return $1;
  2996. }, function($ctx1) {$ctx1.fill(self,"setItemsForProtocol:",{aString:aString},smalltalk.HLMethodsListWidget)})},
  2997. args: ["aString"],
  2998. source: "setItemsForProtocol: aString\x0a\x09^ self items: (aString\x0a \x09ifNil: [ #() ]\x0a \x09ifNotNil: [ self selectorsInProtocol: aString ])",
  2999. messageSends: ["items:", "ifNil:ifNotNil:", "selectorsInProtocol:"],
  3000. referencedClasses: []
  3001. }),
  3002. smalltalk.HLMethodsListWidget);
  3003. smalltalk.addMethod(
  3004. smalltalk.method({
  3005. selector: "setItemsForSelectedProtocol",
  3006. category: 'private',
  3007. fn: function (){
  3008. var self=this;
  3009. return smalltalk.withContext(function($ctx1) {
  3010. self._setItemsForProtocol_(_st(self._model())._selectedProtocol());
  3011. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedProtocol",{},smalltalk.HLMethodsListWidget)})},
  3012. args: [],
  3013. source: "setItemsForSelectedProtocol\x0a\x09self setItemsForProtocol: self model selectedProtocol",
  3014. messageSends: ["setItemsForProtocol:", "selectedProtocol", "model"],
  3015. referencedClasses: []
  3016. }),
  3017. smalltalk.HLMethodsListWidget);
  3018. smalltalk.HLMethodsListWidget.klass.iVarNames = ['selectorsCache'];
  3019. smalltalk.addMethod(
  3020. smalltalk.method({
  3021. selector: "selectorsCache",
  3022. category: 'accessing',
  3023. fn: function (){
  3024. var self=this;
  3025. function $HLSelectorsCache(){return smalltalk.HLSelectorsCache||(typeof HLSelectorsCache=="undefined"?nil:HLSelectorsCache)}
  3026. return smalltalk.withContext(function($ctx1) {
  3027. var $1;
  3028. $1=_st($HLSelectorsCache())._current();
  3029. return $1;
  3030. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{},smalltalk.HLMethodsListWidget.klass)})},
  3031. args: [],
  3032. source: "selectorsCache\x0a\x09^ HLSelectorsCache current",
  3033. messageSends: ["current"],
  3034. referencedClasses: ["HLSelectorsCache"]
  3035. }),
  3036. smalltalk.HLMethodsListWidget.klass);
  3037. smalltalk.addClass('HLPackagesListWidget', smalltalk.HLToolListWidget, [], 'Helios-Browser');
  3038. smalltalk.HLPackagesListWidget.comment="I render a list of the system packages.";
  3039. smalltalk.addMethod(
  3040. smalltalk.method({
  3041. selector: "commitPackage",
  3042. category: 'actions',
  3043. fn: function (){
  3044. var self=this;
  3045. return smalltalk.withContext(function($ctx1) {
  3046. _st(self._model())._commitPackage();
  3047. return self}, function($ctx1) {$ctx1.fill(self,"commitPackage",{},smalltalk.HLPackagesListWidget)})},
  3048. args: [],
  3049. source: "commitPackage\x0a\x09self model commitPackage",
  3050. messageSends: ["commitPackage", "model"],
  3051. referencedClasses: []
  3052. }),
  3053. smalltalk.HLPackagesListWidget);
  3054. smalltalk.addMethod(
  3055. smalltalk.method({
  3056. selector: "cssClassForItem:",
  3057. category: 'accessing',
  3058. fn: function (anItem){
  3059. var self=this;
  3060. return smalltalk.withContext(function($ctx1) {
  3061. return "package";
  3062. }, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{anItem:anItem},smalltalk.HLPackagesListWidget)})},
  3063. args: ["anItem"],
  3064. source: "cssClassForItem: anItem\x09\x0a\x09^ 'package'",
  3065. messageSends: [],
  3066. referencedClasses: []
  3067. }),
  3068. smalltalk.HLPackagesListWidget);
  3069. smalltalk.addMethod(
  3070. smalltalk.method({
  3071. selector: "focusClassesListWidget",
  3072. category: 'actions',
  3073. fn: function (){
  3074. var self=this;
  3075. function $HLClassesListFocus(){return smalltalk.HLClassesListFocus||(typeof HLClassesListFocus=="undefined"?nil:HLClassesListFocus)}
  3076. return smalltalk.withContext(function($ctx1) {
  3077. _st(_st(self._model())._announcer())._announce_(_st($HLClassesListFocus())._new());
  3078. return self}, function($ctx1) {$ctx1.fill(self,"focusClassesListWidget",{},smalltalk.HLPackagesListWidget)})},
  3079. args: [],
  3080. source: "focusClassesListWidget\x0a\x09self model announcer announce: HLClassesListFocus new",
  3081. messageSends: ["announce:", "announcer", "model", "new"],
  3082. referencedClasses: ["HLClassesListFocus"]
  3083. }),
  3084. smalltalk.HLPackagesListWidget);
  3085. smalltalk.addMethod(
  3086. smalltalk.method({
  3087. selector: "initializeItems",
  3088. category: 'initialization',
  3089. fn: function (){
  3090. var self=this;
  3091. return smalltalk.withContext(function($ctx1) {
  3092. var $2,$3,$1;
  3093. self["@items"]=_st(_st(self._model())._packages())._sort_((function(a,b){
  3094. return smalltalk.withContext(function($ctx2) {
  3095. $2=_st(a)._name();
  3096. $ctx2.sendIdx["name"]=1;
  3097. $3=_st(b)._name();
  3098. return _st($2).__lt($3);
  3099. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,1)})}));
  3100. $1=self["@items"];
  3101. return $1;
  3102. }, function($ctx1) {$ctx1.fill(self,"initializeItems",{},smalltalk.HLPackagesListWidget)})},
  3103. args: [],
  3104. source: "initializeItems\x0a\x09^ items := self model packages \x0a\x09\x09sort: [ :a :b | a name < b name ]",
  3105. messageSends: ["sort:", "packages", "model", "<", "name"],
  3106. referencedClasses: []
  3107. }),
  3108. smalltalk.HLPackagesListWidget);
  3109. smalltalk.addMethod(
  3110. smalltalk.method({
  3111. selector: "items",
  3112. category: 'accessing',
  3113. fn: function (){
  3114. var self=this;
  3115. return smalltalk.withContext(function($ctx1) {
  3116. var $2,$1;
  3117. $2=self["@items"];
  3118. if(($receiver = $2) == nil || $receiver == null){
  3119. $1=self._initializeItems();
  3120. } else {
  3121. $1=$2;
  3122. };
  3123. return $1;
  3124. }, function($ctx1) {$ctx1.fill(self,"items",{},smalltalk.HLPackagesListWidget)})},
  3125. args: [],
  3126. source: "items\x0a\x09^ items ifNil: [ self initializeItems ]",
  3127. messageSends: ["ifNil:", "initializeItems"],
  3128. referencedClasses: []
  3129. }),
  3130. smalltalk.HLPackagesListWidget);
  3131. smalltalk.addMethod(
  3132. smalltalk.method({
  3133. selector: "label",
  3134. category: 'accessing',
  3135. fn: function (){
  3136. var self=this;
  3137. return smalltalk.withContext(function($ctx1) {
  3138. return "Packages";
  3139. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLPackagesListWidget)})},
  3140. args: [],
  3141. source: "label\x0a\x09^ 'Packages'",
  3142. messageSends: [],
  3143. referencedClasses: []
  3144. }),
  3145. smalltalk.HLPackagesListWidget);
  3146. smalltalk.addMethod(
  3147. smalltalk.method({
  3148. selector: "observeModel",
  3149. category: 'actions',
  3150. fn: function (){
  3151. var self=this;
  3152. function $HLPackageSelected(){return smalltalk.HLPackageSelected||(typeof HLPackageSelected=="undefined"?nil:HLPackageSelected)}
  3153. function $HLPackagesFocusRequested(){return smalltalk.HLPackagesFocusRequested||(typeof HLPackagesFocusRequested=="undefined"?nil:HLPackagesFocusRequested)}
  3154. return smalltalk.withContext(function($ctx1) {
  3155. var $1,$2;
  3156. $1=_st(self._model())._announcer();
  3157. _st($1)._on_send_to_($HLPackageSelected(),"onPackageSelected:",self);
  3158. $ctx1.sendIdx["on:send:to:"]=1;
  3159. $2=_st($1)._on_send_to_($HLPackagesFocusRequested(),"onPackagesFocusRequested",self);
  3160. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLPackagesListWidget)})},
  3161. args: [],
  3162. 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",
  3163. messageSends: ["on:send:to:", "announcer", "model"],
  3164. referencedClasses: ["HLPackageSelected", "HLPackagesFocusRequested"]
  3165. }),
  3166. smalltalk.HLPackagesListWidget);
  3167. smalltalk.addMethod(
  3168. smalltalk.method({
  3169. selector: "observeSystem",
  3170. category: 'actions',
  3171. fn: function (){
  3172. var self=this;
  3173. function $ClassAdded(){return smalltalk.ClassAdded||(typeof ClassAdded=="undefined"?nil:ClassAdded)}
  3174. function $PackageAdded(){return smalltalk.PackageAdded||(typeof PackageAdded=="undefined"?nil:PackageAdded)}
  3175. return smalltalk.withContext(function($ctx1) {
  3176. var $3,$2,$1,$6,$5,$4;
  3177. $3=self._model();
  3178. $ctx1.sendIdx["model"]=1;
  3179. $2=_st($3)._systemAnnouncer();
  3180. $ctx1.sendIdx["systemAnnouncer"]=1;
  3181. $1=_st($2)._on_send_to_($ClassAdded(),"onClassAdded:",self);
  3182. $ctx1.sendIdx["on:send:to:"]=1;
  3183. $6=self._model();
  3184. $5=_st($6)._systemAnnouncer();
  3185. $4=_st($5)._on_send_to_($PackageAdded(),"onPackageAdded:",self);
  3186. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLPackagesListWidget)})},
  3187. args: [],
  3188. 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",
  3189. messageSends: ["on:send:to:", "systemAnnouncer", "model"],
  3190. referencedClasses: ["ClassAdded", "PackageAdded"]
  3191. }),
  3192. smalltalk.HLPackagesListWidget);
  3193. smalltalk.addMethod(
  3194. smalltalk.method({
  3195. selector: "onClassAdded:",
  3196. category: 'reactions',
  3197. fn: function (anAnnouncement){
  3198. var self=this;
  3199. return smalltalk.withContext(function($ctx1) {
  3200. var $1,$2;
  3201. $1=_st(self._items())._includes_(_st(_st(anAnnouncement)._theClass())._package());
  3202. if(! smalltalk.assert($1)){
  3203. self._initializeItems();
  3204. $2=self._refresh();
  3205. $2;
  3206. };
  3207. return self}, function($ctx1) {$ctx1.fill(self,"onClassAdded:",{anAnnouncement:anAnnouncement},smalltalk.HLPackagesListWidget)})},
  3208. args: ["anAnnouncement"],
  3209. 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 ]",
  3210. messageSends: ["ifFalse:", "includes:", "items", "package", "theClass", "initializeItems", "refresh"],
  3211. referencedClasses: []
  3212. }),
  3213. smalltalk.HLPackagesListWidget);
  3214. smalltalk.addMethod(
  3215. smalltalk.method({
  3216. selector: "onPackageAdded:",
  3217. category: 'reactions',
  3218. fn: function (anAnnouncement){
  3219. var self=this;
  3220. return smalltalk.withContext(function($ctx1) {
  3221. var $1;
  3222. self._initializeItems();
  3223. $1=self._refresh();
  3224. return self}, function($ctx1) {$ctx1.fill(self,"onPackageAdded:",{anAnnouncement:anAnnouncement},smalltalk.HLPackagesListWidget)})},
  3225. args: ["anAnnouncement"],
  3226. source: "onPackageAdded: anAnnouncement\x0a\x09self \x0a\x09\x09initializeItems;\x0a\x09\x09refresh",
  3227. messageSends: ["initializeItems", "refresh"],
  3228. referencedClasses: []
  3229. }),
  3230. smalltalk.HLPackagesListWidget);
  3231. smalltalk.addMethod(
  3232. smalltalk.method({
  3233. selector: "onPackageSelected:",
  3234. category: 'reactions',
  3235. fn: function (anAnnouncement){
  3236. var self=this;
  3237. var package_;
  3238. return smalltalk.withContext(function($ctx1) {
  3239. var $1,$2;
  3240. package_=_st(anAnnouncement)._item();
  3241. self._selectedItem_(package_);
  3242. $1=self._hasFocus();
  3243. if(! smalltalk.assert($1)){
  3244. self._activateItem_(package_);
  3245. $2=self._focus();
  3246. $2;
  3247. };
  3248. return self}, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{anAnnouncement:anAnnouncement,package_:package_},smalltalk.HLPackagesListWidget)})},
  3249. args: ["anAnnouncement"],
  3250. 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 ]",
  3251. messageSends: ["item", "selectedItem:", "ifFalse:", "hasFocus", "activateItem:", "focus"],
  3252. referencedClasses: []
  3253. }),
  3254. smalltalk.HLPackagesListWidget);
  3255. smalltalk.addMethod(
  3256. smalltalk.method({
  3257. selector: "onPackagesFocusRequested",
  3258. category: 'reactions',
  3259. fn: function (){
  3260. var self=this;
  3261. return smalltalk.withContext(function($ctx1) {
  3262. self._focus();
  3263. return self}, function($ctx1) {$ctx1.fill(self,"onPackagesFocusRequested",{},smalltalk.HLPackagesListWidget)})},
  3264. args: [],
  3265. source: "onPackagesFocusRequested\x0a\x09self focus",
  3266. messageSends: ["focus"],
  3267. referencedClasses: []
  3268. }),
  3269. smalltalk.HLPackagesListWidget);
  3270. smalltalk.addMethod(
  3271. smalltalk.method({
  3272. selector: "renderItemLabel:on:",
  3273. category: 'rendering',
  3274. fn: function (aPackage,html){
  3275. var self=this;
  3276. return smalltalk.withContext(function($ctx1) {
  3277. _st(html)._with_(_st(aPackage)._name());
  3278. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aPackage:aPackage,html:html},smalltalk.HLPackagesListWidget)})},
  3279. args: ["aPackage", "html"],
  3280. source: "renderItemLabel: aPackage on: html\x0a\x09html with: aPackage name",
  3281. messageSends: ["with:", "name"],
  3282. referencedClasses: []
  3283. }),
  3284. smalltalk.HLPackagesListWidget);
  3285. smalltalk.addMethod(
  3286. smalltalk.method({
  3287. selector: "selectItem:",
  3288. category: 'actions',
  3289. fn: function (aPackage){
  3290. var self=this;
  3291. return smalltalk.withContext(function($ctx1) {
  3292. _st(self._model())._selectedPackage_(aPackage);
  3293. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aPackage:aPackage},smalltalk.HLPackagesListWidget)})},
  3294. args: ["aPackage"],
  3295. source: "selectItem: aPackage\x0a\x09self model selectedPackage: aPackage",
  3296. messageSends: ["selectedPackage:", "model"],
  3297. referencedClasses: []
  3298. }),
  3299. smalltalk.HLPackagesListWidget);
  3300. smalltalk.addClass('HLProtocolsListWidget', smalltalk.HLToolListWidget, [], 'Helios-Browser');
  3301. smalltalk.HLProtocolsListWidget.comment="I render a list of protocols for the selected class.";
  3302. smalltalk.addMethod(
  3303. smalltalk.method({
  3304. selector: "allProtocol",
  3305. category: 'accessing',
  3306. fn: function (){
  3307. var self=this;
  3308. return smalltalk.withContext(function($ctx1) {
  3309. var $1;
  3310. $1=_st(self._model())._allProtocol();
  3311. return $1;
  3312. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{},smalltalk.HLProtocolsListWidget)})},
  3313. args: [],
  3314. source: "allProtocol\x0a\x09^ self model allProtocol",
  3315. messageSends: ["allProtocol", "model"],
  3316. referencedClasses: []
  3317. }),
  3318. smalltalk.HLProtocolsListWidget);
  3319. smalltalk.addMethod(
  3320. smalltalk.method({
  3321. selector: "cssClassForItem:",
  3322. category: 'accessing',
  3323. fn: function (anItem){
  3324. var self=this;
  3325. return smalltalk.withContext(function($ctx1) {
  3326. var $2,$1,$4,$3,$6,$5,$8,$7;
  3327. $2=_st(anItem).__eq(self._allProtocol());
  3328. $ctx1.sendIdx["="]=1;
  3329. if(smalltalk.assert($2)){
  3330. return "";
  3331. };
  3332. $4=_st(anItem).__eq("private");
  3333. $ctx1.sendIdx["="]=2;
  3334. if(smalltalk.assert($4)){
  3335. return "private";
  3336. };
  3337. $6=_st(anItem).__eq("initialization");
  3338. if(smalltalk.assert($6)){
  3339. return "initialization";
  3340. };
  3341. $8=_st(anItem)._match_("^\x5c*");
  3342. if(smalltalk.assert($8)){
  3343. return "extension";
  3344. };
  3345. return "";
  3346. }, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{anItem:anItem},smalltalk.HLProtocolsListWidget)})},
  3347. args: ["anItem"],
  3348. 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^ ''",
  3349. messageSends: ["ifTrue:", "=", "allProtocol", "match:"],
  3350. referencedClasses: []
  3351. }),
  3352. smalltalk.HLProtocolsListWidget);
  3353. smalltalk.addMethod(
  3354. smalltalk.method({
  3355. selector: "label",
  3356. category: 'accessing',
  3357. fn: function (){
  3358. var self=this;
  3359. return smalltalk.withContext(function($ctx1) {
  3360. return "Protocols";
  3361. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLProtocolsListWidget)})},
  3362. args: [],
  3363. source: "label\x0a\x09^ 'Protocols'",
  3364. messageSends: [],
  3365. referencedClasses: []
  3366. }),
  3367. smalltalk.HLProtocolsListWidget);
  3368. smalltalk.addMethod(
  3369. smalltalk.method({
  3370. selector: "observeModel",
  3371. category: 'actions',
  3372. fn: function (){
  3373. var self=this;
  3374. function $HLClassSelected(){return smalltalk.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
  3375. function $HLShowInstanceToggled(){return smalltalk.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
  3376. function $HLProtocolSelected(){return smalltalk.HLProtocolSelected||(typeof HLProtocolSelected=="undefined"?nil:HLProtocolSelected)}
  3377. function $HLProtocolsFocusRequested(){return smalltalk.HLProtocolsFocusRequested||(typeof HLProtocolsFocusRequested=="undefined"?nil:HLProtocolsFocusRequested)}
  3378. return smalltalk.withContext(function($ctx1) {
  3379. var $1,$2;
  3380. $1=_st(self._model())._announcer();
  3381. _st($1)._on_send_to_($HLClassSelected(),"onClassSelected:",self);
  3382. $ctx1.sendIdx["on:send:to:"]=1;
  3383. _st($1)._on_send_to_($HLShowInstanceToggled(),"onClassSelected:",self);
  3384. $ctx1.sendIdx["on:send:to:"]=2;
  3385. _st($1)._on_send_to_($HLProtocolSelected(),"onProtocolSelected:",self);
  3386. $ctx1.sendIdx["on:send:to:"]=3;
  3387. $2=_st($1)._on_send_to_($HLProtocolsFocusRequested(),"onProtocolsFocusRequested",self);
  3388. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLProtocolsListWidget)})},
  3389. args: [],
  3390. 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",
  3391. messageSends: ["on:send:to:", "announcer", "model"],
  3392. referencedClasses: ["HLClassSelected", "HLShowInstanceToggled", "HLProtocolSelected", "HLProtocolsFocusRequested"]
  3393. }),
  3394. smalltalk.HLProtocolsListWidget);
  3395. smalltalk.addMethod(
  3396. smalltalk.method({
  3397. selector: "observeSystem",
  3398. category: 'actions',
  3399. fn: function (){
  3400. var self=this;
  3401. function $ProtocolAdded(){return smalltalk.ProtocolAdded||(typeof ProtocolAdded=="undefined"?nil:ProtocolAdded)}
  3402. function $ProtocolRemoved(){return smalltalk.ProtocolRemoved||(typeof ProtocolRemoved=="undefined"?nil:ProtocolRemoved)}
  3403. return smalltalk.withContext(function($ctx1) {
  3404. var $1,$2;
  3405. $1=_st(self._model())._systemAnnouncer();
  3406. _st($1)._on_send_to_($ProtocolAdded(),"onProtocolAdded:",self);
  3407. $ctx1.sendIdx["on:send:to:"]=1;
  3408. $2=_st($1)._on_send_to_($ProtocolRemoved(),"onProtocolRemoved:",self);
  3409. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLProtocolsListWidget)})},
  3410. args: [],
  3411. 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",
  3412. messageSends: ["on:send:to:", "systemAnnouncer", "model"],
  3413. referencedClasses: ["ProtocolAdded", "ProtocolRemoved"]
  3414. }),
  3415. smalltalk.HLProtocolsListWidget);
  3416. smalltalk.addMethod(
  3417. smalltalk.method({
  3418. selector: "onClassSelected:",
  3419. category: 'reactions',
  3420. fn: function (anAnnouncement){
  3421. var self=this;
  3422. return smalltalk.withContext(function($ctx1) {
  3423. self._selectedItem_(nil);
  3424. self._setItemsForSelectedClass();
  3425. self._refresh();
  3426. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{anAnnouncement:anAnnouncement},smalltalk.HLProtocolsListWidget)})},
  3427. args: ["anAnnouncement"],
  3428. source: "onClassSelected: anAnnouncement\x0a self selectedItem: nil.\x0a \x0a self setItemsForSelectedClass.\x0a self refresh",
  3429. messageSends: ["selectedItem:", "setItemsForSelectedClass", "refresh"],
  3430. referencedClasses: []
  3431. }),
  3432. smalltalk.HLProtocolsListWidget);
  3433. smalltalk.addMethod(
  3434. smalltalk.method({
  3435. selector: "onProtocolAdded:",
  3436. category: 'reactions',
  3437. fn: function (anAnnouncement){
  3438. var self=this;
  3439. var class_;
  3440. return smalltalk.withContext(function($ctx1) {
  3441. var $1;
  3442. class_=_st(anAnnouncement)._theClass();
  3443. $1=_st(class_).__eq(_st(self._model())._selectedClass());
  3444. if(! smalltalk.assert($1)){
  3445. return self;
  3446. };
  3447. self._setItemsForSelectedClass();
  3448. self._refresh();
  3449. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolAdded:",{anAnnouncement:anAnnouncement,class_:class_},smalltalk.HLProtocolsListWidget)})},
  3450. args: ["anAnnouncement"],
  3451. 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",
  3452. messageSends: ["theClass", "ifFalse:", "=", "selectedClass", "model", "setItemsForSelectedClass", "refresh"],
  3453. referencedClasses: []
  3454. }),
  3455. smalltalk.HLProtocolsListWidget);
  3456. smalltalk.addMethod(
  3457. smalltalk.method({
  3458. selector: "onProtocolRemoved:",
  3459. category: 'reactions',
  3460. fn: function (anAnnouncement){
  3461. var self=this;
  3462. var class_,protocol;
  3463. return smalltalk.withContext(function($ctx1) {
  3464. var $2,$4,$3,$1,$7,$6,$5,$8;
  3465. class_=_st(anAnnouncement)._theClass();
  3466. protocol=_st(anAnnouncement)._protocol();
  3467. $2=class_;
  3468. $4=self._model();
  3469. $ctx1.sendIdx["model"]=1;
  3470. $3=_st($4)._selectedClass();
  3471. $1=_st($2).__eq($3);
  3472. $ctx1.sendIdx["="]=1;
  3473. if(! smalltalk.assert($1)){
  3474. return self;
  3475. };
  3476. $7=self._model();
  3477. $6=_st($7)._selectedProtocol();
  3478. $5=_st($6).__eq(protocol);
  3479. if(smalltalk.assert($5)){
  3480. self._selectedItem_(nil);
  3481. $8=self._selectItem_(nil);
  3482. $8;
  3483. };
  3484. self._setItemsForSelectedClass();
  3485. self._refresh();
  3486. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolRemoved:",{anAnnouncement:anAnnouncement,class_:class_,protocol:protocol},smalltalk.HLProtocolsListWidget)})},
  3487. args: ["anAnnouncement"],
  3488. 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",
  3489. messageSends: ["theClass", "protocol", "ifFalse:", "=", "selectedClass", "model", "ifTrue:", "selectedProtocol", "selectedItem:", "selectItem:", "setItemsForSelectedClass", "refresh"],
  3490. referencedClasses: []
  3491. }),
  3492. smalltalk.HLProtocolsListWidget);
  3493. smalltalk.addMethod(
  3494. smalltalk.method({
  3495. selector: "onProtocolSelected:",
  3496. category: 'reactions',
  3497. fn: function (anAnnouncement){
  3498. var self=this;
  3499. var protocol;
  3500. return smalltalk.withContext(function($ctx1) {
  3501. var $1,$2,$3;
  3502. protocol=_st(anAnnouncement)._item();
  3503. self._selectedItem_(protocol);
  3504. $1=protocol;
  3505. if(($receiver = $1) == nil || $receiver == null){
  3506. return self;
  3507. } else {
  3508. $1;
  3509. };
  3510. $2=self._hasFocus();
  3511. if(! smalltalk.assert($2)){
  3512. self._activateItem_(protocol);
  3513. $3=self._focus();
  3514. $3;
  3515. };
  3516. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{anAnnouncement:anAnnouncement,protocol:protocol},smalltalk.HLProtocolsListWidget)})},
  3517. args: ["anAnnouncement"],
  3518. 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 ]",
  3519. messageSends: ["item", "selectedItem:", "ifNil:", "ifFalse:", "hasFocus", "activateItem:", "focus"],
  3520. referencedClasses: []
  3521. }),
  3522. smalltalk.HLProtocolsListWidget);
  3523. smalltalk.addMethod(
  3524. smalltalk.method({
  3525. selector: "onProtocolsFocusRequested",
  3526. category: 'reactions',
  3527. fn: function (){
  3528. var self=this;
  3529. return smalltalk.withContext(function($ctx1) {
  3530. self._focus();
  3531. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolsFocusRequested",{},smalltalk.HLProtocolsListWidget)})},
  3532. args: [],
  3533. source: "onProtocolsFocusRequested\x0a\x09self focus",
  3534. messageSends: ["focus"],
  3535. referencedClasses: []
  3536. }),
  3537. smalltalk.HLProtocolsListWidget);
  3538. smalltalk.addMethod(
  3539. smalltalk.method({
  3540. selector: "renderContentOn:",
  3541. category: 'rendering',
  3542. fn: function (html){
  3543. var self=this;
  3544. return smalltalk.withContext(function($ctx1) {
  3545. var $1,$2,$3;
  3546. $1=_st(self._model())._showInstance();
  3547. if(smalltalk.assert($1)){
  3548. smalltalk.HLProtocolsListWidget.superclass.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  3549. } else {
  3550. $2=_st(html)._div();
  3551. _st($2)._class_("class_side");
  3552. $3=_st($2)._with_((function(){
  3553. return smalltalk.withContext(function($ctx2) {
  3554. return smalltalk.HLProtocolsListWidget.superclass.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  3555. $ctx2.sendIdx["renderContentOn:"]=1;
  3556. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  3557. $3;
  3558. };
  3559. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLProtocolsListWidget)})},
  3560. args: ["html"],
  3561. 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 ]",
  3562. messageSends: ["ifFalse:ifTrue:", "showInstance", "model", "class:", "div", "with:", "renderContentOn:"],
  3563. referencedClasses: []
  3564. }),
  3565. smalltalk.HLProtocolsListWidget);
  3566. smalltalk.addMethod(
  3567. smalltalk.method({
  3568. selector: "selectItem:",
  3569. category: 'actions',
  3570. fn: function (aString){
  3571. var self=this;
  3572. return smalltalk.withContext(function($ctx1) {
  3573. _st(self._model())._selectedProtocol_(aString);
  3574. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aString:aString},smalltalk.HLProtocolsListWidget)})},
  3575. args: ["aString"],
  3576. source: "selectItem: aString\x0a self model selectedProtocol: aString",
  3577. messageSends: ["selectedProtocol:", "model"],
  3578. referencedClasses: []
  3579. }),
  3580. smalltalk.HLProtocolsListWidget);
  3581. smalltalk.addMethod(
  3582. smalltalk.method({
  3583. selector: "selectedItem",
  3584. category: 'accessing',
  3585. fn: function (){
  3586. var self=this;
  3587. return smalltalk.withContext(function($ctx1) {
  3588. var $1;
  3589. $1=smalltalk.HLProtocolsListWidget.superclass.fn.prototype._selectedItem.apply(_st(self), []);
  3590. return $1;
  3591. }, function($ctx1) {$ctx1.fill(self,"selectedItem",{},smalltalk.HLProtocolsListWidget)})},
  3592. args: [],
  3593. source: "selectedItem\x0a\x09^ super selectedItem\x22 ifNil: [ self allProtocol ]\x22",
  3594. messageSends: ["selectedItem"],
  3595. referencedClasses: []
  3596. }),
  3597. smalltalk.HLProtocolsListWidget);
  3598. smalltalk.addMethod(
  3599. smalltalk.method({
  3600. selector: "setItemsForClass:",
  3601. category: 'private',
  3602. fn: function (aClass){
  3603. var self=this;
  3604. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  3605. return smalltalk.withContext(function($ctx1) {
  3606. var $2,$3,$4,$6,$7,$5,$8,$1;
  3607. $2=aClass;
  3608. if(($receiver = $2) == nil || $receiver == null){
  3609. $3=$Array();
  3610. $4=self._allProtocol();
  3611. $ctx1.sendIdx["allProtocol"]=1;
  3612. $1=_st($3)._with_($4);
  3613. $ctx1.sendIdx["with:"]=1;
  3614. } else {
  3615. $6=$Array();
  3616. $7=self._allProtocol();
  3617. $5=_st($6)._with_($7);
  3618. _st($5)._addAll_(_st(aClass)._protocols());
  3619. $8=_st($5)._yourself();
  3620. $1=$8;
  3621. };
  3622. self._items_($1);
  3623. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForClass:",{aClass:aClass},smalltalk.HLProtocolsListWidget)})},
  3624. args: ["aClass"],
  3625. 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 ])",
  3626. messageSends: ["items:", "ifNil:ifNotNil:", "with:", "allProtocol", "addAll:", "protocols", "yourself"],
  3627. referencedClasses: ["Array"]
  3628. }),
  3629. smalltalk.HLProtocolsListWidget);
  3630. smalltalk.addMethod(
  3631. smalltalk.method({
  3632. selector: "setItemsForSelectedClass",
  3633. category: 'private',
  3634. fn: function (){
  3635. var self=this;
  3636. return smalltalk.withContext(function($ctx1) {
  3637. self._setItemsForClass_(_st(self._model())._selectedClass());
  3638. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedClass",{},smalltalk.HLProtocolsListWidget)})},
  3639. args: [],
  3640. source: "setItemsForSelectedClass\x0a\x09self setItemsForClass: self model selectedClass",
  3641. messageSends: ["setItemsForClass:", "selectedClass", "model"],
  3642. referencedClasses: []
  3643. }),
  3644. smalltalk.HLProtocolsListWidget);
  3645. smalltalk.addClass('HLSelectorsCache', smalltalk.Object, ['classesCache'], 'Helios-Browser');
  3646. smalltalk.addMethod(
  3647. smalltalk.method({
  3648. selector: "cacheFor:",
  3649. category: 'accessing',
  3650. fn: function (aClass){
  3651. var self=this;
  3652. return smalltalk.withContext(function($ctx1) {
  3653. var $1,$2;
  3654. $1=aClass;
  3655. if(($receiver = $1) == nil || $receiver == null){
  3656. return nil;
  3657. } else {
  3658. $1;
  3659. };
  3660. $2=_st(self._classesCache())._at_ifAbsentPut_(_st(aClass)._name(),(function(){
  3661. return smalltalk.withContext(function($ctx2) {
  3662. return self._newCacheFor_(aClass);
  3663. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  3664. return $2;
  3665. }, function($ctx1) {$ctx1.fill(self,"cacheFor:",{aClass:aClass},smalltalk.HLSelectorsCache)})},
  3666. args: ["aClass"],
  3667. source: "cacheFor: aClass\x0a\x09aClass ifNil: [ ^ nil ].\x0a \x0a\x09^ self classesCache\x0a \x09at: aClass name\x0a ifAbsentPut: [ self newCacheFor: aClass ]",
  3668. messageSends: ["ifNil:", "at:ifAbsentPut:", "classesCache", "name", "newCacheFor:"],
  3669. referencedClasses: []
  3670. }),
  3671. smalltalk.HLSelectorsCache);
  3672. smalltalk.addMethod(
  3673. smalltalk.method({
  3674. selector: "classesCache",
  3675. category: 'accessing',
  3676. fn: function (){
  3677. var self=this;
  3678. function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  3679. return smalltalk.withContext(function($ctx1) {
  3680. var $2,$1;
  3681. $2=self["@classesCache"];
  3682. if(($receiver = $2) == nil || $receiver == null){
  3683. self["@classesCache"]=_st($HashedCollection())._new();
  3684. $1=self["@classesCache"];
  3685. } else {
  3686. $1=$2;
  3687. };
  3688. return $1;
  3689. }, function($ctx1) {$ctx1.fill(self,"classesCache",{},smalltalk.HLSelectorsCache)})},
  3690. args: [],
  3691. source: "classesCache\x0a\x09^ classesCache ifNil: [ classesCache := HashedCollection new ]",
  3692. messageSends: ["ifNil:", "new"],
  3693. referencedClasses: ["HashedCollection"]
  3694. }),
  3695. smalltalk.HLSelectorsCache);
  3696. smalltalk.addMethod(
  3697. smalltalk.method({
  3698. selector: "initialize",
  3699. category: 'initialization',
  3700. fn: function (){
  3701. var self=this;
  3702. return smalltalk.withContext(function($ctx1) {
  3703. smalltalk.HLSelectorsCache.superclass.fn.prototype._initialize.apply(_st(self), []);
  3704. self._observeSystem();
  3705. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLSelectorsCache)})},
  3706. args: [],
  3707. source: "initialize\x0a\x09super initialize.\x0a self observeSystem",
  3708. messageSends: ["initialize", "observeSystem"],
  3709. referencedClasses: []
  3710. }),
  3711. smalltalk.HLSelectorsCache);
  3712. smalltalk.addMethod(
  3713. smalltalk.method({
  3714. selector: "invalidateCacheFor:",
  3715. category: 'private',
  3716. fn: function (aMethod){
  3717. var self=this;
  3718. return smalltalk.withContext(function($ctx1) {
  3719. _st(self._cacheFor_(_st(aMethod)._methodClass()))._invalidateSelector_(_st(aMethod)._selector());
  3720. return self}, function($ctx1) {$ctx1.fill(self,"invalidateCacheFor:",{aMethod:aMethod},smalltalk.HLSelectorsCache)})},
  3721. args: ["aMethod"],
  3722. source: "invalidateCacheFor: aMethod\x0a\x09(self cacheFor: aMethod methodClass)\x0a \x09invalidateSelector: aMethod selector",
  3723. messageSends: ["invalidateSelector:", "cacheFor:", "methodClass", "selector"],
  3724. referencedClasses: []
  3725. }),
  3726. smalltalk.HLSelectorsCache);
  3727. smalltalk.addMethod(
  3728. smalltalk.method({
  3729. selector: "isOverridden:",
  3730. category: 'testing',
  3731. fn: function (aMethod){
  3732. var self=this;
  3733. return smalltalk.withContext(function($ctx1) {
  3734. var $1;
  3735. $1=_st(self._cacheFor_(_st(aMethod)._methodClass()))._isOverridden_(aMethod);
  3736. return $1;
  3737. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod},smalltalk.HLSelectorsCache)})},
  3738. args: ["aMethod"],
  3739. source: "isOverridden: aMethod\x0a\x09^ (self cacheFor: aMethod methodClass)\x0a \x09isOverridden: aMethod",
  3740. messageSends: ["isOverridden:", "cacheFor:", "methodClass"],
  3741. referencedClasses: []
  3742. }),
  3743. smalltalk.HLSelectorsCache);
  3744. smalltalk.addMethod(
  3745. smalltalk.method({
  3746. selector: "isOverride:",
  3747. category: 'testing',
  3748. fn: function (aMethod){
  3749. var self=this;
  3750. return smalltalk.withContext(function($ctx1) {
  3751. var $1;
  3752. $1=_st(self._cacheFor_(_st(aMethod)._methodClass()))._isOverride_(aMethod);
  3753. return $1;
  3754. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod},smalltalk.HLSelectorsCache)})},
  3755. args: ["aMethod"],
  3756. source: "isOverride: aMethod\x0a\x09^ (self cacheFor: aMethod methodClass)\x0a \x09isOverride: aMethod",
  3757. messageSends: ["isOverride:", "cacheFor:", "methodClass"],
  3758. referencedClasses: []
  3759. }),
  3760. smalltalk.HLSelectorsCache);
  3761. smalltalk.addMethod(
  3762. smalltalk.method({
  3763. selector: "newCacheFor:",
  3764. category: 'factory',
  3765. fn: function (aClass){
  3766. var self=this;
  3767. function $HLClassCache(){return smalltalk.HLClassCache||(typeof HLClassCache=="undefined"?nil:HLClassCache)}
  3768. return smalltalk.withContext(function($ctx1) {
  3769. var $1;
  3770. $1=_st($HLClassCache())._on_selectorsCache_(aClass,self);
  3771. return $1;
  3772. }, function($ctx1) {$ctx1.fill(self,"newCacheFor:",{aClass:aClass},smalltalk.HLSelectorsCache)})},
  3773. args: ["aClass"],
  3774. source: "newCacheFor: aClass\x0a\x09^ HLClassCache \x0a \x09on: aClass\x0a selectorsCache: self",
  3775. messageSends: ["on:selectorsCache:"],
  3776. referencedClasses: ["HLClassCache"]
  3777. }),
  3778. smalltalk.HLSelectorsCache);
  3779. smalltalk.addMethod(
  3780. smalltalk.method({
  3781. selector: "observeSystem",
  3782. category: 'actions',
  3783. fn: function (){
  3784. var self=this;
  3785. function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
  3786. function $MethodAdded(){return smalltalk.MethodAdded||(typeof MethodAdded=="undefined"?nil:MethodAdded)}
  3787. function $MethodRemoved(){return smalltalk.MethodRemoved||(typeof MethodRemoved=="undefined"?nil:MethodRemoved)}
  3788. return smalltalk.withContext(function($ctx1) {
  3789. var $1,$2;
  3790. $1=_st($SystemAnnouncer())._current();
  3791. _st($1)._on_send_to_($MethodAdded(),"onMethodAdded:",self);
  3792. $ctx1.sendIdx["on:send:to:"]=1;
  3793. $2=_st($1)._on_send_to_($MethodRemoved(),"onMethodRemoved:",self);
  3794. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLSelectorsCache)})},
  3795. args: [],
  3796. 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",
  3797. messageSends: ["on:send:to:", "current"],
  3798. referencedClasses: ["SystemAnnouncer", "MethodAdded", "MethodRemoved"]
  3799. }),
  3800. smalltalk.HLSelectorsCache);
  3801. smalltalk.addMethod(
  3802. smalltalk.method({
  3803. selector: "onMethodAdded:",
  3804. category: 'reactions',
  3805. fn: function (anAnnouncement){
  3806. var self=this;
  3807. return smalltalk.withContext(function($ctx1) {
  3808. self._invalidateCacheFor_(_st(anAnnouncement)._method());
  3809. return self}, function($ctx1) {$ctx1.fill(self,"onMethodAdded:",{anAnnouncement:anAnnouncement},smalltalk.HLSelectorsCache)})},
  3810. args: ["anAnnouncement"],
  3811. source: "onMethodAdded: anAnnouncement\x0a\x09self invalidateCacheFor: anAnnouncement method",
  3812. messageSends: ["invalidateCacheFor:", "method"],
  3813. referencedClasses: []
  3814. }),
  3815. smalltalk.HLSelectorsCache);
  3816. smalltalk.addMethod(
  3817. smalltalk.method({
  3818. selector: "onMethodRemoved:",
  3819. category: 'reactions',
  3820. fn: function (anAnnouncement){
  3821. var self=this;
  3822. return smalltalk.withContext(function($ctx1) {
  3823. self._invalidateCacheFor_(_st(anAnnouncement)._method());
  3824. return self}, function($ctx1) {$ctx1.fill(self,"onMethodRemoved:",{anAnnouncement:anAnnouncement},smalltalk.HLSelectorsCache)})},
  3825. args: ["anAnnouncement"],
  3826. source: "onMethodRemoved: anAnnouncement\x0a\x09self invalidateCacheFor: anAnnouncement method",
  3827. messageSends: ["invalidateCacheFor:", "method"],
  3828. referencedClasses: []
  3829. }),
  3830. smalltalk.HLSelectorsCache);
  3831. smalltalk.HLSelectorsCache.klass.iVarNames = ['current'];
  3832. smalltalk.addMethod(
  3833. smalltalk.method({
  3834. selector: "current",
  3835. category: 'accessing',
  3836. fn: function (){
  3837. var self=this;
  3838. return smalltalk.withContext(function($ctx1) {
  3839. var $2,$1;
  3840. $2=self["@current"];
  3841. if(($receiver = $2) == nil || $receiver == null){
  3842. self["@current"]=smalltalk.HLSelectorsCache.klass.superclass.fn.prototype._new.apply(_st(self), []);
  3843. $1=self["@current"];
  3844. } else {
  3845. $1=$2;
  3846. };
  3847. return $1;
  3848. }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.HLSelectorsCache.klass)})},
  3849. args: [],
  3850. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  3851. messageSends: ["ifNil:", "new"],
  3852. referencedClasses: []
  3853. }),
  3854. smalltalk.HLSelectorsCache.klass);
  3855. smalltalk.addMethod(
  3856. smalltalk.method({
  3857. selector: "flush",
  3858. category: 'accessing',
  3859. fn: function (){
  3860. var self=this;
  3861. return smalltalk.withContext(function($ctx1) {
  3862. self["@current"]=nil;
  3863. return self}, function($ctx1) {$ctx1.fill(self,"flush",{},smalltalk.HLSelectorsCache.klass)})},
  3864. args: [],
  3865. source: "flush\x0a\x09current := nil",
  3866. messageSends: [],
  3867. referencedClasses: []
  3868. }),
  3869. smalltalk.HLSelectorsCache.klass);
  3870. smalltalk.addMethod(
  3871. smalltalk.method({
  3872. selector: "new",
  3873. category: 'instance creation',
  3874. fn: function (){
  3875. var self=this;
  3876. return smalltalk.withContext(function($ctx1) {
  3877. self._shouldNotImplement();
  3878. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.HLSelectorsCache.klass)})},
  3879. args: [],
  3880. source: "new\x0a\x09self shouldNotImplement",
  3881. messageSends: ["shouldNotImplement"],
  3882. referencedClasses: []
  3883. }),
  3884. smalltalk.HLSelectorsCache.klass);
  3885. });