Helios-Workspace.js 81 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079
  1. define("amber/Helios-Workspace", ["amber_vm/smalltalk","amber_vm/nil","amber_vm/_st"], function(smalltalk,nil,_st){
  2. smalltalk.addPackage('Helios-Workspace');
  3. smalltalk.addClass('HLCodeModel', smalltalk.Object, ['announcer', 'environment', 'receiver'], 'Helios-Workspace');
  4. smalltalk.addMethod(
  5. smalltalk.method({
  6. selector: "announcer",
  7. category: 'accessing',
  8. fn: function (){
  9. var self=this;
  10. function $Announcer(){return smalltalk.Announcer||(typeof Announcer=="undefined"?nil:Announcer)}
  11. return smalltalk.withContext(function($ctx1) {
  12. var $2,$1;
  13. $2=self["@announcer"];
  14. if(($receiver = $2) == nil || $receiver == undefined){
  15. self["@announcer"]=_st($Announcer())._new();
  16. $1=self["@announcer"];
  17. } else {
  18. $1=$2;
  19. };
  20. return $1;
  21. }, function($ctx1) {$ctx1.fill(self,"announcer",{},smalltalk.HLCodeModel)})},
  22. args: [],
  23. source: "announcer\x0a\x09^ announcer ifNil: [ announcer := Announcer new ]",
  24. messageSends: ["ifNil:", "new"],
  25. referencedClasses: ["Announcer"]
  26. }),
  27. smalltalk.HLCodeModel);
  28. smalltalk.addMethod(
  29. smalltalk.method({
  30. selector: "defaultReceiver",
  31. category: 'defaults',
  32. fn: function (){
  33. var self=this;
  34. function $DoIt(){return smalltalk.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}
  35. return smalltalk.withContext(function($ctx1) {
  36. var $1;
  37. $1=_st($DoIt())._new();
  38. return $1;
  39. }, function($ctx1) {$ctx1.fill(self,"defaultReceiver",{},smalltalk.HLCodeModel)})},
  40. args: [],
  41. source: "defaultReceiver\x0a\x09^ DoIt new",
  42. messageSends: ["new"],
  43. referencedClasses: ["DoIt"]
  44. }),
  45. smalltalk.HLCodeModel);
  46. smalltalk.addMethod(
  47. smalltalk.method({
  48. selector: "doIt:",
  49. category: 'actions',
  50. fn: function (aString){
  51. var self=this;
  52. return smalltalk.withContext(function($ctx1) {
  53. var $1;
  54. $1=_st(self._environment())._eval_on_(aString,self._receiver());
  55. return $1;
  56. }, function($ctx1) {$ctx1.fill(self,"doIt:",{aString:aString},smalltalk.HLCodeModel)})},
  57. args: ["aString"],
  58. source: "doIt: aString\x0a\x0a\x09^ self environment eval: aString on: self receiver",
  59. messageSends: ["eval:on:", "receiver", "environment"],
  60. referencedClasses: []
  61. }),
  62. smalltalk.HLCodeModel);
  63. smalltalk.addMethod(
  64. smalltalk.method({
  65. selector: "environment",
  66. category: 'accessing',
  67. fn: function (){
  68. var self=this;
  69. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  70. return smalltalk.withContext(function($ctx1) {
  71. var $2,$1;
  72. $2=self["@environment"];
  73. if(($receiver = $2) == nil || $receiver == undefined){
  74. $1=_st(_st($HLManager())._current())._environment();
  75. } else {
  76. $1=$2;
  77. };
  78. return $1;
  79. }, function($ctx1) {$ctx1.fill(self,"environment",{},smalltalk.HLCodeModel)})},
  80. args: [],
  81. source: "environment\x0a\x09^ environment ifNil: [ HLManager current environment ]",
  82. messageSends: ["ifNil:", "environment", "current"],
  83. referencedClasses: ["HLManager"]
  84. }),
  85. smalltalk.HLCodeModel);
  86. smalltalk.addMethod(
  87. smalltalk.method({
  88. selector: "environment:",
  89. category: 'accessing',
  90. fn: function (anEnvironment){
  91. var self=this;
  92. return smalltalk.withContext(function($ctx1) {
  93. self["@environment"]=anEnvironment;
  94. return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment},smalltalk.HLCodeModel)})},
  95. args: ["anEnvironment"],
  96. source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
  97. messageSends: [],
  98. referencedClasses: []
  99. }),
  100. smalltalk.HLCodeModel);
  101. smalltalk.addMethod(
  102. smalltalk.method({
  103. selector: "inspect:",
  104. category: 'actions',
  105. fn: function (anObject){
  106. var self=this;
  107. return smalltalk.withContext(function($ctx1) {
  108. _st(self._environment())._inspect_(anObject);
  109. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.HLCodeModel)})},
  110. args: ["anObject"],
  111. source: "inspect: anObject\x0a\x09self environment inspect: anObject",
  112. messageSends: ["inspect:", "environment"],
  113. referencedClasses: []
  114. }),
  115. smalltalk.HLCodeModel);
  116. smalltalk.addMethod(
  117. smalltalk.method({
  118. selector: "receiver",
  119. category: 'accessing',
  120. fn: function (){
  121. var self=this;
  122. return smalltalk.withContext(function($ctx1) {
  123. var $2,$1;
  124. $2=self["@receiver"];
  125. if(($receiver = $2) == nil || $receiver == undefined){
  126. self["@receiver"]=self._defaultReceiver();
  127. $1=self["@receiver"];
  128. } else {
  129. $1=$2;
  130. };
  131. return $1;
  132. }, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.HLCodeModel)})},
  133. args: [],
  134. source: "receiver\x0a\x09^ receiver ifNil: [ receiver := self defaultReceiver ]",
  135. messageSends: ["ifNil:", "defaultReceiver"],
  136. referencedClasses: []
  137. }),
  138. smalltalk.HLCodeModel);
  139. smalltalk.addMethod(
  140. smalltalk.method({
  141. selector: "receiver:",
  142. category: 'accessing',
  143. fn: function (anObject){
  144. var self=this;
  145. return smalltalk.withContext(function($ctx1) {
  146. self["@receiver"]=anObject;
  147. return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{anObject:anObject},smalltalk.HLCodeModel)})},
  148. args: ["anObject"],
  149. source: "receiver: anObject\x0a\x09receiver := anObject",
  150. messageSends: [],
  151. referencedClasses: []
  152. }),
  153. smalltalk.HLCodeModel);
  154. smalltalk.addMethod(
  155. smalltalk.method({
  156. selector: "on:",
  157. category: 'actions',
  158. fn: function (anEnvironment){
  159. var self=this;
  160. return smalltalk.withContext(function($ctx1) {
  161. var $2,$3,$1;
  162. $2=self._new();
  163. _st($2)._environment_(anEnvironment);
  164. $3=_st($2)._yourself();
  165. $1=$3;
  166. return $1;
  167. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment},smalltalk.HLCodeModel.klass)})},
  168. args: ["anEnvironment"],
  169. source: "on: anEnvironment\x0a\x0a\x09^ self new\x0a \x09environment: anEnvironment;\x0a yourself",
  170. messageSends: ["environment:", "new", "yourself"],
  171. referencedClasses: []
  172. }),
  173. smalltalk.HLCodeModel.klass);
  174. smalltalk.addClass('HLCodeWidget', smalltalk.HLWidget, ['model', 'wrapper', 'code', 'editor', 'state'], 'Helios-Workspace');
  175. smalltalk.addMethod(
  176. smalltalk.method({
  177. selector: "announcer",
  178. category: 'accessing',
  179. fn: function (){
  180. var self=this;
  181. return smalltalk.withContext(function($ctx1) {
  182. var $1;
  183. $1=_st(self._model())._announcer();
  184. return $1;
  185. }, function($ctx1) {$ctx1.fill(self,"announcer",{},smalltalk.HLCodeWidget)})},
  186. args: [],
  187. source: "announcer\x0a\x09^ self model announcer",
  188. messageSends: ["announcer", "model"],
  189. referencedClasses: []
  190. }),
  191. smalltalk.HLCodeWidget);
  192. smalltalk.addMethod(
  193. smalltalk.method({
  194. selector: "canHaveFocus",
  195. category: 'testing',
  196. fn: function (){
  197. var self=this;
  198. return smalltalk.withContext(function($ctx1) {
  199. return true;
  200. }, function($ctx1) {$ctx1.fill(self,"canHaveFocus",{},smalltalk.HLCodeWidget)})},
  201. args: [],
  202. source: "canHaveFocus\x0a\x09^ true",
  203. messageSends: [],
  204. referencedClasses: []
  205. }),
  206. smalltalk.HLCodeWidget);
  207. smalltalk.addMethod(
  208. smalltalk.method({
  209. selector: "clear",
  210. category: 'actions',
  211. fn: function (){
  212. var self=this;
  213. return smalltalk.withContext(function($ctx1) {
  214. self._contents_("");
  215. return self}, function($ctx1) {$ctx1.fill(self,"clear",{},smalltalk.HLCodeWidget)})},
  216. args: [],
  217. source: "clear\x0a\x09self contents: ''",
  218. messageSends: ["contents:"],
  219. referencedClasses: []
  220. }),
  221. smalltalk.HLCodeWidget);
  222. smalltalk.addMethod(
  223. smalltalk.method({
  224. selector: "configureEditor",
  225. category: 'actions',
  226. fn: function (){
  227. var self=this;
  228. return smalltalk.withContext(function($ctx1) {
  229. _st(self._editor())._at_put_("amberCodeWidget",self);
  230. _st(self._editor())._on_do_("change",(function(){
  231. return smalltalk.withContext(function($ctx2) {
  232. return self._onChange();
  233. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  234. return self}, function($ctx1) {$ctx1.fill(self,"configureEditor",{},smalltalk.HLCodeWidget)})},
  235. args: [],
  236. source: "configureEditor\x0a\x09self editor at: 'amberCodeWidget' put: self.\x0a\x09self editor on: 'change' do: [ self onChange ]",
  237. messageSends: ["at:put:", "editor", "on:do:", "onChange"],
  238. referencedClasses: []
  239. }),
  240. smalltalk.HLCodeWidget);
  241. smalltalk.addMethod(
  242. smalltalk.method({
  243. selector: "contents",
  244. category: 'accessing',
  245. fn: function (){
  246. var self=this;
  247. return smalltalk.withContext(function($ctx1) {
  248. var $1;
  249. $1=_st(self["@editor"])._getValue();
  250. return $1;
  251. }, function($ctx1) {$ctx1.fill(self,"contents",{},smalltalk.HLCodeWidget)})},
  252. args: [],
  253. source: "contents\x0a\x09^ editor getValue",
  254. messageSends: ["getValue"],
  255. referencedClasses: []
  256. }),
  257. smalltalk.HLCodeWidget);
  258. smalltalk.addMethod(
  259. smalltalk.method({
  260. selector: "contents:",
  261. category: 'accessing',
  262. fn: function (aString){
  263. var self=this;
  264. return smalltalk.withContext(function($ctx1) {
  265. var $1;
  266. _st(self["@editor"])._setValue_(aString);
  267. $1=self["@state"];
  268. if(($receiver = $1) == nil || $receiver == undefined){
  269. $1;
  270. } else {
  271. self._updateState();
  272. };
  273. return self}, function($ctx1) {$ctx1.fill(self,"contents:",{aString:aString},smalltalk.HLCodeWidget)})},
  274. args: ["aString"],
  275. source: "contents: aString\x0a\x09editor setValue: aString.\x0a\x09state ifNotNil: [ self updateState ]",
  276. messageSends: ["setValue:", "ifNotNil:", "updateState"],
  277. referencedClasses: []
  278. }),
  279. smalltalk.HLCodeWidget);
  280. smalltalk.addMethod(
  281. smalltalk.method({
  282. selector: "currentLine",
  283. category: 'accessing',
  284. fn: function (){
  285. var self=this;
  286. return smalltalk.withContext(function($ctx1) {
  287. var $1;
  288. $1=_st(self["@editor"])._getLine_(_st(_st(self["@editor"])._getCursor())._line());
  289. return $1;
  290. }, function($ctx1) {$ctx1.fill(self,"currentLine",{},smalltalk.HLCodeWidget)})},
  291. args: [],
  292. source: "currentLine\x0a ^editor getLine: (editor getCursor line)",
  293. messageSends: ["getLine:", "line", "getCursor"],
  294. referencedClasses: []
  295. }),
  296. smalltalk.HLCodeWidget);
  297. smalltalk.addMethod(
  298. smalltalk.method({
  299. selector: "currentLineOrSelection",
  300. category: 'accessing',
  301. fn: function (){
  302. var self=this;
  303. return smalltalk.withContext(function($ctx1) {
  304. var $2,$1;
  305. $2=_st(self["@editor"])._somethingSelected();
  306. if(smalltalk.assert($2)){
  307. $1=self._selection();
  308. } else {
  309. $1=self._currentLine();
  310. };
  311. return $1;
  312. }, function($ctx1) {$ctx1.fill(self,"currentLineOrSelection",{},smalltalk.HLCodeWidget)})},
  313. args: [],
  314. source: "currentLineOrSelection\x0a ^editor somethingSelected\x0a\x09\x09ifFalse: [ self currentLine ]\x0a\x09\x09ifTrue: [ self selection ]",
  315. messageSends: ["ifFalse:ifTrue:", "currentLine", "selection", "somethingSelected"],
  316. referencedClasses: []
  317. }),
  318. smalltalk.HLCodeWidget);
  319. smalltalk.addMethod(
  320. smalltalk.method({
  321. selector: "doIt",
  322. category: 'actions',
  323. fn: function (){
  324. var self=this;
  325. var result;
  326. function $HLDoItRequested(){return smalltalk.HLDoItRequested||(typeof HLDoItRequested=="undefined"?nil:HLDoItRequested)}
  327. function $HLDoItExecuted(){return smalltalk.HLDoItExecuted||(typeof HLDoItExecuted=="undefined"?nil:HLDoItExecuted)}
  328. return smalltalk.withContext(function($ctx1) {
  329. var $1;
  330. _st(_st(self._model())._announcer())._announce_(_st($HLDoItRequested())._on_(self["@model"]));
  331. result=_st(self["@model"])._doIt_(self._currentLineOrSelection());
  332. _st(_st(self._model())._announcer())._announce_(_st($HLDoItExecuted())._on_(self["@model"]));
  333. $1=result;
  334. return $1;
  335. }, function($ctx1) {$ctx1.fill(self,"doIt",{result:result},smalltalk.HLCodeWidget)})},
  336. args: [],
  337. source: "doIt\x0a\x09| result |\x0a\x0a\x09self model announcer announce: (HLDoItRequested on: model).\x0a\x09result := model doIt: self currentLineOrSelection.\x0a\x09self model announcer announce: (HLDoItExecuted on: model).\x0a\x0a\x09^ result ",
  338. messageSends: ["announce:", "on:", "announcer", "model", "doIt:", "currentLineOrSelection"],
  339. referencedClasses: ["HLDoItRequested", "HLDoItExecuted"]
  340. }),
  341. smalltalk.HLCodeWidget);
  342. smalltalk.addMethod(
  343. smalltalk.method({
  344. selector: "editor",
  345. category: 'actions',
  346. fn: function (){
  347. var self=this;
  348. return smalltalk.withContext(function($ctx1) {
  349. var $1;
  350. $1=self["@editor"];
  351. return $1;
  352. }, function($ctx1) {$ctx1.fill(self,"editor",{},smalltalk.HLCodeWidget)})},
  353. args: [],
  354. source: "editor\x0a\x09^ editor",
  355. messageSends: [],
  356. referencedClasses: []
  357. }),
  358. smalltalk.HLCodeWidget);
  359. smalltalk.addMethod(
  360. smalltalk.method({
  361. selector: "editorOptions",
  362. category: 'accessing',
  363. fn: function (){
  364. var self=this;
  365. return smalltalk.withContext(function($ctx1) {
  366. var $1;
  367. $1=smalltalk.HashedCollection._from_(["theme".__minus_gt("amber"),"lineNumbers".__minus_gt(true),"enterMode".__minus_gt("flat"),"indentWithTabs".__minus_gt(true),"indentUnit".__minus_gt((4)),"matchBrackets".__minus_gt(true),"electricChars".__minus_gt(false),"keyMap".__minus_gt("Amber"),"extraKeys".__minus_gt(smalltalk.HashedCollection._from_(["Shift-Space".__minus_gt("autocomplete")]))]);
  368. return $1;
  369. }, function($ctx1) {$ctx1.fill(self,"editorOptions",{},smalltalk.HLCodeWidget)})},
  370. args: [],
  371. source: "editorOptions\x0a\x09^ #{\x0a\x09\x09'theme' -> 'amber'.\x0a 'lineNumbers' -> true.\x0a 'enterMode' -> 'flat'.\x0a 'indentWithTabs' -> true.\x0a\x09\x09'indentUnit' -> 4.\x0a 'matchBrackets' -> true.\x0a 'electricChars' -> false.\x0a\x09\x09'keyMap' -> 'Amber'.\x0a\x09\x09'extraKeys' -> #{'Shift-Space' -> 'autocomplete'}\x0a\x09}",
  372. messageSends: ["->"],
  373. referencedClasses: []
  374. }),
  375. smalltalk.HLCodeWidget);
  376. smalltalk.addMethod(
  377. smalltalk.method({
  378. selector: "focus",
  379. category: 'actions',
  380. fn: function (){
  381. var self=this;
  382. return smalltalk.withContext(function($ctx1) {
  383. _st(self["@editor"])._focus();
  384. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLCodeWidget)})},
  385. args: [],
  386. source: "focus\x0a\x09editor focus",
  387. messageSends: ["focus"],
  388. referencedClasses: []
  389. }),
  390. smalltalk.HLCodeWidget);
  391. smalltalk.addMethod(
  392. smalltalk.method({
  393. selector: "hasFocus",
  394. category: 'testing',
  395. fn: function (){
  396. var self=this;
  397. return smalltalk.withContext(function($ctx1) {
  398. var $1;
  399. $1=_st(_st(self["@code"])._asJQuery())._is_(":active");
  400. return $1;
  401. }, function($ctx1) {$ctx1.fill(self,"hasFocus",{},smalltalk.HLCodeWidget)})},
  402. args: [],
  403. source: "hasFocus\x0a\x09^ code asJQuery is: ':active'",
  404. messageSends: ["is:", "asJQuery"],
  405. referencedClasses: []
  406. }),
  407. smalltalk.HLCodeWidget);
  408. smalltalk.addMethod(
  409. smalltalk.method({
  410. selector: "hasModification",
  411. category: 'testing',
  412. fn: function (){
  413. var self=this;
  414. return smalltalk.withContext(function($ctx1) {
  415. return false;
  416. }, function($ctx1) {$ctx1.fill(self,"hasModification",{},smalltalk.HLCodeWidget)})},
  417. args: [],
  418. source: "hasModification\x0a\x09^ false",
  419. messageSends: [],
  420. referencedClasses: []
  421. }),
  422. smalltalk.HLCodeWidget);
  423. smalltalk.addMethod(
  424. smalltalk.method({
  425. selector: "inspectIt",
  426. category: 'actions',
  427. fn: function (){
  428. var self=this;
  429. var newInspector;
  430. function $HLInspectItRequested(){return smalltalk.HLInspectItRequested||(typeof HLInspectItRequested=="undefined"?nil:HLInspectItRequested)}
  431. return smalltalk.withContext(function($ctx1) {
  432. _st(_st(self._model())._announcer())._announce_(_st($HLInspectItRequested())._on_(self["@model"]));
  433. _st(self._model())._inspect_(self._doIt());
  434. return self}, function($ctx1) {$ctx1.fill(self,"inspectIt",{newInspector:newInspector},smalltalk.HLCodeWidget)})},
  435. args: [],
  436. source: "inspectIt\x0a\x09| newInspector |\x0a \x0a\x09self model announcer announce: (HLInspectItRequested on: model).\x0a\x09self model inspect: self doIt",
  437. messageSends: ["announce:", "on:", "announcer", "model", "inspect:", "doIt"],
  438. referencedClasses: ["HLInspectItRequested"]
  439. }),
  440. smalltalk.HLCodeWidget);
  441. smalltalk.addMethod(
  442. smalltalk.method({
  443. selector: "messageHintFor:token:",
  444. category: 'hints',
  445. fn: function (anEditor,aToken){
  446. var self=this;
  447. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  448. return smalltalk.withContext(function($ctx1) {
  449. var $1;
  450. $1=_st(_st(_st(_st(_st(_st(_st($Smalltalk())._current())._at_("allSelectors"))._value())._asSet())._asArray())._select_((function(each){
  451. return smalltalk.withContext(function($ctx2) {
  452. return _st(each)._includesSubString_(_st(aToken)._string());
  453. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._reject_((function(each){
  454. return smalltalk.withContext(function($ctx2) {
  455. return _st(each).__eq(_st(aToken)._string());
  456. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  457. return $1;
  458. }, function($ctx1) {$ctx1.fill(self,"messageHintFor:token:",{anEditor:anEditor,aToken:aToken},smalltalk.HLCodeWidget)})},
  459. args: ["anEditor", "aToken"],
  460. source: "messageHintFor: anEditor token: aToken\x0a\x09^ ((Smalltalk current at: 'allSelectors') value asSet asArray \x0a\x09\x09select: [ :each | each includesSubString: aToken string ])\x0a\x09\x09reject: [ :each | each = aToken string ]",
  461. messageSends: ["reject:", "=", "string", "select:", "includesSubString:", "asArray", "asSet", "value", "at:", "current"],
  462. referencedClasses: ["Smalltalk"]
  463. }),
  464. smalltalk.HLCodeWidget);
  465. smalltalk.addMethod(
  466. smalltalk.method({
  467. selector: "model",
  468. category: 'accessing',
  469. fn: function (){
  470. var self=this;
  471. function $HLCodeModel(){return smalltalk.HLCodeModel||(typeof HLCodeModel=="undefined"?nil:HLCodeModel)}
  472. return smalltalk.withContext(function($ctx1) {
  473. var $2,$1;
  474. $2=self["@model"];
  475. if(($receiver = $2) == nil || $receiver == undefined){
  476. self["@model"]=_st($HLCodeModel())._new();
  477. $1=self["@model"];
  478. } else {
  479. $1=$2;
  480. };
  481. return $1;
  482. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLCodeWidget)})},
  483. args: [],
  484. source: "model\x0a\x09^ model ifNil: [ model := HLCodeModel new ]",
  485. messageSends: ["ifNil:", "new"],
  486. referencedClasses: ["HLCodeModel"]
  487. }),
  488. smalltalk.HLCodeWidget);
  489. smalltalk.addMethod(
  490. smalltalk.method({
  491. selector: "model:",
  492. category: 'accessing',
  493. fn: function (aModel){
  494. var self=this;
  495. return smalltalk.withContext(function($ctx1) {
  496. self["@model"]=aModel;
  497. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLCodeWidget)})},
  498. args: ["aModel"],
  499. source: "model: aModel\x0a\x09model := aModel",
  500. messageSends: [],
  501. referencedClasses: []
  502. }),
  503. smalltalk.HLCodeWidget);
  504. smalltalk.addMethod(
  505. smalltalk.method({
  506. selector: "onChange",
  507. category: 'reactions',
  508. fn: function (){
  509. var self=this;
  510. return smalltalk.withContext(function($ctx1) {
  511. self._updateState();
  512. return self}, function($ctx1) {$ctx1.fill(self,"onChange",{},smalltalk.HLCodeWidget)})},
  513. args: [],
  514. source: "onChange\x0a\x09self updateState",
  515. messageSends: ["updateState"],
  516. referencedClasses: []
  517. }),
  518. smalltalk.HLCodeWidget);
  519. smalltalk.addMethod(
  520. smalltalk.method({
  521. selector: "onDoIt",
  522. category: 'reactions',
  523. fn: function (){
  524. var self=this;
  525. return smalltalk.withContext(function($ctx1) {
  526. self._doIt();
  527. return self}, function($ctx1) {$ctx1.fill(self,"onDoIt",{},smalltalk.HLCodeWidget)})},
  528. args: [],
  529. source: "onDoIt\x0a\x09\x0a self doIt",
  530. messageSends: ["doIt"],
  531. referencedClasses: []
  532. }),
  533. smalltalk.HLCodeWidget);
  534. smalltalk.addMethod(
  535. smalltalk.method({
  536. selector: "onInspectIt",
  537. category: 'reactions',
  538. fn: function (){
  539. var self=this;
  540. return smalltalk.withContext(function($ctx1) {
  541. self._inspectIt();
  542. return self}, function($ctx1) {$ctx1.fill(self,"onInspectIt",{},smalltalk.HLCodeWidget)})},
  543. args: [],
  544. source: "onInspectIt\x0a\x0a\x09self inspectIt",
  545. messageSends: ["inspectIt"],
  546. referencedClasses: []
  547. }),
  548. smalltalk.HLCodeWidget);
  549. smalltalk.addMethod(
  550. smalltalk.method({
  551. selector: "onPrintIt",
  552. category: 'reactions',
  553. fn: function (){
  554. var self=this;
  555. return smalltalk.withContext(function($ctx1) {
  556. self._printIt();
  557. return self}, function($ctx1) {$ctx1.fill(self,"onPrintIt",{},smalltalk.HLCodeWidget)})},
  558. args: [],
  559. source: "onPrintIt\x0a\x0a\x09self printIt",
  560. messageSends: ["printIt"],
  561. referencedClasses: []
  562. }),
  563. smalltalk.HLCodeWidget);
  564. smalltalk.addMethod(
  565. smalltalk.method({
  566. selector: "onSaveIt",
  567. category: 'reactions',
  568. fn: function (){
  569. var self=this;
  570. return smalltalk.withContext(function($ctx1) {
  571. return self}, function($ctx1) {$ctx1.fill(self,"onSaveIt",{},smalltalk.HLCodeWidget)})},
  572. args: [],
  573. source: "onSaveIt\x0a\x09\x22I do not do anything\x22",
  574. messageSends: [],
  575. referencedClasses: []
  576. }),
  577. smalltalk.HLCodeWidget);
  578. smalltalk.addMethod(
  579. smalltalk.method({
  580. selector: "print:",
  581. category: 'actions',
  582. fn: function (aString){
  583. var self=this;
  584. var start,stop,currentLine;
  585. function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  586. return smalltalk.withContext(function($ctx1) {
  587. currentLine=_st(_st(self["@editor"])._getCursor_(false))._line();
  588. start=_st($HashedCollection())._new();
  589. _st(start)._at_put_("line",currentLine);
  590. _st(start)._at_put_("ch",_st(_st(self["@editor"])._getCursor_(false))._ch());
  591. _st(_st(self["@editor"])._getSelection())._ifEmpty_((function(){
  592. return smalltalk.withContext(function($ctx2) {
  593. _st(start)._at_put_("ch",_st(_st(self["@editor"])._getLine_(currentLine))._size());
  594. return _st(self["@editor"])._setSelection_end_(smalltalk.HashedCollection._from_(["line".__minus_gt(currentLine),"ch".__minus_gt((0))]),start);
  595. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  596. stop=_st($HashedCollection())._new();
  597. _st(stop)._at_put_("line",currentLine);
  598. _st(stop)._at_put_("ch",_st(_st(_st(start)._at_("ch")).__plus(_st(aString)._size())).__plus((2)));
  599. _st(self["@editor"])._replaceSelection_(_st(_st(_st(_st(self["@editor"])._getSelection()).__comma(" ")).__comma(aString)).__comma(" "));
  600. _st(self["@editor"])._setCursor_(_st(self["@editor"])._getCursor_(true));
  601. _st(self["@editor"])._setSelection_end_(stop,start);
  602. return self}, function($ctx1) {$ctx1.fill(self,"print:",{aString:aString,start:start,stop:stop,currentLine:currentLine},smalltalk.HLCodeWidget)})},
  603. args: ["aString"],
  604. source: "print: aString\x0a\x09| start stop currentLine |\x0a currentLine := (editor getCursor: false) line.\x0a\x09start := HashedCollection new.\x0a\x09start at: 'line' put: currentLine.\x0a\x09start at: 'ch' put: (editor getCursor: false) ch.\x0a (editor getSelection) ifEmpty: [\x0a \x09\x22select current line if selection is empty\x22\x0a \x09start at: 'ch' put: (editor getLine: currentLine) size.\x0a editor setSelection: #{'line' -> currentLine. 'ch' -> 0} end: start.\x0a ].\x0a\x09stop := HashedCollection new.\x0a\x09stop at: 'line' put: currentLine.\x0a\x09stop at: 'ch' put: ((start at: 'ch') + aString size + 2).\x0a\x0a\x09editor replaceSelection: (editor getSelection, ' ', aString, ' ').\x0a\x09editor setCursor: (editor getCursor: true).\x0a\x09editor setSelection: stop end: start",
  605. messageSends: ["line", "getCursor:", "new", "at:put:", "ch", "ifEmpty:", "size", "getLine:", "setSelection:end:", "->", "getSelection", "+", "at:", "replaceSelection:", ",", "setCursor:"],
  606. referencedClasses: ["HashedCollection"]
  607. }),
  608. smalltalk.HLCodeWidget);
  609. smalltalk.addMethod(
  610. smalltalk.method({
  611. selector: "printIt",
  612. category: 'actions',
  613. fn: function (){
  614. var self=this;
  615. var result;
  616. function $HLPrintItRequested(){return smalltalk.HLPrintItRequested||(typeof HLPrintItRequested=="undefined"?nil:HLPrintItRequested)}
  617. return smalltalk.withContext(function($ctx1) {
  618. result=self._doIt();
  619. _st(_st(self._model())._announcer())._announce_(_st($HLPrintItRequested())._on_(self["@model"]));
  620. self._print_(_st(result)._printString());
  621. self._focus();
  622. return self}, function($ctx1) {$ctx1.fill(self,"printIt",{result:result},smalltalk.HLCodeWidget)})},
  623. args: [],
  624. source: "printIt\x0a\x09| result |\x0a\x0a\x09result:= self doIt. \x0a\x09self model announcer announce: (HLPrintItRequested on: model).\x0a self print: result printString.\x0a\x09\x0a\x09self focus.",
  625. messageSends: ["doIt", "announce:", "on:", "announcer", "model", "print:", "printString", "focus"],
  626. referencedClasses: ["HLPrintItRequested"]
  627. }),
  628. smalltalk.HLCodeWidget);
  629. smalltalk.addMethod(
  630. smalltalk.method({
  631. selector: "receiver",
  632. category: 'accessing',
  633. fn: function (){
  634. var self=this;
  635. return smalltalk.withContext(function($ctx1) {
  636. var $1;
  637. $1=_st(self._model())._receiver();
  638. return $1;
  639. }, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.HLCodeWidget)})},
  640. args: [],
  641. source: "receiver\x0a\x09^ self model receiver",
  642. messageSends: ["receiver", "model"],
  643. referencedClasses: []
  644. }),
  645. smalltalk.HLCodeWidget);
  646. smalltalk.addMethod(
  647. smalltalk.method({
  648. selector: "receiver:",
  649. category: 'accessing',
  650. fn: function (anObject){
  651. var self=this;
  652. return smalltalk.withContext(function($ctx1) {
  653. _st(self._model())._receiver_(anObject);
  654. return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{anObject:anObject},smalltalk.HLCodeWidget)})},
  655. args: ["anObject"],
  656. source: "receiver: anObject\x0a\x09self model receiver: anObject",
  657. messageSends: ["receiver:", "model"],
  658. referencedClasses: []
  659. }),
  660. smalltalk.HLCodeWidget);
  661. smalltalk.addMethod(
  662. smalltalk.method({
  663. selector: "renderButtonsOn:",
  664. category: 'rendering',
  665. fn: function (html){
  666. var self=this;
  667. return smalltalk.withContext(function($ctx1) {
  668. var $1,$2,$3,$4,$5,$6;
  669. $1=_st(html)._button();
  670. _st($1)._class_("button");
  671. _st($1)._with_("DoIt");
  672. $2=_st($1)._onClick_((function(){
  673. return smalltalk.withContext(function($ctx2) {
  674. return self._doIt();
  675. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  676. $3=_st(html)._button();
  677. _st($3)._class_("button");
  678. _st($3)._with_("PrintIt");
  679. $4=_st($3)._onClick_((function(){
  680. return smalltalk.withContext(function($ctx2) {
  681. return self._printIt();
  682. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  683. $5=_st(html)._button();
  684. _st($5)._class_("button");
  685. _st($5)._with_("InspectIt");
  686. $6=_st($5)._onClick_((function(){
  687. return smalltalk.withContext(function($ctx2) {
  688. return self._inspectIt();
  689. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  690. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLCodeWidget)})},
  691. args: ["html"],
  692. source: "renderButtonsOn: html\x0a\x09html button \x0a\x09\x09class: 'button';\x0a\x09\x09with: 'DoIt';\x0a\x09\x09onClick: [ self doIt ].\x0a\x09html button \x0a\x09\x09class: 'button';\x0a\x09\x09with: 'PrintIt';\x0a\x09\x09onClick: [ self printIt ].\x0a\x09html button \x0a\x09\x09class: 'button';\x0a\x09\x09with: 'InspectIt';\x0a\x09\x09onClick: [ self inspectIt ]",
  693. messageSends: ["class:", "button", "with:", "onClick:", "doIt", "printIt", "inspectIt"],
  694. referencedClasses: []
  695. }),
  696. smalltalk.HLCodeWidget);
  697. smalltalk.addMethod(
  698. smalltalk.method({
  699. selector: "renderContentOn:",
  700. category: 'rendering',
  701. fn: function (html){
  702. var self=this;
  703. return smalltalk.withContext(function($ctx1) {
  704. var $1,$2,$3,$4,$5,$6;
  705. $1=_st(html)._div();
  706. _st($1)._class_("editor");
  707. $2=_st($1)._with_((function(){
  708. return smalltalk.withContext(function($ctx2) {
  709. self["@code"]=_st(html)._textarea();
  710. return self["@code"];
  711. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  712. self["@state"]=_st(_st(html)._div())._class_("state");
  713. $3=_st(html)._div();
  714. _st($3)._class_("buttons_bar");
  715. $4=_st($3)._with_((function(){
  716. return smalltalk.withContext(function($ctx2) {
  717. return self._renderButtonsOn_(html);
  718. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  719. $5=self;
  720. _st($5)._setEditorOn_(_st(self["@code"])._element());
  721. _st($5)._configureEditor();
  722. $6=_st($5)._updateState();
  723. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLCodeWidget)})},
  724. args: ["html"],
  725. source: "renderContentOn: html\x0a\x09html div class: 'editor'; with: [\x0a\x09\x09code := html textarea ].\x0a\x09state := html div class: 'state'.\x0a\x09\x0a\x09html div \x0a\x09\x09class: 'buttons_bar';\x0a\x09\x09with: [ self renderButtonsOn: html ].\x0a\x09\x0a\x09self \x0a\x09\x09setEditorOn: code element;\x0a\x09\x09configureEditor;\x0a\x09\x09updateState",
  726. messageSends: ["class:", "div", "with:", "textarea", "renderButtonsOn:", "setEditorOn:", "element", "configureEditor", "updateState"],
  727. referencedClasses: []
  728. }),
  729. smalltalk.HLCodeWidget);
  730. smalltalk.addMethod(
  731. smalltalk.method({
  732. selector: "saveIt",
  733. category: 'actions',
  734. fn: function (){
  735. var self=this;
  736. return smalltalk.withContext(function($ctx1) {
  737. return self}, function($ctx1) {$ctx1.fill(self,"saveIt",{},smalltalk.HLCodeWidget)})},
  738. args: [],
  739. source: "saveIt\x0a\x09\x22I do not do anything\x22",
  740. messageSends: [],
  741. referencedClasses: []
  742. }),
  743. smalltalk.HLCodeWidget);
  744. smalltalk.addMethod(
  745. smalltalk.method({
  746. selector: "selection",
  747. category: 'accessing',
  748. fn: function (){
  749. var self=this;
  750. return smalltalk.withContext(function($ctx1) {
  751. var $1;
  752. $1=_st(self["@editor"])._getSelection();
  753. return $1;
  754. }, function($ctx1) {$ctx1.fill(self,"selection",{},smalltalk.HLCodeWidget)})},
  755. args: [],
  756. source: "selection\x0a\x09^editor getSelection",
  757. messageSends: ["getSelection"],
  758. referencedClasses: []
  759. }),
  760. smalltalk.HLCodeWidget);
  761. smalltalk.addMethod(
  762. smalltalk.method({
  763. selector: "selectionEnd",
  764. category: 'accessing',
  765. fn: function (){
  766. var self=this;
  767. return smalltalk.withContext(function($ctx1) {
  768. var $1;
  769. $1=_st(_st(self["@code"])._element())._selectionEnd();
  770. return $1;
  771. }, function($ctx1) {$ctx1.fill(self,"selectionEnd",{},smalltalk.HLCodeWidget)})},
  772. args: [],
  773. source: "selectionEnd\x0a ^code element selectionEnd",
  774. messageSends: ["selectionEnd", "element"],
  775. referencedClasses: []
  776. }),
  777. smalltalk.HLCodeWidget);
  778. smalltalk.addMethod(
  779. smalltalk.method({
  780. selector: "selectionEnd:",
  781. category: 'accessing',
  782. fn: function (anInteger){
  783. var self=this;
  784. return smalltalk.withContext(function($ctx1) {
  785. _st(_st(self["@code"])._element())._selectionEnd_(anInteger);
  786. return self}, function($ctx1) {$ctx1.fill(self,"selectionEnd:",{anInteger:anInteger},smalltalk.HLCodeWidget)})},
  787. args: ["anInteger"],
  788. source: "selectionEnd: anInteger\x0a code element selectionEnd: anInteger",
  789. messageSends: ["selectionEnd:", "element"],
  790. referencedClasses: []
  791. }),
  792. smalltalk.HLCodeWidget);
  793. smalltalk.addMethod(
  794. smalltalk.method({
  795. selector: "selectionStart",
  796. category: 'accessing',
  797. fn: function (){
  798. var self=this;
  799. return smalltalk.withContext(function($ctx1) {
  800. var $1;
  801. $1=_st(_st(self["@code"])._element())._selectionStart();
  802. return $1;
  803. }, function($ctx1) {$ctx1.fill(self,"selectionStart",{},smalltalk.HLCodeWidget)})},
  804. args: [],
  805. source: "selectionStart\x0a ^code element selectionStart",
  806. messageSends: ["selectionStart", "element"],
  807. referencedClasses: []
  808. }),
  809. smalltalk.HLCodeWidget);
  810. smalltalk.addMethod(
  811. smalltalk.method({
  812. selector: "selectionStart:",
  813. category: 'accessing',
  814. fn: function (anInteger){
  815. var self=this;
  816. return smalltalk.withContext(function($ctx1) {
  817. _st(_st(self["@code"])._element())._selectionStart_(anInteger);
  818. return self}, function($ctx1) {$ctx1.fill(self,"selectionStart:",{anInteger:anInteger},smalltalk.HLCodeWidget)})},
  819. args: ["anInteger"],
  820. source: "selectionStart: anInteger\x0a code element selectionStart: anInteger",
  821. messageSends: ["selectionStart:", "element"],
  822. referencedClasses: []
  823. }),
  824. smalltalk.HLCodeWidget);
  825. smalltalk.addMethod(
  826. smalltalk.method({
  827. selector: "setEditorOn:",
  828. category: 'actions',
  829. fn: function (aTextarea){
  830. var self=this;
  831. return smalltalk.withContext(function($ctx1) {
  832. self['@editor'] = CodeMirror.fromTextArea(aTextarea, self._editorOptions());
  833. return self}, function($ctx1) {$ctx1.fill(self,"setEditorOn:",{aTextarea:aTextarea},smalltalk.HLCodeWidget)})},
  834. args: ["aTextarea"],
  835. source: "setEditorOn: aTextarea\x0a\x09<self['@editor'] = CodeMirror.fromTextArea(aTextarea, self._editorOptions())>",
  836. messageSends: [],
  837. referencedClasses: []
  838. }),
  839. smalltalk.HLCodeWidget);
  840. smalltalk.addMethod(
  841. smalltalk.method({
  842. selector: "updateState",
  843. category: 'updating',
  844. fn: function (){
  845. var self=this;
  846. return smalltalk.withContext(function($ctx1) {
  847. var $1;
  848. $1=self._hasModification();
  849. if(smalltalk.assert($1)){
  850. _st(_st(self["@state"])._asJQuery())._addClass_("modified");
  851. } else {
  852. _st(_st(self["@state"])._asJQuery())._removeClass_("modified");
  853. };
  854. return self}, function($ctx1) {$ctx1.fill(self,"updateState",{},smalltalk.HLCodeWidget)})},
  855. args: [],
  856. source: "updateState\x0a\x09self hasModification \x0a\x09\x09ifTrue: [ state asJQuery addClass: 'modified' ]\x0a\x09\x09ifFalse: [ state asJQuery removeClass: 'modified' ]",
  857. messageSends: ["ifTrue:ifFalse:", "addClass:", "asJQuery", "removeClass:", "hasModification"],
  858. referencedClasses: []
  859. }),
  860. smalltalk.HLCodeWidget);
  861. smalltalk.addMethod(
  862. smalltalk.method({
  863. selector: "variableHintFor:token:",
  864. category: 'hints',
  865. fn: function (anEditor,aToken){
  866. var self=this;
  867. var variables,classNames,pseudoVariables;
  868. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  869. return smalltalk.withContext(function($ctx1) {
  870. var $1;
  871. variables=_st(_st(_st(_st(window)._jQuery_(_st(_st(anEditor)._display())._wrapper()))._find_("span.cm-variable"))._get())._collect_((function(each){
  872. return smalltalk.withContext(function($ctx2) {
  873. return _st(_st(window)._jQuery_(each))._html();
  874. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  875. classNames=_st(_st(_st($Smalltalk())._current())._classes())._collect_((function(each){
  876. return smalltalk.withContext(function($ctx2) {
  877. return _st(each)._name();
  878. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  879. pseudoVariables=_st(_st($Smalltalk())._current())._pseudoVariableNames();
  880. $1=_st(_st(_st(_st(_st(_st(variables).__comma(classNames)).__comma(pseudoVariables))._asSet())._asArray())._select_((function(each){
  881. return smalltalk.withContext(function($ctx2) {
  882. return _st(each)._includesSubString_(_st(aToken)._string());
  883. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._reject_((function(each){
  884. return smalltalk.withContext(function($ctx2) {
  885. return _st(each).__eq(_st(aToken)._string());
  886. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  887. return $1;
  888. }, function($ctx1) {$ctx1.fill(self,"variableHintFor:token:",{anEditor:anEditor,aToken:aToken,variables:variables,classNames:classNames,pseudoVariables:pseudoVariables},smalltalk.HLCodeWidget)})},
  889. args: ["anEditor", "aToken"],
  890. source: "variableHintFor: anEditor token: aToken\x0a\x09| variables classNames pseudoVariables |\x0a\x09\x0a\x09variables := ((window jQuery: anEditor display wrapper) find: 'span.cm-variable') get\x0a\x09\x09collect: [ :each | (window jQuery: each) html ].\x0a\x09\x0a\x09classNames := Smalltalk current classes collect: [ :each | each name ].\x0a\x09pseudoVariables := Smalltalk current pseudoVariableNames.\x0a\x09\x0a\x09^ ((variables, classNames, pseudoVariables) asSet asArray \x0a\x09\x09select: [ :each | each includesSubString: aToken string ])\x0a\x09\x09reject: [ :each | each = aToken string ]",
  891. messageSends: ["collect:", "html", "jQuery:", "get", "find:", "wrapper", "display", "name", "classes", "current", "pseudoVariableNames", "reject:", "=", "string", "select:", "includesSubString:", "asArray", "asSet", ","],
  892. referencedClasses: ["Smalltalk"]
  893. }),
  894. smalltalk.HLCodeWidget);
  895. smalltalk.addMethod(
  896. smalltalk.method({
  897. selector: "hintFor:options:",
  898. category: 'hints',
  899. fn: function (anEditor,options){
  900. var self=this;
  901. var cursor,token,completions;
  902. function $CodeMirror(){return smalltalk.CodeMirror||(typeof CodeMirror=="undefined"?nil:CodeMirror)}
  903. function $HLCodeWidget(){return smalltalk.HLCodeWidget||(typeof HLCodeWidget=="undefined"?nil:HLCodeWidget)}
  904. return smalltalk.withContext(function($ctx1) {
  905. var $1,$2;
  906. cursor=_st(anEditor)._getCursor();
  907. token=_st(anEditor)._getTokenAt_(cursor);
  908. _st(token)._at_put_("state",_st(_st(_st($CodeMirror())._basicAt_("innerMode"))._value_value_(_st(anEditor)._getMode(),_st(token)._at_("state")))._state());
  909. $1=_st(_st(token)._type()).__eq("variable");
  910. if(smalltalk.assert($1)){
  911. completions=_st($HLCodeWidget())._variableHintFor_token_(anEditor,token);
  912. } else {
  913. completions=_st($HLCodeWidget())._messageHintFor_token_(anEditor,token);
  914. };
  915. $2=smalltalk.HashedCollection._from_(["list".__minus_gt(completions),"from".__minus_gt(_st(_st($CodeMirror())._basicAt_("Pos"))._value_value_(_st(cursor)._line(),_st(token)._end())),"to".__minus_gt(_st(_st($CodeMirror())._basicAt_("Pos"))._value_value_(_st(cursor)._line(),_st(token)._start()))]);
  916. return $2;
  917. }, function($ctx1) {$ctx1.fill(self,"hintFor:options:",{anEditor:anEditor,options:options,cursor:cursor,token:token,completions:completions},smalltalk.HLCodeWidget.klass)})},
  918. args: ["anEditor", "options"],
  919. source: "hintFor: anEditor options: options\x0a\x09| cursor token completions |\x0a\x09\x0a\x09cursor := anEditor getCursor.\x0a\x09token := anEditor getTokenAt: cursor.\x0a\x09token at: 'state' put: ((CodeMirror basicAt: 'innerMode')\x0a\x09\x09value: anEditor getMode value: (token at: 'state')) state.\x0a\x09\x0a\x09completions := token type = 'variable' \x0a\x09\x09ifTrue: [ HLCodeWidget variableHintFor: anEditor token: token ]\x0a\x09\x09ifFalse: [ HLCodeWidget messageHintFor: anEditor token: token ].\x0a\x09\x0a\x09^ #{\x0a\x09\x09'list' -> completions.\x0a\x09\x09'from' -> ((CodeMirror basicAt: 'Pos') value: cursor line value: token end).\x0a\x09\x09'to' -> ((CodeMirror basicAt: 'Pos') value: cursor line value: token start)\x0a\x09}",
  920. messageSends: ["getCursor", "getTokenAt:", "at:put:", "state", "value:value:", "getMode", "at:", "basicAt:", "ifTrue:ifFalse:", "variableHintFor:token:", "messageHintFor:token:", "=", "type", "->", "line", "end", "start"],
  921. referencedClasses: ["CodeMirror", "HLCodeWidget"]
  922. }),
  923. smalltalk.HLCodeWidget.klass);
  924. smalltalk.addMethod(
  925. smalltalk.method({
  926. selector: "initialize",
  927. category: 'initialization',
  928. fn: function (){
  929. var self=this;
  930. return smalltalk.withContext(function($ctx1) {
  931. var $1,$2;
  932. smalltalk.HLCodeWidget.klass.superclass.fn.prototype._initialize.apply(_st(self), []);
  933. $1=self;
  934. _st($1)._setupCodeMirror();
  935. _st($1)._setupCommands();
  936. $2=_st($1)._setupKeyMaps();
  937. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLCodeWidget.klass)})},
  938. args: [],
  939. source: "initialize\x0a\x09super initialize.\x0a\x09self \x0a\x09\x09setupCodeMirror;\x0a\x09\x09setupCommands;\x0a\x09\x09setupKeyMaps.",
  940. messageSends: ["initialize", "setupCodeMirror", "setupCommands", "setupKeyMaps"],
  941. referencedClasses: []
  942. }),
  943. smalltalk.HLCodeWidget.klass);
  944. smalltalk.addMethod(
  945. smalltalk.method({
  946. selector: "keyMap",
  947. category: 'accessing',
  948. fn: function (){
  949. var self=this;
  950. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  951. return smalltalk.withContext(function($ctx1) {
  952. var $2,$1;
  953. $2=_st(_st(_st($HLManager())._current())._keyBinder())._systemIsMac();
  954. if(smalltalk.assert($2)){
  955. $1=self._macKeyMap();
  956. } else {
  957. $1=self._pcKeyMap();
  958. };
  959. return $1;
  960. }, function($ctx1) {$ctx1.fill(self,"keyMap",{},smalltalk.HLCodeWidget.klass)})},
  961. args: [],
  962. source: "keyMap\x0a\x09^ HLManager current keyBinder systemIsMac\x0a\x09\x09ifTrue: [ self macKeyMap ]\x0a\x09\x09ifFalse: [ self pcKeyMap ]",
  963. messageSends: ["ifTrue:ifFalse:", "macKeyMap", "pcKeyMap", "systemIsMac", "keyBinder", "current"],
  964. referencedClasses: ["HLManager"]
  965. }),
  966. smalltalk.HLCodeWidget.klass);
  967. smalltalk.addMethod(
  968. smalltalk.method({
  969. selector: "macKeyMap",
  970. category: 'accessing',
  971. fn: function (){
  972. var self=this;
  973. return smalltalk.withContext(function($ctx1) {
  974. var $1;
  975. $1=smalltalk.HashedCollection._from_(["Alt-Backspace".__minus_gt("delWordBefore"),"Alt-Delete".__minus_gt("delWordAfter"),"Alt-Left".__minus_gt("goWordBoundaryLeft"),"Alt-Right".__minus_gt("goWordBoundaryRight"),"Cmd-A".__minus_gt("selectAll"),"Cmd-Alt-F".__minus_gt("replace"),"Cmd-D".__minus_gt("doIt"),"Cmd-Down".__minus_gt("goDocEnd"),"Cmd-End".__minus_gt("goDocEnd"),"Cmd-F".__minus_gt("find"),"Cmd-G".__minus_gt("findNext"),"Cmd-I".__minus_gt("inspectIt"),"Cmd-Left".__minus_gt("goLineStart"),"Cmd-P".__minus_gt("printIt"),"Cmd-Right".__minus_gt("goLineEnd"),"Cmd-S".__minus_gt("saveIt"),"Cmd-Up".__minus_gt("goDocStart"),"Cmd-Y".__minus_gt("redo"),"Cmd-Z".__minus_gt("undo"),"Cmd-[".__minus_gt("indentLess"),"Cmd-]".__minus_gt("indentMore"),"Ctrl-Alt-Backspace".__minus_gt("delWordAfter"),"Shift-Cmd-Alt-F".__minus_gt("replaceAll"),"Shift-Cmd-G".__minus_gt("findPrev"),"Shift-Cmd-Z".__minus_gt("redo"),"fallthrough".__minus_gt(["basic","emacsy"])]);
  976. return $1;
  977. }, function($ctx1) {$ctx1.fill(self,"macKeyMap",{},smalltalk.HLCodeWidget.klass)})},
  978. args: [],
  979. source: "macKeyMap\x0a\x09^ #{\x0a\x09\x09'Alt-Backspace'\x09\x09-> 'delWordBefore'.\x0a\x09\x09'Alt-Delete'\x09\x09-> 'delWordAfter'. \x0a\x09\x09'Alt-Left'\x09\x09-> 'goWordBoundaryLeft'.\x0a\x09\x09'Alt-Right'\x09\x09-> 'goWordBoundaryRight'. \x0a\x09\x09'Cmd-A'\x09\x09\x09-> 'selectAll'. \x0a\x09\x09'Cmd-Alt-F'\x09\x09-> 'replace'. \x0a\x09\x09'Cmd-D'\x09\x09\x09-> 'doIt'. \x0a\x09\x09'Cmd-Down'\x09\x09-> 'goDocEnd'. \x0a\x09\x09'Cmd-End'\x09\x09-> 'goDocEnd'. \x0a\x09\x09'Cmd-F'\x09\x09\x09-> 'find'.\x0a\x09\x09'Cmd-G'\x09\x09\x09-> 'findNext'. \x0a\x09\x09'Cmd-I'\x09\x09\x09-> 'inspectIt'. \x0a\x09\x09'Cmd-Left'\x09\x09-> 'goLineStart'. \x0a\x09\x09'Cmd-P'\x09\x09\x09-> 'printIt'. \x0a\x09\x09'Cmd-Right'\x09\x09-> 'goLineEnd'. \x0a\x09\x09'Cmd-S'\x09\x09\x09-> 'saveIt'. \x0a\x09\x09'Cmd-Up'\x09\x09-> 'goDocStart'. \x0a\x09\x09'Cmd-Y'\x09\x09\x09-> 'redo'.\x0a\x09\x09'Cmd-Z'\x09\x09\x09-> 'undo'. \x0a\x09\x09'Cmd-['\x09\x09\x09-> 'indentLess'. \x0a\x09\x09'Cmd-]'\x09\x09\x09-> 'indentMore'.\x0a\x09\x09'Ctrl-Alt-Backspace'\x09-> 'delWordAfter'. \x0a\x09\x09'Shift-Cmd-Alt-F'\x09-> 'replaceAll'.\x0a\x09\x09'Shift-Cmd-G'\x09\x09-> 'findPrev'. \x0a\x09\x09'Shift-Cmd-Z'\x09\x09-> 'redo'. \x0a \x09'fallthrough' \x09-> { 'basic'. 'emacsy' }\x0a }",
  980. messageSends: ["->"],
  981. referencedClasses: []
  982. }),
  983. smalltalk.HLCodeWidget.klass);
  984. smalltalk.addMethod(
  985. smalltalk.method({
  986. selector: "messageHintFor:token:",
  987. category: 'hints',
  988. fn: function (anEditor,aToken){
  989. var self=this;
  990. return smalltalk.withContext(function($ctx1) {
  991. var $1;
  992. $1=_st(_st(anEditor)._at_("amberCodeWidget"))._messageHintFor_token_(anEditor,aToken);
  993. return $1;
  994. }, function($ctx1) {$ctx1.fill(self,"messageHintFor:token:",{anEditor:anEditor,aToken:aToken},smalltalk.HLCodeWidget.klass)})},
  995. args: ["anEditor", "aToken"],
  996. source: "messageHintFor: anEditor token: aToken\x0a\x09^ (anEditor at: 'amberCodeWidget')\x0a\x09\x09messageHintFor: anEditor token: aToken",
  997. messageSends: ["messageHintFor:token:", "at:"],
  998. referencedClasses: []
  999. }),
  1000. smalltalk.HLCodeWidget.klass);
  1001. smalltalk.addMethod(
  1002. smalltalk.method({
  1003. selector: "pcKeyMap",
  1004. category: 'accessing',
  1005. fn: function (){
  1006. var self=this;
  1007. return smalltalk.withContext(function($ctx1) {
  1008. var $1;
  1009. $1=smalltalk.HashedCollection._from_(["Alt-Left".__minus_gt("goLineStart"),"Alt-Right".__minus_gt("goLineEnd"),"Alt-Up".__minus_gt("goDocStart"),"Ctrl-A".__minus_gt("selectAll"),"Ctrl-Backspace".__minus_gt("delWordBefore"),"Ctrl-D".__minus_gt("doIt"),"Ctrl-Delete".__minus_gt("delWordAfter"),"Ctrl-Down".__minus_gt("goDocEnd"),"Ctrl-End".__minus_gt("goDocEnd"),"Ctrl-F".__minus_gt("find"),"Ctrl-G".__minus_gt("findNext"),"Ctrl-I".__minus_gt("inspectIt"),"Ctrl-Home".__minus_gt("goDocStart"),"Ctrl-Left".__minus_gt("goWordBoundaryLeft"),"Ctrl-P".__minus_gt("printIt"),"Ctrl-Right".__minus_gt("goWordBoundaryRight"),"Ctrl-S".__minus_gt("saveIt"),"Ctrl-Y".__minus_gt("redo"),"Ctrl-Z".__minus_gt("undo"),"Ctrl-[".__minus_gt("indentLess"),"Ctrl-]".__minus_gt("indentMore"),"Shift-Ctrl-F".__minus_gt("replace"),"Shift-Ctrl-G".__minus_gt("findPrev"),"Shift-Ctrl-R".__minus_gt("replaceAll"),"Shift-Ctrl-Z".__minus_gt("redo"),"fallthrough".__minus_gt(["basic"])]);
  1010. return $1;
  1011. }, function($ctx1) {$ctx1.fill(self,"pcKeyMap",{},smalltalk.HLCodeWidget.klass)})},
  1012. args: [],
  1013. source: "pcKeyMap\x0a\x09^ #{\x0a\x09\x09'Alt-Left' -> 'goLineStart'. \x0a\x09\x09'Alt-Right' -> 'goLineEnd'.\x0a\x09\x09'Alt-Up' -> 'goDocStart'. \x0a\x09\x09'Ctrl-A' -> 'selectAll'. \x0a\x09\x09'Ctrl-Backspace' -> 'delWordBefore'. \x0a\x09\x09'Ctrl-D' -> 'doIt'. \x0a\x09\x09'Ctrl-Delete' -> 'delWordAfter'. \x0a\x09\x09'Ctrl-Down' -> 'goDocEnd'.\x0a\x09\x09'Ctrl-End' -> 'goDocEnd'. \x0a\x09\x09'Ctrl-F' -> 'find'.\x0a\x09\x09'Ctrl-G' -> 'findNext'. \x0a\x09\x09'Ctrl-I' -> 'inspectIt'.\x0a\x09\x09'Ctrl-Home' -> 'goDocStart'. \x0a\x09\x09'Ctrl-Left' -> 'goWordBoundaryLeft'. \x0a\x09\x09'Ctrl-P' -> 'printIt'.\x0a\x09\x09'Ctrl-Right' -> 'goWordBoundaryRight'. \x0a\x09\x09'Ctrl-S' -> 'saveIt'. \x0a\x09\x09'Ctrl-Y' -> 'redo'.\x0a\x09\x09'Ctrl-Z' -> 'undo'. \x0a\x09\x09'Ctrl-[' -> 'indentLess'. \x0a\x09\x09'Ctrl-]' -> 'indentMore'.\x0a\x09\x09'Shift-Ctrl-F' -> 'replace'. \x0a\x09\x09'Shift-Ctrl-G' -> 'findPrev'. \x0a\x09\x09'Shift-Ctrl-R' -> 'replaceAll'.\x0a\x09\x09'Shift-Ctrl-Z' -> 'redo'. \x0a\x09\x09'fallthrough' -> #('basic')\x0a}",
  1014. messageSends: ["->"],
  1015. referencedClasses: []
  1016. }),
  1017. smalltalk.HLCodeWidget.klass);
  1018. smalltalk.addMethod(
  1019. smalltalk.method({
  1020. selector: "setupCodeMirror",
  1021. category: 'initialization',
  1022. fn: function (){
  1023. var self=this;
  1024. return smalltalk.withContext(function($ctx1) {
  1025. CodeMirror.keyMap.default.fallthrough = ["basic"];
  1026. CodeMirror.commands.autocomplete = function(cm) {
  1027. CodeMirror.showHint(cm, self._hintFor_options_);
  1028. }
  1029. ;
  1030. return self}, function($ctx1) {$ctx1.fill(self,"setupCodeMirror",{},smalltalk.HLCodeWidget.klass)})},
  1031. args: [],
  1032. source: "setupCodeMirror\x0a\x09< \x0a\x09\x09CodeMirror.keyMap.default.fallthrough = [\x22basic\x22];\x0a\x09\x09CodeMirror.commands.autocomplete = function(cm) {\x0a \x09CodeMirror.showHint(cm, self._hintFor_options_);\x0a \x09}\x0a\x09>",
  1033. messageSends: [],
  1034. referencedClasses: []
  1035. }),
  1036. smalltalk.HLCodeWidget.klass);
  1037. smalltalk.addMethod(
  1038. smalltalk.method({
  1039. selector: "setupCommands",
  1040. category: 'initialization',
  1041. fn: function (){
  1042. var self=this;
  1043. function $CodeMirror(){return smalltalk.CodeMirror||(typeof CodeMirror=="undefined"?nil:CodeMirror)}
  1044. return smalltalk.withContext(function($ctx1) {
  1045. var $1,$2;
  1046. $1=_st($CodeMirror())._basicAt_("commands");
  1047. _st($1)._at_put_("doIt",(function(cm){
  1048. return smalltalk.withContext(function($ctx2) {
  1049. return _st(_st(cm)._amberCodeWidget())._doIt();
  1050. }, function($ctx2) {$ctx2.fillBlock({cm:cm},$ctx1)})}));
  1051. _st($1)._at_put_("inspectIt",(function(cm){
  1052. return smalltalk.withContext(function($ctx2) {
  1053. return _st(_st(cm)._amberCodeWidget())._inspectIt();
  1054. }, function($ctx2) {$ctx2.fillBlock({cm:cm},$ctx1)})}));
  1055. _st($1)._at_put_("printIt",(function(cm){
  1056. return smalltalk.withContext(function($ctx2) {
  1057. return _st(_st(cm)._amberCodeWidget())._printIt();
  1058. }, function($ctx2) {$ctx2.fillBlock({cm:cm},$ctx1)})}));
  1059. $2=_st($1)._at_put_("saveIt",(function(cm){
  1060. return smalltalk.withContext(function($ctx2) {
  1061. return _st(_st(cm)._amberCodeWidget())._saveIt();
  1062. }, function($ctx2) {$ctx2.fillBlock({cm:cm},$ctx1)})}));
  1063. return self}, function($ctx1) {$ctx1.fill(self,"setupCommands",{},smalltalk.HLCodeWidget.klass)})},
  1064. args: [],
  1065. source: "setupCommands\x0a\x09(CodeMirror basicAt: 'commands') \x0a\x09\x09at: 'doIt' put: [ :cm | cm amberCodeWidget doIt ];\x0a\x09\x09at: 'inspectIt' put: [ :cm | cm amberCodeWidget inspectIt ];\x0a\x09\x09at: 'printIt' put: [ :cm | cm amberCodeWidget printIt ];\x0a\x09\x09at: 'saveIt' put: [ :cm | cm amberCodeWidget saveIt ]",
  1066. messageSends: ["at:put:", "doIt", "amberCodeWidget", "basicAt:", "inspectIt", "printIt", "saveIt"],
  1067. referencedClasses: ["CodeMirror"]
  1068. }),
  1069. smalltalk.HLCodeWidget.klass);
  1070. smalltalk.addMethod(
  1071. smalltalk.method({
  1072. selector: "setupKeyMaps",
  1073. category: 'initialization',
  1074. fn: function (){
  1075. var self=this;
  1076. return smalltalk.withContext(function($ctx1) {
  1077. CodeMirror.keyMap['Amber'] = self._keyMap();
  1078. return self}, function($ctx1) {$ctx1.fill(self,"setupKeyMaps",{},smalltalk.HLCodeWidget.klass)})},
  1079. args: [],
  1080. source: "setupKeyMaps\x0a\x09<CodeMirror.keyMap['Amber'] = self._keyMap()>",
  1081. messageSends: [],
  1082. referencedClasses: []
  1083. }),
  1084. smalltalk.HLCodeWidget.klass);
  1085. smalltalk.addMethod(
  1086. smalltalk.method({
  1087. selector: "variableHintFor:token:",
  1088. category: 'hints',
  1089. fn: function (anEditor,aToken){
  1090. var self=this;
  1091. return smalltalk.withContext(function($ctx1) {
  1092. var $1;
  1093. $1=_st(_st(anEditor)._at_("amberCodeWidget"))._variableHintFor_token_(anEditor,aToken);
  1094. return $1;
  1095. }, function($ctx1) {$ctx1.fill(self,"variableHintFor:token:",{anEditor:anEditor,aToken:aToken},smalltalk.HLCodeWidget.klass)})},
  1096. args: ["anEditor", "aToken"],
  1097. source: "variableHintFor: anEditor token: aToken\x0a\x09^ (anEditor at: 'amberCodeWidget')\x0a\x09\x09variableHintFor: anEditor token: aToken",
  1098. messageSends: ["variableHintFor:token:", "at:"],
  1099. referencedClasses: []
  1100. }),
  1101. smalltalk.HLCodeWidget.klass);
  1102. smalltalk.addClass('HLNavigationCodeWidget', smalltalk.HLCodeWidget, ['methodContents'], 'Helios-Workspace');
  1103. smalltalk.addMethod(
  1104. smalltalk.method({
  1105. selector: "configureEditor",
  1106. category: 'accessing',
  1107. fn: function (){
  1108. var self=this;
  1109. return smalltalk.withContext(function($ctx1) {
  1110. smalltalk.HLNavigationCodeWidget.superclass.fn.prototype._configureEditor.apply(_st(self), []);
  1111. self._contents_(self._methodContents());
  1112. return self}, function($ctx1) {$ctx1.fill(self,"configureEditor",{},smalltalk.HLNavigationCodeWidget)})},
  1113. args: [],
  1114. source: "configureEditor\x0a\x09super configureEditor.\x0a\x09self contents: self methodContents",
  1115. messageSends: ["configureEditor", "contents:", "methodContents"],
  1116. referencedClasses: []
  1117. }),
  1118. smalltalk.HLNavigationCodeWidget);
  1119. smalltalk.addMethod(
  1120. smalltalk.method({
  1121. selector: "contents:",
  1122. category: 'accessing',
  1123. fn: function (aString){
  1124. var self=this;
  1125. return smalltalk.withContext(function($ctx1) {
  1126. self._methodContents_(aString);
  1127. smalltalk.HLNavigationCodeWidget.superclass.fn.prototype._contents_.apply(_st(self), [aString]);
  1128. return self}, function($ctx1) {$ctx1.fill(self,"contents:",{aString:aString},smalltalk.HLNavigationCodeWidget)})},
  1129. args: ["aString"],
  1130. source: "contents: aString\x0a\x09self methodContents: aString.\x0a\x09super contents: aString",
  1131. messageSends: ["methodContents:", "contents:"],
  1132. referencedClasses: []
  1133. }),
  1134. smalltalk.HLNavigationCodeWidget);
  1135. smalltalk.addMethod(
  1136. smalltalk.method({
  1137. selector: "hasModification",
  1138. category: 'testing',
  1139. fn: function (){
  1140. var self=this;
  1141. return smalltalk.withContext(function($ctx1) {
  1142. var $1;
  1143. $1=_st(_st(self._methodContents()).__eq(self._contents()))._not();
  1144. return $1;
  1145. }, function($ctx1) {$ctx1.fill(self,"hasModification",{},smalltalk.HLNavigationCodeWidget)})},
  1146. args: [],
  1147. source: "hasModification\x0a\x09^ (self methodContents = self contents) not",
  1148. messageSends: ["not", "=", "contents", "methodContents"],
  1149. referencedClasses: []
  1150. }),
  1151. smalltalk.HLNavigationCodeWidget);
  1152. smalltalk.addMethod(
  1153. smalltalk.method({
  1154. selector: "methodContents",
  1155. category: 'accessing',
  1156. fn: function (){
  1157. var self=this;
  1158. return smalltalk.withContext(function($ctx1) {
  1159. var $2,$1;
  1160. $2=self["@methodContents"];
  1161. if(($receiver = $2) == nil || $receiver == undefined){
  1162. $1="";
  1163. } else {
  1164. $1=$2;
  1165. };
  1166. return $1;
  1167. }, function($ctx1) {$ctx1.fill(self,"methodContents",{},smalltalk.HLNavigationCodeWidget)})},
  1168. args: [],
  1169. source: "methodContents\x0a\x09^ methodContents ifNil: [ '' ]",
  1170. messageSends: ["ifNil:"],
  1171. referencedClasses: []
  1172. }),
  1173. smalltalk.HLNavigationCodeWidget);
  1174. smalltalk.addMethod(
  1175. smalltalk.method({
  1176. selector: "methodContents:",
  1177. category: 'accessing',
  1178. fn: function (aString){
  1179. var self=this;
  1180. return smalltalk.withContext(function($ctx1) {
  1181. var $1;
  1182. self["@methodContents"]=aString;
  1183. $1=self["@methodContents"];
  1184. return $1;
  1185. }, function($ctx1) {$ctx1.fill(self,"methodContents:",{aString:aString},smalltalk.HLNavigationCodeWidget)})},
  1186. args: ["aString"],
  1187. source: "methodContents: aString\x0a\x09^ methodContents := aString",
  1188. messageSends: [],
  1189. referencedClasses: []
  1190. }),
  1191. smalltalk.HLNavigationCodeWidget);
  1192. smalltalk.addMethod(
  1193. smalltalk.method({
  1194. selector: "previous",
  1195. category: 'accessing',
  1196. fn: function (){
  1197. var self=this;
  1198. return smalltalk.withContext(function($ctx1) {
  1199. return self}, function($ctx1) {$ctx1.fill(self,"previous",{},smalltalk.HLNavigationCodeWidget)})},
  1200. args: [],
  1201. source: "previous\x0a\x09\x22for browser lists widget\x22",
  1202. messageSends: [],
  1203. referencedClasses: []
  1204. }),
  1205. smalltalk.HLNavigationCodeWidget);
  1206. smalltalk.addMethod(
  1207. smalltalk.method({
  1208. selector: "previous:",
  1209. category: 'accessing',
  1210. fn: function (aWidget){
  1211. var self=this;
  1212. return smalltalk.withContext(function($ctx1) {
  1213. return self}, function($ctx1) {$ctx1.fill(self,"previous:",{aWidget:aWidget},smalltalk.HLNavigationCodeWidget)})},
  1214. args: ["aWidget"],
  1215. source: "previous: aWidget\x0a\x09\x22for browser lists widget\x22",
  1216. messageSends: [],
  1217. referencedClasses: []
  1218. }),
  1219. smalltalk.HLNavigationCodeWidget);
  1220. smalltalk.addMethod(
  1221. smalltalk.method({
  1222. selector: "canBeOpenAsTab",
  1223. category: 'testing',
  1224. fn: function (){
  1225. var self=this;
  1226. return smalltalk.withContext(function($ctx1) {
  1227. return false;
  1228. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLNavigationCodeWidget.klass)})},
  1229. args: [],
  1230. source: "canBeOpenAsTab\x0a\x09^ false",
  1231. messageSends: [],
  1232. referencedClasses: []
  1233. }),
  1234. smalltalk.HLNavigationCodeWidget.klass);
  1235. smalltalk.addMethod(
  1236. smalltalk.method({
  1237. selector: "on:",
  1238. category: 'instance creation',
  1239. fn: function (aBrowserModel){
  1240. var self=this;
  1241. return smalltalk.withContext(function($ctx1) {
  1242. var $2,$3,$1;
  1243. $2=self._new();
  1244. _st($2)._browserModel_(aBrowserModel);
  1245. $3=_st($2)._yourself();
  1246. $1=$3;
  1247. return $1;
  1248. }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowserModel:aBrowserModel},smalltalk.HLNavigationCodeWidget.klass)})},
  1249. args: ["aBrowserModel"],
  1250. source: "on: aBrowserModel\x0a\x09^ self new\x0a\x09\x09browserModel: aBrowserModel;\x0a\x09\x09yourself",
  1251. messageSends: ["browserModel:", "new", "yourself"],
  1252. referencedClasses: []
  1253. }),
  1254. smalltalk.HLNavigationCodeWidget.klass);
  1255. smalltalk.addClass('HLBrowserCodeWidget', smalltalk.HLNavigationCodeWidget, ['browserModel'], 'Helios-Workspace');
  1256. smalltalk.addMethod(
  1257. smalltalk.method({
  1258. selector: "browserModel",
  1259. category: 'accessing',
  1260. fn: function (){
  1261. var self=this;
  1262. return smalltalk.withContext(function($ctx1) {
  1263. var $1;
  1264. $1=self["@browserModel"];
  1265. return $1;
  1266. }, function($ctx1) {$ctx1.fill(self,"browserModel",{},smalltalk.HLBrowserCodeWidget)})},
  1267. args: [],
  1268. source: "browserModel\x0a\x09^ browserModel",
  1269. messageSends: [],
  1270. referencedClasses: []
  1271. }),
  1272. smalltalk.HLBrowserCodeWidget);
  1273. smalltalk.addMethod(
  1274. smalltalk.method({
  1275. selector: "browserModel:",
  1276. category: 'accessing',
  1277. fn: function (aBrowserModel){
  1278. var self=this;
  1279. return smalltalk.withContext(function($ctx1) {
  1280. var $1,$2;
  1281. self["@browserModel"]=aBrowserModel;
  1282. $1=self;
  1283. _st($1)._observeSystem();
  1284. $2=_st($1)._observeBrowserModel();
  1285. return self}, function($ctx1) {$ctx1.fill(self,"browserModel:",{aBrowserModel:aBrowserModel},smalltalk.HLBrowserCodeWidget)})},
  1286. args: ["aBrowserModel"],
  1287. source: "browserModel: aBrowserModel\x0a\x09browserModel := aBrowserModel.\x0a\x09self \x0a\x09\x09observeSystem;\x0a\x09\x09observeBrowserModel",
  1288. messageSends: ["observeSystem", "observeBrowserModel"],
  1289. referencedClasses: []
  1290. }),
  1291. smalltalk.HLBrowserCodeWidget);
  1292. smalltalk.addMethod(
  1293. smalltalk.method({
  1294. selector: "observeBrowserModel",
  1295. category: 'actions',
  1296. fn: function (){
  1297. var self=this;
  1298. function $HLSaveSourceCode(){return smalltalk.HLSaveSourceCode||(typeof HLSaveSourceCode=="undefined"?nil:HLSaveSourceCode)}
  1299. function $HLShowInstanceToggled(){return smalltalk.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
  1300. function $HLSourceCodeSaved(){return smalltalk.HLSourceCodeSaved||(typeof HLSourceCodeSaved=="undefined"?nil:HLSourceCodeSaved)}
  1301. function $HLAboutToChange(){return smalltalk.HLAboutToChange||(typeof HLAboutToChange=="undefined"?nil:HLAboutToChange)}
  1302. function $HLParseErrorRaised(){return smalltalk.HLParseErrorRaised||(typeof HLParseErrorRaised=="undefined"?nil:HLParseErrorRaised)}
  1303. function $HLCompileErrorRaised(){return smalltalk.HLCompileErrorRaised||(typeof HLCompileErrorRaised=="undefined"?nil:HLCompileErrorRaised)}
  1304. function $HLUnknownVariableErrorRaised(){return smalltalk.HLUnknownVariableErrorRaised||(typeof HLUnknownVariableErrorRaised=="undefined"?nil:HLUnknownVariableErrorRaised)}
  1305. function $HLInstVarAdded(){return smalltalk.HLInstVarAdded||(typeof HLInstVarAdded=="undefined"?nil:HLInstVarAdded)}
  1306. function $HLMethodSelected(){return smalltalk.HLMethodSelected||(typeof HLMethodSelected=="undefined"?nil:HLMethodSelected)}
  1307. function $HLClassSelected(){return smalltalk.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
  1308. function $HLProtocolSelected(){return smalltalk.HLProtocolSelected||(typeof HLProtocolSelected=="undefined"?nil:HLProtocolSelected)}
  1309. function $HLSourceCodeFocusRequested(){return smalltalk.HLSourceCodeFocusRequested||(typeof HLSourceCodeFocusRequested=="undefined"?nil:HLSourceCodeFocusRequested)}
  1310. return smalltalk.withContext(function($ctx1) {
  1311. var $1,$2;
  1312. $1=_st(self._browserModel())._announcer();
  1313. _st($1)._on_send_to_($HLSaveSourceCode(),"onSaveIt",self);
  1314. _st($1)._on_send_to_($HLShowInstanceToggled(),"onShowInstanceToggled",self);
  1315. _st($1)._on_send_to_($HLSourceCodeSaved(),"onSourceCodeSaved",self);
  1316. _st($1)._on_send_to_($HLAboutToChange(),"onBrowserAboutToChange:",self);
  1317. _st($1)._on_send_to_($HLParseErrorRaised(),"onParseError:",self);
  1318. _st($1)._on_send_to_($HLCompileErrorRaised(),"onCompileError:",self);
  1319. _st($1)._on_send_to_($HLUnknownVariableErrorRaised(),"onUnknownVariableError:",self);
  1320. _st($1)._on_send_to_($HLInstVarAdded(),"onInstVarAdded",self);
  1321. _st($1)._on_send_to_($HLMethodSelected(),"onMethodSelected:",self);
  1322. _st($1)._on_send_to_($HLClassSelected(),"onClassSelected:",self);
  1323. _st($1)._on_send_to_($HLProtocolSelected(),"onProtocolSelected:",self);
  1324. $2=_st($1)._on_send_to_($HLSourceCodeFocusRequested(),"onSourceCodeFocusRequested",self);
  1325. return self}, function($ctx1) {$ctx1.fill(self,"observeBrowserModel",{},smalltalk.HLBrowserCodeWidget)})},
  1326. args: [],
  1327. source: "observeBrowserModel\x0a\x09self browserModel announcer\x0a\x09\x09on: HLSaveSourceCode\x0a\x09\x09send: #onSaveIt\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLShowInstanceToggled\x0a\x09\x09send: #onShowInstanceToggled\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLSourceCodeSaved\x0a\x09\x09send: #onSourceCodeSaved\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLAboutToChange\x0a\x09\x09send: #onBrowserAboutToChange:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLParseErrorRaised\x0a\x09\x09send: #onParseError:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLCompileErrorRaised\x0a\x09\x09send: #onCompileError:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLUnknownVariableErrorRaised\x0a\x09\x09send: #onUnknownVariableError:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLInstVarAdded \x0a\x09\x09send: #onInstVarAdded\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLMethodSelected \x0a\x09\x09send: #onMethodSelected:\x0a\x09\x09to: self;\x0a\x09\x09\x0a \x09on: HLClassSelected \x0a\x09\x09send: #onClassSelected:\x0a\x09\x09to: self;\x0a\x09\x09\x0a \x09on: HLProtocolSelected \x0a\x09\x09send: #onProtocolSelected: \x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLSourceCodeFocusRequested \x0a\x09\x09send: #onSourceCodeFocusRequested\x0a\x09\x09to: self",
  1328. messageSends: ["on:send:to:", "announcer", "browserModel"],
  1329. referencedClasses: ["HLSaveSourceCode", "HLShowInstanceToggled", "HLSourceCodeSaved", "HLAboutToChange", "HLParseErrorRaised", "HLCompileErrorRaised", "HLUnknownVariableErrorRaised", "HLInstVarAdded", "HLMethodSelected", "HLClassSelected", "HLProtocolSelected", "HLSourceCodeFocusRequested"]
  1330. }),
  1331. smalltalk.HLBrowserCodeWidget);
  1332. smalltalk.addMethod(
  1333. smalltalk.method({
  1334. selector: "observeSystem",
  1335. category: 'actions',
  1336. fn: function (){
  1337. var self=this;
  1338. function $MethodModified(){return smalltalk.MethodModified||(typeof MethodModified=="undefined"?nil:MethodModified)}
  1339. return smalltalk.withContext(function($ctx1) {
  1340. _st(_st(self._browserModel())._systemAnnouncer())._on_send_to_($MethodModified(),"onMethodModified:",self);
  1341. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLBrowserCodeWidget)})},
  1342. args: [],
  1343. source: "observeSystem\x0a\x09self browserModel systemAnnouncer\x0a \x09on: MethodModified\x0a send: #onMethodModified:\x0a\x09\x09to: self",
  1344. messageSends: ["on:send:to:", "systemAnnouncer", "browserModel"],
  1345. referencedClasses: ["MethodModified"]
  1346. }),
  1347. smalltalk.HLBrowserCodeWidget);
  1348. smalltalk.addMethod(
  1349. smalltalk.method({
  1350. selector: "onBrowserAboutToChange:",
  1351. category: 'reactions',
  1352. fn: function (anAnnouncement){
  1353. var self=this;
  1354. var block;
  1355. function $HLChangeForbidden(){return smalltalk.HLChangeForbidden||(typeof HLChangeForbidden=="undefined"?nil:HLChangeForbidden)}
  1356. return smalltalk.withContext(function($ctx1) {
  1357. var $1;
  1358. block=_st(anAnnouncement)._actionBlock();
  1359. $1=self._hasModification();
  1360. if(smalltalk.assert($1)){
  1361. self._confirm_ifTrue_("Changes have not been saved. Do you want to discard these changes?",(function(){
  1362. return smalltalk.withContext(function($ctx2) {
  1363. self._methodContents_(self._contents());
  1364. return _st(block)._value();
  1365. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1366. _st($HLChangeForbidden())._signal();
  1367. };
  1368. return self}, function($ctx1) {$ctx1.fill(self,"onBrowserAboutToChange:",{anAnnouncement:anAnnouncement,block:block},smalltalk.HLBrowserCodeWidget)})},
  1369. args: ["anAnnouncement"],
  1370. source: "onBrowserAboutToChange: anAnnouncement\x0a\x09| block |\x0a\x09\x0a\x09block := anAnnouncement actionBlock.\x0a\x09\x0a\x09self hasModification\x0a\x09\x09ifTrue: [\x0a\x09\x09\x09self \x0a\x09\x09\x09\x09confirm: 'Changes have not been saved. Do you want to discard these changes?' \x0a\x09\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09\x09\x22Don't ask twice\x22\x0a\x09\x09\x09\x09\x09self methodContents: self contents.\x0a\x09\x09\x09\x09\x09block value ].\x0a\x09\x09\x09\x0a\x09\x09\x09\x0a\x09\x09\x09HLChangeForbidden signal ]",
  1371. messageSends: ["actionBlock", "ifTrue:", "confirm:ifTrue:", "methodContents:", "contents", "value", "signal", "hasModification"],
  1372. referencedClasses: ["HLChangeForbidden"]
  1373. }),
  1374. smalltalk.HLBrowserCodeWidget);
  1375. smalltalk.addMethod(
  1376. smalltalk.method({
  1377. selector: "onClassSelected:",
  1378. category: 'reactions',
  1379. fn: function (anAnnouncement){
  1380. var self=this;
  1381. var class_;
  1382. return smalltalk.withContext(function($ctx1) {
  1383. var $1,$2;
  1384. class_=_st(anAnnouncement)._item();
  1385. $1=class_;
  1386. if(($receiver = $1) == nil || $receiver == undefined){
  1387. $2=self._contents_("");
  1388. return $2;
  1389. } else {
  1390. $1;
  1391. };
  1392. self._contents_(_st(class_)._definition());
  1393. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{anAnnouncement:anAnnouncement,class_:class_},smalltalk.HLBrowserCodeWidget)})},
  1394. args: ["anAnnouncement"],
  1395. source: "onClassSelected: anAnnouncement\x0a\x09| class |\x0a\x09\x0a\x09class:= anAnnouncement item.\x0a\x09\x0a\x09class ifNil: [ ^ self contents: '' ].\x0a self contents: class definition",
  1396. messageSends: ["item", "ifNil:", "contents:", "definition"],
  1397. referencedClasses: []
  1398. }),
  1399. smalltalk.HLBrowserCodeWidget);
  1400. smalltalk.addMethod(
  1401. smalltalk.method({
  1402. selector: "onCompileError:",
  1403. category: 'reactions',
  1404. fn: function (anAnnouncement){
  1405. var self=this;
  1406. return smalltalk.withContext(function($ctx1) {
  1407. self._alert_(_st(_st(anAnnouncement)._error())._messageText());
  1408. return self}, function($ctx1) {$ctx1.fill(self,"onCompileError:",{anAnnouncement:anAnnouncement},smalltalk.HLBrowserCodeWidget)})},
  1409. args: ["anAnnouncement"],
  1410. source: "onCompileError: anAnnouncement\x0a\x09self alert: anAnnouncement error messageText",
  1411. messageSends: ["alert:", "messageText", "error"],
  1412. referencedClasses: []
  1413. }),
  1414. smalltalk.HLBrowserCodeWidget);
  1415. smalltalk.addMethod(
  1416. smalltalk.method({
  1417. selector: "onInstVarAdded",
  1418. category: 'reactions',
  1419. fn: function (){
  1420. var self=this;
  1421. return smalltalk.withContext(function($ctx1) {
  1422. _st(self._browserModel())._save_(self._contents());
  1423. return self}, function($ctx1) {$ctx1.fill(self,"onInstVarAdded",{},smalltalk.HLBrowserCodeWidget)})},
  1424. args: [],
  1425. source: "onInstVarAdded\x0a\x09self browserModel save: self contents",
  1426. messageSends: ["save:", "contents", "browserModel"],
  1427. referencedClasses: []
  1428. }),
  1429. smalltalk.HLBrowserCodeWidget);
  1430. smalltalk.addMethod(
  1431. smalltalk.method({
  1432. selector: "onMethodModified:",
  1433. category: 'reactions',
  1434. fn: function (anAnnouncement){
  1435. var self=this;
  1436. var method;
  1437. return smalltalk.withContext(function($ctx1) {
  1438. var $1,$2,$3,$4,$5,$6;
  1439. method=_st(anAnnouncement)._method();
  1440. $1=_st(_st(self._browserModel())._selectedClass()).__eq(_st(method)._methodClass());
  1441. if(! smalltalk.assert($1)){
  1442. $2=self;
  1443. return $2;
  1444. };
  1445. $3=_st(self._browserModel())._selectedMethod();
  1446. if(($receiver = $3) == nil || $receiver == undefined){
  1447. $4=self;
  1448. return $4;
  1449. } else {
  1450. $3;
  1451. };
  1452. $5=_st(_st(_st(self._browserModel())._selectedMethod())._selector()).__eq(_st(method)._selector());
  1453. if(! smalltalk.assert($5)){
  1454. $6=self;
  1455. return $6;
  1456. };
  1457. self._refresh();
  1458. return self}, function($ctx1) {$ctx1.fill(self,"onMethodModified:",{anAnnouncement:anAnnouncement,method:method},smalltalk.HLBrowserCodeWidget)})},
  1459. args: ["anAnnouncement"],
  1460. source: "onMethodModified: anAnnouncement\x0a\x09| method |\x0a\x09\x0a\x09method := anAnnouncement method.\x0a\x09\x0a\x09self browserModel selectedClass = method methodClass ifFalse: [ ^ self ].\x0a\x09self browserModel selectedMethod ifNil: [ ^ self ].\x0a self browserModel selectedMethod selector = method selector ifFalse: [ ^ self ].\x0a\x0a\x09self refresh",
  1461. messageSends: ["method", "ifFalse:", "=", "methodClass", "selectedClass", "browserModel", "ifNil:", "selectedMethod", "selector", "refresh"],
  1462. referencedClasses: []
  1463. }),
  1464. smalltalk.HLBrowserCodeWidget);
  1465. smalltalk.addMethod(
  1466. smalltalk.method({
  1467. selector: "onMethodSelected:",
  1468. category: 'reactions',
  1469. fn: function (anAnnouncement){
  1470. var self=this;
  1471. var method;
  1472. return smalltalk.withContext(function($ctx1) {
  1473. var $1,$2;
  1474. method=_st(anAnnouncement)._item();
  1475. $1=method;
  1476. if(($receiver = $1) == nil || $receiver == undefined){
  1477. $2=self._contents_("");
  1478. return $2;
  1479. } else {
  1480. $1;
  1481. };
  1482. self._contents_(_st(method)._source());
  1483. return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{anAnnouncement:anAnnouncement,method:method},smalltalk.HLBrowserCodeWidget)})},
  1484. args: ["anAnnouncement"],
  1485. source: "onMethodSelected: anAnnouncement\x0a\x09| method |\x0a\x09\x0a\x09method := anAnnouncement item.\x0a\x09\x0a\x09method ifNil: [ ^ self contents: '' ].\x0a self contents: method source",
  1486. messageSends: ["item", "ifNil:", "contents:", "source"],
  1487. referencedClasses: []
  1488. }),
  1489. smalltalk.HLBrowserCodeWidget);
  1490. smalltalk.addMethod(
  1491. smalltalk.method({
  1492. selector: "onParseError:",
  1493. category: 'reactions',
  1494. fn: function (anAnnouncement){
  1495. var self=this;
  1496. var lineIndex,newContents;
  1497. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  1498. return smalltalk.withContext(function($ctx1) {
  1499. var $1,$2,$3;
  1500. lineIndex=(1);
  1501. self._contents_(_st($String())._streamContents_((function(stream){
  1502. return smalltalk.withContext(function($ctx2) {
  1503. return _st(self._contents())._linesDo_((function(each){
  1504. return smalltalk.withContext(function($ctx3) {
  1505. $1=_st(lineIndex).__eq(_st(anAnnouncement)._line());
  1506. if(smalltalk.assert($1)){
  1507. $2=stream;
  1508. _st($2)._nextPutAll_(_st(each)._copyFrom_to_((1),_st(anAnnouncement)._column()));
  1509. _st($2)._nextPutAll_("<- ");
  1510. _st($2)._nextPutAll_(_st(anAnnouncement)._message());
  1511. _st($2)._nextPutAll_(" ");
  1512. $3=_st($2)._nextPutAll_(_st(each)._copyFrom_to_(_st(_st(anAnnouncement)._column()).__plus((1)),_st(each)._size()));
  1513. $3;
  1514. } else {
  1515. _st(stream)._nextPutAll_(each);
  1516. };
  1517. _st(stream)._nextPutAll_(_st($String())._cr());
  1518. lineIndex=_st(lineIndex).__plus((1));
  1519. return lineIndex;
  1520. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2)})}));
  1521. }, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1)})})));
  1522. return self}, function($ctx1) {$ctx1.fill(self,"onParseError:",{anAnnouncement:anAnnouncement,lineIndex:lineIndex,newContents:newContents},smalltalk.HLBrowserCodeWidget)})},
  1523. args: ["anAnnouncement"],
  1524. source: "onParseError: anAnnouncement\x0a\x09| lineIndex newContents |\x0a\x09\x0a\x09lineIndex := 1.\x0a\x09\x0a\x09self contents: (String streamContents: [ :stream |\x0a\x09\x09self contents linesDo: [ :each |\x0a\x09\x09\x09lineIndex = anAnnouncement line \x0a\x09\x09\x09\x09ifTrue: [ \x0a\x09\x09\x09\x09\x09stream \x0a\x09\x09\x09\x09\x09\x09nextPutAll: (each copyFrom: 1 to: anAnnouncement column);\x0a\x09\x09\x09\x09\x09\x09nextPutAll: '<- ';\x0a\x09\x09\x09\x09\x09\x09nextPutAll: anAnnouncement message;\x0a\x09\x09\x09\x09\x09\x09nextPutAll: ' ';\x0a\x09\x09\x09\x09\x09\x09nextPutAll: (each copyFrom: anAnnouncement column + 1 to: each size) ]\x0a\x09\x09\x09\x09ifFalse: [ stream nextPutAll: each ].\x0a\x09\x09\x09stream nextPutAll: String cr.\x0a\x09\x09\x09lineIndex := lineIndex + 1 ] ])",
  1525. messageSends: ["contents:", "streamContents:", "linesDo:", "ifTrue:ifFalse:", "nextPutAll:", "copyFrom:to:", "column", "message", "+", "size", "=", "line", "cr", "contents"],
  1526. referencedClasses: ["String"]
  1527. }),
  1528. smalltalk.HLBrowserCodeWidget);
  1529. smalltalk.addMethod(
  1530. smalltalk.method({
  1531. selector: "onProtocolSelected:",
  1532. category: 'reactions',
  1533. fn: function (anAnnouncement){
  1534. var self=this;
  1535. return smalltalk.withContext(function($ctx1) {
  1536. var $1,$2;
  1537. $1=_st(self._browserModel())._selectedClass();
  1538. if(($receiver = $1) == nil || $receiver == undefined){
  1539. $2=self._contents_("");
  1540. return $2;
  1541. } else {
  1542. $1;
  1543. };
  1544. self._contents_(_st(_st(self._browserModel())._selectedClass())._definition());
  1545. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{anAnnouncement:anAnnouncement},smalltalk.HLBrowserCodeWidget)})},
  1546. args: ["anAnnouncement"],
  1547. source: "onProtocolSelected: anAnnouncement\x0a\x09self browserModel selectedClass ifNil: [ ^ self contents: '' ].\x0a self contents: self browserModel selectedClass definition",
  1548. messageSends: ["ifNil:", "contents:", "selectedClass", "browserModel", "definition"],
  1549. referencedClasses: []
  1550. }),
  1551. smalltalk.HLBrowserCodeWidget);
  1552. smalltalk.addMethod(
  1553. smalltalk.method({
  1554. selector: "onSaveIt",
  1555. category: 'reactions',
  1556. fn: function (){
  1557. var self=this;
  1558. return smalltalk.withContext(function($ctx1) {
  1559. _st(self._browserModel())._save_(self._contents());
  1560. return self}, function($ctx1) {$ctx1.fill(self,"onSaveIt",{},smalltalk.HLBrowserCodeWidget)})},
  1561. args: [],
  1562. source: "onSaveIt\x0a\x09self browserModel save: self contents",
  1563. messageSends: ["save:", "contents", "browserModel"],
  1564. referencedClasses: []
  1565. }),
  1566. smalltalk.HLBrowserCodeWidget);
  1567. smalltalk.addMethod(
  1568. smalltalk.method({
  1569. selector: "onShowInstanceToggled",
  1570. category: 'reactions',
  1571. fn: function (){
  1572. var self=this;
  1573. return smalltalk.withContext(function($ctx1) {
  1574. var $1,$2;
  1575. $1=_st(self._browserModel())._selectedClass();
  1576. if(($receiver = $1) == nil || $receiver == undefined){
  1577. $2=self._contents_("");
  1578. return $2;
  1579. } else {
  1580. $1;
  1581. };
  1582. self._contents_(_st(_st(self._browserModel())._selectedClass())._definition());
  1583. return self}, function($ctx1) {$ctx1.fill(self,"onShowInstanceToggled",{},smalltalk.HLBrowserCodeWidget)})},
  1584. args: [],
  1585. source: "onShowInstanceToggled\x0a\x09self browserModel selectedClass ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: self browserModel selectedClass definition",
  1586. messageSends: ["ifNil:", "contents:", "selectedClass", "browserModel", "definition"],
  1587. referencedClasses: []
  1588. }),
  1589. smalltalk.HLBrowserCodeWidget);
  1590. smalltalk.addMethod(
  1591. smalltalk.method({
  1592. selector: "onSourceCodeFocusRequested",
  1593. category: 'reactions',
  1594. fn: function (){
  1595. var self=this;
  1596. return smalltalk.withContext(function($ctx1) {
  1597. self._focus();
  1598. return self}, function($ctx1) {$ctx1.fill(self,"onSourceCodeFocusRequested",{},smalltalk.HLBrowserCodeWidget)})},
  1599. args: [],
  1600. source: "onSourceCodeFocusRequested\x0a\x09self focus",
  1601. messageSends: ["focus"],
  1602. referencedClasses: []
  1603. }),
  1604. smalltalk.HLBrowserCodeWidget);
  1605. smalltalk.addMethod(
  1606. smalltalk.method({
  1607. selector: "onSourceCodeSaved",
  1608. category: 'reactions',
  1609. fn: function (){
  1610. var self=this;
  1611. return smalltalk.withContext(function($ctx1) {
  1612. self._methodContents_(self._contents());
  1613. self._updateState();
  1614. return self}, function($ctx1) {$ctx1.fill(self,"onSourceCodeSaved",{},smalltalk.HLBrowserCodeWidget)})},
  1615. args: [],
  1616. source: "onSourceCodeSaved\x0a\x09self methodContents: self contents.\x0a\x09self updateState",
  1617. messageSends: ["methodContents:", "contents", "updateState"],
  1618. referencedClasses: []
  1619. }),
  1620. smalltalk.HLBrowserCodeWidget);
  1621. smalltalk.addMethod(
  1622. smalltalk.method({
  1623. selector: "onUnknownVariableError:",
  1624. category: 'reactions',
  1625. fn: function (anAnnouncement){
  1626. var self=this;
  1627. var error;
  1628. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  1629. return smalltalk.withContext(function($ctx1) {
  1630. var $1,$2;
  1631. error=_st(anAnnouncement)._error();
  1632. self._confirm_ifTrue_(_st($String())._streamContents_((function(stream){
  1633. return smalltalk.withContext(function($ctx2) {
  1634. $1=stream;
  1635. _st($1)._nextPutAll_(_st(error)._messageText());
  1636. _st($1)._nextPutAll_(_st($String())._cr());
  1637. $2=_st($1)._nextPutAll_("Would you like to define an instance variable?");
  1638. return $2;
  1639. }, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1)})})),(function(){
  1640. return smalltalk.withContext(function($ctx2) {
  1641. return _st(self._browserModel())._addInstVarNamed_(_st(error)._variableName());
  1642. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1643. return self}, function($ctx1) {$ctx1.fill(self,"onUnknownVariableError:",{anAnnouncement:anAnnouncement,error:error},smalltalk.HLBrowserCodeWidget)})},
  1644. args: ["anAnnouncement"],
  1645. source: "onUnknownVariableError: anAnnouncement\x0a\x09| error |\x0a\x09\x0a\x09error := anAnnouncement error.\x0a\x09\x0a\x09self \x0a\x09\x09confirm: (String streamContents: [ :stream |\x0a\x09\x09\x09stream \x0a\x09\x09\x09\x09nextPutAll: error messageText;\x0a\x09\x09\x09\x09nextPutAll: String cr;\x0a\x09\x09\x09\x09nextPutAll: 'Would you like to define an instance variable?' ])\x0a\x09\x09ifTrue: [\x0a\x09\x09\x09self browserModel addInstVarNamed: error variableName ]",
  1646. messageSends: ["error", "confirm:ifTrue:", "streamContents:", "nextPutAll:", "messageText", "cr", "addInstVarNamed:", "variableName", "browserModel"],
  1647. referencedClasses: ["String"]
  1648. }),
  1649. smalltalk.HLBrowserCodeWidget);
  1650. smalltalk.addMethod(
  1651. smalltalk.method({
  1652. selector: "refresh",
  1653. category: 'actions',
  1654. fn: function (){
  1655. var self=this;
  1656. return smalltalk.withContext(function($ctx1) {
  1657. var $1,$2,$3,$4;
  1658. $1=self._hasModification();
  1659. if(smalltalk.assert($1)){
  1660. $2=self;
  1661. return $2;
  1662. };
  1663. $3=self._hasFocus();
  1664. if(smalltalk.assert($3)){
  1665. $4=self;
  1666. return $4;
  1667. };
  1668. self._contents_(_st(_st(self._browserModel())._selectedMethod())._source());
  1669. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLBrowserCodeWidget)})},
  1670. args: [],
  1671. source: "refresh\x0a\x09self hasModification ifTrue: [ ^ self ].\x0a self hasFocus ifTrue: [ ^ self ].\x0a\x0a\x09self contents: self browserModel selectedMethod source",
  1672. messageSends: ["ifTrue:", "hasModification", "hasFocus", "contents:", "source", "selectedMethod", "browserModel"],
  1673. referencedClasses: []
  1674. }),
  1675. smalltalk.HLBrowserCodeWidget);
  1676. smalltalk.addMethod(
  1677. smalltalk.method({
  1678. selector: "renderButtonsOn:",
  1679. category: 'actions',
  1680. fn: function (html){
  1681. var self=this;
  1682. return smalltalk.withContext(function($ctx1) {
  1683. var $1,$2;
  1684. $1=_st(html)._button();
  1685. _st($1)._class_("button");
  1686. _st($1)._with_("SaveIt");
  1687. $2=_st($1)._onClick_((function(){
  1688. return smalltalk.withContext(function($ctx2) {
  1689. return self._saveIt();
  1690. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1691. smalltalk.HLBrowserCodeWidget.superclass.fn.prototype._renderButtonsOn_.apply(_st(self), [html]);
  1692. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLBrowserCodeWidget)})},
  1693. args: ["html"],
  1694. source: "renderButtonsOn: html\x0a\x09html button \x0a\x09\x09class: 'button';\x0a\x09\x09with: 'SaveIt';\x0a\x09\x09onClick: [ self saveIt ].\x0a\x09super renderButtonsOn: html",
  1695. messageSends: ["class:", "button", "with:", "onClick:", "saveIt", "renderButtonsOn:"],
  1696. referencedClasses: []
  1697. }),
  1698. smalltalk.HLBrowserCodeWidget);
  1699. smalltalk.addMethod(
  1700. smalltalk.method({
  1701. selector: "saveIt",
  1702. category: 'actions',
  1703. fn: function (){
  1704. var self=this;
  1705. return smalltalk.withContext(function($ctx1) {
  1706. _st(self._browserModel())._saveSourceCode();
  1707. return self}, function($ctx1) {$ctx1.fill(self,"saveIt",{},smalltalk.HLBrowserCodeWidget)})},
  1708. args: [],
  1709. source: "saveIt\x0a\x09self browserModel saveSourceCode",
  1710. messageSends: ["saveSourceCode", "browserModel"],
  1711. referencedClasses: []
  1712. }),
  1713. smalltalk.HLBrowserCodeWidget);
  1714. smalltalk.addMethod(
  1715. smalltalk.method({
  1716. selector: "unregister",
  1717. category: 'actions',
  1718. fn: function (){
  1719. var self=this;
  1720. return smalltalk.withContext(function($ctx1) {
  1721. smalltalk.HLBrowserCodeWidget.superclass.fn.prototype._unregsiter.apply(_st(self), []);
  1722. _st(_st(self._browserModel())._announcer())._unsubscribe_(self);
  1723. _st(_st(self._browserModel())._systemAnnouncer())._unsubscribe_(self);
  1724. return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLBrowserCodeWidget)})},
  1725. args: [],
  1726. source: "unregister\x0a\x09super unregsiter.\x0a\x09\x0a\x09self browserModel announcer unsubscribe: self.\x0a\x09self browserModel systemAnnouncer unsubscribe: self",
  1727. messageSends: ["unregsiter", "unsubscribe:", "announcer", "browserModel", "systemAnnouncer"],
  1728. referencedClasses: []
  1729. }),
  1730. smalltalk.HLBrowserCodeWidget);
  1731. smalltalk.addMethod(
  1732. smalltalk.method({
  1733. selector: "canBeOpenAsTab",
  1734. category: 'testing',
  1735. fn: function (){
  1736. var self=this;
  1737. return smalltalk.withContext(function($ctx1) {
  1738. return false;
  1739. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLBrowserCodeWidget.klass)})},
  1740. args: [],
  1741. source: "canBeOpenAsTab\x0a\x09^ false",
  1742. messageSends: [],
  1743. referencedClasses: []
  1744. }),
  1745. smalltalk.HLBrowserCodeWidget.klass);
  1746. smalltalk.addMethod(
  1747. smalltalk.method({
  1748. selector: "on:",
  1749. category: 'instance creation',
  1750. fn: function (aBrowserModel){
  1751. var self=this;
  1752. return smalltalk.withContext(function($ctx1) {
  1753. var $2,$3,$1;
  1754. $2=self._new();
  1755. _st($2)._browserModel_(aBrowserModel);
  1756. $3=_st($2)._yourself();
  1757. $1=$3;
  1758. return $1;
  1759. }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowserModel:aBrowserModel},smalltalk.HLBrowserCodeWidget.klass)})},
  1760. args: ["aBrowserModel"],
  1761. source: "on: aBrowserModel\x0a\x09^ self new\x0a\x09\x09browserModel: aBrowserModel;\x0a\x09\x09yourself",
  1762. messageSends: ["browserModel:", "new", "yourself"],
  1763. referencedClasses: []
  1764. }),
  1765. smalltalk.HLBrowserCodeWidget.klass);
  1766. smalltalk.addClass('HLWorkspace', smalltalk.HLWidget, ['codeWidget', 'transcript'], 'Helios-Workspace');
  1767. smalltalk.addMethod(
  1768. smalltalk.method({
  1769. selector: "canHaveFocus",
  1770. category: 'testing',
  1771. fn: function (){
  1772. var self=this;
  1773. return smalltalk.withContext(function($ctx1) {
  1774. return true;
  1775. }, function($ctx1) {$ctx1.fill(self,"canHaveFocus",{},smalltalk.HLWorkspace)})},
  1776. args: [],
  1777. source: "canHaveFocus\x0a\x09^ true",
  1778. messageSends: [],
  1779. referencedClasses: []
  1780. }),
  1781. smalltalk.HLWorkspace);
  1782. smalltalk.addMethod(
  1783. smalltalk.method({
  1784. selector: "codeWidget",
  1785. category: 'accessing',
  1786. fn: function (){
  1787. var self=this;
  1788. function $HLCodeWidget(){return smalltalk.HLCodeWidget||(typeof HLCodeWidget=="undefined"?nil:HLCodeWidget)}
  1789. return smalltalk.withContext(function($ctx1) {
  1790. var $2,$1;
  1791. $2=self["@codeWidget"];
  1792. if(($receiver = $2) == nil || $receiver == undefined){
  1793. self["@codeWidget"]=_st($HLCodeWidget())._new();
  1794. $1=self["@codeWidget"];
  1795. } else {
  1796. $1=$2;
  1797. };
  1798. return $1;
  1799. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{},smalltalk.HLWorkspace)})},
  1800. args: [],
  1801. source: "codeWidget\x0a\x09^ codeWidget ifNil: [ codeWidget := HLCodeWidget new ]",
  1802. messageSends: ["ifNil:", "new"],
  1803. referencedClasses: ["HLCodeWidget"]
  1804. }),
  1805. smalltalk.HLWorkspace);
  1806. smalltalk.addMethod(
  1807. smalltalk.method({
  1808. selector: "focus",
  1809. category: 'actions',
  1810. fn: function (){
  1811. var self=this;
  1812. return smalltalk.withContext(function($ctx1) {
  1813. var $1;
  1814. $1=_st(self._codeWidget())._focus();
  1815. return $1;
  1816. }, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLWorkspace)})},
  1817. args: [],
  1818. source: "focus\x0a\x09^ self codeWidget focus",
  1819. messageSends: ["focus", "codeWidget"],
  1820. referencedClasses: []
  1821. }),
  1822. smalltalk.HLWorkspace);
  1823. smalltalk.addMethod(
  1824. smalltalk.method({
  1825. selector: "renderContentOn:",
  1826. category: 'rendering',
  1827. fn: function (html){
  1828. var self=this;
  1829. function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  1830. function $HLContainer(){return smalltalk.HLContainer||(typeof HLContainer=="undefined"?nil:HLContainer)}
  1831. return smalltalk.withContext(function($ctx1) {
  1832. _st(html)._with_(_st($HLContainer())._with_(_st($HLHorizontalSplitter())._with_with_(self._codeWidget(),(function(canvas){
  1833. return smalltalk.withContext(function($ctx2) {
  1834. return self._renderTranscriptOn_(canvas);
  1835. }, function($ctx2) {$ctx2.fillBlock({canvas:canvas},$ctx1)})}))));
  1836. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLWorkspace)})},
  1837. args: ["html"],
  1838. source: "renderContentOn: html\x0a\x09html with: (HLContainer with: (HLHorizontalSplitter\x0a\x09\x09with: self codeWidget\x0a\x09\x09with: [ :canvas | self renderTranscriptOn: canvas ]))",
  1839. messageSends: ["with:", "with:with:", "codeWidget", "renderTranscriptOn:"],
  1840. referencedClasses: ["HLHorizontalSplitter", "HLContainer"]
  1841. }),
  1842. smalltalk.HLWorkspace);
  1843. smalltalk.addMethod(
  1844. smalltalk.method({
  1845. selector: "renderTranscriptOn:",
  1846. category: 'rendering',
  1847. fn: function (html){
  1848. var self=this;
  1849. return smalltalk.withContext(function($ctx1) {
  1850. var $1,$3,$4,$2;
  1851. $1=_st(html)._div();
  1852. _st($1)._class_("transcript-container");
  1853. $2=_st($1)._with_((function(){
  1854. return smalltalk.withContext(function($ctx2) {
  1855. $3=_st(html)._div();
  1856. _st($3)._class_("list-label");
  1857. $4=_st($3)._with_("Transcript");
  1858. $4;
  1859. return _st(self._transcript())._renderOn_(html);
  1860. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1861. return self}, function($ctx1) {$ctx1.fill(self,"renderTranscriptOn:",{html:html},smalltalk.HLWorkspace)})},
  1862. args: ["html"],
  1863. source: "renderTranscriptOn: html\x0a\x09html div \x0a\x09\x09class: 'transcript-container';\x0a\x09\x09with: [\x0a\x09\x09\x09html div\x0a\x09\x09\x09\x09class: 'list-label';\x0a\x09\x09\x09\x09with: 'Transcript'.\x0a\x09\x09\x09self transcript renderOn: html ]",
  1864. messageSends: ["class:", "div", "with:", "renderOn:", "transcript"],
  1865. referencedClasses: []
  1866. }),
  1867. smalltalk.HLWorkspace);
  1868. smalltalk.addMethod(
  1869. smalltalk.method({
  1870. selector: "transcript",
  1871. category: 'accessing',
  1872. fn: function (){
  1873. var self=this;
  1874. function $HLTranscript(){return smalltalk.HLTranscript||(typeof HLTranscript=="undefined"?nil:HLTranscript)}
  1875. return smalltalk.withContext(function($ctx1) {
  1876. var $2,$1;
  1877. $2=self["@transcript"];
  1878. if(($receiver = $2) == nil || $receiver == undefined){
  1879. self["@transcript"]=_st($HLTranscript())._new();
  1880. $1=self["@transcript"];
  1881. } else {
  1882. $1=$2;
  1883. };
  1884. return $1;
  1885. }, function($ctx1) {$ctx1.fill(self,"transcript",{},smalltalk.HLWorkspace)})},
  1886. args: [],
  1887. source: "transcript\x0a\x09^ transcript ifNil: [ transcript := HLTranscript new ]",
  1888. messageSends: ["ifNil:", "new"],
  1889. referencedClasses: ["HLTranscript"]
  1890. }),
  1891. smalltalk.HLWorkspace);
  1892. smalltalk.addMethod(
  1893. smalltalk.method({
  1894. selector: "unregister",
  1895. category: 'actions',
  1896. fn: function (){
  1897. var self=this;
  1898. return smalltalk.withContext(function($ctx1) {
  1899. smalltalk.HLWorkspace.superclass.fn.prototype._unregister.apply(_st(self), []);
  1900. _st(self._transcript())._unregister();
  1901. return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLWorkspace)})},
  1902. args: [],
  1903. source: "unregister\x0a\x09super unregister.\x0a\x09self transcript unregister",
  1904. messageSends: ["unregister", "transcript"],
  1905. referencedClasses: []
  1906. }),
  1907. smalltalk.HLWorkspace);
  1908. smalltalk.addMethod(
  1909. smalltalk.method({
  1910. selector: "canBeOpenAsTab",
  1911. category: 'testing',
  1912. fn: function (){
  1913. var self=this;
  1914. return smalltalk.withContext(function($ctx1) {
  1915. return true;
  1916. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLWorkspace.klass)})},
  1917. args: [],
  1918. source: "canBeOpenAsTab\x0a\x09^ true",
  1919. messageSends: [],
  1920. referencedClasses: []
  1921. }),
  1922. smalltalk.HLWorkspace.klass);
  1923. smalltalk.addMethod(
  1924. smalltalk.method({
  1925. selector: "tabClass",
  1926. category: 'accessing',
  1927. fn: function (){
  1928. var self=this;
  1929. return smalltalk.withContext(function($ctx1) {
  1930. return "workspace";
  1931. }, function($ctx1) {$ctx1.fill(self,"tabClass",{},smalltalk.HLWorkspace.klass)})},
  1932. args: [],
  1933. source: "tabClass\x0a\x09^ 'workspace'",
  1934. messageSends: [],
  1935. referencedClasses: []
  1936. }),
  1937. smalltalk.HLWorkspace.klass);
  1938. smalltalk.addMethod(
  1939. smalltalk.method({
  1940. selector: "tabLabel",
  1941. category: 'accessing',
  1942. fn: function (){
  1943. var self=this;
  1944. return smalltalk.withContext(function($ctx1) {
  1945. return "Workspace";
  1946. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLWorkspace.klass)})},
  1947. args: [],
  1948. source: "tabLabel\x0a\x09^ 'Workspace'",
  1949. messageSends: [],
  1950. referencedClasses: []
  1951. }),
  1952. smalltalk.HLWorkspace.klass);
  1953. smalltalk.addMethod(
  1954. smalltalk.method({
  1955. selector: "tabPriority",
  1956. category: 'accessing',
  1957. fn: function (){
  1958. var self=this;
  1959. return smalltalk.withContext(function($ctx1) {
  1960. return (10);
  1961. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLWorkspace.klass)})},
  1962. args: [],
  1963. source: "tabPriority\x0a\x09^ 10",
  1964. messageSends: [],
  1965. referencedClasses: []
  1966. }),
  1967. smalltalk.HLWorkspace.klass);
  1968. });