Helios-Browser.js 164 KB

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