Helios-Browser.js 168 KB

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