1
0

Helios-Browser.js 155 KB

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