Helios-Browser.js 147 KB

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