Helios-Core.deploy.js 104 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048
  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(_st(_st(aString)._first())._asUppercase()).__eq(_st(aString)._first());
  726. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  727. return $1;
  728. }, function($ctx1) {$ctx1.fill(self,"shouldCompileClassDefinition:",{aString:aString},smalltalk.HLToolModel)})},
  729. messageSends: ["or:", "=", "first", "asUppercase", "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: "displayLabel",
  831. fn: function (){
  832. var self=this;
  833. return smalltalk.withContext(function($ctx1) {
  834. var $2,$1;
  835. $2=_st(_st(_st(self)._label())._size()).__gt((20));
  836. if(smalltalk.assert($2)){
  837. $1=_st(_st(_st(self)._label())._first_((20))).__comma("...");
  838. } else {
  839. $1=_st(self)._label();
  840. };
  841. return $1;
  842. }, function($ctx1) {$ctx1.fill(self,"displayLabel",{},smalltalk.HLTab)})},
  843. messageSends: ["ifTrue:ifFalse:", ",", "first:", "label", ">", "size"]}),
  844. smalltalk.HLTab);
  845. smalltalk.addMethod(
  846. smalltalk.method({
  847. selector: "focus",
  848. fn: function (){
  849. var self=this;
  850. return smalltalk.withContext(function($ctx1) {
  851. var $1;
  852. $1=_st(_st(self)._widget())._canHaveFocus();
  853. if(smalltalk.assert($1)){
  854. _st(_st(self)._widget())._focus();
  855. };
  856. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLTab)})},
  857. messageSends: ["ifTrue:", "focus", "widget", "canHaveFocus"]}),
  858. smalltalk.HLTab);
  859. smalltalk.addMethod(
  860. smalltalk.method({
  861. selector: "hide",
  862. fn: function (){
  863. var self=this;
  864. return smalltalk.withContext(function($ctx1) {
  865. var $1;
  866. $1=self["@root"];
  867. if(($receiver = $1) == nil || $receiver == undefined){
  868. $1;
  869. } else {
  870. _st(_st(self["@root"])._asJQuery())._css_put_("visibility","hidden");
  871. };
  872. return self}, function($ctx1) {$ctx1.fill(self,"hide",{},smalltalk.HLTab)})},
  873. messageSends: ["ifNotNil:", "css:put:", "asJQuery"]}),
  874. smalltalk.HLTab);
  875. smalltalk.addMethod(
  876. smalltalk.method({
  877. selector: "isActive",
  878. fn: function (){
  879. var self=this;
  880. return smalltalk.withContext(function($ctx1) {
  881. var $1;
  882. $1=_st(_st(_st(self)._manager())._activeTab()).__eq(self);
  883. return $1;
  884. }, function($ctx1) {$ctx1.fill(self,"isActive",{},smalltalk.HLTab)})},
  885. messageSends: ["=", "activeTab", "manager"]}),
  886. smalltalk.HLTab);
  887. smalltalk.addMethod(
  888. smalltalk.method({
  889. selector: "label",
  890. fn: function (){
  891. var self=this;
  892. return smalltalk.withContext(function($ctx1) {
  893. var $2,$1;
  894. $2=self["@label"];
  895. if(($receiver = $2) == nil || $receiver == undefined){
  896. $1="";
  897. } else {
  898. $1=$2;
  899. };
  900. return $1;
  901. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLTab)})},
  902. messageSends: ["ifNil:"]}),
  903. smalltalk.HLTab);
  904. smalltalk.addMethod(
  905. smalltalk.method({
  906. selector: "label:",
  907. fn: function (aString){
  908. var self=this;
  909. return smalltalk.withContext(function($ctx1) {
  910. self["@label"]=aString;
  911. return self}, function($ctx1) {$ctx1.fill(self,"label:",{aString:aString},smalltalk.HLTab)})},
  912. messageSends: []}),
  913. smalltalk.HLTab);
  914. smalltalk.addMethod(
  915. smalltalk.method({
  916. selector: "manager",
  917. fn: function (){
  918. var self=this;
  919. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  920. return smalltalk.withContext(function($ctx1) {
  921. var $1;
  922. $1=_st($HLManager())._current();
  923. return $1;
  924. }, function($ctx1) {$ctx1.fill(self,"manager",{},smalltalk.HLTab)})},
  925. messageSends: ["current"]}),
  926. smalltalk.HLTab);
  927. smalltalk.addMethod(
  928. smalltalk.method({
  929. selector: "registerBindings",
  930. fn: function (){
  931. var self=this;
  932. return smalltalk.withContext(function($ctx1) {
  933. _st(_st(self)._widget())._registerBindings();
  934. return self}, function($ctx1) {$ctx1.fill(self,"registerBindings",{},smalltalk.HLTab)})},
  935. messageSends: ["registerBindings", "widget"]}),
  936. smalltalk.HLTab);
  937. smalltalk.addMethod(
  938. smalltalk.method({
  939. selector: "remove",
  940. fn: function (){
  941. var self=this;
  942. return smalltalk.withContext(function($ctx1) {
  943. var $1;
  944. $1=self["@root"];
  945. if(($receiver = $1) == nil || $receiver == undefined){
  946. $1;
  947. } else {
  948. _st(_st(self["@root"])._asJQuery())._remove();
  949. };
  950. return self}, function($ctx1) {$ctx1.fill(self,"remove",{},smalltalk.HLTab)})},
  951. messageSends: ["ifNotNil:", "remove", "asJQuery"]}),
  952. smalltalk.HLTab);
  953. smalltalk.addMethod(
  954. smalltalk.method({
  955. selector: "renderOn:",
  956. fn: function (html){
  957. var self=this;
  958. return smalltalk.withContext(function($ctx1) {
  959. var $1,$2;
  960. $1=_st(html)._div();
  961. _st($1)._class_("tab");
  962. $2=_st($1)._yourself();
  963. self["@root"]=$2;
  964. _st(self)._renderTab();
  965. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.HLTab)})},
  966. messageSends: ["class:", "div", "yourself", "renderTab"]}),
  967. smalltalk.HLTab);
  968. smalltalk.addMethod(
  969. smalltalk.method({
  970. selector: "renderTab",
  971. fn: function (){
  972. var self=this;
  973. return smalltalk.withContext(function($ctx1) {
  974. var $1,$2;
  975. _st(self["@root"])._contents_((function(html){
  976. return smalltalk.withContext(function($ctx2) {
  977. $1=_st(html)._div();
  978. _st($1)._class_("amber_box");
  979. $2=_st($1)._with_((function(){
  980. return smalltalk.withContext(function($ctx3) {
  981. return _st(_st(self)._widget())._renderOn_(html);
  982. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  983. return $2;
  984. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  985. return self}, function($ctx1) {$ctx1.fill(self,"renderTab",{},smalltalk.HLTab)})},
  986. messageSends: ["contents:", "class:", "div", "with:", "renderOn:", "widget"]}),
  987. smalltalk.HLTab);
  988. smalltalk.addMethod(
  989. smalltalk.method({
  990. selector: "show",
  991. fn: function (){
  992. var self=this;
  993. return smalltalk.withContext(function($ctx1) {
  994. var $1;
  995. $1=self["@root"];
  996. if(($receiver = $1) == nil || $receiver == undefined){
  997. _st(self)._appendToJQuery_(_st("body")._asJQuery());
  998. } else {
  999. _st(_st(self["@root"])._asJQuery())._css_put_("visibility","visible");
  1000. };
  1001. return self}, function($ctx1) {$ctx1.fill(self,"show",{},smalltalk.HLTab)})},
  1002. messageSends: ["ifNil:ifNotNil:", "appendToJQuery:", "asJQuery", "css:put:"]}),
  1003. smalltalk.HLTab);
  1004. smalltalk.addMethod(
  1005. smalltalk.method({
  1006. selector: "widget",
  1007. fn: function (){
  1008. var self=this;
  1009. return smalltalk.withContext(function($ctx1) {
  1010. var $1;
  1011. $1=self["@widget"];
  1012. return $1;
  1013. }, function($ctx1) {$ctx1.fill(self,"widget",{},smalltalk.HLTab)})},
  1014. messageSends: []}),
  1015. smalltalk.HLTab);
  1016. smalltalk.addMethod(
  1017. smalltalk.method({
  1018. selector: "widget:",
  1019. fn: function (aWidget){
  1020. var self=this;
  1021. return smalltalk.withContext(function($ctx1) {
  1022. self["@widget"]=aWidget;
  1023. return self}, function($ctx1) {$ctx1.fill(self,"widget:",{aWidget:aWidget},smalltalk.HLTab)})},
  1024. messageSends: []}),
  1025. smalltalk.HLTab);
  1026. smalltalk.addMethod(
  1027. smalltalk.method({
  1028. selector: "on:labelled:",
  1029. fn: function (aWidget,aString){
  1030. var self=this;
  1031. return smalltalk.withContext(function($ctx1) {
  1032. var $2,$3,$1;
  1033. $2=_st(self)._new();
  1034. _st($2)._widget_(aWidget);
  1035. _st($2)._label_(aString);
  1036. $3=_st($2)._yourself();
  1037. $1=$3;
  1038. return $1;
  1039. }, function($ctx1) {$ctx1.fill(self,"on:labelled:",{aWidget:aWidget,aString:aString},smalltalk.HLTab.klass)})},
  1040. messageSends: ["widget:", "new", "label:", "yourself"]}),
  1041. smalltalk.HLTab.klass);
  1042. smalltalk.addClass('HLWidget', smalltalk.Widget, ['wrapper'], 'Helios-Core');
  1043. smalltalk.addMethod(
  1044. smalltalk.method({
  1045. selector: "alert:",
  1046. fn: function (aString){
  1047. var self=this;
  1048. return smalltalk.withContext(function($ctx1) {
  1049. _st(window)._alert_(aString);
  1050. return self}, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString},smalltalk.HLWidget)})},
  1051. messageSends: ["alert:"]}),
  1052. smalltalk.HLWidget);
  1053. smalltalk.addMethod(
  1054. smalltalk.method({
  1055. selector: "canHaveFocus",
  1056. fn: function (){
  1057. var self=this;
  1058. return smalltalk.withContext(function($ctx1) {
  1059. return false;
  1060. }, function($ctx1) {$ctx1.fill(self,"canHaveFocus",{},smalltalk.HLWidget)})},
  1061. messageSends: []}),
  1062. smalltalk.HLWidget);
  1063. smalltalk.addMethod(
  1064. smalltalk.method({
  1065. selector: "confirm:ifTrue:",
  1066. fn: function (aString,aBlock){
  1067. var self=this;
  1068. return smalltalk.withContext(function($ctx1) {
  1069. _st(_st(self)._manager())._confirm_ifTrue_(aString,aBlock);
  1070. return self}, function($ctx1) {$ctx1.fill(self,"confirm:ifTrue:",{aString:aString,aBlock:aBlock},smalltalk.HLWidget)})},
  1071. messageSends: ["confirm:ifTrue:", "manager"]}),
  1072. smalltalk.HLWidget);
  1073. smalltalk.addMethod(
  1074. smalltalk.method({
  1075. selector: "execute:",
  1076. fn: function (aCommand){
  1077. var self=this;
  1078. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  1079. return smalltalk.withContext(function($ctx1) {
  1080. var $1,$2;
  1081. $1=_st(_st($HLManager())._current())._keyBinder();
  1082. _st($1)._activate();
  1083. $2=_st($1)._applyBinding_(_st(aCommand)._asBinding());
  1084. return self}, function($ctx1) {$ctx1.fill(self,"execute:",{aCommand:aCommand},smalltalk.HLWidget)})},
  1085. messageSends: ["activate", "keyBinder", "current", "applyBinding:", "asBinding"]}),
  1086. smalltalk.HLWidget);
  1087. smalltalk.addMethod(
  1088. smalltalk.method({
  1089. selector: "manager",
  1090. fn: function (){
  1091. var self=this;
  1092. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  1093. return smalltalk.withContext(function($ctx1) {
  1094. var $1;
  1095. $1=_st($HLManager())._current();
  1096. return $1;
  1097. }, function($ctx1) {$ctx1.fill(self,"manager",{},smalltalk.HLWidget)})},
  1098. messageSends: ["current"]}),
  1099. smalltalk.HLWidget);
  1100. smalltalk.addMethod(
  1101. smalltalk.method({
  1102. selector: "refresh",
  1103. fn: function (){
  1104. var self=this;
  1105. return smalltalk.withContext(function($ctx1) {
  1106. var $1,$2;
  1107. $1=_st(self)._wrapper();
  1108. if(($receiver = $1) == nil || $receiver == undefined){
  1109. $2=self;
  1110. return $2;
  1111. } else {
  1112. $1;
  1113. };
  1114. _st(_st(_st(self)._wrapper())._asJQuery())._empty();
  1115. _st((function(html){
  1116. return smalltalk.withContext(function($ctx2) {
  1117. return _st(self)._renderContentOn_(html);
  1118. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}))._appendToJQuery_(_st(_st(self)._wrapper())._asJQuery());
  1119. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLWidget)})},
  1120. messageSends: ["ifNil:", "wrapper", "empty", "asJQuery", "appendToJQuery:", "renderContentOn:"]}),
  1121. smalltalk.HLWidget);
  1122. smalltalk.addMethod(
  1123. smalltalk.method({
  1124. selector: "registerBindings",
  1125. fn: function (){
  1126. var self=this;
  1127. return smalltalk.withContext(function($ctx1) {
  1128. _st(self)._registerBindingsOn_(_st(_st(_st(self)._manager())._keyBinder())._bindings());
  1129. return self}, function($ctx1) {$ctx1.fill(self,"registerBindings",{},smalltalk.HLWidget)})},
  1130. messageSends: ["registerBindingsOn:", "bindings", "keyBinder", "manager"]}),
  1131. smalltalk.HLWidget);
  1132. smalltalk.addMethod(
  1133. smalltalk.method({
  1134. selector: "registerBindingsOn:",
  1135. fn: function (aBindingGroup){
  1136. var self=this;
  1137. return smalltalk.withContext(function($ctx1) {
  1138. return self}, function($ctx1) {$ctx1.fill(self,"registerBindingsOn:",{aBindingGroup:aBindingGroup},smalltalk.HLWidget)})},
  1139. messageSends: []}),
  1140. smalltalk.HLWidget);
  1141. smalltalk.addMethod(
  1142. smalltalk.method({
  1143. selector: "renderContentOn:",
  1144. fn: function (html){
  1145. var self=this;
  1146. return smalltalk.withContext(function($ctx1) {
  1147. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLWidget)})},
  1148. messageSends: []}),
  1149. smalltalk.HLWidget);
  1150. smalltalk.addMethod(
  1151. smalltalk.method({
  1152. selector: "renderOn:",
  1153. fn: function (html){
  1154. var self=this;
  1155. return smalltalk.withContext(function($ctx1) {
  1156. self["@wrapper"]=_st(html)._div();
  1157. _st((function(renderer){
  1158. return smalltalk.withContext(function($ctx2) {
  1159. return _st(self)._renderContentOn_(renderer);
  1160. }, function($ctx2) {$ctx2.fillBlock({renderer:renderer},$ctx1)})}))._appendToJQuery_(_st(self["@wrapper"])._asJQuery());
  1161. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.HLWidget)})},
  1162. messageSends: ["div", "appendToJQuery:", "asJQuery", "renderContentOn:"]}),
  1163. smalltalk.HLWidget);
  1164. smalltalk.addMethod(
  1165. smalltalk.method({
  1166. selector: "wrapper",
  1167. fn: function (){
  1168. var self=this;
  1169. return smalltalk.withContext(function($ctx1) {
  1170. var $1;
  1171. $1=self["@wrapper"];
  1172. return $1;
  1173. }, function($ctx1) {$ctx1.fill(self,"wrapper",{},smalltalk.HLWidget)})},
  1174. messageSends: []}),
  1175. smalltalk.HLWidget);
  1176. smalltalk.addMethod(
  1177. smalltalk.method({
  1178. selector: "canBeOpenAsTab",
  1179. fn: function (){
  1180. var self=this;
  1181. return smalltalk.withContext(function($ctx1) {
  1182. return false;
  1183. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLWidget.klass)})},
  1184. messageSends: []}),
  1185. smalltalk.HLWidget.klass);
  1186. smalltalk.addMethod(
  1187. smalltalk.method({
  1188. selector: "openAsTab",
  1189. fn: function (){
  1190. var self=this;
  1191. function $HLTab(){return smalltalk.HLTab||(typeof HLTab=="undefined"?nil:HLTab)}
  1192. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  1193. return smalltalk.withContext(function($ctx1) {
  1194. var $1,$2;
  1195. $1=_st(self)._canBeOpenAsTab();
  1196. if(! smalltalk.assert($1)){
  1197. $2=self;
  1198. return $2;
  1199. };
  1200. _st(_st($HLManager())._current())._addTab_(_st($HLTab())._on_labelled_(_st(self)._new(),_st(self)._tabLabel()));
  1201. return self}, function($ctx1) {$ctx1.fill(self,"openAsTab",{},smalltalk.HLWidget.klass)})},
  1202. messageSends: ["ifFalse:", "canBeOpenAsTab", "addTab:", "on:labelled:", "new", "tabLabel", "current"]}),
  1203. smalltalk.HLWidget.klass);
  1204. smalltalk.addMethod(
  1205. smalltalk.method({
  1206. selector: "tabLabel",
  1207. fn: function (){
  1208. var self=this;
  1209. return smalltalk.withContext(function($ctx1) {
  1210. return "Tab";
  1211. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLWidget.klass)})},
  1212. messageSends: []}),
  1213. smalltalk.HLWidget.klass);
  1214. smalltalk.addMethod(
  1215. smalltalk.method({
  1216. selector: "tabPriority",
  1217. fn: function (){
  1218. var self=this;
  1219. return smalltalk.withContext(function($ctx1) {
  1220. var $1;
  1221. $1=(500);
  1222. return $1;
  1223. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLWidget.klass)})},
  1224. messageSends: []}),
  1225. smalltalk.HLWidget.klass);
  1226. smalltalk.addClass('HLConfirmation', smalltalk.HLWidget, ['confirmationString', 'actionBlock', 'cancelBlock'], 'Helios-Core');
  1227. smalltalk.addMethod(
  1228. smalltalk.method({
  1229. selector: "actionBlock",
  1230. fn: function (){
  1231. var self=this;
  1232. return smalltalk.withContext(function($ctx1) {
  1233. var $2,$1;
  1234. $2=self["@actionBlock"];
  1235. if(($receiver = $2) == nil || $receiver == undefined){
  1236. $1=(function(){
  1237. return smalltalk.withContext(function($ctx2) {
  1238. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  1239. } else {
  1240. $1=$2;
  1241. };
  1242. return $1;
  1243. }, function($ctx1) {$ctx1.fill(self,"actionBlock",{},smalltalk.HLConfirmation)})},
  1244. messageSends: ["ifNil:"]}),
  1245. smalltalk.HLConfirmation);
  1246. smalltalk.addMethod(
  1247. smalltalk.method({
  1248. selector: "actionBlock:",
  1249. fn: function (aBlock){
  1250. var self=this;
  1251. return smalltalk.withContext(function($ctx1) {
  1252. self["@actionBlock"]=aBlock;
  1253. return self}, function($ctx1) {$ctx1.fill(self,"actionBlock:",{aBlock:aBlock},smalltalk.HLConfirmation)})},
  1254. messageSends: []}),
  1255. smalltalk.HLConfirmation);
  1256. smalltalk.addMethod(
  1257. smalltalk.method({
  1258. selector: "cancel",
  1259. fn: function (){
  1260. var self=this;
  1261. return smalltalk.withContext(function($ctx1) {
  1262. _st(_st(self)._cancelBlock())._value();
  1263. _st(self)._remove();
  1264. return self}, function($ctx1) {$ctx1.fill(self,"cancel",{},smalltalk.HLConfirmation)})},
  1265. messageSends: ["value", "cancelBlock", "remove"]}),
  1266. smalltalk.HLConfirmation);
  1267. smalltalk.addMethod(
  1268. smalltalk.method({
  1269. selector: "cancelBlock",
  1270. fn: function (){
  1271. var self=this;
  1272. return smalltalk.withContext(function($ctx1) {
  1273. var $2,$1;
  1274. $2=self["@cancelBlock"];
  1275. if(($receiver = $2) == nil || $receiver == undefined){
  1276. $1=(function(){
  1277. return smalltalk.withContext(function($ctx2) {
  1278. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  1279. } else {
  1280. $1=$2;
  1281. };
  1282. return $1;
  1283. }, function($ctx1) {$ctx1.fill(self,"cancelBlock",{},smalltalk.HLConfirmation)})},
  1284. messageSends: ["ifNil:"]}),
  1285. smalltalk.HLConfirmation);
  1286. smalltalk.addMethod(
  1287. smalltalk.method({
  1288. selector: "cancelBlock:",
  1289. fn: function (aBlock){
  1290. var self=this;
  1291. return smalltalk.withContext(function($ctx1) {
  1292. self["@cancelBlock"]=aBlock;
  1293. return self}, function($ctx1) {$ctx1.fill(self,"cancelBlock:",{aBlock:aBlock},smalltalk.HLConfirmation)})},
  1294. messageSends: []}),
  1295. smalltalk.HLConfirmation);
  1296. smalltalk.addMethod(
  1297. smalltalk.method({
  1298. selector: "confirm",
  1299. fn: function (){
  1300. var self=this;
  1301. return smalltalk.withContext(function($ctx1) {
  1302. _st(_st(self)._actionBlock())._value();
  1303. _st(self)._remove();
  1304. return self}, function($ctx1) {$ctx1.fill(self,"confirm",{},smalltalk.HLConfirmation)})},
  1305. messageSends: ["value", "actionBlock", "remove"]}),
  1306. smalltalk.HLConfirmation);
  1307. smalltalk.addMethod(
  1308. smalltalk.method({
  1309. selector: "confirmationString",
  1310. fn: function (){
  1311. var self=this;
  1312. return smalltalk.withContext(function($ctx1) {
  1313. var $2,$1;
  1314. $2=self["@confirmationString"];
  1315. if(($receiver = $2) == nil || $receiver == undefined){
  1316. $1="Confirm";
  1317. } else {
  1318. $1=$2;
  1319. };
  1320. return $1;
  1321. }, function($ctx1) {$ctx1.fill(self,"confirmationString",{},smalltalk.HLConfirmation)})},
  1322. messageSends: ["ifNil:"]}),
  1323. smalltalk.HLConfirmation);
  1324. smalltalk.addMethod(
  1325. smalltalk.method({
  1326. selector: "confirmationString:",
  1327. fn: function (aString){
  1328. var self=this;
  1329. return smalltalk.withContext(function($ctx1) {
  1330. self["@confirmationString"]=aString;
  1331. return self}, function($ctx1) {$ctx1.fill(self,"confirmationString:",{aString:aString},smalltalk.HLConfirmation)})},
  1332. messageSends: []}),
  1333. smalltalk.HLConfirmation);
  1334. smalltalk.addMethod(
  1335. smalltalk.method({
  1336. selector: "remove",
  1337. fn: function (){
  1338. var self=this;
  1339. return smalltalk.withContext(function($ctx1) {
  1340. _st(_st(window)._jQuery_(".confirmation"))._removeClass_("active");
  1341. _st((function(){
  1342. return smalltalk.withContext(function($ctx2) {
  1343. _st(_st(window)._jQuery_("#overlay"))._remove();
  1344. return _st(_st(window)._jQuery_(".confirmation"))._remove();
  1345. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._valueWithTimeout_((300));
  1346. return self}, function($ctx1) {$ctx1.fill(self,"remove",{},smalltalk.HLConfirmation)})},
  1347. messageSends: ["removeClass:", "jQuery:", "valueWithTimeout:", "remove"]}),
  1348. smalltalk.HLConfirmation);
  1349. smalltalk.addMethod(
  1350. smalltalk.method({
  1351. selector: "renderContentOn:",
  1352. fn: function (html){
  1353. var self=this;
  1354. var confirmButton;
  1355. return smalltalk.withContext(function($ctx1) {
  1356. var $1,$3,$5,$6,$7,$8,$4,$2;
  1357. _st(_st(html)._div())._id_("overlay");
  1358. $1=_st(html)._div();
  1359. _st($1)._class_("confirmation");
  1360. $2=_st($1)._with_((function(){
  1361. return smalltalk.withContext(function($ctx2) {
  1362. _st(_st(html)._span())._with_(_st(self)._confirmationString());
  1363. $3=_st(html)._div();
  1364. _st($3)._class_("buttons");
  1365. $4=_st($3)._with_((function(){
  1366. return smalltalk.withContext(function($ctx3) {
  1367. $5=_st(html)._button();
  1368. _st($5)._class_("button");
  1369. _st($5)._with_("Cancel");
  1370. $6=_st($5)._onClick_((function(){
  1371. return smalltalk.withContext(function($ctx4) {
  1372. return _st(self)._cancel();
  1373. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  1374. $6;
  1375. $7=_st(html)._button();
  1376. _st($7)._class_("button default");
  1377. _st($7)._with_("Confirm");
  1378. $8=_st($7)._onClick_((function(){
  1379. return smalltalk.withContext(function($ctx4) {
  1380. return _st(self)._confirm();
  1381. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  1382. confirmButton=$8;
  1383. return confirmButton;
  1384. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1385. return $4;
  1386. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1387. _st(_st(confirmButton)._asJQuery())._focus();
  1388. _st(_st(window)._jQuery_(".confirmation"))._addClass_("active");
  1389. _st(self)._setupKeyBindings();
  1390. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html,confirmButton:confirmButton},smalltalk.HLConfirmation)})},
  1391. messageSends: ["id:", "div", "class:", "with:", "confirmationString", "span", "button", "onClick:", "cancel", "confirm", "focus", "asJQuery", "addClass:", "jQuery:", "setupKeyBindings"]}),
  1392. smalltalk.HLConfirmation);
  1393. smalltalk.addMethod(
  1394. smalltalk.method({
  1395. selector: "setupKeyBindings",
  1396. fn: function (){
  1397. var self=this;
  1398. return smalltalk.withContext(function($ctx1) {
  1399. var $1;
  1400. _st(_st(window)._jQuery_(".confirmation"))._keyup_((function(e){
  1401. return smalltalk.withContext(function($ctx2) {
  1402. $1=_st(_st(e)._keyCode()).__eq((27));
  1403. if(smalltalk.assert($1)){
  1404. return _st(self)._cancel();
  1405. };
  1406. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
  1407. return self}, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},smalltalk.HLConfirmation)})},
  1408. messageSends: ["keyup:", "ifTrue:", "cancel", "=", "keyCode", "jQuery:"]}),
  1409. smalltalk.HLConfirmation);
  1410. smalltalk.addClass('HLDebugger', smalltalk.HLWidget, [], 'Helios-Core');
  1411. smalltalk.addClass('HLFocusableWidget', smalltalk.HLWidget, [], 'Helios-Core');
  1412. smalltalk.addMethod(
  1413. smalltalk.method({
  1414. selector: "blur",
  1415. fn: function (){
  1416. var self=this;
  1417. return smalltalk.withContext(function($ctx1) {
  1418. _st(_st(_st(self)._wrapper())._asJQuery())._blur();
  1419. return self}, function($ctx1) {$ctx1.fill(self,"blur",{},smalltalk.HLFocusableWidget)})},
  1420. messageSends: ["blur", "asJQuery", "wrapper"]}),
  1421. smalltalk.HLFocusableWidget);
  1422. smalltalk.addMethod(
  1423. smalltalk.method({
  1424. selector: "canHaveFocus",
  1425. fn: function (){
  1426. var self=this;
  1427. return smalltalk.withContext(function($ctx1) {
  1428. return true;
  1429. }, function($ctx1) {$ctx1.fill(self,"canHaveFocus",{},smalltalk.HLFocusableWidget)})},
  1430. messageSends: []}),
  1431. smalltalk.HLFocusableWidget);
  1432. smalltalk.addMethod(
  1433. smalltalk.method({
  1434. selector: "focus",
  1435. fn: function (){
  1436. var self=this;
  1437. return smalltalk.withContext(function($ctx1) {
  1438. _st(_st(_st(self)._wrapper())._asJQuery())._focus();
  1439. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLFocusableWidget)})},
  1440. messageSends: ["focus", "asJQuery", "wrapper"]}),
  1441. smalltalk.HLFocusableWidget);
  1442. smalltalk.addMethod(
  1443. smalltalk.method({
  1444. selector: "focusClass",
  1445. fn: function (){
  1446. var self=this;
  1447. return smalltalk.withContext(function($ctx1) {
  1448. return "focused";
  1449. }, function($ctx1) {$ctx1.fill(self,"focusClass",{},smalltalk.HLFocusableWidget)})},
  1450. messageSends: []}),
  1451. smalltalk.HLFocusableWidget);
  1452. smalltalk.addMethod(
  1453. smalltalk.method({
  1454. selector: "hasFocus",
  1455. fn: function (){
  1456. var self=this;
  1457. return smalltalk.withContext(function($ctx1) {
  1458. var $1;
  1459. $1=_st(_st(_st(self)._wrapper())._notNil())._and_((function(){
  1460. return smalltalk.withContext(function($ctx2) {
  1461. return _st(_st(_st(self)._wrapper())._asJQuery())._is_(":focus");
  1462. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1463. return $1;
  1464. }, function($ctx1) {$ctx1.fill(self,"hasFocus",{},smalltalk.HLFocusableWidget)})},
  1465. messageSends: ["and:", "is:", "asJQuery", "wrapper", "notNil"]}),
  1466. smalltalk.HLFocusableWidget);
  1467. smalltalk.addMethod(
  1468. smalltalk.method({
  1469. selector: "renderContentOn:",
  1470. fn: function (html){
  1471. var self=this;
  1472. return smalltalk.withContext(function($ctx1) {
  1473. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLFocusableWidget)})},
  1474. messageSends: []}),
  1475. smalltalk.HLFocusableWidget);
  1476. smalltalk.addMethod(
  1477. smalltalk.method({
  1478. selector: "renderOn:",
  1479. fn: function (html){
  1480. var self=this;
  1481. return smalltalk.withContext(function($ctx1) {
  1482. var $1,$2,$3,$4;
  1483. _st(self)._registerBindings();
  1484. $1=_st(html)._div();
  1485. _st($1)._class_("hl_widget");
  1486. $2=_st($1)._yourself();
  1487. self["@wrapper"]=$2;
  1488. _st(self["@wrapper"])._with_((function(){
  1489. return smalltalk.withContext(function($ctx2) {
  1490. return _st(self)._renderContentOn_(html);
  1491. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1492. $3=self["@wrapper"];
  1493. _st($3)._at_put_("tabindex","0");
  1494. _st($3)._onBlur_((function(){
  1495. return smalltalk.withContext(function($ctx2) {
  1496. return _st(_st(_st(self)._wrapper())._asJQuery())._removeClass_(_st(self)._focusClass());
  1497. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1498. $4=_st($3)._onFocus_((function(){
  1499. return smalltalk.withContext(function($ctx2) {
  1500. return _st(_st(_st(self)._wrapper())._asJQuery())._addClass_(_st(self)._focusClass());
  1501. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1502. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.HLFocusableWidget)})},
  1503. messageSends: ["registerBindings", "class:", "div", "yourself", "with:", "renderContentOn:", "at:put:", "onBlur:", "removeClass:", "focusClass", "asJQuery", "wrapper", "onFocus:", "addClass:"]}),
  1504. smalltalk.HLFocusableWidget);
  1505. smalltalk.addClass('HLListWidget', smalltalk.HLFocusableWidget, ['items', 'selectedItem', 'mapping'], 'Helios-Core');
  1506. smalltalk.addMethod(
  1507. smalltalk.method({
  1508. selector: "activateFirstListItem",
  1509. fn: function (){
  1510. var self=this;
  1511. return smalltalk.withContext(function($ctx1) {
  1512. _st(self)._activateListItem_(_st(window)._jQuery_(_st(_st(_st(self["@wrapper"])._asJQuery())._find_("li.inactive"))._get_((0))));
  1513. return self}, function($ctx1) {$ctx1.fill(self,"activateFirstListItem",{},smalltalk.HLListWidget)})},
  1514. messageSends: ["activateListItem:", "jQuery:", "get:", "find:", "asJQuery"]}),
  1515. smalltalk.HLListWidget);
  1516. smalltalk.addMethod(
  1517. smalltalk.method({
  1518. selector: "activateItem:",
  1519. fn: function (anObject){
  1520. var self=this;
  1521. return smalltalk.withContext(function($ctx1) {
  1522. var $1;
  1523. var $early={};
  1524. try {
  1525. _st(self)._activateListItem_(_st(_st(self["@mapping"])._at_ifAbsent_(anObject,(function(){
  1526. return smalltalk.withContext(function($ctx2) {
  1527. $1=self;
  1528. throw $early=[$1];
  1529. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._asJQuery());
  1530. return self}
  1531. catch(e) {if(e===$early)return e[0]; throw e}
  1532. }, function($ctx1) {$ctx1.fill(self,"activateItem:",{anObject:anObject},smalltalk.HLListWidget)})},
  1533. messageSends: ["activateListItem:", "asJQuery", "at:ifAbsent:"]}),
  1534. smalltalk.HLListWidget);
  1535. smalltalk.addMethod(
  1536. smalltalk.method({
  1537. selector: "activateListItem:",
  1538. fn: function (aListItem){
  1539. var self=this;
  1540. var item;
  1541. return smalltalk.withContext(function($ctx1) {
  1542. var $1,$2,$3;
  1543. $1=_st(aListItem)._get_((0));
  1544. if(($receiver = $1) == nil || $receiver == undefined){
  1545. $2=self;
  1546. return $2;
  1547. } else {
  1548. $1;
  1549. };
  1550. _st(_st(_st(aListItem)._parent())._children())._removeClass_("active");
  1551. _st(aListItem)._addClass_("active");
  1552. _st(self)._ensureVisible_(aListItem);
  1553. item=_st(_st(self)._items())._at_(_st(_st(aListItem)._attr_("list-data"))._asNumber());
  1554. $3=_st(_st(self)._selectedItem()).__eq_eq(item);
  1555. if(! smalltalk.assert($3)){
  1556. _st(self)._selectItem_(item);
  1557. };
  1558. return self}, function($ctx1) {$ctx1.fill(self,"activateListItem:",{aListItem:aListItem,item:item},smalltalk.HLListWidget)})},
  1559. messageSends: ["ifNil:", "get:", "removeClass:", "children", "parent", "addClass:", "ensureVisible:", "at:", "asNumber", "attr:", "items", "ifFalse:", "selectItem:", "==", "selectedItem"]}),
  1560. smalltalk.HLListWidget);
  1561. smalltalk.addMethod(
  1562. smalltalk.method({
  1563. selector: "activateNextListItem",
  1564. fn: function (){
  1565. var self=this;
  1566. return smalltalk.withContext(function($ctx1) {
  1567. _st(self)._activateListItem_(_st(_st(window)._jQuery_(".focused .nav-pills .active"))._next());
  1568. _st(_st(_st(window)._jQuery_(".focused .nav-pills .active"))._get())._ifEmpty_((function(){
  1569. return smalltalk.withContext(function($ctx2) {
  1570. return _st(self)._activateFirstListItem();
  1571. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1572. return self}, function($ctx1) {$ctx1.fill(self,"activateNextListItem",{},smalltalk.HLListWidget)})},
  1573. messageSends: ["activateListItem:", "next", "jQuery:", "ifEmpty:", "activateFirstListItem", "get"]}),
  1574. smalltalk.HLListWidget);
  1575. smalltalk.addMethod(
  1576. smalltalk.method({
  1577. selector: "activatePreviousListItem",
  1578. fn: function (){
  1579. var self=this;
  1580. return smalltalk.withContext(function($ctx1) {
  1581. _st(self)._activateListItem_(_st(_st(window)._jQuery_(".focused .nav-pills .active"))._prev());
  1582. return self}, function($ctx1) {$ctx1.fill(self,"activatePreviousListItem",{},smalltalk.HLListWidget)})},
  1583. messageSends: ["activateListItem:", "prev", "jQuery:"]}),
  1584. smalltalk.HLListWidget);
  1585. smalltalk.addMethod(
  1586. smalltalk.method({
  1587. selector: "cssClassForItem:",
  1588. fn: function (anObject){
  1589. var self=this;
  1590. return smalltalk.withContext(function($ctx1) {
  1591. var $2,$1;
  1592. $2=_st(_st(self)._selectedItem()).__eq(anObject);
  1593. if(smalltalk.assert($2)){
  1594. $1="active";
  1595. } else {
  1596. $1="inactive";
  1597. };
  1598. return $1;
  1599. }, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{anObject:anObject},smalltalk.HLListWidget)})},
  1600. messageSends: ["ifTrue:ifFalse:", "=", "selectedItem"]}),
  1601. smalltalk.HLListWidget);
  1602. smalltalk.addMethod(
  1603. smalltalk.method({
  1604. selector: "defaultItems",
  1605. fn: function (){
  1606. var self=this;
  1607. return smalltalk.withContext(function($ctx1) {
  1608. var $1;
  1609. $1=[];
  1610. return $1;
  1611. }, function($ctx1) {$ctx1.fill(self,"defaultItems",{},smalltalk.HLListWidget)})},
  1612. messageSends: []}),
  1613. smalltalk.HLListWidget);
  1614. smalltalk.addMethod(
  1615. smalltalk.method({
  1616. selector: "ensureVisible:",
  1617. fn: function (aListItem){
  1618. var self=this;
  1619. var perent,position;
  1620. return smalltalk.withContext(function($ctx1) {
  1621. var $1,$2;
  1622. position=_st(self)._positionOf_(aListItem);
  1623. parent=_st(aListItem)._parent();
  1624. $1=_st(_st(_st(aListItem)._position())._top()).__lt((0));
  1625. if(smalltalk.assert($1)){
  1626. _st(_st(parent)._get_((0)))._scrollTop_(_st(_st(_st(_st(parent)._get_((0)))._scrollTop()).__plus(_st(_st(aListItem)._position())._top())).__minus((10)));
  1627. };
  1628. $2=_st(_st(_st(_st(aListItem)._position())._top()).__plus(_st(aListItem)._height())).__gt(_st(parent)._height());
  1629. if(smalltalk.assert($2)){
  1630. _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)));
  1631. };
  1632. return self}, function($ctx1) {$ctx1.fill(self,"ensureVisible:",{aListItem:aListItem,perent:perent,position:position},smalltalk.HLListWidget)})},
  1633. messageSends: ["positionOf:", "parent", "ifTrue:", "scrollTop:", "-", "+", "top", "position", "scrollTop", "get:", "<", "height", ">"]}),
  1634. smalltalk.HLListWidget);
  1635. smalltalk.addMethod(
  1636. smalltalk.method({
  1637. selector: "focus",
  1638. fn: function (){
  1639. var self=this;
  1640. return smalltalk.withContext(function($ctx1) {
  1641. var $1,$2;
  1642. smalltalk.HLFocusableWidget.fn.prototype._focus.apply(_st(self), []);
  1643. $1=_st(_st(self)._items())._isEmpty();
  1644. if(! smalltalk.assert($1)){
  1645. $2=_st(self)._selectedItem();
  1646. if(($receiver = $2) == nil || $receiver == undefined){
  1647. _st(self)._activateFirstListItem();
  1648. } else {
  1649. $2;
  1650. };
  1651. };
  1652. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLListWidget)})},
  1653. messageSends: ["focus", "ifFalse:", "ifNil:", "activateFirstListItem", "selectedItem", "isEmpty", "items"]}),
  1654. smalltalk.HLListWidget);
  1655. smalltalk.addMethod(
  1656. smalltalk.method({
  1657. selector: "iconForItem:",
  1658. fn: function (anObject){
  1659. var self=this;
  1660. return smalltalk.withContext(function($ctx1) {
  1661. return "";
  1662. }, function($ctx1) {$ctx1.fill(self,"iconForItem:",{anObject:anObject},smalltalk.HLListWidget)})},
  1663. messageSends: []}),
  1664. smalltalk.HLListWidget);
  1665. smalltalk.addMethod(
  1666. smalltalk.method({
  1667. selector: "initialize",
  1668. fn: function (){
  1669. var self=this;
  1670. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  1671. return smalltalk.withContext(function($ctx1) {
  1672. smalltalk.HLFocusableWidget.fn.prototype._initialize.apply(_st(self), []);
  1673. self["@mapping"]=_st($Dictionary())._new();
  1674. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLListWidget)})},
  1675. messageSends: ["initialize", "new"]}),
  1676. smalltalk.HLListWidget);
  1677. smalltalk.addMethod(
  1678. smalltalk.method({
  1679. selector: "items",
  1680. fn: function (){
  1681. var self=this;
  1682. return smalltalk.withContext(function($ctx1) {
  1683. var $2,$1;
  1684. $2=self["@items"];
  1685. if(($receiver = $2) == nil || $receiver == undefined){
  1686. self["@items"]=_st(self)._defaultItems();
  1687. $1=self["@items"];
  1688. } else {
  1689. $1=$2;
  1690. };
  1691. return $1;
  1692. }, function($ctx1) {$ctx1.fill(self,"items",{},smalltalk.HLListWidget)})},
  1693. messageSends: ["ifNil:", "defaultItems"]}),
  1694. smalltalk.HLListWidget);
  1695. smalltalk.addMethod(
  1696. smalltalk.method({
  1697. selector: "items:",
  1698. fn: function (aCollection){
  1699. var self=this;
  1700. return smalltalk.withContext(function($ctx1) {
  1701. self["@items"]=aCollection;
  1702. return self}, function($ctx1) {$ctx1.fill(self,"items:",{aCollection:aCollection},smalltalk.HLListWidget)})},
  1703. messageSends: []}),
  1704. smalltalk.HLListWidget);
  1705. smalltalk.addMethod(
  1706. smalltalk.method({
  1707. selector: "positionOf:",
  1708. fn: function (aListItem){
  1709. var self=this;
  1710. return smalltalk.withContext(function($ctx1) {
  1711. return aListItem.parent().children().get().indexOf(aListItem.get(0)) + 1
  1712. ;
  1713. return self}, function($ctx1) {$ctx1.fill(self,"positionOf:",{aListItem:aListItem},smalltalk.HLListWidget)})},
  1714. messageSends: []}),
  1715. smalltalk.HLListWidget);
  1716. smalltalk.addMethod(
  1717. smalltalk.method({
  1718. selector: "refresh",
  1719. fn: function (){
  1720. var self=this;
  1721. return smalltalk.withContext(function($ctx1) {
  1722. var $1;
  1723. var $early={};
  1724. try {
  1725. smalltalk.HLFocusableWidget.fn.prototype._refresh.apply(_st(self), []);
  1726. _st(self)._ensureVisible_(_st(_st(self["@mapping"])._at_ifAbsent_(_st(self)._selectedItem(),(function(){
  1727. return smalltalk.withContext(function($ctx2) {
  1728. $1=self;
  1729. throw $early=[$1];
  1730. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._asJQuery());
  1731. return self}
  1732. catch(e) {if(e===$early)return e[0]; throw e}
  1733. }, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLListWidget)})},
  1734. messageSends: ["refresh", "ensureVisible:", "asJQuery", "at:ifAbsent:", "selectedItem"]}),
  1735. smalltalk.HLListWidget);
  1736. smalltalk.addMethod(
  1737. smalltalk.method({
  1738. selector: "registerMappingFrom:to:",
  1739. fn: function (anObject,aTag){
  1740. var self=this;
  1741. return smalltalk.withContext(function($ctx1) {
  1742. _st(self["@mapping"])._at_put_(anObject,aTag);
  1743. return self}, function($ctx1) {$ctx1.fill(self,"registerMappingFrom:to:",{anObject:anObject,aTag:aTag},smalltalk.HLListWidget)})},
  1744. messageSends: ["at:put:"]}),
  1745. smalltalk.HLListWidget);
  1746. smalltalk.addMethod(
  1747. smalltalk.method({
  1748. selector: "renderButtonsOn:",
  1749. fn: function (html){
  1750. var self=this;
  1751. return smalltalk.withContext(function($ctx1) {
  1752. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLListWidget)})},
  1753. messageSends: []}),
  1754. smalltalk.HLListWidget);
  1755. smalltalk.addMethod(
  1756. smalltalk.method({
  1757. selector: "renderContentOn:",
  1758. fn: function (html){
  1759. var self=this;
  1760. return smalltalk.withContext(function($ctx1) {
  1761. var $1,$2,$3,$4;
  1762. $1=_st(html)._ul();
  1763. _st($1)._class_("nav nav-pills nav-stacked");
  1764. $2=_st($1)._with_((function(){
  1765. return smalltalk.withContext(function($ctx2) {
  1766. return _st(self)._renderListOn_(html);
  1767. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1768. $3=_st(html)._div();
  1769. _st($3)._class_("pane_actions form-actions");
  1770. $4=_st($3)._with_((function(){
  1771. return smalltalk.withContext(function($ctx2) {
  1772. return _st(self)._renderButtonsOn_(html);
  1773. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1774. _st(self)._setupKeyBindings();
  1775. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLListWidget)})},
  1776. messageSends: ["class:", "ul", "with:", "renderListOn:", "div", "renderButtonsOn:", "setupKeyBindings"]}),
  1777. smalltalk.HLListWidget);
  1778. smalltalk.addMethod(
  1779. smalltalk.method({
  1780. selector: "renderItem:on:",
  1781. fn: function (anObject,html){
  1782. var self=this;
  1783. var li;
  1784. return smalltalk.withContext(function($ctx1) {
  1785. var $1,$3,$4,$2;
  1786. li=_st(html)._li();
  1787. _st(self)._registerMappingFrom_to_(anObject,li);
  1788. $1=li;
  1789. _st($1)._class_(_st(self)._cssClassForItem_(anObject));
  1790. _st($1)._at_put_("list-data",_st(_st(_st(self)._items())._indexOf_(anObject))._asString());
  1791. $2=_st($1)._with_((function(){
  1792. return smalltalk.withContext(function($ctx2) {
  1793. $3=_st(html)._a();
  1794. _st($3)._with_((function(){
  1795. return smalltalk.withContext(function($ctx3) {
  1796. _st(_st(html)._tag_("i"))._class_(_st(self)._iconForItem_(anObject));
  1797. return _st(self)._renderItemLabel_on_(anObject,html);
  1798. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1799. $4=_st($3)._onClick_((function(){
  1800. return smalltalk.withContext(function($ctx3) {
  1801. return _st(self)._activateListItem_(_st(li)._asJQuery());
  1802. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1803. return $4;
  1804. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1805. return self}, function($ctx1) {$ctx1.fill(self,"renderItem:on:",{anObject:anObject,html:html,li:li},smalltalk.HLListWidget)})},
  1806. messageSends: ["li", "registerMappingFrom:to:", "class:", "cssClassForItem:", "at:put:", "asString", "indexOf:", "items", "with:", "iconForItem:", "tag:", "renderItemLabel:on:", "a", "onClick:", "activateListItem:", "asJQuery"]}),
  1807. smalltalk.HLListWidget);
  1808. smalltalk.addMethod(
  1809. smalltalk.method({
  1810. selector: "renderItemLabel:on:",
  1811. fn: function (anObject,html){
  1812. var self=this;
  1813. return smalltalk.withContext(function($ctx1) {
  1814. _st(html)._with_(_st(anObject)._asString());
  1815. return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{anObject:anObject,html:html},smalltalk.HLListWidget)})},
  1816. messageSends: ["with:", "asString"]}),
  1817. smalltalk.HLListWidget);
  1818. smalltalk.addMethod(
  1819. smalltalk.method({
  1820. selector: "renderListOn:",
  1821. fn: function (html){
  1822. var self=this;
  1823. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  1824. return smalltalk.withContext(function($ctx1) {
  1825. self["@mapping"]=_st($Dictionary())._new();
  1826. _st(_st(self)._items())._do_((function(each){
  1827. return smalltalk.withContext(function($ctx2) {
  1828. return _st(self)._renderItem_on_(each,html);
  1829. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1830. return self}, function($ctx1) {$ctx1.fill(self,"renderListOn:",{html:html},smalltalk.HLListWidget)})},
  1831. messageSends: ["new", "do:", "renderItem:on:", "items"]}),
  1832. smalltalk.HLListWidget);
  1833. smalltalk.addMethod(
  1834. smalltalk.method({
  1835. selector: "selectItem:",
  1836. fn: function (anObject){
  1837. var self=this;
  1838. return smalltalk.withContext(function($ctx1) {
  1839. _st(self)._selectedItem_(anObject);
  1840. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{anObject:anObject},smalltalk.HLListWidget)})},
  1841. messageSends: ["selectedItem:"]}),
  1842. smalltalk.HLListWidget);
  1843. smalltalk.addMethod(
  1844. smalltalk.method({
  1845. selector: "selectedItem",
  1846. fn: function (){
  1847. var self=this;
  1848. return smalltalk.withContext(function($ctx1) {
  1849. var $1;
  1850. $1=self["@selectedItem"];
  1851. return $1;
  1852. }, function($ctx1) {$ctx1.fill(self,"selectedItem",{},smalltalk.HLListWidget)})},
  1853. messageSends: []}),
  1854. smalltalk.HLListWidget);
  1855. smalltalk.addMethod(
  1856. smalltalk.method({
  1857. selector: "selectedItem:",
  1858. fn: function (anObject){
  1859. var self=this;
  1860. return smalltalk.withContext(function($ctx1) {
  1861. self["@selectedItem"]=anObject;
  1862. return self}, function($ctx1) {$ctx1.fill(self,"selectedItem:",{anObject:anObject},smalltalk.HLListWidget)})},
  1863. messageSends: []}),
  1864. smalltalk.HLListWidget);
  1865. smalltalk.addMethod(
  1866. smalltalk.method({
  1867. selector: "setupKeyBindings",
  1868. fn: function (){
  1869. var self=this;
  1870. var active,interval,delay,repeatInterval;
  1871. return smalltalk.withContext(function($ctx1) {
  1872. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11;
  1873. active=false;
  1874. repeatInterval=(70);
  1875. _st(_st(_st(self)._wrapper())._asJQuery())._unbind_("keydown");
  1876. _st(_st(_st(self)._wrapper())._asJQuery())._keydown_((function(e){
  1877. return smalltalk.withContext(function($ctx2) {
  1878. $1=_st(_st(_st(e)._which()).__eq((38)))._and_((function(){
  1879. return smalltalk.withContext(function($ctx3) {
  1880. return _st(active).__eq(false);
  1881. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1882. if(smalltalk.assert($1)){
  1883. active=true;
  1884. active;
  1885. _st(self)._activatePreviousListItem();
  1886. delay=_st((function(){
  1887. return smalltalk.withContext(function($ctx3) {
  1888. interval=_st((function(){
  1889. return smalltalk.withContext(function($ctx4) {
  1890. $2=_st(_st(_st(self)._wrapper())._asJQuery())._hasClass_(_st(self)._focusClass());
  1891. if(smalltalk.assert($2)){
  1892. return _st(self)._activatePreviousListItem();
  1893. } else {
  1894. active=false;
  1895. active;
  1896. $3=interval;
  1897. if(($receiver = $3) == nil || $receiver == undefined){
  1898. $3;
  1899. } else {
  1900. _st(interval)._clearInterval();
  1901. };
  1902. $4=delay;
  1903. if(($receiver = $4) == nil || $receiver == undefined){
  1904. return $4;
  1905. } else {
  1906. return _st(delay)._clearTimeout();
  1907. };
  1908. };
  1909. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}))._valueWithInterval_(repeatInterval);
  1910. return interval;
  1911. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._valueWithTimeout_((300));
  1912. delay;
  1913. };
  1914. $5=_st(_st(_st(e)._which()).__eq((40)))._and_((function(){
  1915. return smalltalk.withContext(function($ctx3) {
  1916. return _st(active).__eq(false);
  1917. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1918. if(smalltalk.assert($5)){
  1919. active=true;
  1920. active;
  1921. _st(self)._activateNextListItem();
  1922. delay=_st((function(){
  1923. return smalltalk.withContext(function($ctx3) {
  1924. interval=_st((function(){
  1925. return smalltalk.withContext(function($ctx4) {
  1926. $6=_st(_st(_st(self)._wrapper())._asJQuery())._hasClass_(_st(self)._focusClass());
  1927. if(smalltalk.assert($6)){
  1928. return _st(self)._activateNextListItem();
  1929. } else {
  1930. active=false;
  1931. active;
  1932. $7=interval;
  1933. if(($receiver = $7) == nil || $receiver == undefined){
  1934. $7;
  1935. } else {
  1936. _st(interval)._clearInterval();
  1937. };
  1938. $8=delay;
  1939. if(($receiver = $8) == nil || $receiver == undefined){
  1940. return $8;
  1941. } else {
  1942. return _st(delay)._clearTimeout();
  1943. };
  1944. };
  1945. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}))._valueWithInterval_(repeatInterval);
  1946. return interval;
  1947. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._valueWithTimeout_((300));
  1948. return delay;
  1949. };
  1950. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
  1951. _st(_st(_st(self)._wrapper())._asJQuery())._keyup_((function(e){
  1952. return smalltalk.withContext(function($ctx2) {
  1953. $9=active;
  1954. if(smalltalk.assert($9)){
  1955. active=false;
  1956. active;
  1957. $10=interval;
  1958. if(($receiver = $10) == nil || $receiver == undefined){
  1959. $10;
  1960. } else {
  1961. _st(interval)._clearInterval();
  1962. };
  1963. $11=delay;
  1964. if(($receiver = $11) == nil || $receiver == undefined){
  1965. return $11;
  1966. } else {
  1967. return _st(delay)._clearTimeout();
  1968. };
  1969. };
  1970. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
  1971. return self}, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{active:active,interval:interval,delay:delay,repeatInterval:repeatInterval},smalltalk.HLListWidget)})},
  1972. messageSends: ["unbind:", "asJQuery", "wrapper", "keydown:", "ifTrue:", "activatePreviousListItem", "valueWithTimeout:", "valueWithInterval:", "ifTrue:ifFalse:", "ifNotNil:", "clearInterval", "clearTimeout", "hasClass:", "focusClass", "and:", "=", "which", "activateNextListItem", "keyup:"]}),
  1973. smalltalk.HLListWidget);
  1974. smalltalk.addClass('HLNavigationListWidget', smalltalk.HLListWidget, ['previous', 'next'], 'Helios-Core');
  1975. smalltalk.addMethod(
  1976. smalltalk.method({
  1977. selector: "next",
  1978. fn: function (){
  1979. var self=this;
  1980. return smalltalk.withContext(function($ctx1) {
  1981. var $1;
  1982. $1=self["@next"];
  1983. return $1;
  1984. }, function($ctx1) {$ctx1.fill(self,"next",{},smalltalk.HLNavigationListWidget)})},
  1985. messageSends: []}),
  1986. smalltalk.HLNavigationListWidget);
  1987. smalltalk.addMethod(
  1988. smalltalk.method({
  1989. selector: "next:",
  1990. fn: function (aWidget){
  1991. var self=this;
  1992. return smalltalk.withContext(function($ctx1) {
  1993. var $1;
  1994. self["@next"]=aWidget;
  1995. $1=_st(_st(aWidget)._previous()).__eq(self);
  1996. if(! smalltalk.assert($1)){
  1997. _st(aWidget)._previous_(self);
  1998. };
  1999. return self}, function($ctx1) {$ctx1.fill(self,"next:",{aWidget:aWidget},smalltalk.HLNavigationListWidget)})},
  2000. messageSends: ["ifFalse:", "previous:", "=", "previous"]}),
  2001. smalltalk.HLNavigationListWidget);
  2002. smalltalk.addMethod(
  2003. smalltalk.method({
  2004. selector: "nextFocus",
  2005. fn: function (){
  2006. var self=this;
  2007. return smalltalk.withContext(function($ctx1) {
  2008. var $1;
  2009. $1=_st(self)._next();
  2010. if(($receiver = $1) == nil || $receiver == undefined){
  2011. $1;
  2012. } else {
  2013. _st(_st(self)._next())._focus();
  2014. };
  2015. return self}, function($ctx1) {$ctx1.fill(self,"nextFocus",{},smalltalk.HLNavigationListWidget)})},
  2016. messageSends: ["ifNotNil:", "focus", "next"]}),
  2017. smalltalk.HLNavigationListWidget);
  2018. smalltalk.addMethod(
  2019. smalltalk.method({
  2020. selector: "previous",
  2021. fn: function (){
  2022. var self=this;
  2023. return smalltalk.withContext(function($ctx1) {
  2024. var $1;
  2025. $1=self["@previous"];
  2026. return $1;
  2027. }, function($ctx1) {$ctx1.fill(self,"previous",{},smalltalk.HLNavigationListWidget)})},
  2028. messageSends: []}),
  2029. smalltalk.HLNavigationListWidget);
  2030. smalltalk.addMethod(
  2031. smalltalk.method({
  2032. selector: "previous:",
  2033. fn: function (aWidget){
  2034. var self=this;
  2035. return smalltalk.withContext(function($ctx1) {
  2036. var $1;
  2037. self["@previous"]=aWidget;
  2038. $1=_st(_st(aWidget)._next()).__eq(self);
  2039. if(! smalltalk.assert($1)){
  2040. _st(aWidget)._next_(self);
  2041. };
  2042. return self}, function($ctx1) {$ctx1.fill(self,"previous:",{aWidget:aWidget},smalltalk.HLNavigationListWidget)})},
  2043. messageSends: ["ifFalse:", "next:", "=", "next"]}),
  2044. smalltalk.HLNavigationListWidget);
  2045. smalltalk.addMethod(
  2046. smalltalk.method({
  2047. selector: "previousFocus",
  2048. fn: function (){
  2049. var self=this;
  2050. return smalltalk.withContext(function($ctx1) {
  2051. var $1;
  2052. $1=_st(self)._previous();
  2053. if(($receiver = $1) == nil || $receiver == undefined){
  2054. $1;
  2055. } else {
  2056. _st(_st(self)._previous())._focus();
  2057. };
  2058. return self}, function($ctx1) {$ctx1.fill(self,"previousFocus",{},smalltalk.HLNavigationListWidget)})},
  2059. messageSends: ["ifNotNil:", "focus", "previous"]}),
  2060. smalltalk.HLNavigationListWidget);
  2061. smalltalk.addMethod(
  2062. smalltalk.method({
  2063. selector: "setupKeyBindings",
  2064. fn: function (){
  2065. var self=this;
  2066. return smalltalk.withContext(function($ctx1) {
  2067. var $1,$2;
  2068. smalltalk.HLListWidget.fn.prototype._setupKeyBindings.apply(_st(self), []);
  2069. _st(_st(_st(self)._wrapper())._asJQuery())._keydown_((function(e){
  2070. return smalltalk.withContext(function($ctx2) {
  2071. $1=_st(_st(e)._which()).__eq((39));
  2072. if(smalltalk.assert($1)){
  2073. _st(self)._nextFocus();
  2074. };
  2075. $2=_st(_st(e)._which()).__eq((37));
  2076. if(smalltalk.assert($2)){
  2077. return _st(self)._previousFocus();
  2078. };
  2079. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1)})}));
  2080. return self}, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},smalltalk.HLNavigationListWidget)})},
  2081. messageSends: ["setupKeyBindings", "keydown:", "ifTrue:", "nextFocus", "=", "which", "previousFocus", "asJQuery", "wrapper"]}),
  2082. smalltalk.HLNavigationListWidget);
  2083. smalltalk.addClass('HLToolListWidget', smalltalk.HLNavigationListWidget, ['model'], 'Helios-Core');
  2084. smalltalk.addMethod(
  2085. smalltalk.method({
  2086. selector: "activateListItem:",
  2087. fn: function (anItem){
  2088. var self=this;
  2089. return smalltalk.withContext(function($ctx1) {
  2090. _st(_st(self)._model())._withChangesDo_((function(){
  2091. return smalltalk.withContext(function($ctx2) {
  2092. return smalltalk.HLNavigationListWidget.fn.prototype._activateListItem_.apply(_st(self), [anItem]);
  2093. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2094. return self}, function($ctx1) {$ctx1.fill(self,"activateListItem:",{anItem:anItem},smalltalk.HLToolListWidget)})},
  2095. messageSends: ["withChangesDo:", "activateListItem:", "model"]}),
  2096. smalltalk.HLToolListWidget);
  2097. smalltalk.addMethod(
  2098. smalltalk.method({
  2099. selector: "activateNextListItem",
  2100. fn: function (){
  2101. var self=this;
  2102. return smalltalk.withContext(function($ctx1) {
  2103. _st(_st(self)._model())._withChangesDo_((function(){
  2104. return smalltalk.withContext(function($ctx2) {
  2105. return smalltalk.HLNavigationListWidget.fn.prototype._activateNextListItem.apply(_st(self), []);
  2106. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2107. return self}, function($ctx1) {$ctx1.fill(self,"activateNextListItem",{},smalltalk.HLToolListWidget)})},
  2108. messageSends: ["withChangesDo:", "activateNextListItem", "model"]}),
  2109. smalltalk.HLToolListWidget);
  2110. smalltalk.addMethod(
  2111. smalltalk.method({
  2112. selector: "activatePreviousListItem",
  2113. fn: function (){
  2114. var self=this;
  2115. return smalltalk.withContext(function($ctx1) {
  2116. _st(_st(self)._model())._withChangesDo_((function(){
  2117. return smalltalk.withContext(function($ctx2) {
  2118. return smalltalk.HLNavigationListWidget.fn.prototype._activatePreviousListItem.apply(_st(self), []);
  2119. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2120. return self}, function($ctx1) {$ctx1.fill(self,"activatePreviousListItem",{},smalltalk.HLToolListWidget)})},
  2121. messageSends: ["withChangesDo:", "activatePreviousListItem", "model"]}),
  2122. smalltalk.HLToolListWidget);
  2123. smalltalk.addMethod(
  2124. smalltalk.method({
  2125. selector: "commandCategory",
  2126. fn: function (){
  2127. var self=this;
  2128. return smalltalk.withContext(function($ctx1) {
  2129. var $1;
  2130. $1=_st(self)._label();
  2131. return $1;
  2132. }, function($ctx1) {$ctx1.fill(self,"commandCategory",{},smalltalk.HLToolListWidget)})},
  2133. messageSends: ["label"]}),
  2134. smalltalk.HLToolListWidget);
  2135. smalltalk.addMethod(
  2136. smalltalk.method({
  2137. selector: "label",
  2138. fn: function (){
  2139. var self=this;
  2140. return smalltalk.withContext(function($ctx1) {
  2141. return "List";
  2142. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLToolListWidget)})},
  2143. messageSends: []}),
  2144. smalltalk.HLToolListWidget);
  2145. smalltalk.addMethod(
  2146. smalltalk.method({
  2147. selector: "menuCommands",
  2148. fn: function (){
  2149. var self=this;
  2150. function $HLToolCommand(){return smalltalk.HLToolCommand||(typeof HLToolCommand=="undefined"?nil:HLToolCommand)}
  2151. return smalltalk.withContext(function($ctx1) {
  2152. var $1;
  2153. $1=_st(_st(_st(_st($HLToolCommand())._concreteClasses())._select_((function(each){
  2154. return smalltalk.withContext(function($ctx2) {
  2155. return _st(each)._isValidFor_(_st(self)._model());
  2156. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._collect_((function(each){
  2157. return smalltalk.withContext(function($ctx2) {
  2158. return _st(each)._for_(_st(self)._model());
  2159. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._select_((function(each){
  2160. return smalltalk.withContext(function($ctx2) {
  2161. return _st(_st(_st(each)._category()).__eq(_st(self)._commandCategory()))._and_((function(){
  2162. return smalltalk.withContext(function($ctx3) {
  2163. return _st(_st(each)._isAction())._and_((function(){
  2164. return smalltalk.withContext(function($ctx4) {
  2165. return _st(each)._isActive();
  2166. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  2167. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2168. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2169. return $1;
  2170. }, function($ctx1) {$ctx1.fill(self,"menuCommands",{},smalltalk.HLToolListWidget)})},
  2171. messageSends: ["select:", "and:", "isActive", "isAction", "=", "commandCategory", "category", "collect:", "for:", "model", "isValidFor:", "concreteClasses"]}),
  2172. smalltalk.HLToolListWidget);
  2173. smalltalk.addMethod(
  2174. smalltalk.method({
  2175. selector: "model",
  2176. fn: function (){
  2177. var self=this;
  2178. return smalltalk.withContext(function($ctx1) {
  2179. var $1;
  2180. $1=self["@model"];
  2181. return $1;
  2182. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLToolListWidget)})},
  2183. messageSends: []}),
  2184. smalltalk.HLToolListWidget);
  2185. smalltalk.addMethod(
  2186. smalltalk.method({
  2187. selector: "model:",
  2188. fn: function (aBrowserModel){
  2189. var self=this;
  2190. return smalltalk.withContext(function($ctx1) {
  2191. var $1,$2;
  2192. self["@model"]=aBrowserModel;
  2193. $1=self;
  2194. _st($1)._observeSystem();
  2195. $2=_st($1)._observeModel();
  2196. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel},smalltalk.HLToolListWidget)})},
  2197. messageSends: ["observeSystem", "observeModel"]}),
  2198. smalltalk.HLToolListWidget);
  2199. smalltalk.addMethod(
  2200. smalltalk.method({
  2201. selector: "observeModel",
  2202. fn: function (){
  2203. var self=this;
  2204. return smalltalk.withContext(function($ctx1) {
  2205. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLToolListWidget)})},
  2206. messageSends: []}),
  2207. smalltalk.HLToolListWidget);
  2208. smalltalk.addMethod(
  2209. smalltalk.method({
  2210. selector: "observeSystem",
  2211. fn: function (){
  2212. var self=this;
  2213. return smalltalk.withContext(function($ctx1) {
  2214. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLToolListWidget)})},
  2215. messageSends: []}),
  2216. smalltalk.HLToolListWidget);
  2217. smalltalk.addMethod(
  2218. smalltalk.method({
  2219. selector: "renderContentOn:",
  2220. fn: function (html){
  2221. var self=this;
  2222. return smalltalk.withContext(function($ctx1) {
  2223. _st(self)._renderHeadOn_(html);
  2224. smalltalk.HLNavigationListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  2225. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLToolListWidget)})},
  2226. messageSends: ["renderHeadOn:", "renderContentOn:"]}),
  2227. smalltalk.HLToolListWidget);
  2228. smalltalk.addMethod(
  2229. smalltalk.method({
  2230. selector: "renderHeadOn:",
  2231. fn: function (html){
  2232. var self=this;
  2233. return smalltalk.withContext(function($ctx1) {
  2234. var $1,$2;
  2235. $1=_st(html)._div();
  2236. _st($1)._class_("list-label");
  2237. $2=_st($1)._with_((function(){
  2238. return smalltalk.withContext(function($ctx2) {
  2239. _st(html)._with_(_st(self)._label());
  2240. return _st(self)._renderMenuOn_(html);
  2241. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2242. return self}, function($ctx1) {$ctx1.fill(self,"renderHeadOn:",{html:html},smalltalk.HLToolListWidget)})},
  2243. messageSends: ["class:", "div", "with:", "label", "renderMenuOn:"]}),
  2244. smalltalk.HLToolListWidget);
  2245. smalltalk.addMethod(
  2246. smalltalk.method({
  2247. selector: "renderMenuOn:",
  2248. fn: function (html){
  2249. var self=this;
  2250. var commands;
  2251. return smalltalk.withContext(function($ctx1) {
  2252. var $1,$2,$3,$5,$6,$7,$9,$10,$8,$4;
  2253. commands=_st(self)._menuCommands();
  2254. $1=_st(commands)._isEmpty();
  2255. if(smalltalk.assert($1)){
  2256. $2=self;
  2257. return $2;
  2258. };
  2259. $3=_st(html)._div();
  2260. _st($3)._class_("btn-group cog");
  2261. $4=_st($3)._with_((function(){
  2262. return smalltalk.withContext(function($ctx2) {
  2263. $5=_st(html)._a();
  2264. _st($5)._class_("btn dropdown-toggle");
  2265. _st($5)._at_put_("data-toggle","dropdown");
  2266. $6=_st($5)._with_((function(){
  2267. return smalltalk.withContext(function($ctx3) {
  2268. return _st(_st(html)._tag_("i"))._class_("icon-cog");
  2269. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2270. $6;
  2271. $7=_st(html)._ul();
  2272. _st($7)._class_("dropdown-menu pull-right");
  2273. $8=_st($7)._with_((function(){
  2274. return smalltalk.withContext(function($ctx3) {
  2275. return _st(_st(self)._menuCommands())._do_((function(each){
  2276. return smalltalk.withContext(function($ctx4) {
  2277. return _st(_st(html)._li())._with_((function(){
  2278. return smalltalk.withContext(function($ctx5) {
  2279. $9=_st(html)._a();
  2280. _st($9)._with_(_st(each)._menuLabel());
  2281. $10=_st($9)._onClick_((function(){
  2282. return smalltalk.withContext(function($ctx6) {
  2283. return _st(self)._execute_(each);
  2284. }, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}));
  2285. return $10;
  2286. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  2287. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})}));
  2288. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2289. return $8;
  2290. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2291. return self}, function($ctx1) {$ctx1.fill(self,"renderMenuOn:",{html:html,commands:commands},smalltalk.HLToolListWidget)})},
  2292. messageSends: ["menuCommands", "ifTrue:", "isEmpty", "class:", "div", "with:", "a", "at:put:", "tag:", "ul", "do:", "menuLabel", "onClick:", "execute:", "li"]}),
  2293. smalltalk.HLToolListWidget);
  2294. smalltalk.addMethod(
  2295. smalltalk.method({
  2296. selector: "selectedItem:",
  2297. fn: function (anItem){
  2298. var self=this;
  2299. return smalltalk.withContext(function($ctx1) {
  2300. smalltalk.HLNavigationListWidget.fn.prototype._selectedItem_.apply(_st(self), [anItem]);
  2301. _st(self)._updateMenu();
  2302. return self}, function($ctx1) {$ctx1.fill(self,"selectedItem:",{anItem:anItem},smalltalk.HLToolListWidget)})},
  2303. messageSends: ["selectedItem:", "updateMenu"]}),
  2304. smalltalk.HLToolListWidget);
  2305. smalltalk.addMethod(
  2306. smalltalk.method({
  2307. selector: "updateMenu",
  2308. fn: function (){
  2309. var self=this;
  2310. return smalltalk.withContext(function($ctx1) {
  2311. _st(_st(_st(_st(self)._wrapper())._asJQuery())._find_(".cog"))._remove();
  2312. _st((function(html){
  2313. return smalltalk.withContext(function($ctx2) {
  2314. return _st(self)._renderMenuOn_(html);
  2315. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}))._appendToJQuery_(_st(_st(_st(self)._wrapper())._asJQuery())._find_(".list-label"));
  2316. return self}, function($ctx1) {$ctx1.fill(self,"updateMenu",{},smalltalk.HLToolListWidget)})},
  2317. messageSends: ["remove", "find:", "asJQuery", "wrapper", "appendToJQuery:", "renderMenuOn:"]}),
  2318. smalltalk.HLToolListWidget);
  2319. smalltalk.addMethod(
  2320. smalltalk.method({
  2321. selector: "on:",
  2322. fn: function (aModel){
  2323. var self=this;
  2324. return smalltalk.withContext(function($ctx1) {
  2325. var $2,$3,$1;
  2326. $2=_st(self)._new();
  2327. _st($2)._model_(aModel);
  2328. $3=_st($2)._yourself();
  2329. $1=$3;
  2330. return $1;
  2331. }, function($ctx1) {$ctx1.fill(self,"on:",{aModel:aModel},smalltalk.HLToolListWidget.klass)})},
  2332. messageSends: ["model:", "new", "yourself"]}),
  2333. smalltalk.HLToolListWidget.klass);
  2334. smalltalk.addClass('HLManager', smalltalk.HLWidget, ['tabs', 'activeTab', 'keyBinder', 'environment', 'history'], 'Helios-Core');
  2335. smalltalk.addMethod(
  2336. smalltalk.method({
  2337. selector: "activate:",
  2338. fn: function (aTab){
  2339. var self=this;
  2340. return smalltalk.withContext(function($ctx1) {
  2341. var $1,$2;
  2342. _st(_st(self)._keyBinder())._flushBindings();
  2343. _st(aTab)._registerBindings();
  2344. self["@activeTab"]=aTab;
  2345. $1=self;
  2346. _st($1)._refresh();
  2347. _st($1)._addToHistory_(aTab);
  2348. $2=_st($1)._show_(aTab);
  2349. return self}, function($ctx1) {$ctx1.fill(self,"activate:",{aTab:aTab},smalltalk.HLManager)})},
  2350. messageSends: ["flushBindings", "keyBinder", "registerBindings", "refresh", "addToHistory:", "show:"]}),
  2351. smalltalk.HLManager);
  2352. smalltalk.addMethod(
  2353. smalltalk.method({
  2354. selector: "activeTab",
  2355. fn: function (){
  2356. var self=this;
  2357. return smalltalk.withContext(function($ctx1) {
  2358. var $1;
  2359. $1=self["@activeTab"];
  2360. return $1;
  2361. }, function($ctx1) {$ctx1.fill(self,"activeTab",{},smalltalk.HLManager)})},
  2362. messageSends: []}),
  2363. smalltalk.HLManager);
  2364. smalltalk.addMethod(
  2365. smalltalk.method({
  2366. selector: "addTab:",
  2367. fn: function (aTab){
  2368. var self=this;
  2369. return smalltalk.withContext(function($ctx1) {
  2370. _st(_st(self)._tabs())._add_(aTab);
  2371. _st(self)._activate_(aTab);
  2372. return self}, function($ctx1) {$ctx1.fill(self,"addTab:",{aTab:aTab},smalltalk.HLManager)})},
  2373. messageSends: ["add:", "tabs", "activate:"]}),
  2374. smalltalk.HLManager);
  2375. smalltalk.addMethod(
  2376. smalltalk.method({
  2377. selector: "addToHistory:",
  2378. fn: function (aTab){
  2379. var self=this;
  2380. return smalltalk.withContext(function($ctx1) {
  2381. _st(self)._removeFromHistory_(aTab);
  2382. _st(_st(self)._history())._add_(aTab);
  2383. return self}, function($ctx1) {$ctx1.fill(self,"addToHistory:",{aTab:aTab},smalltalk.HLManager)})},
  2384. messageSends: ["removeFromHistory:", "add:", "history"]}),
  2385. smalltalk.HLManager);
  2386. smalltalk.addMethod(
  2387. smalltalk.method({
  2388. selector: "confirm:ifFalse:",
  2389. fn: function (aString,aBlock){
  2390. var self=this;
  2391. function $HLConfirmation(){return smalltalk.HLConfirmation||(typeof HLConfirmation=="undefined"?nil:HLConfirmation)}
  2392. return smalltalk.withContext(function($ctx1) {
  2393. var $1,$2;
  2394. $1=_st($HLConfirmation())._new();
  2395. _st($1)._confirmationString_(aString);
  2396. _st($1)._cancelBlock_(aBlock);
  2397. $2=_st($1)._yourself();
  2398. _st($2)._appendToJQuery_(_st("body")._asJQuery());
  2399. return self}, function($ctx1) {$ctx1.fill(self,"confirm:ifFalse:",{aString:aString,aBlock:aBlock},smalltalk.HLManager)})},
  2400. messageSends: ["appendToJQuery:", "asJQuery", "confirmationString:", "new", "cancelBlock:", "yourself"]}),
  2401. smalltalk.HLManager);
  2402. smalltalk.addMethod(
  2403. smalltalk.method({
  2404. selector: "confirm:ifTrue:",
  2405. fn: function (aString,aBlock){
  2406. var self=this;
  2407. function $HLConfirmation(){return smalltalk.HLConfirmation||(typeof HLConfirmation=="undefined"?nil:HLConfirmation)}
  2408. return smalltalk.withContext(function($ctx1) {
  2409. var $1,$2;
  2410. $1=_st($HLConfirmation())._new();
  2411. _st($1)._confirmationString_(aString);
  2412. _st($1)._actionBlock_(aBlock);
  2413. $2=_st($1)._yourself();
  2414. _st($2)._appendToJQuery_(_st("body")._asJQuery());
  2415. return self}, function($ctx1) {$ctx1.fill(self,"confirm:ifTrue:",{aString:aString,aBlock:aBlock},smalltalk.HLManager)})},
  2416. messageSends: ["appendToJQuery:", "asJQuery", "confirmationString:", "new", "actionBlock:", "yourself"]}),
  2417. smalltalk.HLManager);
  2418. smalltalk.addMethod(
  2419. smalltalk.method({
  2420. selector: "defaultEnvironment",
  2421. fn: function (){
  2422. var self=this;
  2423. function $Environment(){return smalltalk.Environment||(typeof Environment=="undefined"?nil:Environment)}
  2424. return smalltalk.withContext(function($ctx1) {
  2425. var $1,$2,$3;
  2426. $1=_st(window)._parent();
  2427. if(($receiver = $1) == nil || $receiver == undefined){
  2428. $2=_st($Environment())._new();
  2429. return $2;
  2430. } else {
  2431. $1;
  2432. };
  2433. $3=_st(_st(_st(_st(window)._parent())._at_("smalltalk"))._at_("Environment"))._new();
  2434. return $3;
  2435. }, function($ctx1) {$ctx1.fill(self,"defaultEnvironment",{},smalltalk.HLManager)})},
  2436. messageSends: ["ifNil:", "new", "parent", "at:"]}),
  2437. smalltalk.HLManager);
  2438. smalltalk.addMethod(
  2439. smalltalk.method({
  2440. selector: "environment",
  2441. fn: function (){
  2442. var self=this;
  2443. return smalltalk.withContext(function($ctx1) {
  2444. var $2,$1;
  2445. $2=self["@environment"];
  2446. if(($receiver = $2) == nil || $receiver == undefined){
  2447. self["@environment"]=_st(self)._defaultEnvironment();
  2448. $1=self["@environment"];
  2449. } else {
  2450. $1=$2;
  2451. };
  2452. return $1;
  2453. }, function($ctx1) {$ctx1.fill(self,"environment",{},smalltalk.HLManager)})},
  2454. messageSends: ["ifNil:", "defaultEnvironment"]}),
  2455. smalltalk.HLManager);
  2456. smalltalk.addMethod(
  2457. smalltalk.method({
  2458. selector: "environment:",
  2459. fn: function (anEnvironment){
  2460. var self=this;
  2461. return smalltalk.withContext(function($ctx1) {
  2462. self["@environment"]=anEnvironment;
  2463. return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment},smalltalk.HLManager)})},
  2464. messageSends: []}),
  2465. smalltalk.HLManager);
  2466. smalltalk.addMethod(
  2467. smalltalk.method({
  2468. selector: "history",
  2469. fn: function (){
  2470. var self=this;
  2471. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  2472. return smalltalk.withContext(function($ctx1) {
  2473. var $2,$1;
  2474. $2=self["@history"];
  2475. if(($receiver = $2) == nil || $receiver == undefined){
  2476. self["@history"]=_st($OrderedCollection())._new();
  2477. $1=self["@history"];
  2478. } else {
  2479. $1=$2;
  2480. };
  2481. return $1;
  2482. }, function($ctx1) {$ctx1.fill(self,"history",{},smalltalk.HLManager)})},
  2483. messageSends: ["ifNil:", "new"]}),
  2484. smalltalk.HLManager);
  2485. smalltalk.addMethod(
  2486. smalltalk.method({
  2487. selector: "history:",
  2488. fn: function (aCollection){
  2489. var self=this;
  2490. return smalltalk.withContext(function($ctx1) {
  2491. self["@history"]=aCollection;
  2492. return self}, function($ctx1) {$ctx1.fill(self,"history:",{aCollection:aCollection},smalltalk.HLManager)})},
  2493. messageSends: []}),
  2494. smalltalk.HLManager);
  2495. smalltalk.addMethod(
  2496. smalltalk.method({
  2497. selector: "initialize",
  2498. fn: function (){
  2499. var self=this;
  2500. return smalltalk.withContext(function($ctx1) {
  2501. smalltalk.HLWidget.fn.prototype._initialize.apply(_st(self), []);
  2502. _st(_st(self)._keyBinder())._setupEvents();
  2503. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLManager)})},
  2504. messageSends: ["initialize", "setupEvents", "keyBinder"]}),
  2505. smalltalk.HLManager);
  2506. smalltalk.addMethod(
  2507. smalltalk.method({
  2508. selector: "keyBinder",
  2509. fn: function (){
  2510. var self=this;
  2511. function $HLKeyBinder(){return smalltalk.HLKeyBinder||(typeof HLKeyBinder=="undefined"?nil:HLKeyBinder)}
  2512. return smalltalk.withContext(function($ctx1) {
  2513. var $2,$1;
  2514. $2=self["@keyBinder"];
  2515. if(($receiver = $2) == nil || $receiver == undefined){
  2516. self["@keyBinder"]=_st($HLKeyBinder())._new();
  2517. $1=self["@keyBinder"];
  2518. } else {
  2519. $1=$2;
  2520. };
  2521. return $1;
  2522. }, function($ctx1) {$ctx1.fill(self,"keyBinder",{},smalltalk.HLManager)})},
  2523. messageSends: ["ifNil:", "new"]}),
  2524. smalltalk.HLManager);
  2525. smalltalk.addMethod(
  2526. smalltalk.method({
  2527. selector: "refresh",
  2528. fn: function (){
  2529. var self=this;
  2530. return smalltalk.withContext(function($ctx1) {
  2531. _st(_st(window)._jQuery_(".navbar"))._remove();
  2532. _st(self)._appendToJQuery_(_st("body")._asJQuery());
  2533. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLManager)})},
  2534. messageSends: ["remove", "jQuery:", "appendToJQuery:", "asJQuery"]}),
  2535. smalltalk.HLManager);
  2536. smalltalk.addMethod(
  2537. smalltalk.method({
  2538. selector: "removeActiveTab",
  2539. fn: function (){
  2540. var self=this;
  2541. return smalltalk.withContext(function($ctx1) {
  2542. _st(self)._removeTab_(_st(self)._activeTab());
  2543. return self}, function($ctx1) {$ctx1.fill(self,"removeActiveTab",{},smalltalk.HLManager)})},
  2544. messageSends: ["removeTab:", "activeTab"]}),
  2545. smalltalk.HLManager);
  2546. smalltalk.addMethod(
  2547. smalltalk.method({
  2548. selector: "removeFromHistory:",
  2549. fn: function (aTab){
  2550. var self=this;
  2551. return smalltalk.withContext(function($ctx1) {
  2552. _st(self)._history_(_st(_st(self)._history())._reject_((function(each){
  2553. return smalltalk.withContext(function($ctx2) {
  2554. return _st(each).__eq_eq(aTab);
  2555. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})));
  2556. return self}, function($ctx1) {$ctx1.fill(self,"removeFromHistory:",{aTab:aTab},smalltalk.HLManager)})},
  2557. messageSends: ["history:", "reject:", "==", "history"]}),
  2558. smalltalk.HLManager);
  2559. smalltalk.addMethod(
  2560. smalltalk.method({
  2561. selector: "removeTab:",
  2562. fn: function (aTab){
  2563. var self=this;
  2564. return smalltalk.withContext(function($ctx1) {
  2565. var $1,$2;
  2566. $1=_st(_st(self)._tabs())._includes_(aTab);
  2567. if(! smalltalk.assert($1)){
  2568. $2=self;
  2569. return $2;
  2570. };
  2571. _st(self)._removeFromHistory_(aTab);
  2572. _st(_st(self)._tabs())._remove_(aTab);
  2573. _st(_st(self)._keyBinder())._flushBindings();
  2574. _st(aTab)._remove();
  2575. _st(self)._refresh();
  2576. _st(_st(self)._history())._ifNotEmpty_((function(){
  2577. return smalltalk.withContext(function($ctx2) {
  2578. return _st(_st(_st(self)._history())._last())._activate();
  2579. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2580. return self}, function($ctx1) {$ctx1.fill(self,"removeTab:",{aTab:aTab},smalltalk.HLManager)})},
  2581. messageSends: ["ifFalse:", "includes:", "tabs", "removeFromHistory:", "remove:", "flushBindings", "keyBinder", "remove", "refresh", "ifNotEmpty:", "activate", "last", "history"]}),
  2582. smalltalk.HLManager);
  2583. smalltalk.addMethod(
  2584. smalltalk.method({
  2585. selector: "renderAddOn:",
  2586. fn: function (html){
  2587. var self=this;
  2588. function $HLWidget(){return smalltalk.HLWidget||(typeof HLWidget=="undefined"?nil:HLWidget)}
  2589. return smalltalk.withContext(function($ctx1) {
  2590. var $1,$3,$4,$5,$7,$8,$6,$2;
  2591. $1=_st(html)._li();
  2592. _st($1)._class_("dropdown");
  2593. $2=_st($1)._with_((function(){
  2594. return smalltalk.withContext(function($ctx2) {
  2595. $3=_st(html)._a();
  2596. _st($3)._class_("dropdown-toggle");
  2597. _st($3)._at_put_("data-toggle","dropdown");
  2598. $4=_st($3)._with_((function(){
  2599. return smalltalk.withContext(function($ctx3) {
  2600. _st(html)._with_("Open...");
  2601. return _st(_st(html)._tag_("b"))._class_("caret");
  2602. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2603. $4;
  2604. $5=_st(html)._ul();
  2605. _st($5)._class_("dropdown-menu");
  2606. $6=_st($5)._with_((function(){
  2607. return smalltalk.withContext(function($ctx3) {
  2608. return _st(_st(_st(_st($HLWidget())._withAllSubclasses())._select_((function(each){
  2609. return smalltalk.withContext(function($ctx4) {
  2610. return _st(each)._canBeOpenAsTab();
  2611. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})})))._sorted_((function(a,b){
  2612. return smalltalk.withContext(function($ctx4) {
  2613. return _st(_st(a)._tabPriority()).__lt(_st(b)._tabPriority());
  2614. }, function($ctx4) {$ctx4.fillBlock({a:a,b:b},$ctx1)})})))._do_((function(each){
  2615. return smalltalk.withContext(function($ctx4) {
  2616. return _st(_st(html)._li())._with_((function(){
  2617. return smalltalk.withContext(function($ctx5) {
  2618. $7=_st(html)._a();
  2619. _st($7)._with_(_st(each)._tabLabel());
  2620. $8=_st($7)._onClick_((function(){
  2621. return smalltalk.withContext(function($ctx6) {
  2622. return _st(each)._openAsTab();
  2623. }, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}));
  2624. return $8;
  2625. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  2626. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})}));
  2627. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2628. return $6;
  2629. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2630. return self}, function($ctx1) {$ctx1.fill(self,"renderAddOn:",{html:html},smalltalk.HLManager)})},
  2631. messageSends: ["class:", "li", "with:", "a", "at:put:", "tag:", "ul", "do:", "tabLabel", "onClick:", "openAsTab", "sorted:", "<", "tabPriority", "select:", "canBeOpenAsTab", "withAllSubclasses"]}),
  2632. smalltalk.HLManager);
  2633. smalltalk.addMethod(
  2634. smalltalk.method({
  2635. selector: "renderContentOn:",
  2636. fn: function (html){
  2637. var self=this;
  2638. return smalltalk.withContext(function($ctx1) {
  2639. var $1,$3,$4,$2;
  2640. $1=_st(html)._div();
  2641. _st($1)._class_("navbar navbar-fixed-top");
  2642. $2=_st($1)._with_((function(){
  2643. return smalltalk.withContext(function($ctx2) {
  2644. $3=_st(html)._div();
  2645. _st($3)._class_("navbar-inner");
  2646. $4=_st($3)._with_((function(){
  2647. return smalltalk.withContext(function($ctx3) {
  2648. return _st(self)._renderTabsOn_(html);
  2649. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2650. return $4;
  2651. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2652. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLManager)})},
  2653. messageSends: ["class:", "div", "with:", "renderTabsOn:"]}),
  2654. smalltalk.HLManager);
  2655. smalltalk.addMethod(
  2656. smalltalk.method({
  2657. selector: "renderTabsOn:",
  2658. fn: function (html){
  2659. var self=this;
  2660. return smalltalk.withContext(function($ctx1) {
  2661. var $1,$3,$4,$6,$5,$8,$9,$7,$2;
  2662. $1=_st(html)._ul();
  2663. _st($1)._class_("nav");
  2664. $2=_st($1)._with_((function(){
  2665. return smalltalk.withContext(function($ctx2) {
  2666. _st(_st(self)._tabs())._do_((function(each){
  2667. return smalltalk.withContext(function($ctx3) {
  2668. $3=_st(html)._li();
  2669. $4=$3;
  2670. $6=_st(each)._isActive();
  2671. if(smalltalk.assert($6)){
  2672. $5="active";
  2673. } else {
  2674. $5="inactive";
  2675. };
  2676. _st($4)._class_($5);
  2677. $7=_st($3)._with_((function(){
  2678. return smalltalk.withContext(function($ctx4) {
  2679. $8=_st(html)._a();
  2680. _st($8)._with_((function(){
  2681. return smalltalk.withContext(function($ctx5) {
  2682. _st(_st(_st(html)._tag_("i"))._class_("icon-remove"))._onClick_((function(){
  2683. return smalltalk.withContext(function($ctx6) {
  2684. return _st(self)._removeTab_(each);
  2685. }, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}));
  2686. return _st(html)._with_(_st(each)._displayLabel());
  2687. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  2688. $9=_st($8)._onClick_((function(){
  2689. return smalltalk.withContext(function($ctx5) {
  2690. return _st(each)._activate();
  2691. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  2692. return $9;
  2693. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  2694. return $7;
  2695. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  2696. return _st(self)._renderAddOn_(html);
  2697. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2698. return self}, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html},smalltalk.HLManager)})},
  2699. messageSends: ["class:", "ul", "with:", "do:", "ifTrue:ifFalse:", "isActive", "li", "onClick:", "removeTab:", "tag:", "displayLabel", "a", "activate", "tabs", "renderAddOn:"]}),
  2700. smalltalk.HLManager);
  2701. smalltalk.addMethod(
  2702. smalltalk.method({
  2703. selector: "show:",
  2704. fn: function (aTab){
  2705. var self=this;
  2706. return smalltalk.withContext(function($ctx1) {
  2707. var $1,$2;
  2708. _st(_st(self)._tabs())._do_((function(each){
  2709. return smalltalk.withContext(function($ctx2) {
  2710. return _st(each)._hide();
  2711. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2712. $1=aTab;
  2713. _st($1)._show();
  2714. $2=_st($1)._focus();
  2715. return self}, function($ctx1) {$ctx1.fill(self,"show:",{aTab:aTab},smalltalk.HLManager)})},
  2716. messageSends: ["do:", "hide", "tabs", "show", "focus"]}),
  2717. smalltalk.HLManager);
  2718. smalltalk.addMethod(
  2719. smalltalk.method({
  2720. selector: "tabs",
  2721. fn: function (){
  2722. var self=this;
  2723. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  2724. return smalltalk.withContext(function($ctx1) {
  2725. var $2,$1;
  2726. $2=self["@tabs"];
  2727. if(($receiver = $2) == nil || $receiver == undefined){
  2728. self["@tabs"]=_st($OrderedCollection())._new();
  2729. $1=self["@tabs"];
  2730. } else {
  2731. $1=$2;
  2732. };
  2733. return $1;
  2734. }, function($ctx1) {$ctx1.fill(self,"tabs",{},smalltalk.HLManager)})},
  2735. messageSends: ["ifNil:", "new"]}),
  2736. smalltalk.HLManager);
  2737. smalltalk.HLManager.klass.iVarNames = ['current'];
  2738. smalltalk.addMethod(
  2739. smalltalk.method({
  2740. selector: "current",
  2741. fn: function (){
  2742. var self=this;
  2743. return smalltalk.withContext(function($ctx1) {
  2744. var $2,$1;
  2745. $2=self["@current"];
  2746. if(($receiver = $2) == nil || $receiver == undefined){
  2747. self["@current"]=_st(_st(self)._basicNew())._initialize();
  2748. $1=self["@current"];
  2749. } else {
  2750. $1=$2;
  2751. };
  2752. return $1;
  2753. }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.HLManager.klass)})},
  2754. messageSends: ["ifNil:", "initialize", "basicNew"]}),
  2755. smalltalk.HLManager.klass);
  2756. smalltalk.addMethod(
  2757. smalltalk.method({
  2758. selector: "initialize",
  2759. fn: function (){
  2760. var self=this;
  2761. return smalltalk.withContext(function($ctx1) {
  2762. _st(_st(self)._current())._appendToJQuery_(_st("body")._asJQuery());
  2763. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLManager.klass)})},
  2764. messageSends: ["appendToJQuery:", "asJQuery", "current"]}),
  2765. smalltalk.HLManager.klass);
  2766. smalltalk.addMethod(
  2767. smalltalk.method({
  2768. selector: "new",
  2769. fn: function (){
  2770. var self=this;
  2771. return smalltalk.withContext(function($ctx1) {
  2772. _st(self)._shouldNotImplement();
  2773. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.HLManager.klass)})},
  2774. messageSends: ["shouldNotImplement"]}),
  2775. smalltalk.HLManager.klass);
  2776. smalltalk.addClass('HLSUnit', smalltalk.HLWidget, [], 'Helios-Core');
  2777. smalltalk.addMethod(
  2778. smalltalk.method({
  2779. selector: "canBeOpenAsTab",
  2780. fn: function (){
  2781. var self=this;
  2782. return smalltalk.withContext(function($ctx1) {
  2783. return true;
  2784. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLSUnit.klass)})},
  2785. messageSends: []}),
  2786. smalltalk.HLSUnit.klass);
  2787. smalltalk.addMethod(
  2788. smalltalk.method({
  2789. selector: "tabLabel",
  2790. fn: function (){
  2791. var self=this;
  2792. return smalltalk.withContext(function($ctx1) {
  2793. return "SUnit";
  2794. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLSUnit.klass)})},
  2795. messageSends: []}),
  2796. smalltalk.HLSUnit.klass);
  2797. smalltalk.addMethod(
  2798. smalltalk.method({
  2799. selector: "tabPriority",
  2800. fn: function (){
  2801. var self=this;
  2802. return smalltalk.withContext(function($ctx1) {
  2803. var $1;
  2804. $1=(1000);
  2805. return $1;
  2806. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLSUnit.klass)})},
  2807. messageSends: []}),
  2808. smalltalk.HLSUnit.klass);
  2809. smalltalk.addClass('HLTranscript', smalltalk.HLWidget, [], 'Helios-Core');
  2810. smalltalk.addMethod(
  2811. smalltalk.method({
  2812. selector: "canBeOpenAsTab",
  2813. fn: function (){
  2814. var self=this;
  2815. return smalltalk.withContext(function($ctx1) {
  2816. return true;
  2817. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLTranscript.klass)})},
  2818. messageSends: []}),
  2819. smalltalk.HLTranscript.klass);
  2820. smalltalk.addMethod(
  2821. smalltalk.method({
  2822. selector: "tabLabel",
  2823. fn: function (){
  2824. var self=this;
  2825. return smalltalk.withContext(function($ctx1) {
  2826. return "Transcript";
  2827. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLTranscript.klass)})},
  2828. messageSends: []}),
  2829. smalltalk.HLTranscript.klass);
  2830. smalltalk.addMethod(
  2831. smalltalk.method({
  2832. selector: "tabPriority",
  2833. fn: function (){
  2834. var self=this;
  2835. return smalltalk.withContext(function($ctx1) {
  2836. var $1;
  2837. $1=(600);
  2838. return $1;
  2839. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLTranscript.klass)})},
  2840. messageSends: []}),
  2841. smalltalk.HLTranscript.klass);