Helios-Browser.deploy.js 117 KB

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