Helios-Browser.deploy.js 120 KB

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