Helios-Core.deploy.js 128 KB

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