Helios-Browser.js 156 KB

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