Helios-Core.deploy.js 111 KB

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