Helios-Browser.js 147 KB

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