Helios-Browser.js 173 KB

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