Helios-Core.deploy.js 126 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701
  1. smalltalk.addPackage('Helios-Core');
  2. smalltalk.addClass('HLModel', smalltalk.Object, ['announcer', 'environment'], 'Helios-Core');
  3. smalltalk.addMethod(
  4. smalltalk.method({
  5. selector: "announcer",
  6. fn: function (){
  7. var self=this;
  8. function $Announcer(){return smalltalk.Announcer||(typeof Announcer=="undefined"?nil:Announcer)}
  9. return smalltalk.withContext(function($ctx1) {
  10. var $2,$1;
  11. $2=self["@announcer"];
  12. if(($receiver = $2) == nil || $receiver == undefined){
  13. self["@announcer"]=_st($Announcer())._new();
  14. $1=self["@announcer"];
  15. } else {
  16. $1=$2;
  17. };
  18. return $1;
  19. }, function($ctx1) {$ctx1.fill(self,"announcer",{},smalltalk.HLModel)})},
  20. messageSends: ["ifNil:", "new"]}),
  21. smalltalk.HLModel);
  22. smalltalk.addMethod(
  23. smalltalk.method({
  24. selector: "environment",
  25. fn: function (){
  26. var self=this;
  27. return smalltalk.withContext(function($ctx1) {
  28. var $2,$1;
  29. $2=self["@environment"];
  30. if(($receiver = $2) == nil || $receiver == undefined){
  31. $1=_st(self._manager())._environment();
  32. } else {
  33. $1=$2;
  34. };
  35. return $1;
  36. }, function($ctx1) {$ctx1.fill(self,"environment",{},smalltalk.HLModel)})},
  37. messageSends: ["ifNil:", "environment", "manager"]}),
  38. smalltalk.HLModel);
  39. smalltalk.addMethod(
  40. smalltalk.method({
  41. selector: "environment:",
  42. fn: function (anEnvironment){
  43. var self=this;
  44. return smalltalk.withContext(function($ctx1) {
  45. self["@environment"]=anEnvironment;
  46. return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment},smalltalk.HLModel)})},
  47. messageSends: []}),
  48. smalltalk.HLModel);
  49. smalltalk.addMethod(
  50. smalltalk.method({
  51. selector: "isBrowserModel",
  52. fn: function (){
  53. var self=this;
  54. return smalltalk.withContext(function($ctx1) {
  55. return false;
  56. }, function($ctx1) {$ctx1.fill(self,"isBrowserModel",{},smalltalk.HLModel)})},
  57. messageSends: []}),
  58. smalltalk.HLModel);
  59. smalltalk.addMethod(
  60. smalltalk.method({
  61. selector: "isReferencesModel",
  62. fn: function (){
  63. var self=this;
  64. return smalltalk.withContext(function($ctx1) {
  65. return false;
  66. }, function($ctx1) {$ctx1.fill(self,"isReferencesModel",{},smalltalk.HLModel)})},
  67. messageSends: []}),
  68. smalltalk.HLModel);
  69. smalltalk.addMethod(
  70. smalltalk.method({
  71. selector: "isToolModel",
  72. fn: function (){
  73. var self=this;
  74. return smalltalk.withContext(function($ctx1) {
  75. return false;
  76. }, function($ctx1) {$ctx1.fill(self,"isToolModel",{},smalltalk.HLModel)})},
  77. messageSends: []}),
  78. smalltalk.HLModel);
  79. smalltalk.addMethod(
  80. smalltalk.method({
  81. selector: "manager",
  82. fn: function (){
  83. var self=this;
  84. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  85. return smalltalk.withContext(function($ctx1) {
  86. var $1;
  87. $1=_st($HLManager())._current();
  88. return $1;
  89. }, function($ctx1) {$ctx1.fill(self,"manager",{},smalltalk.HLModel)})},
  90. messageSends: ["current"]}),
  91. smalltalk.HLModel);
  92. smalltalk.addMethod(
  93. smalltalk.method({
  94. selector: "systemAnnouncer",
  95. fn: function (){
  96. var self=this;
  97. return smalltalk.withContext(function($ctx1) {
  98. var $1;
  99. $1=_st(self._environment())._systemAnnouncer();
  100. return $1;
  101. }, function($ctx1) {$ctx1.fill(self,"systemAnnouncer",{},smalltalk.HLModel)})},
  102. messageSends: ["systemAnnouncer", "environment"]}),
  103. smalltalk.HLModel);
  104. smalltalk.addMethod(
  105. smalltalk.method({
  106. selector: "withChangesDo:",
  107. fn: function (aBlock){
  108. var self=this;
  109. function $HLAboutToChange(){return smalltalk.HLAboutToChange||(typeof HLAboutToChange=="undefined"?nil:HLAboutToChange)}
  110. function $HLChangeForbidden(){return smalltalk.HLChangeForbidden||(typeof HLChangeForbidden=="undefined"?nil:HLChangeForbidden)}
  111. return smalltalk.withContext(function($ctx1) {
  112. _st((function(){
  113. return smalltalk.withContext(function($ctx2) {
  114. _st(self._announcer())._announce_(_st(_st($HLAboutToChange())._new())._actionBlock_(aBlock));
  115. return _st(aBlock)._value();
  116. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._on_do_($HLChangeForbidden(),(function(ex){
  117. return smalltalk.withContext(function($ctx2) {
  118. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1,2)})}));
  119. return self}, function($ctx1) {$ctx1.fill(self,"withChangesDo:",{aBlock:aBlock},smalltalk.HLModel)})},
  120. messageSends: ["on:do:", "announce:", "announcer", "actionBlock:", "new", "value"]}),
  121. smalltalk.HLModel);
  122. smalltalk.addClass('HLToolModel', smalltalk.HLModel, ['selectedClass', 'selectedPackage', 'selectedProtocol', 'selectedSelector'], 'Helios-Core');
  123. smalltalk.addMethod(
  124. smalltalk.method({
  125. selector: "addInstVarNamed:",
  126. fn: function (aString){
  127. var self=this;
  128. function $HLInstVarAdded(){return smalltalk.HLInstVarAdded||(typeof HLInstVarAdded=="undefined"?nil:HLInstVarAdded)}
  129. return smalltalk.withContext(function($ctx1) {
  130. var $1,$2;
  131. _st(self._environment())._addInstVarNamed_to_(aString,self._selectedClass());
  132. $1=_st($HLInstVarAdded())._new();
  133. _st($1)._theClass_(self._selectedClass());
  134. _st($1)._variableName_(aString);
  135. $2=_st($1)._yourself();
  136. _st(self._announcer())._announce_($2);
  137. return self}, function($ctx1) {$ctx1.fill(self,"addInstVarNamed:",{aString:aString},smalltalk.HLToolModel)})},
  138. messageSends: ["addInstVarNamed:to:", "environment", "selectedClass", "announce:", "announcer", "theClass:", "new", "variableName:", "yourself"]}),
  139. smalltalk.HLToolModel);
  140. smalltalk.addMethod(
  141. smalltalk.method({
  142. selector: "allProtocol",
  143. fn: function (){
  144. var self=this;
  145. return smalltalk.withContext(function($ctx1) {
  146. return "-- all --";
  147. }, function($ctx1) {$ctx1.fill(self,"allProtocol",{},smalltalk.HLToolModel)})},
  148. messageSends: []}),
  149. smalltalk.HLToolModel);
  150. smalltalk.addMethod(
  151. smalltalk.method({
  152. selector: "allSelectors",
  153. fn: function (){
  154. var self=this;
  155. return smalltalk.withContext(function($ctx1) {
  156. var $1;
  157. $1=_st(self._environment())._allSelectors();
  158. return $1;
  159. }, function($ctx1) {$ctx1.fill(self,"allSelectors",{},smalltalk.HLToolModel)})},
  160. messageSends: ["allSelectors", "environment"]}),
  161. smalltalk.HLToolModel);
  162. smalltalk.addMethod(
  163. smalltalk.method({
  164. selector: "availableClassNames",
  165. fn: function (){
  166. var self=this;
  167. return smalltalk.withContext(function($ctx1) {
  168. var $1;
  169. $1=_st(self._environment())._availableClassNames();
  170. return $1;
  171. }, function($ctx1) {$ctx1.fill(self,"availableClassNames",{},smalltalk.HLToolModel)})},
  172. messageSends: ["availableClassNames", "environment"]}),
  173. smalltalk.HLToolModel);
  174. smalltalk.addMethod(
  175. smalltalk.method({
  176. selector: "availablePackageNames",
  177. fn: function (){
  178. var self=this;
  179. return smalltalk.withContext(function($ctx1) {
  180. var $1;
  181. $1=_st(self._environment())._availablePackageNames();
  182. return $1;
  183. }, function($ctx1) {$ctx1.fill(self,"availablePackageNames",{},smalltalk.HLToolModel)})},
  184. messageSends: ["availablePackageNames", "environment"]}),
  185. smalltalk.HLToolModel);
  186. smalltalk.addMethod(
  187. smalltalk.method({
  188. selector: "availablePackages",
  189. fn: function (){
  190. var self=this;
  191. return smalltalk.withContext(function($ctx1) {
  192. var $1;
  193. $1=_st(self._environment())._availablePackageNames();
  194. return $1;
  195. }, function($ctx1) {$ctx1.fill(self,"availablePackages",{},smalltalk.HLToolModel)})},
  196. messageSends: ["availablePackageNames", "environment"]}),
  197. smalltalk.HLToolModel);
  198. smalltalk.addMethod(
  199. smalltalk.method({
  200. selector: "availableProtocols",
  201. fn: function (){
  202. var self=this;
  203. return smalltalk.withContext(function($ctx1) {
  204. var $1;
  205. $1=_st(self._environment())._availableProtocolsFor_(self._selectedClass());
  206. return $1;
  207. }, function($ctx1) {$ctx1.fill(self,"availableProtocols",{},smalltalk.HLToolModel)})},
  208. messageSends: ["availableProtocolsFor:", "environment", "selectedClass"]}),
  209. smalltalk.HLToolModel);
  210. smalltalk.addMethod(
  211. smalltalk.method({
  212. selector: "commitPackage",
  213. fn: function (){
  214. var self=this;
  215. return smalltalk.withContext(function($ctx1) {
  216. _st(self._environment())._commitPackage_(self._selectedPackage());
  217. return self}, function($ctx1) {$ctx1.fill(self,"commitPackage",{},smalltalk.HLToolModel)})},
  218. messageSends: ["commitPackage:", "environment", "selectedPackage"]}),
  219. smalltalk.HLToolModel);
  220. smalltalk.addMethod(
  221. smalltalk.method({
  222. selector: "compilationProtocol",
  223. fn: function (){
  224. var self=this;
  225. var currentProtocol;
  226. return smalltalk.withContext(function($ctx1) {
  227. var $1,$2,$4,$3;
  228. currentProtocol=self._selectedProtocol();
  229. $1=currentProtocol;
  230. if(($receiver = $1) == nil || $receiver == undefined){
  231. currentProtocol=self._unclassifiedProtocol();
  232. currentProtocol;
  233. } else {
  234. $1;
  235. };
  236. $2=self._selectedMethod();
  237. if(($receiver = $2) == nil || $receiver == undefined){
  238. $2;
  239. } else {
  240. currentProtocol=_st(self._selectedMethod())._protocol();
  241. currentProtocol;
  242. };
  243. $4=_st(currentProtocol).__eq(self._allProtocol());
  244. if(smalltalk.assert($4)){
  245. $3=self._unclassifiedProtocol();
  246. } else {
  247. $3=currentProtocol;
  248. };
  249. return $3;
  250. }, function($ctx1) {$ctx1.fill(self,"compilationProtocol",{currentProtocol:currentProtocol},smalltalk.HLToolModel)})},
  251. messageSends: ["selectedProtocol", "ifNil:", "unclassifiedProtocol", "ifNotNil:", "selectedMethod", "protocol", "ifTrue:ifFalse:", "=", "allProtocol"]}),
  252. smalltalk.HLToolModel);
  253. smalltalk.addMethod(
  254. smalltalk.method({
  255. selector: "compileClassComment:",
  256. fn: function (aString){
  257. var self=this;
  258. return smalltalk.withContext(function($ctx1) {
  259. _st(self._environment())._compileClassComment_for_(aString,self._selectedClass());
  260. return self}, function($ctx1) {$ctx1.fill(self,"compileClassComment:",{aString:aString},smalltalk.HLToolModel)})},
  261. messageSends: ["compileClassComment:for:", "environment", "selectedClass"]}),
  262. smalltalk.HLToolModel);
  263. smalltalk.addMethod(
  264. smalltalk.method({
  265. selector: "compileClassDefinition:",
  266. fn: function (aString){
  267. var self=this;
  268. return smalltalk.withContext(function($ctx1) {
  269. _st(self._environment())._compileClassDefinition_(aString);
  270. return self}, function($ctx1) {$ctx1.fill(self,"compileClassDefinition:",{aString:aString},smalltalk.HLToolModel)})},
  271. messageSends: ["compileClassDefinition:", "environment"]}),
  272. smalltalk.HLToolModel);
  273. smalltalk.addMethod(
  274. smalltalk.method({
  275. selector: "compileMethod:",
  276. fn: function (aString){
  277. var self=this;
  278. var method;
  279. return smalltalk.withContext(function($ctx1) {
  280. self._withCompileErrorHandling_((function(){
  281. return smalltalk.withContext(function($ctx2) {
  282. method=_st(self._environment())._compileMethod_for_protocol_(aString,self._selectedClass(),self._compilationProtocol());
  283. method;
  284. return self._selectedMethod_(method);
  285. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  286. return self}, function($ctx1) {$ctx1.fill(self,"compileMethod:",{aString:aString,method:method},smalltalk.HLToolModel)})},
  287. messageSends: ["withCompileErrorHandling:", "compileMethod:for:protocol:", "environment", "selectedClass", "compilationProtocol", "selectedMethod:"]}),
  288. smalltalk.HLToolModel);
  289. smalltalk.addMethod(
  290. smalltalk.method({
  291. selector: "copyClassTo:",
  292. fn: function (aClassName){
  293. var self=this;
  294. return smalltalk.withContext(function($ctx1) {
  295. self._withChangesDo_((function(){
  296. return smalltalk.withContext(function($ctx2) {
  297. return _st(self._environment())._copyClass_to_(_st(self._selectedClass())._theNonMetaClass(),aClassName);
  298. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  299. return self}, function($ctx1) {$ctx1.fill(self,"copyClassTo:",{aClassName:aClassName},smalltalk.HLToolModel)})},
  300. messageSends: ["withChangesDo:", "copyClass:to:", "environment", "theNonMetaClass", "selectedClass"]}),
  301. smalltalk.HLToolModel);
  302. smalltalk.addMethod(
  303. smalltalk.method({
  304. selector: "handleCompileError:",
  305. fn: function (anError){
  306. var self=this;
  307. function $HLCompileErrorRaised(){return smalltalk.HLCompileErrorRaised||(typeof HLCompileErrorRaised=="undefined"?nil:HLCompileErrorRaised)}
  308. return smalltalk.withContext(function($ctx1) {
  309. var $1,$2;
  310. $1=_st($HLCompileErrorRaised())._new();
  311. _st($1)._error_(anError);
  312. $2=_st($1)._yourself();
  313. _st(self._announcer())._announce_($2);
  314. return self}, function($ctx1) {$ctx1.fill(self,"handleCompileError:",{anError:anError},smalltalk.HLToolModel)})},
  315. messageSends: ["announce:", "announcer", "error:", "new", "yourself"]}),
  316. smalltalk.HLToolModel);
  317. smalltalk.addMethod(
  318. smalltalk.method({
  319. selector: "handleParseError:",
  320. fn: function (anError){
  321. var self=this;
  322. var split,line,column,messageToInsert;
  323. function $HLParseErrorRaised(){return smalltalk.HLParseErrorRaised||(typeof HLParseErrorRaised=="undefined"?nil:HLParseErrorRaised)}
  324. return smalltalk.withContext(function($ctx1) {
  325. var $1,$2;
  326. split=_st(_st(anError)._messageText())._tokenize_(" : ");
  327. messageToInsert=_st(split)._second();
  328. split=_st(_st(split)._first())._copyFrom_to_((21),_st(_st(split)._first())._size());
  329. split=_st(split)._tokenize_(" column ");
  330. line=_st(split)._first();
  331. column=_st(split)._second();
  332. $1=_st($HLParseErrorRaised())._new();
  333. _st($1)._line_(_st(line)._asNumber());
  334. _st($1)._column_(_st(column)._asNumber());
  335. _st($1)._message_(messageToInsert);
  336. _st($1)._error_(anError);
  337. $2=_st($1)._yourself();
  338. _st(self._announcer())._announce_($2);
  339. return self}, function($ctx1) {$ctx1.fill(self,"handleParseError:",{anError:anError,split:split,line:line,column:column,messageToInsert:messageToInsert},smalltalk.HLToolModel)})},
  340. messageSends: ["tokenize:", "messageText", "second", "copyFrom:to:", "first", "size", "announce:", "announcer", "line:", "new", "asNumber", "column:", "message:", "error:", "yourself"]}),
  341. smalltalk.HLToolModel);
  342. smalltalk.addMethod(
  343. smalltalk.method({
  344. selector: "handleUnkownVariableError:",
  345. fn: function (anError){
  346. var self=this;
  347. function $HLUnknownVariableErrorRaised(){return smalltalk.HLUnknownVariableErrorRaised||(typeof HLUnknownVariableErrorRaised=="undefined"?nil:HLUnknownVariableErrorRaised)}
  348. return smalltalk.withContext(function($ctx1) {
  349. var $1,$2;
  350. $1=_st($HLUnknownVariableErrorRaised())._new();
  351. _st($1)._error_(anError);
  352. $2=_st($1)._yourself();
  353. _st(self._announcer())._announce_($2);
  354. return self}, function($ctx1) {$ctx1.fill(self,"handleUnkownVariableError:",{anError:anError},smalltalk.HLToolModel)})},
  355. messageSends: ["announce:", "announcer", "error:", "new", "yourself"]}),
  356. smalltalk.HLToolModel);
  357. smalltalk.addMethod(
  358. smalltalk.method({
  359. selector: "isToolModel",
  360. fn: function (){
  361. var self=this;
  362. return smalltalk.withContext(function($ctx1) {
  363. return true;
  364. }, function($ctx1) {$ctx1.fill(self,"isToolModel",{},smalltalk.HLToolModel)})},
  365. messageSends: []}),
  366. smalltalk.HLToolModel);
  367. smalltalk.addMethod(
  368. smalltalk.method({
  369. selector: "moveClassToPackage:",
  370. fn: function (aPackageName){
  371. var self=this;
  372. return smalltalk.withContext(function($ctx1) {
  373. self._withChangesDo_((function(){
  374. return smalltalk.withContext(function($ctx2) {
  375. return _st(self._environment())._moveClass_toPackage_(_st(self._selectedClass())._theNonMetaClass(),aPackageName);
  376. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  377. return self}, function($ctx1) {$ctx1.fill(self,"moveClassToPackage:",{aPackageName:aPackageName},smalltalk.HLToolModel)})},
  378. messageSends: ["withChangesDo:", "moveClass:toPackage:", "environment", "theNonMetaClass", "selectedClass"]}),
  379. smalltalk.HLToolModel);
  380. smalltalk.addMethod(
  381. smalltalk.method({
  382. selector: "moveMethodToClass:",
  383. fn: function (aClassName){
  384. var self=this;
  385. return smalltalk.withContext(function($ctx1) {
  386. self._withChangesDo_((function(){
  387. return smalltalk.withContext(function($ctx2) {
  388. return _st(self._environment())._moveMethod_toClass_(self._selectedMethod(),aClassName);
  389. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  390. return self}, function($ctx1) {$ctx1.fill(self,"moveMethodToClass:",{aClassName:aClassName},smalltalk.HLToolModel)})},
  391. messageSends: ["withChangesDo:", "moveMethod:toClass:", "environment", "selectedMethod"]}),
  392. smalltalk.HLToolModel);
  393. smalltalk.addMethod(
  394. smalltalk.method({
  395. selector: "moveMethodToProtocol:",
  396. fn: function (aProtocol){
  397. var self=this;
  398. return smalltalk.withContext(function($ctx1) {
  399. self._withChangesDo_((function(){
  400. return smalltalk.withContext(function($ctx2) {
  401. return _st(self._environment())._moveMethod_toProtocol_(self._selectedMethod(),aProtocol);
  402. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  403. return self}, function($ctx1) {$ctx1.fill(self,"moveMethodToProtocol:",{aProtocol:aProtocol},smalltalk.HLToolModel)})},
  404. messageSends: ["withChangesDo:", "moveMethod:toProtocol:", "environment", "selectedMethod"]}),
  405. smalltalk.HLToolModel);
  406. smalltalk.addMethod(
  407. smalltalk.method({
  408. selector: "openClassNamed:",
  409. fn: function (aString){
  410. var self=this;
  411. var class_;
  412. return smalltalk.withContext(function($ctx1) {
  413. self._withChangesDo_((function(){
  414. return smalltalk.withContext(function($ctx2) {
  415. class_=_st(self._environment())._classNamed_(aString);
  416. class_;
  417. self._selectedPackage_(_st(class_)._package());
  418. return self._selectedClass_(class_);
  419. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  420. return self}, function($ctx1) {$ctx1.fill(self,"openClassNamed:",{aString:aString,class_:class_},smalltalk.HLToolModel)})},
  421. messageSends: ["withChangesDo:", "classNamed:", "environment", "selectedPackage:", "package", "selectedClass:"]}),
  422. smalltalk.HLToolModel);
  423. smalltalk.addMethod(
  424. smalltalk.method({
  425. selector: "packages",
  426. fn: function (){
  427. var self=this;
  428. return smalltalk.withContext(function($ctx1) {
  429. var $1;
  430. $1=_st(self._environment())._packages();
  431. return $1;
  432. }, function($ctx1) {$ctx1.fill(self,"packages",{},smalltalk.HLToolModel)})},
  433. messageSends: ["packages", "environment"]}),
  434. smalltalk.HLToolModel);
  435. smalltalk.addMethod(
  436. smalltalk.method({
  437. selector: "removeClass",
  438. fn: function (){
  439. var self=this;
  440. return smalltalk.withContext(function($ctx1) {
  441. self._withChangesDo_((function(){
  442. return smalltalk.withContext(function($ctx2) {
  443. return _st(self._manager())._confirm_ifTrue_("Do you REALLY want to remove class ".__comma(_st(self._selectedClass())._name()),(function(){
  444. return smalltalk.withContext(function($ctx3) {
  445. return _st(self._environment())._removeClass_(self._selectedClass());
  446. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  447. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  448. return self}, function($ctx1) {$ctx1.fill(self,"removeClass",{},smalltalk.HLToolModel)})},
  449. messageSends: ["withChangesDo:", "confirm:ifTrue:", "manager", ",", "name", "selectedClass", "removeClass:", "environment"]}),
  450. smalltalk.HLToolModel);
  451. smalltalk.addMethod(
  452. smalltalk.method({
  453. selector: "removeMethod",
  454. fn: function (){
  455. var self=this;
  456. return smalltalk.withContext(function($ctx1) {
  457. self._withChangesDo_((function(){
  458. return smalltalk.withContext(function($ctx2) {
  459. 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(){
  460. return smalltalk.withContext(function($ctx3) {
  461. return _st(self._environment())._removeMethod_(self._selectedMethod());
  462. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  463. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  464. return self}, function($ctx1) {$ctx1.fill(self,"removeMethod",{},smalltalk.HLToolModel)})},
  465. messageSends: ["withChangesDo:", "confirm:ifTrue:", "manager", ",", "name", "methodClass", "selectedMethod", "selector", "removeMethod:", "environment"]}),
  466. smalltalk.HLToolModel);
  467. smalltalk.addMethod(
  468. smalltalk.method({
  469. selector: "removeProtocol",
  470. fn: function (){
  471. var self=this;
  472. return smalltalk.withContext(function($ctx1) {
  473. self._withChangesDo_((function(){
  474. return smalltalk.withContext(function($ctx2) {
  475. return _st(self._manager())._confirm_ifTrue_("Do you REALLY want to remove protocol ".__comma(self._selectedProtocol()),(function(){
  476. return smalltalk.withContext(function($ctx3) {
  477. return _st(self._environment())._removeProtocol_from_(self._selectedProtocol(),self._selectedClass());
  478. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  479. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  480. return self}, function($ctx1) {$ctx1.fill(self,"removeProtocol",{},smalltalk.HLToolModel)})},
  481. messageSends: ["withChangesDo:", "confirm:ifTrue:", "manager", ",", "selectedProtocol", "removeProtocol:from:", "environment", "selectedClass"]}),
  482. smalltalk.HLToolModel);
  483. smalltalk.addMethod(
  484. smalltalk.method({
  485. selector: "renameClassTo:",
  486. fn: function (aClassName){
  487. var self=this;
  488. return smalltalk.withContext(function($ctx1) {
  489. self._withChangesDo_((function(){
  490. return smalltalk.withContext(function($ctx2) {
  491. return _st(self._environment())._renameClass_to_(_st(self._selectedClass())._theNonMetaClass(),aClassName);
  492. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  493. return self}, function($ctx1) {$ctx1.fill(self,"renameClassTo:",{aClassName:aClassName},smalltalk.HLToolModel)})},
  494. messageSends: ["withChangesDo:", "renameClass:to:", "environment", "theNonMetaClass", "selectedClass"]}),
  495. smalltalk.HLToolModel);
  496. smalltalk.addMethod(
  497. smalltalk.method({
  498. selector: "renameProtocolTo:",
  499. fn: function (aString){
  500. var self=this;
  501. return smalltalk.withContext(function($ctx1) {
  502. self._withChangesDo_((function(){
  503. return smalltalk.withContext(function($ctx2) {
  504. return _st(self._environment())._renameProtocol_to_in_(self._selectedProtocol(),aString,self._selectedClass());
  505. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  506. return self}, function($ctx1) {$ctx1.fill(self,"renameProtocolTo:",{aString:aString},smalltalk.HLToolModel)})},
  507. messageSends: ["withChangesDo:", "renameProtocol:to:in:", "environment", "selectedProtocol", "selectedClass"]}),
  508. smalltalk.HLToolModel);
  509. smalltalk.addMethod(
  510. smalltalk.method({
  511. selector: "save:",
  512. fn: function (aString){
  513. var self=this;
  514. function $HLSourceCodeSaved(){return smalltalk.HLSourceCodeSaved||(typeof HLSourceCodeSaved=="undefined"?nil:HLSourceCodeSaved)}
  515. return smalltalk.withContext(function($ctx1) {
  516. var $1;
  517. _st(self._announcer())._announce_(_st($HLSourceCodeSaved())._new());
  518. $1=self._shouldCompileClassDefinition_(aString);
  519. if(smalltalk.assert($1)){
  520. self._compileClassDefinition_(aString);
  521. } else {
  522. self._compileMethod_(aString);
  523. };
  524. return self}, function($ctx1) {$ctx1.fill(self,"save:",{aString:aString},smalltalk.HLToolModel)})},
  525. messageSends: ["announce:", "announcer", "new", "ifTrue:ifFalse:", "shouldCompileClassDefinition:", "compileClassDefinition:", "compileMethod:"]}),
  526. smalltalk.HLToolModel);
  527. smalltalk.addMethod(
  528. smalltalk.method({
  529. selector: "saveSourceCode",
  530. fn: function (){
  531. var self=this;
  532. function $HLSaveSourceCode(){return smalltalk.HLSaveSourceCode||(typeof HLSaveSourceCode=="undefined"?nil:HLSaveSourceCode)}
  533. return smalltalk.withContext(function($ctx1) {
  534. _st(self._announcer())._announce_(_st($HLSaveSourceCode())._new());
  535. return self}, function($ctx1) {$ctx1.fill(self,"saveSourceCode",{},smalltalk.HLToolModel)})},
  536. messageSends: ["announce:", "announcer", "new"]}),
  537. smalltalk.HLToolModel);
  538. smalltalk.addMethod(
  539. smalltalk.method({
  540. selector: "selectedClass",
  541. fn: function (){
  542. var self=this;
  543. return smalltalk.withContext(function($ctx1) {
  544. var $1;
  545. $1=self["@selectedClass"];
  546. return $1;
  547. }, function($ctx1) {$ctx1.fill(self,"selectedClass",{},smalltalk.HLToolModel)})},
  548. messageSends: []}),
  549. smalltalk.HLToolModel);
  550. smalltalk.addMethod(
  551. smalltalk.method({
  552. selector: "selectedClass:",
  553. fn: function (aClass){
  554. var self=this;
  555. function $HLClassSelected(){return smalltalk.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
  556. return smalltalk.withContext(function($ctx1) {
  557. var $1,$2,$3,$4,$5;
  558. $1=_st(_st(self._selectedClass()).__eq(aClass))._and_((function(){
  559. return smalltalk.withContext(function($ctx2) {
  560. return _st(aClass)._isNil();
  561. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  562. if(smalltalk.assert($1)){
  563. $2=self;
  564. return $2;
  565. };
  566. self._withChangesDo_((function(){
  567. return smalltalk.withContext(function($ctx2) {
  568. $3=_st(self["@selectedClass"]).__eq(aClass);
  569. if(smalltalk.assert($3)){
  570. self._selectedProtocol_(nil);
  571. };
  572. $4=aClass;
  573. if(($receiver = $4) == nil || $receiver == undefined){
  574. self["@selectedClass"]=nil;
  575. self["@selectedClass"];
  576. } else {
  577. self._selectedPackage_(_st(_st(aClass)._theNonMetaClass())._package());
  578. $5=self._showInstance();
  579. if(smalltalk.assert($5)){
  580. self["@selectedClass"]=_st(aClass)._theNonMetaClass();
  581. self["@selectedClass"];
  582. } else {
  583. self["@selectedClass"]=_st(aClass)._theMetaClass();
  584. self["@selectedClass"];
  585. };
  586. };
  587. self._selectedProtocol_(nil);
  588. return _st(self._announcer())._announce_(_st($HLClassSelected())._on_(self._selectedClass()));
  589. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  590. return self}, function($ctx1) {$ctx1.fill(self,"selectedClass:",{aClass:aClass},smalltalk.HLToolModel)})},
  591. messageSends: ["ifTrue:", "and:", "=", "selectedClass", "isNil", "withChangesDo:", "selectedProtocol:", "ifNil:ifNotNil:", "selectedPackage:", "package", "theNonMetaClass", "ifTrue:ifFalse:", "showInstance", "theMetaClass", "announce:", "announcer", "on:"]}),
  592. smalltalk.HLToolModel);
  593. smalltalk.addMethod(
  594. smalltalk.method({
  595. selector: "selectedMethod",
  596. fn: function (){
  597. var self=this;
  598. return smalltalk.withContext(function($ctx1) {
  599. var $2,$1;
  600. $2=self._selectedClass();
  601. if(($receiver = $2) == nil || $receiver == undefined){
  602. $1=$2;
  603. } else {
  604. $1=_st(_st(self._selectedClass())._methodDictionary())._at_ifAbsent_(self["@selectedSelector"],(function(){
  605. return smalltalk.withContext(function($ctx2) {
  606. return nil;
  607. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  608. };
  609. return $1;
  610. }, function($ctx1) {$ctx1.fill(self,"selectedMethod",{},smalltalk.HLToolModel)})},
  611. messageSends: ["ifNotNil:", "selectedClass", "at:ifAbsent:", "methodDictionary"]}),
  612. smalltalk.HLToolModel);
  613. smalltalk.addMethod(
  614. smalltalk.method({
  615. selector: "selectedMethod:",
  616. fn: function (aCompiledMethod){
  617. var self=this;
  618. function $HLMethodSelected(){return smalltalk.HLMethodSelected||(typeof HLMethodSelected=="undefined"?nil:HLMethodSelected)}
  619. return smalltalk.withContext(function($ctx1) {
  620. var $1,$2,$3;
  621. $1=_st(self["@selectedSelector"]).__eq(aCompiledMethod);
  622. if(smalltalk.assert($1)){
  623. $2=self;
  624. return $2;
  625. };
  626. self._withChangesDo_((function(){
  627. return smalltalk.withContext(function($ctx2) {
  628. $3=aCompiledMethod;
  629. if(($receiver = $3) == nil || $receiver == undefined){
  630. self["@selectedSelector"]=nil;
  631. self["@selectedSelector"];
  632. } else {
  633. self["@selectedClass"]=_st(aCompiledMethod)._methodClass();
  634. self["@selectedClass"];
  635. self["@selectedPackage"]=_st(_st(self["@selectedClass"])._theNonMetaClass())._package();
  636. self["@selectedPackage"];
  637. self["@selectedSelector"]=_st(aCompiledMethod)._selector();
  638. self["@selectedSelector"];
  639. };
  640. return _st(self._announcer())._announce_(_st($HLMethodSelected())._on_(aCompiledMethod));
  641. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  642. return self}, function($ctx1) {$ctx1.fill(self,"selectedMethod:",{aCompiledMethod:aCompiledMethod},smalltalk.HLToolModel)})},
  643. messageSends: ["ifTrue:", "=", "withChangesDo:", "ifNil:ifNotNil:", "methodClass", "package", "theNonMetaClass", "selector", "announce:", "announcer", "on:"]}),
  644. smalltalk.HLToolModel);
  645. smalltalk.addMethod(
  646. smalltalk.method({
  647. selector: "selectedPackage",
  648. fn: function (){
  649. var self=this;
  650. return smalltalk.withContext(function($ctx1) {
  651. var $1;
  652. $1=self["@selectedPackage"];
  653. return $1;
  654. }, function($ctx1) {$ctx1.fill(self,"selectedPackage",{},smalltalk.HLToolModel)})},
  655. messageSends: []}),
  656. smalltalk.HLToolModel);
  657. smalltalk.addMethod(
  658. smalltalk.method({
  659. selector: "selectedPackage:",
  660. fn: function (aPackage){
  661. var self=this;
  662. function $HLPackageSelected(){return smalltalk.HLPackageSelected||(typeof HLPackageSelected=="undefined"?nil:HLPackageSelected)}
  663. return smalltalk.withContext(function($ctx1) {
  664. var $1,$2;
  665. $1=_st(self["@selectedPackage"]).__eq(aPackage);
  666. if(smalltalk.assert($1)){
  667. $2=self;
  668. return $2;
  669. };
  670. self._withChangesDo_((function(){
  671. return smalltalk.withContext(function($ctx2) {
  672. self["@selectedPackage"]=aPackage;
  673. self["@selectedPackage"];
  674. self._selectedClass_(nil);
  675. return _st(self._announcer())._announce_(_st($HLPackageSelected())._on_(aPackage));
  676. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  677. return self}, function($ctx1) {$ctx1.fill(self,"selectedPackage:",{aPackage:aPackage},smalltalk.HLToolModel)})},
  678. messageSends: ["ifTrue:", "=", "withChangesDo:", "selectedClass:", "announce:", "announcer", "on:"]}),
  679. smalltalk.HLToolModel);
  680. smalltalk.addMethod(
  681. smalltalk.method({
  682. selector: "selectedProtocol",
  683. fn: function (){
  684. var self=this;
  685. return smalltalk.withContext(function($ctx1) {
  686. var $1;
  687. $1=self["@selectedProtocol"];
  688. return $1;
  689. }, function($ctx1) {$ctx1.fill(self,"selectedProtocol",{},smalltalk.HLToolModel)})},
  690. messageSends: []}),
  691. smalltalk.HLToolModel);
  692. smalltalk.addMethod(
  693. smalltalk.method({
  694. selector: "selectedProtocol:",
  695. fn: function (aString){
  696. var self=this;
  697. function $HLProtocolSelected(){return smalltalk.HLProtocolSelected||(typeof HLProtocolSelected=="undefined"?nil:HLProtocolSelected)}
  698. return smalltalk.withContext(function($ctx1) {
  699. var $1,$2;
  700. $1=_st(self["@selectedProtocol"]).__eq(aString);
  701. if(smalltalk.assert($1)){
  702. $2=self;
  703. return $2;
  704. };
  705. self._withChangesDo_((function(){
  706. return smalltalk.withContext(function($ctx2) {
  707. self["@selectedProtocol"]=aString;
  708. self["@selectedProtocol"];
  709. self._selectedMethod_(nil);
  710. return _st(self._announcer())._announce_(_st($HLProtocolSelected())._on_(aString));
  711. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  712. return self}, function($ctx1) {$ctx1.fill(self,"selectedProtocol:",{aString:aString},smalltalk.HLToolModel)})},
  713. messageSends: ["ifTrue:", "=", "withChangesDo:", "selectedMethod:", "announce:", "announcer", "on:"]}),
  714. smalltalk.HLToolModel);
  715. smalltalk.addMethod(
  716. smalltalk.method({
  717. selector: "shouldCompileClassDefinition:",
  718. fn: function (aString){
  719. var self=this;
  720. return smalltalk.withContext(function($ctx1) {
  721. var $1;
  722. $1=_st(_st(self._selectedClass())._isNil())._or_((function(){
  723. return smalltalk.withContext(function($ctx2) {
  724. return _st(aString)._match_("^[A-Z]");
  725. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  726. return $1;
  727. }, function($ctx1) {$ctx1.fill(self,"shouldCompileClassDefinition:",{aString:aString},smalltalk.HLToolModel)})},
  728. messageSends: ["or:", "isNil", "selectedClass", "match:"]}),
  729. smalltalk.HLToolModel);
  730. smalltalk.addMethod(
  731. smalltalk.method({
  732. selector: "unclassifiedProtocol",
  733. fn: function (){
  734. var self=this;
  735. return smalltalk.withContext(function($ctx1) {
  736. return "as yet unclassified";
  737. }, function($ctx1) {$ctx1.fill(self,"unclassifiedProtocol",{},smalltalk.HLToolModel)})},
  738. messageSends: []}),
  739. smalltalk.HLToolModel);
  740. smalltalk.addMethod(
  741. smalltalk.method({
  742. selector: "withCompileErrorHandling:",
  743. fn: function (aBlock){
  744. var self=this;
  745. function $ParseError(){return smalltalk.ParseError||(typeof ParseError=="undefined"?nil:ParseError)}
  746. function $UnknownVariableError(){return smalltalk.UnknownVariableError||(typeof UnknownVariableError=="undefined"?nil:UnknownVariableError)}
  747. function $CompilerError(){return smalltalk.CompilerError||(typeof CompilerError=="undefined"?nil:CompilerError)}
  748. return smalltalk.withContext(function($ctx1) {
  749. _st(self._environment())._evaluate_on_do_((function(){
  750. return smalltalk.withContext(function($ctx2) {
  751. return _st(self._environment())._evaluate_on_do_((function(){
  752. return smalltalk.withContext(function($ctx3) {
  753. return _st(self._environment())._evaluate_on_do_(aBlock,$ParseError(),(function(ex){
  754. return smalltalk.withContext(function($ctx4) {
  755. return self._handleParseError_(ex);
  756. }, function($ctx4) {$ctx4.fillBlock({ex:ex},$ctx3,3)})}));
  757. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}),$UnknownVariableError(),(function(ex){
  758. return smalltalk.withContext(function($ctx3) {
  759. return self._handleUnkownVariableError_(ex);
  760. }, function($ctx3) {$ctx3.fillBlock({ex:ex},$ctx2,4)})}));
  761. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),$CompilerError(),(function(ex){
  762. return smalltalk.withContext(function($ctx2) {
  763. return self._handleCompileError_(ex);
  764. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1,5)})}));
  765. return self}, function($ctx1) {$ctx1.fill(self,"withCompileErrorHandling:",{aBlock:aBlock},smalltalk.HLToolModel)})},
  766. messageSends: ["evaluate:on:do:", "environment", "handleParseError:", "handleUnkownVariableError:", "handleCompileError:"]}),
  767. smalltalk.HLToolModel);
  768. smalltalk.addMethod(
  769. smalltalk.method({
  770. selector: "withHelperLabelled:do:",
  771. fn: function (aString,aBlock){
  772. var self=this;
  773. return smalltalk.withContext(function($ctx1) {
  774. var $1,$2;
  775. _st(_st(window)._jQuery_("#helper"))._remove();
  776. _st((function(html){
  777. return smalltalk.withContext(function($ctx2) {
  778. $1=_st(html)._div();
  779. _st($1)._id_("helper");
  780. $2=_st($1)._with_(aString);
  781. return $2;
  782. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}))._appendToJQuery_("body"._asJQuery());
  783. _st((function(){
  784. return smalltalk.withContext(function($ctx2) {
  785. _st(aBlock)._value();
  786. return _st(_st(window)._jQuery_("#helper"))._remove();
  787. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}))._valueWithTimeout_((10));
  788. return self}, function($ctx1) {$ctx1.fill(self,"withHelperLabelled:do:",{aString:aString,aBlock:aBlock},smalltalk.HLToolModel)})},
  789. messageSends: ["remove", "jQuery:", "appendToJQuery:", "id:", "div", "with:", "asJQuery", "valueWithTimeout:", "value"]}),
  790. smalltalk.HLToolModel);
  791. smalltalk.addMethod(
  792. smalltalk.method({
  793. selector: "on:",
  794. fn: function (anEnvironment){
  795. var self=this;
  796. return smalltalk.withContext(function($ctx1) {
  797. var $2,$3,$1;
  798. $2=self._new();
  799. _st($2)._environment_(anEnvironment);
  800. $3=_st($2)._yourself();
  801. $1=$3;
  802. return $1;
  803. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment},smalltalk.HLToolModel.klass)})},
  804. messageSends: ["environment:", "new", "yourself"]}),
  805. smalltalk.HLToolModel.klass);
  806. smalltalk.addClass('HLProgressHandler', smalltalk.ProgressHandler, [], 'Helios-Core');
  807. smalltalk.addMethod(
  808. smalltalk.method({
  809. selector: "do:on:displaying:",
  810. fn: function (aBlock,aCollection,aString){
  811. var self=this;
  812. function $HLProgressWidget(){return smalltalk.HLProgressWidget||(typeof HLProgressWidget=="undefined"?nil:HLProgressWidget)}
  813. return smalltalk.withContext(function($ctx1) {
  814. _st(_st($HLProgressWidget())._default())._do_on_displaying_(aBlock,aCollection,aString);
  815. return self}, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString},smalltalk.HLProgressHandler)})},
  816. messageSends: ["do:on:displaying:", "default"]}),
  817. smalltalk.HLProgressHandler);
  818. smalltalk.addClass('HLTabWidget', smalltalk.Widget, ['widget', 'label', 'root'], 'Helios-Core');
  819. smalltalk.addMethod(
  820. smalltalk.method({
  821. selector: "activate",
  822. fn: function (){
  823. var self=this;
  824. return smalltalk.withContext(function($ctx1) {
  825. _st(self._manager())._activate_(self);
  826. return self}, function($ctx1) {$ctx1.fill(self,"activate",{},smalltalk.HLTabWidget)})},
  827. messageSends: ["activate:", "manager"]}),
  828. smalltalk.HLTabWidget);
  829. smalltalk.addMethod(
  830. smalltalk.method({
  831. selector: "add",
  832. fn: function (){
  833. var self=this;
  834. return smalltalk.withContext(function($ctx1) {
  835. _st(self._manager())._addTab_(self);
  836. return self}, function($ctx1) {$ctx1.fill(self,"add",{},smalltalk.HLTabWidget)})},
  837. messageSends: ["addTab:", "manager"]}),
  838. smalltalk.HLTabWidget);
  839. smalltalk.addMethod(
  840. smalltalk.method({
  841. selector: "cssClass",
  842. fn: function (){
  843. var self=this;
  844. return smalltalk.withContext(function($ctx1) {
  845. var $1;
  846. $1=_st(self._widget())._tabClass();
  847. return $1;
  848. }, function($ctx1) {$ctx1.fill(self,"cssClass",{},smalltalk.HLTabWidget)})},
  849. messageSends: ["tabClass", "widget"]}),
  850. smalltalk.HLTabWidget);
  851. smalltalk.addMethod(
  852. smalltalk.method({
  853. selector: "displayLabel",
  854. fn: function (){
  855. var self=this;
  856. return smalltalk.withContext(function($ctx1) {
  857. var $2,$1;
  858. $2=_st(_st(self._label())._size()).__gt((20));
  859. if(smalltalk.assert($2)){
  860. $1=_st(_st(self._label())._first_((20))).__comma("...");
  861. } else {
  862. $1=self._label();
  863. };
  864. return $1;
  865. }, function($ctx1) {$ctx1.fill(self,"displayLabel",{},smalltalk.HLTabWidget)})},
  866. messageSends: ["ifTrue:ifFalse:", ">", "size", "label", ",", "first:"]}),
  867. smalltalk.HLTabWidget);
  868. smalltalk.addMethod(
  869. smalltalk.method({
  870. selector: "focus",
  871. fn: function (){
  872. var self=this;
  873. return smalltalk.withContext(function($ctx1) {
  874. var $1;
  875. $1=_st(self._widget())._canHaveFocus();
  876. if(smalltalk.assert($1)){
  877. _st(self._widget())._focus();
  878. };
  879. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLTabWidget)})},
  880. messageSends: ["ifTrue:", "canHaveFocus", "widget", "focus"]}),
  881. smalltalk.HLTabWidget);
  882. smalltalk.addMethod(
  883. smalltalk.method({
  884. selector: "hide",
  885. fn: function (){
  886. var self=this;
  887. return smalltalk.withContext(function($ctx1) {
  888. var $1;
  889. $1=self["@root"];
  890. if(($receiver = $1) == nil || $receiver == undefined){
  891. $1;
  892. } else {
  893. _st(_st(self["@root"])._asJQuery())._css_put_("visibility","hidden");
  894. };
  895. return self}, function($ctx1) {$ctx1.fill(self,"hide",{},smalltalk.HLTabWidget)})},
  896. messageSends: ["ifNotNil:", "css:put:", "asJQuery"]}),
  897. smalltalk.HLTabWidget);
  898. smalltalk.addMethod(
  899. smalltalk.method({
  900. selector: "isActive",
  901. fn: function (){
  902. var self=this;
  903. return smalltalk.withContext(function($ctx1) {
  904. var $1;
  905. $1=_st(_st(self._manager())._activeTab()).__eq(self);
  906. return $1;
  907. }, function($ctx1) {$ctx1.fill(self,"isActive",{},smalltalk.HLTabWidget)})},
  908. messageSends: ["=", "activeTab", "manager"]}),
  909. smalltalk.HLTabWidget);
  910. smalltalk.addMethod(
  911. smalltalk.method({
  912. selector: "label",
  913. fn: function (){
  914. var self=this;
  915. return smalltalk.withContext(function($ctx1) {
  916. var $2,$1;
  917. $2=self["@label"];
  918. if(($receiver = $2) == nil || $receiver == undefined){
  919. $1="";
  920. } else {
  921. $1=$2;
  922. };
  923. return $1;
  924. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLTabWidget)})},
  925. messageSends: ["ifNil:"]}),
  926. smalltalk.HLTabWidget);
  927. smalltalk.addMethod(
  928. smalltalk.method({
  929. selector: "label:",
  930. fn: function (aString){
  931. var self=this;
  932. return smalltalk.withContext(function($ctx1) {
  933. self["@label"]=aString;
  934. return self}, function($ctx1) {$ctx1.fill(self,"label:",{aString:aString},smalltalk.HLTabWidget)})},
  935. messageSends: []}),
  936. smalltalk.HLTabWidget);
  937. smalltalk.addMethod(
  938. smalltalk.method({
  939. selector: "manager",
  940. fn: function (){
  941. var self=this;
  942. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  943. return smalltalk.withContext(function($ctx1) {
  944. var $1;
  945. $1=_st($HLManager())._current();
  946. return $1;
  947. }, function($ctx1) {$ctx1.fill(self,"manager",{},smalltalk.HLTabWidget)})},
  948. messageSends: ["current"]}),
  949. smalltalk.HLTabWidget);
  950. smalltalk.addMethod(
  951. smalltalk.method({
  952. selector: "registerBindings",
  953. fn: function (){
  954. var self=this;
  955. return smalltalk.withContext(function($ctx1) {
  956. _st(self._widget())._registerBindings();
  957. return self}, function($ctx1) {$ctx1.fill(self,"registerBindings",{},smalltalk.HLTabWidget)})},
  958. messageSends: ["registerBindings", "widget"]}),
  959. smalltalk.HLTabWidget);
  960. smalltalk.addMethod(
  961. smalltalk.method({
  962. selector: "remove",
  963. fn: function (){
  964. var self=this;
  965. return smalltalk.withContext(function($ctx1) {
  966. var $1;
  967. _st(self._widget())._unregister();
  968. $1=self["@root"];
  969. if(($receiver = $1) == nil || $receiver == undefined){
  970. $1;
  971. } else {
  972. _st(_st(self["@root"])._asJQuery())._remove();
  973. };
  974. return self}, function($ctx1) {$ctx1.fill(self,"remove",{},smalltalk.HLTabWidget)})},
  975. messageSends: ["unregister", "widget", "ifNotNil:", "remove", "asJQuery"]}),
  976. smalltalk.HLTabWidget);
  977. smalltalk.addMethod(
  978. smalltalk.method({
  979. selector: "renderOn:",
  980. fn: function (html){
  981. var self=this;
  982. return smalltalk.withContext(function($ctx1) {
  983. var $1,$2;
  984. $1=_st(html)._div();
  985. _st($1)._class_("tab");
  986. $2=_st($1)._yourself();
  987. self["@root"]=$2;
  988. self._renderTab();
  989. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.HLTabWidget)})},
  990. messageSends: ["class:", "div", "yourself", "renderTab"]}),
  991. smalltalk.HLTabWidget);
  992. smalltalk.addMethod(
  993. smalltalk.method({
  994. selector: "renderTab",
  995. fn: function (){
  996. var self=this;
  997. return smalltalk.withContext(function($ctx1) {
  998. var $1,$2;
  999. _st(self["@root"])._contents_((function(html){
  1000. return smalltalk.withContext(function($ctx2) {
  1001. $1=_st(html)._div();
  1002. _st($1)._class_("amber_box");
  1003. $2=_st($1)._with_((function(){
  1004. return smalltalk.withContext(function($ctx3) {
  1005. return _st(self._widget())._renderOn_(html);
  1006. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  1007. return $2;
  1008. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  1009. return self}, function($ctx1) {$ctx1.fill(self,"renderTab",{},smalltalk.HLTabWidget)})},
  1010. messageSends: ["contents:", "class:", "div", "with:", "renderOn:", "widget"]}),
  1011. smalltalk.HLTabWidget);
  1012. smalltalk.addMethod(
  1013. smalltalk.method({
  1014. selector: "show",
  1015. fn: function (){
  1016. var self=this;
  1017. return smalltalk.withContext(function($ctx1) {
  1018. var $1;
  1019. $1=self["@root"];
  1020. if(($receiver = $1) == nil || $receiver == undefined){
  1021. self._appendToJQuery_("body"._asJQuery());
  1022. } else {
  1023. _st(_st(self["@root"])._asJQuery())._css_put_("visibility","visible");
  1024. };
  1025. return self}, function($ctx1) {$ctx1.fill(self,"show",{},smalltalk.HLTabWidget)})},
  1026. messageSends: ["ifNil:ifNotNil:", "appendToJQuery:", "asJQuery", "css:put:"]}),
  1027. smalltalk.HLTabWidget);
  1028. smalltalk.addMethod(
  1029. smalltalk.method({
  1030. selector: "widget",
  1031. fn: function (){
  1032. var self=this;
  1033. return smalltalk.withContext(function($ctx1) {
  1034. var $1;
  1035. $1=self["@widget"];
  1036. return $1;
  1037. }, function($ctx1) {$ctx1.fill(self,"widget",{},smalltalk.HLTabWidget)})},
  1038. messageSends: []}),
  1039. smalltalk.HLTabWidget);
  1040. smalltalk.addMethod(
  1041. smalltalk.method({
  1042. selector: "widget:",
  1043. fn: function (aWidget){
  1044. var self=this;
  1045. return smalltalk.withContext(function($ctx1) {
  1046. self["@widget"]=aWidget;
  1047. return self}, function($ctx1) {$ctx1.fill(self,"widget:",{aWidget:aWidget},smalltalk.HLTabWidget)})},
  1048. messageSends: []}),
  1049. smalltalk.HLTabWidget);
  1050. smalltalk.addMethod(
  1051. smalltalk.method({
  1052. selector: "on:labelled:",
  1053. fn: function (aWidget,aString){
  1054. var self=this;
  1055. return smalltalk.withContext(function($ctx1) {
  1056. var $2,$3,$1;
  1057. $2=self._new();
  1058. _st($2)._widget_(aWidget);
  1059. _st($2)._label_(aString);
  1060. $3=_st($2)._yourself();
  1061. $1=$3;
  1062. return $1;
  1063. }, function($ctx1) {$ctx1.fill(self,"on:labelled:",{aWidget:aWidget,aString:aString},smalltalk.HLTabWidget.klass)})},
  1064. messageSends: ["widget:", "new", "label:", "yourself"]}),
  1065. smalltalk.HLTabWidget.klass);
  1066. smalltalk.addClass('HLWidget', smalltalk.Widget, ['wrapper'], 'Helios-Core');
  1067. smalltalk.addMethod(
  1068. smalltalk.method({
  1069. selector: "alert:",
  1070. fn: function (aString){
  1071. var self=this;
  1072. return smalltalk.withContext(function($ctx1) {
  1073. _st(window)._alert_(aString);
  1074. return self}, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString},smalltalk.HLWidget)})},
  1075. messageSends: ["alert:"]}),
  1076. smalltalk.HLWidget);
  1077. smalltalk.addMethod(
  1078. smalltalk.method({
  1079. selector: "bindKeyDown:up:",
  1080. fn: function (keyDownBlock,keyUpBlock){
  1081. var self=this;
  1082. return smalltalk.withContext(function($ctx1) {
  1083. var $1,$2;
  1084. $1=_st(self._wrapper())._asJQuery();
  1085. _st($1)._keydown_(keyDownBlock);
  1086. $2=_st($1)._keyup_(keyUpBlock);
  1087. return self}, function($ctx1) {$ctx1.fill(self,"bindKeyDown:up:",{keyDownBlock:keyDownBlock,keyUpBlock:keyUpBlock},smalltalk.HLWidget)})},
  1088. messageSends: ["keydown:", "asJQuery", "wrapper", "keyup:"]}),
  1089. smalltalk.HLWidget);
  1090. smalltalk.addMethod(
  1091. smalltalk.method({
  1092. selector: "canHaveFocus",
  1093. fn: function (){
  1094. var self=this;
  1095. return smalltalk.withContext(function($ctx1) {
  1096. return false;
  1097. }, function($ctx1) {$ctx1.fill(self,"canHaveFocus",{},smalltalk.HLWidget)})},
  1098. messageSends: []}),
  1099. smalltalk.HLWidget);
  1100. smalltalk.addMethod(
  1101. smalltalk.method({
  1102. selector: "confirm:ifTrue:",
  1103. fn: function (aString,aBlock){
  1104. var self=this;
  1105. return smalltalk.withContext(function($ctx1) {
  1106. _st(self._manager())._confirm_ifTrue_(aString,aBlock);
  1107. return self}, function($ctx1) {$ctx1.fill(self,"confirm:ifTrue:",{aString:aString,aBlock:aBlock},smalltalk.HLWidget)})},
  1108. messageSends: ["confirm:ifTrue:", "manager"]}),
  1109. smalltalk.HLWidget);
  1110. smalltalk.addMethod(
  1111. smalltalk.method({
  1112. selector: "execute:",
  1113. fn: function (aCommand){
  1114. var self=this;
  1115. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  1116. return smalltalk.withContext(function($ctx1) {
  1117. var $1,$2;
  1118. $1=_st(_st($HLManager())._current())._keyBinder();
  1119. _st($1)._activate();
  1120. $2=_st($1)._applyBinding_(_st(aCommand)._asBinding());
  1121. return self}, function($ctx1) {$ctx1.fill(self,"execute:",{aCommand:aCommand},smalltalk.HLWidget)})},
  1122. messageSends: ["activate", "keyBinder", "current", "applyBinding:", "asBinding"]}),
  1123. smalltalk.HLWidget);
  1124. smalltalk.addMethod(
  1125. smalltalk.method({
  1126. selector: "manager",
  1127. fn: function (){
  1128. var self=this;
  1129. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  1130. return smalltalk.withContext(function($ctx1) {
  1131. var $1;
  1132. $1=_st($HLManager())._current();
  1133. return $1;
  1134. }, function($ctx1) {$ctx1.fill(self,"manager",{},smalltalk.HLWidget)})},
  1135. messageSends: ["current"]}),
  1136. smalltalk.HLWidget);
  1137. smalltalk.addMethod(
  1138. smalltalk.method({
  1139. selector: "openAsTab",
  1140. fn: function (){
  1141. var self=this;
  1142. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  1143. function $HLTabWidget(){return smalltalk.HLTabWidget||(typeof HLTabWidget=="undefined"?nil:HLTabWidget)}
  1144. return smalltalk.withContext(function($ctx1) {
  1145. _st(_st($HLManager())._current())._addTab_(_st($HLTabWidget())._on_labelled_(self,_st(self._class())._tabLabel()));
  1146. return self}, function($ctx1) {$ctx1.fill(self,"openAsTab",{},smalltalk.HLWidget)})},
  1147. messageSends: ["addTab:", "current", "on:labelled:", "tabLabel", "class"]}),
  1148. smalltalk.HLWidget);
  1149. smalltalk.addMethod(
  1150. smalltalk.method({
  1151. selector: "refresh",
  1152. fn: function (){
  1153. var self=this;
  1154. return smalltalk.withContext(function($ctx1) {
  1155. var $1,$2;
  1156. $1=self._wrapper();
  1157. if(($receiver = $1) == nil || $receiver == undefined){
  1158. $2=self;
  1159. return $2;
  1160. } else {
  1161. $1;
  1162. };
  1163. _st(_st(self._wrapper())._asJQuery())._empty();
  1164. _st((function(html){
  1165. return smalltalk.withContext(function($ctx2) {
  1166. return self._renderContentOn_(html);
  1167. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,2)})}))._appendToJQuery_(_st(self._wrapper())._asJQuery());
  1168. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLWidget)})},
  1169. messageSends: ["ifNil:", "wrapper", "empty", "asJQuery", "appendToJQuery:", "renderContentOn:"]}),
  1170. smalltalk.HLWidget);
  1171. smalltalk.addMethod(
  1172. smalltalk.method({
  1173. selector: "registerBindings",
  1174. fn: function (){
  1175. var self=this;
  1176. return smalltalk.withContext(function($ctx1) {
  1177. self._registerBindingsOn_(_st(_st(self._manager())._keyBinder())._bindings());
  1178. return self}, function($ctx1) {$ctx1.fill(self,"registerBindings",{},smalltalk.HLWidget)})},
  1179. messageSends: ["registerBindingsOn:", "bindings", "keyBinder", "manager"]}),
  1180. smalltalk.HLWidget);
  1181. smalltalk.addMethod(
  1182. smalltalk.method({
  1183. selector: "registerBindingsOn:",
  1184. fn: function (aBindingGroup){
  1185. var self=this;
  1186. return smalltalk.withContext(function($ctx1) {
  1187. return self}, function($ctx1) {$ctx1.fill(self,"registerBindingsOn:",{aBindingGroup:aBindingGroup},smalltalk.HLWidget)})},
  1188. messageSends: []}),
  1189. smalltalk.HLWidget);
  1190. smalltalk.addMethod(
  1191. smalltalk.method({
  1192. selector: "renderContentOn:",
  1193. fn: function (html){
  1194. var self=this;
  1195. return smalltalk.withContext(function($ctx1) {
  1196. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLWidget)})},
  1197. messageSends: []}),
  1198. smalltalk.HLWidget);
  1199. smalltalk.addMethod(
  1200. smalltalk.method({
  1201. selector: "renderOn:",
  1202. fn: function (html){
  1203. var self=this;
  1204. return smalltalk.withContext(function($ctx1) {
  1205. self["@wrapper"]=_st(html)._div();
  1206. _st((function(renderer){
  1207. return smalltalk.withContext(function($ctx2) {
  1208. return self._renderContentOn_(renderer);
  1209. }, function($ctx2) {$ctx2.fillBlock({renderer:renderer},$ctx1,1)})}))._appendToJQuery_(_st(self["@wrapper"])._asJQuery());
  1210. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.HLWidget)})},
  1211. messageSends: ["div", "appendToJQuery:", "renderContentOn:", "asJQuery"]}),
  1212. smalltalk.HLWidget);
  1213. smalltalk.addMethod(
  1214. smalltalk.method({
  1215. selector: "request:do:",
  1216. fn: function (aString,aBlock){
  1217. var self=this;
  1218. return smalltalk.withContext(function($ctx1) {
  1219. _st(self._manager())._request_do_(aString,aBlock);
  1220. return self}, function($ctx1) {$ctx1.fill(self,"request:do:",{aString:aString,aBlock:aBlock},smalltalk.HLWidget)})},
  1221. messageSends: ["request:do:", "manager"]}),
  1222. smalltalk.HLWidget);
  1223. smalltalk.addMethod(
  1224. smalltalk.method({
  1225. selector: "request:value:do:",
  1226. fn: function (aString,valueString,aBlock){
  1227. var self=this;
  1228. return smalltalk.withContext(function($ctx1) {
  1229. _st(self._manager())._request_value_do_(aString,valueString,aBlock);
  1230. return self}, function($ctx1) {$ctx1.fill(self,"request:value:do:",{aString:aString,valueString:valueString,aBlock:aBlock},smalltalk.HLWidget)})},
  1231. messageSends: ["request:value:do:", "manager"]}),
  1232. smalltalk.HLWidget);
  1233. smalltalk.addMethod(
  1234. smalltalk.method({
  1235. selector: "tabClass",
  1236. fn: function (){
  1237. var self=this;
  1238. return smalltalk.withContext(function($ctx1) {
  1239. var $1;
  1240. $1=_st(self._class())._tabClass();
  1241. return $1;
  1242. }, function($ctx1) {$ctx1.fill(self,"tabClass",{},smalltalk.HLWidget)})},
  1243. messageSends: ["tabClass", "class"]}),
  1244. smalltalk.HLWidget);
  1245. smalltalk.addMethod(
  1246. smalltalk.method({
  1247. selector: "unbindKeyDownUp",
  1248. fn: function (){
  1249. var self=this;
  1250. return smalltalk.withContext(function($ctx1) {
  1251. var $1,$2;
  1252. $1=_st(self._wrapper())._asJQuery();
  1253. _st($1)._unbind_("keydown");
  1254. $2=_st($1)._unbind_("keyup");
  1255. return self}, function($ctx1) {$ctx1.fill(self,"unbindKeyDownUp",{},smalltalk.HLWidget)})},
  1256. messageSends: ["unbind:", "asJQuery", "wrapper"]}),
  1257. smalltalk.HLWidget);
  1258. smalltalk.addMethod(
  1259. smalltalk.method({
  1260. selector: "unregister",
  1261. fn: function (){
  1262. var self=this;
  1263. return smalltalk.withContext(function($ctx1) {
  1264. return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLWidget)})},
  1265. messageSends: []}),
  1266. smalltalk.HLWidget);
  1267. smalltalk.addMethod(
  1268. smalltalk.method({
  1269. selector: "wrapper",
  1270. fn: function (){
  1271. var self=this;
  1272. return smalltalk.withContext(function($ctx1) {
  1273. var $1;
  1274. $1=self["@wrapper"];
  1275. return $1;
  1276. }, function($ctx1) {$ctx1.fill(self,"wrapper",{},smalltalk.HLWidget)})},
  1277. messageSends: []}),
  1278. smalltalk.HLWidget);
  1279. smalltalk.addMethod(
  1280. smalltalk.method({
  1281. selector: "canBeOpenAsTab",
  1282. fn: function (){
  1283. var self=this;
  1284. return smalltalk.withContext(function($ctx1) {
  1285. return false;
  1286. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLWidget.klass)})},
  1287. messageSends: []}),
  1288. smalltalk.HLWidget.klass);
  1289. smalltalk.addMethod(
  1290. smalltalk.method({
  1291. selector: "openAsTab",
  1292. fn: function (){
  1293. var self=this;
  1294. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  1295. function $HLTabWidget(){return smalltalk.HLTabWidget||(typeof HLTabWidget=="undefined"?nil:HLTabWidget)}
  1296. return smalltalk.withContext(function($ctx1) {
  1297. _st(_st($HLManager())._current())._addTab_(_st($HLTabWidget())._on_labelled_(self._new(),self._tabLabel()));
  1298. return self}, function($ctx1) {$ctx1.fill(self,"openAsTab",{},smalltalk.HLWidget.klass)})},
  1299. messageSends: ["addTab:", "current", "on:labelled:", "new", "tabLabel"]}),
  1300. smalltalk.HLWidget.klass);
  1301. smalltalk.addMethod(
  1302. smalltalk.method({
  1303. selector: "tabClass",
  1304. fn: function (){
  1305. var self=this;
  1306. return smalltalk.withContext(function($ctx1) {
  1307. return "";
  1308. }, function($ctx1) {$ctx1.fill(self,"tabClass",{},smalltalk.HLWidget.klass)})},
  1309. messageSends: []}),
  1310. smalltalk.HLWidget.klass);
  1311. smalltalk.addMethod(
  1312. smalltalk.method({
  1313. selector: "tabLabel",
  1314. fn: function (){
  1315. var self=this;
  1316. return smalltalk.withContext(function($ctx1) {
  1317. return "Tab";
  1318. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLWidget.klass)})},
  1319. messageSends: []}),
  1320. smalltalk.HLWidget.klass);
  1321. smalltalk.addMethod(
  1322. smalltalk.method({
  1323. selector: "tabPriority",
  1324. fn: function (){
  1325. var self=this;
  1326. return smalltalk.withContext(function($ctx1) {
  1327. return (500);
  1328. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLWidget.klass)})},
  1329. messageSends: []}),
  1330. smalltalk.HLWidget.klass);
  1331. smalltalk.addClass('HLFocusableWidget', smalltalk.HLWidget, [], 'Helios-Core');
  1332. smalltalk.addMethod(
  1333. smalltalk.method({
  1334. selector: "blur",
  1335. fn: function (){
  1336. var self=this;
  1337. return smalltalk.withContext(function($ctx1) {
  1338. _st(_st(self._wrapper())._asJQuery())._blur();
  1339. return self}, function($ctx1) {$ctx1.fill(self,"blur",{},smalltalk.HLFocusableWidget)})},
  1340. messageSends: ["blur", "asJQuery", "wrapper"]}),
  1341. smalltalk.HLFocusableWidget);
  1342. smalltalk.addMethod(
  1343. smalltalk.method({
  1344. selector: "canHaveFocus",
  1345. fn: function (){
  1346. var self=this;
  1347. return smalltalk.withContext(function($ctx1) {
  1348. return true;
  1349. }, function($ctx1) {$ctx1.fill(self,"canHaveFocus",{},smalltalk.HLFocusableWidget)})},
  1350. messageSends: []}),
  1351. smalltalk.HLFocusableWidget);
  1352. smalltalk.addMethod(
  1353. smalltalk.method({
  1354. selector: "focus",
  1355. fn: function (){
  1356. var self=this;
  1357. return smalltalk.withContext(function($ctx1) {
  1358. _st(_st(self._wrapper())._asJQuery())._focus();
  1359. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLFocusableWidget)})},
  1360. messageSends: ["focus", "asJQuery", "wrapper"]}),
  1361. smalltalk.HLFocusableWidget);
  1362. smalltalk.addMethod(
  1363. smalltalk.method({
  1364. selector: "focusClass",
  1365. fn: function (){
  1366. var self=this;
  1367. return smalltalk.withContext(function($ctx1) {
  1368. return "focused";
  1369. }, function($ctx1) {$ctx1.fill(self,"focusClass",{},smalltalk.HLFocusableWidget)})},
  1370. messageSends: []}),
  1371. smalltalk.HLFocusableWidget);
  1372. smalltalk.addMethod(
  1373. smalltalk.method({
  1374. selector: "hasFocus",
  1375. fn: function (){
  1376. var self=this;
  1377. return smalltalk.withContext(function($ctx1) {
  1378. var $1;
  1379. $1=_st(_st(self._wrapper())._notNil())._and_((function(){
  1380. return smalltalk.withContext(function($ctx2) {
  1381. return _st(_st(self._wrapper())._asJQuery())._hasClass_(self._focusClass());
  1382. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1383. return $1;
  1384. }, function($ctx1) {$ctx1.fill(self,"hasFocus",{},smalltalk.HLFocusableWidget)})},
  1385. messageSends: ["and:", "notNil", "wrapper", "hasClass:", "asJQuery", "focusClass"]}),
  1386. smalltalk.HLFocusableWidget);
  1387. smalltalk.addMethod(
  1388. smalltalk.method({
  1389. selector: "renderContentOn:",
  1390. fn: function (html){
  1391. var self=this;
  1392. return smalltalk.withContext(function($ctx1) {
  1393. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLFocusableWidget)})},
  1394. messageSends: []}),
  1395. smalltalk.HLFocusableWidget);
  1396. smalltalk.addMethod(
  1397. smalltalk.method({
  1398. selector: "renderOn:",
  1399. fn: function (html){
  1400. var self=this;
  1401. return smalltalk.withContext(function($ctx1) {
  1402. var $1,$2,$3,$4;
  1403. $1=_st(html)._div();
  1404. _st($1)._class_("hl_widget");
  1405. $2=_st($1)._yourself();
  1406. self["@wrapper"]=$2;
  1407. _st(self["@wrapper"])._with_((function(){
  1408. return smalltalk.withContext(function($ctx2) {
  1409. return self._renderContentOn_(html);
  1410. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1411. $3=self["@wrapper"];
  1412. _st($3)._at_put_("tabindex","0");
  1413. _st($3)._onBlur_((function(){
  1414. return smalltalk.withContext(function($ctx2) {
  1415. return _st(_st(self._wrapper())._asJQuery())._removeClass_(self._focusClass());
  1416. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  1417. $4=_st($3)._onFocus_((function(){
  1418. return smalltalk.withContext(function($ctx2) {
  1419. return _st(_st(self._wrapper())._asJQuery())._addClass_(self._focusClass());
  1420. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  1421. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.HLFocusableWidget)})},
  1422. messageSends: ["class:", "div", "yourself", "with:", "renderContentOn:", "at:put:", "onBlur:", "removeClass:", "asJQuery", "wrapper", "focusClass", "onFocus:", "addClass:"]}),
  1423. smalltalk.HLFocusableWidget);
  1424. smalltalk.addClass('HLListWidget', smalltalk.HLFocusableWidget, ['items', 'selectedItem', 'mapping'], 'Helios-Core');
  1425. smalltalk.addMethod(
  1426. smalltalk.method({
  1427. selector: "activateFirstListItem",
  1428. fn: function (){
  1429. var self=this;
  1430. return smalltalk.withContext(function($ctx1) {
  1431. self._activateListItem_(_st(window)._jQuery_(_st(_st(_st(self["@wrapper"])._asJQuery())._find_("li.inactive"))._get_((0))));
  1432. return self}, function($ctx1) {$ctx1.fill(self,"activateFirstListItem",{},smalltalk.HLListWidget)})},
  1433. messageSends: ["activateListItem:", "jQuery:", "get:", "find:", "asJQuery"]}),
  1434. smalltalk.HLListWidget);
  1435. smalltalk.addMethod(
  1436. smalltalk.method({
  1437. selector: "activateItem:",
  1438. fn: function (anObject){
  1439. var self=this;
  1440. return smalltalk.withContext(function($ctx1) {
  1441. var $1;
  1442. var $early={};
  1443. try {
  1444. self._activateListItem_(_st(_st(self["@mapping"])._at_ifAbsent_(anObject,(function(){
  1445. return smalltalk.withContext(function($ctx2) {
  1446. $1=self;
  1447. throw $early=[$1];
  1448. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})})))._asJQuery());
  1449. return self}
  1450. catch(e) {if(e===$early)return e[0]; throw e}
  1451. }, function($ctx1) {$ctx1.fill(self,"activateItem:",{anObject:anObject},smalltalk.HLListWidget)})},
  1452. messageSends: ["activateListItem:", "asJQuery", "at:ifAbsent:"]}),
  1453. smalltalk.HLListWidget);
  1454. smalltalk.addMethod(
  1455. smalltalk.method({
  1456. selector: "activateListItem:",
  1457. fn: function (aListItem){
  1458. var self=this;
  1459. var item;
  1460. return smalltalk.withContext(function($ctx1) {
  1461. var $1,$2,$3;
  1462. $1=_st(aListItem)._get_((0));
  1463. if(($receiver = $1) == nil || $receiver == undefined){
  1464. $2=self;
  1465. return $2;
  1466. } else {
  1467. $1;
  1468. };
  1469. _st(_st(_st(aListItem)._parent())._children())._removeClass_("active");
  1470. _st(aListItem)._addClass_("active");
  1471. self._ensureVisible_(aListItem);
  1472. item=_st(self._items())._at_(_st(_st(aListItem)._attr_("list-data"))._asNumber());
  1473. $3=_st(self._selectedItem()).__eq_eq(item);
  1474. if(! smalltalk.assert($3)){
  1475. self._selectItem_(item);
  1476. };
  1477. return self}, function($ctx1) {$ctx1.fill(self,"activateListItem:",{aListItem:aListItem,item:item},smalltalk.HLListWidget)})},
  1478. messageSends: ["ifNil:", "get:", "removeClass:", "children", "parent", "addClass:", "ensureVisible:", "at:", "items", "asNumber", "attr:", "ifFalse:", "==", "selectedItem", "selectItem:"]}),
  1479. smalltalk.HLListWidget);
  1480. smalltalk.addMethod(
  1481. smalltalk.method({
  1482. selector: "activateNextListItem",
  1483. fn: function (){
  1484. var self=this;
  1485. return smalltalk.withContext(function($ctx1) {
  1486. self._activateListItem_(_st(_st(_st(self._wrapper())._asJQuery())._find_("li.active"))._next());
  1487. _st(_st(_st(_st(self._wrapper())._asJQuery())._find_(" .active"))._get())._ifEmpty_((function(){
  1488. return smalltalk.withContext(function($ctx2) {
  1489. return self._activateFirstListItem();
  1490. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1491. return self}, function($ctx1) {$ctx1.fill(self,"activateNextListItem",{},smalltalk.HLListWidget)})},
  1492. messageSends: ["activateListItem:", "next", "find:", "asJQuery", "wrapper", "ifEmpty:", "get", "activateFirstListItem"]}),
  1493. smalltalk.HLListWidget);
  1494. smalltalk.addMethod(
  1495. smalltalk.method({
  1496. selector: "activatePreviousListItem",
  1497. fn: function (){
  1498. var self=this;
  1499. return smalltalk.withContext(function($ctx1) {
  1500. self._activateListItem_(_st(_st(_st(self._wrapper())._asJQuery())._find_("li.active"))._prev());
  1501. return self}, function($ctx1) {$ctx1.fill(self,"activatePreviousListItem",{},smalltalk.HLListWidget)})},
  1502. messageSends: ["activateListItem:", "prev", "find:", "asJQuery", "wrapper"]}),
  1503. smalltalk.HLListWidget);
  1504. smalltalk.addMethod(
  1505. smalltalk.method({
  1506. selector: "cssClassForItem:",
  1507. fn: function (anObject){
  1508. var self=this;
  1509. return smalltalk.withContext(function($ctx1) {
  1510. return "";
  1511. }, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{anObject:anObject},smalltalk.HLListWidget)})},
  1512. messageSends: []}),
  1513. smalltalk.HLListWidget);
  1514. smalltalk.addMethod(
  1515. smalltalk.method({
  1516. selector: "defaultItems",
  1517. fn: function (){
  1518. var self=this;
  1519. return smalltalk.withContext(function($ctx1) {
  1520. var $1;
  1521. $1=[];
  1522. return $1;
  1523. }, function($ctx1) {$ctx1.fill(self,"defaultItems",{},smalltalk.HLListWidget)})},
  1524. messageSends: []}),
  1525. smalltalk.HLListWidget);
  1526. smalltalk.addMethod(
  1527. smalltalk.method({
  1528. selector: "ensureVisible:",
  1529. fn: function (aListItem){
  1530. var self=this;
  1531. var perent,position;
  1532. return smalltalk.withContext(function($ctx1) {
  1533. var $1,$2;
  1534. position=self._positionOf_(aListItem);
  1535. parent=_st(aListItem)._parent();
  1536. $1=_st(_st(_st(aListItem)._position())._top()).__lt((0));
  1537. if(smalltalk.assert($1)){
  1538. _st(_st(parent)._get_((0)))._scrollTop_(_st(_st(_st(_st(parent)._get_((0)))._scrollTop()).__plus(_st(_st(aListItem)._position())._top())).__minus((10)));
  1539. };
  1540. $2=_st(_st(_st(_st(aListItem)._position())._top()).__plus(_st(aListItem)._height())).__gt(_st(parent)._height());
  1541. if(smalltalk.assert($2)){
  1542. _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)));
  1543. };
  1544. return self}, function($ctx1) {$ctx1.fill(self,"ensureVisible:",{aListItem:aListItem,perent:perent,position:position},smalltalk.HLListWidget)})},
  1545. messageSends: ["positionOf:", "parent", "ifTrue:", "<", "top", "position", "scrollTop:", "get:", "-", "+", "scrollTop", ">", "height"]}),
  1546. smalltalk.HLListWidget);
  1547. smalltalk.addMethod(
  1548. smalltalk.method({
  1549. selector: "focus",
  1550. fn: function (){
  1551. var self=this;
  1552. return smalltalk.withContext(function($ctx1) {
  1553. var $1,$2;
  1554. smalltalk.HLListWidget.superclass.fn.prototype._focus.apply(_st(self), []);
  1555. $1=_st(self._items())._isEmpty();
  1556. if(! smalltalk.assert($1)){
  1557. $2=self._selectedItem();
  1558. if(($receiver = $2) == nil || $receiver == undefined){
  1559. self._activateFirstListItem();
  1560. } else {
  1561. $2;
  1562. };
  1563. };
  1564. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLListWidget)})},
  1565. messageSends: ["focus", "ifFalse:", "isEmpty", "items", "ifNil:", "selectedItem", "activateFirstListItem"]}),
  1566. smalltalk.HLListWidget);
  1567. smalltalk.addMethod(
  1568. smalltalk.method({
  1569. selector: "initialize",
  1570. fn: function (){
  1571. var self=this;
  1572. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  1573. return smalltalk.withContext(function($ctx1) {
  1574. smalltalk.HLListWidget.superclass.fn.prototype._initialize.apply(_st(self), []);
  1575. self["@mapping"]=_st($Dictionary())._new();
  1576. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLListWidget)})},
  1577. messageSends: ["initialize", "new"]}),
  1578. smalltalk.HLListWidget);
  1579. smalltalk.addMethod(
  1580. smalltalk.method({
  1581. selector: "items",
  1582. fn: function (){
  1583. var self=this;
  1584. return smalltalk.withContext(function($ctx1) {
  1585. var $2,$1;
  1586. $2=self["@items"];
  1587. if(($receiver = $2) == nil || $receiver == undefined){
  1588. self["@items"]=self._defaultItems();
  1589. $1=self["@items"];
  1590. } else {
  1591. $1=$2;
  1592. };
  1593. return $1;
  1594. }, function($ctx1) {$ctx1.fill(self,"items",{},smalltalk.HLListWidget)})},
  1595. messageSends: ["ifNil:", "defaultItems"]}),
  1596. smalltalk.HLListWidget);
  1597. smalltalk.addMethod(
  1598. smalltalk.method({
  1599. selector: "items:",
  1600. fn: function (aCollection){
  1601. var self=this;
  1602. return smalltalk.withContext(function($ctx1) {
  1603. self["@items"]=aCollection;
  1604. return self}, function($ctx1) {$ctx1.fill(self,"items:",{aCollection:aCollection},smalltalk.HLListWidget)})},
  1605. messageSends: []}),
  1606. smalltalk.HLListWidget);
  1607. smalltalk.addMethod(
  1608. smalltalk.method({
  1609. selector: "listCssClassForItem:",
  1610. fn: function (anObject){
  1611. var self=this;
  1612. return smalltalk.withContext(function($ctx1) {
  1613. var $2,$1;
  1614. $2=_st(self._selectedItem()).__eq(anObject);
  1615. if(smalltalk.assert($2)){
  1616. $1="active";
  1617. } else {
  1618. $1="inactive";
  1619. };
  1620. return $1;
  1621. }, function($ctx1) {$ctx1.fill(self,"listCssClassForItem:",{anObject:anObject},smalltalk.HLListWidget)})},
  1622. messageSends: ["ifTrue:ifFalse:", "=", "selectedItem"]}),
  1623. smalltalk.HLListWidget);
  1624. smalltalk.addMethod(
  1625. smalltalk.method({
  1626. selector: "positionOf:",
  1627. fn: function (aListItem){
  1628. var self=this;
  1629. return smalltalk.withContext(function($ctx1) {
  1630. return aListItem.parent().children().get().indexOf(aListItem.get(0)) + 1
  1631. ;
  1632. return self}, function($ctx1) {$ctx1.fill(self,"positionOf:",{aListItem:aListItem},smalltalk.HLListWidget)})},
  1633. messageSends: []}),
  1634. smalltalk.HLListWidget);
  1635. smalltalk.addMethod(
  1636. smalltalk.method({
  1637. selector: "refresh",
  1638. fn: function (){
  1639. var self=this;
  1640. return smalltalk.withContext(function($ctx1) {
  1641. var $1;
  1642. var $early={};
  1643. try {
  1644. smalltalk.HLListWidget.superclass.fn.prototype._refresh.apply(_st(self), []);
  1645. self._ensureVisible_(_st(_st(self["@mapping"])._at_ifAbsent_(self._selectedItem(),(function(){
  1646. return smalltalk.withContext(function($ctx2) {
  1647. $1=self;
  1648. throw $early=[$1];
  1649. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})})))._asJQuery());
  1650. return self}
  1651. catch(e) {if(e===$early)return e[0]; throw e}
  1652. }, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLListWidget)})},
  1653. messageSends: ["refresh", "ensureVisible:", "asJQuery", "at:ifAbsent:", "selectedItem"]}),
  1654. smalltalk.HLListWidget);
  1655. smalltalk.addMethod(
  1656. smalltalk.method({
  1657. selector: "registerMappingFrom:to:",
  1658. fn: function (anObject,aTag){
  1659. var self=this;
  1660. return smalltalk.withContext(function($ctx1) {
  1661. _st(self["@mapping"])._at_put_(anObject,aTag);
  1662. return self}, function($ctx1) {$ctx1.fill(self,"registerMappingFrom:to:",{anObject:anObject,aTag:aTag},smalltalk.HLListWidget)})},
  1663. messageSends: ["at:put:"]}),
  1664. smalltalk.HLListWidget);
  1665. smalltalk.addMethod(
  1666. smalltalk.method({
  1667. selector: "renderButtonsOn:",
  1668. fn: function (html){
  1669. var self=this;
  1670. return smalltalk.withContext(function($ctx1) {
  1671. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLListWidget)})},
  1672. messageSends: []}),
  1673. smalltalk.HLListWidget);
  1674. smalltalk.addMethod(
  1675. smalltalk.method({
  1676. selector: "renderContentOn:",
  1677. fn: function (html){
  1678. var self=this;
  1679. return smalltalk.withContext(function($ctx1) {
  1680. var $1,$2,$3,$4;
  1681. $1=_st(html)._ul();
  1682. _st($1)._class_("nav nav-pills nav-stacked");
  1683. $2=_st($1)._with_((function(){
  1684. return smalltalk.withContext(function($ctx2) {
  1685. return self._renderListOn_(html);
  1686. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1687. $3=_st(html)._div();
  1688. _st($3)._class_("pane_actions form-actions");
  1689. $4=_st($3)._with_((function(){
  1690. return smalltalk.withContext(function($ctx2) {
  1691. return self._renderButtonsOn_(html);
  1692. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  1693. self._setupKeyBindings();
  1694. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLListWidget)})},
  1695. messageSends: ["class:", "ul", "with:", "renderListOn:", "div", "renderButtonsOn:", "setupKeyBindings"]}),
  1696. smalltalk.HLListWidget);
  1697. smalltalk.addMethod(
  1698. smalltalk.method({
  1699. selector: "renderItem:on:",
  1700. fn: function (anObject,html){
  1701. var self=this;
  1702. var li;
  1703. return smalltalk.withContext(function($ctx1) {
  1704. var $1,$3,$4,$2;
  1705. li=_st(html)._li();
  1706. self._registerMappingFrom_to_(anObject,li);
  1707. $1=li;
  1708. _st($1)._at_put_("list-data",_st(_st(self._items())._indexOf_(anObject))._asString());
  1709. _st($1)._class_(self._listCssClassForItem_(anObject));
  1710. $2=_st($1)._with_((function(){
  1711. return smalltalk.withContext(function($ctx2) {
  1712. $3=_st(html)._a();
  1713. _st($3)._with_((function(){
  1714. return smalltalk.withContext(function($ctx3) {
  1715. _st(_st(html)._tag_("i"))._class_(self._cssClassForItem_(anObject));
  1716. return self._renderItemLabel_on_(anObject,html);
  1717. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  1718. $4=_st($3)._onClick_((function(){
  1719. return smalltalk.withContext(function($ctx3) {
  1720. return self._activateListItem_(_st(li)._asJQuery());
  1721. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1722. return $4;
  1723. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1724. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:on:",{anObject:anObject,html:html,li:li},smalltalk.HLListWidget)})},
  1725. messageSends: ["li", "registerMappingFrom:to:", "at:put:", "asString", "indexOf:", "items", "class:", "listCssClassForItem:", "with:", "a", "tag:", "cssClassForItem:", "renderItemLabel:on:", "onClick:", "activateListItem:", "asJQuery"]}),
  1726. smalltalk.HLListWidget);
  1727. smalltalk.addMethod(
  1728. smalltalk.method({
  1729. selector: "renderItemLabel:on:",
  1730. fn: function (anObject,html){
  1731. var self=this;
  1732. return smalltalk.withContext(function($ctx1) {
  1733. _st(html)._with_(_st(anObject)._asString());
  1734. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{anObject:anObject,html:html},smalltalk.HLListWidget)})},
  1735. messageSends: ["with:", "asString"]}),
  1736. smalltalk.HLListWidget);
  1737. smalltalk.addMethod(
  1738. smalltalk.method({
  1739. selector: "renderListOn:",
  1740. fn: function (html){
  1741. var self=this;
  1742. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  1743. return smalltalk.withContext(function($ctx1) {
  1744. self["@mapping"]=_st($Dictionary())._new();
  1745. _st(self._items())._do_((function(each){
  1746. return smalltalk.withContext(function($ctx2) {
  1747. return self._renderItem_on_(each,html);
  1748. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  1749. return self}, function($ctx1) {$ctx1.fill(self,"renderListOn:",{html:html},smalltalk.HLListWidget)})},
  1750. messageSends: ["new", "do:", "items", "renderItem:on:"]}),
  1751. smalltalk.HLListWidget);
  1752. smalltalk.addMethod(
  1753. smalltalk.method({
  1754. selector: "selectItem:",
  1755. fn: function (anObject){
  1756. var self=this;
  1757. return smalltalk.withContext(function($ctx1) {
  1758. self._selectedItem_(anObject);
  1759. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{anObject:anObject},smalltalk.HLListWidget)})},
  1760. messageSends: ["selectedItem:"]}),
  1761. smalltalk.HLListWidget);
  1762. smalltalk.addMethod(
  1763. smalltalk.method({
  1764. selector: "selectedItem",
  1765. fn: function (){
  1766. var self=this;
  1767. return smalltalk.withContext(function($ctx1) {
  1768. var $1;
  1769. $1=self["@selectedItem"];
  1770. return $1;
  1771. }, function($ctx1) {$ctx1.fill(self,"selectedItem",{},smalltalk.HLListWidget)})},
  1772. messageSends: []}),
  1773. smalltalk.HLListWidget);
  1774. smalltalk.addMethod(
  1775. smalltalk.method({
  1776. selector: "selectedItem:",
  1777. fn: function (anObject){
  1778. var self=this;
  1779. return smalltalk.withContext(function($ctx1) {
  1780. self["@selectedItem"]=anObject;
  1781. return self}, function($ctx1) {$ctx1.fill(self,"selectedItem:",{anObject:anObject},smalltalk.HLListWidget)})},
  1782. messageSends: []}),
  1783. smalltalk.HLListWidget);
  1784. smalltalk.addMethod(
  1785. smalltalk.method({
  1786. selector: "setupKeyBindings",
  1787. fn: function (){
  1788. var self=this;
  1789. function $HLRepeatingKeyBindingHandler(){return smalltalk.HLRepeatingKeyBindingHandler||(typeof HLRepeatingKeyBindingHandler=="undefined"?nil:HLRepeatingKeyBindingHandler)}
  1790. return smalltalk.withContext(function($ctx1) {
  1791. var $1,$2;
  1792. $1=_st($HLRepeatingKeyBindingHandler())._forWidget_(self);
  1793. _st($1)._whileKeyPressed_do_((38),(function(){
  1794. return smalltalk.withContext(function($ctx2) {
  1795. return self._activatePreviousListItem();
  1796. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1797. _st($1)._whileKeyPressed_do_((40),(function(){
  1798. return smalltalk.withContext(function($ctx2) {
  1799. return self._activateNextListItem();
  1800. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  1801. $2=_st($1)._rebindKeys();
  1802. return self}, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},smalltalk.HLListWidget)})},
  1803. messageSends: ["whileKeyPressed:do:", "forWidget:", "activatePreviousListItem", "activateNextListItem", "rebindKeys"]}),
  1804. smalltalk.HLListWidget);
  1805. smalltalk.addClass('HLNavigationListWidget', smalltalk.HLListWidget, ['previous', 'next'], 'Helios-Core');
  1806. smalltalk.addMethod(
  1807. smalltalk.method({
  1808. selector: "next",
  1809. fn: function (){
  1810. var self=this;
  1811. return smalltalk.withContext(function($ctx1) {
  1812. var $1;
  1813. $1=self["@next"];
  1814. return $1;
  1815. }, function($ctx1) {$ctx1.fill(self,"next",{},smalltalk.HLNavigationListWidget)})},
  1816. messageSends: []}),
  1817. smalltalk.HLNavigationListWidget);
  1818. smalltalk.addMethod(
  1819. smalltalk.method({
  1820. selector: "next:",
  1821. fn: function (aWidget){
  1822. var self=this;
  1823. return smalltalk.withContext(function($ctx1) {
  1824. var $1;
  1825. self["@next"]=aWidget;
  1826. $1=_st(_st(aWidget)._previous()).__eq(self);
  1827. if(! smalltalk.assert($1)){
  1828. _st(aWidget)._previous_(self);
  1829. };
  1830. return self}, function($ctx1) {$ctx1.fill(self,"next:",{aWidget:aWidget},smalltalk.HLNavigationListWidget)})},
  1831. messageSends: ["ifFalse:", "=", "previous", "previous:"]}),
  1832. smalltalk.HLNavigationListWidget);
  1833. smalltalk.addMethod(
  1834. smalltalk.method({
  1835. selector: "nextFocus",
  1836. fn: function (){
  1837. var self=this;
  1838. return smalltalk.withContext(function($ctx1) {
  1839. var $1;
  1840. $1=self._next();
  1841. if(($receiver = $1) == nil || $receiver == undefined){
  1842. $1;
  1843. } else {
  1844. _st(self._next())._focus();
  1845. };
  1846. return self}, function($ctx1) {$ctx1.fill(self,"nextFocus",{},smalltalk.HLNavigationListWidget)})},
  1847. messageSends: ["ifNotNil:", "next", "focus"]}),
  1848. smalltalk.HLNavigationListWidget);
  1849. smalltalk.addMethod(
  1850. smalltalk.method({
  1851. selector: "previous",
  1852. fn: function (){
  1853. var self=this;
  1854. return smalltalk.withContext(function($ctx1) {
  1855. var $1;
  1856. $1=self["@previous"];
  1857. return $1;
  1858. }, function($ctx1) {$ctx1.fill(self,"previous",{},smalltalk.HLNavigationListWidget)})},
  1859. messageSends: []}),
  1860. smalltalk.HLNavigationListWidget);
  1861. smalltalk.addMethod(
  1862. smalltalk.method({
  1863. selector: "previous:",
  1864. fn: function (aWidget){
  1865. var self=this;
  1866. return smalltalk.withContext(function($ctx1) {
  1867. var $1;
  1868. self["@previous"]=aWidget;
  1869. $1=_st(_st(aWidget)._next()).__eq(self);
  1870. if(! smalltalk.assert($1)){
  1871. _st(aWidget)._next_(self);
  1872. };
  1873. return self}, function($ctx1) {$ctx1.fill(self,"previous:",{aWidget:aWidget},smalltalk.HLNavigationListWidget)})},
  1874. messageSends: ["ifFalse:", "=", "next", "next:"]}),
  1875. smalltalk.HLNavigationListWidget);
  1876. smalltalk.addMethod(
  1877. smalltalk.method({
  1878. selector: "previousFocus",
  1879. fn: function (){
  1880. var self=this;
  1881. return smalltalk.withContext(function($ctx1) {
  1882. var $1;
  1883. $1=self._previous();
  1884. if(($receiver = $1) == nil || $receiver == undefined){
  1885. $1;
  1886. } else {
  1887. _st(self._previous())._focus();
  1888. };
  1889. return self}, function($ctx1) {$ctx1.fill(self,"previousFocus",{},smalltalk.HLNavigationListWidget)})},
  1890. messageSends: ["ifNotNil:", "previous", "focus"]}),
  1891. smalltalk.HLNavigationListWidget);
  1892. smalltalk.addMethod(
  1893. smalltalk.method({
  1894. selector: "setupKeyBindings",
  1895. fn: function (){
  1896. var self=this;
  1897. return smalltalk.withContext(function($ctx1) {
  1898. var $1,$2;
  1899. smalltalk.HLNavigationListWidget.superclass.fn.prototype._setupKeyBindings.apply(_st(self), []);
  1900. _st(_st(self._wrapper())._asJQuery())._keydown_((function(e){
  1901. return smalltalk.withContext(function($ctx2) {
  1902. $1=_st(_st(e)._which()).__eq((39));
  1903. if(smalltalk.assert($1)){
  1904. self._nextFocus();
  1905. };
  1906. $2=_st(_st(e)._which()).__eq((37));
  1907. if(smalltalk.assert($2)){
  1908. return self._previousFocus();
  1909. };
  1910. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,1)})}));
  1911. return self}, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},smalltalk.HLNavigationListWidget)})},
  1912. messageSends: ["setupKeyBindings", "keydown:", "asJQuery", "wrapper", "ifTrue:", "=", "which", "nextFocus", "previousFocus"]}),
  1913. smalltalk.HLNavigationListWidget);
  1914. smalltalk.addClass('HLToolListWidget', smalltalk.HLNavigationListWidget, ['model'], 'Helios-Core');
  1915. smalltalk.addMethod(
  1916. smalltalk.method({
  1917. selector: "activateListItem:",
  1918. fn: function (anItem){
  1919. var self=this;
  1920. return smalltalk.withContext(function($ctx1) {
  1921. _st(self._model())._withChangesDo_((function(){
  1922. return smalltalk.withContext(function($ctx2) {
  1923. return smalltalk.HLToolListWidget.superclass.fn.prototype._activateListItem_.apply(_st(self), [anItem]);
  1924. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1925. return self}, function($ctx1) {$ctx1.fill(self,"activateListItem:",{anItem:anItem},smalltalk.HLToolListWidget)})},
  1926. messageSends: ["withChangesDo:", "model", "activateListItem:"]}),
  1927. smalltalk.HLToolListWidget);
  1928. smalltalk.addMethod(
  1929. smalltalk.method({
  1930. selector: "activateNextListItem",
  1931. fn: function (){
  1932. var self=this;
  1933. return smalltalk.withContext(function($ctx1) {
  1934. _st(self._model())._withChangesDo_((function(){
  1935. return smalltalk.withContext(function($ctx2) {
  1936. return smalltalk.HLToolListWidget.superclass.fn.prototype._activateNextListItem.apply(_st(self), []);
  1937. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1938. return self}, function($ctx1) {$ctx1.fill(self,"activateNextListItem",{},smalltalk.HLToolListWidget)})},
  1939. messageSends: ["withChangesDo:", "model", "activateNextListItem"]}),
  1940. smalltalk.HLToolListWidget);
  1941. smalltalk.addMethod(
  1942. smalltalk.method({
  1943. selector: "activatePreviousListItem",
  1944. fn: function (){
  1945. var self=this;
  1946. return smalltalk.withContext(function($ctx1) {
  1947. _st(self._model())._withChangesDo_((function(){
  1948. return smalltalk.withContext(function($ctx2) {
  1949. return smalltalk.HLToolListWidget.superclass.fn.prototype._activatePreviousListItem.apply(_st(self), []);
  1950. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1951. return self}, function($ctx1) {$ctx1.fill(self,"activatePreviousListItem",{},smalltalk.HLToolListWidget)})},
  1952. messageSends: ["withChangesDo:", "model", "activatePreviousListItem"]}),
  1953. smalltalk.HLToolListWidget);
  1954. smalltalk.addMethod(
  1955. smalltalk.method({
  1956. selector: "commandCategory",
  1957. fn: function (){
  1958. var self=this;
  1959. return smalltalk.withContext(function($ctx1) {
  1960. var $1;
  1961. $1=self._label();
  1962. return $1;
  1963. }, function($ctx1) {$ctx1.fill(self,"commandCategory",{},smalltalk.HLToolListWidget)})},
  1964. messageSends: ["label"]}),
  1965. smalltalk.HLToolListWidget);
  1966. smalltalk.addMethod(
  1967. smalltalk.method({
  1968. selector: "label",
  1969. fn: function (){
  1970. var self=this;
  1971. return smalltalk.withContext(function($ctx1) {
  1972. return "List";
  1973. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLToolListWidget)})},
  1974. messageSends: []}),
  1975. smalltalk.HLToolListWidget);
  1976. smalltalk.addMethod(
  1977. smalltalk.method({
  1978. selector: "menuCommands",
  1979. fn: function (){
  1980. var self=this;
  1981. function $HLToolCommand(){return smalltalk.HLToolCommand||(typeof HLToolCommand=="undefined"?nil:HLToolCommand)}
  1982. return smalltalk.withContext(function($ctx1) {
  1983. var $1;
  1984. $1=_st(_st(_st(_st($HLToolCommand())._concreteClasses())._select_((function(each){
  1985. return smalltalk.withContext(function($ctx2) {
  1986. return _st(each)._isValidFor_(self._model());
  1987. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._collect_((function(each){
  1988. return smalltalk.withContext(function($ctx2) {
  1989. return _st(each)._for_(self._model());
  1990. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})})))._select_((function(each){
  1991. return smalltalk.withContext(function($ctx2) {
  1992. return _st(_st(_st(each)._category()).__eq(self._commandCategory()))._and_((function(){
  1993. return smalltalk.withContext(function($ctx3) {
  1994. return _st(_st(each)._isAction())._and_((function(){
  1995. return smalltalk.withContext(function($ctx4) {
  1996. return _st(each)._isActive();
  1997. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  1998. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  1999. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})}));
  2000. return $1;
  2001. }, function($ctx1) {$ctx1.fill(self,"menuCommands",{},smalltalk.HLToolListWidget)})},
  2002. messageSends: ["select:", "collect:", "concreteClasses", "isValidFor:", "model", "for:", "and:", "=", "category", "commandCategory", "isAction", "isActive"]}),
  2003. smalltalk.HLToolListWidget);
  2004. smalltalk.addMethod(
  2005. smalltalk.method({
  2006. selector: "model",
  2007. fn: function (){
  2008. var self=this;
  2009. return smalltalk.withContext(function($ctx1) {
  2010. var $1;
  2011. $1=self["@model"];
  2012. return $1;
  2013. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLToolListWidget)})},
  2014. messageSends: []}),
  2015. smalltalk.HLToolListWidget);
  2016. smalltalk.addMethod(
  2017. smalltalk.method({
  2018. selector: "model:",
  2019. fn: function (aBrowserModel){
  2020. var self=this;
  2021. return smalltalk.withContext(function($ctx1) {
  2022. var $1,$2;
  2023. self["@model"]=aBrowserModel;
  2024. $1=self;
  2025. _st($1)._observeSystem();
  2026. $2=_st($1)._observeModel();
  2027. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel},smalltalk.HLToolListWidget)})},
  2028. messageSends: ["observeSystem", "observeModel"]}),
  2029. smalltalk.HLToolListWidget);
  2030. smalltalk.addMethod(
  2031. smalltalk.method({
  2032. selector: "observeModel",
  2033. fn: function (){
  2034. var self=this;
  2035. return smalltalk.withContext(function($ctx1) {
  2036. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLToolListWidget)})},
  2037. messageSends: []}),
  2038. smalltalk.HLToolListWidget);
  2039. smalltalk.addMethod(
  2040. smalltalk.method({
  2041. selector: "observeSystem",
  2042. fn: function (){
  2043. var self=this;
  2044. return smalltalk.withContext(function($ctx1) {
  2045. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLToolListWidget)})},
  2046. messageSends: []}),
  2047. smalltalk.HLToolListWidget);
  2048. smalltalk.addMethod(
  2049. smalltalk.method({
  2050. selector: "renderContentOn:",
  2051. fn: function (html){
  2052. var self=this;
  2053. return smalltalk.withContext(function($ctx1) {
  2054. self._renderHeadOn_(html);
  2055. smalltalk.HLToolListWidget.superclass.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  2056. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLToolListWidget)})},
  2057. messageSends: ["renderHeadOn:", "renderContentOn:"]}),
  2058. smalltalk.HLToolListWidget);
  2059. smalltalk.addMethod(
  2060. smalltalk.method({
  2061. selector: "renderHeadOn:",
  2062. fn: function (html){
  2063. var self=this;
  2064. return smalltalk.withContext(function($ctx1) {
  2065. var $1,$2;
  2066. $1=_st(html)._div();
  2067. _st($1)._class_("list-label");
  2068. $2=_st($1)._with_((function(){
  2069. return smalltalk.withContext(function($ctx2) {
  2070. _st(html)._with_(self._label());
  2071. return self._renderMenuOn_(html);
  2072. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2073. return self}, function($ctx1) {$ctx1.fill(self,"renderHeadOn:",{html:html},smalltalk.HLToolListWidget)})},
  2074. messageSends: ["class:", "div", "with:", "label", "renderMenuOn:"]}),
  2075. smalltalk.HLToolListWidget);
  2076. smalltalk.addMethod(
  2077. smalltalk.method({
  2078. selector: "renderMenuOn:",
  2079. fn: function (html){
  2080. var self=this;
  2081. var commands;
  2082. return smalltalk.withContext(function($ctx1) {
  2083. var $1,$2,$3,$5,$6,$7,$9,$10,$8,$4;
  2084. commands=self._menuCommands();
  2085. $1=_st(commands)._isEmpty();
  2086. if(smalltalk.assert($1)){
  2087. $2=self;
  2088. return $2;
  2089. };
  2090. $3=_st(html)._div();
  2091. _st($3)._class_("btn-group cog");
  2092. $4=_st($3)._with_((function(){
  2093. return smalltalk.withContext(function($ctx2) {
  2094. $5=_st(html)._a();
  2095. _st($5)._class_("btn dropdown-toggle");
  2096. _st($5)._at_put_("data-toggle","dropdown");
  2097. $6=_st($5)._with_((function(){
  2098. return smalltalk.withContext(function($ctx3) {
  2099. return _st(_st(html)._tag_("i"))._class_("icon-cog");
  2100. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  2101. $6;
  2102. $7=_st(html)._ul();
  2103. _st($7)._class_("dropdown-menu pull-right");
  2104. $8=_st($7)._with_((function(){
  2105. return smalltalk.withContext(function($ctx3) {
  2106. return _st(self._menuCommands())._do_((function(each){
  2107. return smalltalk.withContext(function($ctx4) {
  2108. return _st(_st(html)._li())._with_((function(){
  2109. return smalltalk.withContext(function($ctx5) {
  2110. $9=_st(html)._a();
  2111. _st($9)._with_(_st(each)._menuLabel());
  2112. $10=_st($9)._onClick_((function(){
  2113. return smalltalk.withContext(function($ctx6) {
  2114. return self._execute_(each);
  2115. }, function($ctx6) {$ctx6.fillBlock({},$ctx5,7)})}));
  2116. return $10;
  2117. }, function($ctx5) {$ctx5.fillBlock({},$ctx4,6)})}));
  2118. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,5)})}));
  2119. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  2120. return $8;
  2121. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  2122. return self}, function($ctx1) {$ctx1.fill(self,"renderMenuOn:",{html:html,commands:commands},smalltalk.HLToolListWidget)})},
  2123. messageSends: ["menuCommands", "ifTrue:", "isEmpty", "class:", "div", "with:", "a", "at:put:", "tag:", "ul", "do:", "li", "menuLabel", "onClick:", "execute:"]}),
  2124. smalltalk.HLToolListWidget);
  2125. smalltalk.addMethod(
  2126. smalltalk.method({
  2127. selector: "selectedItem:",
  2128. fn: function (anItem){
  2129. var self=this;
  2130. return smalltalk.withContext(function($ctx1) {
  2131. smalltalk.HLToolListWidget.superclass.fn.prototype._selectedItem_.apply(_st(self), [anItem]);
  2132. self._updateMenu();
  2133. return self}, function($ctx1) {$ctx1.fill(self,"selectedItem:",{anItem:anItem},smalltalk.HLToolListWidget)})},
  2134. messageSends: ["selectedItem:", "updateMenu"]}),
  2135. smalltalk.HLToolListWidget);
  2136. smalltalk.addMethod(
  2137. smalltalk.method({
  2138. selector: "unregister",
  2139. fn: function (){
  2140. var self=this;
  2141. return smalltalk.withContext(function($ctx1) {
  2142. smalltalk.HLToolListWidget.superclass.fn.prototype._unregister.apply(_st(self), []);
  2143. _st(_st(self._model())._announcer())._unsubscribe_(self);
  2144. _st(_st(self._model())._systemAnnouncer())._unsubscribe_(self);
  2145. return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLToolListWidget)})},
  2146. messageSends: ["unregister", "unsubscribe:", "announcer", "model", "systemAnnouncer"]}),
  2147. smalltalk.HLToolListWidget);
  2148. smalltalk.addMethod(
  2149. smalltalk.method({
  2150. selector: "updateMenu",
  2151. fn: function (){
  2152. var self=this;
  2153. return smalltalk.withContext(function($ctx1) {
  2154. _st(_st(_st(self._wrapper())._asJQuery())._find_(".cog"))._remove();
  2155. _st((function(html){
  2156. return smalltalk.withContext(function($ctx2) {
  2157. return self._renderMenuOn_(html);
  2158. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}))._appendToJQuery_(_st(_st(self._wrapper())._asJQuery())._find_(".list-label"));
  2159. return self}, function($ctx1) {$ctx1.fill(self,"updateMenu",{},smalltalk.HLToolListWidget)})},
  2160. messageSends: ["remove", "find:", "asJQuery", "wrapper", "appendToJQuery:", "renderMenuOn:"]}),
  2161. smalltalk.HLToolListWidget);
  2162. smalltalk.addMethod(
  2163. smalltalk.method({
  2164. selector: "on:",
  2165. fn: function (aModel){
  2166. var self=this;
  2167. return smalltalk.withContext(function($ctx1) {
  2168. var $2,$3,$1;
  2169. $2=self._new();
  2170. _st($2)._model_(aModel);
  2171. $3=_st($2)._yourself();
  2172. $1=$3;
  2173. return $1;
  2174. }, function($ctx1) {$ctx1.fill(self,"on:",{aModel:aModel},smalltalk.HLToolListWidget.klass)})},
  2175. messageSends: ["model:", "new", "yourself"]}),
  2176. smalltalk.HLToolListWidget.klass);
  2177. smalltalk.addClass('HLManager', smalltalk.HLWidget, ['tabs', 'activeTab', 'keyBinder', 'environment', 'history'], 'Helios-Core');
  2178. smalltalk.addMethod(
  2179. smalltalk.method({
  2180. selector: "activate:",
  2181. fn: function (aTab){
  2182. var self=this;
  2183. return smalltalk.withContext(function($ctx1) {
  2184. var $1,$2;
  2185. _st(self._keyBinder())._flushBindings();
  2186. _st(aTab)._registerBindings();
  2187. self["@activeTab"]=aTab;
  2188. $1=self;
  2189. _st($1)._refresh();
  2190. _st($1)._addToHistory_(aTab);
  2191. $2=_st($1)._show_(aTab);
  2192. return self}, function($ctx1) {$ctx1.fill(self,"activate:",{aTab:aTab},smalltalk.HLManager)})},
  2193. messageSends: ["flushBindings", "keyBinder", "registerBindings", "refresh", "addToHistory:", "show:"]}),
  2194. smalltalk.HLManager);
  2195. smalltalk.addMethod(
  2196. smalltalk.method({
  2197. selector: "activeTab",
  2198. fn: function (){
  2199. var self=this;
  2200. return smalltalk.withContext(function($ctx1) {
  2201. var $1;
  2202. $1=self["@activeTab"];
  2203. return $1;
  2204. }, function($ctx1) {$ctx1.fill(self,"activeTab",{},smalltalk.HLManager)})},
  2205. messageSends: []}),
  2206. smalltalk.HLManager);
  2207. smalltalk.addMethod(
  2208. smalltalk.method({
  2209. selector: "addTab:",
  2210. fn: function (aTab){
  2211. var self=this;
  2212. return smalltalk.withContext(function($ctx1) {
  2213. _st(self._tabs())._add_(aTab);
  2214. self._activate_(aTab);
  2215. return self}, function($ctx1) {$ctx1.fill(self,"addTab:",{aTab:aTab},smalltalk.HLManager)})},
  2216. messageSends: ["add:", "tabs", "activate:"]}),
  2217. smalltalk.HLManager);
  2218. smalltalk.addMethod(
  2219. smalltalk.method({
  2220. selector: "addToHistory:",
  2221. fn: function (aTab){
  2222. var self=this;
  2223. return smalltalk.withContext(function($ctx1) {
  2224. self._removeFromHistory_(aTab);
  2225. _st(self._history())._add_(aTab);
  2226. return self}, function($ctx1) {$ctx1.fill(self,"addToHistory:",{aTab:aTab},smalltalk.HLManager)})},
  2227. messageSends: ["removeFromHistory:", "add:", "history"]}),
  2228. smalltalk.HLManager);
  2229. smalltalk.addMethod(
  2230. smalltalk.method({
  2231. selector: "confirm:ifFalse:",
  2232. fn: function (aString,aBlock){
  2233. var self=this;
  2234. function $HLConfirmationWidget(){return smalltalk.HLConfirmationWidget||(typeof HLConfirmationWidget=="undefined"?nil:HLConfirmationWidget)}
  2235. return smalltalk.withContext(function($ctx1) {
  2236. var $1,$2;
  2237. $1=_st($HLConfirmationWidget())._new();
  2238. _st($1)._confirmationString_(aString);
  2239. _st($1)._cancelBlock_(aBlock);
  2240. $2=_st($1)._yourself();
  2241. _st($2)._appendToJQuery_("body"._asJQuery());
  2242. return self}, function($ctx1) {$ctx1.fill(self,"confirm:ifFalse:",{aString:aString,aBlock:aBlock},smalltalk.HLManager)})},
  2243. messageSends: ["appendToJQuery:", "confirmationString:", "new", "cancelBlock:", "yourself", "asJQuery"]}),
  2244. smalltalk.HLManager);
  2245. smalltalk.addMethod(
  2246. smalltalk.method({
  2247. selector: "confirm:ifTrue:",
  2248. fn: function (aString,aBlock){
  2249. var self=this;
  2250. function $HLConfirmationWidget(){return smalltalk.HLConfirmationWidget||(typeof HLConfirmationWidget=="undefined"?nil:HLConfirmationWidget)}
  2251. return smalltalk.withContext(function($ctx1) {
  2252. var $1,$2;
  2253. $1=_st($HLConfirmationWidget())._new();
  2254. _st($1)._confirmationString_(aString);
  2255. _st($1)._actionBlock_(aBlock);
  2256. $2=_st($1)._yourself();
  2257. _st($2)._appendToJQuery_("body"._asJQuery());
  2258. return self}, function($ctx1) {$ctx1.fill(self,"confirm:ifTrue:",{aString:aString,aBlock:aBlock},smalltalk.HLManager)})},
  2259. messageSends: ["appendToJQuery:", "confirmationString:", "new", "actionBlock:", "yourself", "asJQuery"]}),
  2260. smalltalk.HLManager);
  2261. smalltalk.addMethod(
  2262. smalltalk.method({
  2263. selector: "defaultEnvironment",
  2264. fn: function (){
  2265. var self=this;
  2266. var parent;
  2267. function $Environment(){return smalltalk.Environment||(typeof Environment=="undefined"?nil:Environment)}
  2268. return smalltalk.withContext(function($ctx1) {
  2269. var $1,$2,$3,$4;
  2270. $1=_st(window)._opener();
  2271. if(($receiver = $1) == nil || $receiver == undefined){
  2272. parent=_st(window)._parent();
  2273. } else {
  2274. parent=$1;
  2275. };
  2276. $2=_st(_st(parent)._isNil())._or_((function(){
  2277. return smalltalk.withContext(function($ctx2) {
  2278. return _st(_st(parent)._at_("smalltalk"))._isNil();
  2279. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  2280. if(smalltalk.assert($2)){
  2281. $3=_st($Environment())._new();
  2282. return $3;
  2283. };
  2284. $4=_st(_st(_st(parent)._at_("smalltalk"))._at_("Environment"))._new();
  2285. return $4;
  2286. }, function($ctx1) {$ctx1.fill(self,"defaultEnvironment",{parent:parent},smalltalk.HLManager)})},
  2287. messageSends: ["ifNil:", "opener", "parent", "ifTrue:", "or:", "isNil", "at:", "new"]}),
  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,1)})})));
  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,2)})}));
  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:", "history", "activate", "last"]}),
  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,2)})}));
  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,4)})})))._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,5)})})))._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,8)})}));
  2515. return $8;
  2516. }, function($ctx5) {$ctx5.fillBlock({},$ctx4,7)})}));
  2517. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,6)})}));
  2518. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  2519. return $6;
  2520. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2521. return self}, function($ctx1) {$ctx1.fill(self,"renderAddOn:",{html:html},smalltalk.HLManager)})},
  2522. messageSends: ["class:", "li", "with:", "a", "at:put:", "tag:", "ul", "do:", "sorted:", "select:", "withAllSubclasses", "canBeOpenAsTab", "<", "tabPriority", "tabLabel", "onClick:", "openAsTab"]}),
  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,2)})}));
  2541. return $4;
  2542. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  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,7)})}));
  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,6)})}));
  2582. $11=_st($8)._onClick_((function(){
  2583. return smalltalk.withContext(function($ctx5) {
  2584. return _st(each)._activate();
  2585. }, function($ctx5) {$ctx5.fillBlock({},$ctx4,8)})}));
  2586. return $11;
  2587. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  2588. return $7;
  2589. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  2590. return self._renderAddOn_(html);
  2591. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2592. return self}, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html},smalltalk.HLManager)})},
  2593. messageSends: ["class:", "ul", "with:", "do:", "tabs", "li", "ifTrue:ifFalse:", "isActive", "a", "onClick:", "tag:", "removeTab:", "span", "cssClass", "displayLabel", "activate", "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:", "confirmationString:", "new", "actionBlock:", "value:", "yourself", "asJQuery"]}),
  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,1)})}));
  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:", "tabs", "hide", "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,2)})}));
  2672. if(smalltalk.assert($1)){
  2673. return false;
  2674. };
  2675. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,1)})}));
  2676. return self}, function($ctx1) {$ctx1.fill(self,"clearKeydownEvent",{},smalltalk.HLManager.klass)})},
  2677. messageSends: ["keydown:", "jQuery:", "ifTrue:", "and:", ">=", "keyCode", "<="]}),
  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:", "current", "asJQuery", "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,1)})}))._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,1)})}));
  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,1)})}));
  2809. return self}, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},smalltalk.HLModalWidget)})},
  2810. messageSends: ["keyup:", "jQuery:", "ifTrue:", "=", "keyCode", "cancel"]}),
  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,2)})});
  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,2)})});
  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,1)})}))._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,2)})}));
  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,3)})}));
  2962. confirmButton=$6;
  2963. return confirmButton;
  2964. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  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:", "span", "confirmationString"]}),
  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:", "actionBlock", "val", "asJQuery", "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:", "asJQuery", "value"]}),
  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,1)})}));
  3084. return self}, function($ctx1) {$ctx1.fill(self,"flush",{},smalltalk.HLProgressWidget)})},
  3085. messageSends: ["do:", "progressBars", "removeProgressBar:"]}),
  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:", "isVisible", "remove"]}),
  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,1)})}));
  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,2)})}));
  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,1)})}));
  3175. return self}, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},smalltalk.HLProgressWidget)})},
  3176. messageSends: ["do:", "progressBars", "with:"]}),
  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:", "isVisible", "appendToJQuery:", "asJQuery"]}),
  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,2)})}))._valueWithTimeout_((10));
  3251. } else {
  3252. _st((function(){
  3253. return smalltalk.withContext(function($ctx2) {
  3254. return self._remove();
  3255. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}))._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:", "workBlock", "at:", "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,1)})}));
  3332. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLProgressBarWidget)})},
  3333. messageSends: ["with:", "span", "label", "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:", "asJQuery", ",", "asString"]}),
  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);