Helios-Core.deploy.js 119 KB

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