Helios-Browser.js 159 KB

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