Helios-Browser.deploy.js 120 KB

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