Helios-Browser.js 158 KB

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