Helios-Browser.js 154 KB

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