Helios-Browser.deploy.js 118 KB

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