Helios-Browser.js 161 KB

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