Helios-Workspace.js 82 KB

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