Helios-Browser.js 156 KB

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