Helios-Browser.js 146 KB

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