1
0

Helios-Browser.js 155 KB

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