Helios-Core.deploy.js 128 KB

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