1
0

Helios-Browser.js 149 KB

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