1
0

Helios-Browser.js 154 KB

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