Helios-Browser.js 149 KB

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