Helios-Browser.js 120 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150
  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. "_onClassSelected_",
  1590. smalltalk.method({
  1591. selector: "onClassSelected:",
  1592. category: 'reactions',
  1593. fn: function (aClass){
  1594. var self=this;
  1595. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$2;
  1596. _st(self)._selectedItem_(nil);
  1597. $1=self;
  1598. $3=aClass;
  1599. if(($receiver = $3) == nil || $receiver == undefined){
  1600. $2=_st((smalltalk.Array || Array))._with_(_st(self)._allProtocol());
  1601. } else {
  1602. $4=_st((smalltalk.Array || Array))._with_(_st(self)._allProtocol());
  1603. _st($4)._addAll_(_st(aClass)._protocols());
  1604. $5=_st($4)._yourself();
  1605. $2=$5;
  1606. };
  1607. _st($1)._items_($2);
  1608. _st(self)._refresh();
  1609. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass}, smalltalk.HLProtocolsListWidget)})},
  1610. args: ["aClass"],
  1611. source: "onClassSelected: aClass\x0a self selectedItem: nil.\x0a \x0a self items: (aClass\x0a \x09ifNil: [ Array with: self allProtocol ]\x0a \x09ifNotNil: [ \x0a \x09(Array with: self allProtocol) \x0a \x09addAll: aClass protocols; \x0a yourself ]).\x0a\x0a self refresh",
  1612. messageSends: ["selectedItem:", "items:", "ifNil:ifNotNil:", "with:", "allProtocol", "addAll:", "protocols", "yourself", "refresh"],
  1613. referencedClasses: ["Array"]
  1614. }),
  1615. smalltalk.HLProtocolsListWidget);
  1616. smalltalk.addMethod(
  1617. "_onProtocolSelected_",
  1618. smalltalk.method({
  1619. selector: "onProtocolSelected:",
  1620. category: 'reactions',
  1621. fn: function (aString){
  1622. var self=this;
  1623. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1624. _st(self)._selectedItem_(aString);
  1625. $1=aString;
  1626. if(($receiver = $1) == nil || $receiver == undefined){
  1627. $2=self;
  1628. return $2;
  1629. } else {
  1630. $1;
  1631. };
  1632. _st(self)._focus();
  1633. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLProtocolsListWidget)})},
  1634. args: ["aString"],
  1635. source: "onProtocolSelected: aString\x0a\x09self selectedItem: aString.\x0a\x09aString ifNil: [ ^ self ].\x0a \x0a self focus",
  1636. messageSends: ["selectedItem:", "ifNil:", "focus"],
  1637. referencedClasses: []
  1638. }),
  1639. smalltalk.HLProtocolsListWidget);
  1640. smalltalk.addMethod(
  1641. "_renderContentOn_",
  1642. smalltalk.method({
  1643. selector: "renderContentOn:",
  1644. category: 'rendering',
  1645. fn: function (html){
  1646. var self=this;
  1647. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1648. $1=_st(_st(self)._model())._showInstance();
  1649. if(smalltalk.assert($1)){
  1650. smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1651. } else {
  1652. $2=_st(html)._div();
  1653. _st($2)._class_("class_side");
  1654. $3=_st($2)._with_((function(){
  1655. return smalltalk.withContext(function($ctx2) { return smalltalk.HLBrowserListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1656. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1657. $3;
  1658. };
  1659. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLProtocolsListWidget)})},
  1660. args: ["html"],
  1661. 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 ]",
  1662. messageSends: ["ifFalse:ifTrue:", "class:", "div", "with:", "renderContentOn:", "showInstance", "model"],
  1663. referencedClasses: []
  1664. }),
  1665. smalltalk.HLProtocolsListWidget);
  1666. smalltalk.addMethod(
  1667. "_selectItem_",
  1668. smalltalk.method({
  1669. selector: "selectItem:",
  1670. category: 'actions',
  1671. fn: function (aString){
  1672. var self=this;
  1673. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._selectedProtocol_(aString);
  1674. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aString:aString}, smalltalk.HLProtocolsListWidget)})},
  1675. args: ["aString"],
  1676. source: "selectItem: aString\x0a self model selectedProtocol: aString",
  1677. messageSends: ["selectedProtocol:", "model"],
  1678. referencedClasses: []
  1679. }),
  1680. smalltalk.HLProtocolsListWidget);
  1681. smalltalk.addMethod(
  1682. "_selectedItem",
  1683. smalltalk.method({
  1684. selector: "selectedItem",
  1685. category: 'accessing',
  1686. fn: function (){
  1687. var self=this;
  1688. return smalltalk.withContext(function($ctx1) { var $1;
  1689. $1=smalltalk.HLBrowserListWidget.fn.prototype._selectedItem.apply(_st(self), []);
  1690. return $1;
  1691. }, function($ctx1) {$ctx1.fill(self,"selectedItem",{}, smalltalk.HLProtocolsListWidget)})},
  1692. args: [],
  1693. source: "selectedItem\x0a\x09^ super selectedItem\x22 ifNil: [ self allProtocol ]\x22",
  1694. messageSends: ["selectedItem"],
  1695. referencedClasses: []
  1696. }),
  1697. smalltalk.HLProtocolsListWidget);
  1698. smalltalk.addClass('HLBrowserModel', smalltalk.Object, ['announcer', 'environment', 'selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedSelector', 'showInstance', 'showComment'], 'Helios-Browser');
  1699. smalltalk.addMethod(
  1700. "_allProtocol",
  1701. smalltalk.method({
  1702. selector: "allProtocol",
  1703. category: 'accessing',
  1704. fn: function (){
  1705. var self=this;
  1706. return smalltalk.withContext(function($ctx1) { return "-- All --";
  1707. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{}, smalltalk.HLBrowserModel)})},
  1708. args: [],
  1709. source: "allProtocol\x0a\x09^ '-- All --'",
  1710. messageSends: [],
  1711. referencedClasses: []
  1712. }),
  1713. smalltalk.HLBrowserModel);
  1714. smalltalk.addMethod(
  1715. "_announcer",
  1716. smalltalk.method({
  1717. selector: "announcer",
  1718. category: 'accessing',
  1719. fn: function (){
  1720. var self=this;
  1721. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1722. $2=self["@announcer"];
  1723. if(($receiver = $2) == nil || $receiver == undefined){
  1724. self["@announcer"]=_st((smalltalk.Announcer || Announcer))._new();
  1725. $1=self["@announcer"];
  1726. } else {
  1727. $1=$2;
  1728. };
  1729. return $1;
  1730. }, function($ctx1) {$ctx1.fill(self,"announcer",{}, smalltalk.HLBrowserModel)})},
  1731. args: [],
  1732. source: "announcer\x0a\x09^ announcer ifNil: [ announcer := Announcer new ]",
  1733. messageSends: ["ifNil:", "new"],
  1734. referencedClasses: ["Announcer"]
  1735. }),
  1736. smalltalk.HLBrowserModel);
  1737. smalltalk.addMethod(
  1738. "_environment",
  1739. smalltalk.method({
  1740. selector: "environment",
  1741. category: 'accessing',
  1742. fn: function (){
  1743. var self=this;
  1744. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1745. $2=self["@environment"];
  1746. if(($receiver = $2) == nil || $receiver == undefined){
  1747. $1=_st(_st((smalltalk.HLManager || HLManager))._current())._environment();
  1748. } else {
  1749. $1=$2;
  1750. };
  1751. return $1;
  1752. }, function($ctx1) {$ctx1.fill(self,"environment",{}, smalltalk.HLBrowserModel)})},
  1753. args: [],
  1754. source: "environment\x0a\x09^ environment ifNil: [ HLManager current environment ]",
  1755. messageSends: ["ifNil:", "environment", "current"],
  1756. referencedClasses: ["HLManager"]
  1757. }),
  1758. smalltalk.HLBrowserModel);
  1759. smalltalk.addMethod(
  1760. "_environment_",
  1761. smalltalk.method({
  1762. selector: "environment:",
  1763. category: 'accessing',
  1764. fn: function (anEnvironment){
  1765. var self=this;
  1766. return smalltalk.withContext(function($ctx1) { self["@environment"]=anEnvironment;
  1767. return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment}, smalltalk.HLBrowserModel)})},
  1768. args: ["anEnvironment"],
  1769. source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
  1770. messageSends: [],
  1771. referencedClasses: []
  1772. }),
  1773. smalltalk.HLBrowserModel);
  1774. smalltalk.addMethod(
  1775. "_packages",
  1776. smalltalk.method({
  1777. selector: "packages",
  1778. category: 'accessing',
  1779. fn: function (){
  1780. var self=this;
  1781. return smalltalk.withContext(function($ctx1) { var $1;
  1782. $1=_st(_st(self)._environment())._packages();
  1783. return $1;
  1784. }, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLBrowserModel)})},
  1785. args: [],
  1786. source: "packages\x0a\x09^ self environment packages",
  1787. messageSends: ["packages", "environment"],
  1788. referencedClasses: []
  1789. }),
  1790. smalltalk.HLBrowserModel);
  1791. smalltalk.addMethod(
  1792. "_selectedClass",
  1793. smalltalk.method({
  1794. selector: "selectedClass",
  1795. category: 'accessing',
  1796. fn: function (){
  1797. var self=this;
  1798. return smalltalk.withContext(function($ctx1) { var $1;
  1799. $1=self["@selectedClass"];
  1800. return $1;
  1801. }, function($ctx1) {$ctx1.fill(self,"selectedClass",{}, smalltalk.HLBrowserModel)})},
  1802. args: [],
  1803. source: "selectedClass\x0a\x09^ selectedClass",
  1804. messageSends: [],
  1805. referencedClasses: []
  1806. }),
  1807. smalltalk.HLBrowserModel);
  1808. smalltalk.addMethod(
  1809. "_selectedClass_",
  1810. smalltalk.method({
  1811. selector: "selectedClass:",
  1812. category: 'accessing',
  1813. fn: function (aClass){
  1814. var self=this;
  1815. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  1816. $1=_st(self["@selectedClass"]).__eq(aClass);
  1817. if(smalltalk.assert($1)){
  1818. $2=self;
  1819. return $2;
  1820. };
  1821. $3=aClass;
  1822. if(($receiver = $3) == nil || $receiver == undefined){
  1823. self["@selectedClass"]=nil;
  1824. self["@selectedClass"];
  1825. } else {
  1826. $4=_st(self)._showInstance();
  1827. if(smalltalk.assert($4)){
  1828. self["@selectedClass"]=_st(aClass)._theNonMetaClass();
  1829. self["@selectedClass"];
  1830. } else {
  1831. self["@selectedClass"]=_st(aClass)._theMetaClass();
  1832. self["@selectedClass"];
  1833. };
  1834. };
  1835. _st(self)._selectedProtocol_(nil);
  1836. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLClassSelected || HLClassSelected))._on_(_st(self)._selectedClass()));
  1837. return self}, function($ctx1) {$ctx1.fill(self,"selectedClass:",{aClass:aClass}, smalltalk.HLBrowserModel)})},
  1838. args: ["aClass"],
  1839. 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)",
  1840. messageSends: ["ifTrue:", "=", "ifNil:ifNotNil:", "ifTrue:ifFalse:", "theNonMetaClass", "theMetaClass", "showInstance", "selectedProtocol:", "announce:", "on:", "selectedClass", "announcer"],
  1841. referencedClasses: ["HLClassSelected"]
  1842. }),
  1843. smalltalk.HLBrowserModel);
  1844. smalltalk.addMethod(
  1845. "_selectedMethod",
  1846. smalltalk.method({
  1847. selector: "selectedMethod",
  1848. category: 'accessing',
  1849. fn: function (){
  1850. var self=this;
  1851. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1852. $2=_st(self)._selectedClass();
  1853. if(($receiver = $2) == nil || $receiver == undefined){
  1854. $1=$2;
  1855. } else {
  1856. $1=_st(_st(_st(self)._selectedClass())._methodDictionary())._at_(self["@selectedSelector"]);
  1857. };
  1858. return $1;
  1859. }, function($ctx1) {$ctx1.fill(self,"selectedMethod",{}, smalltalk.HLBrowserModel)})},
  1860. args: [],
  1861. source: "selectedMethod\x0a\x09^ self selectedClass\x0a \x09ifNotNil: [ self selectedClass methodDictionary at: selectedSelector ]",
  1862. messageSends: ["ifNotNil:", "at:", "methodDictionary", "selectedClass"],
  1863. referencedClasses: []
  1864. }),
  1865. smalltalk.HLBrowserModel);
  1866. smalltalk.addMethod(
  1867. "_selectedMethod_",
  1868. smalltalk.method({
  1869. selector: "selectedMethod:",
  1870. category: 'accessing',
  1871. fn: function (aCompiledMethod){
  1872. var self=this;
  1873. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5;
  1874. $1=_st(self["@selectedSelector"]).__eq(aCompiledMethod);
  1875. if(smalltalk.assert($1)){
  1876. $2=self;
  1877. return $2;
  1878. };
  1879. $3=aCompiledMethod;
  1880. if(($receiver = $3) == nil || $receiver == undefined){
  1881. self["@selectedSelector"]=nil;
  1882. self["@selectedSelector"];
  1883. } else {
  1884. $4=_st(self["@selectedSelector"]).__eq(_st(aCompiledMethod)._selector());
  1885. if(smalltalk.assert($4)){
  1886. $5=self;
  1887. return $5;
  1888. };
  1889. self["@selectedSelector"]=_st(aCompiledMethod)._selector();
  1890. self["@selectedSelector"];
  1891. };
  1892. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLMethodSelected || HLMethodSelected))._on_(aCompiledMethod));
  1893. return self}, function($ctx1) {$ctx1.fill(self,"selectedMethod:",{aCompiledMethod:aCompiledMethod}, smalltalk.HLBrowserModel)})},
  1894. args: ["aCompiledMethod"],
  1895. 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)",
  1896. messageSends: ["ifTrue:", "=", "ifNil:ifNotNil:", "selector", "announce:", "on:", "announcer"],
  1897. referencedClasses: ["HLMethodSelected"]
  1898. }),
  1899. smalltalk.HLBrowserModel);
  1900. smalltalk.addMethod(
  1901. "_selectedPackage",
  1902. smalltalk.method({
  1903. selector: "selectedPackage",
  1904. category: 'accessing',
  1905. fn: function (){
  1906. var self=this;
  1907. return smalltalk.withContext(function($ctx1) { var $1;
  1908. $1=self["@selectedPackage"];
  1909. return $1;
  1910. }, function($ctx1) {$ctx1.fill(self,"selectedPackage",{}, smalltalk.HLBrowserModel)})},
  1911. args: [],
  1912. source: "selectedPackage\x0a\x09^ selectedPackage",
  1913. messageSends: [],
  1914. referencedClasses: []
  1915. }),
  1916. smalltalk.HLBrowserModel);
  1917. smalltalk.addMethod(
  1918. "_selectedPackage_",
  1919. smalltalk.method({
  1920. selector: "selectedPackage:",
  1921. category: 'accessing',
  1922. fn: function (aPackage){
  1923. var self=this;
  1924. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1925. $1=_st(self["@selectedPackage"]).__eq(aPackage);
  1926. if(smalltalk.assert($1)){
  1927. $2=self;
  1928. return $2;
  1929. };
  1930. self["@selectedPackage"]=aPackage;
  1931. _st(self)._selectedClass_(nil);
  1932. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLPackageSelected || HLPackageSelected))._on_(aPackage));
  1933. return self}, function($ctx1) {$ctx1.fill(self,"selectedPackage:",{aPackage:aPackage}, smalltalk.HLBrowserModel)})},
  1934. args: ["aPackage"],
  1935. source: "selectedPackage: aPackage\x0a\x09selectedPackage = aPackage ifTrue: [ ^ self ].\x0a \x0a\x09selectedPackage := aPackage.\x0a\x09self selectedClass: nil.\x0a self announcer announce: (HLPackageSelected on: aPackage)",
  1936. messageSends: ["ifTrue:", "=", "selectedClass:", "announce:", "on:", "announcer"],
  1937. referencedClasses: ["HLPackageSelected"]
  1938. }),
  1939. smalltalk.HLBrowserModel);
  1940. smalltalk.addMethod(
  1941. "_selectedProtocol",
  1942. smalltalk.method({
  1943. selector: "selectedProtocol",
  1944. category: 'accessing',
  1945. fn: function (){
  1946. var self=this;
  1947. return smalltalk.withContext(function($ctx1) { var $1;
  1948. $1=self["@selectedProtocol"];
  1949. return $1;
  1950. }, function($ctx1) {$ctx1.fill(self,"selectedProtocol",{}, smalltalk.HLBrowserModel)})},
  1951. args: [],
  1952. source: "selectedProtocol\x0a\x09^ selectedProtocol",
  1953. messageSends: [],
  1954. referencedClasses: []
  1955. }),
  1956. smalltalk.HLBrowserModel);
  1957. smalltalk.addMethod(
  1958. "_selectedProtocol_",
  1959. smalltalk.method({
  1960. selector: "selectedProtocol:",
  1961. category: 'accessing',
  1962. fn: function (aString){
  1963. var self=this;
  1964. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1965. $1=_st(self["@selectedProtocol"]).__eq(aString);
  1966. if(smalltalk.assert($1)){
  1967. $2=self;
  1968. return $2;
  1969. };
  1970. self["@selectedProtocol"]=aString;
  1971. _st(self)._selectedMethod_(nil);
  1972. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLProtocolSelected || HLProtocolSelected))._on_(aString));
  1973. return self}, function($ctx1) {$ctx1.fill(self,"selectedProtocol:",{aString:aString}, smalltalk.HLBrowserModel)})},
  1974. args: ["aString"],
  1975. source: "selectedProtocol: aString\x0a\x09selectedProtocol = aString ifTrue: [ ^ self ].\x0a \x0a\x09selectedProtocol := aString.\x0a self selectedMethod: nil.\x0a self announcer announce: (HLProtocolSelected on: aString)",
  1976. messageSends: ["ifTrue:", "=", "selectedMethod:", "announce:", "on:", "announcer"],
  1977. referencedClasses: ["HLProtocolSelected"]
  1978. }),
  1979. smalltalk.HLBrowserModel);
  1980. smalltalk.addMethod(
  1981. "_showComment",
  1982. smalltalk.method({
  1983. selector: "showComment",
  1984. category: 'accessing',
  1985. fn: function (){
  1986. var self=this;
  1987. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1988. $2=self["@showComment"];
  1989. if(($receiver = $2) == nil || $receiver == undefined){
  1990. $1=false;
  1991. } else {
  1992. $1=$2;
  1993. };
  1994. return $1;
  1995. }, function($ctx1) {$ctx1.fill(self,"showComment",{}, smalltalk.HLBrowserModel)})},
  1996. args: [],
  1997. source: "showComment\x0a\x09^ showComment ifNil: [ false ]",
  1998. messageSends: ["ifNil:"],
  1999. referencedClasses: []
  2000. }),
  2001. smalltalk.HLBrowserModel);
  2002. smalltalk.addMethod(
  2003. "_showComment_",
  2004. smalltalk.method({
  2005. selector: "showComment:",
  2006. category: 'accessing',
  2007. fn: function (aBoolean){
  2008. var self=this;
  2009. return smalltalk.withContext(function($ctx1) { self["@showComment"]=aBoolean;
  2010. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLShowCommentToggled || HLShowCommentToggled))._new());
  2011. return self}, function($ctx1) {$ctx1.fill(self,"showComment:",{aBoolean:aBoolean}, smalltalk.HLBrowserModel)})},
  2012. args: ["aBoolean"],
  2013. source: "showComment: aBoolean\x0a\x09showComment := aBoolean.\x0a \x0a self announcer announce: HLShowCommentToggled new",
  2014. messageSends: ["announce:", "new", "announcer"],
  2015. referencedClasses: ["HLShowCommentToggled"]
  2016. }),
  2017. smalltalk.HLBrowserModel);
  2018. smalltalk.addMethod(
  2019. "_showInstance",
  2020. smalltalk.method({
  2021. selector: "showInstance",
  2022. category: 'accessing',
  2023. fn: function (){
  2024. var self=this;
  2025. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2026. $2=self["@showInstance"];
  2027. if(($receiver = $2) == nil || $receiver == undefined){
  2028. $1=true;
  2029. } else {
  2030. $1=$2;
  2031. };
  2032. return $1;
  2033. }, function($ctx1) {$ctx1.fill(self,"showInstance",{}, smalltalk.HLBrowserModel)})},
  2034. args: [],
  2035. source: "showInstance\x0a\x09^ showInstance ifNil: [ true ]",
  2036. messageSends: ["ifNil:"],
  2037. referencedClasses: []
  2038. }),
  2039. smalltalk.HLBrowserModel);
  2040. smalltalk.addMethod(
  2041. "_showInstance_",
  2042. smalltalk.method({
  2043. selector: "showInstance:",
  2044. category: 'accessing',
  2045. fn: function (aBoolean){
  2046. var self=this;
  2047. return smalltalk.withContext(function($ctx1) { var $1,$2,$4,$3;
  2048. self["@showInstance"]=aBoolean;
  2049. $1=_st(self)._selectedClass();
  2050. if(($receiver = $1) == nil || $receiver == undefined){
  2051. $1;
  2052. } else {
  2053. $2=self;
  2054. $4=aBoolean;
  2055. if(smalltalk.assert($4)){
  2056. $3=_st(_st(self)._selectedClass())._theNonMetaClass();
  2057. } else {
  2058. $3=_st(_st(self)._selectedClass())._theMetaClass();
  2059. };
  2060. _st($2)._selectedClass_($3);
  2061. };
  2062. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLShowInstanceToggled || HLShowInstanceToggled))._new());
  2063. return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean}, smalltalk.HLBrowserModel)})},
  2064. args: ["aBoolean"],
  2065. 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",
  2066. messageSends: ["ifNotNil:", "selectedClass:", "ifTrue:ifFalse:", "theNonMetaClass", "selectedClass", "theMetaClass", "announce:", "new", "announcer"],
  2067. referencedClasses: ["HLShowInstanceToggled"]
  2068. }),
  2069. smalltalk.HLBrowserModel);
  2070. smalltalk.addMethod(
  2071. "_on_",
  2072. smalltalk.method({
  2073. selector: "on:",
  2074. category: 'actions',
  2075. fn: function (anEnvironment){
  2076. var self=this;
  2077. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  2078. $2=_st(self)._new();
  2079. _st($2)._environment_(anEnvironment);
  2080. $3=_st($2)._yourself();
  2081. $1=$3;
  2082. return $1;
  2083. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment}, smalltalk.HLBrowserModel.klass)})},
  2084. args: ["anEnvironment"],
  2085. source: "on: anEnvironment\x0a\x0a\x09^ self new\x0a \x09environment: anEnvironment;\x0a yourself",
  2086. messageSends: ["environment:", "new", "yourself"],
  2087. referencedClasses: []
  2088. }),
  2089. smalltalk.HLBrowserModel.klass);
  2090. smalltalk.addClass('HLBrowserSourceWidget', smalltalk.HLWidget, ['model', 'methodContents', 'codeWidget'], 'Helios-Browser');
  2091. smalltalk.addMethod(
  2092. "_codeWidget",
  2093. smalltalk.method({
  2094. selector: "codeWidget",
  2095. category: 'accessing',
  2096. fn: function (){
  2097. var self=this;
  2098. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2099. $2=self["@codeWidget"];
  2100. if(($receiver = $2) == nil || $receiver == undefined){
  2101. self["@codeWidget"]=_st((smalltalk.HLCodeWidget || HLCodeWidget))._new();
  2102. $1=self["@codeWidget"];
  2103. } else {
  2104. $1=$2;
  2105. };
  2106. return $1;
  2107. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{}, smalltalk.HLBrowserSourceWidget)})},
  2108. args: [],
  2109. source: "codeWidget\x0a\x09^ codeWidget ifNil: [ codeWidget := HLCodeWidget new ]",
  2110. messageSends: ["ifNil:", "new"],
  2111. referencedClasses: ["HLCodeWidget"]
  2112. }),
  2113. smalltalk.HLBrowserSourceWidget);
  2114. smalltalk.addMethod(
  2115. "_contents",
  2116. smalltalk.method({
  2117. selector: "contents",
  2118. category: 'accessing',
  2119. fn: function (){
  2120. var self=this;
  2121. return smalltalk.withContext(function($ctx1) { var $1;
  2122. $1=_st(_st(self)._codeWidget())._contents();
  2123. return $1;
  2124. }, function($ctx1) {$ctx1.fill(self,"contents",{}, smalltalk.HLBrowserSourceWidget)})},
  2125. args: [],
  2126. source: "contents\x0a\x09^ self codeWidget contents",
  2127. messageSends: ["contents", "codeWidget"],
  2128. referencedClasses: []
  2129. }),
  2130. smalltalk.HLBrowserSourceWidget);
  2131. smalltalk.addMethod(
  2132. "_contents_",
  2133. smalltalk.method({
  2134. selector: "contents:",
  2135. category: 'accessing',
  2136. fn: function (aString){
  2137. var self=this;
  2138. return smalltalk.withContext(function($ctx1) { _st(self)._methodContents_(aString);
  2139. _st(_st(self)._codeWidget())._contents_(aString);
  2140. return self}, function($ctx1) {$ctx1.fill(self,"contents:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  2141. args: ["aString"],
  2142. source: "contents: aString\x0a\x09self methodContents: aString.\x0a\x09self codeWidget contents: aString",
  2143. messageSends: ["methodContents:", "contents:", "codeWidget"],
  2144. referencedClasses: []
  2145. }),
  2146. smalltalk.HLBrowserSourceWidget);
  2147. smalltalk.addMethod(
  2148. "_hasModification",
  2149. smalltalk.method({
  2150. selector: "hasModification",
  2151. category: 'testing',
  2152. fn: function (){
  2153. var self=this;
  2154. return smalltalk.withContext(function($ctx1) { var $1;
  2155. $1=_st(_st(_st(self)._methodContents()).__eq(_st(self)._contents()))._not();
  2156. return $1;
  2157. }, function($ctx1) {$ctx1.fill(self,"hasModification",{}, smalltalk.HLBrowserSourceWidget)})},
  2158. args: [],
  2159. source: "hasModification\x0a\x09^ (self methodContents = self contents) not",
  2160. messageSends: ["not", "=", "contents", "methodContents"],
  2161. referencedClasses: []
  2162. }),
  2163. smalltalk.HLBrowserSourceWidget);
  2164. smalltalk.addMethod(
  2165. "_initialize",
  2166. smalltalk.method({
  2167. selector: "initialize",
  2168. category: 'initialization',
  2169. fn: function (){
  2170. var self=this;
  2171. return smalltalk.withContext(function($ctx1) { smalltalk.HLWidget.fn.prototype._initialize.apply(_st(self), []);
  2172. _st(self)._observeSystem();
  2173. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLBrowserSourceWidget)})},
  2174. args: [],
  2175. source: "initialize\x0a\x09super initialize.\x0a \x0a self observeSystem",
  2176. messageSends: ["initialize", "observeSystem"],
  2177. referencedClasses: []
  2178. }),
  2179. smalltalk.HLBrowserSourceWidget);
  2180. smalltalk.addMethod(
  2181. "_methodContents",
  2182. smalltalk.method({
  2183. selector: "methodContents",
  2184. category: 'accessing',
  2185. fn: function (){
  2186. var self=this;
  2187. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2188. $2=self["@methodContents"];
  2189. if(($receiver = $2) == nil || $receiver == undefined){
  2190. self["@methodContents"]="";
  2191. $1=self["@methodContents"];
  2192. } else {
  2193. $1=$2;
  2194. };
  2195. return $1;
  2196. }, function($ctx1) {$ctx1.fill(self,"methodContents",{}, smalltalk.HLBrowserSourceWidget)})},
  2197. args: [],
  2198. source: "methodContents\x0a\x09^ methodContents ifNil: [ methodContents := '' ]",
  2199. messageSends: ["ifNil:"],
  2200. referencedClasses: []
  2201. }),
  2202. smalltalk.HLBrowserSourceWidget);
  2203. smalltalk.addMethod(
  2204. "_methodContents_",
  2205. smalltalk.method({
  2206. selector: "methodContents:",
  2207. category: 'accessing',
  2208. fn: function (aString){
  2209. var self=this;
  2210. return smalltalk.withContext(function($ctx1) { self["@methodContents"]=aString;
  2211. return self}, function($ctx1) {$ctx1.fill(self,"methodContents:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  2212. args: ["aString"],
  2213. source: "methodContents: aString\x0a\x09methodContents := aString",
  2214. messageSends: [],
  2215. referencedClasses: []
  2216. }),
  2217. smalltalk.HLBrowserSourceWidget);
  2218. smalltalk.addMethod(
  2219. "_model",
  2220. smalltalk.method({
  2221. selector: "model",
  2222. category: 'accessing',
  2223. fn: function (){
  2224. var self=this;
  2225. return smalltalk.withContext(function($ctx1) { var $1;
  2226. $1=self["@model"];
  2227. return $1;
  2228. }, function($ctx1) {$ctx1.fill(self,"model",{}, smalltalk.HLBrowserSourceWidget)})},
  2229. args: [],
  2230. source: "model\x0a\x09^ model",
  2231. messageSends: [],
  2232. referencedClasses: []
  2233. }),
  2234. smalltalk.HLBrowserSourceWidget);
  2235. smalltalk.addMethod(
  2236. "_model_",
  2237. smalltalk.method({
  2238. selector: "model:",
  2239. category: 'accessing',
  2240. fn: function (aBrowserModel){
  2241. var self=this;
  2242. return smalltalk.withContext(function($ctx1) { self["@model"]=aBrowserModel;
  2243. _st(self)._observeModel();
  2244. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel}, smalltalk.HLBrowserSourceWidget)})},
  2245. args: ["aBrowserModel"],
  2246. source: "model: aBrowserModel\x0a\x09model := aBrowserModel.\x0a \x0a self observeModel",
  2247. messageSends: ["observeModel"],
  2248. referencedClasses: []
  2249. }),
  2250. smalltalk.HLBrowserSourceWidget);
  2251. smalltalk.addMethod(
  2252. "_observeModel",
  2253. smalltalk.method({
  2254. selector: "observeModel",
  2255. category: 'actions',
  2256. fn: function (){
  2257. var self=this;
  2258. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLMethodSelected || HLMethodSelected),(function(ann){
  2259. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodSelected_(_st(ann)._item());
  2260. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2261. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLClassSelected || HLClassSelected),(function(ann){
  2262. return smalltalk.withContext(function($ctx2) { return _st(self)._onClassSelected_(_st(ann)._item());
  2263. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2264. _st(_st(_st(self)._model())._announcer())._on_do_((smalltalk.HLProtocolSelected || HLProtocolSelected),(function(ann){
  2265. return smalltalk.withContext(function($ctx2) { return _st(self)._onProtocolSelected_(_st(ann)._item());
  2266. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2267. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{}, smalltalk.HLBrowserSourceWidget)})},
  2268. args: [],
  2269. 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 ]",
  2270. messageSends: ["on:do:", "onMethodSelected:", "item", "announcer", "model", "onClassSelected:", "onProtocolSelected:"],
  2271. referencedClasses: ["HLMethodSelected", "HLClassSelected", "HLProtocolSelected"]
  2272. }),
  2273. smalltalk.HLBrowserSourceWidget);
  2274. smalltalk.addMethod(
  2275. "_observeSystem",
  2276. smalltalk.method({
  2277. selector: "observeSystem",
  2278. category: 'actions',
  2279. fn: function (){
  2280. var self=this;
  2281. return smalltalk.withContext(function($ctx1) { _st(_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current())._on_do_((smalltalk.MethodModified || MethodModified),(function(ann){
  2282. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodModified_(_st(ann)._method());
  2283. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2284. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLBrowserSourceWidget)})},
  2285. args: [],
  2286. source: "observeSystem\x0a\x09SystemAnnouncer current\x0a \x09on: MethodModified\x0a do: [ :ann | self onMethodModified: ann method ]",
  2287. messageSends: ["on:do:", "onMethodModified:", "method", "current"],
  2288. referencedClasses: ["MethodModified", "SystemAnnouncer"]
  2289. }),
  2290. smalltalk.HLBrowserSourceWidget);
  2291. smalltalk.addMethod(
  2292. "_onClassSelected_",
  2293. smalltalk.method({
  2294. selector: "onClassSelected:",
  2295. category: 'reactions',
  2296. fn: function (aClass){
  2297. var self=this;
  2298. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2299. $1=aClass;
  2300. if(($receiver = $1) == nil || $receiver == undefined){
  2301. $2=_st(self)._contents_("");
  2302. return $2;
  2303. } else {
  2304. $1;
  2305. };
  2306. _st(self)._contents_(_st(aClass)._definition());
  2307. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{aClass:aClass}, smalltalk.HLBrowserSourceWidget)})},
  2308. args: ["aClass"],
  2309. source: "onClassSelected: aClass\x0a\x09aClass ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: aClass definition",
  2310. messageSends: ["ifNil:", "contents:", "definition"],
  2311. referencedClasses: []
  2312. }),
  2313. smalltalk.HLBrowserSourceWidget);
  2314. smalltalk.addMethod(
  2315. "_onMethodModified_",
  2316. smalltalk.method({
  2317. selector: "onMethodModified:",
  2318. category: 'reactions',
  2319. fn: function (aMethod){
  2320. var self=this;
  2321. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  2322. $1=_st(_st(_st(self)._model())._selectedClass()).__eq(_st(aMethod)._methodClass());
  2323. if(! smalltalk.assert($1)){
  2324. $2=self;
  2325. return $2;
  2326. };
  2327. $3=_st(_st(_st(_st(self)._model())._selectedMethod())._selector()).__eq(_st(aMethod)._selector());
  2328. if(! smalltalk.assert($3)){
  2329. $4=self;
  2330. return $4;
  2331. };
  2332. _st(self)._refresh();
  2333. return self}, function($ctx1) {$ctx1.fill(self,"onMethodModified:",{aMethod:aMethod}, smalltalk.HLBrowserSourceWidget)})},
  2334. args: ["aMethod"],
  2335. 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",
  2336. messageSends: ["ifFalse:", "=", "methodClass", "selectedClass", "model", "selector", "selectedMethod", "refresh"],
  2337. referencedClasses: []
  2338. }),
  2339. smalltalk.HLBrowserSourceWidget);
  2340. smalltalk.addMethod(
  2341. "_onMethodSelected_",
  2342. smalltalk.method({
  2343. selector: "onMethodSelected:",
  2344. category: 'reactions',
  2345. fn: function (aCompiledMethod){
  2346. var self=this;
  2347. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2348. $1=aCompiledMethod;
  2349. if(($receiver = $1) == nil || $receiver == undefined){
  2350. $2=_st(self)._contents_("");
  2351. return $2;
  2352. } else {
  2353. $1;
  2354. };
  2355. _st(self)._contents_(_st(aCompiledMethod)._source());
  2356. return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aCompiledMethod:aCompiledMethod}, smalltalk.HLBrowserSourceWidget)})},
  2357. args: ["aCompiledMethod"],
  2358. source: "onMethodSelected: aCompiledMethod\x0a\x09aCompiledMethod ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: aCompiledMethod source",
  2359. messageSends: ["ifNil:", "contents:", "source"],
  2360. referencedClasses: []
  2361. }),
  2362. smalltalk.HLBrowserSourceWidget);
  2363. smalltalk.addMethod(
  2364. "_onProtocolSelected_",
  2365. smalltalk.method({
  2366. selector: "onProtocolSelected:",
  2367. category: 'reactions',
  2368. fn: function (aString){
  2369. var self=this;
  2370. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2371. $1=_st(_st(self)._model())._selectedClass();
  2372. if(($receiver = $1) == nil || $receiver == undefined){
  2373. $2=_st(self)._contents_("");
  2374. return $2;
  2375. } else {
  2376. $1;
  2377. };
  2378. _st(self)._contents_(_st(_st(_st(self)._model())._selectedClass())._definition());
  2379. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{aString:aString}, smalltalk.HLBrowserSourceWidget)})},
  2380. args: ["aString"],
  2381. source: "onProtocolSelected: aString\x0a\x09self model selectedClass ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: self model selectedClass definition",
  2382. messageSends: ["ifNil:", "contents:", "selectedClass", "model", "definition"],
  2383. referencedClasses: []
  2384. }),
  2385. smalltalk.HLBrowserSourceWidget);
  2386. smalltalk.addMethod(
  2387. "_refresh",
  2388. smalltalk.method({
  2389. selector: "refresh",
  2390. category: 'updating',
  2391. fn: function (){
  2392. var self=this;
  2393. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2394. $1=_st(self)._hasModification();
  2395. if(smalltalk.assert($1)){
  2396. $2=self;
  2397. return $2;
  2398. };
  2399. _st(self)._contents_(_st(_st(_st(self)._model())._selectedMethod())._source());
  2400. smalltalk.HLWidget.fn.prototype._refresh.apply(_st(self), []);
  2401. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{}, smalltalk.HLBrowserSourceWidget)})},
  2402. args: [],
  2403. source: "refresh\x0a\x09self hasModification ifTrue: [ ^ self ].\x0a \x0a\x09self contents: self model selectedMethod source.\x0a super refresh",
  2404. messageSends: ["ifTrue:", "hasModification", "contents:", "source", "selectedMethod", "model", "refresh"],
  2405. referencedClasses: []
  2406. }),
  2407. smalltalk.HLBrowserSourceWidget);
  2408. smalltalk.addMethod(
  2409. "_renderContentOn_",
  2410. smalltalk.method({
  2411. selector: "renderContentOn:",
  2412. category: 'rendering',
  2413. fn: function (html){
  2414. var self=this;
  2415. return smalltalk.withContext(function($ctx1) { _st(_st(self)._codeWidget())._renderOn_(html);
  2416. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLBrowserSourceWidget)})},
  2417. args: ["html"],
  2418. source: "renderContentOn: html\x0a\x09self codeWidget renderOn: html",
  2419. messageSends: ["renderOn:", "codeWidget"],
  2420. referencedClasses: []
  2421. }),
  2422. smalltalk.HLBrowserSourceWidget);
  2423. smalltalk.addMethod(
  2424. "_on_",
  2425. smalltalk.method({
  2426. selector: "on:",
  2427. category: 'instance creation',
  2428. fn: function (aBrowserModel){
  2429. var self=this;
  2430. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  2431. $2=_st(self)._new();
  2432. _st($2)._model_(aBrowserModel);
  2433. $3=_st($2)._yourself();
  2434. $1=$3;
  2435. return $1;
  2436. }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowserModel:aBrowserModel}, smalltalk.HLBrowserSourceWidget.klass)})},
  2437. args: ["aBrowserModel"],
  2438. source: "on: aBrowserModel\x0a\x09^ self new\x0a \x09model: aBrowserModel;\x0a yourself",
  2439. messageSends: ["model:", "new", "yourself"],
  2440. referencedClasses: []
  2441. }),
  2442. smalltalk.HLBrowserSourceWidget.klass);
  2443. smalltalk.addClass('HLClassCache', smalltalk.Object, ['class', 'selectorsCache', 'overrideCache', 'overriddenCache'], 'Helios-Browser');
  2444. smalltalk.addMethod(
  2445. "_invalidateChildrenSelector_",
  2446. smalltalk.method({
  2447. selector: "invalidateChildrenSelector:",
  2448. category: 'actions',
  2449. fn: function (aSelector){
  2450. var self=this;
  2451. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2452. _st(_st(_st(self)._theClass())._subclasses())._do_((function(each){
  2453. return smalltalk.withContext(function($ctx2) { $1=_st(_st(self)._selectorsCache())._cacheFor_(each);
  2454. _st($1)._removeSelector_(aSelector);
  2455. $2=_st($1)._invalidateChildrenSelector_(aSelector);
  2456. return $2;
  2457. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2458. return self}, function($ctx1) {$ctx1.fill(self,"invalidateChildrenSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2459. args: ["aSelector"],
  2460. source: "invalidateChildrenSelector: aSelector\x0a\x09self theClass subclasses do: [ :each |\x0a \x09(self selectorsCache cacheFor: each)\x0a \x09removeSelector: aSelector;\x0a \x09invalidateChildrenSelector: aSelector ]",
  2461. messageSends: ["do:", "removeSelector:", "cacheFor:", "selectorsCache", "invalidateChildrenSelector:", "subclasses", "theClass"],
  2462. referencedClasses: []
  2463. }),
  2464. smalltalk.HLClassCache);
  2465. smalltalk.addMethod(
  2466. "_invalidateParentSelector_",
  2467. smalltalk.method({
  2468. selector: "invalidateParentSelector:",
  2469. category: 'actions',
  2470. fn: function (aSelector){
  2471. var self=this;
  2472. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2473. $1=_st(_st(self)._theClass())._superclass();
  2474. if(($receiver = $1) == nil || $receiver == undefined){
  2475. $1;
  2476. } else {
  2477. $2=_st(_st(self)._selectorsCache())._cacheFor_(_st(_st(self)._theClass())._superclass());
  2478. _st($2)._removeSelector_(aSelector);
  2479. $3=_st($2)._invalidateParentSelector_(aSelector);
  2480. $3;
  2481. };
  2482. return self}, function($ctx1) {$ctx1.fill(self,"invalidateParentSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2483. args: ["aSelector"],
  2484. source: "invalidateParentSelector: aSelector\x0a\x09self theClass superclass ifNotNil: [\x0a \x09(self selectorsCache cacheFor: self theClass superclass)\x0a \x09removeSelector: aSelector;\x0a\x09\x09\x09invalidateParentSelector: aSelector ]",
  2485. messageSends: ["ifNotNil:", "removeSelector:", "cacheFor:", "superclass", "theClass", "selectorsCache", "invalidateParentSelector:"],
  2486. referencedClasses: []
  2487. }),
  2488. smalltalk.HLClassCache);
  2489. smalltalk.addMethod(
  2490. "_invalidateSelector_",
  2491. smalltalk.method({
  2492. selector: "invalidateSelector:",
  2493. category: 'actions',
  2494. fn: function (aSelector){
  2495. var self=this;
  2496. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2497. $1=self;
  2498. _st($1)._invalidateParentSelector_(aSelector);
  2499. _st($1)._invalidateChildrenSelector_(aSelector);
  2500. $2=_st($1)._removeSelector_(aSelector);
  2501. return self}, function($ctx1) {$ctx1.fill(self,"invalidateSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2502. args: ["aSelector"],
  2503. source: "invalidateSelector: aSelector\x0a\x09self \x0a \x09invalidateParentSelector: aSelector;\x0a invalidateChildrenSelector: aSelector;\x0a removeSelector: aSelector",
  2504. messageSends: ["invalidateParentSelector:", "invalidateChildrenSelector:", "removeSelector:"],
  2505. referencedClasses: []
  2506. }),
  2507. smalltalk.HLClassCache);
  2508. smalltalk.addMethod(
  2509. "_isOverridden_",
  2510. smalltalk.method({
  2511. selector: "isOverridden:",
  2512. category: 'testing',
  2513. fn: function (aMethod){
  2514. var self=this;
  2515. return smalltalk.withContext(function($ctx1) { var $1;
  2516. $1=_st(_st(self)._overriddenCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  2517. return smalltalk.withContext(function($ctx2) { return _st(aMethod)._isOverridden();
  2518. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2519. return $1;
  2520. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLClassCache)})},
  2521. args: ["aMethod"],
  2522. source: "isOverridden: aMethod\x0a\x09^ self overriddenCache \x0a \x09at: aMethod selector\x0a \x09ifAbsentPut: [ aMethod isOverridden ]",
  2523. messageSends: ["at:ifAbsentPut:", "selector", "isOverridden", "overriddenCache"],
  2524. referencedClasses: []
  2525. }),
  2526. smalltalk.HLClassCache);
  2527. smalltalk.addMethod(
  2528. "_isOverride_",
  2529. smalltalk.method({
  2530. selector: "isOverride:",
  2531. category: 'testing',
  2532. fn: function (aMethod){
  2533. var self=this;
  2534. return smalltalk.withContext(function($ctx1) { var $1;
  2535. $1=_st(_st(self)._overrideCache())._at_ifAbsentPut_(_st(aMethod)._selector(),(function(){
  2536. return smalltalk.withContext(function($ctx2) { return _st(aMethod)._isOverride();
  2537. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2538. return $1;
  2539. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLClassCache)})},
  2540. args: ["aMethod"],
  2541. source: "isOverride: aMethod\x0a\x09^ self overrideCache\x0a \x09at: aMethod selector\x0a \x09ifAbsentPut: [ aMethod isOverride ]",
  2542. messageSends: ["at:ifAbsentPut:", "selector", "isOverride", "overrideCache"],
  2543. referencedClasses: []
  2544. }),
  2545. smalltalk.HLClassCache);
  2546. smalltalk.addMethod(
  2547. "_overriddenCache",
  2548. smalltalk.method({
  2549. selector: "overriddenCache",
  2550. category: 'accessing',
  2551. fn: function (){
  2552. var self=this;
  2553. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2554. $2=self["@overriddenCache"];
  2555. if(($receiver = $2) == nil || $receiver == undefined){
  2556. self["@overriddenCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2557. $1=self["@overriddenCache"];
  2558. } else {
  2559. $1=$2;
  2560. };
  2561. return $1;
  2562. }, function($ctx1) {$ctx1.fill(self,"overriddenCache",{}, smalltalk.HLClassCache)})},
  2563. args: [],
  2564. source: "overriddenCache\x0a\x09^ overriddenCache ifNil: [ overriddenCache := HashedCollection new ]",
  2565. messageSends: ["ifNil:", "new"],
  2566. referencedClasses: ["HashedCollection"]
  2567. }),
  2568. smalltalk.HLClassCache);
  2569. smalltalk.addMethod(
  2570. "_overrideCache",
  2571. smalltalk.method({
  2572. selector: "overrideCache",
  2573. category: 'accessing',
  2574. fn: function (){
  2575. var self=this;
  2576. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2577. $2=self["@overrideCache"];
  2578. if(($receiver = $2) == nil || $receiver == undefined){
  2579. self["@overrideCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2580. $1=self["@overrideCache"];
  2581. } else {
  2582. $1=$2;
  2583. };
  2584. return $1;
  2585. }, function($ctx1) {$ctx1.fill(self,"overrideCache",{}, smalltalk.HLClassCache)})},
  2586. args: [],
  2587. source: "overrideCache\x0a\x09^ overrideCache ifNil: [ overrideCache := HashedCollection new ]",
  2588. messageSends: ["ifNil:", "new"],
  2589. referencedClasses: ["HashedCollection"]
  2590. }),
  2591. smalltalk.HLClassCache);
  2592. smalltalk.addMethod(
  2593. "_removeSelector_",
  2594. smalltalk.method({
  2595. selector: "removeSelector:",
  2596. category: 'private',
  2597. fn: function (aSelector){
  2598. var self=this;
  2599. return smalltalk.withContext(function($ctx1) { _st(_st(self)._overriddenCache())._removeKey_ifAbsent_(aSelector,(function(){
  2600. return smalltalk.withContext(function($ctx2) { }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2601. _st(_st(self)._overrideCache())._removeKey_ifAbsent_(aSelector,(function(){
  2602. return smalltalk.withContext(function($ctx2) { }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2603. return self}, function($ctx1) {$ctx1.fill(self,"removeSelector:",{aSelector:aSelector}, smalltalk.HLClassCache)})},
  2604. args: ["aSelector"],
  2605. source: "removeSelector: aSelector\x0a\x09self overriddenCache \x0a \x09removeKey: aSelector\x0a ifAbsent: [ ].\x0a self overrideCache \x0a \x09removeKey: aSelector\x0a ifAbsent: [ ]",
  2606. messageSends: ["removeKey:ifAbsent:", "overriddenCache", "overrideCache"],
  2607. referencedClasses: []
  2608. }),
  2609. smalltalk.HLClassCache);
  2610. smalltalk.addMethod(
  2611. "_selectorsCache",
  2612. smalltalk.method({
  2613. selector: "selectorsCache",
  2614. category: 'accessing',
  2615. fn: function (){
  2616. var self=this;
  2617. return smalltalk.withContext(function($ctx1) { var $1;
  2618. $1=self["@selectorsCache"];
  2619. return $1;
  2620. }, function($ctx1) {$ctx1.fill(self,"selectorsCache",{}, smalltalk.HLClassCache)})},
  2621. args: [],
  2622. source: "selectorsCache\x0a\x09^ selectorsCache",
  2623. messageSends: [],
  2624. referencedClasses: []
  2625. }),
  2626. smalltalk.HLClassCache);
  2627. smalltalk.addMethod(
  2628. "_selectorsCache_",
  2629. smalltalk.method({
  2630. selector: "selectorsCache:",
  2631. category: 'accessing',
  2632. fn: function (aCache){
  2633. var self=this;
  2634. return smalltalk.withContext(function($ctx1) { self["@selectorsCache"]=aCache;
  2635. return self}, function($ctx1) {$ctx1.fill(self,"selectorsCache:",{aCache:aCache}, smalltalk.HLClassCache)})},
  2636. args: ["aCache"],
  2637. source: "selectorsCache: aCache\x0a\x09selectorsCache := aCache",
  2638. messageSends: [],
  2639. referencedClasses: []
  2640. }),
  2641. smalltalk.HLClassCache);
  2642. smalltalk.addMethod(
  2643. "_theClass",
  2644. smalltalk.method({
  2645. selector: "theClass",
  2646. category: 'accessing',
  2647. fn: function (){
  2648. var self=this;
  2649. return smalltalk.withContext(function($ctx1) { var $1;
  2650. $1=self["@class"];
  2651. return $1;
  2652. }, function($ctx1) {$ctx1.fill(self,"theClass",{}, smalltalk.HLClassCache)})},
  2653. args: [],
  2654. source: "theClass\x0a\x09^ class",
  2655. messageSends: [],
  2656. referencedClasses: []
  2657. }),
  2658. smalltalk.HLClassCache);
  2659. smalltalk.addMethod(
  2660. "_theClass_",
  2661. smalltalk.method({
  2662. selector: "theClass:",
  2663. category: 'accessing',
  2664. fn: function (aClass){
  2665. var self=this;
  2666. return smalltalk.withContext(function($ctx1) { self["@class"]=aClass;
  2667. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass}, smalltalk.HLClassCache)})},
  2668. args: ["aClass"],
  2669. source: "theClass: aClass\x0a\x09class := aClass",
  2670. messageSends: [],
  2671. referencedClasses: []
  2672. }),
  2673. smalltalk.HLClassCache);
  2674. smalltalk.addMethod(
  2675. "_on_selectorsCache_",
  2676. smalltalk.method({
  2677. selector: "on:selectorsCache:",
  2678. category: 'instance creation',
  2679. fn: function (aClass,aSelectorsCache){
  2680. var self=this;
  2681. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  2682. $2=_st(self)._new();
  2683. _st($2)._theClass_(aClass);
  2684. _st($2)._selectorsCache_(aSelectorsCache);
  2685. $3=_st($2)._yourself();
  2686. $1=$3;
  2687. return $1;
  2688. }, function($ctx1) {$ctx1.fill(self,"on:selectorsCache:",{aClass:aClass,aSelectorsCache:aSelectorsCache}, smalltalk.HLClassCache.klass)})},
  2689. args: ["aClass", "aSelectorsCache"],
  2690. source: "on: aClass selectorsCache: aSelectorsCache\x0a\x09^ self new\x0a \x09theClass: aClass;\x0a selectorsCache: aSelectorsCache;\x0a yourself",
  2691. messageSends: ["theClass:", "new", "selectorsCache:", "yourself"],
  2692. referencedClasses: []
  2693. }),
  2694. smalltalk.HLClassCache.klass);
  2695. smalltalk.addClass('HLSelectorsCache', smalltalk.Object, ['classesCache'], 'Helios-Browser');
  2696. smalltalk.addMethod(
  2697. "_cacheFor_",
  2698. smalltalk.method({
  2699. selector: "cacheFor:",
  2700. category: 'accessing',
  2701. fn: function (aClass){
  2702. var self=this;
  2703. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2704. $1=aClass;
  2705. if(($receiver = $1) == nil || $receiver == undefined){
  2706. return nil;
  2707. } else {
  2708. $1;
  2709. };
  2710. $2=_st(_st(self)._classesCache())._at_ifAbsentPut_(_st(aClass)._name(),(function(){
  2711. return smalltalk.withContext(function($ctx2) { return _st(self)._newCacheFor_(aClass);
  2712. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2713. return $2;
  2714. }, function($ctx1) {$ctx1.fill(self,"cacheFor:",{aClass:aClass}, smalltalk.HLSelectorsCache)})},
  2715. args: ["aClass"],
  2716. source: "cacheFor: aClass\x0a\x09aClass ifNil: [ ^ nil ].\x0a \x0a\x09^ self classesCache\x0a \x09at: aClass name\x0a ifAbsentPut: [ self newCacheFor: aClass ]",
  2717. messageSends: ["ifNil:", "at:ifAbsentPut:", "name", "newCacheFor:", "classesCache"],
  2718. referencedClasses: []
  2719. }),
  2720. smalltalk.HLSelectorsCache);
  2721. smalltalk.addMethod(
  2722. "_classesCache",
  2723. smalltalk.method({
  2724. selector: "classesCache",
  2725. category: 'accessing',
  2726. fn: function (){
  2727. var self=this;
  2728. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2729. $2=self["@classesCache"];
  2730. if(($receiver = $2) == nil || $receiver == undefined){
  2731. self["@classesCache"]=_st((smalltalk.HashedCollection || HashedCollection))._new();
  2732. $1=self["@classesCache"];
  2733. } else {
  2734. $1=$2;
  2735. };
  2736. return $1;
  2737. }, function($ctx1) {$ctx1.fill(self,"classesCache",{}, smalltalk.HLSelectorsCache)})},
  2738. args: [],
  2739. source: "classesCache\x0a\x09^ classesCache ifNil: [ classesCache := HashedCollection new ]",
  2740. messageSends: ["ifNil:", "new"],
  2741. referencedClasses: ["HashedCollection"]
  2742. }),
  2743. smalltalk.HLSelectorsCache);
  2744. smalltalk.addMethod(
  2745. "_initialize",
  2746. smalltalk.method({
  2747. selector: "initialize",
  2748. category: 'initialization',
  2749. fn: function (){
  2750. var self=this;
  2751. return smalltalk.withContext(function($ctx1) { smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  2752. _st(self)._observeSystem();
  2753. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.HLSelectorsCache)})},
  2754. args: [],
  2755. source: "initialize\x0a\x09super initialize.\x0a self observeSystem",
  2756. messageSends: ["initialize", "observeSystem"],
  2757. referencedClasses: []
  2758. }),
  2759. smalltalk.HLSelectorsCache);
  2760. smalltalk.addMethod(
  2761. "_invalidateCacheFor_",
  2762. smalltalk.method({
  2763. selector: "invalidateCacheFor:",
  2764. category: 'private',
  2765. fn: function (aMethod){
  2766. var self=this;
  2767. return smalltalk.withContext(function($ctx1) { _st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._invalidateSelector_(_st(aMethod)._selector());
  2768. return self}, function($ctx1) {$ctx1.fill(self,"invalidateCacheFor:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2769. args: ["aMethod"],
  2770. source: "invalidateCacheFor: aMethod\x0a\x09(self cacheFor: aMethod methodClass)\x0a \x09invalidateSelector: aMethod selector",
  2771. messageSends: ["invalidateSelector:", "selector", "cacheFor:", "methodClass"],
  2772. referencedClasses: []
  2773. }),
  2774. smalltalk.HLSelectorsCache);
  2775. smalltalk.addMethod(
  2776. "_isOverridden_",
  2777. smalltalk.method({
  2778. selector: "isOverridden:",
  2779. category: 'testing',
  2780. fn: function (aMethod){
  2781. var self=this;
  2782. return smalltalk.withContext(function($ctx1) { var $1;
  2783. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverridden_(aMethod);
  2784. return $1;
  2785. }, function($ctx1) {$ctx1.fill(self,"isOverridden:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2786. args: ["aMethod"],
  2787. source: "isOverridden: aMethod\x0a\x09^ (self cacheFor: aMethod methodClass)\x0a \x09isOverridden: aMethod",
  2788. messageSends: ["isOverridden:", "cacheFor:", "methodClass"],
  2789. referencedClasses: []
  2790. }),
  2791. smalltalk.HLSelectorsCache);
  2792. smalltalk.addMethod(
  2793. "_isOverride_",
  2794. smalltalk.method({
  2795. selector: "isOverride:",
  2796. category: 'testing',
  2797. fn: function (aMethod){
  2798. var self=this;
  2799. return smalltalk.withContext(function($ctx1) { var $1;
  2800. $1=_st(_st(self)._cacheFor_(_st(aMethod)._methodClass()))._isOverride_(aMethod);
  2801. return $1;
  2802. }, function($ctx1) {$ctx1.fill(self,"isOverride:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2803. args: ["aMethod"],
  2804. source: "isOverride: aMethod\x0a\x09^ (self cacheFor: aMethod methodClass)\x0a \x09isOverride: aMethod",
  2805. messageSends: ["isOverride:", "cacheFor:", "methodClass"],
  2806. referencedClasses: []
  2807. }),
  2808. smalltalk.HLSelectorsCache);
  2809. smalltalk.addMethod(
  2810. "_newCacheFor_",
  2811. smalltalk.method({
  2812. selector: "newCacheFor:",
  2813. category: 'factory',
  2814. fn: function (aClass){
  2815. var self=this;
  2816. return smalltalk.withContext(function($ctx1) { var $1;
  2817. $1=_st((smalltalk.HLClassCache || HLClassCache))._on_selectorsCache_(aClass,self);
  2818. return $1;
  2819. }, function($ctx1) {$ctx1.fill(self,"newCacheFor:",{aClass:aClass}, smalltalk.HLSelectorsCache)})},
  2820. args: ["aClass"],
  2821. source: "newCacheFor: aClass\x0a\x09^ HLClassCache \x0a \x09on: aClass\x0a selectorsCache: self",
  2822. messageSends: ["on:selectorsCache:"],
  2823. referencedClasses: ["HLClassCache"]
  2824. }),
  2825. smalltalk.HLSelectorsCache);
  2826. smalltalk.addMethod(
  2827. "_observeSystem",
  2828. smalltalk.method({
  2829. selector: "observeSystem",
  2830. category: 'actions',
  2831. fn: function (){
  2832. var self=this;
  2833. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2834. $1=_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current();
  2835. _st($1)._on_do_((smalltalk.MethodAdded || MethodAdded),(function(ann){
  2836. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodAdded_(_st(ann)._method());
  2837. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2838. $2=_st($1)._on_do_((smalltalk.MethodRemoved || MethodRemoved),(function(ann){
  2839. return smalltalk.withContext(function($ctx2) { return _st(self)._onMethodRemoved_(_st(ann)._method());
  2840. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  2841. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{}, smalltalk.HLSelectorsCache)})},
  2842. args: [],
  2843. 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 ]",
  2844. messageSends: ["on:do:", "onMethodAdded:", "method", "current", "onMethodRemoved:"],
  2845. referencedClasses: ["MethodAdded", "SystemAnnouncer", "MethodRemoved"]
  2846. }),
  2847. smalltalk.HLSelectorsCache);
  2848. smalltalk.addMethod(
  2849. "_onMethodAdded_",
  2850. smalltalk.method({
  2851. selector: "onMethodAdded:",
  2852. category: 'reactions',
  2853. fn: function (aMethod){
  2854. var self=this;
  2855. return smalltalk.withContext(function($ctx1) { _st(self)._invalidateCacheFor_(aMethod);
  2856. return self}, function($ctx1) {$ctx1.fill(self,"onMethodAdded:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2857. args: ["aMethod"],
  2858. source: "onMethodAdded: aMethod\x0a\x09self invalidateCacheFor: aMethod",
  2859. messageSends: ["invalidateCacheFor:"],
  2860. referencedClasses: []
  2861. }),
  2862. smalltalk.HLSelectorsCache);
  2863. smalltalk.addMethod(
  2864. "_onMethodRemoved_",
  2865. smalltalk.method({
  2866. selector: "onMethodRemoved:",
  2867. category: 'reactions',
  2868. fn: function (aMethod){
  2869. var self=this;
  2870. return smalltalk.withContext(function($ctx1) { _st(self)._invalidateCacheFor_(aMethod);
  2871. return self}, function($ctx1) {$ctx1.fill(self,"onMethodRemoved:",{aMethod:aMethod}, smalltalk.HLSelectorsCache)})},
  2872. args: ["aMethod"],
  2873. source: "onMethodRemoved: aMethod\x0a\x09self invalidateCacheFor: aMethod",
  2874. messageSends: ["invalidateCacheFor:"],
  2875. referencedClasses: []
  2876. }),
  2877. smalltalk.HLSelectorsCache);
  2878. smalltalk.HLSelectorsCache.klass.iVarNames = ['current'];
  2879. smalltalk.addMethod(
  2880. "_current",
  2881. smalltalk.method({
  2882. selector: "current",
  2883. category: 'accessing',
  2884. fn: function (){
  2885. var self=this;
  2886. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2887. $2=self["@current"];
  2888. if(($receiver = $2) == nil || $receiver == undefined){
  2889. self["@current"]=smalltalk.Object.klass.fn.prototype._new.apply(_st(self), []);
  2890. $1=self["@current"];
  2891. } else {
  2892. $1=$2;
  2893. };
  2894. return $1;
  2895. }, function($ctx1) {$ctx1.fill(self,"current",{}, smalltalk.HLSelectorsCache.klass)})},
  2896. args: [],
  2897. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  2898. messageSends: ["ifNil:", "new"],
  2899. referencedClasses: []
  2900. }),
  2901. smalltalk.HLSelectorsCache.klass);
  2902. smalltalk.addMethod(
  2903. "_flush",
  2904. smalltalk.method({
  2905. selector: "flush",
  2906. category: 'accessing',
  2907. fn: function (){
  2908. var self=this;
  2909. return smalltalk.withContext(function($ctx1) { self["@current"]=nil;
  2910. return self}, function($ctx1) {$ctx1.fill(self,"flush",{}, smalltalk.HLSelectorsCache.klass)})},
  2911. args: [],
  2912. source: "flush\x0a\x09current := nil",
  2913. messageSends: [],
  2914. referencedClasses: []
  2915. }),
  2916. smalltalk.HLSelectorsCache.klass);
  2917. smalltalk.addMethod(
  2918. "_new",
  2919. smalltalk.method({
  2920. selector: "new",
  2921. category: 'instance creation',
  2922. fn: function (){
  2923. var self=this;
  2924. return smalltalk.withContext(function($ctx1) { _st(self)._shouldNotImplement();
  2925. return self}, function($ctx1) {$ctx1.fill(self,"new",{}, smalltalk.HLSelectorsCache.klass)})},
  2926. args: [],
  2927. source: "new\x0a\x09self shouldNotImplement",
  2928. messageSends: ["shouldNotImplement"],
  2929. referencedClasses: []
  2930. }),
  2931. smalltalk.HLSelectorsCache.klass);
  2932. smalltalk.addMethod(
  2933. "_isOverridden",
  2934. smalltalk.method({
  2935. selector: "isOverridden",
  2936. category: '*Helios-Browser',
  2937. fn: function (){
  2938. var self=this;
  2939. var selector;
  2940. return smalltalk.withContext(function($ctx1) { var $1;
  2941. var $early={};
  2942. try {
  2943. selector=_st(self)._selector();
  2944. _st(_st(self)._methodClass())._allSubclassesDo_((function(each){
  2945. return smalltalk.withContext(function($ctx2) { $1=_st(each)._includesSelector_(selector);
  2946. if(smalltalk.assert($1)){
  2947. throw $early=[true];
  2948. };
  2949. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2950. return false;
  2951. }
  2952. catch(e) {if(e===$early)return e[0]; throw e}
  2953. }, function($ctx1) {$ctx1.fill(self,"isOverridden",{selector:selector}, smalltalk.CompiledMethod)})},
  2954. args: [],
  2955. 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",
  2956. messageSends: ["selector", "allSubclassesDo:", "ifTrue:", "includesSelector:", "methodClass"],
  2957. referencedClasses: []
  2958. }),
  2959. smalltalk.CompiledMethod);
  2960. smalltalk.addMethod(
  2961. "_isOverride",
  2962. smalltalk.method({
  2963. selector: "isOverride",
  2964. category: '*Helios-Browser',
  2965. fn: function (){
  2966. var self=this;
  2967. var superclass;
  2968. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2969. superclass=_st(_st(self)._methodClass())._superclass();
  2970. $1=superclass;
  2971. if(($receiver = $1) == nil || $receiver == undefined){
  2972. return false;
  2973. } else {
  2974. $1;
  2975. };
  2976. $2=_st(_st(_st(_st(self)._methodClass())._superclass())._lookupSelector_(_st(self)._selector()))._notNil();
  2977. return $2;
  2978. }, function($ctx1) {$ctx1.fill(self,"isOverride",{superclass:superclass}, smalltalk.CompiledMethod)})},
  2979. args: [],
  2980. 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",
  2981. messageSends: ["superclass", "methodClass", "ifNil:", "notNil", "lookupSelector:", "selector"],
  2982. referencedClasses: []
  2983. }),
  2984. smalltalk.CompiledMethod);