Helios-Core.deploy.js 129 KB

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