Helios-Browser.js 154 KB

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