1
0

Helios-Browser.deploy.js 120 KB

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