1
0

Helios-Core.deploy.js 111 KB

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