Helios-Browser.js 184 KB

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