Helios-Core.js 151 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197
  1. smalltalk.addPackage('Helios-Core');
  2. smalltalk.addClass('HLModel', smalltalk.Object, ['announcer', 'environment'], 'Helios-Core');
  3. smalltalk.addMethod(
  4. smalltalk.method({
  5. selector: "announcer",
  6. category: 'accessing',
  7. fn: function (){
  8. var self=this;
  9. function $Announcer(){return smalltalk.Announcer||(typeof Announcer=="undefined"?nil:Announcer)}
  10. return smalltalk.withContext(function($ctx1) {
  11. var $2,$1;
  12. $2=self["@announcer"];
  13. if(($receiver = $2) == nil || $receiver == undefined){
  14. self["@announcer"]=_st($Announcer())._new();
  15. $1=self["@announcer"];
  16. } else {
  17. $1=$2;
  18. };
  19. return $1;
  20. }, function($ctx1) {$ctx1.fill(self,"announcer",{},smalltalk.HLModel)})},
  21. args: [],
  22. source: "announcer\x0a\x09^ announcer ifNil: [ announcer := Announcer new ]",
  23. messageSends: ["ifNil:", "new"],
  24. referencedClasses: ["Announcer"]
  25. }),
  26. smalltalk.HLModel);
  27. smalltalk.addMethod(
  28. smalltalk.method({
  29. selector: "environment",
  30. category: 'accessing',
  31. fn: function (){
  32. var self=this;
  33. return smalltalk.withContext(function($ctx1) {
  34. var $2,$1;
  35. $2=self["@environment"];
  36. if(($receiver = $2) == nil || $receiver == undefined){
  37. $1=_st(_st(self)._manager())._environment();
  38. } else {
  39. $1=$2;
  40. };
  41. return $1;
  42. }, function($ctx1) {$ctx1.fill(self,"environment",{},smalltalk.HLModel)})},
  43. args: [],
  44. source: "environment\x0a\x09^ environment ifNil: [ self manager environment ]",
  45. messageSends: ["ifNil:", "environment", "manager"],
  46. referencedClasses: []
  47. }),
  48. smalltalk.HLModel);
  49. smalltalk.addMethod(
  50. smalltalk.method({
  51. selector: "environment:",
  52. category: 'accessing',
  53. fn: function (anEnvironment){
  54. var self=this;
  55. return smalltalk.withContext(function($ctx1) {
  56. self["@environment"]=anEnvironment;
  57. return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment},smalltalk.HLModel)})},
  58. args: ["anEnvironment"],
  59. source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
  60. messageSends: [],
  61. referencedClasses: []
  62. }),
  63. smalltalk.HLModel);
  64. smalltalk.addMethod(
  65. smalltalk.method({
  66. selector: "isBrowserModel",
  67. category: 'testing',
  68. fn: function (){
  69. var self=this;
  70. return smalltalk.withContext(function($ctx1) {
  71. return false;
  72. }, function($ctx1) {$ctx1.fill(self,"isBrowserModel",{},smalltalk.HLModel)})},
  73. args: [],
  74. source: "isBrowserModel\x0a\x09^ false",
  75. messageSends: [],
  76. referencedClasses: []
  77. }),
  78. smalltalk.HLModel);
  79. smalltalk.addMethod(
  80. smalltalk.method({
  81. selector: "isReferencesModel",
  82. category: 'testing',
  83. fn: function (){
  84. var self=this;
  85. return smalltalk.withContext(function($ctx1) {
  86. return false;
  87. }, function($ctx1) {$ctx1.fill(self,"isReferencesModel",{},smalltalk.HLModel)})},
  88. args: [],
  89. source: "isReferencesModel\x0a\x09^ false",
  90. messageSends: [],
  91. referencedClasses: []
  92. }),
  93. smalltalk.HLModel);
  94. smalltalk.addMethod(
  95. smalltalk.method({
  96. selector: "isToolModel",
  97. category: 'testing',
  98. fn: function (){
  99. var self=this;
  100. return smalltalk.withContext(function($ctx1) {
  101. return false;
  102. }, function($ctx1) {$ctx1.fill(self,"isToolModel",{},smalltalk.HLModel)})},
  103. args: [],
  104. source: "isToolModel\x0a\x09^ false",
  105. messageSends: [],
  106. referencedClasses: []
  107. }),
  108. smalltalk.HLModel);
  109. smalltalk.addMethod(
  110. smalltalk.method({
  111. selector: "manager",
  112. category: 'accessing',
  113. fn: function (){
  114. var self=this;
  115. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  116. return smalltalk.withContext(function($ctx1) {
  117. var $1;
  118. $1=_st($HLManager())._current();
  119. return $1;
  120. }, function($ctx1) {$ctx1.fill(self,"manager",{},smalltalk.HLModel)})},
  121. args: [],
  122. source: "manager\x0a\x09^ HLManager current",
  123. messageSends: ["current"],
  124. referencedClasses: ["HLManager"]
  125. }),
  126. smalltalk.HLModel);
  127. smalltalk.addMethod(
  128. smalltalk.method({
  129. selector: "systemAnnouncer",
  130. category: 'accessing',
  131. fn: function (){
  132. var self=this;
  133. return smalltalk.withContext(function($ctx1) {
  134. var $1;
  135. $1=_st(_st(self)._environment())._systemAnnouncer();
  136. return $1;
  137. }, function($ctx1) {$ctx1.fill(self,"systemAnnouncer",{},smalltalk.HLModel)})},
  138. args: [],
  139. source: "systemAnnouncer\x0a\x09^ self environment systemAnnouncer",
  140. messageSends: ["systemAnnouncer", "environment"],
  141. referencedClasses: []
  142. }),
  143. smalltalk.HLModel);
  144. smalltalk.addMethod(
  145. smalltalk.method({
  146. selector: "withChangesDo:",
  147. category: 'error handling',
  148. fn: function (aBlock){
  149. var self=this;
  150. function $HLChangeForbidden(){return smalltalk.HLChangeForbidden||(typeof HLChangeForbidden=="undefined"?nil:HLChangeForbidden)}
  151. function $HLAboutToChange(){return smalltalk.HLAboutToChange||(typeof HLAboutToChange=="undefined"?nil:HLAboutToChange)}
  152. return smalltalk.withContext(function($ctx1) {
  153. _st((function(){
  154. return smalltalk.withContext(function($ctx2) {
  155. _st(_st(self)._announcer())._announce_(_st(_st($HLAboutToChange())._new())._actionBlock_(aBlock));
  156. return _st(aBlock)._value();
  157. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_($HLChangeForbidden(),(function(ex){
  158. return smalltalk.withContext(function($ctx2) {
  159. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
  160. return self}, function($ctx1) {$ctx1.fill(self,"withChangesDo:",{aBlock:aBlock},smalltalk.HLModel)})},
  161. args: ["aBlock"],
  162. source: "withChangesDo: aBlock\x0a\x09[ \x0a\x09\x09self announcer announce: (HLAboutToChange new\x0a\x09\x09\x09actionBlock: aBlock).\x0a\x09\x09aBlock value.\x0a\x09]\x0a\x09\x09on: HLChangeForbidden \x0a\x09\x09do: [ :ex | ]",
  163. messageSends: ["on:do:", "announce:", "actionBlock:", "new", "announcer", "value"],
  164. referencedClasses: ["HLChangeForbidden", "HLAboutToChange"]
  165. }),
  166. smalltalk.HLModel);
  167. smalltalk.addClass('HLToolModel', smalltalk.HLModel, ['selectedClass', 'selectedPackage', 'selectedProtocol', 'selectedSelector'], 'Helios-Core');
  168. smalltalk.addMethod(
  169. smalltalk.method({
  170. selector: "addInstVarNamed:",
  171. category: 'actions',
  172. fn: function (aString){
  173. var self=this;
  174. function $HLInstVarAdded(){return smalltalk.HLInstVarAdded||(typeof HLInstVarAdded=="undefined"?nil:HLInstVarAdded)}
  175. return smalltalk.withContext(function($ctx1) {
  176. var $1,$2;
  177. _st(_st(self)._environment())._addInstVarNamed_to_(aString,_st(self)._selectedClass());
  178. $1=_st($HLInstVarAdded())._new();
  179. _st($1)._theClass_(_st(self)._selectedClass());
  180. _st($1)._variableName_(aString);
  181. $2=_st($1)._yourself();
  182. _st(_st(self)._announcer())._announce_($2);
  183. return self}, function($ctx1) {$ctx1.fill(self,"addInstVarNamed:",{aString:aString},smalltalk.HLToolModel)})},
  184. args: ["aString"],
  185. source: "addInstVarNamed: aString\x0a\x09self environment addInstVarNamed: aString to: self selectedClass.\x0a\x09self announcer announce: (HLInstVarAdded new\x0a\x09\x09theClass: self selectedClass;\x0a\x09\x09variableName: aString;\x0a\x09\x09yourself)",
  186. messageSends: ["addInstVarNamed:to:", "selectedClass", "environment", "announce:", "theClass:", "new", "variableName:", "yourself", "announcer"],
  187. referencedClasses: ["HLInstVarAdded"]
  188. }),
  189. smalltalk.HLToolModel);
  190. smalltalk.addMethod(
  191. smalltalk.method({
  192. selector: "allProtocol",
  193. category: 'defaults',
  194. fn: function (){
  195. var self=this;
  196. return smalltalk.withContext(function($ctx1) {
  197. return "-- all --";
  198. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{},smalltalk.HLToolModel)})},
  199. args: [],
  200. source: "allProtocol\x0a\x09^ '-- all --'",
  201. messageSends: [],
  202. referencedClasses: []
  203. }),
  204. smalltalk.HLToolModel);
  205. smalltalk.addMethod(
  206. smalltalk.method({
  207. selector: "allSelectors",
  208. category: 'accessing',
  209. fn: function (){
  210. var self=this;
  211. return smalltalk.withContext(function($ctx1) {
  212. var $1;
  213. $1=_st(_st(self)._environment())._allSelectors();
  214. return $1;
  215. }, function($ctx1) {$ctx1.fill(self,"allSelectors",{},smalltalk.HLToolModel)})},
  216. args: [],
  217. source: "allSelectors\x0a\x09^ self environment allSelectors",
  218. messageSends: ["allSelectors", "environment"],
  219. referencedClasses: []
  220. }),
  221. smalltalk.HLToolModel);
  222. smalltalk.addMethod(
  223. smalltalk.method({
  224. selector: "availableClassNames",
  225. category: 'accessing',
  226. fn: function (){
  227. var self=this;
  228. return smalltalk.withContext(function($ctx1) {
  229. var $1;
  230. $1=_st(_st(self)._environment())._availableClassNames();
  231. return $1;
  232. }, function($ctx1) {$ctx1.fill(self,"availableClassNames",{},smalltalk.HLToolModel)})},
  233. args: [],
  234. source: "availableClassNames\x0a\x09^ self environment availableClassNames",
  235. messageSends: ["availableClassNames", "environment"],
  236. referencedClasses: []
  237. }),
  238. smalltalk.HLToolModel);
  239. smalltalk.addMethod(
  240. smalltalk.method({
  241. selector: "availablePackageNames",
  242. category: 'accessing',
  243. fn: function (){
  244. var self=this;
  245. return smalltalk.withContext(function($ctx1) {
  246. var $1;
  247. $1=_st(_st(self)._environment())._availablePackageNames();
  248. return $1;
  249. }, function($ctx1) {$ctx1.fill(self,"availablePackageNames",{},smalltalk.HLToolModel)})},
  250. args: [],
  251. source: "availablePackageNames\x0a\x09^ self environment availablePackageNames",
  252. messageSends: ["availablePackageNames", "environment"],
  253. referencedClasses: []
  254. }),
  255. smalltalk.HLToolModel);
  256. smalltalk.addMethod(
  257. smalltalk.method({
  258. selector: "availablePackages",
  259. category: 'accessing',
  260. fn: function (){
  261. var self=this;
  262. return smalltalk.withContext(function($ctx1) {
  263. var $1;
  264. $1=_st(_st(self)._environment())._availablePackageNames();
  265. return $1;
  266. }, function($ctx1) {$ctx1.fill(self,"availablePackages",{},smalltalk.HLToolModel)})},
  267. args: [],
  268. source: "availablePackages\x0a\x09^ self environment availablePackageNames",
  269. messageSends: ["availablePackageNames", "environment"],
  270. referencedClasses: []
  271. }),
  272. smalltalk.HLToolModel);
  273. smalltalk.addMethod(
  274. smalltalk.method({
  275. selector: "availableProtocols",
  276. category: 'accessing',
  277. fn: function (){
  278. var self=this;
  279. return smalltalk.withContext(function($ctx1) {
  280. var $1;
  281. $1=_st(_st(self)._environment())._availableProtocolsFor_(_st(self)._selectedClass());
  282. return $1;
  283. }, function($ctx1) {$ctx1.fill(self,"availableProtocols",{},smalltalk.HLToolModel)})},
  284. args: [],
  285. source: "availableProtocols\x0a\x09^ self environment availableProtocolsFor: self selectedClass",
  286. messageSends: ["availableProtocolsFor:", "selectedClass", "environment"],
  287. referencedClasses: []
  288. }),
  289. smalltalk.HLToolModel);
  290. smalltalk.addMethod(
  291. smalltalk.method({
  292. selector: "commitPackage",
  293. category: 'commands actions',
  294. fn: function (){
  295. var self=this;
  296. return smalltalk.withContext(function($ctx1) {
  297. _st(self)._withHelperLabelled_do_(_st(_st("Committing package ").__comma(_st(_st(self)._selectedPackage())._name())).__comma("..."),(function(){
  298. return smalltalk.withContext(function($ctx2) {
  299. return _st(_st(self)._environment())._commitPackage_(_st(self)._selectedPackage());
  300. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  301. return self}, function($ctx1) {$ctx1.fill(self,"commitPackage",{},smalltalk.HLToolModel)})},
  302. args: [],
  303. source: "commitPackage\x0a\x09self \x0a\x09\x09withHelperLabelled: 'Committing package ', self selectedPackage name, '...'\x0a\x09\x09do: [ self environment commitPackage: self selectedPackage ]",
  304. messageSends: ["withHelperLabelled:do:", ",", "name", "selectedPackage", "commitPackage:", "environment"],
  305. referencedClasses: []
  306. }),
  307. smalltalk.HLToolModel);
  308. smalltalk.addMethod(
  309. smalltalk.method({
  310. selector: "compilationProtocol",
  311. category: 'private',
  312. fn: function (){
  313. var self=this;
  314. var currentProtocol;
  315. return smalltalk.withContext(function($ctx1) {
  316. var $1,$2,$4,$3;
  317. currentProtocol=_st(self)._selectedProtocol();
  318. $1=currentProtocol;
  319. if(($receiver = $1) == nil || $receiver == undefined){
  320. currentProtocol=_st(self)._unclassifiedProtocol();
  321. currentProtocol;
  322. } else {
  323. $1;
  324. };
  325. $2=_st(self)._selectedMethod();
  326. if(($receiver = $2) == nil || $receiver == undefined){
  327. $2;
  328. } else {
  329. currentProtocol=_st(_st(self)._selectedMethod())._protocol();
  330. currentProtocol;
  331. };
  332. $4=_st(currentProtocol).__eq(_st(self)._allProtocol());
  333. if(smalltalk.assert($4)){
  334. $3=_st(self)._unclassifiedProtocol();
  335. } else {
  336. $3=currentProtocol;
  337. };
  338. return $3;
  339. }, function($ctx1) {$ctx1.fill(self,"compilationProtocol",{currentProtocol:currentProtocol},smalltalk.HLToolModel)})},
  340. args: [],
  341. source: "compilationProtocol\x0a\x09| currentProtocol |\x0a\x09\x0a\x09currentProtocol := self selectedProtocol.\x0a\x09currentProtocol ifNil: [ currentProtocol := self unclassifiedProtocol ].\x0a\x09self selectedMethod ifNotNil: [ currentProtocol := self selectedMethod protocol ].\x0a\x0a\x09^ currentProtocol = self allProtocol\x0a\x09\x09ifTrue: [ self unclassifiedProtocol ]\x0a\x09\x09ifFalse: [ currentProtocol ]",
  342. messageSends: ["selectedProtocol", "ifNil:", "unclassifiedProtocol", "ifNotNil:", "protocol", "selectedMethod", "ifTrue:ifFalse:", "=", "allProtocol"],
  343. referencedClasses: []
  344. }),
  345. smalltalk.HLToolModel);
  346. smalltalk.addMethod(
  347. smalltalk.method({
  348. selector: "compileClassComment:",
  349. category: 'compiling',
  350. fn: function (aString){
  351. var self=this;
  352. return smalltalk.withContext(function($ctx1) {
  353. _st(_st(self)._environment())._compileClassComment_for_(aString,_st(self)._selectedClass());
  354. return self}, function($ctx1) {$ctx1.fill(self,"compileClassComment:",{aString:aString},smalltalk.HLToolModel)})},
  355. args: ["aString"],
  356. source: "compileClassComment: aString\x0a\x09self environment \x0a\x09\x09compileClassComment: aString \x0a\x09\x09for: self selectedClass",
  357. messageSends: ["compileClassComment:for:", "selectedClass", "environment"],
  358. referencedClasses: []
  359. }),
  360. smalltalk.HLToolModel);
  361. smalltalk.addMethod(
  362. smalltalk.method({
  363. selector: "compileClassDefinition:",
  364. category: 'compiling',
  365. fn: function (aString){
  366. var self=this;
  367. return smalltalk.withContext(function($ctx1) {
  368. _st(_st(self)._environment())._compileClassDefinition_(aString);
  369. return self}, function($ctx1) {$ctx1.fill(self,"compileClassDefinition:",{aString:aString},smalltalk.HLToolModel)})},
  370. args: ["aString"],
  371. source: "compileClassDefinition: aString\x0a\x09self environment compileClassDefinition: aString",
  372. messageSends: ["compileClassDefinition:", "environment"],
  373. referencedClasses: []
  374. }),
  375. smalltalk.HLToolModel);
  376. smalltalk.addMethod(
  377. smalltalk.method({
  378. selector: "compileMethod:",
  379. category: 'compiling',
  380. fn: function (aString){
  381. var self=this;
  382. var method;
  383. return smalltalk.withContext(function($ctx1) {
  384. _st(self)._withCompileErrorHandling_((function(){
  385. return smalltalk.withContext(function($ctx2) {
  386. method=_st(_st(self)._environment())._compileMethod_for_protocol_(aString,_st(self)._selectedClass(),_st(self)._compilationProtocol());
  387. method;
  388. return _st(self)._selectedMethod_(method);
  389. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  390. return self}, function($ctx1) {$ctx1.fill(self,"compileMethod:",{aString:aString,method:method},smalltalk.HLToolModel)})},
  391. args: ["aString"],
  392. source: "compileMethod: aString\x0a\x09| method |\x0a\x09\x0a\x09self withCompileErrorHandling: [ \x0a\x09\x09method := self environment \x0a\x09\x09\x09compileMethod: aString \x0a\x09\x09\x09for: self selectedClass\x0a\x09\x09\x09protocol: self compilationProtocol.\x0a\x0a\x09\x09self selectedMethod: method ]",
  393. messageSends: ["withCompileErrorHandling:", "compileMethod:for:protocol:", "selectedClass", "compilationProtocol", "environment", "selectedMethod:"],
  394. referencedClasses: []
  395. }),
  396. smalltalk.HLToolModel);
  397. smalltalk.addMethod(
  398. smalltalk.method({
  399. selector: "copyClassTo:",
  400. category: 'commands actions',
  401. fn: function (aClassName){
  402. var self=this;
  403. return smalltalk.withContext(function($ctx1) {
  404. _st(self)._withChangesDo_((function(){
  405. return smalltalk.withContext(function($ctx2) {
  406. return _st(_st(self)._environment())._copyClass_to_(_st(_st(self)._selectedClass())._theNonMetaClass(),aClassName);
  407. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  408. return self}, function($ctx1) {$ctx1.fill(self,"copyClassTo:",{aClassName:aClassName},smalltalk.HLToolModel)})},
  409. args: ["aClassName"],
  410. source: "copyClassTo: aClassName\x0a\x09self withChangesDo: [ \x0a\x09\x09self environment \x0a\x09\x09\x09copyClass: self selectedClass theNonMetaClass\x0a\x09\x09\x09to: aClassName ]",
  411. messageSends: ["withChangesDo:", "copyClass:to:", "theNonMetaClass", "selectedClass", "environment"],
  412. referencedClasses: []
  413. }),
  414. smalltalk.HLToolModel);
  415. smalltalk.addMethod(
  416. smalltalk.method({
  417. selector: "handleCompileError:",
  418. category: 'error handling',
  419. fn: function (anError){
  420. var self=this;
  421. function $HLCompileErrorRaised(){return smalltalk.HLCompileErrorRaised||(typeof HLCompileErrorRaised=="undefined"?nil:HLCompileErrorRaised)}
  422. return smalltalk.withContext(function($ctx1) {
  423. var $1,$2;
  424. $1=_st($HLCompileErrorRaised())._new();
  425. _st($1)._error_(anError);
  426. $2=_st($1)._yourself();
  427. _st(_st(self)._announcer())._announce_($2);
  428. return self}, function($ctx1) {$ctx1.fill(self,"handleCompileError:",{anError:anError},smalltalk.HLToolModel)})},
  429. args: ["anError"],
  430. source: "handleCompileError: anError\x0a\x09self announcer announce: (HLCompileErrorRaised new\x0a\x09\x09error: anError;\x0a\x09\x09yourself)",
  431. messageSends: ["announce:", "error:", "new", "yourself", "announcer"],
  432. referencedClasses: ["HLCompileErrorRaised"]
  433. }),
  434. smalltalk.HLToolModel);
  435. smalltalk.addMethod(
  436. smalltalk.method({
  437. selector: "handleParseError:",
  438. category: 'error handling',
  439. fn: function (anError){
  440. var self=this;
  441. var split,line,column,messageToInsert;
  442. function $HLParseErrorRaised(){return smalltalk.HLParseErrorRaised||(typeof HLParseErrorRaised=="undefined"?nil:HLParseErrorRaised)}
  443. return smalltalk.withContext(function($ctx1) {
  444. var $1,$2;
  445. split=_st(_st(anError)._messageText())._tokenize_(" : ");
  446. messageToInsert=_st(split)._second();
  447. split=_st(_st(split)._first())._copyFrom_to_((21),_st(_st(split)._first())._size());
  448. split=_st(split)._tokenize_(" column ");
  449. line=_st(split)._first();
  450. column=_st(split)._second();
  451. $1=_st($HLParseErrorRaised())._new();
  452. _st($1)._line_(_st(line)._asNumber());
  453. _st($1)._column_(_st(column)._asNumber());
  454. _st($1)._message_(messageToInsert);
  455. _st($1)._error_(anError);
  456. $2=_st($1)._yourself();
  457. _st(_st(self)._announcer())._announce_($2);
  458. return self}, function($ctx1) {$ctx1.fill(self,"handleParseError:",{anError:anError,split:split,line:line,column:column,messageToInsert:messageToInsert},smalltalk.HLToolModel)})},
  459. args: ["anError"],
  460. source: "handleParseError: anError\x0a\x09| split line column messageToInsert |\x0a\x09\x0a\x09split := anError messageText tokenize: ' : '.\x0a\x09messageToInsert := split second.\x0a\x0a\x09\x2221 = 'Parse error on line ' size + 1\x22\x0a\x09split := split first copyFrom: 21 to: split first size.\x0a\x09\x0a\x09split := split tokenize: ' column '.\x0a\x09line := split first.\x0a\x09column := split second.\x0a\x09\x0a\x09self announcer announce: (HLParseErrorRaised new\x0a\x09\x09line: line asNumber;\x0a\x09\x09column: column asNumber;\x0a\x09\x09message: messageToInsert;\x0a\x09\x09error: anError;\x0a\x09\x09yourself)",
  461. messageSends: ["tokenize:", "messageText", "second", "copyFrom:to:", "size", "first", "announce:", "line:", "asNumber", "new", "column:", "message:", "error:", "yourself", "announcer"],
  462. referencedClasses: ["HLParseErrorRaised"]
  463. }),
  464. smalltalk.HLToolModel);
  465. smalltalk.addMethod(
  466. smalltalk.method({
  467. selector: "handleUnkownVariableError:",
  468. category: 'error handling',
  469. fn: function (anError){
  470. var self=this;
  471. function $HLUnknownVariableErrorRaised(){return smalltalk.HLUnknownVariableErrorRaised||(typeof HLUnknownVariableErrorRaised=="undefined"?nil:HLUnknownVariableErrorRaised)}
  472. return smalltalk.withContext(function($ctx1) {
  473. var $1,$2;
  474. $1=_st($HLUnknownVariableErrorRaised())._new();
  475. _st($1)._error_(anError);
  476. $2=_st($1)._yourself();
  477. _st(_st(self)._announcer())._announce_($2);
  478. return self}, function($ctx1) {$ctx1.fill(self,"handleUnkownVariableError:",{anError:anError},smalltalk.HLToolModel)})},
  479. args: ["anError"],
  480. source: "handleUnkownVariableError: anError\x0a\x09self announcer announce: (HLUnknownVariableErrorRaised new\x0a\x09\x09error: anError;\x0a\x09\x09yourself)",
  481. messageSends: ["announce:", "error:", "new", "yourself", "announcer"],
  482. referencedClasses: ["HLUnknownVariableErrorRaised"]
  483. }),
  484. smalltalk.HLToolModel);
  485. smalltalk.addMethod(
  486. smalltalk.method({
  487. selector: "isToolModel",
  488. category: 'testing',
  489. fn: function (){
  490. var self=this;
  491. return smalltalk.withContext(function($ctx1) {
  492. return true;
  493. }, function($ctx1) {$ctx1.fill(self,"isToolModel",{},smalltalk.HLToolModel)})},
  494. args: [],
  495. source: "isToolModel\x0a\x09^ true",
  496. messageSends: [],
  497. referencedClasses: []
  498. }),
  499. smalltalk.HLToolModel);
  500. smalltalk.addMethod(
  501. smalltalk.method({
  502. selector: "moveClassToPackage:",
  503. category: 'commands actions',
  504. fn: function (aPackageName){
  505. var self=this;
  506. return smalltalk.withContext(function($ctx1) {
  507. _st(self)._withChangesDo_((function(){
  508. return smalltalk.withContext(function($ctx2) {
  509. return _st(_st(self)._environment())._moveClass_toPackage_(_st(_st(self)._selectedClass())._theNonMetaClass(),aPackageName);
  510. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  511. return self}, function($ctx1) {$ctx1.fill(self,"moveClassToPackage:",{aPackageName:aPackageName},smalltalk.HLToolModel)})},
  512. args: ["aPackageName"],
  513. source: "moveClassToPackage: aPackageName\x0a\x09self withChangesDo: [\x0a\x09\x09self environment \x0a\x09\x09\x09moveClass: self selectedClass theNonMetaClass\x0a\x09\x09\x09toPackage: aPackageName ]",
  514. messageSends: ["withChangesDo:", "moveClass:toPackage:", "theNonMetaClass", "selectedClass", "environment"],
  515. referencedClasses: []
  516. }),
  517. smalltalk.HLToolModel);
  518. smalltalk.addMethod(
  519. smalltalk.method({
  520. selector: "moveMethodToClass:",
  521. category: 'commands actions',
  522. fn: function (aClassName){
  523. var self=this;
  524. return smalltalk.withContext(function($ctx1) {
  525. _st(self)._withChangesDo_((function(){
  526. return smalltalk.withContext(function($ctx2) {
  527. return _st(_st(self)._environment())._moveMethod_toClass_(_st(self)._selectedMethod(),aClassName);
  528. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  529. return self}, function($ctx1) {$ctx1.fill(self,"moveMethodToClass:",{aClassName:aClassName},smalltalk.HLToolModel)})},
  530. args: ["aClassName"],
  531. source: "moveMethodToClass: aClassName\x0a\x09self withChangesDo: [\x0a\x09\x09self environment \x0a\x09\x09\x09moveMethod: self selectedMethod \x0a\x09\x09\x09toClass: aClassName ]",
  532. messageSends: ["withChangesDo:", "moveMethod:toClass:", "selectedMethod", "environment"],
  533. referencedClasses: []
  534. }),
  535. smalltalk.HLToolModel);
  536. smalltalk.addMethod(
  537. smalltalk.method({
  538. selector: "moveMethodToProtocol:",
  539. category: 'commands actions',
  540. fn: function (aProtocol){
  541. var self=this;
  542. return smalltalk.withContext(function($ctx1) {
  543. _st(self)._withChangesDo_((function(){
  544. return smalltalk.withContext(function($ctx2) {
  545. return _st(_st(self)._environment())._moveMethod_toProtocol_(_st(self)._selectedMethod(),aProtocol);
  546. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  547. return self}, function($ctx1) {$ctx1.fill(self,"moveMethodToProtocol:",{aProtocol:aProtocol},smalltalk.HLToolModel)})},
  548. args: ["aProtocol"],
  549. source: "moveMethodToProtocol: aProtocol\x0a\x09self withChangesDo: [\x0a\x09\x09self environment \x0a\x09\x09\x09moveMethod: self selectedMethod \x0a\x09\x09\x09toProtocol: aProtocol ]",
  550. messageSends: ["withChangesDo:", "moveMethod:toProtocol:", "selectedMethod", "environment"],
  551. referencedClasses: []
  552. }),
  553. smalltalk.HLToolModel);
  554. smalltalk.addMethod(
  555. smalltalk.method({
  556. selector: "openClassNamed:",
  557. category: 'commands actions',
  558. fn: function (aString){
  559. var self=this;
  560. var class_;
  561. return smalltalk.withContext(function($ctx1) {
  562. _st(self)._withChangesDo_((function(){
  563. return smalltalk.withContext(function($ctx2) {
  564. class_=_st(_st(self)._environment())._classNamed_(aString);
  565. class_;
  566. _st(self)._selectedPackage_(_st(class_)._package());
  567. return _st(self)._selectedClass_(class_);
  568. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  569. return self}, function($ctx1) {$ctx1.fill(self,"openClassNamed:",{aString:aString,class_:class_},smalltalk.HLToolModel)})},
  570. args: ["aString"],
  571. source: "openClassNamed: aString\x0a\x09| class |\x0a\x09\x0a\x09self withChangesDo: [\x0a\x09\x09class := self environment classNamed: aString.\x0a\x09\x09self selectedPackage: class package.\x0a\x09\x09self selectedClass: class ]",
  572. messageSends: ["withChangesDo:", "classNamed:", "environment", "selectedPackage:", "package", "selectedClass:"],
  573. referencedClasses: []
  574. }),
  575. smalltalk.HLToolModel);
  576. smalltalk.addMethod(
  577. smalltalk.method({
  578. selector: "packages",
  579. category: 'accessing',
  580. fn: function (){
  581. var self=this;
  582. return smalltalk.withContext(function($ctx1) {
  583. var $1;
  584. $1=_st(_st(self)._environment())._packages();
  585. return $1;
  586. }, function($ctx1) {$ctx1.fill(self,"packages",{},smalltalk.HLToolModel)})},
  587. args: [],
  588. source: "packages\x0a\x09^ self environment packages",
  589. messageSends: ["packages", "environment"],
  590. referencedClasses: []
  591. }),
  592. smalltalk.HLToolModel);
  593. smalltalk.addMethod(
  594. smalltalk.method({
  595. selector: "removeClass",
  596. category: 'commands actions',
  597. fn: function (){
  598. var self=this;
  599. return smalltalk.withContext(function($ctx1) {
  600. _st(self)._withChangesDo_((function(){
  601. return smalltalk.withContext(function($ctx2) {
  602. return _st(_st(self)._manager())._confirm_ifTrue_(_st("Do you REALLY want to remove class ").__comma(_st(_st(self)._selectedClass())._name()),(function(){
  603. return smalltalk.withContext(function($ctx3) {
  604. return _st(_st(self)._environment())._removeClass_(_st(self)._selectedClass());
  605. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  606. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  607. return self}, function($ctx1) {$ctx1.fill(self,"removeClass",{},smalltalk.HLToolModel)})},
  608. args: [],
  609. source: "removeClass\x0a\x09self withChangesDo: [\x0a\x09\x09self manager \x0a\x09\x09\x09confirm: 'Do you REALLY want to remove class ', self selectedClass name\x0a\x09\x09\x09ifTrue: [ self environment removeClass: self selectedClass ] ]",
  610. messageSends: ["withChangesDo:", "confirm:ifTrue:", ",", "name", "selectedClass", "removeClass:", "environment", "manager"],
  611. referencedClasses: []
  612. }),
  613. smalltalk.HLToolModel);
  614. smalltalk.addMethod(
  615. smalltalk.method({
  616. selector: "removeMethod",
  617. category: 'commands actions',
  618. fn: function (){
  619. var self=this;
  620. return smalltalk.withContext(function($ctx1) {
  621. _st(self)._withChangesDo_((function(){
  622. return smalltalk.withContext(function($ctx2) {
  623. return _st(_st(self)._manager())._confirm_ifTrue_(_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()),(function(){
  624. return smalltalk.withContext(function($ctx3) {
  625. return _st(_st(self)._environment())._removeMethod_(_st(self)._selectedMethod());
  626. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  627. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  628. return self}, function($ctx1) {$ctx1.fill(self,"removeMethod",{},smalltalk.HLToolModel)})},
  629. args: [],
  630. source: "removeMethod\x0a\x09self withChangesDo: [\x0a\x09\x09self manager \x0a\x09\x09\x09confirm: 'Do you REALLY want to remove method ', self selectedMethod methodClass name,' >> #', self selectedMethod selector\x0a\x09\x09\x09ifTrue: [ self environment removeMethod: self selectedMethod ] ]",
  631. messageSends: ["withChangesDo:", "confirm:ifTrue:", ",", "selector", "selectedMethod", "name", "methodClass", "removeMethod:", "environment", "manager"],
  632. referencedClasses: []
  633. }),
  634. smalltalk.HLToolModel);
  635. smalltalk.addMethod(
  636. smalltalk.method({
  637. selector: "removeProtocol",
  638. category: 'commands actions',
  639. fn: function (){
  640. var self=this;
  641. return smalltalk.withContext(function($ctx1) {
  642. _st(self)._withChangesDo_((function(){
  643. return smalltalk.withContext(function($ctx2) {
  644. return _st(_st(self)._manager())._confirm_ifTrue_(_st("Do you REALLY want to remove protocol ").__comma(_st(self)._selectedProtocol()),(function(){
  645. return smalltalk.withContext(function($ctx3) {
  646. return _st(_st(self)._environment())._removeProtocol_from_(_st(self)._selectedProtocol(),_st(self)._selectedClass());
  647. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  648. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  649. return self}, function($ctx1) {$ctx1.fill(self,"removeProtocol",{},smalltalk.HLToolModel)})},
  650. args: [],
  651. source: "removeProtocol\x0a\x09self withChangesDo: [\x0a\x09\x09self manager \x0a\x09\x09\x09confirm: 'Do you REALLY want to remove protocol ', self selectedProtocol\x0a\x09\x09\x09ifTrue: [ self environment \x0a\x09\x09\x09\x09removeProtocol: self selectedProtocol \x0a\x09\x09\x09\x09from: self selectedClass ] ]",
  652. messageSends: ["withChangesDo:", "confirm:ifTrue:", ",", "selectedProtocol", "removeProtocol:from:", "selectedClass", "environment", "manager"],
  653. referencedClasses: []
  654. }),
  655. smalltalk.HLToolModel);
  656. smalltalk.addMethod(
  657. smalltalk.method({
  658. selector: "renameClassTo:",
  659. category: 'commands actions',
  660. fn: function (aClassName){
  661. var self=this;
  662. return smalltalk.withContext(function($ctx1) {
  663. _st(self)._withChangesDo_((function(){
  664. return smalltalk.withContext(function($ctx2) {
  665. return _st(_st(self)._environment())._renameClass_to_(_st(_st(self)._selectedClass())._theNonMetaClass(),aClassName);
  666. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  667. return self}, function($ctx1) {$ctx1.fill(self,"renameClassTo:",{aClassName:aClassName},smalltalk.HLToolModel)})},
  668. args: ["aClassName"],
  669. source: "renameClassTo: aClassName\x0a\x09self withChangesDo: [\x0a\x09\x09self environment \x0a\x09\x09\x09renameClass: self selectedClass theNonMetaClass\x0a\x09\x09\x09to: aClassName ]",
  670. messageSends: ["withChangesDo:", "renameClass:to:", "theNonMetaClass", "selectedClass", "environment"],
  671. referencedClasses: []
  672. }),
  673. smalltalk.HLToolModel);
  674. smalltalk.addMethod(
  675. smalltalk.method({
  676. selector: "renameProtocolTo:",
  677. category: 'commands actions',
  678. fn: function (aString){
  679. var self=this;
  680. return smalltalk.withContext(function($ctx1) {
  681. _st(self)._withChangesDo_((function(){
  682. return smalltalk.withContext(function($ctx2) {
  683. return _st(_st(self)._environment())._renameProtocol_to_in_(_st(self)._selectedProtocol(),aString,_st(self)._selectedClass());
  684. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  685. return self}, function($ctx1) {$ctx1.fill(self,"renameProtocolTo:",{aString:aString},smalltalk.HLToolModel)})},
  686. args: ["aString"],
  687. source: "renameProtocolTo: aString\x0a\x09self withChangesDo: [\x0a\x09\x09self environment \x0a\x09\x09\x09renameProtocol: self selectedProtocol\x0a\x09\x09\x09to: aString\x0a\x09\x09\x09in: self selectedClass ]",
  688. messageSends: ["withChangesDo:", "renameProtocol:to:in:", "selectedProtocol", "selectedClass", "environment"],
  689. referencedClasses: []
  690. }),
  691. smalltalk.HLToolModel);
  692. smalltalk.addMethod(
  693. smalltalk.method({
  694. selector: "save:",
  695. category: 'actions',
  696. fn: function (aString){
  697. var self=this;
  698. function $HLSourceCodeSaved(){return smalltalk.HLSourceCodeSaved||(typeof HLSourceCodeSaved=="undefined"?nil:HLSourceCodeSaved)}
  699. return smalltalk.withContext(function($ctx1) {
  700. var $1;
  701. _st(_st(self)._announcer())._announce_(_st($HLSourceCodeSaved())._new());
  702. $1=_st(self)._shouldCompileClassDefinition_(aString);
  703. if(smalltalk.assert($1)){
  704. _st(self)._compileClassDefinition_(aString);
  705. } else {
  706. _st(self)._compileMethod_(aString);
  707. };
  708. return self}, function($ctx1) {$ctx1.fill(self,"save:",{aString:aString},smalltalk.HLToolModel)})},
  709. args: ["aString"],
  710. source: "save: aString\x0a\x09self announcer announce: HLSourceCodeSaved new.\x0a\x09\x0a\x09(self shouldCompileClassDefinition: aString)\x0a\x09\x09ifTrue: [ self compileClassDefinition: aString ]\x0a\x09\x09ifFalse: [ self compileMethod: aString ]",
  711. messageSends: ["announce:", "new", "announcer", "ifTrue:ifFalse:", "compileClassDefinition:", "compileMethod:", "shouldCompileClassDefinition:"],
  712. referencedClasses: ["HLSourceCodeSaved"]
  713. }),
  714. smalltalk.HLToolModel);
  715. smalltalk.addMethod(
  716. smalltalk.method({
  717. selector: "saveSourceCode",
  718. category: 'actions',
  719. fn: function (){
  720. var self=this;
  721. function $HLSaveSourceCode(){return smalltalk.HLSaveSourceCode||(typeof HLSaveSourceCode=="undefined"?nil:HLSaveSourceCode)}
  722. return smalltalk.withContext(function($ctx1) {
  723. _st(_st(self)._announcer())._announce_(_st($HLSaveSourceCode())._new());
  724. return self}, function($ctx1) {$ctx1.fill(self,"saveSourceCode",{},smalltalk.HLToolModel)})},
  725. args: [],
  726. source: "saveSourceCode\x0a\x09self announcer announce: HLSaveSourceCode new",
  727. messageSends: ["announce:", "new", "announcer"],
  728. referencedClasses: ["HLSaveSourceCode"]
  729. }),
  730. smalltalk.HLToolModel);
  731. smalltalk.addMethod(
  732. smalltalk.method({
  733. selector: "selectedClass",
  734. category: 'accessing',
  735. fn: function (){
  736. var self=this;
  737. return smalltalk.withContext(function($ctx1) {
  738. var $1;
  739. $1=self["@selectedClass"];
  740. return $1;
  741. }, function($ctx1) {$ctx1.fill(self,"selectedClass",{},smalltalk.HLToolModel)})},
  742. args: [],
  743. source: "selectedClass\x0a\x09^ selectedClass",
  744. messageSends: [],
  745. referencedClasses: []
  746. }),
  747. smalltalk.HLToolModel);
  748. smalltalk.addMethod(
  749. smalltalk.method({
  750. selector: "selectedClass:",
  751. category: 'accessing',
  752. fn: function (aClass){
  753. var self=this;
  754. function $HLClassSelected(){return smalltalk.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
  755. return smalltalk.withContext(function($ctx1) {
  756. var $1,$2,$3,$4,$5;
  757. $1=_st(_st(_st(self)._selectedClass()).__eq(aClass))._and_((function(){
  758. return smalltalk.withContext(function($ctx2) {
  759. return _st(aClass)._isNil();
  760. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  761. if(smalltalk.assert($1)){
  762. $2=self;
  763. return $2;
  764. };
  765. _st(self)._withChangesDo_((function(){
  766. return smalltalk.withContext(function($ctx2) {
  767. $3=_st(self["@selectedClass"]).__eq(aClass);
  768. if(smalltalk.assert($3)){
  769. _st(self)._selectedProtocol_(nil);
  770. };
  771. $4=aClass;
  772. if(($receiver = $4) == nil || $receiver == undefined){
  773. self["@selectedClass"]=nil;
  774. self["@selectedClass"];
  775. } else {
  776. _st(self)._selectedPackage_(_st(_st(aClass)._theNonMetaClass())._package());
  777. $5=_st(self)._showInstance();
  778. if(smalltalk.assert($5)){
  779. self["@selectedClass"]=_st(aClass)._theNonMetaClass();
  780. self["@selectedClass"];
  781. } else {
  782. self["@selectedClass"]=_st(aClass)._theMetaClass();
  783. self["@selectedClass"];
  784. };
  785. };
  786. _st(self)._selectedProtocol_(nil);
  787. return _st(_st(self)._announcer())._announce_(_st($HLClassSelected())._on_(_st(self)._selectedClass()));
  788. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  789. return self}, function($ctx1) {$ctx1.fill(self,"selectedClass:",{aClass:aClass},smalltalk.HLToolModel)})},
  790. args: ["aClass"],
  791. source: "selectedClass: aClass\x0a\x09(self selectedClass = aClass and: [ aClass isNil ]) \x0a\x09\x09ifTrue: [ ^ self ].\x0a\x09\x0a\x09self withChangesDo: [\x0a\x09\x09selectedClass = aClass ifTrue: [ \x0a\x09\x09\x09self selectedProtocol: nil ].\x0a \x0a\x09\x09aClass \x0a \x09\x09\x09ifNil: [ selectedClass := nil ]\x0a \x09\x09ifNotNil: [\x0a\x09\x09\x09\x09self selectedPackage: aClass theNonMetaClass package.\x0a\x09\x09\x09\x09self showInstance \x0a \x09\x09\x09\x09\x09ifTrue: [ selectedClass := aClass theNonMetaClass ]\x0a \x09\x09\x09\x09ifFalse: [ selectedClass := aClass theMetaClass ] ].\x0a\x09\x09self selectedProtocol: nil.\x0a\x09\x09self announcer announce: (HLClassSelected on: self selectedClass) ]",
  792. messageSends: ["ifTrue:", "and:", "isNil", "=", "selectedClass", "withChangesDo:", "selectedProtocol:", "ifNil:ifNotNil:", "selectedPackage:", "package", "theNonMetaClass", "ifTrue:ifFalse:", "theMetaClass", "showInstance", "announce:", "on:", "announcer"],
  793. referencedClasses: ["HLClassSelected"]
  794. }),
  795. smalltalk.HLToolModel);
  796. smalltalk.addMethod(
  797. smalltalk.method({
  798. selector: "selectedMethod",
  799. category: 'accessing',
  800. fn: function (){
  801. var self=this;
  802. return smalltalk.withContext(function($ctx1) {
  803. var $2,$1;
  804. $2=_st(self)._selectedClass();
  805. if(($receiver = $2) == nil || $receiver == undefined){
  806. $1=$2;
  807. } else {
  808. $1=_st(_st(_st(self)._selectedClass())._methodDictionary())._at_ifAbsent_(self["@selectedSelector"],(function(){
  809. return smalltalk.withContext(function($ctx2) {
  810. return nil;
  811. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  812. };
  813. return $1;
  814. }, function($ctx1) {$ctx1.fill(self,"selectedMethod",{},smalltalk.HLToolModel)})},
  815. args: [],
  816. source: "selectedMethod\x0a\x09^ self selectedClass ifNotNil: [ \x0a\x09\x09self selectedClass methodDictionary \x0a\x09\x09\x09at: selectedSelector \x0a\x09\x09\x09ifAbsent: [ nil ] ]",
  817. messageSends: ["ifNotNil:", "at:ifAbsent:", "methodDictionary", "selectedClass"],
  818. referencedClasses: []
  819. }),
  820. smalltalk.HLToolModel);
  821. smalltalk.addMethod(
  822. smalltalk.method({
  823. selector: "selectedMethod:",
  824. category: 'accessing',
  825. fn: function (aCompiledMethod){
  826. var self=this;
  827. function $HLMethodSelected(){return smalltalk.HLMethodSelected||(typeof HLMethodSelected=="undefined"?nil:HLMethodSelected)}
  828. return smalltalk.withContext(function($ctx1) {
  829. var $1,$2,$3;
  830. $1=_st(self["@selectedSelector"]).__eq(aCompiledMethod);
  831. if(smalltalk.assert($1)){
  832. $2=self;
  833. return $2;
  834. };
  835. _st(self)._withChangesDo_((function(){
  836. return smalltalk.withContext(function($ctx2) {
  837. $3=aCompiledMethod;
  838. if(($receiver = $3) == nil || $receiver == undefined){
  839. self["@selectedSelector"]=nil;
  840. self["@selectedSelector"];
  841. } else {
  842. self["@selectedClass"]=_st(aCompiledMethod)._methodClass();
  843. self["@selectedClass"];
  844. self["@selectedSelector"]=_st(aCompiledMethod)._selector();
  845. self["@selectedSelector"];
  846. };
  847. return _st(_st(self)._announcer())._announce_(_st($HLMethodSelected())._on_(aCompiledMethod));
  848. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  849. return self}, function($ctx1) {$ctx1.fill(self,"selectedMethod:",{aCompiledMethod:aCompiledMethod},smalltalk.HLToolModel)})},
  850. args: ["aCompiledMethod"],
  851. source: "selectedMethod: aCompiledMethod\x0a\x09selectedSelector = aCompiledMethod ifTrue: [ ^ self ].\x0a \x0a self withChangesDo: [\x0a\x09\x09aCompiledMethod\x0a \x09\x09ifNil: [ selectedSelector := nil ]\x0a \x09\x09ifNotNil: [\x0a\x09\x09\x09\x09selectedClass := aCompiledMethod methodClass.\x0a\x09\x09\x09\x09selectedSelector := aCompiledMethod selector ].\x0a\x0a\x09\x09self announcer announce: (HLMethodSelected on: aCompiledMethod) ]",
  852. messageSends: ["ifTrue:", "=", "withChangesDo:", "ifNil:ifNotNil:", "methodClass", "selector", "announce:", "on:", "announcer"],
  853. referencedClasses: ["HLMethodSelected"]
  854. }),
  855. smalltalk.HLToolModel);
  856. smalltalk.addMethod(
  857. smalltalk.method({
  858. selector: "selectedPackage",
  859. category: 'accessing',
  860. fn: function (){
  861. var self=this;
  862. return smalltalk.withContext(function($ctx1) {
  863. var $1;
  864. $1=self["@selectedPackage"];
  865. return $1;
  866. }, function($ctx1) {$ctx1.fill(self,"selectedPackage",{},smalltalk.HLToolModel)})},
  867. args: [],
  868. source: "selectedPackage\x0a\x09^ selectedPackage",
  869. messageSends: [],
  870. referencedClasses: []
  871. }),
  872. smalltalk.HLToolModel);
  873. smalltalk.addMethod(
  874. smalltalk.method({
  875. selector: "selectedPackage:",
  876. category: 'accessing',
  877. fn: function (aPackage){
  878. var self=this;
  879. function $HLPackageSelected(){return smalltalk.HLPackageSelected||(typeof HLPackageSelected=="undefined"?nil:HLPackageSelected)}
  880. return smalltalk.withContext(function($ctx1) {
  881. var $1,$2;
  882. $1=_st(self["@selectedPackage"]).__eq(aPackage);
  883. if(smalltalk.assert($1)){
  884. $2=self;
  885. return $2;
  886. };
  887. _st(self)._withChangesDo_((function(){
  888. return smalltalk.withContext(function($ctx2) {
  889. self["@selectedPackage"]=aPackage;
  890. self["@selectedPackage"];
  891. _st(self)._selectedClass_(nil);
  892. return _st(_st(self)._announcer())._announce_(_st($HLPackageSelected())._on_(aPackage));
  893. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  894. return self}, function($ctx1) {$ctx1.fill(self,"selectedPackage:",{aPackage:aPackage},smalltalk.HLToolModel)})},
  895. args: ["aPackage"],
  896. source: "selectedPackage: aPackage\x0a\x09selectedPackage = aPackage ifTrue: [ ^ self ].\x0a \x0a\x09self withChangesDo: [\x0a\x09\x09selectedPackage := aPackage.\x0a\x09\x09self selectedClass: nil.\x0a\x09\x09self announcer announce: (HLPackageSelected on: aPackage) ]",
  897. messageSends: ["ifTrue:", "=", "withChangesDo:", "selectedClass:", "announce:", "on:", "announcer"],
  898. referencedClasses: ["HLPackageSelected"]
  899. }),
  900. smalltalk.HLToolModel);
  901. smalltalk.addMethod(
  902. smalltalk.method({
  903. selector: "selectedProtocol",
  904. category: 'accessing',
  905. fn: function (){
  906. var self=this;
  907. return smalltalk.withContext(function($ctx1) {
  908. var $1;
  909. $1=self["@selectedProtocol"];
  910. return $1;
  911. }, function($ctx1) {$ctx1.fill(self,"selectedProtocol",{},smalltalk.HLToolModel)})},
  912. args: [],
  913. source: "selectedProtocol\x0a\x09^ selectedProtocol",
  914. messageSends: [],
  915. referencedClasses: []
  916. }),
  917. smalltalk.HLToolModel);
  918. smalltalk.addMethod(
  919. smalltalk.method({
  920. selector: "selectedProtocol:",
  921. category: 'accessing',
  922. fn: function (aString){
  923. var self=this;
  924. function $HLProtocolSelected(){return smalltalk.HLProtocolSelected||(typeof HLProtocolSelected=="undefined"?nil:HLProtocolSelected)}
  925. return smalltalk.withContext(function($ctx1) {
  926. var $1,$2;
  927. $1=_st(self["@selectedProtocol"]).__eq(aString);
  928. if(smalltalk.assert($1)){
  929. $2=self;
  930. return $2;
  931. };
  932. _st(self)._withChangesDo_((function(){
  933. return smalltalk.withContext(function($ctx2) {
  934. self["@selectedProtocol"]=aString;
  935. self["@selectedProtocol"];
  936. _st(self)._selectedMethod_(nil);
  937. return _st(_st(self)._announcer())._announce_(_st($HLProtocolSelected())._on_(aString));
  938. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  939. return self}, function($ctx1) {$ctx1.fill(self,"selectedProtocol:",{aString:aString},smalltalk.HLToolModel)})},
  940. args: ["aString"],
  941. source: "selectedProtocol: aString\x0a\x09selectedProtocol = aString ifTrue: [ ^ self ].\x0a\x0a\x09self withChangesDo: [\x0a\x09\x09selectedProtocol := aString.\x0a\x09\x09self selectedMethod: nil.\x0a\x09\x09self announcer announce: (HLProtocolSelected on: aString) ]",
  942. messageSends: ["ifTrue:", "=", "withChangesDo:", "selectedMethod:", "announce:", "on:", "announcer"],
  943. referencedClasses: ["HLProtocolSelected"]
  944. }),
  945. smalltalk.HLToolModel);
  946. smalltalk.addMethod(
  947. smalltalk.method({
  948. selector: "shouldCompileClassDefinition:",
  949. category: 'testing',
  950. fn: function (aString){
  951. var self=this;
  952. return smalltalk.withContext(function($ctx1) {
  953. var $1;
  954. $1=_st(_st(_st(self)._selectedClass())._isNil())._or_((function(){
  955. return smalltalk.withContext(function($ctx2) {
  956. return _st(_st(_st(aString)._first())._asUppercase()).__eq(_st(aString)._first());
  957. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  958. return $1;
  959. }, function($ctx1) {$ctx1.fill(self,"shouldCompileClassDefinition:",{aString:aString},smalltalk.HLToolModel)})},
  960. args: ["aString"],
  961. source: "shouldCompileClassDefinition: aString\x0a\x09^ self selectedClass isNil or: [\x0a\x09\x09aString first asUppercase = aString first ]",
  962. messageSends: ["or:", "=", "first", "asUppercase", "isNil", "selectedClass"],
  963. referencedClasses: []
  964. }),
  965. smalltalk.HLToolModel);
  966. smalltalk.addMethod(
  967. smalltalk.method({
  968. selector: "unclassifiedProtocol",
  969. category: 'defaults',
  970. fn: function (){
  971. var self=this;
  972. return smalltalk.withContext(function($ctx1) {
  973. return "as yet unclassified";
  974. }, function($ctx1) {$ctx1.fill(self,"unclassifiedProtocol",{},smalltalk.HLToolModel)})},
  975. args: [],
  976. source: "unclassifiedProtocol\x0a\x09^ 'as yet unclassified'",
  977. messageSends: [],
  978. referencedClasses: []
  979. }),
  980. smalltalk.HLToolModel);
  981. smalltalk.addMethod(
  982. smalltalk.method({
  983. selector: "withCompileErrorHandling:",
  984. category: 'error handling',
  985. fn: function (aBlock){
  986. var self=this;
  987. function $CompilerError(){return smalltalk.CompilerError||(typeof CompilerError=="undefined"?nil:CompilerError)}
  988. function $UnknownVariableError(){return smalltalk.UnknownVariableError||(typeof UnknownVariableError=="undefined"?nil:UnknownVariableError)}
  989. function $ParseError(){return smalltalk.ParseError||(typeof ParseError=="undefined"?nil:ParseError)}
  990. return smalltalk.withContext(function($ctx1) {
  991. _st((function(){
  992. return smalltalk.withContext(function($ctx2) {
  993. return _st((function(){
  994. return smalltalk.withContext(function($ctx3) {
  995. return _st(aBlock)._on_do_($ParseError(),(function(ex){
  996. return smalltalk.withContext(function($ctx4) {
  997. return _st(self)._handleParseError_(ex);
  998. }, function($ctx4) {$ctx4.fillBlock({ex:ex},$ctx1)})}));
  999. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._on_do_($UnknownVariableError(),(function(ex){
  1000. return smalltalk.withContext(function($ctx3) {
  1001. return _st(self)._handleUnkownVariableError_(ex);
  1002. }, function($ctx3) {$ctx3.fillBlock({ex:ex},$ctx1)})}));
  1003. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_($CompilerError(),(function(ex){
  1004. return smalltalk.withContext(function($ctx2) {
  1005. return _st(self)._handleCompileError_(ex);
  1006. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
  1007. return self}, function($ctx1) {$ctx1.fill(self,"withCompileErrorHandling:",{aBlock:aBlock},smalltalk.HLToolModel)})},
  1008. args: ["aBlock"],
  1009. source: "withCompileErrorHandling: aBlock\x0a\x09[\x0a\x09\x09[\x0a\x09\x09\x09aBlock \x0a\x09\x09\x09\x09on: ParseError\x0a\x09\x09\x09\x09do: [:ex | self handleParseError: ex ]\x0a\x09\x09]\x0a\x09\x09\x09on: UnknownVariableError\x0a\x09\x09\x09do: [ :ex | self handleUnkownVariableError: ex ]\x0a\x09]\x0a\x09\x09on: CompilerError\x0a\x09\x09do: [ :ex | self handleCompileError: ex ]",
  1010. messageSends: ["on:do:", "handleCompileError:", "handleUnkownVariableError:", "handleParseError:"],
  1011. referencedClasses: ["CompilerError", "UnknownVariableError", "ParseError"]
  1012. }),
  1013. smalltalk.HLToolModel);
  1014. smalltalk.addMethod(
  1015. smalltalk.method({
  1016. selector: "withHelperLabelled:do:",
  1017. category: 'private',
  1018. fn: function (aString,aBlock){
  1019. var self=this;
  1020. return smalltalk.withContext(function($ctx1) {
  1021. var $1,$2;
  1022. _st(_st(window)._jQuery_("#helper"))._remove();
  1023. _st((function(html){
  1024. return smalltalk.withContext(function($ctx2) {
  1025. $1=_st(html)._div();
  1026. _st($1)._id_("helper");
  1027. $2=_st($1)._with_(aString);
  1028. return $2;
  1029. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}))._appendToJQuery_(_st("body")._asJQuery());
  1030. _st((function(){
  1031. return smalltalk.withContext(function($ctx2) {
  1032. _st(aBlock)._value();
  1033. return _st(_st(window)._jQuery_("#helper"))._remove();
  1034. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._valueWithTimeout_((10));
  1035. return self}, function($ctx1) {$ctx1.fill(self,"withHelperLabelled:do:",{aString:aString,aBlock:aBlock},smalltalk.HLToolModel)})},
  1036. args: ["aString", "aBlock"],
  1037. source: "withHelperLabelled: aString do: aBlock\x0a\x09\x22TODO: doesn't belong here\x22\x0a\x0a\x09(window jQuery: '#helper') remove.\x0a\x0a\x09[ :html |\x0a\x09\x09html div \x0a\x09\x09\x09id: 'helper';\x0a\x09\x09\x09with: aString ] appendToJQuery: 'body' asJQuery.\x0a\x09\x0a\x09[\x0a\x09\x09aBlock value.\x0a\x09\x09(window jQuery: '#helper') remove\x0a\x09] \x0a\x09\x09valueWithTimeout: 10",
  1038. messageSends: ["remove", "jQuery:", "appendToJQuery:", "asJQuery", "id:", "div", "with:", "valueWithTimeout:", "value"],
  1039. referencedClasses: []
  1040. }),
  1041. smalltalk.HLToolModel);
  1042. smalltalk.addMethod(
  1043. smalltalk.method({
  1044. selector: "on:",
  1045. category: 'actions',
  1046. fn: function (anEnvironment){
  1047. var self=this;
  1048. return smalltalk.withContext(function($ctx1) {
  1049. var $2,$3,$1;
  1050. $2=_st(self)._new();
  1051. _st($2)._environment_(anEnvironment);
  1052. $3=_st($2)._yourself();
  1053. $1=$3;
  1054. return $1;
  1055. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment},smalltalk.HLToolModel.klass)})},
  1056. args: ["anEnvironment"],
  1057. source: "on: anEnvironment\x0a\x0a\x09^ self new\x0a \x09environment: anEnvironment;\x0a yourself",
  1058. messageSends: ["environment:", "new", "yourself"],
  1059. referencedClasses: []
  1060. }),
  1061. smalltalk.HLToolModel.klass);
  1062. smalltalk.addClass('HLTab', smalltalk.Widget, ['widget', 'label', 'root'], 'Helios-Core');
  1063. smalltalk.addMethod(
  1064. smalltalk.method({
  1065. selector: "activate",
  1066. category: 'accessing',
  1067. fn: function (){
  1068. var self=this;
  1069. return smalltalk.withContext(function($ctx1) {
  1070. _st(_st(self)._manager())._activate_(self);
  1071. return self}, function($ctx1) {$ctx1.fill(self,"activate",{},smalltalk.HLTab)})},
  1072. args: [],
  1073. source: "activate\x0a\x09self manager activate: self",
  1074. messageSends: ["activate:", "manager"],
  1075. referencedClasses: []
  1076. }),
  1077. smalltalk.HLTab);
  1078. smalltalk.addMethod(
  1079. smalltalk.method({
  1080. selector: "add",
  1081. category: 'accessing',
  1082. fn: function (){
  1083. var self=this;
  1084. return smalltalk.withContext(function($ctx1) {
  1085. _st(_st(self)._manager())._addTab_(self);
  1086. return self}, function($ctx1) {$ctx1.fill(self,"add",{},smalltalk.HLTab)})},
  1087. args: [],
  1088. source: "add\x0a\x09self manager addTab: self",
  1089. messageSends: ["addTab:", "manager"],
  1090. referencedClasses: []
  1091. }),
  1092. smalltalk.HLTab);
  1093. smalltalk.addMethod(
  1094. smalltalk.method({
  1095. selector: "displayLabel",
  1096. category: 'accessing',
  1097. fn: function (){
  1098. var self=this;
  1099. return smalltalk.withContext(function($ctx1) {
  1100. var $2,$1;
  1101. $2=_st(_st(_st(self)._label())._size()).__gt((20));
  1102. if(smalltalk.assert($2)){
  1103. $1=_st(_st(_st(self)._label())._first_((20))).__comma("...");
  1104. } else {
  1105. $1=_st(self)._label();
  1106. };
  1107. return $1;
  1108. }, function($ctx1) {$ctx1.fill(self,"displayLabel",{},smalltalk.HLTab)})},
  1109. args: [],
  1110. source: "displayLabel\x0a\x09^ self label size > 20 \x0a\x09\x09ifTrue: [ (self label first: 20), '...' ]\x0a\x09\x09ifFalse: [ self label ]",
  1111. messageSends: ["ifTrue:ifFalse:", ",", "first:", "label", ">", "size"],
  1112. referencedClasses: []
  1113. }),
  1114. smalltalk.HLTab);
  1115. smalltalk.addMethod(
  1116. smalltalk.method({
  1117. selector: "focus",
  1118. category: 'accessing',
  1119. fn: function (){
  1120. var self=this;
  1121. return smalltalk.withContext(function($ctx1) {
  1122. var $1;
  1123. $1=_st(_st(self)._widget())._canHaveFocus();
  1124. if(smalltalk.assert($1)){
  1125. _st(_st(self)._widget())._focus();
  1126. };
  1127. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLTab)})},
  1128. args: [],
  1129. source: "focus\x0a\x09self widget canHaveFocus ifTrue: [\x0a\x09\x09self widget focus ]",
  1130. messageSends: ["ifTrue:", "focus", "widget", "canHaveFocus"],
  1131. referencedClasses: []
  1132. }),
  1133. smalltalk.HLTab);
  1134. smalltalk.addMethod(
  1135. smalltalk.method({
  1136. selector: "hide",
  1137. category: 'actions',
  1138. fn: function (){
  1139. var self=this;
  1140. return smalltalk.withContext(function($ctx1) {
  1141. var $1;
  1142. $1=self["@root"];
  1143. if(($receiver = $1) == nil || $receiver == undefined){
  1144. $1;
  1145. } else {
  1146. _st(_st(self["@root"])._asJQuery())._css_put_("visibility","hidden");
  1147. };
  1148. return self}, function($ctx1) {$ctx1.fill(self,"hide",{},smalltalk.HLTab)})},
  1149. args: [],
  1150. source: "hide\x0a\x09root ifNotNil: [ root asJQuery css: 'visibility' put: 'hidden' ]",
  1151. messageSends: ["ifNotNil:", "css:put:", "asJQuery"],
  1152. referencedClasses: []
  1153. }),
  1154. smalltalk.HLTab);
  1155. smalltalk.addMethod(
  1156. smalltalk.method({
  1157. selector: "isActive",
  1158. category: 'testing',
  1159. fn: function (){
  1160. var self=this;
  1161. return smalltalk.withContext(function($ctx1) {
  1162. var $1;
  1163. $1=_st(_st(_st(self)._manager())._activeTab()).__eq(self);
  1164. return $1;
  1165. }, function($ctx1) {$ctx1.fill(self,"isActive",{},smalltalk.HLTab)})},
  1166. args: [],
  1167. source: "isActive\x0a\x09^ self manager activeTab = self",
  1168. messageSends: ["=", "activeTab", "manager"],
  1169. referencedClasses: []
  1170. }),
  1171. smalltalk.HLTab);
  1172. smalltalk.addMethod(
  1173. smalltalk.method({
  1174. selector: "label",
  1175. category: 'accessing',
  1176. fn: function (){
  1177. var self=this;
  1178. return smalltalk.withContext(function($ctx1) {
  1179. var $2,$1;
  1180. $2=self["@label"];
  1181. if(($receiver = $2) == nil || $receiver == undefined){
  1182. $1="";
  1183. } else {
  1184. $1=$2;
  1185. };
  1186. return $1;
  1187. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLTab)})},
  1188. args: [],
  1189. source: "label\x0a\x09^ label ifNil: [ '' ]",
  1190. messageSends: ["ifNil:"],
  1191. referencedClasses: []
  1192. }),
  1193. smalltalk.HLTab);
  1194. smalltalk.addMethod(
  1195. smalltalk.method({
  1196. selector: "label:",
  1197. category: 'accessing',
  1198. fn: function (aString){
  1199. var self=this;
  1200. return smalltalk.withContext(function($ctx1) {
  1201. self["@label"]=aString;
  1202. return self}, function($ctx1) {$ctx1.fill(self,"label:",{aString:aString},smalltalk.HLTab)})},
  1203. args: ["aString"],
  1204. source: "label: aString\x0a\x09label := aString",
  1205. messageSends: [],
  1206. referencedClasses: []
  1207. }),
  1208. smalltalk.HLTab);
  1209. smalltalk.addMethod(
  1210. smalltalk.method({
  1211. selector: "manager",
  1212. category: 'accessing',
  1213. fn: function (){
  1214. var self=this;
  1215. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  1216. return smalltalk.withContext(function($ctx1) {
  1217. var $1;
  1218. $1=_st($HLManager())._current();
  1219. return $1;
  1220. }, function($ctx1) {$ctx1.fill(self,"manager",{},smalltalk.HLTab)})},
  1221. args: [],
  1222. source: "manager\x0a\x09^ HLManager current",
  1223. messageSends: ["current"],
  1224. referencedClasses: ["HLManager"]
  1225. }),
  1226. smalltalk.HLTab);
  1227. smalltalk.addMethod(
  1228. smalltalk.method({
  1229. selector: "registerBindings",
  1230. category: 'actions',
  1231. fn: function (){
  1232. var self=this;
  1233. return smalltalk.withContext(function($ctx1) {
  1234. _st(_st(self)._widget())._registerBindings();
  1235. return self}, function($ctx1) {$ctx1.fill(self,"registerBindings",{},smalltalk.HLTab)})},
  1236. args: [],
  1237. source: "registerBindings\x0a\x09self widget registerBindings",
  1238. messageSends: ["registerBindings", "widget"],
  1239. referencedClasses: []
  1240. }),
  1241. smalltalk.HLTab);
  1242. smalltalk.addMethod(
  1243. smalltalk.method({
  1244. selector: "remove",
  1245. category: 'actions',
  1246. fn: function (){
  1247. var self=this;
  1248. return smalltalk.withContext(function($ctx1) {
  1249. var $1;
  1250. _st(_st(self)._widget())._unregister();
  1251. $1=self["@root"];
  1252. if(($receiver = $1) == nil || $receiver == undefined){
  1253. $1;
  1254. } else {
  1255. _st(_st(self["@root"])._asJQuery())._remove();
  1256. };
  1257. return self}, function($ctx1) {$ctx1.fill(self,"remove",{},smalltalk.HLTab)})},
  1258. args: [],
  1259. source: "remove\x0a\x09self widget unregister.\x0a\x09root ifNotNil: [ root asJQuery remove ]",
  1260. messageSends: ["unregister", "widget", "ifNotNil:", "remove", "asJQuery"],
  1261. referencedClasses: []
  1262. }),
  1263. smalltalk.HLTab);
  1264. smalltalk.addMethod(
  1265. smalltalk.method({
  1266. selector: "renderOn:",
  1267. category: 'rendering',
  1268. fn: function (html){
  1269. var self=this;
  1270. return smalltalk.withContext(function($ctx1) {
  1271. var $1,$2;
  1272. $1=_st(html)._div();
  1273. _st($1)._class_("tab");
  1274. $2=_st($1)._yourself();
  1275. self["@root"]=$2;
  1276. _st(self)._renderTab();
  1277. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.HLTab)})},
  1278. args: ["html"],
  1279. source: "renderOn: html\x0a\x09root := html div\x0a\x09\x09class: 'tab';\x0a\x09\x09yourself.\x0a\x09self renderTab",
  1280. messageSends: ["class:", "div", "yourself", "renderTab"],
  1281. referencedClasses: []
  1282. }),
  1283. smalltalk.HLTab);
  1284. smalltalk.addMethod(
  1285. smalltalk.method({
  1286. selector: "renderTab",
  1287. category: 'rendering',
  1288. fn: function (){
  1289. var self=this;
  1290. return smalltalk.withContext(function($ctx1) {
  1291. var $1,$2;
  1292. _st(self["@root"])._contents_((function(html){
  1293. return smalltalk.withContext(function($ctx2) {
  1294. $1=_st(html)._div();
  1295. _st($1)._class_("amber_box");
  1296. $2=_st($1)._with_((function(){
  1297. return smalltalk.withContext(function($ctx3) {
  1298. return _st(_st(self)._widget())._renderOn_(html);
  1299. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1300. return $2;
  1301. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  1302. return self}, function($ctx1) {$ctx1.fill(self,"renderTab",{},smalltalk.HLTab)})},
  1303. args: [],
  1304. source: "renderTab\x0a\x09root contents: [ :html |\x0a\x09\x09html div\x0a\x09\x09\x09class: 'amber_box';\x0a\x09\x09\x09with: [ self widget renderOn: html ] ]",
  1305. messageSends: ["contents:", "class:", "div", "with:", "renderOn:", "widget"],
  1306. referencedClasses: []
  1307. }),
  1308. smalltalk.HLTab);
  1309. smalltalk.addMethod(
  1310. smalltalk.method({
  1311. selector: "show",
  1312. category: 'actions',
  1313. fn: function (){
  1314. var self=this;
  1315. return smalltalk.withContext(function($ctx1) {
  1316. var $1;
  1317. $1=self["@root"];
  1318. if(($receiver = $1) == nil || $receiver == undefined){
  1319. _st(self)._appendToJQuery_(_st("body")._asJQuery());
  1320. } else {
  1321. _st(_st(self["@root"])._asJQuery())._css_put_("visibility","visible");
  1322. };
  1323. return self}, function($ctx1) {$ctx1.fill(self,"show",{},smalltalk.HLTab)})},
  1324. args: [],
  1325. source: "show\x0a\x09root\x0a\x09\x09ifNil: [ self appendToJQuery: 'body' asJQuery ]\x0a\x09\x09ifNotNil: [ root asJQuery css: 'visibility' put: 'visible' ]",
  1326. messageSends: ["ifNil:ifNotNil:", "appendToJQuery:", "asJQuery", "css:put:"],
  1327. referencedClasses: []
  1328. }),
  1329. smalltalk.HLTab);
  1330. smalltalk.addMethod(
  1331. smalltalk.method({
  1332. selector: "widget",
  1333. category: 'accessing',
  1334. fn: function (){
  1335. var self=this;
  1336. return smalltalk.withContext(function($ctx1) {
  1337. var $1;
  1338. $1=self["@widget"];
  1339. return $1;
  1340. }, function($ctx1) {$ctx1.fill(self,"widget",{},smalltalk.HLTab)})},
  1341. args: [],
  1342. source: "widget\x0a\x09^ widget",
  1343. messageSends: [],
  1344. referencedClasses: []
  1345. }),
  1346. smalltalk.HLTab);
  1347. smalltalk.addMethod(
  1348. smalltalk.method({
  1349. selector: "widget:",
  1350. category: 'accessing',
  1351. fn: function (aWidget){
  1352. var self=this;
  1353. return smalltalk.withContext(function($ctx1) {
  1354. self["@widget"]=aWidget;
  1355. return self}, function($ctx1) {$ctx1.fill(self,"widget:",{aWidget:aWidget},smalltalk.HLTab)})},
  1356. args: ["aWidget"],
  1357. source: "widget: aWidget\x0a\x09widget := aWidget",
  1358. messageSends: [],
  1359. referencedClasses: []
  1360. }),
  1361. smalltalk.HLTab);
  1362. smalltalk.addMethod(
  1363. smalltalk.method({
  1364. selector: "on:labelled:",
  1365. category: 'instance creation',
  1366. fn: function (aWidget,aString){
  1367. var self=this;
  1368. return smalltalk.withContext(function($ctx1) {
  1369. var $2,$3,$1;
  1370. $2=_st(self)._new();
  1371. _st($2)._widget_(aWidget);
  1372. _st($2)._label_(aString);
  1373. $3=_st($2)._yourself();
  1374. $1=$3;
  1375. return $1;
  1376. }, function($ctx1) {$ctx1.fill(self,"on:labelled:",{aWidget:aWidget,aString:aString},smalltalk.HLTab.klass)})},
  1377. args: ["aWidget", "aString"],
  1378. source: "on: aWidget labelled: aString\x0a\x09^ self new\x0a\x09\x09widget: aWidget;\x0a\x09\x09label: aString;\x0a\x09\x09yourself",
  1379. messageSends: ["widget:", "new", "label:", "yourself"],
  1380. referencedClasses: []
  1381. }),
  1382. smalltalk.HLTab.klass);
  1383. smalltalk.addClass('HLWidget', smalltalk.Widget, ['wrapper'], 'Helios-Core');
  1384. smalltalk.addMethod(
  1385. smalltalk.method({
  1386. selector: "alert:",
  1387. category: 'actions',
  1388. fn: function (aString){
  1389. var self=this;
  1390. return smalltalk.withContext(function($ctx1) {
  1391. _st(window)._alert_(aString);
  1392. return self}, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString},smalltalk.HLWidget)})},
  1393. args: ["aString"],
  1394. source: "alert: aString\x0a\x09window alert: aString",
  1395. messageSends: ["alert:"],
  1396. referencedClasses: []
  1397. }),
  1398. smalltalk.HLWidget);
  1399. smalltalk.addMethod(
  1400. smalltalk.method({
  1401. selector: "canHaveFocus",
  1402. category: 'testing',
  1403. fn: function (){
  1404. var self=this;
  1405. return smalltalk.withContext(function($ctx1) {
  1406. return false;
  1407. }, function($ctx1) {$ctx1.fill(self,"canHaveFocus",{},smalltalk.HLWidget)})},
  1408. args: [],
  1409. source: "canHaveFocus\x0a\x09^ false",
  1410. messageSends: [],
  1411. referencedClasses: []
  1412. }),
  1413. smalltalk.HLWidget);
  1414. smalltalk.addMethod(
  1415. smalltalk.method({
  1416. selector: "confirm:ifTrue:",
  1417. category: 'actions',
  1418. fn: function (aString,aBlock){
  1419. var self=this;
  1420. return smalltalk.withContext(function($ctx1) {
  1421. _st(_st(self)._manager())._confirm_ifTrue_(aString,aBlock);
  1422. return self}, function($ctx1) {$ctx1.fill(self,"confirm:ifTrue:",{aString:aString,aBlock:aBlock},smalltalk.HLWidget)})},
  1423. args: ["aString", "aBlock"],
  1424. source: "confirm: aString ifTrue: aBlock\x0a\x09self manager confirm: aString ifTrue: aBlock",
  1425. messageSends: ["confirm:ifTrue:", "manager"],
  1426. referencedClasses: []
  1427. }),
  1428. smalltalk.HLWidget);
  1429. smalltalk.addMethod(
  1430. smalltalk.method({
  1431. selector: "execute:",
  1432. category: 'actions',
  1433. fn: function (aCommand){
  1434. var self=this;
  1435. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  1436. return smalltalk.withContext(function($ctx1) {
  1437. var $1,$2;
  1438. $1=_st(_st($HLManager())._current())._keyBinder();
  1439. _st($1)._activate();
  1440. $2=_st($1)._applyBinding_(_st(aCommand)._asBinding());
  1441. return self}, function($ctx1) {$ctx1.fill(self,"execute:",{aCommand:aCommand},smalltalk.HLWidget)})},
  1442. args: ["aCommand"],
  1443. source: "execute: aCommand\x0a\x09HLManager current keyBinder\x0a\x09\x09activate;\x0a\x09\x09applyBinding: aCommand asBinding",
  1444. messageSends: ["activate", "keyBinder", "current", "applyBinding:", "asBinding"],
  1445. referencedClasses: ["HLManager"]
  1446. }),
  1447. smalltalk.HLWidget);
  1448. smalltalk.addMethod(
  1449. smalltalk.method({
  1450. selector: "manager",
  1451. category: 'accessing',
  1452. fn: function (){
  1453. var self=this;
  1454. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  1455. return smalltalk.withContext(function($ctx1) {
  1456. var $1;
  1457. $1=_st($HLManager())._current();
  1458. return $1;
  1459. }, function($ctx1) {$ctx1.fill(self,"manager",{},smalltalk.HLWidget)})},
  1460. args: [],
  1461. source: "manager\x0a\x09^ HLManager current",
  1462. messageSends: ["current"],
  1463. referencedClasses: ["HLManager"]
  1464. }),
  1465. smalltalk.HLWidget);
  1466. smalltalk.addMethod(
  1467. smalltalk.method({
  1468. selector: "refresh",
  1469. category: 'updating',
  1470. fn: function (){
  1471. var self=this;
  1472. return smalltalk.withContext(function($ctx1) {
  1473. var $1,$2;
  1474. $1=_st(self)._wrapper();
  1475. if(($receiver = $1) == nil || $receiver == undefined){
  1476. $2=self;
  1477. return $2;
  1478. } else {
  1479. $1;
  1480. };
  1481. _st(_st(_st(self)._wrapper())._asJQuery())._empty();
  1482. _st((function(html){
  1483. return smalltalk.withContext(function($ctx2) {
  1484. return _st(self)._renderContentOn_(html);
  1485. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}))._appendToJQuery_(_st(_st(self)._wrapper())._asJQuery());
  1486. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLWidget)})},
  1487. args: [],
  1488. source: "refresh\x0a\x09self wrapper ifNil: [ ^ self ].\x0a \x0a\x09self wrapper asJQuery empty.\x0a [ :html | self renderContentOn: html ] appendToJQuery: self wrapper asJQuery",
  1489. messageSends: ["ifNil:", "wrapper", "empty", "asJQuery", "appendToJQuery:", "renderContentOn:"],
  1490. referencedClasses: []
  1491. }),
  1492. smalltalk.HLWidget);
  1493. smalltalk.addMethod(
  1494. smalltalk.method({
  1495. selector: "registerBindings",
  1496. category: 'keybindings',
  1497. fn: function (){
  1498. var self=this;
  1499. return smalltalk.withContext(function($ctx1) {
  1500. _st(self)._registerBindingsOn_(_st(_st(_st(self)._manager())._keyBinder())._bindings());
  1501. return self}, function($ctx1) {$ctx1.fill(self,"registerBindings",{},smalltalk.HLWidget)})},
  1502. args: [],
  1503. source: "registerBindings\x0a\x09self registerBindingsOn: self manager keyBinder bindings",
  1504. messageSends: ["registerBindingsOn:", "bindings", "keyBinder", "manager"],
  1505. referencedClasses: []
  1506. }),
  1507. smalltalk.HLWidget);
  1508. smalltalk.addMethod(
  1509. smalltalk.method({
  1510. selector: "registerBindingsOn:",
  1511. category: 'keybindings',
  1512. fn: function (aBindingGroup){
  1513. var self=this;
  1514. return smalltalk.withContext(function($ctx1) {
  1515. return self}, function($ctx1) {$ctx1.fill(self,"registerBindingsOn:",{aBindingGroup:aBindingGroup},smalltalk.HLWidget)})},
  1516. args: ["aBindingGroup"],
  1517. source: "registerBindingsOn: aBindingGroup",
  1518. messageSends: [],
  1519. referencedClasses: []
  1520. }),
  1521. smalltalk.HLWidget);
  1522. smalltalk.addMethod(
  1523. smalltalk.method({
  1524. selector: "renderContentOn:",
  1525. category: 'rendering',
  1526. fn: function (html){
  1527. var self=this;
  1528. return smalltalk.withContext(function($ctx1) {
  1529. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLWidget)})},
  1530. args: ["html"],
  1531. source: "renderContentOn: html",
  1532. messageSends: [],
  1533. referencedClasses: []
  1534. }),
  1535. smalltalk.HLWidget);
  1536. smalltalk.addMethod(
  1537. smalltalk.method({
  1538. selector: "renderOn:",
  1539. category: 'rendering',
  1540. fn: function (html){
  1541. var self=this;
  1542. return smalltalk.withContext(function($ctx1) {
  1543. self["@wrapper"]=_st(html)._div();
  1544. _st((function(renderer){
  1545. return smalltalk.withContext(function($ctx2) {
  1546. return _st(self)._renderContentOn_(renderer);
  1547. }, function($ctx2) {$ctx2.fillBlock({renderer:renderer},$ctx1)})}))._appendToJQuery_(_st(self["@wrapper"])._asJQuery());
  1548. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.HLWidget)})},
  1549. args: ["html"],
  1550. source: "renderOn: html\x0a\x09wrapper := html div.\x0a [ :renderer | self renderContentOn: renderer ] appendToJQuery: wrapper asJQuery",
  1551. messageSends: ["div", "appendToJQuery:", "asJQuery", "renderContentOn:"],
  1552. referencedClasses: []
  1553. }),
  1554. smalltalk.HLWidget);
  1555. smalltalk.addMethod(
  1556. smalltalk.method({
  1557. selector: "request:do:",
  1558. category: 'actions',
  1559. fn: function (aString,aBlock){
  1560. var self=this;
  1561. return smalltalk.withContext(function($ctx1) {
  1562. _st(_st(self)._manager())._request_do_(aString,aBlock);
  1563. return self}, function($ctx1) {$ctx1.fill(self,"request:do:",{aString:aString,aBlock:aBlock},smalltalk.HLWidget)})},
  1564. args: ["aString", "aBlock"],
  1565. source: "request: aString do: aBlock\x0a\x09self manager request: aString do: aBlock",
  1566. messageSends: ["request:do:", "manager"],
  1567. referencedClasses: []
  1568. }),
  1569. smalltalk.HLWidget);
  1570. smalltalk.addMethod(
  1571. smalltalk.method({
  1572. selector: "request:value:do:",
  1573. category: 'actions',
  1574. fn: function (aString,valueString,aBlock){
  1575. var self=this;
  1576. return smalltalk.withContext(function($ctx1) {
  1577. _st(_st(self)._manager())._request_value_do_(aString,valueString,aBlock);
  1578. return self}, function($ctx1) {$ctx1.fill(self,"request:value:do:",{aString:aString,valueString:valueString,aBlock:aBlock},smalltalk.HLWidget)})},
  1579. args: ["aString", "valueString", "aBlock"],
  1580. source: "request: aString value: valueString do: aBlock\x0a\x09self manager \x0a\x09\x09request: aString \x0a\x09\x09value: valueString\x0a\x09\x09do: aBlock",
  1581. messageSends: ["request:value:do:", "manager"],
  1582. referencedClasses: []
  1583. }),
  1584. smalltalk.HLWidget);
  1585. smalltalk.addMethod(
  1586. smalltalk.method({
  1587. selector: "unregister",
  1588. category: 'actions',
  1589. fn: function (){
  1590. var self=this;
  1591. return smalltalk.withContext(function($ctx1) {
  1592. return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLWidget)})},
  1593. args: [],
  1594. source: "unregister\x0a\x09\x22This method is called whenever the receiver is closed (as a tab).\x0a\x09Widgets subscribing to announcements should unregister there\x22",
  1595. messageSends: [],
  1596. referencedClasses: []
  1597. }),
  1598. smalltalk.HLWidget);
  1599. smalltalk.addMethod(
  1600. smalltalk.method({
  1601. selector: "wrapper",
  1602. category: 'accessing',
  1603. fn: function (){
  1604. var self=this;
  1605. return smalltalk.withContext(function($ctx1) {
  1606. var $1;
  1607. $1=self["@wrapper"];
  1608. return $1;
  1609. }, function($ctx1) {$ctx1.fill(self,"wrapper",{},smalltalk.HLWidget)})},
  1610. args: [],
  1611. source: "wrapper\x0a\x09^ wrapper",
  1612. messageSends: [],
  1613. referencedClasses: []
  1614. }),
  1615. smalltalk.HLWidget);
  1616. smalltalk.addMethod(
  1617. smalltalk.method({
  1618. selector: "canBeOpenAsTab",
  1619. category: 'testing',
  1620. fn: function (){
  1621. var self=this;
  1622. return smalltalk.withContext(function($ctx1) {
  1623. return false;
  1624. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLWidget.klass)})},
  1625. args: [],
  1626. source: "canBeOpenAsTab\x0a\x09^ false",
  1627. messageSends: [],
  1628. referencedClasses: []
  1629. }),
  1630. smalltalk.HLWidget.klass);
  1631. smalltalk.addMethod(
  1632. smalltalk.method({
  1633. selector: "openAsTab",
  1634. category: 'accessing',
  1635. fn: function (){
  1636. var self=this;
  1637. function $HLTab(){return smalltalk.HLTab||(typeof HLTab=="undefined"?nil:HLTab)}
  1638. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  1639. return smalltalk.withContext(function($ctx1) {
  1640. var $1,$2;
  1641. $1=_st(self)._canBeOpenAsTab();
  1642. if(! smalltalk.assert($1)){
  1643. $2=self;
  1644. return $2;
  1645. };
  1646. _st(_st($HLManager())._current())._addTab_(_st($HLTab())._on_labelled_(_st(self)._new(),_st(self)._tabLabel()));
  1647. return self}, function($ctx1) {$ctx1.fill(self,"openAsTab",{},smalltalk.HLWidget.klass)})},
  1648. args: [],
  1649. source: "openAsTab\x0a\x09self canBeOpenAsTab ifFalse: [ ^ self ].\x0a\x09HLManager current addTab: (HLTab on: self new labelled: self tabLabel)",
  1650. messageSends: ["ifFalse:", "canBeOpenAsTab", "addTab:", "on:labelled:", "new", "tabLabel", "current"],
  1651. referencedClasses: ["HLTab", "HLManager"]
  1652. }),
  1653. smalltalk.HLWidget.klass);
  1654. smalltalk.addMethod(
  1655. smalltalk.method({
  1656. selector: "tabLabel",
  1657. category: 'accessing',
  1658. fn: function (){
  1659. var self=this;
  1660. return smalltalk.withContext(function($ctx1) {
  1661. return "Tab";
  1662. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLWidget.klass)})},
  1663. args: [],
  1664. source: "tabLabel\x0a\x09^ 'Tab'",
  1665. messageSends: [],
  1666. referencedClasses: []
  1667. }),
  1668. smalltalk.HLWidget.klass);
  1669. smalltalk.addMethod(
  1670. smalltalk.method({
  1671. selector: "tabPriority",
  1672. category: 'accessing',
  1673. fn: function (){
  1674. var self=this;
  1675. return smalltalk.withContext(function($ctx1) {
  1676. var $1;
  1677. $1=(500);
  1678. return $1;
  1679. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLWidget.klass)})},
  1680. args: [],
  1681. source: "tabPriority\x0a\x09^ 500",
  1682. messageSends: [],
  1683. referencedClasses: []
  1684. }),
  1685. smalltalk.HLWidget.klass);
  1686. smalltalk.addClass('HLConfirmation', smalltalk.HLWidget, ['confirmationString', 'actionBlock', 'cancelBlock'], 'Helios-Core');
  1687. smalltalk.addMethod(
  1688. smalltalk.method({
  1689. selector: "actionBlock",
  1690. category: 'accessing',
  1691. fn: function (){
  1692. var self=this;
  1693. return smalltalk.withContext(function($ctx1) {
  1694. var $2,$1;
  1695. $2=self["@actionBlock"];
  1696. if(($receiver = $2) == nil || $receiver == undefined){
  1697. $1=(function(){
  1698. return smalltalk.withContext(function($ctx2) {
  1699. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  1700. } else {
  1701. $1=$2;
  1702. };
  1703. return $1;
  1704. }, function($ctx1) {$ctx1.fill(self,"actionBlock",{},smalltalk.HLConfirmation)})},
  1705. args: [],
  1706. source: "actionBlock\x0a\x09^ actionBlock ifNil: [ [] ]",
  1707. messageSends: ["ifNil:"],
  1708. referencedClasses: []
  1709. }),
  1710. smalltalk.HLConfirmation);
  1711. smalltalk.addMethod(
  1712. smalltalk.method({
  1713. selector: "actionBlock:",
  1714. category: 'accessing',
  1715. fn: function (aBlock){
  1716. var self=this;
  1717. return smalltalk.withContext(function($ctx1) {
  1718. self["@actionBlock"]=aBlock;
  1719. return self}, function($ctx1) {$ctx1.fill(self,"actionBlock:",{aBlock:aBlock},smalltalk.HLConfirmation)})},
  1720. args: ["aBlock"],
  1721. source: "actionBlock: aBlock\x0a\x09actionBlock := aBlock",
  1722. messageSends: [],
  1723. referencedClasses: []
  1724. }),
  1725. smalltalk.HLConfirmation);
  1726. smalltalk.addMethod(
  1727. smalltalk.method({
  1728. selector: "cancel",
  1729. category: 'actions',
  1730. fn: function (){
  1731. var self=this;
  1732. return smalltalk.withContext(function($ctx1) {
  1733. _st(_st(self)._cancelBlock())._value();
  1734. _st(self)._remove();
  1735. return self}, function($ctx1) {$ctx1.fill(self,"cancel",{},smalltalk.HLConfirmation)})},
  1736. args: [],
  1737. source: "cancel\x0a\x09self cancelBlock value.\x0a\x09self remove",
  1738. messageSends: ["value", "cancelBlock", "remove"],
  1739. referencedClasses: []
  1740. }),
  1741. smalltalk.HLConfirmation);
  1742. smalltalk.addMethod(
  1743. smalltalk.method({
  1744. selector: "cancelBlock",
  1745. category: 'accessing',
  1746. fn: function (){
  1747. var self=this;
  1748. return smalltalk.withContext(function($ctx1) {
  1749. var $2,$1;
  1750. $2=self["@cancelBlock"];
  1751. if(($receiver = $2) == nil || $receiver == undefined){
  1752. $1=(function(){
  1753. return smalltalk.withContext(function($ctx2) {
  1754. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  1755. } else {
  1756. $1=$2;
  1757. };
  1758. return $1;
  1759. }, function($ctx1) {$ctx1.fill(self,"cancelBlock",{},smalltalk.HLConfirmation)})},
  1760. args: [],
  1761. source: "cancelBlock\x0a\x09^ cancelBlock ifNil: [ [] ]",
  1762. messageSends: ["ifNil:"],
  1763. referencedClasses: []
  1764. }),
  1765. smalltalk.HLConfirmation);
  1766. smalltalk.addMethod(
  1767. smalltalk.method({
  1768. selector: "cancelBlock:",
  1769. category: 'accessing',
  1770. fn: function (aBlock){
  1771. var self=this;
  1772. return smalltalk.withContext(function($ctx1) {
  1773. self["@cancelBlock"]=aBlock;
  1774. return self}, function($ctx1) {$ctx1.fill(self,"cancelBlock:",{aBlock:aBlock},smalltalk.HLConfirmation)})},
  1775. args: ["aBlock"],
  1776. source: "cancelBlock: aBlock\x0a\x09cancelBlock := aBlock",
  1777. messageSends: [],
  1778. referencedClasses: []
  1779. }),
  1780. smalltalk.HLConfirmation);
  1781. smalltalk.addMethod(
  1782. smalltalk.method({
  1783. selector: "confirm",
  1784. category: 'actions',
  1785. fn: function (){
  1786. var self=this;
  1787. return smalltalk.withContext(function($ctx1) {
  1788. _st(_st(self)._actionBlock())._value();
  1789. _st(self)._remove();
  1790. return self}, function($ctx1) {$ctx1.fill(self,"confirm",{},smalltalk.HLConfirmation)})},
  1791. args: [],
  1792. source: "confirm\x0a\x09self actionBlock value.\x0a\x09self remove",
  1793. messageSends: ["value", "actionBlock", "remove"],
  1794. referencedClasses: []
  1795. }),
  1796. smalltalk.HLConfirmation);
  1797. smalltalk.addMethod(
  1798. smalltalk.method({
  1799. selector: "confirmationString",
  1800. category: 'accessing',
  1801. fn: function (){
  1802. var self=this;
  1803. return smalltalk.withContext(function($ctx1) {
  1804. var $2,$1;
  1805. $2=self["@confirmationString"];
  1806. if(($receiver = $2) == nil || $receiver == undefined){
  1807. $1="Confirm";
  1808. } else {
  1809. $1=$2;
  1810. };
  1811. return $1;
  1812. }, function($ctx1) {$ctx1.fill(self,"confirmationString",{},smalltalk.HLConfirmation)})},
  1813. args: [],
  1814. source: "confirmationString\x0a\x09^ confirmationString ifNil: [ 'Confirm' ]",
  1815. messageSends: ["ifNil:"],
  1816. referencedClasses: []
  1817. }),
  1818. smalltalk.HLConfirmation);
  1819. smalltalk.addMethod(
  1820. smalltalk.method({
  1821. selector: "confirmationString:",
  1822. category: 'accessing',
  1823. fn: function (aString){
  1824. var self=this;
  1825. return smalltalk.withContext(function($ctx1) {
  1826. self["@confirmationString"]=aString;
  1827. return self}, function($ctx1) {$ctx1.fill(self,"confirmationString:",{aString:aString},smalltalk.HLConfirmation)})},
  1828. args: ["aString"],
  1829. source: "confirmationString: aString\x0a\x09confirmationString := aString",
  1830. messageSends: [],
  1831. referencedClasses: []
  1832. }),
  1833. smalltalk.HLConfirmation);
  1834. smalltalk.addMethod(
  1835. smalltalk.method({
  1836. selector: "cssClass",
  1837. category: 'accessing',
  1838. fn: function (){
  1839. var self=this;
  1840. return smalltalk.withContext(function($ctx1) {
  1841. return "";
  1842. }, function($ctx1) {$ctx1.fill(self,"cssClass",{},smalltalk.HLConfirmation)})},
  1843. args: [],
  1844. source: "cssClass\x0a\x09^ ''",
  1845. messageSends: [],
  1846. referencedClasses: []
  1847. }),
  1848. smalltalk.HLConfirmation);
  1849. smalltalk.addMethod(
  1850. smalltalk.method({
  1851. selector: "remove",
  1852. category: 'actions',
  1853. fn: function (){
  1854. var self=this;
  1855. return smalltalk.withContext(function($ctx1) {
  1856. _st(_st(window)._jQuery_(".dialog"))._removeClass_("active");
  1857. _st((function(){
  1858. return smalltalk.withContext(function($ctx2) {
  1859. _st(_st(window)._jQuery_("#overlay"))._remove();
  1860. return _st(_st(window)._jQuery_(".dialog"))._remove();
  1861. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._valueWithTimeout_((300));
  1862. return self}, function($ctx1) {$ctx1.fill(self,"remove",{},smalltalk.HLConfirmation)})},
  1863. args: [],
  1864. source: "remove\x0a\x09(window jQuery: '.dialog') removeClass: 'active'.\x0a\x09[ \x0a\x09\x09(window jQuery: '#overlay') remove.\x0a\x09\x09(window jQuery: '.dialog') remove\x0a\x09] valueWithTimeout: 300",
  1865. messageSends: ["removeClass:", "jQuery:", "valueWithTimeout:", "remove"],
  1866. referencedClasses: []
  1867. }),
  1868. smalltalk.HLConfirmation);
  1869. smalltalk.addMethod(
  1870. smalltalk.method({
  1871. selector: "renderButtonsOn:",
  1872. category: 'rendering',
  1873. fn: function (html){
  1874. var self=this;
  1875. var confirmButton;
  1876. return smalltalk.withContext(function($ctx1) {
  1877. var $1,$3,$4,$5,$6,$2;
  1878. $1=_st(html)._div();
  1879. _st($1)._class_("buttons");
  1880. $2=_st($1)._with_((function(){
  1881. return smalltalk.withContext(function($ctx2) {
  1882. $3=_st(html)._button();
  1883. _st($3)._class_("button");
  1884. _st($3)._with_("Cancel");
  1885. $4=_st($3)._onClick_((function(){
  1886. return smalltalk.withContext(function($ctx3) {
  1887. return _st(self)._cancel();
  1888. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1889. $4;
  1890. $5=_st(html)._button();
  1891. _st($5)._class_("button default");
  1892. _st($5)._with_("Confirm");
  1893. $6=_st($5)._onClick_((function(){
  1894. return smalltalk.withContext(function($ctx3) {
  1895. return _st(self)._confirm();
  1896. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1897. confirmButton=$6;
  1898. return confirmButton;
  1899. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1900. _st(_st(confirmButton)._asJQuery())._focus();
  1901. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html,confirmButton:confirmButton},smalltalk.HLConfirmation)})},
  1902. args: ["html"],
  1903. source: "renderButtonsOn: html\x0a\x09| confirmButton |\x0a\x09\x0a\x09html div \x0a\x09\x09class: 'buttons';\x0a\x09\x09with: [\x0a\x09\x09\x09html button\x0a\x09\x09\x09\x09class: 'button';\x0a\x09\x09\x09\x09with: 'Cancel';\x0a\x09\x09\x09\x09onClick: [ self cancel ].\x0a\x09\x09\x09confirmButton := html button\x0a\x09\x09\x09\x09class: 'button default';\x0a\x09\x09\x09\x09with: 'Confirm';\x0a\x09\x09\x09\x09onClick: [ self confirm ] ].\x0a\x0a\x09confirmButton asJQuery focus",
  1904. messageSends: ["class:", "div", "with:", "button", "onClick:", "cancel", "confirm", "focus", "asJQuery"],
  1905. referencedClasses: []
  1906. }),
  1907. smalltalk.HLConfirmation);
  1908. smalltalk.addMethod(
  1909. smalltalk.method({
  1910. selector: "renderContentOn:",
  1911. category: 'rendering',
  1912. fn: function (html){
  1913. var self=this;
  1914. var confirmButton;
  1915. return smalltalk.withContext(function($ctx1) {
  1916. var $1,$3,$4,$2;
  1917. _st(_st(html)._div())._id_("overlay");
  1918. $1=_st(html)._div();
  1919. _st($1)._class_(_st("dialog ").__comma(_st(self)._cssClass()));
  1920. $2=_st($1)._with_((function(){
  1921. return smalltalk.withContext(function($ctx2) {
  1922. $3=self;
  1923. _st($3)._renderMainOn_(html);
  1924. $4=_st($3)._renderButtonsOn_(html);
  1925. return $4;
  1926. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1927. _st(_st(window)._jQuery_(".dialog"))._addClass_("active");
  1928. _st(self)._setupKeyBindings();
  1929. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html,confirmButton:confirmButton},smalltalk.HLConfirmation)})},
  1930. args: ["html"],
  1931. source: "renderContentOn: html\x0a\x09| confirmButton |\x0a\x09\x0a\x09html div id: 'overlay'.\x0a\x09html div \x0a\x09\x09class: 'dialog ', self cssClass;\x0a\x09\x09with: [\x0a\x09\x09\x09self\x0a\x09\x09\x09\x09renderMainOn: html;\x0a\x09\x09\x09\x09renderButtonsOn: html ].\x0a\x0a\x09(window jQuery: '.dialog') addClass: 'active'.\x0a\x09self setupKeyBindings",
  1932. messageSends: ["id:", "div", "class:", ",", "cssClass", "with:", "renderMainOn:", "renderButtonsOn:", "addClass:", "jQuery:", "setupKeyBindings"],
  1933. referencedClasses: []
  1934. }),
  1935. smalltalk.HLConfirmation);
  1936. smalltalk.addMethod(
  1937. smalltalk.method({
  1938. selector: "renderMainOn:",
  1939. category: 'rendering',
  1940. fn: function (html){
  1941. var self=this;
  1942. return smalltalk.withContext(function($ctx1) {
  1943. _st(_st(html)._span())._with_(_st(self)._confirmationString());
  1944. return self}, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},smalltalk.HLConfirmation)})},
  1945. args: ["html"],
  1946. source: "renderMainOn: html\x0a\x09html span with: self confirmationString",
  1947. messageSends: ["with:", "confirmationString", "span"],
  1948. referencedClasses: []
  1949. }),
  1950. smalltalk.HLConfirmation);
  1951. smalltalk.addMethod(
  1952. smalltalk.method({
  1953. selector: "setupKeyBindings",
  1954. category: 'rendering',
  1955. fn: function (){
  1956. var self=this;
  1957. return smalltalk.withContext(function($ctx1) {
  1958. var $1;
  1959. _st(_st(window)._jQuery_(".dialog"))._keyup_((function(e){
  1960. return smalltalk.withContext(function($ctx2) {
  1961. $1=_st(_st(e)._keyCode()).__eq((27));
  1962. if(smalltalk.assert($1)){
  1963. return _st(self)._cancel();
  1964. };
  1965. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
  1966. return self}, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},smalltalk.HLConfirmation)})},
  1967. args: [],
  1968. source: "setupKeyBindings\x0a\x09(window jQuery: '.dialog') keyup: [ :e |\x0a\x09\x09e keyCode = 27 ifTrue: [ self cancel ] ]",
  1969. messageSends: ["keyup:", "ifTrue:", "cancel", "=", "keyCode", "jQuery:"],
  1970. referencedClasses: []
  1971. }),
  1972. smalltalk.HLConfirmation);
  1973. smalltalk.addClass('HLRequest', smalltalk.HLConfirmation, ['input', 'value'], 'Helios-Core');
  1974. smalltalk.addMethod(
  1975. smalltalk.method({
  1976. selector: "confirm",
  1977. category: 'actions',
  1978. fn: function (){
  1979. var self=this;
  1980. return smalltalk.withContext(function($ctx1) {
  1981. _st(_st(self)._actionBlock())._value_(_st(_st(self["@input"])._asJQuery())._val());
  1982. _st(self)._remove();
  1983. return self}, function($ctx1) {$ctx1.fill(self,"confirm",{},smalltalk.HLRequest)})},
  1984. args: [],
  1985. source: "confirm\x0a\x09self actionBlock value: input asJQuery val.\x0a\x09self remove",
  1986. messageSends: ["value:", "val", "asJQuery", "actionBlock", "remove"],
  1987. referencedClasses: []
  1988. }),
  1989. smalltalk.HLRequest);
  1990. smalltalk.addMethod(
  1991. smalltalk.method({
  1992. selector: "cssClass",
  1993. category: 'accessing',
  1994. fn: function (){
  1995. var self=this;
  1996. return smalltalk.withContext(function($ctx1) {
  1997. return "large";
  1998. }, function($ctx1) {$ctx1.fill(self,"cssClass",{},smalltalk.HLRequest)})},
  1999. args: [],
  2000. source: "cssClass\x0a\x09^ 'large'",
  2001. messageSends: [],
  2002. referencedClasses: []
  2003. }),
  2004. smalltalk.HLRequest);
  2005. smalltalk.addMethod(
  2006. smalltalk.method({
  2007. selector: "renderMainOn:",
  2008. category: 'rendering',
  2009. fn: function (html){
  2010. var self=this;
  2011. return smalltalk.withContext(function($ctx1) {
  2012. smalltalk.HLConfirmation.fn.prototype._renderMainOn_.apply(_st(self), [html]);
  2013. self["@input"]=_st(html)._textarea();
  2014. _st(_st(self["@input"])._asJQuery())._val_(_st(self)._value());
  2015. return self}, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},smalltalk.HLRequest)})},
  2016. args: ["html"],
  2017. source: "renderMainOn: html\x0a\x09super renderMainOn: html.\x0a\x09input := html textarea.\x0a\x09input asJQuery val: self value",
  2018. messageSends: ["renderMainOn:", "textarea", "val:", "value", "asJQuery"],
  2019. referencedClasses: []
  2020. }),
  2021. smalltalk.HLRequest);
  2022. smalltalk.addMethod(
  2023. smalltalk.method({
  2024. selector: "value",
  2025. category: 'accessing',
  2026. fn: function (){
  2027. var self=this;
  2028. return smalltalk.withContext(function($ctx1) {
  2029. var $2,$1;
  2030. $2=self["@value"];
  2031. if(($receiver = $2) == nil || $receiver == undefined){
  2032. $1="";
  2033. } else {
  2034. $1=$2;
  2035. };
  2036. return $1;
  2037. }, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.HLRequest)})},
  2038. args: [],
  2039. source: "value\x0a\x09^ value ifNil: [ '' ]",
  2040. messageSends: ["ifNil:"],
  2041. referencedClasses: []
  2042. }),
  2043. smalltalk.HLRequest);
  2044. smalltalk.addMethod(
  2045. smalltalk.method({
  2046. selector: "value:",
  2047. category: 'accessing',
  2048. fn: function (aString){
  2049. var self=this;
  2050. return smalltalk.withContext(function($ctx1) {
  2051. self["@value"]=aString;
  2052. return self}, function($ctx1) {$ctx1.fill(self,"value:",{aString:aString},smalltalk.HLRequest)})},
  2053. args: ["aString"],
  2054. source: "value: aString\x0a\x09value := aString",
  2055. messageSends: [],
  2056. referencedClasses: []
  2057. }),
  2058. smalltalk.HLRequest);
  2059. smalltalk.addClass('HLDebugger', smalltalk.HLWidget, [], 'Helios-Core');
  2060. smalltalk.addClass('HLFocusableWidget', smalltalk.HLWidget, [], 'Helios-Core');
  2061. smalltalk.addMethod(
  2062. smalltalk.method({
  2063. selector: "blur",
  2064. category: 'events',
  2065. fn: function (){
  2066. var self=this;
  2067. return smalltalk.withContext(function($ctx1) {
  2068. _st(_st(_st(self)._wrapper())._asJQuery())._blur();
  2069. return self}, function($ctx1) {$ctx1.fill(self,"blur",{},smalltalk.HLFocusableWidget)})},
  2070. args: [],
  2071. source: "blur\x0a\x09self wrapper asJQuery blur",
  2072. messageSends: ["blur", "asJQuery", "wrapper"],
  2073. referencedClasses: []
  2074. }),
  2075. smalltalk.HLFocusableWidget);
  2076. smalltalk.addMethod(
  2077. smalltalk.method({
  2078. selector: "canHaveFocus",
  2079. category: 'testing',
  2080. fn: function (){
  2081. var self=this;
  2082. return smalltalk.withContext(function($ctx1) {
  2083. return true;
  2084. }, function($ctx1) {$ctx1.fill(self,"canHaveFocus",{},smalltalk.HLFocusableWidget)})},
  2085. args: [],
  2086. source: "canHaveFocus\x0a\x09^ true",
  2087. messageSends: [],
  2088. referencedClasses: []
  2089. }),
  2090. smalltalk.HLFocusableWidget);
  2091. smalltalk.addMethod(
  2092. smalltalk.method({
  2093. selector: "focus",
  2094. category: 'events',
  2095. fn: function (){
  2096. var self=this;
  2097. return smalltalk.withContext(function($ctx1) {
  2098. _st(_st(_st(self)._wrapper())._asJQuery())._focus();
  2099. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLFocusableWidget)})},
  2100. args: [],
  2101. source: "focus\x0a\x09self wrapper asJQuery focus",
  2102. messageSends: ["focus", "asJQuery", "wrapper"],
  2103. referencedClasses: []
  2104. }),
  2105. smalltalk.HLFocusableWidget);
  2106. smalltalk.addMethod(
  2107. smalltalk.method({
  2108. selector: "focusClass",
  2109. category: 'accessing',
  2110. fn: function (){
  2111. var self=this;
  2112. return smalltalk.withContext(function($ctx1) {
  2113. return "focused";
  2114. }, function($ctx1) {$ctx1.fill(self,"focusClass",{},smalltalk.HLFocusableWidget)})},
  2115. args: [],
  2116. source: "focusClass\x0a\x09^ 'focused'",
  2117. messageSends: [],
  2118. referencedClasses: []
  2119. }),
  2120. smalltalk.HLFocusableWidget);
  2121. smalltalk.addMethod(
  2122. smalltalk.method({
  2123. selector: "hasFocus",
  2124. category: 'events',
  2125. fn: function (){
  2126. var self=this;
  2127. return smalltalk.withContext(function($ctx1) {
  2128. var $1;
  2129. $1=_st(_st(_st(self)._wrapper())._notNil())._and_((function(){
  2130. return smalltalk.withContext(function($ctx2) {
  2131. return _st(_st(_st(self)._wrapper())._asJQuery())._is_(":focus");
  2132. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2133. return $1;
  2134. }, function($ctx1) {$ctx1.fill(self,"hasFocus",{},smalltalk.HLFocusableWidget)})},
  2135. args: [],
  2136. source: "hasFocus\x0a\x09^ self wrapper notNil and: [ self wrapper asJQuery is: ':focus' ]",
  2137. messageSends: ["and:", "is:", "asJQuery", "wrapper", "notNil"],
  2138. referencedClasses: []
  2139. }),
  2140. smalltalk.HLFocusableWidget);
  2141. smalltalk.addMethod(
  2142. smalltalk.method({
  2143. selector: "renderContentOn:",
  2144. category: 'rendering',
  2145. fn: function (html){
  2146. var self=this;
  2147. return smalltalk.withContext(function($ctx1) {
  2148. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLFocusableWidget)})},
  2149. args: ["html"],
  2150. source: "renderContentOn: html",
  2151. messageSends: [],
  2152. referencedClasses: []
  2153. }),
  2154. smalltalk.HLFocusableWidget);
  2155. smalltalk.addMethod(
  2156. smalltalk.method({
  2157. selector: "renderOn:",
  2158. category: 'rendering',
  2159. fn: function (html){
  2160. var self=this;
  2161. return smalltalk.withContext(function($ctx1) {
  2162. var $1,$2,$3,$4;
  2163. _st(self)._registerBindings();
  2164. $1=_st(html)._div();
  2165. _st($1)._class_("hl_widget");
  2166. $2=_st($1)._yourself();
  2167. self["@wrapper"]=$2;
  2168. _st(self["@wrapper"])._with_((function(){
  2169. return smalltalk.withContext(function($ctx2) {
  2170. return _st(self)._renderContentOn_(html);
  2171. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2172. $3=self["@wrapper"];
  2173. _st($3)._at_put_("tabindex","0");
  2174. _st($3)._onBlur_((function(){
  2175. return smalltalk.withContext(function($ctx2) {
  2176. return _st(_st(_st(self)._wrapper())._asJQuery())._removeClass_(_st(self)._focusClass());
  2177. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2178. $4=_st($3)._onFocus_((function(){
  2179. return smalltalk.withContext(function($ctx2) {
  2180. return _st(_st(_st(self)._wrapper())._asJQuery())._addClass_(_st(self)._focusClass());
  2181. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2182. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.HLFocusableWidget)})},
  2183. args: ["html"],
  2184. source: "renderOn: html\x0a\x09self registerBindings.\x0a \x0a wrapper := html div \x0a \x09class: 'hl_widget';\x0a\x09\x09yourself.\x0a\x09\x09\x0a wrapper with: [ self renderContentOn: html ].\x0a\x09\x0a\x09wrapper\x0a\x09\x09at: 'tabindex' put: '0';\x0a\x09\x09onBlur: [ self wrapper asJQuery removeClass: self focusClass ];\x0a onFocus: [ self wrapper asJQuery addClass: self focusClass ]",
  2185. messageSends: ["registerBindings", "class:", "div", "yourself", "with:", "renderContentOn:", "at:put:", "onBlur:", "removeClass:", "focusClass", "asJQuery", "wrapper", "onFocus:", "addClass:"],
  2186. referencedClasses: []
  2187. }),
  2188. smalltalk.HLFocusableWidget);
  2189. smalltalk.addClass('HLListWidget', smalltalk.HLFocusableWidget, ['items', 'selectedItem', 'mapping'], 'Helios-Core');
  2190. smalltalk.addMethod(
  2191. smalltalk.method({
  2192. selector: "activateFirstListItem",
  2193. category: 'actions',
  2194. fn: function (){
  2195. var self=this;
  2196. return smalltalk.withContext(function($ctx1) {
  2197. _st(self)._activateListItem_(_st(window)._jQuery_(_st(_st(_st(self["@wrapper"])._asJQuery())._find_("li.inactive"))._get_((0))));
  2198. return self}, function($ctx1) {$ctx1.fill(self,"activateFirstListItem",{},smalltalk.HLListWidget)})},
  2199. args: [],
  2200. source: "activateFirstListItem\x0a\x09self activateListItem: (window jQuery: ((wrapper asJQuery find: 'li.inactive') get: 0))",
  2201. messageSends: ["activateListItem:", "jQuery:", "get:", "find:", "asJQuery"],
  2202. referencedClasses: []
  2203. }),
  2204. smalltalk.HLListWidget);
  2205. smalltalk.addMethod(
  2206. smalltalk.method({
  2207. selector: "activateItem:",
  2208. category: 'actions',
  2209. fn: function (anObject){
  2210. var self=this;
  2211. return smalltalk.withContext(function($ctx1) {
  2212. var $1;
  2213. var $early={};
  2214. try {
  2215. _st(self)._activateListItem_(_st(_st(self["@mapping"])._at_ifAbsent_(anObject,(function(){
  2216. return smalltalk.withContext(function($ctx2) {
  2217. $1=self;
  2218. throw $early=[$1];
  2219. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._asJQuery());
  2220. return self}
  2221. catch(e) {if(e===$early)return e[0]; throw e}
  2222. }, function($ctx1) {$ctx1.fill(self,"activateItem:",{anObject:anObject},smalltalk.HLListWidget)})},
  2223. args: ["anObject"],
  2224. source: "activateItem: anObject\x0a\x09self activateListItem: (mapping \x0a\x09\x09at: anObject\x0a\x09\x09ifAbsent: [ ^ self ]) asJQuery",
  2225. messageSends: ["activateListItem:", "asJQuery", "at:ifAbsent:"],
  2226. referencedClasses: []
  2227. }),
  2228. smalltalk.HLListWidget);
  2229. smalltalk.addMethod(
  2230. smalltalk.method({
  2231. selector: "activateListItem:",
  2232. category: 'actions',
  2233. fn: function (aListItem){
  2234. var self=this;
  2235. var item;
  2236. return smalltalk.withContext(function($ctx1) {
  2237. var $1,$2,$3;
  2238. $1=_st(aListItem)._get_((0));
  2239. if(($receiver = $1) == nil || $receiver == undefined){
  2240. $2=self;
  2241. return $2;
  2242. } else {
  2243. $1;
  2244. };
  2245. _st(_st(_st(aListItem)._parent())._children())._removeClass_("active");
  2246. _st(aListItem)._addClass_("active");
  2247. _st(self)._ensureVisible_(aListItem);
  2248. item=_st(_st(self)._items())._at_(_st(_st(aListItem)._attr_("list-data"))._asNumber());
  2249. $3=_st(_st(self)._selectedItem()).__eq_eq(item);
  2250. if(! smalltalk.assert($3)){
  2251. _st(self)._selectItem_(item);
  2252. };
  2253. return self}, function($ctx1) {$ctx1.fill(self,"activateListItem:",{aListItem:aListItem,item:item},smalltalk.HLListWidget)})},
  2254. args: ["aListItem"],
  2255. source: "activateListItem: aListItem\x0a\x09| item |\x0a \x0a\x09(aListItem get: 0) ifNil: [ ^self ].\x0a\x09aListItem parent children removeClass: 'active'.\x0a\x09aListItem addClass: 'active'.\x0a \x0a\x09self ensureVisible: aListItem.\x0a \x0a \x22Activate the corresponding item\x22\x0a item := (self items at: (aListItem attr: 'list-data') asNumber).\x0a self selectedItem == item ifFalse: [\x0a\x09 self selectItem: item ]",
  2256. messageSends: ["ifNil:", "get:", "removeClass:", "children", "parent", "addClass:", "ensureVisible:", "at:", "asNumber", "attr:", "items", "ifFalse:", "selectItem:", "==", "selectedItem"],
  2257. referencedClasses: []
  2258. }),
  2259. smalltalk.HLListWidget);
  2260. smalltalk.addMethod(
  2261. smalltalk.method({
  2262. selector: "activateNextListItem",
  2263. category: 'actions',
  2264. fn: function (){
  2265. var self=this;
  2266. return smalltalk.withContext(function($ctx1) {
  2267. _st(self)._activateListItem_(_st(_st(window)._jQuery_(".focused .nav-pills .active"))._next());
  2268. _st(_st(_st(window)._jQuery_(".focused .nav-pills .active"))._get())._ifEmpty_((function(){
  2269. return smalltalk.withContext(function($ctx2) {
  2270. return _st(self)._activateFirstListItem();
  2271. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2272. return self}, function($ctx1) {$ctx1.fill(self,"activateNextListItem",{},smalltalk.HLListWidget)})},
  2273. args: [],
  2274. source: "activateNextListItem\x0a\x09self activateListItem: (window jQuery: '.focused .nav-pills .active') next.\x0a\x09\x0a\x09\x22select the first item if none is selected\x22\x0a\x09(window jQuery: '.focused .nav-pills .active') get ifEmpty: [\x0a\x09\x09self activateFirstListItem ]",
  2275. messageSends: ["activateListItem:", "next", "jQuery:", "ifEmpty:", "activateFirstListItem", "get"],
  2276. referencedClasses: []
  2277. }),
  2278. smalltalk.HLListWidget);
  2279. smalltalk.addMethod(
  2280. smalltalk.method({
  2281. selector: "activatePreviousListItem",
  2282. category: 'actions',
  2283. fn: function (){
  2284. var self=this;
  2285. return smalltalk.withContext(function($ctx1) {
  2286. _st(self)._activateListItem_(_st(_st(window)._jQuery_(".focused .nav-pills .active"))._prev());
  2287. return self}, function($ctx1) {$ctx1.fill(self,"activatePreviousListItem",{},smalltalk.HLListWidget)})},
  2288. args: [],
  2289. source: "activatePreviousListItem\x0a\x09self activateListItem: (window jQuery: '.focused .nav-pills .active') prev",
  2290. messageSends: ["activateListItem:", "prev", "jQuery:"],
  2291. referencedClasses: []
  2292. }),
  2293. smalltalk.HLListWidget);
  2294. smalltalk.addMethod(
  2295. smalltalk.method({
  2296. selector: "cssClassForItem:",
  2297. category: 'accessing',
  2298. fn: function (anObject){
  2299. var self=this;
  2300. return smalltalk.withContext(function($ctx1) {
  2301. var $2,$1;
  2302. $2=_st(_st(self)._selectedItem()).__eq(anObject);
  2303. if(smalltalk.assert($2)){
  2304. $1="active";
  2305. } else {
  2306. $1="inactive";
  2307. };
  2308. return $1;
  2309. }, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{anObject:anObject},smalltalk.HLListWidget)})},
  2310. args: ["anObject"],
  2311. source: "cssClassForItem: anObject\x0a\x09^ self selectedItem = anObject\x0a\x09\x09\x09ifTrue: [ 'active' ]\x0a\x09\x09\x09ifFalse: [ 'inactive' ]",
  2312. messageSends: ["ifTrue:ifFalse:", "=", "selectedItem"],
  2313. referencedClasses: []
  2314. }),
  2315. smalltalk.HLListWidget);
  2316. smalltalk.addMethod(
  2317. smalltalk.method({
  2318. selector: "defaultItems",
  2319. category: 'defaults',
  2320. fn: function (){
  2321. var self=this;
  2322. return smalltalk.withContext(function($ctx1) {
  2323. var $1;
  2324. $1=[];
  2325. return $1;
  2326. }, function($ctx1) {$ctx1.fill(self,"defaultItems",{},smalltalk.HLListWidget)})},
  2327. args: [],
  2328. source: "defaultItems\x0a\x09^ #()",
  2329. messageSends: [],
  2330. referencedClasses: []
  2331. }),
  2332. smalltalk.HLListWidget);
  2333. smalltalk.addMethod(
  2334. smalltalk.method({
  2335. selector: "ensureVisible:",
  2336. category: 'actions',
  2337. fn: function (aListItem){
  2338. var self=this;
  2339. var perent,position;
  2340. return smalltalk.withContext(function($ctx1) {
  2341. var $1,$2;
  2342. position=_st(self)._positionOf_(aListItem);
  2343. parent=_st(aListItem)._parent();
  2344. $1=_st(_st(_st(aListItem)._position())._top()).__lt((0));
  2345. if(smalltalk.assert($1)){
  2346. _st(_st(parent)._get_((0)))._scrollTop_(_st(_st(_st(_st(parent)._get_((0)))._scrollTop()).__plus(_st(_st(aListItem)._position())._top())).__minus((10)));
  2347. };
  2348. $2=_st(_st(_st(_st(aListItem)._position())._top()).__plus(_st(aListItem)._height())).__gt(_st(parent)._height());
  2349. if(smalltalk.assert($2)){
  2350. _st(_st(parent)._get_((0)))._scrollTop_(_st(_st(_st(_st(_st(parent)._get_((0)))._scrollTop()).__plus(_st(aListItem)._height())).__minus(_st(_st(parent)._height()).__minus(_st(_st(aListItem)._position())._top()))).__plus((10)));
  2351. };
  2352. return self}, function($ctx1) {$ctx1.fill(self,"ensureVisible:",{aListItem:aListItem,perent:perent,position:position},smalltalk.HLListWidget)})},
  2353. args: ["aListItem"],
  2354. source: "ensureVisible: aListItem\x09\x0a\x09\x22Move the scrollbar to show the active element\x22\x0a\x09\x0a\x09| perent position |\x0a\x09\x0a\x09position := self positionOf: aListItem.\x0a\x09parent := aListItem parent.\x0a\x09\x0a aListItem position top < 0 ifTrue: [\x0a\x09\x09(parent get: 0) scrollTop: ((parent get: 0) scrollTop + aListItem position top - 10) ].\x0a aListItem position top + aListItem height > parent height ifTrue: [ \x0a\x09\x09(parent get: 0) scrollTop: ((parent get: 0) scrollTop + aListItem height - (parent height - aListItem position top)) +10 ]",
  2355. messageSends: ["positionOf:", "parent", "ifTrue:", "scrollTop:", "-", "+", "top", "position", "scrollTop", "get:", "<", "height", ">"],
  2356. referencedClasses: []
  2357. }),
  2358. smalltalk.HLListWidget);
  2359. smalltalk.addMethod(
  2360. smalltalk.method({
  2361. selector: "focus",
  2362. category: 'actions',
  2363. fn: function (){
  2364. var self=this;
  2365. return smalltalk.withContext(function($ctx1) {
  2366. var $1,$2;
  2367. smalltalk.HLFocusableWidget.fn.prototype._focus.apply(_st(self), []);
  2368. $1=_st(_st(self)._items())._isEmpty();
  2369. if(! smalltalk.assert($1)){
  2370. $2=_st(self)._selectedItem();
  2371. if(($receiver = $2) == nil || $receiver == undefined){
  2372. _st(self)._activateFirstListItem();
  2373. } else {
  2374. $2;
  2375. };
  2376. };
  2377. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLListWidget)})},
  2378. args: [],
  2379. source: "focus\x0a\x09super focus.\x0a self items isEmpty ifFalse: [ \x0a\x09\x09self selectedItem ifNil: [ self activateFirstListItem ] ]",
  2380. messageSends: ["focus", "ifFalse:", "ifNil:", "activateFirstListItem", "selectedItem", "isEmpty", "items"],
  2381. referencedClasses: []
  2382. }),
  2383. smalltalk.HLListWidget);
  2384. smalltalk.addMethod(
  2385. smalltalk.method({
  2386. selector: "iconForItem:",
  2387. category: 'accessing',
  2388. fn: function (anObject){
  2389. var self=this;
  2390. return smalltalk.withContext(function($ctx1) {
  2391. return "";
  2392. }, function($ctx1) {$ctx1.fill(self,"iconForItem:",{anObject:anObject},smalltalk.HLListWidget)})},
  2393. args: ["anObject"],
  2394. source: "iconForItem: anObject\x0a\x09^ ''",
  2395. messageSends: [],
  2396. referencedClasses: []
  2397. }),
  2398. smalltalk.HLListWidget);
  2399. smalltalk.addMethod(
  2400. smalltalk.method({
  2401. selector: "initialize",
  2402. category: 'initialization',
  2403. fn: function (){
  2404. var self=this;
  2405. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  2406. return smalltalk.withContext(function($ctx1) {
  2407. smalltalk.HLFocusableWidget.fn.prototype._initialize.apply(_st(self), []);
  2408. self["@mapping"]=_st($Dictionary())._new();
  2409. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLListWidget)})},
  2410. args: [],
  2411. source: "initialize\x0a\x09super initialize.\x0a\x09\x0a\x09mapping := Dictionary new.",
  2412. messageSends: ["initialize", "new"],
  2413. referencedClasses: ["Dictionary"]
  2414. }),
  2415. smalltalk.HLListWidget);
  2416. smalltalk.addMethod(
  2417. smalltalk.method({
  2418. selector: "items",
  2419. category: 'accessing',
  2420. fn: function (){
  2421. var self=this;
  2422. return smalltalk.withContext(function($ctx1) {
  2423. var $2,$1;
  2424. $2=self["@items"];
  2425. if(($receiver = $2) == nil || $receiver == undefined){
  2426. self["@items"]=_st(self)._defaultItems();
  2427. $1=self["@items"];
  2428. } else {
  2429. $1=$2;
  2430. };
  2431. return $1;
  2432. }, function($ctx1) {$ctx1.fill(self,"items",{},smalltalk.HLListWidget)})},
  2433. args: [],
  2434. source: "items\x0a\x09^ items ifNil: [ items := self defaultItems ]",
  2435. messageSends: ["ifNil:", "defaultItems"],
  2436. referencedClasses: []
  2437. }),
  2438. smalltalk.HLListWidget);
  2439. smalltalk.addMethod(
  2440. smalltalk.method({
  2441. selector: "items:",
  2442. category: 'accessing',
  2443. fn: function (aCollection){
  2444. var self=this;
  2445. return smalltalk.withContext(function($ctx1) {
  2446. self["@items"]=aCollection;
  2447. return self}, function($ctx1) {$ctx1.fill(self,"items:",{aCollection:aCollection},smalltalk.HLListWidget)})},
  2448. args: ["aCollection"],
  2449. source: "items: aCollection\x0a\x09items := aCollection",
  2450. messageSends: [],
  2451. referencedClasses: []
  2452. }),
  2453. smalltalk.HLListWidget);
  2454. smalltalk.addMethod(
  2455. smalltalk.method({
  2456. selector: "positionOf:",
  2457. category: 'accessing',
  2458. fn: function (aListItem){
  2459. var self=this;
  2460. return smalltalk.withContext(function($ctx1) {
  2461. return aListItem.parent().children().get().indexOf(aListItem.get(0)) + 1
  2462. ;
  2463. return self}, function($ctx1) {$ctx1.fill(self,"positionOf:",{aListItem:aListItem},smalltalk.HLListWidget)})},
  2464. args: ["aListItem"],
  2465. source: "positionOf: aListItem\x0a\x09<\x0a \x09return aListItem.parent().children().get().indexOf(aListItem.get(0)) + 1\x0a\x09>",
  2466. messageSends: [],
  2467. referencedClasses: []
  2468. }),
  2469. smalltalk.HLListWidget);
  2470. smalltalk.addMethod(
  2471. smalltalk.method({
  2472. selector: "refresh",
  2473. category: 'actions',
  2474. fn: function (){
  2475. var self=this;
  2476. return smalltalk.withContext(function($ctx1) {
  2477. var $1;
  2478. var $early={};
  2479. try {
  2480. smalltalk.HLFocusableWidget.fn.prototype._refresh.apply(_st(self), []);
  2481. _st(self)._ensureVisible_(_st(_st(self["@mapping"])._at_ifAbsent_(_st(self)._selectedItem(),(function(){
  2482. return smalltalk.withContext(function($ctx2) {
  2483. $1=self;
  2484. throw $early=[$1];
  2485. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._asJQuery());
  2486. return self}
  2487. catch(e) {if(e===$early)return e[0]; throw e}
  2488. }, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLListWidget)})},
  2489. args: [],
  2490. source: "refresh\x0a\x09super refresh.\x0a\x09\x0a\x09self ensureVisible: (mapping \x0a\x09\x09at: self selectedItem\x0a\x09\x09ifAbsent: [ ^ self ]) asJQuery",
  2491. messageSends: ["refresh", "ensureVisible:", "asJQuery", "at:ifAbsent:", "selectedItem"],
  2492. referencedClasses: []
  2493. }),
  2494. smalltalk.HLListWidget);
  2495. smalltalk.addMethod(
  2496. smalltalk.method({
  2497. selector: "registerMappingFrom:to:",
  2498. category: 'private',
  2499. fn: function (anObject,aTag){
  2500. var self=this;
  2501. return smalltalk.withContext(function($ctx1) {
  2502. _st(self["@mapping"])._at_put_(anObject,aTag);
  2503. return self}, function($ctx1) {$ctx1.fill(self,"registerMappingFrom:to:",{anObject:anObject,aTag:aTag},smalltalk.HLListWidget)})},
  2504. args: ["anObject", "aTag"],
  2505. source: "registerMappingFrom: anObject to: aTag\x0a\x09mapping at: anObject put: aTag",
  2506. messageSends: ["at:put:"],
  2507. referencedClasses: []
  2508. }),
  2509. smalltalk.HLListWidget);
  2510. smalltalk.addMethod(
  2511. smalltalk.method({
  2512. selector: "renderButtonsOn:",
  2513. category: 'rendering',
  2514. fn: function (html){
  2515. var self=this;
  2516. return smalltalk.withContext(function($ctx1) {
  2517. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLListWidget)})},
  2518. args: ["html"],
  2519. source: "renderButtonsOn: html",
  2520. messageSends: [],
  2521. referencedClasses: []
  2522. }),
  2523. smalltalk.HLListWidget);
  2524. smalltalk.addMethod(
  2525. smalltalk.method({
  2526. selector: "renderContentOn:",
  2527. category: 'rendering',
  2528. fn: function (html){
  2529. var self=this;
  2530. return smalltalk.withContext(function($ctx1) {
  2531. var $1,$2,$3,$4;
  2532. $1=_st(html)._ul();
  2533. _st($1)._class_("nav nav-pills nav-stacked");
  2534. $2=_st($1)._with_((function(){
  2535. return smalltalk.withContext(function($ctx2) {
  2536. return _st(self)._renderListOn_(html);
  2537. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2538. $3=_st(html)._div();
  2539. _st($3)._class_("pane_actions form-actions");
  2540. $4=_st($3)._with_((function(){
  2541. return smalltalk.withContext(function($ctx2) {
  2542. return _st(self)._renderButtonsOn_(html);
  2543. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2544. _st(self)._setupKeyBindings();
  2545. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLListWidget)})},
  2546. args: ["html"],
  2547. source: "renderContentOn: html\x0a\x09html ul \x0a \x09class: 'nav nav-pills nav-stacked';\x0a with: [ self renderListOn: html ].\x0a html div class: 'pane_actions form-actions'; with: [\x0a \x09self renderButtonsOn: html ].\x0a \x0a self setupKeyBindings",
  2548. messageSends: ["class:", "ul", "with:", "renderListOn:", "div", "renderButtonsOn:", "setupKeyBindings"],
  2549. referencedClasses: []
  2550. }),
  2551. smalltalk.HLListWidget);
  2552. smalltalk.addMethod(
  2553. smalltalk.method({
  2554. selector: "renderItem:on:",
  2555. category: 'rendering',
  2556. fn: function (anObject,html){
  2557. var self=this;
  2558. var li;
  2559. return smalltalk.withContext(function($ctx1) {
  2560. var $1,$3,$4,$2;
  2561. li=_st(html)._li();
  2562. _st(self)._registerMappingFrom_to_(anObject,li);
  2563. $1=li;
  2564. _st($1)._class_(_st(self)._cssClassForItem_(anObject));
  2565. _st($1)._at_put_("list-data",_st(_st(_st(self)._items())._indexOf_(anObject))._asString());
  2566. $2=_st($1)._with_((function(){
  2567. return smalltalk.withContext(function($ctx2) {
  2568. $3=_st(html)._a();
  2569. _st($3)._with_((function(){
  2570. return smalltalk.withContext(function($ctx3) {
  2571. _st(_st(html)._tag_("i"))._class_(_st(self)._iconForItem_(anObject));
  2572. return _st(self)._renderItemLabel_on_(anObject,html);
  2573. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2574. $4=_st($3)._onClick_((function(){
  2575. return smalltalk.withContext(function($ctx3) {
  2576. return _st(self)._activateListItem_(_st(li)._asJQuery());
  2577. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2578. return $4;
  2579. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2580. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:on:",{anObject:anObject,html:html,li:li},smalltalk.HLListWidget)})},
  2581. args: ["anObject", "html"],
  2582. source: "renderItem: anObject on: html\x0a\x09| li |\x0a \x0a\x09li := html li.\x0a\x09self registerMappingFrom: anObject to: li.\x0a\x09\x0a li\x0a \x09class: (self cssClassForItem: anObject);\x0a at: 'list-data' put: (self items indexOf: anObject) asString;\x0a with: [ \x0a \x09html a\x0a \x09with: [ \x0a \x09\x09(html tag: 'i') class: (self iconForItem: anObject).\x0a \x09\x09\x09\x09\x09self renderItemLabel: anObject on: html ];\x0a\x09\x09\x09\x09onClick: [\x0a \x09self activateListItem: li asJQuery ] ]",
  2583. messageSends: ["li", "registerMappingFrom:to:", "class:", "cssClassForItem:", "at:put:", "asString", "indexOf:", "items", "with:", "iconForItem:", "tag:", "renderItemLabel:on:", "a", "onClick:", "activateListItem:", "asJQuery"],
  2584. referencedClasses: []
  2585. }),
  2586. smalltalk.HLListWidget);
  2587. smalltalk.addMethod(
  2588. smalltalk.method({
  2589. selector: "renderItemLabel:on:",
  2590. category: 'rendering',
  2591. fn: function (anObject,html){
  2592. var self=this;
  2593. return smalltalk.withContext(function($ctx1) {
  2594. _st(html)._with_(_st(anObject)._asString());
  2595. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{anObject:anObject,html:html},smalltalk.HLListWidget)})},
  2596. args: ["anObject", "html"],
  2597. source: "renderItemLabel: anObject on: html\x0a\x09html with: anObject asString",
  2598. messageSends: ["with:", "asString"],
  2599. referencedClasses: []
  2600. }),
  2601. smalltalk.HLListWidget);
  2602. smalltalk.addMethod(
  2603. smalltalk.method({
  2604. selector: "renderListOn:",
  2605. category: 'rendering',
  2606. fn: function (html){
  2607. var self=this;
  2608. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  2609. return smalltalk.withContext(function($ctx1) {
  2610. self["@mapping"]=_st($Dictionary())._new();
  2611. _st(_st(self)._items())._do_((function(each){
  2612. return smalltalk.withContext(function($ctx2) {
  2613. return _st(self)._renderItem_on_(each,html);
  2614. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2615. return self}, function($ctx1) {$ctx1.fill(self,"renderListOn:",{html:html},smalltalk.HLListWidget)})},
  2616. args: ["html"],
  2617. source: "renderListOn: html\x0a\x09mapping := Dictionary new.\x0a\x09\x0a\x09self items do: [ :each | \x0a \x09self renderItem: each on: html ]",
  2618. messageSends: ["new", "do:", "renderItem:on:", "items"],
  2619. referencedClasses: ["Dictionary"]
  2620. }),
  2621. smalltalk.HLListWidget);
  2622. smalltalk.addMethod(
  2623. smalltalk.method({
  2624. selector: "selectItem:",
  2625. category: 'actions',
  2626. fn: function (anObject){
  2627. var self=this;
  2628. return smalltalk.withContext(function($ctx1) {
  2629. _st(self)._selectedItem_(anObject);
  2630. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{anObject:anObject},smalltalk.HLListWidget)})},
  2631. args: ["anObject"],
  2632. source: "selectItem: anObject\x0a\x09self selectedItem: anObject",
  2633. messageSends: ["selectedItem:"],
  2634. referencedClasses: []
  2635. }),
  2636. smalltalk.HLListWidget);
  2637. smalltalk.addMethod(
  2638. smalltalk.method({
  2639. selector: "selectedItem",
  2640. category: 'accessing',
  2641. fn: function (){
  2642. var self=this;
  2643. return smalltalk.withContext(function($ctx1) {
  2644. var $1;
  2645. $1=self["@selectedItem"];
  2646. return $1;
  2647. }, function($ctx1) {$ctx1.fill(self,"selectedItem",{},smalltalk.HLListWidget)})},
  2648. args: [],
  2649. source: "selectedItem\x0a\x09^ selectedItem",
  2650. messageSends: [],
  2651. referencedClasses: []
  2652. }),
  2653. smalltalk.HLListWidget);
  2654. smalltalk.addMethod(
  2655. smalltalk.method({
  2656. selector: "selectedItem:",
  2657. category: 'accessing',
  2658. fn: function (anObject){
  2659. var self=this;
  2660. return smalltalk.withContext(function($ctx1) {
  2661. self["@selectedItem"]=anObject;
  2662. return self}, function($ctx1) {$ctx1.fill(self,"selectedItem:",{anObject:anObject},smalltalk.HLListWidget)})},
  2663. args: ["anObject"],
  2664. source: "selectedItem: anObject\x0a\x09selectedItem := anObject",
  2665. messageSends: [],
  2666. referencedClasses: []
  2667. }),
  2668. smalltalk.HLListWidget);
  2669. smalltalk.addMethod(
  2670. smalltalk.method({
  2671. selector: "setupKeyBindings",
  2672. category: 'events',
  2673. fn: function (){
  2674. var self=this;
  2675. var active,interval,delay,repeatInterval;
  2676. return smalltalk.withContext(function($ctx1) {
  2677. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11;
  2678. active=false;
  2679. repeatInterval=(70);
  2680. _st(_st(_st(self)._wrapper())._asJQuery())._unbind_("keydown");
  2681. _st(_st(_st(self)._wrapper())._asJQuery())._keydown_((function(e){
  2682. return smalltalk.withContext(function($ctx2) {
  2683. $1=_st(_st(_st(e)._which()).__eq((38)))._and_((function(){
  2684. return smalltalk.withContext(function($ctx3) {
  2685. return _st(active).__eq(false);
  2686. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2687. if(smalltalk.assert($1)){
  2688. active=true;
  2689. active;
  2690. _st(self)._activatePreviousListItem();
  2691. delay=_st((function(){
  2692. return smalltalk.withContext(function($ctx3) {
  2693. interval=_st((function(){
  2694. return smalltalk.withContext(function($ctx4) {
  2695. $2=_st(_st(_st(self)._wrapper())._asJQuery())._hasClass_(_st(self)._focusClass());
  2696. if(smalltalk.assert($2)){
  2697. return _st(self)._activatePreviousListItem();
  2698. } else {
  2699. active=false;
  2700. active;
  2701. $3=interval;
  2702. if(($receiver = $3) == nil || $receiver == undefined){
  2703. $3;
  2704. } else {
  2705. _st(interval)._clearInterval();
  2706. };
  2707. $4=delay;
  2708. if(($receiver = $4) == nil || $receiver == undefined){
  2709. return $4;
  2710. } else {
  2711. return _st(delay)._clearTimeout();
  2712. };
  2713. };
  2714. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}))._valueWithInterval_(repeatInterval);
  2715. return interval;
  2716. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._valueWithTimeout_((300));
  2717. delay;
  2718. };
  2719. $5=_st(_st(_st(e)._which()).__eq((40)))._and_((function(){
  2720. return smalltalk.withContext(function($ctx3) {
  2721. return _st(active).__eq(false);
  2722. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2723. if(smalltalk.assert($5)){
  2724. active=true;
  2725. active;
  2726. _st(self)._activateNextListItem();
  2727. delay=_st((function(){
  2728. return smalltalk.withContext(function($ctx3) {
  2729. interval=_st((function(){
  2730. return smalltalk.withContext(function($ctx4) {
  2731. $6=_st(_st(_st(self)._wrapper())._asJQuery())._hasClass_(_st(self)._focusClass());
  2732. if(smalltalk.assert($6)){
  2733. return _st(self)._activateNextListItem();
  2734. } else {
  2735. active=false;
  2736. active;
  2737. $7=interval;
  2738. if(($receiver = $7) == nil || $receiver == undefined){
  2739. $7;
  2740. } else {
  2741. _st(interval)._clearInterval();
  2742. };
  2743. $8=delay;
  2744. if(($receiver = $8) == nil || $receiver == undefined){
  2745. return $8;
  2746. } else {
  2747. return _st(delay)._clearTimeout();
  2748. };
  2749. };
  2750. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}))._valueWithInterval_(repeatInterval);
  2751. return interval;
  2752. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._valueWithTimeout_((300));
  2753. return delay;
  2754. };
  2755. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
  2756. _st(_st(_st(self)._wrapper())._asJQuery())._keyup_((function(e){
  2757. return smalltalk.withContext(function($ctx2) {
  2758. $9=active;
  2759. if(smalltalk.assert($9)){
  2760. active=false;
  2761. active;
  2762. $10=interval;
  2763. if(($receiver = $10) == nil || $receiver == undefined){
  2764. $10;
  2765. } else {
  2766. _st(interval)._clearInterval();
  2767. };
  2768. $11=delay;
  2769. if(($receiver = $11) == nil || $receiver == undefined){
  2770. return $11;
  2771. } else {
  2772. return _st(delay)._clearTimeout();
  2773. };
  2774. };
  2775. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
  2776. return self}, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{active:active,interval:interval,delay:delay,repeatInterval:repeatInterval},smalltalk.HLListWidget)})},
  2777. args: [],
  2778. source: "setupKeyBindings\x0a\x09\x22TODO: refactor this!\x22\x0a\x09\x0a\x09| active interval delay repeatInterval |\x0a\x09\x0a\x09active := false.\x0a\x09repeatInterval := 70.\x0a\x09self wrapper asJQuery unbind: 'keydown'.\x0a\x0a\x09self wrapper asJQuery keydown: [ :e |\x0a\x09\x09\x0a (e which = 38 and: [ active = false ]) ifTrue: [ \x0a\x09\x09\x09active := true.\x0a\x09\x09\x09self activatePreviousListItem.\x0a \x09delay := [\x0a\x09\x09\x09\x09interval := [\x0a\x09\x09\x09\x09\x09(self wrapper asJQuery hasClass: self focusClass)\x0a\x09\x09\x09\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09\x09\x09\x09self activatePreviousListItem ]\x0a\x09\x09\x09\x09\x09\x09ifFalse: [\x0a\x09\x09\x09\x09\x09\x09\x09active := false.\x0a\x09\x09\x09\x09\x09\x09\x09interval ifNotNil: [ interval clearInterval ].\x0a\x09\x09\x09\x09\x09\x09\x09delay ifNotNil: [ delay clearTimeout] ] ]\x0a\x09\x09\x09\x09\x09valueWithInterval: repeatInterval ]\x0a\x09\x09\x09\x09\x09\x09valueWithTimeout: 300 ].\x0a\x09\x09\x09\x0a \x09(e which = 40 and: [ active = false ]) ifTrue: [\x0a active := true.\x0a\x09\x09\x09self activateNextListItem.\x0a \x09delay := [\x0a\x09\x09\x09\x09interval := [ \x0a\x09\x09\x09\x09\x09(self wrapper asJQuery hasClass: self focusClass)\x0a\x09\x09\x09\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09\x09\x09\x09self activateNextListItem ]\x0a\x09\x09\x09\x09\x09\x09ifFalse: [\x0a\x09\x09\x09\x09\x09\x09\x09active := false.\x0a\x09\x09\x09\x09\x09\x09\x09interval ifNotNil: [ interval clearInterval ].\x0a\x09\x09\x09\x09\x09\x09\x09delay ifNotNil: [ delay clearTimeout] ] ]\x0a\x09\x09\x09\x09\x09valueWithInterval: repeatInterval ]\x0a\x09\x09\x09\x09\x09\x09valueWithTimeout: 300 ] ].\x0a\x09\x0a\x09self wrapper asJQuery keyup: [ :e |\x0a\x09\x09active ifTrue: [\x0a\x09\x09\x09active := false.\x0a\x09\x09\x09interval ifNotNil: [ interval clearInterval ].\x0a\x09\x09\x09delay ifNotNil: [ delay clearTimeout] ] ]",
  2779. messageSends: ["unbind:", "asJQuery", "wrapper", "keydown:", "ifTrue:", "activatePreviousListItem", "valueWithTimeout:", "valueWithInterval:", "ifTrue:ifFalse:", "ifNotNil:", "clearInterval", "clearTimeout", "hasClass:", "focusClass", "and:", "=", "which", "activateNextListItem", "keyup:"],
  2780. referencedClasses: []
  2781. }),
  2782. smalltalk.HLListWidget);
  2783. smalltalk.addClass('HLNavigationListWidget', smalltalk.HLListWidget, ['previous', 'next'], 'Helios-Core');
  2784. smalltalk.addMethod(
  2785. smalltalk.method({
  2786. selector: "next",
  2787. category: 'accessing',
  2788. fn: function (){
  2789. var self=this;
  2790. return smalltalk.withContext(function($ctx1) {
  2791. var $1;
  2792. $1=self["@next"];
  2793. return $1;
  2794. }, function($ctx1) {$ctx1.fill(self,"next",{},smalltalk.HLNavigationListWidget)})},
  2795. args: [],
  2796. source: "next\x0a\x09^ next",
  2797. messageSends: [],
  2798. referencedClasses: []
  2799. }),
  2800. smalltalk.HLNavigationListWidget);
  2801. smalltalk.addMethod(
  2802. smalltalk.method({
  2803. selector: "next:",
  2804. category: 'accessing',
  2805. fn: function (aWidget){
  2806. var self=this;
  2807. return smalltalk.withContext(function($ctx1) {
  2808. var $1;
  2809. self["@next"]=aWidget;
  2810. $1=_st(_st(aWidget)._previous()).__eq(self);
  2811. if(! smalltalk.assert($1)){
  2812. _st(aWidget)._previous_(self);
  2813. };
  2814. return self}, function($ctx1) {$ctx1.fill(self,"next:",{aWidget:aWidget},smalltalk.HLNavigationListWidget)})},
  2815. args: ["aWidget"],
  2816. source: "next: aWidget\x0a\x09next := aWidget.\x0a aWidget previous = self ifFalse: [ aWidget previous: self ]",
  2817. messageSends: ["ifFalse:", "previous:", "=", "previous"],
  2818. referencedClasses: []
  2819. }),
  2820. smalltalk.HLNavigationListWidget);
  2821. smalltalk.addMethod(
  2822. smalltalk.method({
  2823. selector: "nextFocus",
  2824. category: 'actions',
  2825. fn: function (){
  2826. var self=this;
  2827. return smalltalk.withContext(function($ctx1) {
  2828. var $1;
  2829. $1=_st(self)._next();
  2830. if(($receiver = $1) == nil || $receiver == undefined){
  2831. $1;
  2832. } else {
  2833. _st(_st(self)._next())._focus();
  2834. };
  2835. return self}, function($ctx1) {$ctx1.fill(self,"nextFocus",{},smalltalk.HLNavigationListWidget)})},
  2836. args: [],
  2837. source: "nextFocus\x0a\x09self next ifNotNil: [ self next focus ]",
  2838. messageSends: ["ifNotNil:", "focus", "next"],
  2839. referencedClasses: []
  2840. }),
  2841. smalltalk.HLNavigationListWidget);
  2842. smalltalk.addMethod(
  2843. smalltalk.method({
  2844. selector: "previous",
  2845. category: 'accessing',
  2846. fn: function (){
  2847. var self=this;
  2848. return smalltalk.withContext(function($ctx1) {
  2849. var $1;
  2850. $1=self["@previous"];
  2851. return $1;
  2852. }, function($ctx1) {$ctx1.fill(self,"previous",{},smalltalk.HLNavigationListWidget)})},
  2853. args: [],
  2854. source: "previous\x0a\x09^ previous",
  2855. messageSends: [],
  2856. referencedClasses: []
  2857. }),
  2858. smalltalk.HLNavigationListWidget);
  2859. smalltalk.addMethod(
  2860. smalltalk.method({
  2861. selector: "previous:",
  2862. category: 'accessing',
  2863. fn: function (aWidget){
  2864. var self=this;
  2865. return smalltalk.withContext(function($ctx1) {
  2866. var $1;
  2867. self["@previous"]=aWidget;
  2868. $1=_st(_st(aWidget)._next()).__eq(self);
  2869. if(! smalltalk.assert($1)){
  2870. _st(aWidget)._next_(self);
  2871. };
  2872. return self}, function($ctx1) {$ctx1.fill(self,"previous:",{aWidget:aWidget},smalltalk.HLNavigationListWidget)})},
  2873. args: ["aWidget"],
  2874. source: "previous: aWidget\x0a\x09previous := aWidget.\x0a aWidget next = self ifFalse: [ aWidget next: self ]",
  2875. messageSends: ["ifFalse:", "next:", "=", "next"],
  2876. referencedClasses: []
  2877. }),
  2878. smalltalk.HLNavigationListWidget);
  2879. smalltalk.addMethod(
  2880. smalltalk.method({
  2881. selector: "previousFocus",
  2882. category: 'actions',
  2883. fn: function (){
  2884. var self=this;
  2885. return smalltalk.withContext(function($ctx1) {
  2886. var $1;
  2887. $1=_st(self)._previous();
  2888. if(($receiver = $1) == nil || $receiver == undefined){
  2889. $1;
  2890. } else {
  2891. _st(_st(self)._previous())._focus();
  2892. };
  2893. return self}, function($ctx1) {$ctx1.fill(self,"previousFocus",{},smalltalk.HLNavigationListWidget)})},
  2894. args: [],
  2895. source: "previousFocus\x0a\x09self previous ifNotNil: [ self previous focus ]",
  2896. messageSends: ["ifNotNil:", "focus", "previous"],
  2897. referencedClasses: []
  2898. }),
  2899. smalltalk.HLNavigationListWidget);
  2900. smalltalk.addMethod(
  2901. smalltalk.method({
  2902. selector: "setupKeyBindings",
  2903. category: 'events',
  2904. fn: function (){
  2905. var self=this;
  2906. return smalltalk.withContext(function($ctx1) {
  2907. var $1,$2;
  2908. smalltalk.HLListWidget.fn.prototype._setupKeyBindings.apply(_st(self), []);
  2909. _st(_st(_st(self)._wrapper())._asJQuery())._keydown_((function(e){
  2910. return smalltalk.withContext(function($ctx2) {
  2911. $1=_st(_st(e)._which()).__eq((39));
  2912. if(smalltalk.assert($1)){
  2913. _st(self)._nextFocus();
  2914. };
  2915. $2=_st(_st(e)._which()).__eq((37));
  2916. if(smalltalk.assert($2)){
  2917. return _st(self)._previousFocus();
  2918. };
  2919. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
  2920. return self}, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},smalltalk.HLNavigationListWidget)})},
  2921. args: [],
  2922. source: "setupKeyBindings\x0a\x09super setupKeyBindings.\x0a\x0a\x09self wrapper asJQuery keydown: [ :e |\x0a e which = 39 ifTrue: [ \x0a \x09self nextFocus ].\x0a\x09\x09e which = 37 ifTrue: [ \x0a \x09self previousFocus ] ]",
  2923. messageSends: ["setupKeyBindings", "keydown:", "ifTrue:", "nextFocus", "=", "which", "previousFocus", "asJQuery", "wrapper"],
  2924. referencedClasses: []
  2925. }),
  2926. smalltalk.HLNavigationListWidget);
  2927. smalltalk.addClass('HLToolListWidget', smalltalk.HLNavigationListWidget, ['model'], 'Helios-Core');
  2928. smalltalk.addMethod(
  2929. smalltalk.method({
  2930. selector: "activateListItem:",
  2931. category: 'actions',
  2932. fn: function (anItem){
  2933. var self=this;
  2934. return smalltalk.withContext(function($ctx1) {
  2935. _st(_st(self)._model())._withChangesDo_((function(){
  2936. return smalltalk.withContext(function($ctx2) {
  2937. return smalltalk.HLNavigationListWidget.fn.prototype._activateListItem_.apply(_st(self), [anItem]);
  2938. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2939. return self}, function($ctx1) {$ctx1.fill(self,"activateListItem:",{anItem:anItem},smalltalk.HLToolListWidget)})},
  2940. args: ["anItem"],
  2941. source: "activateListItem: anItem\x0a\x09self model withChangesDo: [ super activateListItem: anItem ]",
  2942. messageSends: ["withChangesDo:", "activateListItem:", "model"],
  2943. referencedClasses: []
  2944. }),
  2945. smalltalk.HLToolListWidget);
  2946. smalltalk.addMethod(
  2947. smalltalk.method({
  2948. selector: "activateNextListItem",
  2949. category: 'actions',
  2950. fn: function (){
  2951. var self=this;
  2952. return smalltalk.withContext(function($ctx1) {
  2953. _st(_st(self)._model())._withChangesDo_((function(){
  2954. return smalltalk.withContext(function($ctx2) {
  2955. return smalltalk.HLNavigationListWidget.fn.prototype._activateNextListItem.apply(_st(self), []);
  2956. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2957. return self}, function($ctx1) {$ctx1.fill(self,"activateNextListItem",{},smalltalk.HLToolListWidget)})},
  2958. args: [],
  2959. source: "activateNextListItem\x0a\x09self model withChangesDo: [ super activateNextListItem ]",
  2960. messageSends: ["withChangesDo:", "activateNextListItem", "model"],
  2961. referencedClasses: []
  2962. }),
  2963. smalltalk.HLToolListWidget);
  2964. smalltalk.addMethod(
  2965. smalltalk.method({
  2966. selector: "activatePreviousListItem",
  2967. category: 'actions',
  2968. fn: function (){
  2969. var self=this;
  2970. return smalltalk.withContext(function($ctx1) {
  2971. _st(_st(self)._model())._withChangesDo_((function(){
  2972. return smalltalk.withContext(function($ctx2) {
  2973. return smalltalk.HLNavigationListWidget.fn.prototype._activatePreviousListItem.apply(_st(self), []);
  2974. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2975. return self}, function($ctx1) {$ctx1.fill(self,"activatePreviousListItem",{},smalltalk.HLToolListWidget)})},
  2976. args: [],
  2977. source: "activatePreviousListItem\x0a\x09self model withChangesDo: [ super activatePreviousListItem ]",
  2978. messageSends: ["withChangesDo:", "activatePreviousListItem", "model"],
  2979. referencedClasses: []
  2980. }),
  2981. smalltalk.HLToolListWidget);
  2982. smalltalk.addMethod(
  2983. smalltalk.method({
  2984. selector: "commandCategory",
  2985. category: 'accessing',
  2986. fn: function (){
  2987. var self=this;
  2988. return smalltalk.withContext(function($ctx1) {
  2989. var $1;
  2990. $1=_st(self)._label();
  2991. return $1;
  2992. }, function($ctx1) {$ctx1.fill(self,"commandCategory",{},smalltalk.HLToolListWidget)})},
  2993. args: [],
  2994. source: "commandCategory\x0a\x09^ self label",
  2995. messageSends: ["label"],
  2996. referencedClasses: []
  2997. }),
  2998. smalltalk.HLToolListWidget);
  2999. smalltalk.addMethod(
  3000. smalltalk.method({
  3001. selector: "label",
  3002. category: 'accessing',
  3003. fn: function (){
  3004. var self=this;
  3005. return smalltalk.withContext(function($ctx1) {
  3006. return "List";
  3007. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLToolListWidget)})},
  3008. args: [],
  3009. source: "label\x0a\x09^ 'List'",
  3010. messageSends: [],
  3011. referencedClasses: []
  3012. }),
  3013. smalltalk.HLToolListWidget);
  3014. smalltalk.addMethod(
  3015. smalltalk.method({
  3016. selector: "menuCommands",
  3017. category: 'accessing',
  3018. fn: function (){
  3019. var self=this;
  3020. function $HLToolCommand(){return smalltalk.HLToolCommand||(typeof HLToolCommand=="undefined"?nil:HLToolCommand)}
  3021. return smalltalk.withContext(function($ctx1) {
  3022. var $1;
  3023. $1=_st(_st(_st(_st($HLToolCommand())._concreteClasses())._select_((function(each){
  3024. return smalltalk.withContext(function($ctx2) {
  3025. return _st(each)._isValidFor_(_st(self)._model());
  3026. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._collect_((function(each){
  3027. return smalltalk.withContext(function($ctx2) {
  3028. return _st(each)._for_(_st(self)._model());
  3029. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._select_((function(each){
  3030. return smalltalk.withContext(function($ctx2) {
  3031. return _st(_st(_st(each)._category()).__eq(_st(self)._commandCategory()))._and_((function(){
  3032. return smalltalk.withContext(function($ctx3) {
  3033. return _st(_st(each)._isAction())._and_((function(){
  3034. return smalltalk.withContext(function($ctx4) {
  3035. return _st(each)._isActive();
  3036. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  3037. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  3038. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3039. return $1;
  3040. }, function($ctx1) {$ctx1.fill(self,"menuCommands",{},smalltalk.HLToolListWidget)})},
  3041. args: [],
  3042. source: "menuCommands\x0a\x09\x22Answer a collection of commands to be put in the cog menu\x22\x0a\x09\x0a\x09^ ((HLToolCommand concreteClasses\x0a\x09\x09select: [ :each | each isValidFor: self model ])\x0a\x09\x09\x09collect: [ :each | each for: self model ])\x0a\x09\x09\x09select: [ :each | \x0a\x09\x09\x09\x09each category = self commandCategory and: [ \x0a\x09\x09\x09\x09\x09each isAction and: [ each isActive ] ] ]",
  3043. messageSends: ["select:", "and:", "isActive", "isAction", "=", "commandCategory", "category", "collect:", "for:", "model", "isValidFor:", "concreteClasses"],
  3044. referencedClasses: ["HLToolCommand"]
  3045. }),
  3046. smalltalk.HLToolListWidget);
  3047. smalltalk.addMethod(
  3048. smalltalk.method({
  3049. selector: "model",
  3050. category: 'accessing',
  3051. fn: function (){
  3052. var self=this;
  3053. return smalltalk.withContext(function($ctx1) {
  3054. var $1;
  3055. $1=self["@model"];
  3056. return $1;
  3057. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLToolListWidget)})},
  3058. args: [],
  3059. source: "model\x0a\x09^ model",
  3060. messageSends: [],
  3061. referencedClasses: []
  3062. }),
  3063. smalltalk.HLToolListWidget);
  3064. smalltalk.addMethod(
  3065. smalltalk.method({
  3066. selector: "model:",
  3067. category: 'accessing',
  3068. fn: function (aBrowserModel){
  3069. var self=this;
  3070. return smalltalk.withContext(function($ctx1) {
  3071. var $1,$2;
  3072. self["@model"]=aBrowserModel;
  3073. $1=self;
  3074. _st($1)._observeSystem();
  3075. $2=_st($1)._observeModel();
  3076. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel},smalltalk.HLToolListWidget)})},
  3077. args: ["aBrowserModel"],
  3078. source: "model: aBrowserModel\x0a\x09model := aBrowserModel.\x0a \x0a self \x0a\x09\x09observeSystem;\x0a\x09\x09observeModel",
  3079. messageSends: ["observeSystem", "observeModel"],
  3080. referencedClasses: []
  3081. }),
  3082. smalltalk.HLToolListWidget);
  3083. smalltalk.addMethod(
  3084. smalltalk.method({
  3085. selector: "observeModel",
  3086. category: 'actions',
  3087. fn: function (){
  3088. var self=this;
  3089. return smalltalk.withContext(function($ctx1) {
  3090. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLToolListWidget)})},
  3091. args: [],
  3092. source: "observeModel",
  3093. messageSends: [],
  3094. referencedClasses: []
  3095. }),
  3096. smalltalk.HLToolListWidget);
  3097. smalltalk.addMethod(
  3098. smalltalk.method({
  3099. selector: "observeSystem",
  3100. category: 'actions',
  3101. fn: function (){
  3102. var self=this;
  3103. return smalltalk.withContext(function($ctx1) {
  3104. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLToolListWidget)})},
  3105. args: [],
  3106. source: "observeSystem",
  3107. messageSends: [],
  3108. referencedClasses: []
  3109. }),
  3110. smalltalk.HLToolListWidget);
  3111. smalltalk.addMethod(
  3112. smalltalk.method({
  3113. selector: "renderContentOn:",
  3114. category: 'rendering',
  3115. fn: function (html){
  3116. var self=this;
  3117. return smalltalk.withContext(function($ctx1) {
  3118. _st(self)._renderHeadOn_(html);
  3119. smalltalk.HLNavigationListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  3120. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLToolListWidget)})},
  3121. args: ["html"],
  3122. source: "renderContentOn: html\x0a\x09self renderHeadOn: html.\x09\x0a\x09super renderContentOn: html",
  3123. messageSends: ["renderHeadOn:", "renderContentOn:"],
  3124. referencedClasses: []
  3125. }),
  3126. smalltalk.HLToolListWidget);
  3127. smalltalk.addMethod(
  3128. smalltalk.method({
  3129. selector: "renderHeadOn:",
  3130. category: 'rendering',
  3131. fn: function (html){
  3132. var self=this;
  3133. return smalltalk.withContext(function($ctx1) {
  3134. var $1,$2;
  3135. $1=_st(html)._div();
  3136. _st($1)._class_("list-label");
  3137. $2=_st($1)._with_((function(){
  3138. return smalltalk.withContext(function($ctx2) {
  3139. _st(html)._with_(_st(self)._label());
  3140. return _st(self)._renderMenuOn_(html);
  3141. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3142. return self}, function($ctx1) {$ctx1.fill(self,"renderHeadOn:",{html:html},smalltalk.HLToolListWidget)})},
  3143. args: ["html"],
  3144. source: "renderHeadOn: html\x0a\x09html div \x0a\x09\x09class: 'list-label';\x0a\x09\x09with: [\x0a\x09\x09\x09html with: self label.\x0a\x09\x09\x09self renderMenuOn: html ]",
  3145. messageSends: ["class:", "div", "with:", "label", "renderMenuOn:"],
  3146. referencedClasses: []
  3147. }),
  3148. smalltalk.HLToolListWidget);
  3149. smalltalk.addMethod(
  3150. smalltalk.method({
  3151. selector: "renderMenuOn:",
  3152. category: 'rendering',
  3153. fn: function (html){
  3154. var self=this;
  3155. var commands;
  3156. return smalltalk.withContext(function($ctx1) {
  3157. var $1,$2,$3,$5,$6,$7,$9,$10,$8,$4;
  3158. commands=_st(self)._menuCommands();
  3159. $1=_st(commands)._isEmpty();
  3160. if(smalltalk.assert($1)){
  3161. $2=self;
  3162. return $2;
  3163. };
  3164. $3=_st(html)._div();
  3165. _st($3)._class_("btn-group cog");
  3166. $4=_st($3)._with_((function(){
  3167. return smalltalk.withContext(function($ctx2) {
  3168. $5=_st(html)._a();
  3169. _st($5)._class_("btn dropdown-toggle");
  3170. _st($5)._at_put_("data-toggle","dropdown");
  3171. $6=_st($5)._with_((function(){
  3172. return smalltalk.withContext(function($ctx3) {
  3173. return _st(_st(html)._tag_("i"))._class_("icon-cog");
  3174. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  3175. $6;
  3176. $7=_st(html)._ul();
  3177. _st($7)._class_("dropdown-menu pull-right");
  3178. $8=_st($7)._with_((function(){
  3179. return smalltalk.withContext(function($ctx3) {
  3180. return _st(_st(self)._menuCommands())._do_((function(each){
  3181. return smalltalk.withContext(function($ctx4) {
  3182. return _st(_st(html)._li())._with_((function(){
  3183. return smalltalk.withContext(function($ctx5) {
  3184. $9=_st(html)._a();
  3185. _st($9)._with_(_st(each)._menuLabel());
  3186. $10=_st($9)._onClick_((function(){
  3187. return smalltalk.withContext(function($ctx6) {
  3188. return _st(self)._execute_(each);
  3189. }, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}));
  3190. return $10;
  3191. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  3192. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})}));
  3193. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  3194. return $8;
  3195. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3196. return self}, function($ctx1) {$ctx1.fill(self,"renderMenuOn:",{html:html,commands:commands},smalltalk.HLToolListWidget)})},
  3197. args: ["html"],
  3198. source: "renderMenuOn: html\x0a\x09| commands |\x0a\x09\x0a\x09commands := self menuCommands.\x0a\x09commands isEmpty ifTrue: [ ^ self ].\x0a\x09\x0a\x09html div \x0a\x09\x09class: 'btn-group cog';\x0a\x09\x09with: [\x0a\x09\x09\x09html a\x0a\x09\x09\x09\x09class: 'btn dropdown-toggle';\x0a\x09\x09\x09\x09at: 'data-toggle' put: 'dropdown';\x0a\x09\x09\x09\x09with: [ (html tag: 'i') class: 'icon-cog' ].\x0a\x09\x09html ul \x0a\x09\x09\x09class: 'dropdown-menu pull-right';\x0a\x09\x09\x09with: [ \x0a\x09\x09\x09\x09self menuCommands do: [ :each | \x0a\x09\x09\x09\x09\x09html li with: [ html a \x0a\x09\x09\x09\x09\x09\x09with: each menuLabel;\x0a\x09\x09\x09\x09\x09\x09onClick: [ self execute: each ] ] ] ] ]",
  3199. messageSends: ["menuCommands", "ifTrue:", "isEmpty", "class:", "div", "with:", "a", "at:put:", "tag:", "ul", "do:", "menuLabel", "onClick:", "execute:", "li"],
  3200. referencedClasses: []
  3201. }),
  3202. smalltalk.HLToolListWidget);
  3203. smalltalk.addMethod(
  3204. smalltalk.method({
  3205. selector: "selectedItem:",
  3206. category: 'accessing',
  3207. fn: function (anItem){
  3208. var self=this;
  3209. return smalltalk.withContext(function($ctx1) {
  3210. smalltalk.HLNavigationListWidget.fn.prototype._selectedItem_.apply(_st(self), [anItem]);
  3211. _st(self)._updateMenu();
  3212. return self}, function($ctx1) {$ctx1.fill(self,"selectedItem:",{anItem:anItem},smalltalk.HLToolListWidget)})},
  3213. args: ["anItem"],
  3214. source: "selectedItem: anItem\x0a\x09\x22Selection changed, update the cog menu\x22\x0a\x09\x0a\x09super selectedItem: anItem.\x0a\x09self updateMenu",
  3215. messageSends: ["selectedItem:", "updateMenu"],
  3216. referencedClasses: []
  3217. }),
  3218. smalltalk.HLToolListWidget);
  3219. smalltalk.addMethod(
  3220. smalltalk.method({
  3221. selector: "unregister",
  3222. category: 'actions',
  3223. fn: function (){
  3224. var self=this;
  3225. return smalltalk.withContext(function($ctx1) {
  3226. smalltalk.HLNavigationListWidget.fn.prototype._unregister.apply(_st(self), []);
  3227. _st(_st(_st(self)._model())._announcer())._unsubscribe_(self);
  3228. _st(_st(_st(self)._model())._systemAnnouncer())._unsubscribe_(self);
  3229. return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLToolListWidget)})},
  3230. args: [],
  3231. source: "unregister\x0a\x09super unregister.\x0a\x09\x0a\x09self model announcer unsubscribe: self.\x0a\x09self model systemAnnouncer unsubscribe: self",
  3232. messageSends: ["unregister", "unsubscribe:", "announcer", "model", "systemAnnouncer"],
  3233. referencedClasses: []
  3234. }),
  3235. smalltalk.HLToolListWidget);
  3236. smalltalk.addMethod(
  3237. smalltalk.method({
  3238. selector: "updateMenu",
  3239. category: 'updating',
  3240. fn: function (){
  3241. var self=this;
  3242. return smalltalk.withContext(function($ctx1) {
  3243. _st(_st(_st(_st(self)._wrapper())._asJQuery())._find_(".cog"))._remove();
  3244. _st((function(html){
  3245. return smalltalk.withContext(function($ctx2) {
  3246. return _st(self)._renderMenuOn_(html);
  3247. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}))._appendToJQuery_(_st(_st(_st(self)._wrapper())._asJQuery())._find_(".list-label"));
  3248. return self}, function($ctx1) {$ctx1.fill(self,"updateMenu",{},smalltalk.HLToolListWidget)})},
  3249. args: [],
  3250. source: "updateMenu\x0a\x09(self wrapper asJQuery find: '.cog') remove.\x0a\x09\x0a\x09[ :html | self renderMenuOn: html ] \x0a\x09\x09appendToJQuery: (self wrapper asJQuery find: '.list-label')",
  3251. messageSends: ["remove", "find:", "asJQuery", "wrapper", "appendToJQuery:", "renderMenuOn:"],
  3252. referencedClasses: []
  3253. }),
  3254. smalltalk.HLToolListWidget);
  3255. smalltalk.addMethod(
  3256. smalltalk.method({
  3257. selector: "on:",
  3258. category: 'instance creation',
  3259. fn: function (aModel){
  3260. var self=this;
  3261. return smalltalk.withContext(function($ctx1) {
  3262. var $2,$3,$1;
  3263. $2=_st(self)._new();
  3264. _st($2)._model_(aModel);
  3265. $3=_st($2)._yourself();
  3266. $1=$3;
  3267. return $1;
  3268. }, function($ctx1) {$ctx1.fill(self,"on:",{aModel:aModel},smalltalk.HLToolListWidget.klass)})},
  3269. args: ["aModel"],
  3270. source: "on: aModel\x0a\x09^ self new \x0a \x09model: aModel;\x0a yourself",
  3271. messageSends: ["model:", "new", "yourself"],
  3272. referencedClasses: []
  3273. }),
  3274. smalltalk.HLToolListWidget.klass);
  3275. smalltalk.addClass('HLManager', smalltalk.HLWidget, ['tabs', 'activeTab', 'keyBinder', 'environment', 'history'], 'Helios-Core');
  3276. smalltalk.addMethod(
  3277. smalltalk.method({
  3278. selector: "activate:",
  3279. category: 'actions',
  3280. fn: function (aTab){
  3281. var self=this;
  3282. return smalltalk.withContext(function($ctx1) {
  3283. var $1,$2;
  3284. _st(_st(self)._keyBinder())._flushBindings();
  3285. _st(aTab)._registerBindings();
  3286. self["@activeTab"]=aTab;
  3287. $1=self;
  3288. _st($1)._refresh();
  3289. _st($1)._addToHistory_(aTab);
  3290. $2=_st($1)._show_(aTab);
  3291. return self}, function($ctx1) {$ctx1.fill(self,"activate:",{aTab:aTab},smalltalk.HLManager)})},
  3292. args: ["aTab"],
  3293. source: "activate: aTab\x0a\x09self keyBinder flushBindings.\x0a\x09aTab registerBindings.\x0a\x09activeTab := aTab.\x0a\x09\x0a\x09self \x0a\x09\x09refresh;\x0a\x09\x09addToHistory: aTab;\x0a\x09\x09show: aTab",
  3294. messageSends: ["flushBindings", "keyBinder", "registerBindings", "refresh", "addToHistory:", "show:"],
  3295. referencedClasses: []
  3296. }),
  3297. smalltalk.HLManager);
  3298. smalltalk.addMethod(
  3299. smalltalk.method({
  3300. selector: "activeTab",
  3301. category: 'accessing',
  3302. fn: function (){
  3303. var self=this;
  3304. return smalltalk.withContext(function($ctx1) {
  3305. var $1;
  3306. $1=self["@activeTab"];
  3307. return $1;
  3308. }, function($ctx1) {$ctx1.fill(self,"activeTab",{},smalltalk.HLManager)})},
  3309. args: [],
  3310. source: "activeTab\x0a\x09^ activeTab",
  3311. messageSends: [],
  3312. referencedClasses: []
  3313. }),
  3314. smalltalk.HLManager);
  3315. smalltalk.addMethod(
  3316. smalltalk.method({
  3317. selector: "addTab:",
  3318. category: 'actions',
  3319. fn: function (aTab){
  3320. var self=this;
  3321. return smalltalk.withContext(function($ctx1) {
  3322. _st(_st(self)._tabs())._add_(aTab);
  3323. _st(self)._activate_(aTab);
  3324. return self}, function($ctx1) {$ctx1.fill(self,"addTab:",{aTab:aTab},smalltalk.HLManager)})},
  3325. args: ["aTab"],
  3326. source: "addTab: aTab\x0a\x09self tabs add: aTab.\x0a self activate: aTab",
  3327. messageSends: ["add:", "tabs", "activate:"],
  3328. referencedClasses: []
  3329. }),
  3330. smalltalk.HLManager);
  3331. smalltalk.addMethod(
  3332. smalltalk.method({
  3333. selector: "addToHistory:",
  3334. category: 'actions',
  3335. fn: function (aTab){
  3336. var self=this;
  3337. return smalltalk.withContext(function($ctx1) {
  3338. _st(self)._removeFromHistory_(aTab);
  3339. _st(_st(self)._history())._add_(aTab);
  3340. return self}, function($ctx1) {$ctx1.fill(self,"addToHistory:",{aTab:aTab},smalltalk.HLManager)})},
  3341. args: ["aTab"],
  3342. source: "addToHistory: aTab\x0a\x09self removeFromHistory: aTab.\x0a\x09self history add: aTab",
  3343. messageSends: ["removeFromHistory:", "add:", "history"],
  3344. referencedClasses: []
  3345. }),
  3346. smalltalk.HLManager);
  3347. smalltalk.addMethod(
  3348. smalltalk.method({
  3349. selector: "confirm:ifFalse:",
  3350. category: 'actions',
  3351. fn: function (aString,aBlock){
  3352. var self=this;
  3353. function $HLConfirmation(){return smalltalk.HLConfirmation||(typeof HLConfirmation=="undefined"?nil:HLConfirmation)}
  3354. return smalltalk.withContext(function($ctx1) {
  3355. var $1,$2;
  3356. $1=_st($HLConfirmation())._new();
  3357. _st($1)._confirmationString_(aString);
  3358. _st($1)._cancelBlock_(aBlock);
  3359. $2=_st($1)._yourself();
  3360. _st($2)._appendToJQuery_(_st("body")._asJQuery());
  3361. return self}, function($ctx1) {$ctx1.fill(self,"confirm:ifFalse:",{aString:aString,aBlock:aBlock},smalltalk.HLManager)})},
  3362. args: ["aString", "aBlock"],
  3363. source: "confirm: aString ifFalse: aBlock\x0a\x09(HLConfirmation new\x0a\x09\x09confirmationString: aString;\x0a\x09\x09cancelBlock: aBlock;\x0a\x09\x09yourself)\x0a\x09\x09\x09appendToJQuery: 'body' asJQuery",
  3364. messageSends: ["appendToJQuery:", "asJQuery", "confirmationString:", "new", "cancelBlock:", "yourself"],
  3365. referencedClasses: ["HLConfirmation"]
  3366. }),
  3367. smalltalk.HLManager);
  3368. smalltalk.addMethod(
  3369. smalltalk.method({
  3370. selector: "confirm:ifTrue:",
  3371. category: 'actions',
  3372. fn: function (aString,aBlock){
  3373. var self=this;
  3374. function $HLConfirmation(){return smalltalk.HLConfirmation||(typeof HLConfirmation=="undefined"?nil:HLConfirmation)}
  3375. return smalltalk.withContext(function($ctx1) {
  3376. var $1,$2;
  3377. $1=_st($HLConfirmation())._new();
  3378. _st($1)._confirmationString_(aString);
  3379. _st($1)._actionBlock_(aBlock);
  3380. $2=_st($1)._yourself();
  3381. _st($2)._appendToJQuery_(_st("body")._asJQuery());
  3382. return self}, function($ctx1) {$ctx1.fill(self,"confirm:ifTrue:",{aString:aString,aBlock:aBlock},smalltalk.HLManager)})},
  3383. args: ["aString", "aBlock"],
  3384. source: "confirm: aString ifTrue: aBlock\x0a\x09(HLConfirmation new\x0a\x09\x09confirmationString: aString;\x0a\x09\x09actionBlock: aBlock;\x0a\x09\x09yourself)\x0a\x09\x09\x09appendToJQuery: 'body' asJQuery",
  3385. messageSends: ["appendToJQuery:", "asJQuery", "confirmationString:", "new", "actionBlock:", "yourself"],
  3386. referencedClasses: ["HLConfirmation"]
  3387. }),
  3388. smalltalk.HLManager);
  3389. smalltalk.addMethod(
  3390. smalltalk.method({
  3391. selector: "defaultEnvironment",
  3392. category: 'defaults',
  3393. fn: function (){
  3394. var self=this;
  3395. function $Environment(){return smalltalk.Environment||(typeof Environment=="undefined"?nil:Environment)}
  3396. return smalltalk.withContext(function($ctx1) {
  3397. var $1,$2,$3;
  3398. $1=_st(window)._parent();
  3399. if(($receiver = $1) == nil || $receiver == undefined){
  3400. $2=_st($Environment())._new();
  3401. return $2;
  3402. } else {
  3403. $1;
  3404. };
  3405. $3=_st(_st(_st(_st(window)._parent())._at_("smalltalk"))._at_("Environment"))._new();
  3406. return $3;
  3407. }, function($ctx1) {$ctx1.fill(self,"defaultEnvironment",{},smalltalk.HLManager)})},
  3408. args: [],
  3409. source: "defaultEnvironment\x0a\x09\x22If helios is loaded from within a frame, answer the parent window environment\x22\x0a\x09\x0a\x09window parent ifNil: [ ^ Environment new ].\x0a\x09\x0a\x09^ ((window parent at: 'smalltalk')\x0a\x09\x09at: 'Environment') new",
  3410. messageSends: ["ifNil:", "new", "parent", "at:"],
  3411. referencedClasses: ["Environment"]
  3412. }),
  3413. smalltalk.HLManager);
  3414. smalltalk.addMethod(
  3415. smalltalk.method({
  3416. selector: "environment",
  3417. category: 'accessing',
  3418. fn: function (){
  3419. var self=this;
  3420. return smalltalk.withContext(function($ctx1) {
  3421. var $2,$1;
  3422. $2=self["@environment"];
  3423. if(($receiver = $2) == nil || $receiver == undefined){
  3424. self["@environment"]=_st(self)._defaultEnvironment();
  3425. $1=self["@environment"];
  3426. } else {
  3427. $1=$2;
  3428. };
  3429. return $1;
  3430. }, function($ctx1) {$ctx1.fill(self,"environment",{},smalltalk.HLManager)})},
  3431. args: [],
  3432. source: "environment\x0a\x09\x22The default environment used by all Helios objects\x22\x0a \x0a\x09^ environment ifNil: [ environment := self defaultEnvironment ]",
  3433. messageSends: ["ifNil:", "defaultEnvironment"],
  3434. referencedClasses: []
  3435. }),
  3436. smalltalk.HLManager);
  3437. smalltalk.addMethod(
  3438. smalltalk.method({
  3439. selector: "environment:",
  3440. category: 'accessing',
  3441. fn: function (anEnvironment){
  3442. var self=this;
  3443. return smalltalk.withContext(function($ctx1) {
  3444. self["@environment"]=anEnvironment;
  3445. return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment},smalltalk.HLManager)})},
  3446. args: ["anEnvironment"],
  3447. source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
  3448. messageSends: [],
  3449. referencedClasses: []
  3450. }),
  3451. smalltalk.HLManager);
  3452. smalltalk.addMethod(
  3453. smalltalk.method({
  3454. selector: "history",
  3455. category: 'accessing',
  3456. fn: function (){
  3457. var self=this;
  3458. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  3459. return smalltalk.withContext(function($ctx1) {
  3460. var $2,$1;
  3461. $2=self["@history"];
  3462. if(($receiver = $2) == nil || $receiver == undefined){
  3463. self["@history"]=_st($OrderedCollection())._new();
  3464. $1=self["@history"];
  3465. } else {
  3466. $1=$2;
  3467. };
  3468. return $1;
  3469. }, function($ctx1) {$ctx1.fill(self,"history",{},smalltalk.HLManager)})},
  3470. args: [],
  3471. source: "history\x0a\x09^ history ifNil: [ history := OrderedCollection new ]",
  3472. messageSends: ["ifNil:", "new"],
  3473. referencedClasses: ["OrderedCollection"]
  3474. }),
  3475. smalltalk.HLManager);
  3476. smalltalk.addMethod(
  3477. smalltalk.method({
  3478. selector: "history:",
  3479. category: 'accessing',
  3480. fn: function (aCollection){
  3481. var self=this;
  3482. return smalltalk.withContext(function($ctx1) {
  3483. self["@history"]=aCollection;
  3484. return self}, function($ctx1) {$ctx1.fill(self,"history:",{aCollection:aCollection},smalltalk.HLManager)})},
  3485. args: ["aCollection"],
  3486. source: "history: aCollection\x0a\x09history := aCollection",
  3487. messageSends: [],
  3488. referencedClasses: []
  3489. }),
  3490. smalltalk.HLManager);
  3491. smalltalk.addMethod(
  3492. smalltalk.method({
  3493. selector: "initialize",
  3494. category: 'initialization',
  3495. fn: function (){
  3496. var self=this;
  3497. return smalltalk.withContext(function($ctx1) {
  3498. smalltalk.HLWidget.fn.prototype._initialize.apply(_st(self), []);
  3499. _st(_st(self)._keyBinder())._setupEvents();
  3500. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLManager)})},
  3501. args: [],
  3502. source: "initialize\x0a\x09super initialize.\x0a self keyBinder setupEvents",
  3503. messageSends: ["initialize", "setupEvents", "keyBinder"],
  3504. referencedClasses: []
  3505. }),
  3506. smalltalk.HLManager);
  3507. smalltalk.addMethod(
  3508. smalltalk.method({
  3509. selector: "keyBinder",
  3510. category: 'accessing',
  3511. fn: function (){
  3512. var self=this;
  3513. function $HLKeyBinder(){return smalltalk.HLKeyBinder||(typeof HLKeyBinder=="undefined"?nil:HLKeyBinder)}
  3514. return smalltalk.withContext(function($ctx1) {
  3515. var $2,$1;
  3516. $2=self["@keyBinder"];
  3517. if(($receiver = $2) == nil || $receiver == undefined){
  3518. self["@keyBinder"]=_st($HLKeyBinder())._new();
  3519. $1=self["@keyBinder"];
  3520. } else {
  3521. $1=$2;
  3522. };
  3523. return $1;
  3524. }, function($ctx1) {$ctx1.fill(self,"keyBinder",{},smalltalk.HLManager)})},
  3525. args: [],
  3526. source: "keyBinder\x0a\x09^ keyBinder ifNil: [ keyBinder := HLKeyBinder new ]",
  3527. messageSends: ["ifNil:", "new"],
  3528. referencedClasses: ["HLKeyBinder"]
  3529. }),
  3530. smalltalk.HLManager);
  3531. smalltalk.addMethod(
  3532. smalltalk.method({
  3533. selector: "refresh",
  3534. category: 'rendering',
  3535. fn: function (){
  3536. var self=this;
  3537. return smalltalk.withContext(function($ctx1) {
  3538. _st(_st(window)._jQuery_(".navbar"))._remove();
  3539. _st(self)._appendToJQuery_(_st("body")._asJQuery());
  3540. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLManager)})},
  3541. args: [],
  3542. source: "refresh\x0a\x09(window jQuery: '.navbar') remove.\x0a\x09self appendToJQuery: 'body' asJQuery",
  3543. messageSends: ["remove", "jQuery:", "appendToJQuery:", "asJQuery"],
  3544. referencedClasses: []
  3545. }),
  3546. smalltalk.HLManager);
  3547. smalltalk.addMethod(
  3548. smalltalk.method({
  3549. selector: "removeActiveTab",
  3550. category: 'actions',
  3551. fn: function (){
  3552. var self=this;
  3553. return smalltalk.withContext(function($ctx1) {
  3554. _st(self)._removeTab_(_st(self)._activeTab());
  3555. return self}, function($ctx1) {$ctx1.fill(self,"removeActiveTab",{},smalltalk.HLManager)})},
  3556. args: [],
  3557. source: "removeActiveTab\x0a\x09self removeTab: self activeTab",
  3558. messageSends: ["removeTab:", "activeTab"],
  3559. referencedClasses: []
  3560. }),
  3561. smalltalk.HLManager);
  3562. smalltalk.addMethod(
  3563. smalltalk.method({
  3564. selector: "removeFromHistory:",
  3565. category: 'actions',
  3566. fn: function (aTab){
  3567. var self=this;
  3568. return smalltalk.withContext(function($ctx1) {
  3569. _st(self)._history_(_st(_st(self)._history())._reject_((function(each){
  3570. return smalltalk.withContext(function($ctx2) {
  3571. return _st(each).__eq_eq(aTab);
  3572. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})));
  3573. return self}, function($ctx1) {$ctx1.fill(self,"removeFromHistory:",{aTab:aTab},smalltalk.HLManager)})},
  3574. args: ["aTab"],
  3575. source: "removeFromHistory: aTab\x0a\x09self history: (self history reject: [ :each | each == aTab ])",
  3576. messageSends: ["history:", "reject:", "==", "history"],
  3577. referencedClasses: []
  3578. }),
  3579. smalltalk.HLManager);
  3580. smalltalk.addMethod(
  3581. smalltalk.method({
  3582. selector: "removeTab:",
  3583. category: 'actions',
  3584. fn: function (aTab){
  3585. var self=this;
  3586. return smalltalk.withContext(function($ctx1) {
  3587. var $1,$2;
  3588. $1=_st(_st(self)._tabs())._includes_(aTab);
  3589. if(! smalltalk.assert($1)){
  3590. $2=self;
  3591. return $2;
  3592. };
  3593. _st(self)._removeFromHistory_(aTab);
  3594. _st(_st(self)._tabs())._remove_(aTab);
  3595. _st(_st(self)._keyBinder())._flushBindings();
  3596. _st(aTab)._remove();
  3597. _st(self)._refresh();
  3598. _st(_st(self)._history())._ifNotEmpty_((function(){
  3599. return smalltalk.withContext(function($ctx2) {
  3600. return _st(_st(_st(self)._history())._last())._activate();
  3601. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3602. return self}, function($ctx1) {$ctx1.fill(self,"removeTab:",{aTab:aTab},smalltalk.HLManager)})},
  3603. args: ["aTab"],
  3604. source: "removeTab: aTab\x0a\x09(self tabs includes: aTab) ifFalse: [ ^ self ].\x0a\x0a\x09self removeFromHistory: aTab.\x0a\x09self tabs remove: aTab.\x0a\x09self keyBinder flushBindings.\x0a\x09aTab remove.\x0a\x09self refresh.\x0a\x09self history ifNotEmpty: [\x0a\x09\x09self history last activate ]",
  3605. messageSends: ["ifFalse:", "includes:", "tabs", "removeFromHistory:", "remove:", "flushBindings", "keyBinder", "remove", "refresh", "ifNotEmpty:", "activate", "last", "history"],
  3606. referencedClasses: []
  3607. }),
  3608. smalltalk.HLManager);
  3609. smalltalk.addMethod(
  3610. smalltalk.method({
  3611. selector: "renderAddOn:",
  3612. category: 'rendering',
  3613. fn: function (html){
  3614. var self=this;
  3615. function $HLWidget(){return smalltalk.HLWidget||(typeof HLWidget=="undefined"?nil:HLWidget)}
  3616. return smalltalk.withContext(function($ctx1) {
  3617. var $1,$3,$4,$5,$7,$8,$6,$2;
  3618. $1=_st(html)._li();
  3619. _st($1)._class_("dropdown");
  3620. $2=_st($1)._with_((function(){
  3621. return smalltalk.withContext(function($ctx2) {
  3622. $3=_st(html)._a();
  3623. _st($3)._class_("dropdown-toggle");
  3624. _st($3)._at_put_("data-toggle","dropdown");
  3625. $4=_st($3)._with_((function(){
  3626. return smalltalk.withContext(function($ctx3) {
  3627. _st(html)._with_("Open...");
  3628. return _st(_st(html)._tag_("b"))._class_("caret");
  3629. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  3630. $4;
  3631. $5=_st(html)._ul();
  3632. _st($5)._class_("dropdown-menu");
  3633. $6=_st($5)._with_((function(){
  3634. return smalltalk.withContext(function($ctx3) {
  3635. return _st(_st(_st(_st($HLWidget())._withAllSubclasses())._select_((function(each){
  3636. return smalltalk.withContext(function($ctx4) {
  3637. return _st(each)._canBeOpenAsTab();
  3638. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})})))._sorted_((function(a,b){
  3639. return smalltalk.withContext(function($ctx4) {
  3640. return _st(_st(a)._tabPriority()).__lt(_st(b)._tabPriority());
  3641. }, function($ctx4) {$ctx4.fillBlock({a:a,b:b},$ctx1)})})))._do_((function(each){
  3642. return smalltalk.withContext(function($ctx4) {
  3643. return _st(_st(html)._li())._with_((function(){
  3644. return smalltalk.withContext(function($ctx5) {
  3645. $7=_st(html)._a();
  3646. _st($7)._with_(_st(each)._tabLabel());
  3647. $8=_st($7)._onClick_((function(){
  3648. return smalltalk.withContext(function($ctx6) {
  3649. return _st(each)._openAsTab();
  3650. }, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}));
  3651. return $8;
  3652. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  3653. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})}));
  3654. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  3655. return $6;
  3656. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3657. return self}, function($ctx1) {$ctx1.fill(self,"renderAddOn:",{html:html},smalltalk.HLManager)})},
  3658. args: ["html"],
  3659. source: "renderAddOn: html\x0a html li \x0a \x09class: 'dropdown';\x0a with: [ \x0a\x09\x09\x09html a \x0a \x09\x09class: 'dropdown-toggle';\x0a \x09 \x09at: 'data-toggle' put: 'dropdown';\x0a \x09with: [ \x0a \x09\x09html with: 'Open...'.\x0a \x09\x09\x09\x09\x09(html tag: 'b') class: 'caret' ].\x0a html ul \x0a \x09\x09class: 'dropdown-menu';\x0a with: [\x0a \x09((HLWidget withAllSubclasses\x0a \x09select: [ :each | each canBeOpenAsTab ])\x0a sorted: [ :a :b | a tabPriority < b tabPriority ])\x0a do: [ :each |\x0a \x09\x09\x09\x09\x09\x09\x09html li with: [\x0a \x09\x09\x09html a \x0a \x09with: each tabLabel;\x0a \x09\x09\x09\x09\x09\x09\x09\x09onClick: [ each openAsTab ] ] ] ] ]",
  3660. messageSends: ["class:", "li", "with:", "a", "at:put:", "tag:", "ul", "do:", "tabLabel", "onClick:", "openAsTab", "sorted:", "<", "tabPriority", "select:", "canBeOpenAsTab", "withAllSubclasses"],
  3661. referencedClasses: ["HLWidget"]
  3662. }),
  3663. smalltalk.HLManager);
  3664. smalltalk.addMethod(
  3665. smalltalk.method({
  3666. selector: "renderContentOn:",
  3667. category: 'rendering',
  3668. fn: function (html){
  3669. var self=this;
  3670. return smalltalk.withContext(function($ctx1) {
  3671. var $1,$3,$4,$2;
  3672. $1=_st(html)._div();
  3673. _st($1)._class_("navbar navbar-fixed-top");
  3674. $2=_st($1)._with_((function(){
  3675. return smalltalk.withContext(function($ctx2) {
  3676. $3=_st(html)._div();
  3677. _st($3)._class_("navbar-inner");
  3678. $4=_st($3)._with_((function(){
  3679. return smalltalk.withContext(function($ctx3) {
  3680. return _st(self)._renderTabsOn_(html);
  3681. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  3682. return $4;
  3683. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3684. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLManager)})},
  3685. args: ["html"],
  3686. source: "renderContentOn: html\x0a\x09html div \x0a\x09\x09class: 'navbar navbar-fixed-top';\x0a\x09\x09with: [ html div \x0a\x09\x09\x09class: 'navbar-inner';\x0a\x09\x09\x09with: [ self renderTabsOn: html ] ]",
  3687. messageSends: ["class:", "div", "with:", "renderTabsOn:"],
  3688. referencedClasses: []
  3689. }),
  3690. smalltalk.HLManager);
  3691. smalltalk.addMethod(
  3692. smalltalk.method({
  3693. selector: "renderTabsOn:",
  3694. category: 'rendering',
  3695. fn: function (html){
  3696. var self=this;
  3697. return smalltalk.withContext(function($ctx1) {
  3698. var $1,$3,$4,$6,$5,$8,$9,$7,$2;
  3699. $1=_st(html)._ul();
  3700. _st($1)._class_("nav");
  3701. $2=_st($1)._with_((function(){
  3702. return smalltalk.withContext(function($ctx2) {
  3703. _st(_st(self)._tabs())._do_((function(each){
  3704. return smalltalk.withContext(function($ctx3) {
  3705. $3=_st(html)._li();
  3706. $4=$3;
  3707. $6=_st(each)._isActive();
  3708. if(smalltalk.assert($6)){
  3709. $5="active";
  3710. } else {
  3711. $5="inactive";
  3712. };
  3713. _st($4)._class_($5);
  3714. $7=_st($3)._with_((function(){
  3715. return smalltalk.withContext(function($ctx4) {
  3716. $8=_st(html)._a();
  3717. _st($8)._with_((function(){
  3718. return smalltalk.withContext(function($ctx5) {
  3719. _st(_st(_st(html)._tag_("i"))._class_("icon-remove"))._onClick_((function(){
  3720. return smalltalk.withContext(function($ctx6) {
  3721. return _st(self)._removeTab_(each);
  3722. }, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}));
  3723. return _st(html)._with_(_st(each)._displayLabel());
  3724. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  3725. $9=_st($8)._onClick_((function(){
  3726. return smalltalk.withContext(function($ctx5) {
  3727. return _st(each)._activate();
  3728. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  3729. return $9;
  3730. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  3731. return $7;
  3732. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  3733. return _st(self)._renderAddOn_(html);
  3734. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3735. return self}, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html},smalltalk.HLManager)})},
  3736. args: ["html"],
  3737. source: "renderTabsOn: html\x0a\x09html ul \x0a\x09\x09class: 'nav';\x0a\x09\x09with: [ \x0a \x09self tabs do: [ :each |\x0a\x09\x09\x09\x09html li \x0a\x09\x09\x09\x09\x09class: (each isActive ifTrue: [ 'active' ] ifFalse: [ 'inactive' ]);\x0a\x09\x09\x09\x09\x09with: [\x0a\x09\x09\x09\x09\x09\x09html a\x0a\x09\x09\x09\x09\x09\x09\x09with: [\x0a \x09\x09\x09\x09\x09\x09\x09((html tag: 'i') class: 'icon-remove')\x0a \x09\x09\x09\x09\x09\x09\x09\x09\x09onClick: [ self removeTab: each ].\x0a \x09html with: each displayLabel ];\x0a\x09\x09\x09\x09\x09\x09\x09onClick: [ each activate ] ] ].\x0a\x09\x09\x09self renderAddOn: html ]",
  3738. messageSends: ["class:", "ul", "with:", "do:", "ifTrue:ifFalse:", "isActive", "li", "onClick:", "removeTab:", "tag:", "displayLabel", "a", "activate", "tabs", "renderAddOn:"],
  3739. referencedClasses: []
  3740. }),
  3741. smalltalk.HLManager);
  3742. smalltalk.addMethod(
  3743. smalltalk.method({
  3744. selector: "request:do:",
  3745. category: 'actions',
  3746. fn: function (aString,aBlock){
  3747. var self=this;
  3748. return smalltalk.withContext(function($ctx1) {
  3749. _st(self)._request_value_do_(aString,"",aBlock);
  3750. return self}, function($ctx1) {$ctx1.fill(self,"request:do:",{aString:aString,aBlock:aBlock},smalltalk.HLManager)})},
  3751. args: ["aString", "aBlock"],
  3752. source: "request: aString do: aBlock\x0a\x09self \x0a\x09\x09request: aString\x0a\x09\x09value: ''\x0a\x09\x09do: aBlock",
  3753. messageSends: ["request:value:do:"],
  3754. referencedClasses: []
  3755. }),
  3756. smalltalk.HLManager);
  3757. smalltalk.addMethod(
  3758. smalltalk.method({
  3759. selector: "request:value:do:",
  3760. category: 'actions',
  3761. fn: function (aString,valueString,aBlock){
  3762. var self=this;
  3763. function $HLRequest(){return smalltalk.HLRequest||(typeof HLRequest=="undefined"?nil:HLRequest)}
  3764. return smalltalk.withContext(function($ctx1) {
  3765. var $1,$2;
  3766. $1=_st($HLRequest())._new();
  3767. _st($1)._confirmationString_(aString);
  3768. _st($1)._actionBlock_(aBlock);
  3769. _st($1)._value_(valueString);
  3770. $2=_st($1)._yourself();
  3771. _st($2)._appendToJQuery_(_st("body")._asJQuery());
  3772. return self}, function($ctx1) {$ctx1.fill(self,"request:value:do:",{aString:aString,valueString:valueString,aBlock:aBlock},smalltalk.HLManager)})},
  3773. args: ["aString", "valueString", "aBlock"],
  3774. source: "request: aString value: valueString do: aBlock\x0a\x09(HLRequest new\x0a\x09\x09confirmationString: aString;\x0a\x09\x09actionBlock: aBlock;\x0a\x09\x09value: valueString;\x0a\x09\x09yourself)\x0a\x09\x09\x09appendToJQuery: 'body' asJQuery",
  3775. messageSends: ["appendToJQuery:", "asJQuery", "confirmationString:", "new", "actionBlock:", "value:", "yourself"],
  3776. referencedClasses: ["HLRequest"]
  3777. }),
  3778. smalltalk.HLManager);
  3779. smalltalk.addMethod(
  3780. smalltalk.method({
  3781. selector: "show:",
  3782. category: 'rendering',
  3783. fn: function (aTab){
  3784. var self=this;
  3785. return smalltalk.withContext(function($ctx1) {
  3786. var $1,$2;
  3787. _st(_st(self)._tabs())._do_((function(each){
  3788. return smalltalk.withContext(function($ctx2) {
  3789. return _st(each)._hide();
  3790. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3791. $1=aTab;
  3792. _st($1)._show();
  3793. $2=_st($1)._focus();
  3794. return self}, function($ctx1) {$ctx1.fill(self,"show:",{aTab:aTab},smalltalk.HLManager)})},
  3795. args: ["aTab"],
  3796. source: "show: aTab\x0a\x09self tabs do: [ :each | each hide ].\x0a\x09aTab show; focus",
  3797. messageSends: ["do:", "hide", "tabs", "show", "focus"],
  3798. referencedClasses: []
  3799. }),
  3800. smalltalk.HLManager);
  3801. smalltalk.addMethod(
  3802. smalltalk.method({
  3803. selector: "tabs",
  3804. category: 'accessing',
  3805. fn: function (){
  3806. var self=this;
  3807. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  3808. return smalltalk.withContext(function($ctx1) {
  3809. var $2,$1;
  3810. $2=self["@tabs"];
  3811. if(($receiver = $2) == nil || $receiver == undefined){
  3812. self["@tabs"]=_st($OrderedCollection())._new();
  3813. $1=self["@tabs"];
  3814. } else {
  3815. $1=$2;
  3816. };
  3817. return $1;
  3818. }, function($ctx1) {$ctx1.fill(self,"tabs",{},smalltalk.HLManager)})},
  3819. args: [],
  3820. source: "tabs\x0a\x09^ tabs ifNil: [ tabs := OrderedCollection new ]",
  3821. messageSends: ["ifNil:", "new"],
  3822. referencedClasses: ["OrderedCollection"]
  3823. }),
  3824. smalltalk.HLManager);
  3825. smalltalk.HLManager.klass.iVarNames = ['current'];
  3826. smalltalk.addMethod(
  3827. smalltalk.method({
  3828. selector: "current",
  3829. category: 'accessing',
  3830. fn: function (){
  3831. var self=this;
  3832. return smalltalk.withContext(function($ctx1) {
  3833. var $2,$1;
  3834. $2=self["@current"];
  3835. if(($receiver = $2) == nil || $receiver == undefined){
  3836. self["@current"]=_st(_st(self)._basicNew())._initialize();
  3837. $1=self["@current"];
  3838. } else {
  3839. $1=$2;
  3840. };
  3841. return $1;
  3842. }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.HLManager.klass)})},
  3843. args: [],
  3844. source: "current\x0a\x09^ current ifNil: [ current := self basicNew initialize ]",
  3845. messageSends: ["ifNil:", "initialize", "basicNew"],
  3846. referencedClasses: []
  3847. }),
  3848. smalltalk.HLManager.klass);
  3849. smalltalk.addMethod(
  3850. smalltalk.method({
  3851. selector: "initialize",
  3852. category: 'initialization',
  3853. fn: function (){
  3854. var self=this;
  3855. return smalltalk.withContext(function($ctx1) {
  3856. _st(_st(self)._current())._appendToJQuery_(_st("body")._asJQuery());
  3857. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLManager.klass)})},
  3858. args: [],
  3859. source: "initialize\x0a\x09self current appendToJQuery: 'body' asJQuery",
  3860. messageSends: ["appendToJQuery:", "asJQuery", "current"],
  3861. referencedClasses: []
  3862. }),
  3863. smalltalk.HLManager.klass);
  3864. smalltalk.addMethod(
  3865. smalltalk.method({
  3866. selector: "new",
  3867. category: 'instance creation',
  3868. fn: function (){
  3869. var self=this;
  3870. return smalltalk.withContext(function($ctx1) {
  3871. _st(self)._shouldNotImplement();
  3872. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.HLManager.klass)})},
  3873. args: [],
  3874. source: "new\x0a\x09\x22Use current instead\x22\x0a\x0a\x09self shouldNotImplement",
  3875. messageSends: ["shouldNotImplement"],
  3876. referencedClasses: []
  3877. }),
  3878. smalltalk.HLManager.klass);
  3879. smalltalk.addClass('HLSUnit', smalltalk.HLWidget, [], 'Helios-Core');
  3880. smalltalk.addMethod(
  3881. smalltalk.method({
  3882. selector: "canBeOpenAsTab",
  3883. category: 'testing',
  3884. fn: function (){
  3885. var self=this;
  3886. return smalltalk.withContext(function($ctx1) {
  3887. return true;
  3888. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLSUnit.klass)})},
  3889. args: [],
  3890. source: "canBeOpenAsTab\x0a\x09^ true",
  3891. messageSends: [],
  3892. referencedClasses: []
  3893. }),
  3894. smalltalk.HLSUnit.klass);
  3895. smalltalk.addMethod(
  3896. smalltalk.method({
  3897. selector: "tabLabel",
  3898. category: 'accessing',
  3899. fn: function (){
  3900. var self=this;
  3901. return smalltalk.withContext(function($ctx1) {
  3902. return "SUnit";
  3903. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLSUnit.klass)})},
  3904. args: [],
  3905. source: "tabLabel\x0a\x09^ 'SUnit'",
  3906. messageSends: [],
  3907. referencedClasses: []
  3908. }),
  3909. smalltalk.HLSUnit.klass);
  3910. smalltalk.addMethod(
  3911. smalltalk.method({
  3912. selector: "tabPriority",
  3913. category: 'accessing',
  3914. fn: function (){
  3915. var self=this;
  3916. return smalltalk.withContext(function($ctx1) {
  3917. var $1;
  3918. $1=(1000);
  3919. return $1;
  3920. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLSUnit.klass)})},
  3921. args: [],
  3922. source: "tabPriority\x0a\x09^ 1000",
  3923. messageSends: [],
  3924. referencedClasses: []
  3925. }),
  3926. smalltalk.HLSUnit.klass);
  3927. smalltalk.addClass('HLTranscript', smalltalk.HLWidget, [], 'Helios-Core');
  3928. smalltalk.addMethod(
  3929. smalltalk.method({
  3930. selector: "canBeOpenAsTab",
  3931. category: 'testing',
  3932. fn: function (){
  3933. var self=this;
  3934. return smalltalk.withContext(function($ctx1) {
  3935. return true;
  3936. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLTranscript.klass)})},
  3937. args: [],
  3938. source: "canBeOpenAsTab\x0a\x09^ true",
  3939. messageSends: [],
  3940. referencedClasses: []
  3941. }),
  3942. smalltalk.HLTranscript.klass);
  3943. smalltalk.addMethod(
  3944. smalltalk.method({
  3945. selector: "tabLabel",
  3946. category: 'accessing',
  3947. fn: function (){
  3948. var self=this;
  3949. return smalltalk.withContext(function($ctx1) {
  3950. return "Transcript";
  3951. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLTranscript.klass)})},
  3952. args: [],
  3953. source: "tabLabel\x0a\x09^ 'Transcript'",
  3954. messageSends: [],
  3955. referencedClasses: []
  3956. }),
  3957. smalltalk.HLTranscript.klass);
  3958. smalltalk.addMethod(
  3959. smalltalk.method({
  3960. selector: "tabPriority",
  3961. category: 'accessing',
  3962. fn: function (){
  3963. var self=this;
  3964. return smalltalk.withContext(function($ctx1) {
  3965. var $1;
  3966. $1=(600);
  3967. return $1;
  3968. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLTranscript.klass)})},
  3969. args: [],
  3970. source: "tabPriority\x0a\x09^ 600",
  3971. messageSends: [],
  3972. referencedClasses: []
  3973. }),
  3974. smalltalk.HLTranscript.klass);