Helios-Browser.js 149 KB

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