Helios-Browser.js 142 KB

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