2
0

Helios-Browser.js 164 KB

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