Helios-Browser.deploy.js 125 KB

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