Helios-Browser.js 153 KB

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