Helios-Browser.js 124 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255
  1. smalltalk.addPackage('Helios-Browser');
  2. smalltalk.addClass('HLBrowser', smalltalk.HLWidget, ['model', 'packagesListWidget', 'classesListWidget', 'protocolsListWidget', 'methodsListWidget', 'sourceWidget'], 'Helios-Browser');
  3. smalltalk.addMethod(
  4. "_announcer",
  5. smalltalk.method({
  6. selector: "announcer",
  7. category: 'accessing',
  8. fn: function (){
  9. var self=this;
  10. return smalltalk.withContext(function($ctx1) { var $1;
  11. $1=_st(_st(self)._model())._announcer();
  12. return $1;
  13. }, function($ctx1) {$ctx1.fill(self,"announcer",{}, smalltalk.HLBrowser)})},
  14. args: [],
  15. source: "announcer\x0a\x09^ self model announcer",
  16. messageSends: ["announcer", "model"],
  17. referencedClasses: []
  18. }),
  19. smalltalk.HLBrowser);
  20. smalltalk.addMethod(
  21. "_classesListWidget",
  22. smalltalk.method({
  23. selector: "classesListWidget",
  24. category: 'widgets',
  25. fn: function (){
  26. var self=this;
  27. return smalltalk.withContext(function($ctx1) { var $2,$1;
  28. $2=self["@classesListWidget"];
  29. if(($receiver = $2) == nil || $receiver == undefined){
  30. self["@classesListWidget"]=_st((smalltalk.HLClassesListWidget || HLClassesListWidget))._on_(_st(self)._model());
  31. self["@classesListWidget"];
  32. $1=_st(self["@classesListWidget"])._next_(_st(self)._protocolsListWidget());
  33. } else {
  34. $1=$2;
  35. };
  36. return $1;
  37. }, function($ctx1) {$ctx1.fill(self,"classesListWidget",{}, smalltalk.HLBrowser)})},
  38. args: [],
  39. source: "classesListWidget\x0a\x09^ classesListWidget ifNil: [\x0a \x09classesListWidget := HLClassesListWidget on: self model.\x0a\x09\x09classesListWidget next: self protocolsListWidget ]",
  40. messageSends: ["ifNil:", "on:", "model", "next:", "protocolsListWidget"],
  41. referencedClasses: ["HLClassesListWidget"]
  42. }),
  43. smalltalk.HLBrowser);
  44. smalltalk.addMethod(
  45. "_environment",
  46. smalltalk.method({
  47. selector: "environment",
  48. category: 'accessing',
  49. fn: function (){
  50. var self=this;
  51. return smalltalk.withContext(function($ctx1) { var $1;
  52. $1=_st(_st(self)._model())._environment();
  53. return $1;
  54. }, function($ctx1) {$ctx1.fill(self,"environment",{}, smalltalk.HLBrowser)})},
  55. args: [],
  56. source: "environment\x0a\x09^ self model environment",
  57. messageSends: ["environment", "model"],
  58. referencedClasses: []
  59. }),
  60. smalltalk.HLBrowser);
  61. smalltalk.addMethod(
  62. "_methodsListWidget",
  63. smalltalk.method({
  64. selector: "methodsListWidget",
  65. category: 'widgets',
  66. fn: function (){
  67. var self=this;
  68. return smalltalk.withContext(function($ctx1) { var $2,$1;
  69. $2=self["@methodsListWidget"];
  70. if(($receiver = $2) == nil || $receiver == undefined){
  71. self["@methodsListWidget"]=_st((smalltalk.HLMethodsListWidget || HLMethodsListWidget))._on_(_st(self)._model());
  72. $1=self["@methodsListWidget"];
  73. } else {
  74. $1=$2;
  75. };
  76. return $1;
  77. }, function($ctx1) {$ctx1.fill(self,"methodsListWidget",{}, smalltalk.HLBrowser)})},
  78. args: [],
  79. source: "methodsListWidget\x0a\x09^ methodsListWidget ifNil: [\x0a \x09methodsListWidget := HLMethodsListWidget on: self model ]",
  80. messageSends: ["ifNil:", "on:", "model"],
  81. referencedClasses: ["HLMethodsListWidget"]
  82. }),
  83. smalltalk.HLBrowser);
  84. smalltalk.addMethod(
  85. "_model",
  86. smalltalk.method({
  87. selector: "model",
  88. category: 'accessing',
  89. fn: function (){
  90. var self=this;
  91. return smalltalk.withContext(function($ctx1) { var $2,$1;
  92. $2=self["@model"];
  93. if(($receiver = $2) == nil || $receiver == undefined){
  94. self["@model"]=_st((smalltalk.HLBrowserModel || HLBrowserModel))._new();
  95. $1=self["@model"];
  96. } else {
  97. $1=$2;
  98. };
  99. return $1;
  100. }, function($ctx1) {$ctx1.fill(self,"model",{}, smalltalk.HLBrowser)})},
  101. args: [],
  102. source: "model\x0a\x09^ model ifNil: [ model := HLBrowserModel new ]",
  103. messageSends: ["ifNil:", "new"],
  104. referencedClasses: ["HLBrowserModel"]
  105. }),
  106. smalltalk.HLBrowser);
  107. smalltalk.addMethod(
  108. "_model_",
  109. smalltalk.method({
  110. selector: "model:",
  111. category: 'accessing',
  112. fn: function (aModel){
  113. var self=this;
  114. return smalltalk.withContext(function($ctx1) { self["@model"]=aModel;
  115. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel}, smalltalk.HLBrowser)})},
  116. args: ["aModel"],
  117. source: "model: aModel\x0a\x09model := aModel",
  118. messageSends: [],
  119. referencedClasses: []
  120. }),
  121. smalltalk.HLBrowser);
  122. smalltalk.addMethod(
  123. "_packagesListWidget",
  124. smalltalk.method({
  125. selector: "packagesListWidget",
  126. category: 'widgets',
  127. fn: function (){
  128. var self=this;
  129. return smalltalk.withContext(function($ctx1) { var $2,$1;
  130. $2=self["@packagesListWidget"];
  131. if(($receiver = $2) == nil || $receiver == undefined){
  132. self["@packagesListWidget"]=_st((smalltalk.HLPackagesListWidget || HLPackagesListWidget))._on_(_st(self)._model());
  133. self["@packagesListWidget"];
  134. $1=_st(self["@packagesListWidget"])._next_(_st(self)._classesListWidget());
  135. } else {
  136. $1=$2;
  137. };
  138. return $1;
  139. }, function($ctx1) {$ctx1.fill(self,"packagesListWidget",{}, smalltalk.HLBrowser)})},
  140. args: [],
  141. source: "packagesListWidget\x0a\x09^ packagesListWidget ifNil: [\x0a \x09packagesListWidget := HLPackagesListWidget on: self model.\x0a\x09\x09packagesListWidget next: self classesListWidget ]",
  142. messageSends: ["ifNil:", "on:", "model", "next:", "classesListWidget"],
  143. referencedClasses: ["HLPackagesListWidget"]
  144. }),
  145. smalltalk.HLBrowser);
  146. smalltalk.addMethod(
  147. "_protocolsListWidget",
  148. smalltalk.method({
  149. selector: "protocolsListWidget",
  150. category: 'widgets',
  151. fn: function (){
  152. var self=this;
  153. return smalltalk.withContext(function($ctx1) { var $2,$1;
  154. $2=self["@protocolsListWidget"];
  155. if(($receiver = $2) == nil || $receiver == undefined){
  156. self["@protocolsListWidget"]=_st((smalltalk.HLProtocolsListWidget || HLProtocolsListWidget))._on_(_st(self)._model());
  157. self["@protocolsListWidget"];
  158. $1=_st(self["@protocolsListWidget"])._next_(_st(self)._methodsListWidget());
  159. } else {
  160. $1=$2;
  161. };
  162. return $1;
  163. }, function($ctx1) {$ctx1.fill(self,"protocolsListWidget",{}, smalltalk.HLBrowser)})},
  164. args: [],
  165. source: "protocolsListWidget\x0a\x09^ protocolsListWidget ifNil: [\x0a \x09protocolsListWidget := HLProtocolsListWidget on: self model.\x0a\x09\x09protocolsListWidget next: self methodsListWidget ]",
  166. messageSends: ["ifNil:", "on:", "model", "next:", "methodsListWidget"],
  167. referencedClasses: ["HLProtocolsListWidget"]
  168. }),
  169. smalltalk.HLBrowser);
  170. smalltalk.addMethod(
  171. "_registerBindingsOn_",
  172. smalltalk.method({
  173. selector: "registerBindingsOn:",
  174. category: 'keybindings',
  175. fn: function (aBindingGroup){
  176. var self=this;
  177. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  178. $1=aBindingGroup;
  179. _st($1)._addGroupKey_labelled_((66),"Browse");
  180. _st($1)._addGroupKey_labelled_((71),"Go to");
  181. $2=_st($1)._addGroupKey_labelled_((84),"Toggle");
  182. _st(_st((smalltalk.HLBrowserCommand || HLBrowserCommand))._withAllSubclasses())._do_((function(each){
  183. return smalltalk.withContext(function($ctx2) { $3=_st(each)._key();
  184. if(($receiver = $3) == nil || $receiver == undefined){
  185. return $3;
  186. } else {
  187. return _st(_st(aBindingGroup)._at_(_st(each)._bindingGroup()))._add_(_st(_st(each)._on_(_st(self)._model()))._asBinding());
  188. };
  189. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  190. return self}, function($ctx1) {$ctx1.fill(self,"registerBindingsOn:",{aBindingGroup:aBindingGroup}, smalltalk.HLBrowser)})},
  191. args: ["aBindingGroup"],
  192. source: "registerBindingsOn: aBindingGroup\x0a\x09aBindingGroup \x0a \x09addGroupKey: 66 labelled: 'Browse';\x0a addGroupKey: 71 labelled: 'Go to';\x0a addGroupKey: 84 labelled: 'Toggle'.\x0a \x0a \x09HLBrowserCommand withAllSubclasses do: [ :each |\x0a \x09\x09each key ifNotNil: [\x0a \x09\x09\x09(aBindingGroup at: each bindingGroup) \x0a \x09\x09\x09\x09add: (each on: self model) asBinding ] ]",
  193. messageSends: ["addGroupKey:labelled:", "do:", "ifNotNil:", "add:", "asBinding", "on:", "model", "at:", "bindingGroup", "key", "withAllSubclasses"],
  194. referencedClasses: ["HLBrowserCommand"]
  195. }),
  196. smalltalk.HLBrowser);
  197. smalltalk.addMethod(
  198. "_renderContentOn_",
  199. smalltalk.method({
  200. selector: "renderContentOn:",
  201. category: 'rendering',
  202. fn: function (html){
  203. var self=this;
  204. return smalltalk.withContext(function($ctx1) { _st(html)._with_(_st((smalltalk.HLContainer || HLContainer))._with_(_st((smalltalk.HLHorizontalSplitter || HLHorizontalSplitter))._with_with_(_st((smalltalk.HLVerticalSplitter || HLVerticalSplitter))._with_with_(_st((smalltalk.HLVerticalSplitter || HLVerticalSplitter))._with_with_(_st(self)._packagesListWidget(),_st(self)._classesListWidget()),_st((smalltalk.HLVerticalSplitter || HLVerticalSplitter))._with_with_(_st(self)._protocolsListWidget(),_st(self)._methodsListWidget())),_st(self)._sourceWidget())));
  205. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLBrowser)})},
  206. args: ["html"],
  207. 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))",
  208. messageSends: ["with:", "with:with:", "packagesListWidget", "classesListWidget", "protocolsListWidget", "methodsListWidget", "sourceWidget"],
  209. referencedClasses: ["HLVerticalSplitter", "HLHorizontalSplitter", "HLContainer"]
  210. }),
  211. smalltalk.HLBrowser);
  212. smalltalk.addMethod(
  213. "_sourceWidget",
  214. smalltalk.method({
  215. selector: "sourceWidget",
  216. category: 'widgets',
  217. fn: function (){
  218. var self=this;
  219. return smalltalk.withContext(function($ctx1) { var $2,$1;
  220. $2=self["@sourceWidget"];
  221. if(($receiver = $2) == nil || $receiver == undefined){
  222. self["@sourceWidget"]=_st((smalltalk.HLBrowserSourceWidget || HLBrowserSourceWidget))._on_(_st(self)._model());
  223. $1=self["@sourceWidget"];
  224. } else {
  225. $1=$2;
  226. };
  227. return $1;
  228. }, function($ctx1) {$ctx1.fill(self,"sourceWidget",{}, smalltalk.HLBrowser)})},
  229. args: [],
  230. source: "sourceWidget\x0a\x09^ sourceWidget ifNil: [\x0a \x09sourceWidget := HLBrowserSourceWidget on: self model ]",
  231. messageSends: ["ifNil:", "on:", "model"],
  232. referencedClasses: ["HLBrowserSourceWidget"]
  233. }),
  234. smalltalk.HLBrowser);
  235. smalltalk.HLBrowser.klass.iVarNames = ['nextId'];
  236. smalltalk.addMethod(
  237. "_canBeOpenAsTab",
  238. smalltalk.method({
  239. selector: "canBeOpenAsTab",
  240. category: 'testing',
  241. fn: function (){
  242. var self=this;
  243. return smalltalk.withContext(function($ctx1) { return true;
  244. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{}, smalltalk.HLBrowser.klass)})},
  245. args: [],
  246. source: "canBeOpenAsTab\x0a\x09^ true",
  247. messageSends: [],
  248. referencedClasses: []
  249. }),
  250. smalltalk.HLBrowser.klass);
  251. smalltalk.addMethod(
  252. "_nextId",
  253. smalltalk.method({
  254. selector: "nextId",
  255. category: 'accessing',
  256. fn: function (){
  257. var self=this;
  258. return smalltalk.withContext(function($ctx1) { var $1,$2;
  259. $1=self["@nextId"];
  260. if(($receiver = $1) == nil || $receiver == undefined){
  261. self["@nextId"]=(0);
  262. self["@nextId"];
  263. } else {
  264. $1;
  265. };
  266. $2=_st("browser_").__comma(_st(_st(self["@nextId"]).__plus((1)))._asString());
  267. return $2;
  268. }, function($ctx1) {$ctx1.fill(self,"nextId",{}, smalltalk.HLBrowser.klass)})},
  269. args: [],
  270. source: "nextId\x0a\x09nextId ifNil: [ nextId := 0 ].\x0a ^ 'browser_', (nextId + 1) asString",
  271. messageSends: ["ifNil:", ",", "asString", "+"],
  272. referencedClasses: []
  273. }),
  274. smalltalk.HLBrowser.klass);
  275. smalltalk.addMethod(
  276. "_tabLabel",
  277. smalltalk.method({
  278. selector: "tabLabel",
  279. category: 'accessing',
  280. fn: function (){
  281. var self=this;
  282. return smalltalk.withContext(function($ctx1) { return "Browser";
  283. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{}, smalltalk.HLBrowser.klass)})},
  284. args: [],
  285. source: "tabLabel\x0a\x09^ 'Browser'",
  286. messageSends: [],
  287. referencedClasses: []
  288. }),
  289. smalltalk.HLBrowser.klass);
  290. smalltalk.addMethod(
  291. "_tabPriority",
  292. smalltalk.method({
  293. selector: "tabPriority",
  294. category: 'accessing',
  295. fn: function (){
  296. var self=this;
  297. return smalltalk.withContext(function($ctx1) { return (0);
  298. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{}, smalltalk.HLBrowser.klass)})},
  299. args: [],
  300. source: "tabPriority\x0a\x09^ 0",
  301. messageSends: [],
  302. referencedClasses: []
  303. }),
  304. smalltalk.HLBrowser.klass);
  305. smalltalk.addClass('HLBrowserListWidget', smalltalk.HLNavigationListWidget, ['model'], 'Helios-Browser');
  306. smalltalk.addMethod(
  307. "_initialize",
  308. smalltalk.method({
  309. selector: "initialize",
  310. category: 'initialization',
  311. fn: function (){
  312. var self=this;
  313. return smalltalk.withContext(function($ctx1) { smalltalk.HLNavigationListWidget.fn.prototype._initialize.apply(_st(self), []);
  314. _st(self)._observeSystem();
  315. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLBrowserListWidget)})},
  316. args: [],
  317. source: "initialize\x0a\x09super initialize.\x0a \x0a self observeSystem",
  318. messageSends: ["initialize", "observeSystem"],
  319. referencedClasses: []
  320. }),
  321. smalltalk.HLBrowserListWidget);
  322. smalltalk.addMethod(
  323. "_model",
  324. smalltalk.method({
  325. selector: "model",
  326. category: 'accessing',
  327. fn: function (){
  328. var self=this;
  329. return smalltalk.withContext(function($ctx1) { var $1;
  330. $1=self["@model"];
  331. return $1;
  332. }, function($ctx1) {$ctx1.fill(self,"model",{}, smalltalk.HLBrowserListWidget)})},
  333. args: [],
  334. source: "model\x0a\x09^ model",
  335. messageSends: [],
  336. referencedClasses: []
  337. }),
  338. smalltalk.HLBrowserListWidget);
  339. smalltalk.addMethod(
  340. "_model_",
  341. smalltalk.method({
  342. selector: "model:",
  343. category: 'accessing',
  344. fn: function (aBrowserModel){
  345. var self=this;
  346. return smalltalk.withContext(function($ctx1) { self["@model"]=aBrowserModel;
  347. _st(self)._observeModel();
  348. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel}, smalltalk.HLBrowserListWidget)})},
  349. args: ["aBrowserModel"],
  350. source: "model: aBrowserModel\x0a\x09model := aBrowserModel.\x0a \x0a self observeModel",
  351. messageSends: ["observeModel"],
  352. referencedClasses: []
  353. }),
  354. smalltalk.HLBrowserListWidget);
  355. smalltalk.addMethod(
  356. "_observeModel",
  357. smalltalk.method({
  358. selector: "observeModel",
  359. category: 'actions',
  360. fn: function (){
  361. var self=this;
  362. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLBrowserListWidget)})},
  363. args: [],
  364. source: "observeModel",
  365. messageSends: [],
  366. referencedClasses: []
  367. }),
  368. smalltalk.HLBrowserListWidget);
  369. smalltalk.addMethod(
  370. "_observeSystem",
  371. smalltalk.method({
  372. selector: "observeSystem",
  373. category: 'actions',
  374. fn: function (){
  375. var self=this;
  376. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLBrowserListWidget)})},
  377. args: [],
  378. source: "observeSystem",
  379. messageSends: [],
  380. referencedClasses: []
  381. }),
  382. smalltalk.HLBrowserListWidget);
  383. smalltalk.addMethod(
  384. "_on_",
  385. smalltalk.method({
  386. selector: "on:",
  387. category: 'instance creation',
  388. fn: function (aModel){
  389. var self=this;
  390. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  391. $2=_st(self)._new();
  392. _st($2)._model_(aModel);
  393. $3=_st($2)._yourself();
  394. $1=$3;
  395. return $1;
  396. }, function($ctx1) {$ctx1.fill(self,"on:",{aModel:aModel}, smalltalk.HLBrowserListWidget.klass)})},
  397. args: ["aModel"],
  398. source: "on: aModel\x0a\x09^ self new \x0a \x09model: aModel;\x0a yourself",
  399. messageSends: ["model:", "new", "yourself"],
  400. referencedClasses: []
  401. }),
  402. smalltalk.HLBrowserListWidget.klass);
  403. smalltalk.addClass('HLClassesListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  404. smalltalk.addMethod(
  405. "_focusMethodsListWidget",
  406. smalltalk.method({
  407. selector: "focusMethodsListWidget",
  408. category: 'actions',
  409. fn: function (){
  410. var self=this;
  411. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._announce_(_st((smalltalk.HLMethodsListFocus || HLMethodsListFocus))._new());
  412. return self}, function($ctx1) {$ctx1.fill(self,"focusMethodsListWidget",{}, smalltalk.HLClassesListWidget)})},
  413. args: [],
  414. source: "focusMethodsListWidget\x0a\x09self model announcer announce: HLMethodsListFocus new",
  415. messageSends: ["announce:", "new", "announcer", "model"],
  416. referencedClasses: ["HLMethodsListFocus"]
  417. }),
  418. smalltalk.HLClassesListWidget);
  419. smalltalk.addMethod(
  420. "_focusProtocolsListWidget",
  421. smalltalk.method({
  422. selector: "focusProtocolsListWidget",
  423. category: 'actions',
  424. fn: function (){
  425. var self=this;
  426. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._announce_(_st((smalltalk.HLProtocolsListFocus || HLProtocolsListFocus))._new());
  427. return self}, function($ctx1) {$ctx1.fill(self,"focusProtocolsListWidget",{}, smalltalk.HLClassesListWidget)})},
  428. args: [],
  429. source: "focusProtocolsListWidget\x0a\x09self model announcer announce: HLProtocolsListFocus new",
  430. messageSends: ["announce:", "new", "announcer", "model"],
  431. referencedClasses: ["HLProtocolsListFocus"]
  432. }),
  433. smalltalk.HLClassesListWidget);
  434. smalltalk.addMethod(
  435. "_getChildrenOf_",
  436. smalltalk.method({
  437. selector: "getChildrenOf:",
  438. category: 'accessing',
  439. fn: function (aClass){
  440. var self=this;
  441. return smalltalk.withContext(function($ctx1) { var $1;
  442. $1=_st(_st(self)._items())._select_((function(each){
  443. return smalltalk.withContext(function($ctx2) { return _st(_st(each)._superclass()).__eq(aClass);
  444. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  445. return $1;
  446. }, function($ctx1) {$ctx1.fill(self,"getChildrenOf:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  447. args: ["aClass"],
  448. source: "getChildrenOf: aClass\x0a\x09^ self items select: [ :each | each superclass = aClass ]",
  449. messageSends: ["select:", "=", "superclass", "items"],
  450. referencedClasses: []
  451. }),
  452. smalltalk.HLClassesListWidget);
  453. smalltalk.addMethod(
  454. "_getRootClassesOf_",
  455. smalltalk.method({
  456. selector: "getRootClassesOf:",
  457. category: 'accessing',
  458. fn: function (aCollection){
  459. var self=this;
  460. return smalltalk.withContext(function($ctx1) { var $1;
  461. $1=_st(aCollection)._select_((function(each){
  462. return smalltalk.withContext(function($ctx2) { return _st(_st(aCollection)._includes_(_st(each)._superclass()))._not();
  463. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  464. return $1;
  465. }, function($ctx1) {$ctx1.fill(self,"getRootClassesOf:",{aCollection:aCollection}, smalltalk.HLClassesListWidget)})},
  466. args: ["aCollection"],
  467. source: "getRootClassesOf: aCollection\x0a\x09^ aCollection select: [ :each |\x0a \x09\x09(aCollection includes: each superclass) not ]",
  468. messageSends: ["select:", "not", "includes:", "superclass"],
  469. referencedClasses: []
  470. }),
  471. smalltalk.HLClassesListWidget);
  472. smalltalk.addMethod(
  473. "_iconForItem_",
  474. smalltalk.method({
  475. selector: "iconForItem:",
  476. category: 'accessing',
  477. fn: function (aClass){
  478. var self=this;
  479. return smalltalk.withContext(function($ctx1) { var $2,$1;
  480. $2=_st(_st(_st(aClass)._theNonMetaClass())._comment())._isEmpty();
  481. if(smalltalk.assert($2)){
  482. $1="icon-question-sign";
  483. } else {
  484. $1="icon-none";
  485. };
  486. return $1;
  487. }, function($ctx1) {$ctx1.fill(self,"iconForItem:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  488. args: ["aClass"],
  489. source: "iconForItem: aClass\x0a\x09^ aClass theNonMetaClass comment isEmpty\x0a \x09ifFalse: [ 'icon-none' ]\x0a \x09ifTrue: [ 'icon-question-sign' ]",
  490. messageSends: ["ifFalse:ifTrue:", "isEmpty", "comment", "theNonMetaClass"],
  491. referencedClasses: []
  492. }),
  493. smalltalk.HLClassesListWidget);
  494. smalltalk.addMethod(
  495. "_observeModel",
  496. smalltalk.method({
  497. selector: "observeModel",
  498. category: 'actions',
  499. fn: function (){
  500. var self=this;
  501. return smalltalk.withContext(function($ctx1) { var $1,$2;
  502. $1=_st(_st(self)._model())._announcer();
  503. _st($1)._on_do_((smalltalk.HLPackageSelected || HLPackageSelected),(function(ann){
  504. return smalltalk.withContext(function($ctx2) { return _st(self)._onPackageSelected_(_st(ann)._item());
  505. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  506. _st($1)._on_do_((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled),(function(ann){
  507. return smalltalk.withContext(function($ctx2) { return _st(self)._onShowInstanceToggled();
  508. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  509. $2=_st($1)._on_do_((smalltalk.HLClassSelected || HLClassSelected),(function(ann){
  510. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(ann)._item());
  511. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  512. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLClassesListWidget)})},
  513. args: [],
  514. source: "observeModel\x0a\x09self model announcer \x0a \x09on: HLPackageSelected do: [ :ann | self onPackageSelected: ann item ];\x0a \x09on: HLShowInstanceToggled do: [ :ann | self onShowInstanceToggled ];\x0a\x09\x09on: HLClassSelected do: [ :ann | self onClassSelected: ann item ]",
  515. messageSends: ["on:do:", "onPackageSelected:", "item", "announcer", "model", "onShowInstanceToggled", "onClassSelected:"],
  516. referencedClasses: ["HLPackageSelected", "HLShowInstanceToggled", "HLClassSelected"]
  517. }),
  518. smalltalk.HLClassesListWidget);
  519. smalltalk.addMethod(
  520. "_observeSystem",
  521. smalltalk.method({
  522. selector: "observeSystem",
  523. category: 'actions',
  524. fn: function (){
  525. var self=this;
  526. return smalltalk.withContext(function($ctx1) { var $1,$2;
  527. $1=_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current();
  528. _st($1)._on_do_((smalltalk.ClassAdded || ClassAdded),(function(ann){
  529. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassAdded_(_st(ann)._theClass());
  530. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  531. $2=_st($1)._on_do_((smalltalk.ClassRemoved || ClassRemoved),(function(ann){
  532. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassRemoved_(_st(ann)._theClass());
  533. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  534. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLClassesListWidget)})},
  535. args: [],
  536. source: "observeSystem\x0a\x09SystemAnnouncer current\x0a \x09on: ClassAdded\x0a do: [ :ann | self onClassAdded: ann theClass ];\x0a on: ClassRemoved\x0a do: [ :ann | self onClassRemoved: ann theClass ]",
  537. messageSends: ["on:do:", "onClassAdded:", "theClass", "current", "onClassRemoved:"],
  538. referencedClasses: ["ClassAdded", "SystemAnnouncer", "ClassRemoved"]
  539. }),
  540. smalltalk.HLClassesListWidget);
  541. smalltalk.addMethod(
  542. "_onClassAdded_",
  543. smalltalk.method({
  544. selector: "onClassAdded:",
  545. category: 'reactions',
  546. fn: function (aClass){
  547. var self=this;
  548. return smalltalk.withContext(function($ctx1) { var $1,$2;
  549. $1=_st(_st(aClass)._package()).__eq(_st(_st(self)._model())._selectedPackage());
  550. if(! smalltalk.assert($1)){
  551. $2=self;
  552. return $2;
  553. };
  554. _st(self)._setItemsForSelectedPackage();
  555. _st(self)._refresh();
  556. return self}, function($ctx1) {$ctx1.fill(self,"onClassAdded:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  557. args: ["aClass"],
  558. source: "onClassAdded: aClass\x0a\x09aClass package = self model selectedPackage ifFalse: [ ^ self ].\x0a \x0a self setItemsForSelectedPackage.\x0a self refresh",
  559. messageSends: ["ifFalse:", "=", "selectedPackage", "model", "package", "setItemsForSelectedPackage", "refresh"],
  560. referencedClasses: []
  561. }),
  562. smalltalk.HLClassesListWidget);
  563. smalltalk.addMethod(
  564. "_onClassRemoved_",
  565. smalltalk.method({
  566. selector: "onClassRemoved:",
  567. category: 'reactions',
  568. fn: function (aClass){
  569. var self=this;
  570. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  571. $1=_st(_st(aClass)._package()).__eq(_st(_st(self)._model())._selectedPackage());
  572. if(! smalltalk.assert($1)){
  573. $2=self;
  574. return $2;
  575. };
  576. $3=_st(aClass).__eq(_st(_st(self)._model())._selectedClass());
  577. if(smalltalk.assert($3)){
  578. _st(self)._selectItem_(nil);
  579. };
  580. _st(self)._setItemsForSelectedPackage();
  581. _st(self)._refresh();
  582. return self}, function($ctx1) {$ctx1.fill(self,"onClassRemoved:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  583. args: ["aClass"],
  584. source: "onClassRemoved: aClass\x0a\x09aClass package = self model selectedPackage ifFalse: [ ^ self ].\x0a aClass = self model selectedClass ifTrue: [ self selectItem: nil ].\x0a \x0a self setItemsForSelectedPackage.\x0a self refresh",
  585. messageSends: ["ifFalse:", "=", "selectedPackage", "model", "package", "ifTrue:", "selectItem:", "selectedClass", "setItemsForSelectedPackage", "refresh"],
  586. referencedClasses: []
  587. }),
  588. smalltalk.HLClassesListWidget);
  589. smalltalk.addMethod(
  590. "_onClassSelected_",
  591. smalltalk.method({
  592. selector: "onClassSelected:",
  593. category: 'reactions',
  594. fn: function (aClass){
  595. var self=this;
  596. return smalltalk.withContext(function($ctx1) { var $1,$2;
  597. _st(self)._selectedItem_(aClass);
  598. $1=aClass;
  599. if(($receiver = $1) == nil || $receiver == undefined){
  600. $2=self;
  601. return $2;
  602. } else {
  603. $1;
  604. };
  605. _st(self)._focus();
  606. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  607. args: ["aClass"],
  608. source: "onClassSelected: aClass\x0a\x09self selectedItem: aClass.\x0a\x09aClass ifNil: [ ^ self ].\x0a \x0a self focus",
  609. messageSends: ["selectedItem:", "ifNil:", "focus"],
  610. referencedClasses: []
  611. }),
  612. smalltalk.HLClassesListWidget);
  613. smalltalk.addMethod(
  614. "_onPackageSelected_",
  615. smalltalk.method({
  616. selector: "onPackageSelected:",
  617. category: 'reactions',
  618. fn: function (aPackage){
  619. var self=this;
  620. return smalltalk.withContext(function($ctx1) { _st(self)._selectedItem_(nil);
  621. _st(self)._setItemsForSelectedPackage();
  622. _st(self)._refresh();
  623. return self}, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{aPackage:aPackage}, smalltalk.HLClassesListWidget)})},
  624. args: ["aPackage"],
  625. source: "onPackageSelected: aPackage\x0a self selectedItem: nil.\x0a \x0a self setItemsForSelectedPackage.\x0a self refresh",
  626. messageSends: ["selectedItem:", "setItemsForSelectedPackage", "refresh"],
  627. referencedClasses: []
  628. }),
  629. smalltalk.HLClassesListWidget);
  630. smalltalk.addMethod(
  631. "_onShowInstanceToggled",
  632. smalltalk.method({
  633. selector: "onShowInstanceToggled",
  634. category: 'reactions',
  635. fn: function (){
  636. var self=this;
  637. return smalltalk.withContext(function($ctx1) { _st(self)._refresh();
  638. return self}, function($ctx1) {$ctx1.fill(self,"onShowInstanceToggled",{}, smalltalk.HLClassesListWidget)})},
  639. args: [],
  640. source: "onShowInstanceToggled\x0a\x09self refresh",
  641. messageSends: ["refresh"],
  642. referencedClasses: []
  643. }),
  644. smalltalk.HLClassesListWidget);
  645. smalltalk.addMethod(
  646. "_renderButtonsOn_",
  647. smalltalk.method({
  648. selector: "renderButtonsOn:",
  649. category: 'rendering',
  650. fn: function (html){
  651. var self=this;
  652. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$6,$7,$8,$2,$9,$10;
  653. $1=_st(html)._div();
  654. _st($1)._class_("btn-group");
  655. _st($1)._at_put_("data-toggle","buttons-radio");
  656. $2=_st($1)._with_((function(){
  657. return smalltalk.withContext(function($ctx2) { $3=_st(html)._button();
  658. _st($3)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  659. return smalltalk.withContext(function($ctx3) { _st(str)._nextPutAll_("btn");
  660. $4=_st(self)._showInstance();
  661. if(smalltalk.assert($4)){
  662. return _st(str)._nextPutAll_(" active");
  663. };
  664. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  665. _st($3)._with_("Instance");
  666. $5=_st($3)._onClick_((function(){
  667. return smalltalk.withContext(function($ctx3) { return _st(self)._showInstance_(true);
  668. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  669. $5;
  670. $6=_st(html)._button();
  671. _st($6)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  672. return smalltalk.withContext(function($ctx3) { _st(str)._nextPutAll_("btn");
  673. $7=_st(_st(self)._model())._showInstance();
  674. if(! smalltalk.assert($7)){
  675. return _st(str)._nextPutAll_(" active");
  676. };
  677. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  678. _st($6)._with_("Class");
  679. $8=_st($6)._onClick_((function(){
  680. return smalltalk.withContext(function($ctx3) { return _st(_st(self)._model())._showInstance_(false);
  681. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  682. return $8;
  683. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  684. $9=_st(html)._button();
  685. _st($9)._class_("btn");
  686. _st($9)._at_put_("data-toggle","button");
  687. $10=_st($9)._with_("Comment");
  688. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.HLClassesListWidget)})},
  689. args: ["html"],
  690. source: "renderButtonsOn: html\x0a\x09html div \x0a class: 'btn-group';\x0a\x09\x09at: 'data-toggle' put: 'buttons-radio';\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 model showInstance ifFalse: [ \x0a \x09str nextPutAll: ' active'] ]);\x0a \x09\x09\x09\x09with: 'Class';\x0a\x09\x09\x09\x09onClick: [ self model showInstance: false ] ].\x0a \x0a \x09html button \x0a \x09class: 'btn';\x0a at: 'data-toggle' put: 'button';\x0a \x09\x09\x09with: 'Comment'",
  691. messageSends: ["class:", "div", "at:put:", "with:", "streamContents:", "nextPutAll:", "ifTrue:", "showInstance", "button", "onClick:", "showInstance:", "ifFalse:", "model"],
  692. referencedClasses: ["String"]
  693. }),
  694. smalltalk.HLClassesListWidget);
  695. smalltalk.addMethod(
  696. "_renderItem_level_on_",
  697. smalltalk.method({
  698. selector: "renderItem:level:on:",
  699. category: 'rendering',
  700. fn: function (aClass,anInteger,html){
  701. var self=this;
  702. var li;
  703. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$2;
  704. li=_st(html)._li();
  705. $1=li;
  706. _st($1)._at_put_("list-data",_st(_st(self)._items())._indexOf_(aClass));
  707. _st($1)._class_(_st(self)._cssClassForItem_(aClass));
  708. $2=_st($1)._with_((function(){
  709. return smalltalk.withContext(function($ctx2) { $3=_st(html)._a();
  710. _st($3)._with_((function(){
  711. return smalltalk.withContext(function($ctx3) { _st(_st(html)._tag_("i"))._class_(_st(self)._iconForItem_(aClass));
  712. return _st(self)._renderItemLabel_level_on_(aClass,anInteger,html);
  713. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  714. $4=_st($3)._onClick_((function(){
  715. return smalltalk.withContext(function($ctx3) { return _st(self)._activateListItem_(_st(li)._asJQuery());
  716. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  717. return $4;
  718. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  719. _st(_st(self)._getChildrenOf_(aClass))._do_((function(each){
  720. return smalltalk.withContext(function($ctx2) { return _st(self)._renderItem_level_on_(each,_st(anInteger).__plus((1)),html);
  721. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  722. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:level:on:",{aClass:aClass,anInteger:anInteger,html:html,li:li}, smalltalk.HLClassesListWidget)})},
  723. args: ["aClass", "anInteger", "html"],
  724. source: "renderItem: aClass level: anInteger on: html\x0a\x09| li |\x0a \x0a\x09li := html li.\x0a li\x0a \x09at: 'list-data' put: (self items indexOf: aClass);\x0a \x09class: (self cssClassForItem: aClass);\x0a with: [ \x0a \x09html a\x0a \x09with: [ \x0a \x09\x09(html tag: 'i') class: (self iconForItem: 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 ]",
  725. messageSends: ["li", "at:put:", "indexOf:", "items", "class:", "cssClassForItem:", "with:", "iconForItem:", "tag:", "renderItemLabel:level:on:", "a", "onClick:", "activateListItem:", "asJQuery", "do:", "renderItem:level:on:", "+", "getChildrenOf:"],
  726. referencedClasses: []
  727. }),
  728. smalltalk.HLClassesListWidget);
  729. smalltalk.addMethod(
  730. "_renderItem_on_",
  731. smalltalk.method({
  732. selector: "renderItem:on:",
  733. category: 'rendering',
  734. fn: function (aClass,html){
  735. var self=this;
  736. return smalltalk.withContext(function($ctx1) { smalltalk.HLBrowserListWidget.fn.prototype._renderItem_on_.apply(_st(self), [aClass,html]);
  737. _st(_st(self)._getChildrenOf_(aClass))._do_((function(each){
  738. return smalltalk.withContext(function($ctx2) { return _st(self)._renderItem_level_on_(each,(1),html);
  739. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  740. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:on:",{aClass:aClass,html:html}, smalltalk.HLClassesListWidget)})},
  741. args: ["aClass", "html"],
  742. 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 ]",
  743. messageSends: ["renderItem:on:", "do:", "renderItem:level:on:", "getChildrenOf:"],
  744. referencedClasses: []
  745. }),
  746. smalltalk.HLClassesListWidget);
  747. smalltalk.addMethod(
  748. "_renderItemLabel_level_on_",
  749. smalltalk.method({
  750. selector: "renderItemLabel:level:on:",
  751. category: 'rendering',
  752. fn: function (aClass,anInteger,html){
  753. var self=this;
  754. return smalltalk.withContext(function($ctx1) { _st(_st(_st(html)._span())._asJQuery())._html_(_st((smalltalk.String || String))._streamContents_((function(str){
  755. return smalltalk.withContext(function($ctx2) { _st(anInteger)._timesRepeat_((function(){
  756. return smalltalk.withContext(function($ctx3) { return _st(str)._nextPutAll_("    ");
  757. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  758. return _st(str)._nextPutAll_(_st(aClass)._name());
  759. }, function($ctx2) {$ctx2.fillBlock({str:str},$ctx1)})})));
  760. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:level:on:",{aClass:aClass,anInteger:anInteger,html:html}, smalltalk.HLClassesListWidget)})},
  761. args: ["aClass", "anInteger", "html"],
  762. 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 ])",
  763. messageSends: ["html:", "streamContents:", "timesRepeat:", "nextPutAll:", "name", "asJQuery", "span"],
  764. referencedClasses: ["String"]
  765. }),
  766. smalltalk.HLClassesListWidget);
  767. smalltalk.addMethod(
  768. "_renderItemLabel_on_",
  769. smalltalk.method({
  770. selector: "renderItemLabel:on:",
  771. category: 'rendering',
  772. fn: function (aClass,html){
  773. var self=this;
  774. return smalltalk.withContext(function($ctx1) { _st(self)._renderItemLabel_level_on_(aClass,(0),html);
  775. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aClass:aClass,html:html}, smalltalk.HLClassesListWidget)})},
  776. args: ["aClass", "html"],
  777. source: "renderItemLabel: aClass on: html\x0a\x09self renderItemLabel: aClass level: 0 on: html",
  778. messageSends: ["renderItemLabel:level:on:"],
  779. referencedClasses: []
  780. }),
  781. smalltalk.HLClassesListWidget);
  782. smalltalk.addMethod(
  783. "_renderListOn_",
  784. smalltalk.method({
  785. selector: "renderListOn:",
  786. category: 'rendering',
  787. fn: function (html){
  788. var self=this;
  789. return smalltalk.withContext(function($ctx1) { _st(_st(self)._getRootClassesOf_(_st(self)._items()))._do_((function(each){
  790. return smalltalk.withContext(function($ctx2) { return _st(self)._renderItem_on_(each,html);
  791. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  792. return self}, function($ctx1) {$ctx1.fill(self,"renderListOn:",{html:html}, smalltalk.HLClassesListWidget)})},
  793. args: ["html"],
  794. source: "renderListOn: html\x0a\x09(self getRootClassesOf: self items)\x0a \x09do: [ :each | self renderItem: each on: html ]",
  795. messageSends: ["do:", "renderItem:on:", "getRootClassesOf:", "items"],
  796. referencedClasses: []
  797. }),
  798. smalltalk.HLClassesListWidget);
  799. smalltalk.addMethod(
  800. "_selectItem_",
  801. smalltalk.method({
  802. selector: "selectItem:",
  803. category: 'actions',
  804. fn: function (aClass){
  805. var self=this;
  806. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._selectedClass_(aClass);
  807. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aClass:aClass}, smalltalk.HLClassesListWidget)})},
  808. args: ["aClass"],
  809. source: "selectItem: aClass\x0a self model selectedClass: aClass",
  810. messageSends: ["selectedClass:", "model"],
  811. referencedClasses: []
  812. }),
  813. smalltalk.HLClassesListWidget);
  814. smalltalk.addMethod(
  815. "_setItemsForPackage_",
  816. smalltalk.method({
  817. selector: "setItemsForPackage:",
  818. category: 'private',
  819. fn: function (aPackage){
  820. var self=this;
  821. return smalltalk.withContext(function($ctx1) { var $1,$3,$2;
  822. $1=self;
  823. $3=aPackage;
  824. if(($receiver = $3) == nil || $receiver == undefined){
  825. $2=[];
  826. } else {
  827. $2=_st(_st(_st(_st(_st(aPackage)._classes())._collect_((function(each){
  828. return smalltalk.withContext(function($ctx2) { return _st(each)._theNonMetaClass();
  829. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._asSet())._asArray())._sort_((function(a,b){
  830. return smalltalk.withContext(function($ctx2) { return _st(_st(a)._name()).__lt(_st(b)._name());
  831. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  832. };
  833. _st($1)._items_($2);
  834. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForPackage:",{aPackage:aPackage}, smalltalk.HLClassesListWidget)})},
  835. args: ["aPackage"],
  836. source: "setItemsForPackage: aPackage\x0a\x09self items: (aPackage \x0a \x09ifNil: [ #() ]\x0a \x09\x09ifNotNil: [ ((aPackage classes \x0a \x09collect: [ :each | each theNonMetaClass ]) asSet asArray) \x0a \x09sort: [:a :b | a name < b name ] ]).",
  837. messageSends: ["items:", "ifNil:ifNotNil:", "sort:", "<", "name", "asArray", "asSet", "collect:", "theNonMetaClass", "classes"],
  838. referencedClasses: []
  839. }),
  840. smalltalk.HLClassesListWidget);
  841. smalltalk.addMethod(
  842. "_setItemsForSelectedPackage",
  843. smalltalk.method({
  844. selector: "setItemsForSelectedPackage",
  845. category: 'private',
  846. fn: function (){
  847. var self=this;
  848. return smalltalk.withContext(function($ctx1) { _st(self)._setItemsForPackage_(_st(_st(self)._model())._selectedPackage());
  849. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedPackage",{}, smalltalk.HLClassesListWidget)})},
  850. args: [],
  851. source: "setItemsForSelectedPackage\x0a\x09self setItemsForPackage: self model selectedPackage",
  852. messageSends: ["setItemsForPackage:", "selectedPackage", "model"],
  853. referencedClasses: []
  854. }),
  855. smalltalk.HLClassesListWidget);
  856. smalltalk.addMethod(
  857. "_showInstance",
  858. smalltalk.method({
  859. selector: "showInstance",
  860. category: 'accessing',
  861. fn: function (){
  862. var self=this;
  863. return smalltalk.withContext(function($ctx1) { var $1;
  864. $1=_st(_st(self)._model())._showInstance();
  865. return $1;
  866. }, function($ctx1) {$ctx1.fill(self,"showInstance",{}, smalltalk.HLClassesListWidget)})},
  867. args: [],
  868. source: "showInstance\x0a\x09^ self model showInstance",
  869. messageSends: ["showInstance", "model"],
  870. referencedClasses: []
  871. }),
  872. smalltalk.HLClassesListWidget);
  873. smalltalk.addMethod(
  874. "_showInstance_",
  875. smalltalk.method({
  876. selector: "showInstance:",
  877. category: 'actions',
  878. fn: function (aBoolean){
  879. var self=this;
  880. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._showInstance_(aBoolean);
  881. return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean}, smalltalk.HLClassesListWidget)})},
  882. args: ["aBoolean"],
  883. source: "showInstance: aBoolean\x0a\x09self model showInstance: aBoolean",
  884. messageSends: ["showInstance:", "model"],
  885. referencedClasses: []
  886. }),
  887. smalltalk.HLClassesListWidget);
  888. smalltalk.addClass('HLMethodsListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  889. smalltalk.addMethod(
  890. "_allProtocol",
  891. smalltalk.method({
  892. selector: "allProtocol",
  893. category: 'accessing',
  894. fn: function (){
  895. var self=this;
  896. return smalltalk.withContext(function($ctx1) { var $1;
  897. $1=_st(_st(self)._model())._allProtocol();
  898. return $1;
  899. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{}, smalltalk.HLMethodsListWidget)})},
  900. args: [],
  901. source: "allProtocol\x0a\x09^ self model allProtocol",
  902. messageSends: ["allProtocol", "model"],
  903. referencedClasses: []
  904. }),
  905. smalltalk.HLMethodsListWidget);
  906. smalltalk.addMethod(
  907. "_flushSelectorsCache",
  908. smalltalk.method({
  909. selector: "flushSelectorsCache",
  910. category: 'cache',
  911. fn: function (){
  912. var self=this;
  913. return smalltalk.withContext(function($ctx1) { self["@selectorsCache"]=_st((smalltalk.Dictionary || Dictionary))._new();
  914. return self}, function($ctx1) {$ctx1.fill(self,"flushSelectorsCache",{}, smalltalk.HLMethodsListWidget)})},
  915. args: [],
  916. source: "flushSelectorsCache\x0a\x09selectorsCache := Dictionary new",
  917. messageSends: ["new"],
  918. referencedClasses: ["Dictionary"]
  919. }),
  920. smalltalk.HLMethodsListWidget);
  921. smalltalk.addMethod(
  922. "_iconForItem_",
  923. smalltalk.method({
  924. selector: "iconForItem:",
  925. category: 'accessing',
  926. fn: function (aSelector){
  927. var self=this;
  928. var override,overriden,method;
  929. return smalltalk.withContext(function($ctx1) { var $2,$3,$4,$1;
  930. method=_st(self)._methodForSelector_(aSelector);
  931. override=_st(self)._isOverride_(method);
  932. overriden=_st(self)._isOverridden_(method);
  933. $2=override;
  934. if(smalltalk.assert($2)){
  935. $3=overriden;
  936. if(smalltalk.assert($3)){
  937. $1="icon-resize-vertical";
  938. } else {
  939. $1="icon-arrow-up";
  940. };
  941. } else {
  942. $4=overriden;
  943. if(smalltalk.assert($4)){
  944. $1="icon-arrow-down";
  945. } else {
  946. $1="icon-none";
  947. };
  948. };
  949. return $1;
  950. }, function($ctx1) {$ctx1.fill(self,"iconForItem:",{aSelector:aSelector,override:override,overriden:overriden,method:method}, smalltalk.HLMethodsListWidget)})},
  951. args: ["aSelector"],
  952. source: "iconForItem: 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: [ 'icon-resize-vertical' ]\x0a\x09\x09\x09ifFalse: [ 'icon-arrow-up' ] ]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09overriden\x0a\x09\x09\x09ifTrue: [ 'icon-arrow-down' ]\x0a\x09\x09\x09ifFalse: [ 'icon-none' ] ]",
  953. messageSends: ["methodForSelector:", "isOverride:", "isOverridden:", "ifTrue:ifFalse:"],
  954. referencedClasses: []
  955. }),
  956. smalltalk.HLMethodsListWidget);
  957. smalltalk.addMethod(
  958. "_initialize",
  959. smalltalk.method({
  960. selector: "initialize",
  961. category: 'initialization',
  962. fn: function (){
  963. var self=this;
  964. return smalltalk.withContext(function($ctx1) { smalltalk.HLBrowserListWidget.fn.prototype._initialize.apply(_st(self), []);
  965. _st(self)._flushSelectorsCache();
  966. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLMethodsListWidget)})},
  967. args: [],
  968. source: "initialize\x0a\x09super initialize.\x0a self flushSelectorsCache",
  969. messageSends: ["initialize", "flushSelectorsCache"],
  970. referencedClasses: []
  971. }),
  972. smalltalk.HLMethodsListWidget);
  973. smalltalk.addMethod(
  974. "_isOverridden_",
  975. smalltalk.method({
  976. selector: "isOverridden:",
  977. category: 'testing',
  978. fn: function (aMethod){
  979. var self=this;
  980. return smalltalk.withContext(function($ctx1) { var $1;
  981. $1=_st(_st(self)._selectorsCache())._isOverridden_(aMethod);
  982. return $1;
  983. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  984. args: ["aMethod"],
  985. source: "isOverridden: aMethod\x0a ^ self selectorsCache isOverridden: aMethod",
  986. messageSends: ["isOverridden:", "selectorsCache"],
  987. referencedClasses: []
  988. }),
  989. smalltalk.HLMethodsListWidget);
  990. smalltalk.addMethod(
  991. "_isOverride_",
  992. smalltalk.method({
  993. selector: "isOverride:",
  994. category: 'testing',
  995. fn: function (aMethod){
  996. var self=this;
  997. return smalltalk.withContext(function($ctx1) { var $1;
  998. $1=_st(_st(self)._selectorsCache())._isOverride_(aMethod);
  999. return $1;
  1000. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  1001. args: ["aMethod"],
  1002. source: "isOverride: aMethod\x0a ^ self selectorsCache isOverride: aMethod",
  1003. messageSends: ["isOverride:", "selectorsCache"],
  1004. referencedClasses: []
  1005. }),
  1006. smalltalk.HLMethodsListWidget);
  1007. smalltalk.addMethod(
  1008. "_methodForSelector_",
  1009. smalltalk.method({
  1010. selector: "methodForSelector:",
  1011. category: 'accessing',
  1012. fn: function (aSelector){
  1013. var self=this;
  1014. return smalltalk.withContext(function($ctx1) { var $1;
  1015. $1=_st(_st(_st(_st(self)._model())._selectedClass())._methodDictionary())._at_(aSelector);
  1016. return $1;
  1017. }, function($ctx1) {$ctx1.fill(self,"methodForSelector:",{aSelector:aSelector}, smalltalk.HLMethodsListWidget)})},
  1018. args: ["aSelector"],
  1019. source: "methodForSelector: aSelector\x0a\x09^ self model selectedClass\x0a \x09methodDictionary at: aSelector",
  1020. messageSends: ["at:", "methodDictionary", "selectedClass", "model"],
  1021. referencedClasses: []
  1022. }),
  1023. smalltalk.HLMethodsListWidget);
  1024. smalltalk.addMethod(
  1025. "_methodsInProtocol_",
  1026. smalltalk.method({
  1027. selector: "methodsInProtocol:",
  1028. category: 'accessing',
  1029. fn: function (aString){
  1030. var self=this;
  1031. return smalltalk.withContext(function($ctx1) { var $1,$3,$2;
  1032. $1=_st(_st(self)._model())._selectedClass();
  1033. if(($receiver = $1) == nil || $receiver == undefined){
  1034. return [];
  1035. } else {
  1036. $1;
  1037. };
  1038. $3=_st(aString).__eq(_st(self)._allProtocol());
  1039. if(smalltalk.assert($3)){
  1040. $2=_st(_st(_st(self)._model())._selectedClass())._methods();
  1041. } else {
  1042. $2=_st(_st(_st(self)._model())._selectedClass())._methodsInProtocol_(aString);
  1043. };
  1044. return $2;
  1045. }, function($ctx1) {$ctx1.fill(self,"methodsInProtocol:",{aString:aString}, smalltalk.HLMethodsListWidget)})},
  1046. args: ["aString"],
  1047. 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 ]",
  1048. messageSends: ["ifNil:", "selectedClass", "model", "ifTrue:ifFalse:", "methods", "methodsInProtocol:", "=", "allProtocol"],
  1049. referencedClasses: []
  1050. }),
  1051. smalltalk.HLMethodsListWidget);
  1052. smalltalk.addMethod(
  1053. "_observeModel",
  1054. smalltalk.method({
  1055. selector: "observeModel",
  1056. category: 'actions',
  1057. fn: function (){
  1058. var self=this;
  1059. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLProtocolSelected || HLProtocolSelected),(function(ann){
  1060. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(_st(ann)._item());
  1061. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1062. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled),(function(ann){
  1063. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(nil);
  1064. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1065. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLMethodSelected || HLMethodSelected),(function(ann){
  1066. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodSelected_(_st(ann)._item());
  1067. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1068. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLMethodsListWidget)})},
  1069. args: [],
  1070. source: "observeModel\x0a\x09self model announcer on: HLProtocolSelected do: [ :ann |\x0a \x09self onProtocolSelected: ann item ].\x0a self model announcer on: HLShowInstanceToggled do: [ :ann |\x0a \x09self onProtocolSelected: nil ].\x0a self model announcer on: HLMethodSelected do: [ :ann |\x0a \x09self onMethodSelected: ann item ]",
  1071. messageSends: ["on:do:", "onProtocolSelected:", "item", "announcer", "model", "onMethodSelected:"],
  1072. referencedClasses: ["HLProtocolSelected", "HLShowInstanceToggled", "HLMethodSelected"]
  1073. }),
  1074. smalltalk.HLMethodsListWidget);
  1075. smalltalk.addMethod(
  1076. "_observeSystem",
  1077. smalltalk.method({
  1078. selector: "observeSystem",
  1079. category: 'actions',
  1080. fn: function (){
  1081. var self=this;
  1082. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1083. $1=_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current();
  1084. _st($1)._on_do_((smalltalk.MethodAdded || MethodAdded),(function(ann){
  1085. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodAdded_(_st(ann)._method());
  1086. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1087. $2=_st($1)._on_do_((smalltalk.MethodRemoved || MethodRemoved),(function(ann){
  1088. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodRemoved_(_st(ann)._method());
  1089. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1090. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLMethodsListWidget)})},
  1091. args: [],
  1092. source: "observeSystem\x0a\x09SystemAnnouncer current \x0a \x09on: MethodAdded \x0a do: [ :ann | self onMethodAdded: ann method ];\x0a on: MethodRemoved \x0a do: [ :ann | self onMethodRemoved: ann method ]",
  1093. messageSends: ["on:do:", "onMethodAdded:", "method", "current", "onMethodRemoved:"],
  1094. referencedClasses: ["MethodAdded", "SystemAnnouncer", "MethodRemoved"]
  1095. }),
  1096. smalltalk.HLMethodsListWidget);
  1097. smalltalk.addMethod(
  1098. "_onMethodAdded_",
  1099. smalltalk.method({
  1100. selector: "onMethodAdded:",
  1101. category: 'reactions',
  1102. fn: function (aMethod){
  1103. var self=this;
  1104. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1105. $1=_st(_st(_st(self)._model())._selectedClass()).__eq(_st(aMethod)._methodClass());
  1106. if(! smalltalk.assert($1)){
  1107. $2=self;
  1108. return $2;
  1109. };
  1110. _st(self)._setItemsForSelectedProtocol();
  1111. _st(self)._refresh();
  1112. return self}, function($ctx1) {$ctx1.fill(self,"onMethodAdded:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  1113. args: ["aMethod"],
  1114. source: "onMethodAdded: aMethod\x0a\x09self model selectedClass = aMethod methodClass ifFalse: [ ^ self ].\x0a \x0a self setItemsForSelectedProtocol.\x0a self refresh",
  1115. messageSends: ["ifFalse:", "=", "methodClass", "selectedClass", "model", "setItemsForSelectedProtocol", "refresh"],
  1116. referencedClasses: []
  1117. }),
  1118. smalltalk.HLMethodsListWidget);
  1119. smalltalk.addMethod(
  1120. "_onMethodRemoved_",
  1121. smalltalk.method({
  1122. selector: "onMethodRemoved:",
  1123. category: 'reactions',
  1124. fn: function (aMethod){
  1125. var self=this;
  1126. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1127. var $early={};
  1128. try {
  1129. _st(_st(self)._items())._detect_ifNone_((function(each){
  1130. return smalltalk.withContext(function($ctx2) { return _st(each).__eq(_st(aMethod)._selector());
  1131. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  1132. return smalltalk.withContext(function($ctx2) { $1=self;
  1133. throw $early=[$1];
  1134. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1135. $2=_st(self)._selectedItem();
  1136. if(($receiver = $2) == nil || $receiver == undefined){
  1137. $2;
  1138. } else {
  1139. $3=_st(_st(_st(aMethod)._methodClass()).__eq(_st(_st(self)._model())._selectedClass()))._and_((function(){
  1140. return smalltalk.withContext(function($ctx2) { return _st(_st(aMethod)._selector()).__eq(_st(_st(self)._selectedItem())._selector());
  1141. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1142. if(smalltalk.assert($3)){
  1143. _st(self)._selectItem_(nil);
  1144. };
  1145. };
  1146. _st(self)._setItemsForSelectedProtocol();
  1147. _st(self)._refresh();
  1148. return self}
  1149. catch(e) {if(e===$early)return e[0]; throw e}
  1150. }, function($ctx1) {$ctx1.fill(self,"onMethodRemoved:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  1151. args: ["aMethod"],
  1152. source: "onMethodRemoved: aMethod\x0a\x09self items detect: [ :each | each = aMethod selector ] ifNone: [ ^ self ].\x0a\x0a self selectedItem ifNotNil: [\x0a \x09(aMethod methodClass = self model selectedClass and: [ aMethod selector = self selectedItem selector ])\x0a \x09\x09\x09ifTrue: [ self selectItem: nil ] ].\x0a self setItemsForSelectedProtocol.\x0a\x0aself refresh",
  1153. messageSends: ["detect:ifNone:", "=", "selector", "items", "ifNotNil:", "ifTrue:", "selectItem:", "and:", "selectedItem", "selectedClass", "model", "methodClass", "setItemsForSelectedProtocol", "refresh"],
  1154. referencedClasses: []
  1155. }),
  1156. smalltalk.HLMethodsListWidget);
  1157. smalltalk.addMethod(
  1158. "_onMethodSelected_",
  1159. smalltalk.method({
  1160. selector: "onMethodSelected:",
  1161. category: 'reactions',
  1162. fn: function (aMethod){
  1163. var self=this;
  1164. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1165. _st(self)._selectedItem_(aMethod);
  1166. $1=aMethod;
  1167. if(($receiver = $1) == nil || $receiver == undefined){
  1168. $2=self;
  1169. return $2;
  1170. } else {
  1171. $1;
  1172. };
  1173. _st(self)._focus();
  1174. return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aMethod:aMethod}, smalltalk.HLMethodsListWidget)})},
  1175. args: ["aMethod"],
  1176. source: "onMethodSelected: aMethod\x0a\x09self selectedItem: aMethod.\x0a\x09aMethod ifNil: [ ^ self ].\x0a \x0a self focus",
  1177. messageSends: ["selectedItem:", "ifNil:", "focus"],
  1178. referencedClasses: []
  1179. }),
  1180. smalltalk.HLMethodsListWidget);
  1181. smalltalk.addMethod(
  1182. "_onProtocolSelected_",
  1183. smalltalk.method({
  1184. selector: "onProtocolSelected:",
  1185. category: 'reactions',
  1186. fn: function (aString){
  1187. var self=this;
  1188. return smalltalk.withContext(function($ctx1) { _st(self)._selectedItem_(nil);
  1189. _st(self)._setItemsForSelectedProtocol();
  1190. _st(self)._refresh();
  1191. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLMethodsListWidget)})},
  1192. args: ["aString"],
  1193. source: "onProtocolSelected: aString\x0a self selectedItem: nil.\x0a \x0a\x09self setItemsForSelectedProtocol.\x0a self refresh",
  1194. messageSends: ["selectedItem:", "setItemsForSelectedProtocol", "refresh"],
  1195. referencedClasses: []
  1196. }),
  1197. smalltalk.HLMethodsListWidget);
  1198. smalltalk.addMethod(
  1199. "_overrideSelectors",
  1200. smalltalk.method({
  1201. selector: "overrideSelectors",
  1202. category: 'accessing',
  1203. fn: function (){
  1204. var self=this;
  1205. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1206. $1=_st(_st(self)._selectorsCache())._at_ifAbsentPut_("override",(function(){
  1207. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(_st(self)._model())._selectedClass())._allSuperclasses())._inject_into_(_st((smalltalk.Set || Set))._new(),(function(acc,each){
  1208. return smalltalk.withContext(function($ctx3) { $2=acc;
  1209. _st($2)._addAll_(_st(each)._selectors());
  1210. $3=_st($2)._yourself();
  1211. return $3;
  1212. }, function($ctx3) {$ctx3.fillBlock({acc:acc,each:each},$ctx1)})}));
  1213. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1214. return $1;
  1215. }, function($ctx1) {$ctx1.fill(self,"overrideSelectors",{}, smalltalk.HLMethodsListWidget)})},
  1216. args: [],
  1217. 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 ] ]",
  1218. messageSends: ["at:ifAbsentPut:", "inject:into:", "new", "addAll:", "selectors", "yourself", "allSuperclasses", "selectedClass", "model", "selectorsCache"],
  1219. referencedClasses: ["Set"]
  1220. }),
  1221. smalltalk.HLMethodsListWidget);
  1222. smalltalk.addMethod(
  1223. "_overridenSelectors",
  1224. smalltalk.method({
  1225. selector: "overridenSelectors",
  1226. category: 'accessing',
  1227. fn: function (){
  1228. var self=this;
  1229. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1230. $1=_st(_st(self)._selectorsCache())._at_ifAbsentPut_("overriden",(function(){
  1231. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(_st(self)._model())._selectedClass())._allSubclasses())._inject_into_(_st((smalltalk.Set || Set))._new(),(function(acc,each){
  1232. return smalltalk.withContext(function($ctx3) { $2=acc;
  1233. _st($2)._addAll_(_st(each)._selectors());
  1234. $3=_st($2)._yourself();
  1235. return $3;
  1236. }, function($ctx3) {$ctx3.fillBlock({acc:acc,each:each},$ctx1)})}));
  1237. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1238. return $1;
  1239. }, function($ctx1) {$ctx1.fill(self,"overridenSelectors",{}, smalltalk.HLMethodsListWidget)})},
  1240. args: [],
  1241. 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 ] ]",
  1242. messageSends: ["at:ifAbsentPut:", "inject:into:", "new", "addAll:", "selectors", "yourself", "allSubclasses", "selectedClass", "model", "selectorsCache"],
  1243. referencedClasses: ["Set"]
  1244. }),
  1245. smalltalk.HLMethodsListWidget);
  1246. smalltalk.addMethod(
  1247. "_renderContentOn_",
  1248. smalltalk.method({
  1249. selector: "renderContentOn:",
  1250. category: 'rendering',
  1251. fn: function (html){
  1252. var self=this;
  1253. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1254. $1=_st(_st(self)._model())._showInstance();
  1255. if(smalltalk.assert($1)){
  1256. smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1257. } else {
  1258. $2=_st(html)._div();
  1259. _st($2)._class_("class_side");
  1260. $3=_st($2)._with_((function(){
  1261. return smalltalk.withContext(function($ctx2) { return smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1262. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1263. $3;
  1264. };
  1265. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLMethodsListWidget)})},
  1266. args: ["html"],
  1267. 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 ]",
  1268. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model"],
  1269. referencedClasses: []
  1270. }),
  1271. smalltalk.HLMethodsListWidget);
  1272. smalltalk.addMethod(
  1273. "_renderItemLabel_on_",
  1274. smalltalk.method({
  1275. selector: "renderItemLabel:on:",
  1276. category: 'rendering',
  1277. fn: function (aSelector,html){
  1278. var self=this;
  1279. return smalltalk.withContext(function($ctx1) { _st(html)._with_(aSelector);
  1280. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aSelector:aSelector,html:html}, smalltalk.HLMethodsListWidget)})},
  1281. args: ["aSelector", "html"],
  1282. source: "renderItemLabel: aSelector on: html\x0a\x09html with: aSelector",
  1283. messageSends: ["with:"],
  1284. referencedClasses: []
  1285. }),
  1286. smalltalk.HLMethodsListWidget);
  1287. smalltalk.addMethod(
  1288. "_selectItem_",
  1289. smalltalk.method({
  1290. selector: "selectItem:",
  1291. category: 'actions',
  1292. fn: function (aSelector){
  1293. var self=this;
  1294. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1295. $1=aSelector;
  1296. if(($receiver = $1) == nil || $receiver == undefined){
  1297. $2=_st(_st(self)._model())._selectedMethod_(nil);
  1298. return $2;
  1299. } else {
  1300. $1;
  1301. };
  1302. _st(_st(self)._model())._selectedMethod_(_st(self)._methodForSelector_(aSelector));
  1303. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aSelector:aSelector}, smalltalk.HLMethodsListWidget)})},
  1304. args: ["aSelector"],
  1305. source: "selectItem: aSelector\x0a\x09aSelector ifNil: [ ^ self model selectedMethod: nil ].\x0a\x0a \x09self model selectedMethod: (self methodForSelector: aSelector)\x0a ",
  1306. messageSends: ["ifNil:", "selectedMethod:", "model", "methodForSelector:"],
  1307. referencedClasses: []
  1308. }),
  1309. smalltalk.HLMethodsListWidget);
  1310. smalltalk.addMethod(
  1311. "_selectorsCache",
  1312. smalltalk.method({
  1313. selector: "selectorsCache",
  1314. category: 'accessing',
  1315. fn: function (){
  1316. var self=this;
  1317. return smalltalk.withContext(function($ctx1) { var $1;
  1318. $1=_st(_st(self)._class())._selectorsCache();
  1319. return $1;
  1320. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{}, smalltalk.HLMethodsListWidget)})},
  1321. args: [],
  1322. source: "selectorsCache\x0a\x09^ self class selectorsCache",
  1323. messageSends: ["selectorsCache", "class"],
  1324. referencedClasses: []
  1325. }),
  1326. smalltalk.HLMethodsListWidget);
  1327. smalltalk.addMethod(
  1328. "_selectorsInProtocol_",
  1329. smalltalk.method({
  1330. selector: "selectorsInProtocol:",
  1331. category: 'accessing',
  1332. fn: function (aString){
  1333. var self=this;
  1334. return smalltalk.withContext(function($ctx1) { var $1;
  1335. $1=_st(_st(self)._methodsInProtocol_(aString))._collect_((function(each){
  1336. return smalltalk.withContext(function($ctx2) { return _st(each)._selector();
  1337. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1338. return $1;
  1339. }, function($ctx1) {$ctx1.fill(self,"selectorsInProtocol:",{aString:aString}, smalltalk.HLMethodsListWidget)})},
  1340. args: ["aString"],
  1341. source: "selectorsInProtocol: aString\x0a\x09^ (self methodsInProtocol: aString)\x0a \x09collect: [ :each | each selector ]",
  1342. messageSends: ["collect:", "selector", "methodsInProtocol:"],
  1343. referencedClasses: []
  1344. }),
  1345. smalltalk.HLMethodsListWidget);
  1346. smalltalk.addMethod(
  1347. "_setItemsForProtocol_",
  1348. smalltalk.method({
  1349. selector: "setItemsForProtocol:",
  1350. category: 'private',
  1351. fn: function (aString){
  1352. var self=this;
  1353. return smalltalk.withContext(function($ctx1) { var $2,$4,$3,$1;
  1354. $2=self;
  1355. $4=aString;
  1356. if(($receiver = $4) == nil || $receiver == undefined){
  1357. $3=[];
  1358. } else {
  1359. $3=_st(self)._selectorsInProtocol_(aString);
  1360. };
  1361. $1=_st($2)._items_($3);
  1362. return $1;
  1363. }, function($ctx1) {$ctx1.fill(self,"setItemsForProtocol:",{aString:aString}, smalltalk.HLMethodsListWidget)})},
  1364. args: ["aString"],
  1365. source: "setItemsForProtocol: aString\x0a\x09^ self items: (aString\x0a \x09ifNil: [ #() ]\x0a \x09ifNotNil: [ self selectorsInProtocol: aString ])",
  1366. messageSends: ["items:", "ifNil:ifNotNil:", "selectorsInProtocol:"],
  1367. referencedClasses: []
  1368. }),
  1369. smalltalk.HLMethodsListWidget);
  1370. smalltalk.addMethod(
  1371. "_setItemsForSelectedProtocol",
  1372. smalltalk.method({
  1373. selector: "setItemsForSelectedProtocol",
  1374. category: 'private',
  1375. fn: function (){
  1376. var self=this;
  1377. return smalltalk.withContext(function($ctx1) { _st(self)._setItemsForProtocol_(_st(_st(self)._model())._selectedProtocol());
  1378. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedProtocol",{}, smalltalk.HLMethodsListWidget)})},
  1379. args: [],
  1380. source: "setItemsForSelectedProtocol\x0a\x09self setItemsForProtocol: self model selectedProtocol",
  1381. messageSends: ["setItemsForProtocol:", "selectedProtocol", "model"],
  1382. referencedClasses: []
  1383. }),
  1384. smalltalk.HLMethodsListWidget);
  1385. smalltalk.HLMethodsListWidget.klass.iVarNames = ['selectorsCache'];
  1386. smalltalk.addMethod(
  1387. "_selectorsCache",
  1388. smalltalk.method({
  1389. selector: "selectorsCache",
  1390. category: 'accessing',
  1391. fn: function (){
  1392. var self=this;
  1393. return smalltalk.withContext(function($ctx1) { var $1;
  1394. $1=_st((smalltalk.HLSelectorsCache || HLSelectorsCache))._current();
  1395. return $1;
  1396. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{}, smalltalk.HLMethodsListWidget.klass)})},
  1397. args: [],
  1398. source: "selectorsCache\x0a\x09^ HLSelectorsCache current",
  1399. messageSends: ["current"],
  1400. referencedClasses: ["HLSelectorsCache"]
  1401. }),
  1402. smalltalk.HLMethodsListWidget.klass);
  1403. smalltalk.addClass('HLPackagesListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  1404. smalltalk.addMethod(
  1405. "_focusClassesListWidget",
  1406. smalltalk.method({
  1407. selector: "focusClassesListWidget",
  1408. category: 'actions',
  1409. fn: function (){
  1410. var self=this;
  1411. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._announce_(_st((smalltalk.HLClassesListFocus || HLClassesListFocus))._new());
  1412. return self}, function($ctx1) {$ctx1.fill(self,"focusClassesListWidget",{}, smalltalk.HLPackagesListWidget)})},
  1413. args: [],
  1414. source: "focusClassesListWidget\x0a\x09self model announcer announce: HLClassesListFocus new",
  1415. messageSends: ["announce:", "new", "announcer", "model"],
  1416. referencedClasses: ["HLClassesListFocus"]
  1417. }),
  1418. smalltalk.HLPackagesListWidget);
  1419. smalltalk.addMethod(
  1420. "_initializeItems",
  1421. smalltalk.method({
  1422. selector: "initializeItems",
  1423. category: 'accessing',
  1424. fn: function (){
  1425. var self=this;
  1426. return smalltalk.withContext(function($ctx1) { var $1;
  1427. self["@items"]=_st(_st(_st(self)._model())._packages())._sort_((function(a,b){
  1428. return smalltalk.withContext(function($ctx2) { return _st(_st(a)._name()).__lt(_st(b)._name());
  1429. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  1430. $1=self["@items"];
  1431. return $1;
  1432. }, function($ctx1) {$ctx1.fill(self,"initializeItems",{}, smalltalk.HLPackagesListWidget)})},
  1433. args: [],
  1434. source: "initializeItems\x0a\x09^ items := self model packages sort:[:a :b|\x0a\x09\x09\x09\x09\x09\x09a name < b name]",
  1435. messageSends: ["sort:", "<", "name", "packages", "model"],
  1436. referencedClasses: []
  1437. }),
  1438. smalltalk.HLPackagesListWidget);
  1439. smalltalk.addMethod(
  1440. "_items",
  1441. smalltalk.method({
  1442. selector: "items",
  1443. category: 'accessing',
  1444. fn: function (){
  1445. var self=this;
  1446. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1447. $2=self["@items"];
  1448. if(($receiver = $2) == nil || $receiver == undefined){
  1449. $1=_st(self)._initializeItems();
  1450. } else {
  1451. $1=$2;
  1452. };
  1453. return $1;
  1454. }, function($ctx1) {$ctx1.fill(self,"items",{}, smalltalk.HLPackagesListWidget)})},
  1455. args: [],
  1456. source: "items\x0a\x09^ items ifNil: [self initializeItems]",
  1457. messageSends: ["ifNil:", "initializeItems"],
  1458. referencedClasses: []
  1459. }),
  1460. smalltalk.HLPackagesListWidget);
  1461. smalltalk.addMethod(
  1462. "_observeModel",
  1463. smalltalk.method({
  1464. selector: "observeModel",
  1465. category: 'actions',
  1466. fn: function (){
  1467. var self=this;
  1468. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLPackageSelected || HLPackageSelected),(function(ann){
  1469. return smalltalk.withContext(function($ctx2) { return _st(self)._onPackageSelected_(_st(ann)._item());
  1470. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1471. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLPackagesListWidget)})},
  1472. args: [],
  1473. source: "observeModel\x0a self model announcer on: HLPackageSelected do: [ :ann |\x0a \x09self onPackageSelected: ann item ]",
  1474. messageSends: ["on:do:", "onPackageSelected:", "item", "announcer", "model"],
  1475. referencedClasses: ["HLPackageSelected"]
  1476. }),
  1477. smalltalk.HLPackagesListWidget);
  1478. smalltalk.addMethod(
  1479. "_onPackageSelected_",
  1480. smalltalk.method({
  1481. selector: "onPackageSelected:",
  1482. category: 'reactions',
  1483. fn: function (aPackage){
  1484. var self=this;
  1485. return smalltalk.withContext(function($ctx1) { _st(self)._selectedItem_(aPackage);
  1486. _st(self)._focus();
  1487. return self}, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{aPackage:aPackage}, smalltalk.HLPackagesListWidget)})},
  1488. args: ["aPackage"],
  1489. source: "onPackageSelected: aPackage\x0a\x09self selectedItem: aPackage.\x0a\x09self focus",
  1490. messageSends: ["selectedItem:", "focus"],
  1491. referencedClasses: []
  1492. }),
  1493. smalltalk.HLPackagesListWidget);
  1494. smalltalk.addMethod(
  1495. "_renderButtonsOn_",
  1496. smalltalk.method({
  1497. selector: "renderButtonsOn:",
  1498. category: 'rendering',
  1499. fn: function (html){
  1500. var self=this;
  1501. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$5,$6,$7,$8,$4,$9,$10;
  1502. $1=_st(html)._span();
  1503. _st($1)._class_("info");
  1504. $2=_st($1)._with_("Auto commit");
  1505. $3=_st(html)._div();
  1506. _st($3)._class_("btn-group switch");
  1507. _st($3)._at_put_("data-toggle","buttons-radio");
  1508. $4=_st($3)._with_((function(){
  1509. return smalltalk.withContext(function($ctx2) { $5=_st(html)._button();
  1510. _st($5)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  1511. return smalltalk.withContext(function($ctx3) { return _st(str)._nextPutAll_("btn");
  1512. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  1513. $6=_st($5)._with_("On");
  1514. $6;
  1515. $7=_st(html)._button();
  1516. _st($7)._class_(_st((smalltalk.String || String))._streamContents_((function(str){
  1517. return smalltalk.withContext(function($ctx3) { return _st(str)._nextPutAll_("btn active");
  1518. }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx1)})})));
  1519. $8=_st($7)._with_("Off");
  1520. return $8;
  1521. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1522. $9=_st(html)._a();
  1523. _st($9)._class_("btn");
  1524. $10=_st($9)._with_("Commit");
  1525. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.HLPackagesListWidget)})},
  1526. args: ["html"],
  1527. source: "renderButtonsOn: html\x0a\x0a\x09html span class: 'info'; with: 'Auto commit'.\x0a\x09html div \x0a class: 'btn-group switch';\x0a\x09\x09at: 'data-toggle' put: 'buttons-radio';\x0a\x09\x09with: [ \x0a \x09html button \x0a class: (String streamContents: [ :str |\x0a \x09str nextPutAll: 'btn' ]);\x0a \x09\x09\x09\x09with: 'On'.\x0a \x09\x09\x09html button\x0a \x09\x09\x09\x09class: (String streamContents: [ :str |\x0a \x09str nextPutAll: 'btn active' ]);\x0a \x09\x09\x09\x09with: 'Off' ].\x0a \x0a html a \x0a \x09class: 'btn';\x0a\x09\x09\x09with: 'Commit'.",
  1528. messageSends: ["class:", "span", "with:", "div", "at:put:", "streamContents:", "nextPutAll:", "button", "a"],
  1529. referencedClasses: ["String"]
  1530. }),
  1531. smalltalk.HLPackagesListWidget);
  1532. smalltalk.addMethod(
  1533. "_selectItem_",
  1534. smalltalk.method({
  1535. selector: "selectItem:",
  1536. category: 'actions',
  1537. fn: function (aPackage){
  1538. var self=this;
  1539. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._selectedPackage_(aPackage);
  1540. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aPackage:aPackage}, smalltalk.HLPackagesListWidget)})},
  1541. args: ["aPackage"],
  1542. source: "selectItem: aPackage\x0a\x09self model selectedPackage: aPackage",
  1543. messageSends: ["selectedPackage:", "model"],
  1544. referencedClasses: []
  1545. }),
  1546. smalltalk.HLPackagesListWidget);
  1547. smalltalk.addClass('HLProtocolsListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Browser');
  1548. smalltalk.addMethod(
  1549. "_allProtocol",
  1550. smalltalk.method({
  1551. selector: "allProtocol",
  1552. category: 'accessing',
  1553. fn: function (){
  1554. var self=this;
  1555. return smalltalk.withContext(function($ctx1) { var $1;
  1556. $1=_st(_st(self)._model())._allProtocol();
  1557. return $1;
  1558. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{}, smalltalk.HLProtocolsListWidget)})},
  1559. args: [],
  1560. source: "allProtocol\x0a\x09^ self model allProtocol",
  1561. messageSends: ["allProtocol", "model"],
  1562. referencedClasses: []
  1563. }),
  1564. smalltalk.HLProtocolsListWidget);
  1565. smalltalk.addMethod(
  1566. "_observeModel",
  1567. smalltalk.method({
  1568. selector: "observeModel",
  1569. category: 'actions',
  1570. fn: function (){
  1571. var self=this;
  1572. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLClassSelected || HLClassSelected),(function(ann){
  1573. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(ann)._item());
  1574. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1575. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled),(function(ann){
  1576. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(_st(self)._model())._selectedClass());
  1577. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1578. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLProtocolSelected || HLProtocolSelected),(function(ann){
  1579. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(_st(ann)._item());
  1580. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1581. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLProtocolsListWidget)})},
  1582. args: [],
  1583. source: "observeModel\x0a self model announcer on: HLClassSelected do: [ :ann |\x0a \x09self onClassSelected: ann item ].\x0a self model announcer on: HLShowInstanceToggled do: [ :ann |\x0a \x09self onClassSelected: self model selectedClass ].\x0a self model announcer on: HLProtocolSelected do: [ :ann |\x0a \x09self onProtocolSelected: ann item ]",
  1584. messageSends: ["on:do:", "onClassSelected:", "item", "announcer", "model", "selectedClass", "onProtocolSelected:"],
  1585. referencedClasses: ["HLClassSelected", "HLShowInstanceToggled", "HLProtocolSelected"]
  1586. }),
  1587. smalltalk.HLProtocolsListWidget);
  1588. smalltalk.addMethod(
  1589. "_observeSystem",
  1590. smalltalk.method({
  1591. selector: "observeSystem",
  1592. category: 'actions',
  1593. fn: function (){
  1594. var self=this;
  1595. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1596. $1=_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current();
  1597. _st($1)._on_do_((smalltalk.ProtocolAdded || ProtocolAdded),(function(ann){
  1598. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolAdded_to_(_st(ann)._protocol(),_st(ann)._theClass());
  1599. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1600. $2=_st($1)._on_do_((smalltalk.ProtocolRemoved || ProtocolRemoved),(function(ann){
  1601. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolRemoved_from_(_st(ann)._protocol(),_st(ann)._theClass());
  1602. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  1603. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLProtocolsListWidget)})},
  1604. args: [],
  1605. source: "observeSystem\x0a SystemAnnouncer current\x0a \x09on: ProtocolAdded \x0a do: [ :ann | self onProtocolAdded: ann protocol to: ann theClass ];\x0a on: ProtocolRemoved\x0a do: [ :ann | self onProtocolRemoved: ann protocol from: ann theClass ]",
  1606. messageSends: ["on:do:", "onProtocolAdded:to:", "protocol", "theClass", "current", "onProtocolRemoved:from:"],
  1607. referencedClasses: ["ProtocolAdded", "SystemAnnouncer", "ProtocolRemoved"]
  1608. }),
  1609. smalltalk.HLProtocolsListWidget);
  1610. smalltalk.addMethod(
  1611. "_onClassSelected_",
  1612. smalltalk.method({
  1613. selector: "onClassSelected:",
  1614. category: 'reactions',
  1615. fn: function (aClass){
  1616. var self=this;
  1617. return smalltalk.withContext(function($ctx1) { _st(self)._selectedItem_(nil);
  1618. _st(self)._setItemsForSelectedClass();
  1619. _st(self)._refresh();
  1620. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass}, smalltalk.HLProtocolsListWidget)})},
  1621. args: ["aClass"],
  1622. source: "onClassSelected: aClass\x0a self selectedItem: nil.\x0a \x0a self setItemsForSelectedClass.\x0a self refresh",
  1623. messageSends: ["selectedItem:", "setItemsForSelectedClass", "refresh"],
  1624. referencedClasses: []
  1625. }),
  1626. smalltalk.HLProtocolsListWidget);
  1627. smalltalk.addMethod(
  1628. "_onProtocolAdded_to_",
  1629. smalltalk.method({
  1630. selector: "onProtocolAdded:to:",
  1631. category: 'reactions',
  1632. fn: function (aString,aClass){
  1633. var self=this;
  1634. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1635. $1=_st(aClass).__eq(_st(_st(self)._model())._selectedClass());
  1636. if(! smalltalk.assert($1)){
  1637. $2=self;
  1638. return $2;
  1639. };
  1640. _st(self)._setItemsForSelectedClass();
  1641. _st(self)._refresh();
  1642. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolAdded:to:",{aString:aString,aClass:aClass}, smalltalk.HLProtocolsListWidget)})},
  1643. args: ["aString", "aClass"],
  1644. source: "onProtocolAdded: aString to: aClass\x0a\x09aClass = self model selectedClass ifFalse: [ ^ self ].\x0a \x0a self setItemsForSelectedClass.\x0a self refresh",
  1645. messageSends: ["ifFalse:", "=", "selectedClass", "model", "setItemsForSelectedClass", "refresh"],
  1646. referencedClasses: []
  1647. }),
  1648. smalltalk.HLProtocolsListWidget);
  1649. smalltalk.addMethod(
  1650. "_onProtocolRemoved_from_",
  1651. smalltalk.method({
  1652. selector: "onProtocolRemoved:from:",
  1653. category: 'reactions',
  1654. fn: function (aString,aClass){
  1655. var self=this;
  1656. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1657. $1=_st(aClass).__eq(_st(_st(self)._model())._selectedClass());
  1658. if(! smalltalk.assert($1)){
  1659. $2=self;
  1660. return $2;
  1661. };
  1662. $3=_st(_st(_st(self)._model())._selectedProtocol()).__eq(aString);
  1663. if(smalltalk.assert($3)){
  1664. _st(self)._selectItem_(nil);
  1665. };
  1666. _st(self)._setItemsForSelectedClass();
  1667. _st(self)._refresh();
  1668. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolRemoved:from:",{aString:aString,aClass:aClass}, smalltalk.HLProtocolsListWidget)})},
  1669. args: ["aString", "aClass"],
  1670. source: "onProtocolRemoved: aString from: aClass\x0a\x09aClass = self model selectedClass ifFalse: [ ^ self ].\x0a \x0a self model selectedProtocol = aString \x0a \x09ifTrue: [ self selectItem: nil ].\x0a \x0a self setItemsForSelectedClass.\x0a self refresh",
  1671. messageSends: ["ifFalse:", "=", "selectedClass", "model", "ifTrue:", "selectItem:", "selectedProtocol", "setItemsForSelectedClass", "refresh"],
  1672. referencedClasses: []
  1673. }),
  1674. smalltalk.HLProtocolsListWidget);
  1675. smalltalk.addMethod(
  1676. "_onProtocolSelected_",
  1677. smalltalk.method({
  1678. selector: "onProtocolSelected:",
  1679. category: 'reactions',
  1680. fn: function (aString){
  1681. var self=this;
  1682. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1683. _st(self)._selectedItem_(aString);
  1684. $1=aString;
  1685. if(($receiver = $1) == nil || $receiver == undefined){
  1686. $2=self;
  1687. return $2;
  1688. } else {
  1689. $1;
  1690. };
  1691. _st(self)._focus();
  1692. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLProtocolsListWidget)})},
  1693. args: ["aString"],
  1694. source: "onProtocolSelected: aString\x0a\x09self selectedItem: aString.\x0a\x09aString ifNil: [ ^ self ].\x0a \x0a self focus",
  1695. messageSends: ["selectedItem:", "ifNil:", "focus"],
  1696. referencedClasses: []
  1697. }),
  1698. smalltalk.HLProtocolsListWidget);
  1699. smalltalk.addMethod(
  1700. "_renderContentOn_",
  1701. smalltalk.method({
  1702. selector: "renderContentOn:",
  1703. category: 'rendering',
  1704. fn: function (html){
  1705. var self=this;
  1706. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1707. $1=_st(_st(self)._model())._showInstance();
  1708. if(smalltalk.assert($1)){
  1709. smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1710. } else {
  1711. $2=_st(html)._div();
  1712. _st($2)._class_("class_side");
  1713. $3=_st($2)._with_((function(){
  1714. return smalltalk.withContext(function($ctx2) { return smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1715. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1716. $3;
  1717. };
  1718. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLProtocolsListWidget)})},
  1719. args: ["html"],
  1720. 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 ]",
  1721. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model"],
  1722. referencedClasses: []
  1723. }),
  1724. smalltalk.HLProtocolsListWidget);
  1725. smalltalk.addMethod(
  1726. "_selectItem_",
  1727. smalltalk.method({
  1728. selector: "selectItem:",
  1729. category: 'actions',
  1730. fn: function (aString){
  1731. var self=this;
  1732. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._selectedProtocol_(aString);
  1733. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aString:aString}, smalltalk.HLProtocolsListWidget)})},
  1734. args: ["aString"],
  1735. source: "selectItem: aString\x0a self model selectedProtocol: aString",
  1736. messageSends: ["selectedProtocol:", "model"],
  1737. referencedClasses: []
  1738. }),
  1739. smalltalk.HLProtocolsListWidget);
  1740. smalltalk.addMethod(
  1741. "_selectedItem",
  1742. smalltalk.method({
  1743. selector: "selectedItem",
  1744. category: 'accessing',
  1745. fn: function (){
  1746. var self=this;
  1747. return smalltalk.withContext(function($ctx1) { var $1;
  1748. $1=smalltalk.HLBrowserListWidget.fn.prototype._selectedItem.apply(_st(self), []);
  1749. return $1;
  1750. }, function($ctx1) {$ctx1.fill(self,"selectedItem",{}, smalltalk.HLProtocolsListWidget)})},
  1751. args: [],
  1752. source: "selectedItem\x0a\x09^ super selectedItem\x22 ifNil: [ self allProtocol ]\x22",
  1753. messageSends: ["selectedItem"],
  1754. referencedClasses: []
  1755. }),
  1756. smalltalk.HLProtocolsListWidget);
  1757. smalltalk.addMethod(
  1758. "_setItemsForClass_",
  1759. smalltalk.method({
  1760. selector: "setItemsForClass:",
  1761. category: 'private',
  1762. fn: function (aClass){
  1763. var self=this;
  1764. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$2;
  1765. $1=self;
  1766. $3=aClass;
  1767. if(($receiver = $3) == nil || $receiver == undefined){
  1768. $2=_st((smalltalk.Array || Array))._with_(_st(self)._allProtocol());
  1769. } else {
  1770. $4=_st((smalltalk.Array || Array))._with_(_st(self)._allProtocol());
  1771. _st($4)._addAll_(_st(aClass)._protocols());
  1772. $5=_st($4)._yourself();
  1773. $2=$5;
  1774. };
  1775. _st($1)._items_($2);
  1776. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForClass:",{aClass:aClass}, smalltalk.HLProtocolsListWidget)})},
  1777. args: ["aClass"],
  1778. 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 ])",
  1779. messageSends: ["items:", "ifNil:ifNotNil:", "with:", "allProtocol", "addAll:", "protocols", "yourself"],
  1780. referencedClasses: ["Array"]
  1781. }),
  1782. smalltalk.HLProtocolsListWidget);
  1783. smalltalk.addMethod(
  1784. "_setItemsForSelectedClass",
  1785. smalltalk.method({
  1786. selector: "setItemsForSelectedClass",
  1787. category: 'private',
  1788. fn: function (){
  1789. var self=this;
  1790. return smalltalk.withContext(function($ctx1) { _st(self)._setItemsForClass_(_st(_st(self)._model())._selectedClass());
  1791. return self}, function($ctx1) {$ctx1.fill(self,"setItemsForSelectedClass",{}, smalltalk.HLProtocolsListWidget)})},
  1792. args: [],
  1793. source: "setItemsForSelectedClass\x0a\x09self setItemsForClass: self model selectedClass",
  1794. messageSends: ["setItemsForClass:", "selectedClass", "model"],
  1795. referencedClasses: []
  1796. }),
  1797. smalltalk.HLProtocolsListWidget);
  1798. smalltalk.addClass('HLBrowserModel', smalltalk.Object, ['announcer', 'environment', 'selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedSelector', 'showInstance', 'showComment'], 'Helios-Browser');
  1799. smalltalk.addMethod(
  1800. "_allProtocol",
  1801. smalltalk.method({
  1802. selector: "allProtocol",
  1803. category: 'accessing',
  1804. fn: function (){
  1805. var self=this;
  1806. return smalltalk.withContext(function($ctx1) { return "-- All --";
  1807. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{}, smalltalk.HLBrowserModel)})},
  1808. args: [],
  1809. source: "allProtocol\x0a\x09^ '-- All --'",
  1810. messageSends: [],
  1811. referencedClasses: []
  1812. }),
  1813. smalltalk.HLBrowserModel);
  1814. smalltalk.addMethod(
  1815. "_announcer",
  1816. smalltalk.method({
  1817. selector: "announcer",
  1818. category: 'accessing',
  1819. fn: function (){
  1820. var self=this;
  1821. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1822. $2=self["@announcer"];
  1823. if(($receiver = $2) == nil || $receiver == undefined){
  1824. self["@announcer"]=_st((smalltalk.Announcer || Announcer))._new();
  1825. $1=self["@announcer"];
  1826. } else {
  1827. $1=$2;
  1828. };
  1829. return $1;
  1830. }, function($ctx1) {$ctx1.fill(self,"announcer",{}, smalltalk.HLBrowserModel)})},
  1831. args: [],
  1832. source: "announcer\x0a\x09^ announcer ifNil: [ announcer := Announcer new ]",
  1833. messageSends: ["ifNil:", "new"],
  1834. referencedClasses: ["Announcer"]
  1835. }),
  1836. smalltalk.HLBrowserModel);
  1837. smalltalk.addMethod(
  1838. "_environment",
  1839. smalltalk.method({
  1840. selector: "environment",
  1841. category: 'accessing',
  1842. fn: function (){
  1843. var self=this;
  1844. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1845. $2=self["@environment"];
  1846. if(($receiver = $2) == nil || $receiver == undefined){
  1847. $1=_st(_st((smalltalk.HLManager || HLManager))._current())._environment();
  1848. } else {
  1849. $1=$2;
  1850. };
  1851. return $1;
  1852. }, function($ctx1) {$ctx1.fill(self,"environment",{}, smalltalk.HLBrowserModel)})},
  1853. args: [],
  1854. source: "environment\x0a\x09^ environment ifNil: [ HLManager current environment ]",
  1855. messageSends: ["ifNil:", "environment", "current"],
  1856. referencedClasses: ["HLManager"]
  1857. }),
  1858. smalltalk.HLBrowserModel);
  1859. smalltalk.addMethod(
  1860. "_environment_",
  1861. smalltalk.method({
  1862. selector: "environment:",
  1863. category: 'accessing',
  1864. fn: function (anEnvironment){
  1865. var self=this;
  1866. return smalltalk.withContext(function($ctx1) { self["@environment"]=anEnvironment;
  1867. return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment}, smalltalk.HLBrowserModel)})},
  1868. args: ["anEnvironment"],
  1869. source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
  1870. messageSends: [],
  1871. referencedClasses: []
  1872. }),
  1873. smalltalk.HLBrowserModel);
  1874. smalltalk.addMethod(
  1875. "_packages",
  1876. smalltalk.method({
  1877. selector: "packages",
  1878. category: 'accessing',
  1879. fn: function (){
  1880. var self=this;
  1881. return smalltalk.withContext(function($ctx1) { var $1;
  1882. $1=_st(_st(self)._environment())._packages();
  1883. return $1;
  1884. }, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLBrowserModel)})},
  1885. args: [],
  1886. source: "packages\x0a\x09^ self environment packages",
  1887. messageSends: ["packages", "environment"],
  1888. referencedClasses: []
  1889. }),
  1890. smalltalk.HLBrowserModel);
  1891. smalltalk.addMethod(
  1892. "_selectedClass",
  1893. smalltalk.method({
  1894. selector: "selectedClass",
  1895. category: 'accessing',
  1896. fn: function (){
  1897. var self=this;
  1898. return smalltalk.withContext(function($ctx1) { var $1;
  1899. $1=self["@selectedClass"];
  1900. return $1;
  1901. }, function($ctx1) {$ctx1.fill(self,"selectedClass",{}, smalltalk.HLBrowserModel)})},
  1902. args: [],
  1903. source: "selectedClass\x0a\x09^ selectedClass",
  1904. messageSends: [],
  1905. referencedClasses: []
  1906. }),
  1907. smalltalk.HLBrowserModel);
  1908. smalltalk.addMethod(
  1909. "_selectedClass_",
  1910. smalltalk.method({
  1911. selector: "selectedClass:",
  1912. category: 'accessing',
  1913. fn: function (aClass){
  1914. var self=this;
  1915. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  1916. $1=_st(self["@selectedClass"]).__eq(aClass);
  1917. if(smalltalk.assert($1)){
  1918. $2=self;
  1919. return $2;
  1920. };
  1921. $3=aClass;
  1922. if(($receiver = $3) == nil || $receiver == undefined){
  1923. self["@selectedClass"]=nil;
  1924. self["@selectedClass"];
  1925. } else {
  1926. $4=_st(self)._showInstance();
  1927. if(smalltalk.assert($4)){
  1928. self["@selectedClass"]=_st(aClass)._theNonMetaClass();
  1929. self["@selectedClass"];
  1930. } else {
  1931. self["@selectedClass"]=_st(aClass)._theMetaClass();
  1932. self["@selectedClass"];
  1933. };
  1934. };
  1935. _st(self)._selectedProtocol_(nil);
  1936. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLClassSelected || HLClassSelected))._on_(_st(self)._selectedClass()));
  1937. return self}, function($ctx1) {$ctx1.fill(self,"selectedClass:",{aClass:aClass}, smalltalk.HLBrowserModel)})},
  1938. args: ["aClass"],
  1939. source: "selectedClass: aClass\x0a\x09selectedClass = aClass ifTrue: [ ^ self ].\x0a \x0a\x09aClass \x0a \x09\x09ifNil: [ selectedClass := nil ]\x0a \x09ifNotNil: [\x0a\x09\x09\x09self showInstance \x0a \x09\x09\x09\x09ifTrue: [ selectedClass := aClass theNonMetaClass ]\x0a \x09\x09\x09ifFalse: [ selectedClass := aClass theMetaClass ] ].\x0a\x09self selectedProtocol: nil.\x0a\x09self announcer announce: (HLClassSelected on: self selectedClass)",
  1940. messageSends: ["ifTrue:", "=", "ifNil:ifNotNil:", "ifTrue:ifFalse:", "theNonMetaClass", "theMetaClass", "showInstance", "selectedProtocol:", "announce:", "on:", "selectedClass", "announcer"],
  1941. referencedClasses: ["HLClassSelected"]
  1942. }),
  1943. smalltalk.HLBrowserModel);
  1944. smalltalk.addMethod(
  1945. "_selectedMethod",
  1946. smalltalk.method({
  1947. selector: "selectedMethod",
  1948. category: 'accessing',
  1949. fn: function (){
  1950. var self=this;
  1951. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1952. $2=_st(self)._selectedClass();
  1953. if(($receiver = $2) == nil || $receiver == undefined){
  1954. $1=$2;
  1955. } else {
  1956. $1=_st(_st(_st(self)._selectedClass())._methodDictionary())._at_(self["@selectedSelector"]);
  1957. };
  1958. return $1;
  1959. }, function($ctx1) {$ctx1.fill(self,"selectedMethod",{}, smalltalk.HLBrowserModel)})},
  1960. args: [],
  1961. source: "selectedMethod\x0a\x09^ self selectedClass\x0a \x09ifNotNil: [ self selectedClass methodDictionary at: selectedSelector ]",
  1962. messageSends: ["ifNotNil:", "at:", "methodDictionary", "selectedClass"],
  1963. referencedClasses: []
  1964. }),
  1965. smalltalk.HLBrowserModel);
  1966. smalltalk.addMethod(
  1967. "_selectedMethod_",
  1968. smalltalk.method({
  1969. selector: "selectedMethod:",
  1970. category: 'accessing',
  1971. fn: function (aCompiledMethod){
  1972. var self=this;
  1973. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5;
  1974. $1=_st(self["@selectedSelector"]).__eq(aCompiledMethod);
  1975. if(smalltalk.assert($1)){
  1976. $2=self;
  1977. return $2;
  1978. };
  1979. $3=aCompiledMethod;
  1980. if(($receiver = $3) == nil || $receiver == undefined){
  1981. self["@selectedSelector"]=nil;
  1982. self["@selectedSelector"];
  1983. } else {
  1984. $4=_st(self["@selectedSelector"]).__eq(_st(aCompiledMethod)._selector());
  1985. if(smalltalk.assert($4)){
  1986. $5=self;
  1987. return $5;
  1988. };
  1989. self["@selectedSelector"]=_st(aCompiledMethod)._selector();
  1990. self["@selectedSelector"];
  1991. };
  1992. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLMethodSelected || HLMethodSelected))._on_(aCompiledMethod));
  1993. return self}, function($ctx1) {$ctx1.fill(self,"selectedMethod:",{aCompiledMethod:aCompiledMethod}, smalltalk.HLBrowserModel)})},
  1994. args: ["aCompiledMethod"],
  1995. source: "selectedMethod: aCompiledMethod\x0a\x09selectedSelector = aCompiledMethod ifTrue: [ ^ self ].\x0a \x0a aCompiledMethod\x0a \x09ifNil: [ selectedSelector := nil ]\x0a \x09ifNotNil: [\x0a\x09\x09\x09selectedSelector = aCompiledMethod selector ifTrue: [ ^ self ].\x0a\x09\x09\x09selectedSelector := aCompiledMethod selector ].\x0a\x0a self announcer announce: (HLMethodSelected on: aCompiledMethod)",
  1996. messageSends: ["ifTrue:", "=", "ifNil:ifNotNil:", "selector", "announce:", "on:", "announcer"],
  1997. referencedClasses: ["HLMethodSelected"]
  1998. }),
  1999. smalltalk.HLBrowserModel);
  2000. smalltalk.addMethod(
  2001. "_selectedPackage",
  2002. smalltalk.method({
  2003. selector: "selectedPackage",
  2004. category: 'accessing',
  2005. fn: function (){
  2006. var self=this;
  2007. return smalltalk.withContext(function($ctx1) { var $1;
  2008. $1=self["@selectedPackage"];
  2009. return $1;
  2010. }, function($ctx1) {$ctx1.fill(self,"selectedPackage",{}, smalltalk.HLBrowserModel)})},
  2011. args: [],
  2012. source: "selectedPackage\x0a\x09^ selectedPackage",
  2013. messageSends: [],
  2014. referencedClasses: []
  2015. }),
  2016. smalltalk.HLBrowserModel);
  2017. smalltalk.addMethod(
  2018. "_selectedPackage_",
  2019. smalltalk.method({
  2020. selector: "selectedPackage:",
  2021. category: 'accessing',
  2022. fn: function (aPackage){
  2023. var self=this;
  2024. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2025. $1=_st(self["@selectedPackage"]).__eq(aPackage);
  2026. if(smalltalk.assert($1)){
  2027. $2=self;
  2028. return $2;
  2029. };
  2030. self["@selectedPackage"]=aPackage;
  2031. _st(self)._selectedClass_(nil);
  2032. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLPackageSelected || HLPackageSelected))._on_(aPackage));
  2033. return self}, function($ctx1) {$ctx1.fill(self,"selectedPackage:",{aPackage:aPackage}, smalltalk.HLBrowserModel)})},
  2034. args: ["aPackage"],
  2035. source: "selectedPackage: aPackage\x0a\x09selectedPackage = aPackage ifTrue: [ ^ self ].\x0a \x0a\x09selectedPackage := aPackage.\x0a\x09self selectedClass: nil.\x0a self announcer announce: (HLPackageSelected on: aPackage)",
  2036. messageSends: ["ifTrue:", "=", "selectedClass:", "announce:", "on:", "announcer"],
  2037. referencedClasses: ["HLPackageSelected"]
  2038. }),
  2039. smalltalk.HLBrowserModel);
  2040. smalltalk.addMethod(
  2041. "_selectedProtocol",
  2042. smalltalk.method({
  2043. selector: "selectedProtocol",
  2044. category: 'accessing',
  2045. fn: function (){
  2046. var self=this;
  2047. return smalltalk.withContext(function($ctx1) { var $1;
  2048. $1=self["@selectedProtocol"];
  2049. return $1;
  2050. }, function($ctx1) {$ctx1.fill(self,"selectedProtocol",{}, smalltalk.HLBrowserModel)})},
  2051. args: [],
  2052. source: "selectedProtocol\x0a\x09^ selectedProtocol",
  2053. messageSends: [],
  2054. referencedClasses: []
  2055. }),
  2056. smalltalk.HLBrowserModel);
  2057. smalltalk.addMethod(
  2058. "_selectedProtocol_",
  2059. smalltalk.method({
  2060. selector: "selectedProtocol:",
  2061. category: 'accessing',
  2062. fn: function (aString){
  2063. var self=this;
  2064. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2065. $1=_st(self["@selectedProtocol"]).__eq(aString);
  2066. if(smalltalk.assert($1)){
  2067. $2=self;
  2068. return $2;
  2069. };
  2070. self["@selectedProtocol"]=aString;
  2071. _st(self)._selectedMethod_(nil);
  2072. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLProtocolSelected || HLProtocolSelected))._on_(aString));
  2073. return self}, function($ctx1) {$ctx1.fill(self,"selectedProtocol:",{aString:aString}, smalltalk.HLBrowserModel)})},
  2074. args: ["aString"],
  2075. source: "selectedProtocol: aString\x0a\x09selectedProtocol = aString ifTrue: [ ^ self ].\x0a \x0a\x09selectedProtocol := aString.\x0a self selectedMethod: nil.\x0a self announcer announce: (HLProtocolSelected on: aString)",
  2076. messageSends: ["ifTrue:", "=", "selectedMethod:", "announce:", "on:", "announcer"],
  2077. referencedClasses: ["HLProtocolSelected"]
  2078. }),
  2079. smalltalk.HLBrowserModel);
  2080. smalltalk.addMethod(
  2081. "_showComment",
  2082. smalltalk.method({
  2083. selector: "showComment",
  2084. category: 'accessing',
  2085. fn: function (){
  2086. var self=this;
  2087. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2088. $2=self["@showComment"];
  2089. if(($receiver = $2) == nil || $receiver == undefined){
  2090. $1=false;
  2091. } else {
  2092. $1=$2;
  2093. };
  2094. return $1;
  2095. }, function($ctx1) {$ctx1.fill(self,"showComment",{}, smalltalk.HLBrowserModel)})},
  2096. args: [],
  2097. source: "showComment\x0a\x09^ showComment ifNil: [ false ]",
  2098. messageSends: ["ifNil:"],
  2099. referencedClasses: []
  2100. }),
  2101. smalltalk.HLBrowserModel);
  2102. smalltalk.addMethod(
  2103. "_showComment_",
  2104. smalltalk.method({
  2105. selector: "showComment:",
  2106. category: 'accessing',
  2107. fn: function (aBoolean){
  2108. var self=this;
  2109. return smalltalk.withContext(function($ctx1) { self["@showComment"]=aBoolean;
  2110. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLShowCommentToggled || HLShowCommentToggled))._new());
  2111. return self}, function($ctx1) {$ctx1.fill(self,"showComment:",{aBoolean:aBoolean}, smalltalk.HLBrowserModel)})},
  2112. args: ["aBoolean"],
  2113. source: "showComment: aBoolean\x0a\x09showComment := aBoolean.\x0a \x0a self announcer announce: HLShowCommentToggled new",
  2114. messageSends: ["announce:", "new", "announcer"],
  2115. referencedClasses: ["HLShowCommentToggled"]
  2116. }),
  2117. smalltalk.HLBrowserModel);
  2118. smalltalk.addMethod(
  2119. "_showInstance",
  2120. smalltalk.method({
  2121. selector: "showInstance",
  2122. category: 'accessing',
  2123. fn: function (){
  2124. var self=this;
  2125. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2126. $2=self["@showInstance"];
  2127. if(($receiver = $2) == nil || $receiver == undefined){
  2128. $1=true;
  2129. } else {
  2130. $1=$2;
  2131. };
  2132. return $1;
  2133. }, function($ctx1) {$ctx1.fill(self,"showInstance",{}, smalltalk.HLBrowserModel)})},
  2134. args: [],
  2135. source: "showInstance\x0a\x09^ showInstance ifNil: [ true ]",
  2136. messageSends: ["ifNil:"],
  2137. referencedClasses: []
  2138. }),
  2139. smalltalk.HLBrowserModel);
  2140. smalltalk.addMethod(
  2141. "_showInstance_",
  2142. smalltalk.method({
  2143. selector: "showInstance:",
  2144. category: 'accessing',
  2145. fn: function (aBoolean){
  2146. var self=this;
  2147. return smalltalk.withContext(function($ctx1) { var $1,$2,$4,$3;
  2148. self["@showInstance"]=aBoolean;
  2149. $1=_st(self)._selectedClass();
  2150. if(($receiver = $1) == nil || $receiver == undefined){
  2151. $1;
  2152. } else {
  2153. $2=self;
  2154. $4=aBoolean;
  2155. if(smalltalk.assert($4)){
  2156. $3=_st(_st(self)._selectedClass())._theNonMetaClass();
  2157. } else {
  2158. $3=_st(_st(self)._selectedClass())._theMetaClass();
  2159. };
  2160. _st($2)._selectedClass_($3);
  2161. };
  2162. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled))._new());
  2163. return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean}, smalltalk.HLBrowserModel)})},
  2164. args: ["aBoolean"],
  2165. source: "showInstance: aBoolean\x0a\x09showInstance := aBoolean.\x0a \x0a self selectedClass ifNotNil: [\x0a \x09self selectedClass: (aBoolean\x0a \x09\x09ifTrue: [self selectedClass theNonMetaClass ]\x0a \x09 \x09ifFalse: [ self selectedClass theMetaClass ]) ].\x0a \x0a self announcer announce: HLShowInstanceToggled new",
  2166. messageSends: ["ifNotNil:", "selectedClass:", "ifTrue:ifFalse:", "theNonMetaClass", "selectedClass", "theMetaClass", "announce:", "new", "announcer"],
  2167. referencedClasses: ["HLShowInstanceToggled"]
  2168. }),
  2169. smalltalk.HLBrowserModel);
  2170. smalltalk.addMethod(
  2171. "_on_",
  2172. smalltalk.method({
  2173. selector: "on:",
  2174. category: 'actions',
  2175. fn: function (anEnvironment){
  2176. var self=this;
  2177. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  2178. $2=_st(self)._new();
  2179. _st($2)._environment_(anEnvironment);
  2180. $3=_st($2)._yourself();
  2181. $1=$3;
  2182. return $1;
  2183. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment}, smalltalk.HLBrowserModel.klass)})},
  2184. args: ["anEnvironment"],
  2185. source: "on: anEnvironment\x0a\x0a\x09^ self new\x0a \x09environment: anEnvironment;\x0a yourself",
  2186. messageSends: ["environment:", "new", "yourself"],
  2187. referencedClasses: []
  2188. }),
  2189. smalltalk.HLBrowserModel.klass);
  2190. smalltalk.addClass('HLBrowserSourceWidget', smalltalk.HLWidget, ['model', 'methodContents', 'codeWidget'], 'Helios-Browser');
  2191. smalltalk.addMethod(
  2192. "_codeWidget",
  2193. smalltalk.method({
  2194. selector: "codeWidget",
  2195. category: 'accessing',
  2196. fn: function (){
  2197. var self=this;
  2198. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2199. $2=self["@codeWidget"];
  2200. if(($receiver = $2) == nil || $receiver == undefined){
  2201. self["@codeWidget"]=_st((smalltalk.HLCodeWidget || HLCodeWidget))._new();
  2202. $1=self["@codeWidget"];
  2203. } else {
  2204. $1=$2;
  2205. };
  2206. return $1;
  2207. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{}, smalltalk.HLBrowserSourceWidget)})},
  2208. args: [],
  2209. source: "codeWidget\x0a\x09^ codeWidget ifNil: [ codeWidget := HLCodeWidget new ]",
  2210. messageSends: ["ifNil:", "new"],
  2211. referencedClasses: ["HLCodeWidget"]
  2212. }),
  2213. smalltalk.HLBrowserSourceWidget);
  2214. smalltalk.addMethod(
  2215. "_contents",
  2216. smalltalk.method({
  2217. selector: "contents",
  2218. category: 'accessing',
  2219. fn: function (){
  2220. var self=this;
  2221. return smalltalk.withContext(function($ctx1) { var $1;
  2222. $1=_st(_st(self)._codeWidget())._contents();
  2223. return $1;
  2224. }, function($ctx1) {$ctx1.fill(self,"contents",{}, smalltalk.HLBrowserSourceWidget)})},
  2225. args: [],
  2226. source: "contents\x0a\x09^ self codeWidget contents",
  2227. messageSends: ["contents", "codeWidget"],
  2228. referencedClasses: []
  2229. }),
  2230. smalltalk.HLBrowserSourceWidget);
  2231. smalltalk.addMethod(
  2232. "_contents_",
  2233. smalltalk.method({
  2234. selector: "contents:",
  2235. category: 'accessing',
  2236. fn: function (aString){
  2237. var self=this;
  2238. return smalltalk.withContext(function($ctx1) { _st(self)._methodContents_(aString);
  2239. _st(_st(self)._codeWidget())._contents_(aString);
  2240. return self}, function($ctx1) {$ctx1.fill(self,"contents:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  2241. args: ["aString"],
  2242. source: "contents: aString\x0a\x09self methodContents: aString.\x0a\x09self codeWidget contents: aString",
  2243. messageSends: ["methodContents:", "contents:", "codeWidget"],
  2244. referencedClasses: []
  2245. }),
  2246. smalltalk.HLBrowserSourceWidget);
  2247. smalltalk.addMethod(
  2248. "_hasModification",
  2249. smalltalk.method({
  2250. selector: "hasModification",
  2251. category: 'testing',
  2252. fn: function (){
  2253. var self=this;
  2254. return smalltalk.withContext(function($ctx1) { var $1;
  2255. $1=_st(_st(_st(self)._methodContents()).__eq(_st(self)._contents()))._not();
  2256. return $1;
  2257. }, function($ctx1) {$ctx1.fill(self,"hasModification",{}, smalltalk.HLBrowserSourceWidget)})},
  2258. args: [],
  2259. source: "hasModification\x0a\x09^ (self methodContents = self contents) not",
  2260. messageSends: ["not", "=", "contents", "methodContents"],
  2261. referencedClasses: []
  2262. }),
  2263. smalltalk.HLBrowserSourceWidget);
  2264. smalltalk.addMethod(
  2265. "_initialize",
  2266. smalltalk.method({
  2267. selector: "initialize",
  2268. category: 'initialization',
  2269. fn: function (){
  2270. var self=this;
  2271. return smalltalk.withContext(function($ctx1) { smalltalk.HLWidget.fn.prototype._initialize.apply(_st(self), []);
  2272. _st(self)._observeSystem();
  2273. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLBrowserSourceWidget)})},
  2274. args: [],
  2275. source: "initialize\x0a\x09super initialize.\x0a \x0a self observeSystem",
  2276. messageSends: ["initialize", "observeSystem"],
  2277. referencedClasses: []
  2278. }),
  2279. smalltalk.HLBrowserSourceWidget);
  2280. smalltalk.addMethod(
  2281. "_methodContents",
  2282. smalltalk.method({
  2283. selector: "methodContents",
  2284. category: 'accessing',
  2285. fn: function (){
  2286. var self=this;
  2287. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2288. $2=self["@methodContents"];
  2289. if(($receiver = $2) == nil || $receiver == undefined){
  2290. self["@methodContents"]="";
  2291. $1=self["@methodContents"];
  2292. } else {
  2293. $1=$2;
  2294. };
  2295. return $1;
  2296. }, function($ctx1) {$ctx1.fill(self,"methodContents",{}, smalltalk.HLBrowserSourceWidget)})},
  2297. args: [],
  2298. source: "methodContents\x0a\x09^ methodContents ifNil: [ methodContents := '' ]",
  2299. messageSends: ["ifNil:"],
  2300. referencedClasses: []
  2301. }),
  2302. smalltalk.HLBrowserSourceWidget);
  2303. smalltalk.addMethod(
  2304. "_methodContents_",
  2305. smalltalk.method({
  2306. selector: "methodContents:",
  2307. category: 'accessing',
  2308. fn: function (aString){
  2309. var self=this;
  2310. return smalltalk.withContext(function($ctx1) { self["@methodContents"]=aString;
  2311. return self}, function($ctx1) {$ctx1.fill(self,"methodContents:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  2312. args: ["aString"],
  2313. source: "methodContents: aString\x0a\x09methodContents := aString",
  2314. messageSends: [],
  2315. referencedClasses: []
  2316. }),
  2317. smalltalk.HLBrowserSourceWidget);
  2318. smalltalk.addMethod(
  2319. "_model",
  2320. smalltalk.method({
  2321. selector: "model",
  2322. category: 'accessing',
  2323. fn: function (){
  2324. var self=this;
  2325. return smalltalk.withContext(function($ctx1) { var $1;
  2326. $1=self["@model"];
  2327. return $1;
  2328. }, function($ctx1) {$ctx1.fill(self,"model",{}, smalltalk.HLBrowserSourceWidget)})},
  2329. args: [],
  2330. source: "model\x0a\x09^ model",
  2331. messageSends: [],
  2332. referencedClasses: []
  2333. }),
  2334. smalltalk.HLBrowserSourceWidget);
  2335. smalltalk.addMethod(
  2336. "_model_",
  2337. smalltalk.method({
  2338. selector: "model:",
  2339. category: 'accessing',
  2340. fn: function (aBrowserModel){
  2341. var self=this;
  2342. return smalltalk.withContext(function($ctx1) { self["@model"]=aBrowserModel;
  2343. _st(self)._observeModel();
  2344. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel}, smalltalk.HLBrowserSourceWidget)})},
  2345. args: ["aBrowserModel"],
  2346. source: "model: aBrowserModel\x0a\x09model := aBrowserModel.\x0a \x0a self observeModel",
  2347. messageSends: ["observeModel"],
  2348. referencedClasses: []
  2349. }),
  2350. smalltalk.HLBrowserSourceWidget);
  2351. smalltalk.addMethod(
  2352. "_observeModel",
  2353. smalltalk.method({
  2354. selector: "observeModel",
  2355. category: 'actions',
  2356. fn: function (){
  2357. var self=this;
  2358. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLMethodSelected || HLMethodSelected),(function(ann){
  2359. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodSelected_(_st(ann)._item());
  2360. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2361. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLClassSelected || HLClassSelected),(function(ann){
  2362. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(ann)._item());
  2363. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2364. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLProtocolSelected || HLProtocolSelected),(function(ann){
  2365. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(_st(ann)._item());
  2366. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2367. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLBrowserSourceWidget)})},
  2368. args: [],
  2369. source: "observeModel\x0a\x09self model announcer on: HLMethodSelected do: [ :ann |\x0a \x09self onMethodSelected: ann item ].\x0a self model announcer on: HLClassSelected do: [ :ann |\x0a \x09self onClassSelected: ann item ].\x0a self model announcer on: HLProtocolSelected do: [ :ann |\x0a \x09self onProtocolSelected: ann item ]",
  2370. messageSends: ["on:do:", "onMethodSelected:", "item", "announcer", "model", "onClassSelected:", "onProtocolSelected:"],
  2371. referencedClasses: ["HLMethodSelected", "HLClassSelected", "HLProtocolSelected"]
  2372. }),
  2373. smalltalk.HLBrowserSourceWidget);
  2374. smalltalk.addMethod(
  2375. "_observeSystem",
  2376. smalltalk.method({
  2377. selector: "observeSystem",
  2378. category: 'actions',
  2379. fn: function (){
  2380. var self=this;
  2381. return smalltalk.withContext(function($ctx1) { _st(_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current())._on_do_((smalltalk.MethodModified || MethodModified),(function(ann){
  2382. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodModified_(_st(ann)._method());
  2383. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2384. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLBrowserSourceWidget)})},
  2385. args: [],
  2386. source: "observeSystem\x0a\x09SystemAnnouncer current\x0a \x09on: MethodModified\x0a do: [ :ann | self onMethodModified: ann method ]",
  2387. messageSends: ["on:do:", "onMethodModified:", "method", "current"],
  2388. referencedClasses: ["MethodModified", "SystemAnnouncer"]
  2389. }),
  2390. smalltalk.HLBrowserSourceWidget);
  2391. smalltalk.addMethod(
  2392. "_onClassSelected_",
  2393. smalltalk.method({
  2394. selector: "onClassSelected:",
  2395. category: 'reactions',
  2396. fn: function (aClass){
  2397. var self=this;
  2398. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2399. $1=aClass;
  2400. if(($receiver = $1) == nil || $receiver == undefined){
  2401. $2=_st(self)._contents_("");
  2402. return $2;
  2403. } else {
  2404. $1;
  2405. };
  2406. _st(self)._contents_(_st(aClass)._definition());
  2407. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass}, smalltalk.HLBrowserSourceWidget)})},
  2408. args: ["aClass"],
  2409. source: "onClassSelected: aClass\x0a\x09aClass ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: aClass definition",
  2410. messageSends: ["ifNil:", "contents:", "definition"],
  2411. referencedClasses: []
  2412. }),
  2413. smalltalk.HLBrowserSourceWidget);
  2414. smalltalk.addMethod(
  2415. "_onMethodModified_",
  2416. smalltalk.method({
  2417. selector: "onMethodModified:",
  2418. category: 'reactions',
  2419. fn: function (aMethod){
  2420. var self=this;
  2421. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  2422. $1=_st(_st(_st(self)._model())._selectedClass()).__eq(_st(aMethod)._methodClass());
  2423. if(! smalltalk.assert($1)){
  2424. $2=self;
  2425. return $2;
  2426. };
  2427. $3=_st(_st(_st(_st(self)._model())._selectedMethod())._selector()).__eq(_st(aMethod)._selector());
  2428. if(! smalltalk.assert($3)){
  2429. $4=self;
  2430. return $4;
  2431. };
  2432. _st(self)._refresh();
  2433. return self}, function($ctx1) {$ctx1.fill(self,"onMethodModified:",{aMethod:aMethod}, smalltalk.HLBrowserSourceWidget)})},
  2434. args: ["aMethod"],
  2435. source: "onMethodModified: aMethod\x0a\x0a\x09self model selectedClass = aMethod methodClass ifFalse: [ ^ self ].\x0a self model selectedMethod selector = aMethod selector ifFalse: [ ^ self ].\x0a\x0a self refresh",
  2436. messageSends: ["ifFalse:", "=", "methodClass", "selectedClass", "model", "selector", "selectedMethod", "refresh"],
  2437. referencedClasses: []
  2438. }),
  2439. smalltalk.HLBrowserSourceWidget);
  2440. smalltalk.addMethod(
  2441. "_onMethodSelected_",
  2442. smalltalk.method({
  2443. selector: "onMethodSelected:",
  2444. category: 'reactions',
  2445. fn: function (aCompiledMethod){
  2446. var self=this;
  2447. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2448. $1=aCompiledMethod;
  2449. if(($receiver = $1) == nil || $receiver == undefined){
  2450. $2=_st(self)._contents_("");
  2451. return $2;
  2452. } else {
  2453. $1;
  2454. };
  2455. _st(self)._contents_(_st(aCompiledMethod)._source());
  2456. return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aCompiledMethod:aCompiledMethod}, smalltalk.HLBrowserSourceWidget)})},
  2457. args: ["aCompiledMethod"],
  2458. source: "onMethodSelected: aCompiledMethod\x0a\x09aCompiledMethod ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: aCompiledMethod source",
  2459. messageSends: ["ifNil:", "contents:", "source"],
  2460. referencedClasses: []
  2461. }),
  2462. smalltalk.HLBrowserSourceWidget);
  2463. smalltalk.addMethod(
  2464. "_onProtocolSelected_",
  2465. smalltalk.method({
  2466. selector: "onProtocolSelected:",
  2467. category: 'reactions',
  2468. fn: function (aString){
  2469. var self=this;
  2470. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2471. $1=_st(_st(self)._model())._selectedClass();
  2472. if(($receiver = $1) == nil || $receiver == undefined){
  2473. $2=_st(self)._contents_("");
  2474. return $2;
  2475. } else {
  2476. $1;
  2477. };
  2478. _st(self)._contents_(_st(_st(_st(self)._model())._selectedClass())._definition());
  2479. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  2480. args: ["aString"],
  2481. source: "onProtocolSelected: aString\x0a\x09self model selectedClass ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: self model selectedClass definition",
  2482. messageSends: ["ifNil:", "contents:", "selectedClass", "model", "definition"],
  2483. referencedClasses: []
  2484. }),
  2485. smalltalk.HLBrowserSourceWidget);
  2486. smalltalk.addMethod(
  2487. "_refresh",
  2488. smalltalk.method({
  2489. selector: "refresh",
  2490. category: 'updating',
  2491. fn: function (){
  2492. var self=this;
  2493. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2494. $1=_st(self)._hasModification();
  2495. if(smalltalk.assert($1)){
  2496. $2=self;
  2497. return $2;
  2498. };
  2499. _st(self)._contents_(_st(_st(_st(self)._model())._selectedMethod())._source());
  2500. smalltalk.HLWidget.fn.prototype._refresh.apply(_st(self), []);
  2501. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{}, smalltalk.HLBrowserSourceWidget)})},
  2502. args: [],
  2503. source: "refresh\x0a\x09self hasModification ifTrue: [ ^ self ].\x0a \x0a\x09self contents: self model selectedMethod source.\x0a super refresh",
  2504. messageSends: ["ifTrue:", "hasModification", "contents:", "source", "selectedMethod", "model", "refresh"],
  2505. referencedClasses: []
  2506. }),
  2507. smalltalk.HLBrowserSourceWidget);
  2508. smalltalk.addMethod(
  2509. "_renderContentOn_",
  2510. smalltalk.method({
  2511. selector: "renderContentOn:",
  2512. category: 'rendering',
  2513. fn: function (html){
  2514. var self=this;
  2515. return smalltalk.withContext(function($ctx1) { _st(_st(self)._codeWidget())._renderOn_(html);
  2516. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLBrowserSourceWidget)})},
  2517. args: ["html"],
  2518. source: "renderContentOn: html\x0a\x09self codeWidget renderOn: html",
  2519. messageSends: ["renderOn:", "codeWidget"],
  2520. referencedClasses: []
  2521. }),
  2522. smalltalk.HLBrowserSourceWidget);
  2523. smalltalk.addMethod(
  2524. "_on_",
  2525. smalltalk.method({
  2526. selector: "on:",
  2527. category: 'instance creation',
  2528. fn: function (aBrowserModel){
  2529. var self=this;
  2530. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  2531. $2=_st(self)._new();
  2532. _st($2)._model_(aBrowserModel);
  2533. $3=_st($2)._yourself();
  2534. $1=$3;
  2535. return $1;
  2536. }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowserModel:aBrowserModel}, smalltalk.HLBrowserSourceWidget.klass)})},
  2537. args: ["aBrowserModel"],
  2538. source: "on: aBrowserModel\x0a\x09^ self new\x0a \x09model: aBrowserModel;\x0a yourself",
  2539. messageSends: ["model:", "new", "yourself"],
  2540. referencedClasses: []
  2541. }),
  2542. smalltalk.HLBrowserSourceWidget.klass);
  2543. smalltalk.addClass('HLClassCache', smalltalk.Object, ['class', 'selectorsCache', 'overrideCache', 'overriddenCache'], 'Helios-Browser');
  2544. smalltalk.addMethod(
  2545. "_invalidateChildrenSelector_",
  2546. smalltalk.method({
  2547. selector: "invalidateChildrenSelector:",
  2548. category: 'actions',
  2549. fn: function (aSelector){
  2550. var self=this;
  2551. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2552. _st(_st(_st(self)._theClass())._subclasses())._do_((function(each){
  2553. return smalltalk.withContext(function($ctx2) { $1=_st(_st(self)._selectorsCache())._cacheFor_(each);
  2554. _st($1)._removeSelector_(aSelector);
  2555. $2=_st($1)._invalidateChildrenSelector_(aSelector);
  2556. return $2;
  2557. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2558. return self}, function($ctx1) {$ctx1.fill(self,"invalidateChildrenSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2559. args: ["aSelector"],
  2560. source: "invalidateChildrenSelector: aSelector\x0a\x09self theClass subclasses do: [ :each |\x0a \x09(self selectorsCache cacheFor: each)\x0a \x09removeSelector: aSelector;\x0a \x09invalidateChildrenSelector: aSelector ]",
  2561. messageSends: ["do:", "removeSelector:", "cacheFor:", "selectorsCache", "invalidateChildrenSelector:", "subclasses", "theClass"],
  2562. referencedClasses: []
  2563. }),
  2564. smalltalk.HLClassCache);
  2565. smalltalk.addMethod(
  2566. "_invalidateParentSelector_",
  2567. smalltalk.method({
  2568. selector: "invalidateParentSelector:",
  2569. category: 'actions',
  2570. fn: function (aSelector){
  2571. var self=this;
  2572. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2573. $1=_st(_st(self)._theClass())._superclass();
  2574. if(($receiver = $1) == nil || $receiver == undefined){
  2575. $1;
  2576. } else {
  2577. $2=_st(_st(self)._selectorsCache())._cacheFor_(_st(_st(self)._theClass())._superclass());
  2578. _st($2)._removeSelector_(aSelector);
  2579. $3=_st($2)._invalidateParentSelector_(aSelector);
  2580. $3;
  2581. };
  2582. return self}, function($ctx1) {$ctx1.fill(self,"invalidateParentSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2583. args: ["aSelector"],
  2584. source: "invalidateParentSelector: aSelector\x0a\x09self theClass superclass ifNotNil: [\x0a \x09(self selectorsCache cacheFor: self theClass superclass)\x0a \x09removeSelector: aSelector;\x0a\x09\x09\x09invalidateParentSelector: aSelector ]",
  2585. messageSends: ["ifNotNil:", "removeSelector:", "cacheFor:", "superclass", "theClass", "selectorsCache", "invalidateParentSelector:"],
  2586. referencedClasses: []
  2587. }),
  2588. smalltalk.HLClassCache);
  2589. smalltalk.addMethod(
  2590. "_invalidateSelector_",
  2591. smalltalk.method({
  2592. selector: "invalidateSelector:",
  2593. category: 'actions',
  2594. fn: function (aSelector){
  2595. var self=this;
  2596. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2597. $1=self;
  2598. _st($1)._invalidateParentSelector_(aSelector);
  2599. _st($1)._invalidateChildrenSelector_(aSelector);
  2600. $2=_st($1)._removeSelector_(aSelector);
  2601. return self}, function($ctx1) {$ctx1.fill(self,"invalidateSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2602. args: ["aSelector"],
  2603. source: "invalidateSelector: aSelector\x0a\x09self \x0a \x09invalidateParentSelector: aSelector;\x0a invalidateChildrenSelector: aSelector;\x0a removeSelector: aSelector",
  2604. messageSends: ["invalidateParentSelector:", "invalidateChildrenSelector:", "removeSelector:"],
  2605. referencedClasses: []
  2606. }),
  2607. smalltalk.HLClassCache);
  2608. smalltalk.addMethod(
  2609. "_isOverridden_",
  2610. smalltalk.method({
  2611. selector: "isOverridden:",
  2612. category: 'testing',
  2613. fn: function (aMethod){
  2614. var self=this;
  2615. return smalltalk.withContext(function($ctx1) { var $1;
  2616. $1=_st(_st(self)._overriddenCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  2617. return smalltalk.withContext(function($ctx2) { return _st(aMethod)._isOverridden();
  2618. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2619. return $1;
  2620. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLClassCache)})},
  2621. args: ["aMethod"],
  2622. source: "isOverridden: aMethod\x0a\x09^ self overriddenCache \x0a \x09at: aMethod selector\x0a \x09ifAbsentPut: [ aMethod isOverridden ]",
  2623. messageSends: ["at:ifAbsentPut:", "selector", "isOverridden", "overriddenCache"],
  2624. referencedClasses: []
  2625. }),
  2626. smalltalk.HLClassCache);
  2627. smalltalk.addMethod(
  2628. "_isOverride_",
  2629. smalltalk.method({
  2630. selector: "isOverride:",
  2631. category: 'testing',
  2632. fn: function (aMethod){
  2633. var self=this;
  2634. return smalltalk.withContext(function($ctx1) { var $1;
  2635. $1=_st(_st(self)._overrideCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  2636. return smalltalk.withContext(function($ctx2) { return _st(aMethod)._isOverride();
  2637. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2638. return $1;
  2639. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLClassCache)})},
  2640. args: ["aMethod"],
  2641. source: "isOverride: aMethod\x0a\x09^ self overrideCache\x0a \x09at: aMethod selector\x0a \x09ifAbsentPut: [ aMethod isOverride ]",
  2642. messageSends: ["at:ifAbsentPut:", "selector", "isOverride", "overrideCache"],
  2643. referencedClasses: []
  2644. }),
  2645. smalltalk.HLClassCache);
  2646. smalltalk.addMethod(
  2647. "_overriddenCache",
  2648. smalltalk.method({
  2649. selector: "overriddenCache",
  2650. category: 'accessing',
  2651. fn: function (){
  2652. var self=this;
  2653. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2654. $2=self["@overriddenCache"];
  2655. if(($receiver = $2) == nil || $receiver == undefined){
  2656. self["@overriddenCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2657. $1=self["@overriddenCache"];
  2658. } else {
  2659. $1=$2;
  2660. };
  2661. return $1;
  2662. }, function($ctx1) {$ctx1.fill(self,"overriddenCache",{}, smalltalk.HLClassCache)})},
  2663. args: [],
  2664. source: "overriddenCache\x0a\x09^ overriddenCache ifNil: [ overriddenCache := HashedCollection new ]",
  2665. messageSends: ["ifNil:", "new"],
  2666. referencedClasses: ["HashedCollection"]
  2667. }),
  2668. smalltalk.HLClassCache);
  2669. smalltalk.addMethod(
  2670. "_overrideCache",
  2671. smalltalk.method({
  2672. selector: "overrideCache",
  2673. category: 'accessing',
  2674. fn: function (){
  2675. var self=this;
  2676. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2677. $2=self["@overrideCache"];
  2678. if(($receiver = $2) == nil || $receiver == undefined){
  2679. self["@overrideCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2680. $1=self["@overrideCache"];
  2681. } else {
  2682. $1=$2;
  2683. };
  2684. return $1;
  2685. }, function($ctx1) {$ctx1.fill(self,"overrideCache",{}, smalltalk.HLClassCache)})},
  2686. args: [],
  2687. source: "overrideCache\x0a\x09^ overrideCache ifNil: [ overrideCache := HashedCollection new ]",
  2688. messageSends: ["ifNil:", "new"],
  2689. referencedClasses: ["HashedCollection"]
  2690. }),
  2691. smalltalk.HLClassCache);
  2692. smalltalk.addMethod(
  2693. "_removeSelector_",
  2694. smalltalk.method({
  2695. selector: "removeSelector:",
  2696. category: 'private',
  2697. fn: function (aSelector){
  2698. var self=this;
  2699. return smalltalk.withContext(function($ctx1) { _st(_st(self)._overriddenCache())._removeKey_ifAbsent_(aSelector,(function(){
  2700. return smalltalk.withContext(function($ctx2) { }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2701. _st(_st(self)._overrideCache())._removeKey_ifAbsent_(aSelector,(function(){
  2702. return smalltalk.withContext(function($ctx2) { }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2703. return self}, function($ctx1) {$ctx1.fill(self,"removeSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2704. args: ["aSelector"],
  2705. source: "removeSelector: aSelector\x0a\x09self overriddenCache \x0a \x09removeKey: aSelector\x0a ifAbsent: [ ].\x0a self overrideCache \x0a \x09removeKey: aSelector\x0a ifAbsent: [ ]",
  2706. messageSends: ["removeKey:ifAbsent:", "overriddenCache", "overrideCache"],
  2707. referencedClasses: []
  2708. }),
  2709. smalltalk.HLClassCache);
  2710. smalltalk.addMethod(
  2711. "_selectorsCache",
  2712. smalltalk.method({
  2713. selector: "selectorsCache",
  2714. category: 'accessing',
  2715. fn: function (){
  2716. var self=this;
  2717. return smalltalk.withContext(function($ctx1) { var $1;
  2718. $1=self["@selectorsCache"];
  2719. return $1;
  2720. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{}, smalltalk.HLClassCache)})},
  2721. args: [],
  2722. source: "selectorsCache\x0a\x09^ selectorsCache",
  2723. messageSends: [],
  2724. referencedClasses: []
  2725. }),
  2726. smalltalk.HLClassCache);
  2727. smalltalk.addMethod(
  2728. "_selectorsCache_",
  2729. smalltalk.method({
  2730. selector: "selectorsCache:",
  2731. category: 'accessing',
  2732. fn: function (aCache){
  2733. var self=this;
  2734. return smalltalk.withContext(function($ctx1) { self["@selectorsCache"]=aCache;
  2735. return self}, function($ctx1) {$ctx1.fill(self,"selectorsCache:",{aCache:aCache}, smalltalk.HLClassCache)})},
  2736. args: ["aCache"],
  2737. source: "selectorsCache: aCache\x0a\x09selectorsCache := aCache",
  2738. messageSends: [],
  2739. referencedClasses: []
  2740. }),
  2741. smalltalk.HLClassCache);
  2742. smalltalk.addMethod(
  2743. "_theClass",
  2744. smalltalk.method({
  2745. selector: "theClass",
  2746. category: 'accessing',
  2747. fn: function (){
  2748. var self=this;
  2749. return smalltalk.withContext(function($ctx1) { var $1;
  2750. $1=self["@class"];
  2751. return $1;
  2752. }, function($ctx1) {$ctx1.fill(self,"theClass",{}, smalltalk.HLClassCache)})},
  2753. args: [],
  2754. source: "theClass\x0a\x09^ class",
  2755. messageSends: [],
  2756. referencedClasses: []
  2757. }),
  2758. smalltalk.HLClassCache);
  2759. smalltalk.addMethod(
  2760. "_theClass_",
  2761. smalltalk.method({
  2762. selector: "theClass:",
  2763. category: 'accessing',
  2764. fn: function (aClass){
  2765. var self=this;
  2766. return smalltalk.withContext(function($ctx1) { self["@class"]=aClass;
  2767. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass}, smalltalk.HLClassCache)})},
  2768. args: ["aClass"],
  2769. source: "theClass: aClass\x0a\x09class := aClass",
  2770. messageSends: [],
  2771. referencedClasses: []
  2772. }),
  2773. smalltalk.HLClassCache);
  2774. smalltalk.addMethod(
  2775. "_on_selectorsCache_",
  2776. smalltalk.method({
  2777. selector: "on:selectorsCache:",
  2778. category: 'instance creation',
  2779. fn: function (aClass,aSelectorsCache){
  2780. var self=this;
  2781. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  2782. $2=_st(self)._new();
  2783. _st($2)._theClass_(aClass);
  2784. _st($2)._selectorsCache_(aSelectorsCache);
  2785. $3=_st($2)._yourself();
  2786. $1=$3;
  2787. return $1;
  2788. }, function($ctx1) {$ctx1.fill(self,"on:selectorsCache:",{aClass:aClass,aSelectorsCache:aSelectorsCache}, smalltalk.HLClassCache.klass)})},
  2789. args: ["aClass", "aSelectorsCache"],
  2790. source: "on: aClass selectorsCache: aSelectorsCache\x0a\x09^ self new\x0a \x09theClass: aClass;\x0a selectorsCache: aSelectorsCache;\x0a yourself",
  2791. messageSends: ["theClass:", "new", "selectorsCache:", "yourself"],
  2792. referencedClasses: []
  2793. }),
  2794. smalltalk.HLClassCache.klass);
  2795. smalltalk.addClass('HLSelectorsCache', smalltalk.Object, ['classesCache'], 'Helios-Browser');
  2796. smalltalk.addMethod(
  2797. "_cacheFor_",
  2798. smalltalk.method({
  2799. selector: "cacheFor:",
  2800. category: 'accessing',
  2801. fn: function (aClass){
  2802. var self=this;
  2803. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2804. $1=aClass;
  2805. if(($receiver = $1) == nil || $receiver == undefined){
  2806. return nil;
  2807. } else {
  2808. $1;
  2809. };
  2810. $2=_st(_st(self)._classesCache())._at_ifAbsentPut_(_st(aClass)._name(),(function(){
  2811. return smalltalk.withContext(function($ctx2) { return _st(self)._newCacheFor_(aClass);
  2812. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2813. return $2;
  2814. }, function($ctx1) {$ctx1.fill(self,"cacheFor:",{aClass:aClass}, smalltalk.HLSelectorsCache)})},
  2815. args: ["aClass"],
  2816. source: "cacheFor: aClass\x0a\x09aClass ifNil: [ ^ nil ].\x0a \x0a\x09^ self classesCache\x0a \x09at: aClass name\x0a ifAbsentPut: [ self newCacheFor: aClass ]",
  2817. messageSends: ["ifNil:", "at:ifAbsentPut:", "name", "newCacheFor:", "classesCache"],
  2818. referencedClasses: []
  2819. }),
  2820. smalltalk.HLSelectorsCache);
  2821. smalltalk.addMethod(
  2822. "_classesCache",
  2823. smalltalk.method({
  2824. selector: "classesCache",
  2825. category: 'accessing',
  2826. fn: function (){
  2827. var self=this;
  2828. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2829. $2=self["@classesCache"];
  2830. if(($receiver = $2) == nil || $receiver == undefined){
  2831. self["@classesCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2832. $1=self["@classesCache"];
  2833. } else {
  2834. $1=$2;
  2835. };
  2836. return $1;
  2837. }, function($ctx1) {$ctx1.fill(self,"classesCache",{}, smalltalk.HLSelectorsCache)})},
  2838. args: [],
  2839. source: "classesCache\x0a\x09^ classesCache ifNil: [ classesCache := HashedCollection new ]",
  2840. messageSends: ["ifNil:", "new"],
  2841. referencedClasses: ["HashedCollection"]
  2842. }),
  2843. smalltalk.HLSelectorsCache);
  2844. smalltalk.addMethod(
  2845. "_initialize",
  2846. smalltalk.method({
  2847. selector: "initialize",
  2848. category: 'initialization',
  2849. fn: function (){
  2850. var self=this;
  2851. return smalltalk.withContext(function($ctx1) { smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  2852. _st(self)._observeSystem();
  2853. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLSelectorsCache)})},
  2854. args: [],
  2855. source: "initialize\x0a\x09super initialize.\x0a self observeSystem",
  2856. messageSends: ["initialize", "observeSystem"],
  2857. referencedClasses: []
  2858. }),
  2859. smalltalk.HLSelectorsCache);
  2860. smalltalk.addMethod(
  2861. "_invalidateCacheFor_",
  2862. smalltalk.method({
  2863. selector: "invalidateCacheFor:",
  2864. category: 'private',
  2865. fn: function (aMethod){
  2866. var self=this;
  2867. return smalltalk.withContext(function($ctx1) { _st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._invalidateSelector_(_st(aMethod)._selector());
  2868. return self}, function($ctx1) {$ctx1.fill(self,"invalidateCacheFor:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2869. args: ["aMethod"],
  2870. source: "invalidateCacheFor: aMethod\x0a\x09(self cacheFor: aMethod methodClass)\x0a \x09invalidateSelector: aMethod selector",
  2871. messageSends: ["invalidateSelector:", "selector", "cacheFor:", "methodClass"],
  2872. referencedClasses: []
  2873. }),
  2874. smalltalk.HLSelectorsCache);
  2875. smalltalk.addMethod(
  2876. "_isOverridden_",
  2877. smalltalk.method({
  2878. selector: "isOverridden:",
  2879. category: 'testing',
  2880. fn: function (aMethod){
  2881. var self=this;
  2882. return smalltalk.withContext(function($ctx1) { var $1;
  2883. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverridden_(aMethod);
  2884. return $1;
  2885. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2886. args: ["aMethod"],
  2887. source: "isOverridden: aMethod\x0a\x09^ (self cacheFor: aMethod methodClass)\x0a \x09isOverridden: aMethod",
  2888. messageSends: ["isOverridden:", "cacheFor:", "methodClass"],
  2889. referencedClasses: []
  2890. }),
  2891. smalltalk.HLSelectorsCache);
  2892. smalltalk.addMethod(
  2893. "_isOverride_",
  2894. smalltalk.method({
  2895. selector: "isOverride:",
  2896. category: 'testing',
  2897. fn: function (aMethod){
  2898. var self=this;
  2899. return smalltalk.withContext(function($ctx1) { var $1;
  2900. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverride_(aMethod);
  2901. return $1;
  2902. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2903. args: ["aMethod"],
  2904. source: "isOverride: aMethod\x0a\x09^ (self cacheFor: aMethod methodClass)\x0a \x09isOverride: aMethod",
  2905. messageSends: ["isOverride:", "cacheFor:", "methodClass"],
  2906. referencedClasses: []
  2907. }),
  2908. smalltalk.HLSelectorsCache);
  2909. smalltalk.addMethod(
  2910. "_newCacheFor_",
  2911. smalltalk.method({
  2912. selector: "newCacheFor:",
  2913. category: 'factory',
  2914. fn: function (aClass){
  2915. var self=this;
  2916. return smalltalk.withContext(function($ctx1) { var $1;
  2917. $1=_st((smalltalk.HLClassCache || HLClassCache))._on_selectorsCache_(aClass,self);
  2918. return $1;
  2919. }, function($ctx1) {$ctx1.fill(self,"newCacheFor:",{aClass:aClass}, smalltalk.HLSelectorsCache)})},
  2920. args: ["aClass"],
  2921. source: "newCacheFor: aClass\x0a\x09^ HLClassCache \x0a \x09on: aClass\x0a selectorsCache: self",
  2922. messageSends: ["on:selectorsCache:"],
  2923. referencedClasses: ["HLClassCache"]
  2924. }),
  2925. smalltalk.HLSelectorsCache);
  2926. smalltalk.addMethod(
  2927. "_observeSystem",
  2928. smalltalk.method({
  2929. selector: "observeSystem",
  2930. category: 'actions',
  2931. fn: function (){
  2932. var self=this;
  2933. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2934. $1=_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current();
  2935. _st($1)._on_do_((smalltalk.MethodAdded || MethodAdded),(function(ann){
  2936. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodAdded_(_st(ann)._method());
  2937. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2938. $2=_st($1)._on_do_((smalltalk.MethodRemoved || MethodRemoved),(function(ann){
  2939. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodRemoved_(_st(ann)._method());
  2940. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2941. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLSelectorsCache)})},
  2942. args: [],
  2943. source: "observeSystem\x0a\x09SystemAnnouncer current\x0a\x09\x09on: MethodAdded\x0a do: [ :ann | self onMethodAdded: ann method ];\x0a on: MethodRemoved\x0a do: [ :ann | self onMethodRemoved: ann method ]",
  2944. messageSends: ["on:do:", "onMethodAdded:", "method", "current", "onMethodRemoved:"],
  2945. referencedClasses: ["MethodAdded", "SystemAnnouncer", "MethodRemoved"]
  2946. }),
  2947. smalltalk.HLSelectorsCache);
  2948. smalltalk.addMethod(
  2949. "_onMethodAdded_",
  2950. smalltalk.method({
  2951. selector: "onMethodAdded:",
  2952. category: 'reactions',
  2953. fn: function (aMethod){
  2954. var self=this;
  2955. return smalltalk.withContext(function($ctx1) { _st(self)._invalidateCacheFor_(aMethod);
  2956. return self}, function($ctx1) {$ctx1.fill(self,"onMethodAdded:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2957. args: ["aMethod"],
  2958. source: "onMethodAdded: aMethod\x0a\x09self invalidateCacheFor: aMethod",
  2959. messageSends: ["invalidateCacheFor:"],
  2960. referencedClasses: []
  2961. }),
  2962. smalltalk.HLSelectorsCache);
  2963. smalltalk.addMethod(
  2964. "_onMethodRemoved_",
  2965. smalltalk.method({
  2966. selector: "onMethodRemoved:",
  2967. category: 'reactions',
  2968. fn: function (aMethod){
  2969. var self=this;
  2970. return smalltalk.withContext(function($ctx1) { _st(self)._invalidateCacheFor_(aMethod);
  2971. return self}, function($ctx1) {$ctx1.fill(self,"onMethodRemoved:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2972. args: ["aMethod"],
  2973. source: "onMethodRemoved: aMethod\x0a\x09self invalidateCacheFor: aMethod",
  2974. messageSends: ["invalidateCacheFor:"],
  2975. referencedClasses: []
  2976. }),
  2977. smalltalk.HLSelectorsCache);
  2978. smalltalk.HLSelectorsCache.klass.iVarNames = ['current'];
  2979. smalltalk.addMethod(
  2980. "_current",
  2981. smalltalk.method({
  2982. selector: "current",
  2983. category: 'accessing',
  2984. fn: function (){
  2985. var self=this;
  2986. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2987. $2=self["@current"];
  2988. if(($receiver = $2) == nil || $receiver == undefined){
  2989. self["@current"]=smalltalk.Object.klass.fn.prototype._new.apply(_st(self), []);
  2990. $1=self["@current"];
  2991. } else {
  2992. $1=$2;
  2993. };
  2994. return $1;
  2995. }, function($ctx1) {$ctx1.fill(self,"current",{}, smalltalk.HLSelectorsCache.klass)})},
  2996. args: [],
  2997. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  2998. messageSends: ["ifNil:", "new"],
  2999. referencedClasses: []
  3000. }),
  3001. smalltalk.HLSelectorsCache.klass);
  3002. smalltalk.addMethod(
  3003. "_flush",
  3004. smalltalk.method({
  3005. selector: "flush",
  3006. category: 'accessing',
  3007. fn: function (){
  3008. var self=this;
  3009. return smalltalk.withContext(function($ctx1) { self["@current"]=nil;
  3010. return self}, function($ctx1) {$ctx1.fill(self,"flush",{}, smalltalk.HLSelectorsCache.klass)})},
  3011. args: [],
  3012. source: "flush\x0a\x09current := nil",
  3013. messageSends: [],
  3014. referencedClasses: []
  3015. }),
  3016. smalltalk.HLSelectorsCache.klass);
  3017. smalltalk.addMethod(
  3018. "_new",
  3019. smalltalk.method({
  3020. selector: "new",
  3021. category: 'instance creation',
  3022. fn: function (){
  3023. var self=this;
  3024. return smalltalk.withContext(function($ctx1) { _st(self)._shouldNotImplement();
  3025. return self}, function($ctx1) {$ctx1.fill(self,"new",{}, smalltalk.HLSelectorsCache.klass)})},
  3026. args: [],
  3027. source: "new\x0a\x09self shouldNotImplement",
  3028. messageSends: ["shouldNotImplement"],
  3029. referencedClasses: []
  3030. }),
  3031. smalltalk.HLSelectorsCache.klass);
  3032. smalltalk.addMethod(
  3033. "_isOverridden",
  3034. smalltalk.method({
  3035. selector: "isOverridden",
  3036. category: '*Helios-Browser',
  3037. fn: function (){
  3038. var self=this;
  3039. var selector;
  3040. return smalltalk.withContext(function($ctx1) { var $1;
  3041. var $early={};
  3042. try {
  3043. selector=_st(self)._selector();
  3044. _st(_st(self)._methodClass())._allSubclassesDo_((function(each){
  3045. return smalltalk.withContext(function($ctx2) { $1=_st(each)._includesSelector_(selector);
  3046. if(smalltalk.assert($1)){
  3047. throw $early=[true];
  3048. };
  3049. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3050. return false;
  3051. }
  3052. catch(e) {if(e===$early)return e[0]; throw e}
  3053. }, function($ctx1) {$ctx1.fill(self,"isOverridden",{selector:selector}, smalltalk.CompiledMethod)})},
  3054. args: [],
  3055. source: "isOverridden\x0a\x09| selector |\x0a \x0a selector := self selector.\x0a self methodClass allSubclassesDo: [ :each |\x0a\x09 (each includesSelector: selector)\x0a \x09ifTrue: [ ^ true ] ].\x0a\x09^ false",
  3056. messageSends: ["selector", "allSubclassesDo:", "ifTrue:", "includesSelector:", "methodClass"],
  3057. referencedClasses: []
  3058. }),
  3059. smalltalk.CompiledMethod);
  3060. smalltalk.addMethod(
  3061. "_isOverride",
  3062. smalltalk.method({
  3063. selector: "isOverride",
  3064. category: '*Helios-Browser',
  3065. fn: function (){
  3066. var self=this;
  3067. var superclass;
  3068. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3069. superclass=_st(_st(self)._methodClass())._superclass();
  3070. $1=superclass;
  3071. if(($receiver = $1) == nil || $receiver == undefined){
  3072. return false;
  3073. } else {
  3074. $1;
  3075. };
  3076. $2=_st(_st(_st(_st(self)._methodClass())._superclass())._lookupSelector_(_st(self)._selector()))._notNil();
  3077. return $2;
  3078. }, function($ctx1) {$ctx1.fill(self,"isOverride",{superclass:superclass}, smalltalk.CompiledMethod)})},
  3079. args: [],
  3080. source: "isOverride\x0a\x09| superclass |\x0a \x0a superclass := self methodClass superclass.\x0a\x09superclass ifNil: [ ^ false ].\x0a\x09\x0a ^ (self methodClass superclass lookupSelector: self selector) notNil",
  3081. messageSends: ["superclass", "methodClass", "ifNil:", "notNil", "lookupSelector:", "selector"],
  3082. referencedClasses: []
  3083. }),
  3084. smalltalk.CompiledMethod);