Helios-Browser.js 149 KB

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