Helios-Browser.js 168 KB

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