Helios-Browser.js 155 KB

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