Helios-Browser.deploy.js 113 KB

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