Helios-Browser.js 161 KB

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