Helios-Browser.js 151 KB

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