Helios-Browser.js 149 KB

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