Helios-Core.deploy.js 126 KB

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