2
0

Helios-Core.deploy.js 137 KB

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