Helios-Browser.deploy.js 107 KB

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