Helios-Core.deploy.js 126 KB

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