Helios-Workspace.js 81 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077
  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(self._environment())._eval_on_(aString,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(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"]=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=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(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. 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(self._editor())._at_put_("amberCodeWidget",self);
  229. _st(self._editor())._on_do_("change",(function(){
  230. return smalltalk.withContext(function($ctx2) {
  231. return 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. 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=self._selection();
  307. } else {
  308. $1=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(self._model())._announcer())._announce_(_st($HLDoItRequested())._on_(self["@model"]));
  330. result=_st(self["@model"])._doIt_(self._currentLineOrSelection());
  331. _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._from_(["theme".__minus_gt("amber"),"lineNumbers".__minus_gt(true),"enterMode".__minus_gt("flat"),"indentWithTabs".__minus_gt(true),"indentUnit".__minus_gt((4)),"matchBrackets".__minus_gt(true),"electricChars".__minus_gt(false),"keyMap".__minus_gt("Amber"),"extraKeys".__minus_gt(smalltalk.HashedCollection._from_(["Shift-Space".__minus_gt("autocomplete")]))]);
  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(self._model())._announcer())._announce_(_st($HLInspectItRequested())._on_(self["@model"]));
  432. _st(self._model())._inspect_(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. 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. 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. 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. 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._from_(["line".__minus_gt(currentLine),"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=self._doIt();
  618. _st(_st(self._model())._announcer())._announce_(_st($HLPrintItRequested())._on_(self["@model"]));
  619. self._print_(_st(result)._printString());
  620. 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(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(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 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 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 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,$5,$6;
  704. $1=_st(html)._div();
  705. _st($1)._class_("editor");
  706. $2=_st($1)._with_((function(){
  707. return smalltalk.withContext(function($ctx2) {
  708. self["@code"]=_st(html)._textarea();
  709. return self["@code"];
  710. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  711. self["@state"]=_st(_st(html)._div())._class_("state");
  712. $3=_st(html)._div();
  713. _st($3)._class_("buttons_bar");
  714. $4=_st($3)._with_((function(){
  715. return smalltalk.withContext(function($ctx2) {
  716. return self._renderButtonsOn_(html);
  717. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  718. $5=self;
  719. _st($5)._setEditorOn_(_st(self["@code"])._element());
  720. _st($5)._configureEditor();
  721. $6=_st($5)._updateState();
  722. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLCodeWidget)})},
  723. args: ["html"],
  724. source: "renderContentOn: html\x0a\x09html div class: 'editor'; with: [\x0a\x09\x09code := html textarea ].\x0a\x09state := html div class: 'state'.\x0a\x09\x0a\x09html div \x0a\x09\x09class: 'buttons_bar';\x0a\x09\x09with: [ self renderButtonsOn: html ].\x0a\x09\x0a\x09self \x0a\x09\x09setEditorOn: code element;\x0a\x09\x09configureEditor;\x0a\x09\x09updateState",
  725. messageSends: ["class:", "div", "with:", "textarea", "renderButtonsOn:", "setEditorOn:", "element", "configureEditor", "updateState"],
  726. referencedClasses: []
  727. }),
  728. smalltalk.HLCodeWidget);
  729. smalltalk.addMethod(
  730. smalltalk.method({
  731. selector: "saveIt",
  732. category: 'actions',
  733. fn: function (){
  734. var self=this;
  735. return smalltalk.withContext(function($ctx1) {
  736. return self}, function($ctx1) {$ctx1.fill(self,"saveIt",{},smalltalk.HLCodeWidget)})},
  737. args: [],
  738. source: "saveIt\x0a\x09\x22I do not do anything\x22",
  739. messageSends: [],
  740. referencedClasses: []
  741. }),
  742. smalltalk.HLCodeWidget);
  743. smalltalk.addMethod(
  744. smalltalk.method({
  745. selector: "selection",
  746. category: 'accessing',
  747. fn: function (){
  748. var self=this;
  749. return smalltalk.withContext(function($ctx1) {
  750. var $1;
  751. $1=_st(self["@editor"])._getSelection();
  752. return $1;
  753. }, function($ctx1) {$ctx1.fill(self,"selection",{},smalltalk.HLCodeWidget)})},
  754. args: [],
  755. source: "selection\x0a\x09^editor getSelection",
  756. messageSends: ["getSelection"],
  757. referencedClasses: []
  758. }),
  759. smalltalk.HLCodeWidget);
  760. smalltalk.addMethod(
  761. smalltalk.method({
  762. selector: "selectionEnd",
  763. category: 'accessing',
  764. fn: function (){
  765. var self=this;
  766. return smalltalk.withContext(function($ctx1) {
  767. var $1;
  768. $1=_st(_st(self["@code"])._element())._selectionEnd();
  769. return $1;
  770. }, function($ctx1) {$ctx1.fill(self,"selectionEnd",{},smalltalk.HLCodeWidget)})},
  771. args: [],
  772. source: "selectionEnd\x0a ^code element selectionEnd",
  773. messageSends: ["selectionEnd", "element"],
  774. referencedClasses: []
  775. }),
  776. smalltalk.HLCodeWidget);
  777. smalltalk.addMethod(
  778. smalltalk.method({
  779. selector: "selectionEnd:",
  780. category: 'accessing',
  781. fn: function (anInteger){
  782. var self=this;
  783. return smalltalk.withContext(function($ctx1) {
  784. _st(_st(self["@code"])._element())._selectionEnd_(anInteger);
  785. return self}, function($ctx1) {$ctx1.fill(self,"selectionEnd:",{anInteger:anInteger},smalltalk.HLCodeWidget)})},
  786. args: ["anInteger"],
  787. source: "selectionEnd: anInteger\x0a code element selectionEnd: anInteger",
  788. messageSends: ["selectionEnd:", "element"],
  789. referencedClasses: []
  790. }),
  791. smalltalk.HLCodeWidget);
  792. smalltalk.addMethod(
  793. smalltalk.method({
  794. selector: "selectionStart",
  795. category: 'accessing',
  796. fn: function (){
  797. var self=this;
  798. return smalltalk.withContext(function($ctx1) {
  799. var $1;
  800. $1=_st(_st(self["@code"])._element())._selectionStart();
  801. return $1;
  802. }, function($ctx1) {$ctx1.fill(self,"selectionStart",{},smalltalk.HLCodeWidget)})},
  803. args: [],
  804. source: "selectionStart\x0a ^code element selectionStart",
  805. messageSends: ["selectionStart", "element"],
  806. referencedClasses: []
  807. }),
  808. smalltalk.HLCodeWidget);
  809. smalltalk.addMethod(
  810. smalltalk.method({
  811. selector: "selectionStart:",
  812. category: 'accessing',
  813. fn: function (anInteger){
  814. var self=this;
  815. return smalltalk.withContext(function($ctx1) {
  816. _st(_st(self["@code"])._element())._selectionStart_(anInteger);
  817. return self}, function($ctx1) {$ctx1.fill(self,"selectionStart:",{anInteger:anInteger},smalltalk.HLCodeWidget)})},
  818. args: ["anInteger"],
  819. source: "selectionStart: anInteger\x0a code element selectionStart: anInteger",
  820. messageSends: ["selectionStart:", "element"],
  821. referencedClasses: []
  822. }),
  823. smalltalk.HLCodeWidget);
  824. smalltalk.addMethod(
  825. smalltalk.method({
  826. selector: "setEditorOn:",
  827. category: 'actions',
  828. fn: function (aTextarea){
  829. var self=this;
  830. return smalltalk.withContext(function($ctx1) {
  831. self['@editor'] = CodeMirror.fromTextArea(aTextarea, self._editorOptions());
  832. return self}, function($ctx1) {$ctx1.fill(self,"setEditorOn:",{aTextarea:aTextarea},smalltalk.HLCodeWidget)})},
  833. args: ["aTextarea"],
  834. source: "setEditorOn: aTextarea\x0a\x09<self['@editor'] = CodeMirror.fromTextArea(aTextarea, self._editorOptions())>",
  835. messageSends: [],
  836. referencedClasses: []
  837. }),
  838. smalltalk.HLCodeWidget);
  839. smalltalk.addMethod(
  840. smalltalk.method({
  841. selector: "updateState",
  842. category: 'updating',
  843. fn: function (){
  844. var self=this;
  845. return smalltalk.withContext(function($ctx1) {
  846. var $1;
  847. $1=self._hasModification();
  848. if(smalltalk.assert($1)){
  849. _st(_st(self["@state"])._asJQuery())._addClass_("modified");
  850. } else {
  851. _st(_st(self["@state"])._asJQuery())._removeClass_("modified");
  852. };
  853. return self}, function($ctx1) {$ctx1.fill(self,"updateState",{},smalltalk.HLCodeWidget)})},
  854. args: [],
  855. source: "updateState\x0a\x09self hasModification \x0a\x09\x09ifTrue: [ state asJQuery addClass: 'modified' ]\x0a\x09\x09ifFalse: [ state asJQuery removeClass: 'modified' ]",
  856. messageSends: ["ifTrue:ifFalse:", "addClass:", "asJQuery", "removeClass:", "hasModification"],
  857. referencedClasses: []
  858. }),
  859. smalltalk.HLCodeWidget);
  860. smalltalk.addMethod(
  861. smalltalk.method({
  862. selector: "variableHintFor:token:",
  863. category: 'hints',
  864. fn: function (anEditor,aToken){
  865. var self=this;
  866. var variables,classNames,pseudoVariables;
  867. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  868. return smalltalk.withContext(function($ctx1) {
  869. var $1;
  870. variables=_st(_st(_st(_st(window)._jQuery_(_st(_st(anEditor)._display())._wrapper()))._find_("span.cm-variable"))._get())._collect_((function(each){
  871. return smalltalk.withContext(function($ctx2) {
  872. return _st(_st(window)._jQuery_(each))._html();
  873. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  874. classNames=_st(_st(_st($Smalltalk())._current())._classes())._collect_((function(each){
  875. return smalltalk.withContext(function($ctx2) {
  876. return _st(each)._name();
  877. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  878. pseudoVariables=_st(_st($Smalltalk())._current())._pseudoVariableNames();
  879. $1=_st(_st(_st(_st(_st(_st(variables).__comma(classNames)).__comma(pseudoVariables))._asSet())._asArray())._select_((function(each){
  880. return smalltalk.withContext(function($ctx2) {
  881. return _st(each)._includesSubString_(_st(aToken)._string());
  882. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._reject_((function(each){
  883. return smalltalk.withContext(function($ctx2) {
  884. return _st(each).__eq(_st(aToken)._string());
  885. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  886. return $1;
  887. }, function($ctx1) {$ctx1.fill(self,"variableHintFor:token:",{anEditor:anEditor,aToken:aToken,variables:variables,classNames:classNames,pseudoVariables:pseudoVariables},smalltalk.HLCodeWidget)})},
  888. args: ["anEditor", "aToken"],
  889. 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 ]",
  890. messageSends: ["collect:", "html", "jQuery:", "get", "find:", "wrapper", "display", "name", "classes", "current", "pseudoVariableNames", "reject:", "=", "string", "select:", "includesSubString:", "asArray", "asSet", ","],
  891. referencedClasses: ["Smalltalk"]
  892. }),
  893. smalltalk.HLCodeWidget);
  894. smalltalk.addMethod(
  895. smalltalk.method({
  896. selector: "hintFor:options:",
  897. category: 'hints',
  898. fn: function (anEditor,options){
  899. var self=this;
  900. var cursor,token,completions;
  901. function $CodeMirror(){return smalltalk.CodeMirror||(typeof CodeMirror=="undefined"?nil:CodeMirror)}
  902. function $HLCodeWidget(){return smalltalk.HLCodeWidget||(typeof HLCodeWidget=="undefined"?nil:HLCodeWidget)}
  903. return smalltalk.withContext(function($ctx1) {
  904. var $1,$2;
  905. cursor=_st(anEditor)._getCursor();
  906. token=_st(anEditor)._getTokenAt_(cursor);
  907. _st(token)._at_put_("state",_st(_st(_st($CodeMirror())._basicAt_("innerMode"))._value_value_(_st(anEditor)._getMode(),_st(token)._at_("state")))._state());
  908. $1=_st(_st(token)._type()).__eq("variable");
  909. if(smalltalk.assert($1)){
  910. completions=_st($HLCodeWidget())._variableHintFor_token_(anEditor,token);
  911. } else {
  912. completions=_st($HLCodeWidget())._messageHintFor_token_(anEditor,token);
  913. };
  914. $2=smalltalk.HashedCollection._from_(["list".__minus_gt(completions),"from".__minus_gt(_st(_st($CodeMirror())._basicAt_("Pos"))._value_value_(_st(cursor)._line(),_st(token)._end())),"to".__minus_gt(_st(_st($CodeMirror())._basicAt_("Pos"))._value_value_(_st(cursor)._line(),_st(token)._start()))]);
  915. return $2;
  916. }, function($ctx1) {$ctx1.fill(self,"hintFor:options:",{anEditor:anEditor,options:options,cursor:cursor,token:token,completions:completions},smalltalk.HLCodeWidget.klass)})},
  917. args: ["anEditor", "options"],
  918. 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}",
  919. messageSends: ["getCursor", "getTokenAt:", "at:put:", "state", "value:value:", "getMode", "at:", "basicAt:", "ifTrue:ifFalse:", "variableHintFor:token:", "messageHintFor:token:", "=", "type", "->", "line", "end", "start"],
  920. referencedClasses: ["CodeMirror", "HLCodeWidget"]
  921. }),
  922. smalltalk.HLCodeWidget.klass);
  923. smalltalk.addMethod(
  924. smalltalk.method({
  925. selector: "initialize",
  926. category: 'initialization',
  927. fn: function (){
  928. var self=this;
  929. return smalltalk.withContext(function($ctx1) {
  930. var $1,$2;
  931. smalltalk.HLWidget.klass.fn.prototype._initialize.apply(_st(self), []);
  932. $1=self;
  933. _st($1)._setupCodeMirror();
  934. _st($1)._setupCommands();
  935. $2=_st($1)._setupKeyMaps();
  936. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLCodeWidget.klass)})},
  937. args: [],
  938. source: "initialize\x0a\x09super initialize.\x0a\x09self \x0a\x09\x09setupCodeMirror;\x0a\x09\x09setupCommands;\x0a\x09\x09setupKeyMaps.",
  939. messageSends: ["initialize", "setupCodeMirror", "setupCommands", "setupKeyMaps"],
  940. referencedClasses: []
  941. }),
  942. smalltalk.HLCodeWidget.klass);
  943. smalltalk.addMethod(
  944. smalltalk.method({
  945. selector: "keyMap",
  946. category: 'accessing',
  947. fn: function (){
  948. var self=this;
  949. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  950. return smalltalk.withContext(function($ctx1) {
  951. var $2,$1;
  952. $2=_st(_st(_st($HLManager())._current())._keyBinder())._systemIsMac();
  953. if(smalltalk.assert($2)){
  954. $1=self._macKeyMap();
  955. } else {
  956. $1=self._pcKeyMap();
  957. };
  958. return $1;
  959. }, function($ctx1) {$ctx1.fill(self,"keyMap",{},smalltalk.HLCodeWidget.klass)})},
  960. args: [],
  961. source: "keyMap\x0a\x09^ HLManager current keyBinder systemIsMac\x0a\x09\x09ifTrue: [ self macKeyMap ]\x0a\x09\x09ifFalse: [ self pcKeyMap ]",
  962. messageSends: ["ifTrue:ifFalse:", "macKeyMap", "pcKeyMap", "systemIsMac", "keyBinder", "current"],
  963. referencedClasses: ["HLManager"]
  964. }),
  965. smalltalk.HLCodeWidget.klass);
  966. smalltalk.addMethod(
  967. smalltalk.method({
  968. selector: "macKeyMap",
  969. category: 'accessing',
  970. fn: function (){
  971. var self=this;
  972. return smalltalk.withContext(function($ctx1) {
  973. var $1;
  974. $1=smalltalk.HashedCollection._from_(["Alt-Backspace".__minus_gt("delWordBefore"),"Alt-Delete".__minus_gt("delWordAfter"),"Alt-Left".__minus_gt("goWordBoundaryLeft"),"Alt-Right".__minus_gt("goWordBoundaryRight"),"Cmd-A".__minus_gt("selectAll"),"Cmd-Alt-F".__minus_gt("replace"),"Cmd-D".__minus_gt("doIt"),"Cmd-Down".__minus_gt("goDocEnd"),"Cmd-End".__minus_gt("goDocEnd"),"Cmd-F".__minus_gt("find"),"Cmd-G".__minus_gt("findNext"),"Cmd-I".__minus_gt("inspectIt"),"Cmd-Left".__minus_gt("goLineStart"),"Cmd-P".__minus_gt("printIt"),"Cmd-Right".__minus_gt("goLineEnd"),"Cmd-S".__minus_gt("saveIt"),"Cmd-Up".__minus_gt("goDocStart"),"Cmd-Y".__minus_gt("redo"),"Cmd-Z".__minus_gt("undo"),"Cmd-[".__minus_gt("indentLess"),"Cmd-]".__minus_gt("indentMore"),"Ctrl-Alt-Backspace".__minus_gt("delWordAfter"),"Shift-Cmd-Alt-F".__minus_gt("replaceAll"),"Shift-Cmd-G".__minus_gt("findPrev"),"Shift-Cmd-Z".__minus_gt("redo"),"fallthrough".__minus_gt(["basic","emacsy"])]);
  975. return $1;
  976. }, function($ctx1) {$ctx1.fill(self,"macKeyMap",{},smalltalk.HLCodeWidget.klass)})},
  977. args: [],
  978. 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 }",
  979. messageSends: ["->"],
  980. referencedClasses: []
  981. }),
  982. smalltalk.HLCodeWidget.klass);
  983. smalltalk.addMethod(
  984. smalltalk.method({
  985. selector: "messageHintFor:token:",
  986. category: 'hints',
  987. fn: function (anEditor,aToken){
  988. var self=this;
  989. return smalltalk.withContext(function($ctx1) {
  990. var $1;
  991. $1=_st(_st(anEditor)._at_("amberCodeWidget"))._messageHintFor_token_(anEditor,aToken);
  992. return $1;
  993. }, function($ctx1) {$ctx1.fill(self,"messageHintFor:token:",{anEditor:anEditor,aToken:aToken},smalltalk.HLCodeWidget.klass)})},
  994. args: ["anEditor", "aToken"],
  995. source: "messageHintFor: anEditor token: aToken\x0a\x09^ (anEditor at: 'amberCodeWidget')\x0a\x09\x09messageHintFor: anEditor token: aToken",
  996. messageSends: ["messageHintFor:token:", "at:"],
  997. referencedClasses: []
  998. }),
  999. smalltalk.HLCodeWidget.klass);
  1000. smalltalk.addMethod(
  1001. smalltalk.method({
  1002. selector: "pcKeyMap",
  1003. category: 'accessing',
  1004. fn: function (){
  1005. var self=this;
  1006. return smalltalk.withContext(function($ctx1) {
  1007. var $1;
  1008. $1=smalltalk.HashedCollection._from_(["Alt-Left".__minus_gt("goLineStart"),"Alt-Right".__minus_gt("goLineEnd"),"Alt-Up".__minus_gt("goDocStart"),"Ctrl-A".__minus_gt("selectAll"),"Ctrl-Backspace".__minus_gt("delWordBefore"),"Ctrl-D".__minus_gt("doIt"),"Ctrl-Delete".__minus_gt("delWordAfter"),"Ctrl-Down".__minus_gt("goDocEnd"),"Ctrl-End".__minus_gt("goDocEnd"),"Ctrl-F".__minus_gt("find"),"Ctrl-G".__minus_gt("findNext"),"Ctrl-I".__minus_gt("inspectIt"),"Ctrl-Home".__minus_gt("goDocStart"),"Ctrl-Left".__minus_gt("goWordBoundaryLeft"),"Ctrl-P".__minus_gt("printIt"),"Ctrl-Right".__minus_gt("goWordBoundaryRight"),"Ctrl-S".__minus_gt("saveIt"),"Ctrl-Y".__minus_gt("redo"),"Ctrl-Z".__minus_gt("undo"),"Ctrl-[".__minus_gt("indentLess"),"Ctrl-]".__minus_gt("indentMore"),"Shift-Ctrl-F".__minus_gt("replace"),"Shift-Ctrl-G".__minus_gt("findPrev"),"Shift-Ctrl-R".__minus_gt("replaceAll"),"Shift-Ctrl-Z".__minus_gt("redo"),"fallthrough".__minus_gt(["basic"])]);
  1009. return $1;
  1010. }, function($ctx1) {$ctx1.fill(self,"pcKeyMap",{},smalltalk.HLCodeWidget.klass)})},
  1011. args: [],
  1012. 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}",
  1013. messageSends: ["->"],
  1014. referencedClasses: []
  1015. }),
  1016. smalltalk.HLCodeWidget.klass);
  1017. smalltalk.addMethod(
  1018. smalltalk.method({
  1019. selector: "setupCodeMirror",
  1020. category: 'initialization',
  1021. fn: function (){
  1022. var self=this;
  1023. return smalltalk.withContext(function($ctx1) {
  1024. CodeMirror.keyMap.default.fallthrough = ["basic"];
  1025. CodeMirror.commands.autocomplete = function(cm) {
  1026. CodeMirror.showHint(cm, self._hintFor_options_);
  1027. }
  1028. ;
  1029. return self}, function($ctx1) {$ctx1.fill(self,"setupCodeMirror",{},smalltalk.HLCodeWidget.klass)})},
  1030. args: [],
  1031. 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>",
  1032. messageSends: [],
  1033. referencedClasses: []
  1034. }),
  1035. smalltalk.HLCodeWidget.klass);
  1036. smalltalk.addMethod(
  1037. smalltalk.method({
  1038. selector: "setupCommands",
  1039. category: 'initialization',
  1040. fn: function (){
  1041. var self=this;
  1042. function $CodeMirror(){return smalltalk.CodeMirror||(typeof CodeMirror=="undefined"?nil:CodeMirror)}
  1043. return smalltalk.withContext(function($ctx1) {
  1044. var $1,$2;
  1045. $1=_st($CodeMirror())._basicAt_("commands");
  1046. _st($1)._at_put_("doIt",(function(cm){
  1047. return smalltalk.withContext(function($ctx2) {
  1048. return _st(_st(cm)._amberCodeWidget())._doIt();
  1049. }, function($ctx2) {$ctx2.fillBlock({cm:cm},$ctx1)})}));
  1050. _st($1)._at_put_("inspectIt",(function(cm){
  1051. return smalltalk.withContext(function($ctx2) {
  1052. return _st(_st(cm)._amberCodeWidget())._inspectIt();
  1053. }, function($ctx2) {$ctx2.fillBlock({cm:cm},$ctx1)})}));
  1054. _st($1)._at_put_("printIt",(function(cm){
  1055. return smalltalk.withContext(function($ctx2) {
  1056. return _st(_st(cm)._amberCodeWidget())._printIt();
  1057. }, function($ctx2) {$ctx2.fillBlock({cm:cm},$ctx1)})}));
  1058. $2=_st($1)._at_put_("saveIt",(function(cm){
  1059. return smalltalk.withContext(function($ctx2) {
  1060. return _st(_st(cm)._amberCodeWidget())._saveIt();
  1061. }, function($ctx2) {$ctx2.fillBlock({cm:cm},$ctx1)})}));
  1062. return self}, function($ctx1) {$ctx1.fill(self,"setupCommands",{},smalltalk.HLCodeWidget.klass)})},
  1063. args: [],
  1064. 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 ]",
  1065. messageSends: ["at:put:", "doIt", "amberCodeWidget", "basicAt:", "inspectIt", "printIt", "saveIt"],
  1066. referencedClasses: ["CodeMirror"]
  1067. }),
  1068. smalltalk.HLCodeWidget.klass);
  1069. smalltalk.addMethod(
  1070. smalltalk.method({
  1071. selector: "setupKeyMaps",
  1072. category: 'initialization',
  1073. fn: function (){
  1074. var self=this;
  1075. return smalltalk.withContext(function($ctx1) {
  1076. CodeMirror.keyMap['Amber'] = self._keyMap();
  1077. return self}, function($ctx1) {$ctx1.fill(self,"setupKeyMaps",{},smalltalk.HLCodeWidget.klass)})},
  1078. args: [],
  1079. source: "setupKeyMaps\x0a\x09<CodeMirror.keyMap['Amber'] = self._keyMap()>",
  1080. messageSends: [],
  1081. referencedClasses: []
  1082. }),
  1083. smalltalk.HLCodeWidget.klass);
  1084. smalltalk.addMethod(
  1085. smalltalk.method({
  1086. selector: "variableHintFor:token:",
  1087. category: 'hints',
  1088. fn: function (anEditor,aToken){
  1089. var self=this;
  1090. return smalltalk.withContext(function($ctx1) {
  1091. var $1;
  1092. $1=_st(_st(anEditor)._at_("amberCodeWidget"))._variableHintFor_token_(anEditor,aToken);
  1093. return $1;
  1094. }, function($ctx1) {$ctx1.fill(self,"variableHintFor:token:",{anEditor:anEditor,aToken:aToken},smalltalk.HLCodeWidget.klass)})},
  1095. args: ["anEditor", "aToken"],
  1096. source: "variableHintFor: anEditor token: aToken\x0a\x09^ (anEditor at: 'amberCodeWidget')\x0a\x09\x09variableHintFor: anEditor token: aToken",
  1097. messageSends: ["variableHintFor:token:", "at:"],
  1098. referencedClasses: []
  1099. }),
  1100. smalltalk.HLCodeWidget.klass);
  1101. smalltalk.addClass('HLNavigationCodeWidget', smalltalk.HLCodeWidget, ['methodContents'], 'Helios-Workspace');
  1102. smalltalk.addMethod(
  1103. smalltalk.method({
  1104. selector: "configureEditor",
  1105. category: 'accessing',
  1106. fn: function (){
  1107. var self=this;
  1108. return smalltalk.withContext(function($ctx1) {
  1109. smalltalk.HLCodeWidget.fn.prototype._configureEditor.apply(_st(self), []);
  1110. self._contents_(self._methodContents());
  1111. return self}, function($ctx1) {$ctx1.fill(self,"configureEditor",{},smalltalk.HLNavigationCodeWidget)})},
  1112. args: [],
  1113. source: "configureEditor\x0a\x09super configureEditor.\x0a\x09self contents: self methodContents",
  1114. messageSends: ["configureEditor", "contents:", "methodContents"],
  1115. referencedClasses: []
  1116. }),
  1117. smalltalk.HLNavigationCodeWidget);
  1118. smalltalk.addMethod(
  1119. smalltalk.method({
  1120. selector: "contents:",
  1121. category: 'accessing',
  1122. fn: function (aString){
  1123. var self=this;
  1124. return smalltalk.withContext(function($ctx1) {
  1125. self._methodContents_(aString);
  1126. smalltalk.HLCodeWidget.fn.prototype._contents_.apply(_st(self), [aString]);
  1127. return self}, function($ctx1) {$ctx1.fill(self,"contents:",{aString:aString},smalltalk.HLNavigationCodeWidget)})},
  1128. args: ["aString"],
  1129. source: "contents: aString\x0a\x09self methodContents: aString.\x0a\x09super contents: aString",
  1130. messageSends: ["methodContents:", "contents:"],
  1131. referencedClasses: []
  1132. }),
  1133. smalltalk.HLNavigationCodeWidget);
  1134. smalltalk.addMethod(
  1135. smalltalk.method({
  1136. selector: "hasModification",
  1137. category: 'testing',
  1138. fn: function (){
  1139. var self=this;
  1140. return smalltalk.withContext(function($ctx1) {
  1141. var $1;
  1142. $1=_st(_st(self._methodContents()).__eq(self._contents()))._not();
  1143. return $1;
  1144. }, function($ctx1) {$ctx1.fill(self,"hasModification",{},smalltalk.HLNavigationCodeWidget)})},
  1145. args: [],
  1146. source: "hasModification\x0a\x09^ (self methodContents = self contents) not",
  1147. messageSends: ["not", "=", "contents", "methodContents"],
  1148. referencedClasses: []
  1149. }),
  1150. smalltalk.HLNavigationCodeWidget);
  1151. smalltalk.addMethod(
  1152. smalltalk.method({
  1153. selector: "methodContents",
  1154. category: 'accessing',
  1155. fn: function (){
  1156. var self=this;
  1157. return smalltalk.withContext(function($ctx1) {
  1158. var $2,$1;
  1159. $2=self["@methodContents"];
  1160. if(($receiver = $2) == nil || $receiver == undefined){
  1161. $1="";
  1162. } else {
  1163. $1=$2;
  1164. };
  1165. return $1;
  1166. }, function($ctx1) {$ctx1.fill(self,"methodContents",{},smalltalk.HLNavigationCodeWidget)})},
  1167. args: [],
  1168. source: "methodContents\x0a\x09^ methodContents ifNil: [ '' ]",
  1169. messageSends: ["ifNil:"],
  1170. referencedClasses: []
  1171. }),
  1172. smalltalk.HLNavigationCodeWidget);
  1173. smalltalk.addMethod(
  1174. smalltalk.method({
  1175. selector: "methodContents:",
  1176. category: 'accessing',
  1177. fn: function (aString){
  1178. var self=this;
  1179. return smalltalk.withContext(function($ctx1) {
  1180. var $1;
  1181. self["@methodContents"]=aString;
  1182. $1=self["@methodContents"];
  1183. return $1;
  1184. }, function($ctx1) {$ctx1.fill(self,"methodContents:",{aString:aString},smalltalk.HLNavigationCodeWidget)})},
  1185. args: ["aString"],
  1186. source: "methodContents: aString\x0a\x09^ methodContents := aString",
  1187. messageSends: [],
  1188. referencedClasses: []
  1189. }),
  1190. smalltalk.HLNavigationCodeWidget);
  1191. smalltalk.addMethod(
  1192. smalltalk.method({
  1193. selector: "previous",
  1194. category: 'accessing',
  1195. fn: function (){
  1196. var self=this;
  1197. return smalltalk.withContext(function($ctx1) {
  1198. return self}, function($ctx1) {$ctx1.fill(self,"previous",{},smalltalk.HLNavigationCodeWidget)})},
  1199. args: [],
  1200. source: "previous\x0a\x09\x22for browser lists widget\x22",
  1201. messageSends: [],
  1202. referencedClasses: []
  1203. }),
  1204. smalltalk.HLNavigationCodeWidget);
  1205. smalltalk.addMethod(
  1206. smalltalk.method({
  1207. selector: "previous:",
  1208. category: 'accessing',
  1209. fn: function (aWidget){
  1210. var self=this;
  1211. return smalltalk.withContext(function($ctx1) {
  1212. return self}, function($ctx1) {$ctx1.fill(self,"previous:",{aWidget:aWidget},smalltalk.HLNavigationCodeWidget)})},
  1213. args: ["aWidget"],
  1214. source: "previous: aWidget\x0a\x09\x22for browser lists widget\x22",
  1215. messageSends: [],
  1216. referencedClasses: []
  1217. }),
  1218. smalltalk.HLNavigationCodeWidget);
  1219. smalltalk.addMethod(
  1220. smalltalk.method({
  1221. selector: "canBeOpenAsTab",
  1222. category: 'testing',
  1223. fn: function (){
  1224. var self=this;
  1225. return smalltalk.withContext(function($ctx1) {
  1226. return false;
  1227. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLNavigationCodeWidget.klass)})},
  1228. args: [],
  1229. source: "canBeOpenAsTab\x0a\x09^ false",
  1230. messageSends: [],
  1231. referencedClasses: []
  1232. }),
  1233. smalltalk.HLNavigationCodeWidget.klass);
  1234. smalltalk.addMethod(
  1235. smalltalk.method({
  1236. selector: "on:",
  1237. category: 'instance creation',
  1238. fn: function (aBrowserModel){
  1239. var self=this;
  1240. return smalltalk.withContext(function($ctx1) {
  1241. var $2,$3,$1;
  1242. $2=self._new();
  1243. _st($2)._browserModel_(aBrowserModel);
  1244. $3=_st($2)._yourself();
  1245. $1=$3;
  1246. return $1;
  1247. }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowserModel:aBrowserModel},smalltalk.HLNavigationCodeWidget.klass)})},
  1248. args: ["aBrowserModel"],
  1249. source: "on: aBrowserModel\x0a\x09^ self new\x0a\x09\x09browserModel: aBrowserModel;\x0a\x09\x09yourself",
  1250. messageSends: ["browserModel:", "new", "yourself"],
  1251. referencedClasses: []
  1252. }),
  1253. smalltalk.HLNavigationCodeWidget.klass);
  1254. smalltalk.addClass('HLBrowserCodeWidget', smalltalk.HLNavigationCodeWidget, ['browserModel'], 'Helios-Workspace');
  1255. smalltalk.addMethod(
  1256. smalltalk.method({
  1257. selector: "browserModel",
  1258. category: 'accessing',
  1259. fn: function (){
  1260. var self=this;
  1261. return smalltalk.withContext(function($ctx1) {
  1262. var $1;
  1263. $1=self["@browserModel"];
  1264. return $1;
  1265. }, function($ctx1) {$ctx1.fill(self,"browserModel",{},smalltalk.HLBrowserCodeWidget)})},
  1266. args: [],
  1267. source: "browserModel\x0a\x09^ browserModel",
  1268. messageSends: [],
  1269. referencedClasses: []
  1270. }),
  1271. smalltalk.HLBrowserCodeWidget);
  1272. smalltalk.addMethod(
  1273. smalltalk.method({
  1274. selector: "browserModel:",
  1275. category: 'accessing',
  1276. fn: function (aBrowserModel){
  1277. var self=this;
  1278. return smalltalk.withContext(function($ctx1) {
  1279. var $1,$2;
  1280. self["@browserModel"]=aBrowserModel;
  1281. $1=self;
  1282. _st($1)._observeSystem();
  1283. $2=_st($1)._observeBrowserModel();
  1284. return self}, function($ctx1) {$ctx1.fill(self,"browserModel:",{aBrowserModel:aBrowserModel},smalltalk.HLBrowserCodeWidget)})},
  1285. args: ["aBrowserModel"],
  1286. source: "browserModel: aBrowserModel\x0a\x09browserModel := aBrowserModel.\x0a\x09self \x0a\x09\x09observeSystem;\x0a\x09\x09observeBrowserModel",
  1287. messageSends: ["observeSystem", "observeBrowserModel"],
  1288. referencedClasses: []
  1289. }),
  1290. smalltalk.HLBrowserCodeWidget);
  1291. smalltalk.addMethod(
  1292. smalltalk.method({
  1293. selector: "observeBrowserModel",
  1294. category: 'actions',
  1295. fn: function (){
  1296. var self=this;
  1297. function $HLSaveSourceCode(){return smalltalk.HLSaveSourceCode||(typeof HLSaveSourceCode=="undefined"?nil:HLSaveSourceCode)}
  1298. function $HLShowInstanceToggled(){return smalltalk.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
  1299. function $HLSourceCodeSaved(){return smalltalk.HLSourceCodeSaved||(typeof HLSourceCodeSaved=="undefined"?nil:HLSourceCodeSaved)}
  1300. function $HLAboutToChange(){return smalltalk.HLAboutToChange||(typeof HLAboutToChange=="undefined"?nil:HLAboutToChange)}
  1301. function $HLParseErrorRaised(){return smalltalk.HLParseErrorRaised||(typeof HLParseErrorRaised=="undefined"?nil:HLParseErrorRaised)}
  1302. function $HLCompileErrorRaised(){return smalltalk.HLCompileErrorRaised||(typeof HLCompileErrorRaised=="undefined"?nil:HLCompileErrorRaised)}
  1303. function $HLUnknownVariableErrorRaised(){return smalltalk.HLUnknownVariableErrorRaised||(typeof HLUnknownVariableErrorRaised=="undefined"?nil:HLUnknownVariableErrorRaised)}
  1304. function $HLInstVarAdded(){return smalltalk.HLInstVarAdded||(typeof HLInstVarAdded=="undefined"?nil:HLInstVarAdded)}
  1305. function $HLMethodSelected(){return smalltalk.HLMethodSelected||(typeof HLMethodSelected=="undefined"?nil:HLMethodSelected)}
  1306. function $HLClassSelected(){return smalltalk.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
  1307. function $HLProtocolSelected(){return smalltalk.HLProtocolSelected||(typeof HLProtocolSelected=="undefined"?nil:HLProtocolSelected)}
  1308. function $HLSourceCodeFocusRequested(){return smalltalk.HLSourceCodeFocusRequested||(typeof HLSourceCodeFocusRequested=="undefined"?nil:HLSourceCodeFocusRequested)}
  1309. return smalltalk.withContext(function($ctx1) {
  1310. var $1,$2;
  1311. $1=_st(self._browserModel())._announcer();
  1312. _st($1)._on_send_to_($HLSaveSourceCode(),"onSaveIt",self);
  1313. _st($1)._on_send_to_($HLShowInstanceToggled(),"onShowInstanceToggled",self);
  1314. _st($1)._on_send_to_($HLSourceCodeSaved(),"onSourceCodeSaved",self);
  1315. _st($1)._on_send_to_($HLAboutToChange(),"onBrowserAboutToChange:",self);
  1316. _st($1)._on_send_to_($HLParseErrorRaised(),"onParseError:",self);
  1317. _st($1)._on_send_to_($HLCompileErrorRaised(),"onCompileError:",self);
  1318. _st($1)._on_send_to_($HLUnknownVariableErrorRaised(),"onUnknownVariableError:",self);
  1319. _st($1)._on_send_to_($HLInstVarAdded(),"onInstVarAdded",self);
  1320. _st($1)._on_send_to_($HLMethodSelected(),"onMethodSelected:",self);
  1321. _st($1)._on_send_to_($HLClassSelected(),"onClassSelected:",self);
  1322. _st($1)._on_send_to_($HLProtocolSelected(),"onProtocolSelected:",self);
  1323. $2=_st($1)._on_send_to_($HLSourceCodeFocusRequested(),"onSourceCodeFocusRequested",self);
  1324. return self}, function($ctx1) {$ctx1.fill(self,"observeBrowserModel",{},smalltalk.HLBrowserCodeWidget)})},
  1325. args: [],
  1326. 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",
  1327. messageSends: ["on:send:to:", "announcer", "browserModel"],
  1328. referencedClasses: ["HLSaveSourceCode", "HLShowInstanceToggled", "HLSourceCodeSaved", "HLAboutToChange", "HLParseErrorRaised", "HLCompileErrorRaised", "HLUnknownVariableErrorRaised", "HLInstVarAdded", "HLMethodSelected", "HLClassSelected", "HLProtocolSelected", "HLSourceCodeFocusRequested"]
  1329. }),
  1330. smalltalk.HLBrowserCodeWidget);
  1331. smalltalk.addMethod(
  1332. smalltalk.method({
  1333. selector: "observeSystem",
  1334. category: 'actions',
  1335. fn: function (){
  1336. var self=this;
  1337. function $MethodModified(){return smalltalk.MethodModified||(typeof MethodModified=="undefined"?nil:MethodModified)}
  1338. return smalltalk.withContext(function($ctx1) {
  1339. _st(_st(self._browserModel())._systemAnnouncer())._on_send_to_($MethodModified(),"onMethodModified:",self);
  1340. return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLBrowserCodeWidget)})},
  1341. args: [],
  1342. source: "observeSystem\x0a\x09self browserModel systemAnnouncer\x0a \x09on: MethodModified\x0a send: #onMethodModified:\x0a\x09\x09to: self",
  1343. messageSends: ["on:send:to:", "systemAnnouncer", "browserModel"],
  1344. referencedClasses: ["MethodModified"]
  1345. }),
  1346. smalltalk.HLBrowserCodeWidget);
  1347. smalltalk.addMethod(
  1348. smalltalk.method({
  1349. selector: "onBrowserAboutToChange:",
  1350. category: 'reactions',
  1351. fn: function (anAnnouncement){
  1352. var self=this;
  1353. var block;
  1354. function $HLChangeForbidden(){return smalltalk.HLChangeForbidden||(typeof HLChangeForbidden=="undefined"?nil:HLChangeForbidden)}
  1355. return smalltalk.withContext(function($ctx1) {
  1356. var $1;
  1357. block=_st(anAnnouncement)._actionBlock();
  1358. $1=self._hasModification();
  1359. if(smalltalk.assert($1)){
  1360. self._confirm_ifTrue_("Changes have not been saved. Do you want to discard these changes?",(function(){
  1361. return smalltalk.withContext(function($ctx2) {
  1362. self._methodContents_(self._contents());
  1363. return _st(block)._value();
  1364. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1365. _st($HLChangeForbidden())._signal();
  1366. };
  1367. return self}, function($ctx1) {$ctx1.fill(self,"onBrowserAboutToChange:",{anAnnouncement:anAnnouncement,block:block},smalltalk.HLBrowserCodeWidget)})},
  1368. args: ["anAnnouncement"],
  1369. 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 ]",
  1370. messageSends: ["actionBlock", "ifTrue:", "confirm:ifTrue:", "methodContents:", "contents", "value", "signal", "hasModification"],
  1371. referencedClasses: ["HLChangeForbidden"]
  1372. }),
  1373. smalltalk.HLBrowserCodeWidget);
  1374. smalltalk.addMethod(
  1375. smalltalk.method({
  1376. selector: "onClassSelected:",
  1377. category: 'reactions',
  1378. fn: function (anAnnouncement){
  1379. var self=this;
  1380. var class_;
  1381. return smalltalk.withContext(function($ctx1) {
  1382. var $1,$2;
  1383. class_=_st(anAnnouncement)._item();
  1384. $1=class_;
  1385. if(($receiver = $1) == nil || $receiver == undefined){
  1386. $2=self._contents_("");
  1387. return $2;
  1388. } else {
  1389. $1;
  1390. };
  1391. self._contents_(_st(class_)._definition());
  1392. return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{anAnnouncement:anAnnouncement,class_:class_},smalltalk.HLBrowserCodeWidget)})},
  1393. args: ["anAnnouncement"],
  1394. source: "onClassSelected: anAnnouncement\x0a\x09| class |\x0a\x09\x0a\x09class:= anAnnouncement item.\x0a\x09\x0a\x09class ifNil: [ ^ self contents: '' ].\x0a self contents: class definition",
  1395. messageSends: ["item", "ifNil:", "contents:", "definition"],
  1396. referencedClasses: []
  1397. }),
  1398. smalltalk.HLBrowserCodeWidget);
  1399. smalltalk.addMethod(
  1400. smalltalk.method({
  1401. selector: "onCompileError:",
  1402. category: 'reactions',
  1403. fn: function (anAnnouncement){
  1404. var self=this;
  1405. return smalltalk.withContext(function($ctx1) {
  1406. self._alert_(_st(_st(anAnnouncement)._error())._messageText());
  1407. return self}, function($ctx1) {$ctx1.fill(self,"onCompileError:",{anAnnouncement:anAnnouncement},smalltalk.HLBrowserCodeWidget)})},
  1408. args: ["anAnnouncement"],
  1409. source: "onCompileError: anAnnouncement\x0a\x09self alert: anAnnouncement error messageText",
  1410. messageSends: ["alert:", "messageText", "error"],
  1411. referencedClasses: []
  1412. }),
  1413. smalltalk.HLBrowserCodeWidget);
  1414. smalltalk.addMethod(
  1415. smalltalk.method({
  1416. selector: "onInstVarAdded",
  1417. category: 'reactions',
  1418. fn: function (){
  1419. var self=this;
  1420. return smalltalk.withContext(function($ctx1) {
  1421. _st(self._browserModel())._save_(self._contents());
  1422. return self}, function($ctx1) {$ctx1.fill(self,"onInstVarAdded",{},smalltalk.HLBrowserCodeWidget)})},
  1423. args: [],
  1424. source: "onInstVarAdded\x0a\x09self browserModel save: self contents",
  1425. messageSends: ["save:", "contents", "browserModel"],
  1426. referencedClasses: []
  1427. }),
  1428. smalltalk.HLBrowserCodeWidget);
  1429. smalltalk.addMethod(
  1430. smalltalk.method({
  1431. selector: "onMethodModified:",
  1432. category: 'reactions',
  1433. fn: function (anAnnouncement){
  1434. var self=this;
  1435. var method;
  1436. return smalltalk.withContext(function($ctx1) {
  1437. var $1,$2,$3,$4,$5,$6;
  1438. method=_st(anAnnouncement)._method();
  1439. $1=_st(_st(self._browserModel())._selectedClass()).__eq(_st(method)._methodClass());
  1440. if(! smalltalk.assert($1)){
  1441. $2=self;
  1442. return $2;
  1443. };
  1444. $3=_st(self._browserModel())._selectedMethod();
  1445. if(($receiver = $3) == nil || $receiver == undefined){
  1446. $4=self;
  1447. return $4;
  1448. } else {
  1449. $3;
  1450. };
  1451. $5=_st(_st(_st(self._browserModel())._selectedMethod())._selector()).__eq(_st(method)._selector());
  1452. if(! smalltalk.assert($5)){
  1453. $6=self;
  1454. return $6;
  1455. };
  1456. self._refresh();
  1457. return self}, function($ctx1) {$ctx1.fill(self,"onMethodModified:",{anAnnouncement:anAnnouncement,method:method},smalltalk.HLBrowserCodeWidget)})},
  1458. args: ["anAnnouncement"],
  1459. 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",
  1460. messageSends: ["method", "ifFalse:", "=", "methodClass", "selectedClass", "browserModel", "ifNil:", "selectedMethod", "selector", "refresh"],
  1461. referencedClasses: []
  1462. }),
  1463. smalltalk.HLBrowserCodeWidget);
  1464. smalltalk.addMethod(
  1465. smalltalk.method({
  1466. selector: "onMethodSelected:",
  1467. category: 'reactions',
  1468. fn: function (anAnnouncement){
  1469. var self=this;
  1470. var method;
  1471. return smalltalk.withContext(function($ctx1) {
  1472. var $1,$2;
  1473. method=_st(anAnnouncement)._item();
  1474. $1=method;
  1475. if(($receiver = $1) == nil || $receiver == undefined){
  1476. $2=self._contents_("");
  1477. return $2;
  1478. } else {
  1479. $1;
  1480. };
  1481. self._contents_(_st(method)._source());
  1482. return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{anAnnouncement:anAnnouncement,method:method},smalltalk.HLBrowserCodeWidget)})},
  1483. args: ["anAnnouncement"],
  1484. source: "onMethodSelected: anAnnouncement\x0a\x09| method |\x0a\x09\x0a\x09method := anAnnouncement item.\x0a\x09\x0a\x09method ifNil: [ ^ self contents: '' ].\x0a self contents: method source",
  1485. messageSends: ["item", "ifNil:", "contents:", "source"],
  1486. referencedClasses: []
  1487. }),
  1488. smalltalk.HLBrowserCodeWidget);
  1489. smalltalk.addMethod(
  1490. smalltalk.method({
  1491. selector: "onParseError:",
  1492. category: 'reactions',
  1493. fn: function (anAnnouncement){
  1494. var self=this;
  1495. var lineIndex,newContents;
  1496. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  1497. return smalltalk.withContext(function($ctx1) {
  1498. var $1,$2,$3;
  1499. lineIndex=(1);
  1500. self._contents_(_st($String())._streamContents_((function(stream){
  1501. return smalltalk.withContext(function($ctx2) {
  1502. return _st(self._contents())._linesDo_((function(each){
  1503. return smalltalk.withContext(function($ctx3) {
  1504. $1=_st(lineIndex).__eq(_st(anAnnouncement)._line());
  1505. if(smalltalk.assert($1)){
  1506. $2=stream;
  1507. _st($2)._nextPutAll_(_st(each)._copyFrom_to_((1),_st(anAnnouncement)._column()));
  1508. _st($2)._nextPutAll_("<- ");
  1509. _st($2)._nextPutAll_(_st(anAnnouncement)._message());
  1510. _st($2)._nextPutAll_(" ");
  1511. $3=_st($2)._nextPutAll_(_st(each)._copyFrom_to_(_st(_st(anAnnouncement)._column()).__plus((1)),_st(each)._size()));
  1512. $3;
  1513. } else {
  1514. _st(stream)._nextPutAll_(each);
  1515. };
  1516. _st(stream)._nextPutAll_(_st($String())._cr());
  1517. lineIndex=_st(lineIndex).__plus((1));
  1518. return lineIndex;
  1519. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2)})}));
  1520. }, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1)})})));
  1521. return self}, function($ctx1) {$ctx1.fill(self,"onParseError:",{anAnnouncement:anAnnouncement,lineIndex:lineIndex,newContents:newContents},smalltalk.HLBrowserCodeWidget)})},
  1522. args: ["anAnnouncement"],
  1523. 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 ] ])",
  1524. messageSends: ["contents:", "streamContents:", "linesDo:", "ifTrue:ifFalse:", "nextPutAll:", "copyFrom:to:", "column", "message", "+", "size", "=", "line", "cr", "contents"],
  1525. referencedClasses: ["String"]
  1526. }),
  1527. smalltalk.HLBrowserCodeWidget);
  1528. smalltalk.addMethod(
  1529. smalltalk.method({
  1530. selector: "onProtocolSelected:",
  1531. category: 'reactions',
  1532. fn: function (anAnnouncement){
  1533. var self=this;
  1534. return smalltalk.withContext(function($ctx1) {
  1535. var $1,$2;
  1536. $1=_st(self._browserModel())._selectedClass();
  1537. if(($receiver = $1) == nil || $receiver == undefined){
  1538. $2=self._contents_("");
  1539. return $2;
  1540. } else {
  1541. $1;
  1542. };
  1543. self._contents_(_st(_st(self._browserModel())._selectedClass())._definition());
  1544. return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{anAnnouncement:anAnnouncement},smalltalk.HLBrowserCodeWidget)})},
  1545. args: ["anAnnouncement"],
  1546. source: "onProtocolSelected: anAnnouncement\x0a\x09self browserModel selectedClass ifNil: [ ^ self contents: '' ].\x0a self contents: self browserModel selectedClass definition",
  1547. messageSends: ["ifNil:", "contents:", "selectedClass", "browserModel", "definition"],
  1548. referencedClasses: []
  1549. }),
  1550. smalltalk.HLBrowserCodeWidget);
  1551. smalltalk.addMethod(
  1552. smalltalk.method({
  1553. selector: "onSaveIt",
  1554. category: 'reactions',
  1555. fn: function (){
  1556. var self=this;
  1557. return smalltalk.withContext(function($ctx1) {
  1558. _st(self._browserModel())._save_(self._contents());
  1559. return self}, function($ctx1) {$ctx1.fill(self,"onSaveIt",{},smalltalk.HLBrowserCodeWidget)})},
  1560. args: [],
  1561. source: "onSaveIt\x0a\x09self browserModel save: self contents",
  1562. messageSends: ["save:", "contents", "browserModel"],
  1563. referencedClasses: []
  1564. }),
  1565. smalltalk.HLBrowserCodeWidget);
  1566. smalltalk.addMethod(
  1567. smalltalk.method({
  1568. selector: "onShowInstanceToggled",
  1569. category: 'reactions',
  1570. fn: function (){
  1571. var self=this;
  1572. return smalltalk.withContext(function($ctx1) {
  1573. var $1,$2;
  1574. $1=_st(self._browserModel())._selectedClass();
  1575. if(($receiver = $1) == nil || $receiver == undefined){
  1576. $2=self._contents_("");
  1577. return $2;
  1578. } else {
  1579. $1;
  1580. };
  1581. self._contents_(_st(_st(self._browserModel())._selectedClass())._definition());
  1582. return self}, function($ctx1) {$ctx1.fill(self,"onShowInstanceToggled",{},smalltalk.HLBrowserCodeWidget)})},
  1583. args: [],
  1584. source: "onShowInstanceToggled\x0a\x09self browserModel selectedClass ifNil: [ ^ self contents: '' ].\x0a \x0a self contents: self browserModel selectedClass definition",
  1585. messageSends: ["ifNil:", "contents:", "selectedClass", "browserModel", "definition"],
  1586. referencedClasses: []
  1587. }),
  1588. smalltalk.HLBrowserCodeWidget);
  1589. smalltalk.addMethod(
  1590. smalltalk.method({
  1591. selector: "onSourceCodeFocusRequested",
  1592. category: 'reactions',
  1593. fn: function (){
  1594. var self=this;
  1595. return smalltalk.withContext(function($ctx1) {
  1596. self._focus();
  1597. return self}, function($ctx1) {$ctx1.fill(self,"onSourceCodeFocusRequested",{},smalltalk.HLBrowserCodeWidget)})},
  1598. args: [],
  1599. source: "onSourceCodeFocusRequested\x0a\x09self focus",
  1600. messageSends: ["focus"],
  1601. referencedClasses: []
  1602. }),
  1603. smalltalk.HLBrowserCodeWidget);
  1604. smalltalk.addMethod(
  1605. smalltalk.method({
  1606. selector: "onSourceCodeSaved",
  1607. category: 'reactions',
  1608. fn: function (){
  1609. var self=this;
  1610. return smalltalk.withContext(function($ctx1) {
  1611. self._methodContents_(self._contents());
  1612. self._updateState();
  1613. return self}, function($ctx1) {$ctx1.fill(self,"onSourceCodeSaved",{},smalltalk.HLBrowserCodeWidget)})},
  1614. args: [],
  1615. source: "onSourceCodeSaved\x0a\x09self methodContents: self contents.\x0a\x09self updateState",
  1616. messageSends: ["methodContents:", "contents", "updateState"],
  1617. referencedClasses: []
  1618. }),
  1619. smalltalk.HLBrowserCodeWidget);
  1620. smalltalk.addMethod(
  1621. smalltalk.method({
  1622. selector: "onUnknownVariableError:",
  1623. category: 'reactions',
  1624. fn: function (anAnnouncement){
  1625. var self=this;
  1626. var error;
  1627. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  1628. return smalltalk.withContext(function($ctx1) {
  1629. var $1,$2;
  1630. error=_st(anAnnouncement)._error();
  1631. self._confirm_ifTrue_(_st($String())._streamContents_((function(stream){
  1632. return smalltalk.withContext(function($ctx2) {
  1633. $1=stream;
  1634. _st($1)._nextPutAll_(_st(error)._messageText());
  1635. _st($1)._nextPutAll_(_st($String())._cr());
  1636. $2=_st($1)._nextPutAll_("Would you like to define an instance variable?");
  1637. return $2;
  1638. }, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1)})})),(function(){
  1639. return smalltalk.withContext(function($ctx2) {
  1640. return _st(self._browserModel())._addInstVarNamed_(_st(error)._variableName());
  1641. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1642. return self}, function($ctx1) {$ctx1.fill(self,"onUnknownVariableError:",{anAnnouncement:anAnnouncement,error:error},smalltalk.HLBrowserCodeWidget)})},
  1643. args: ["anAnnouncement"],
  1644. 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 ]",
  1645. messageSends: ["error", "confirm:ifTrue:", "streamContents:", "nextPutAll:", "messageText", "cr", "addInstVarNamed:", "variableName", "browserModel"],
  1646. referencedClasses: ["String"]
  1647. }),
  1648. smalltalk.HLBrowserCodeWidget);
  1649. smalltalk.addMethod(
  1650. smalltalk.method({
  1651. selector: "refresh",
  1652. category: 'actions',
  1653. fn: function (){
  1654. var self=this;
  1655. return smalltalk.withContext(function($ctx1) {
  1656. var $1,$2,$3,$4;
  1657. $1=self._hasModification();
  1658. if(smalltalk.assert($1)){
  1659. $2=self;
  1660. return $2;
  1661. };
  1662. $3=self._hasFocus();
  1663. if(smalltalk.assert($3)){
  1664. $4=self;
  1665. return $4;
  1666. };
  1667. self._contents_(_st(_st(self._browserModel())._selectedMethod())._source());
  1668. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLBrowserCodeWidget)})},
  1669. args: [],
  1670. source: "refresh\x0a\x09self hasModification ifTrue: [ ^ self ].\x0a self hasFocus ifTrue: [ ^ self ].\x0a\x0a\x09self contents: self browserModel selectedMethod source",
  1671. messageSends: ["ifTrue:", "hasModification", "hasFocus", "contents:", "source", "selectedMethod", "browserModel"],
  1672. referencedClasses: []
  1673. }),
  1674. smalltalk.HLBrowserCodeWidget);
  1675. smalltalk.addMethod(
  1676. smalltalk.method({
  1677. selector: "renderButtonsOn:",
  1678. category: 'actions',
  1679. fn: function (html){
  1680. var self=this;
  1681. return smalltalk.withContext(function($ctx1) {
  1682. var $1,$2;
  1683. $1=_st(html)._button();
  1684. _st($1)._class_("button");
  1685. _st($1)._with_("SaveIt");
  1686. $2=_st($1)._onClick_((function(){
  1687. return smalltalk.withContext(function($ctx2) {
  1688. return self._saveIt();
  1689. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1690. smalltalk.HLNavigationCodeWidget.fn.prototype._renderButtonsOn_.apply(_st(self), [html]);
  1691. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLBrowserCodeWidget)})},
  1692. args: ["html"],
  1693. source: "renderButtonsOn: html\x0a\x09html button \x0a\x09\x09class: 'button';\x0a\x09\x09with: 'SaveIt';\x0a\x09\x09onClick: [ self saveIt ].\x0a\x09super renderButtonsOn: html",
  1694. messageSends: ["class:", "button", "with:", "onClick:", "saveIt", "renderButtonsOn:"],
  1695. referencedClasses: []
  1696. }),
  1697. smalltalk.HLBrowserCodeWidget);
  1698. smalltalk.addMethod(
  1699. smalltalk.method({
  1700. selector: "saveIt",
  1701. category: 'actions',
  1702. fn: function (){
  1703. var self=this;
  1704. return smalltalk.withContext(function($ctx1) {
  1705. _st(self._browserModel())._saveSourceCode();
  1706. return self}, function($ctx1) {$ctx1.fill(self,"saveIt",{},smalltalk.HLBrowserCodeWidget)})},
  1707. args: [],
  1708. source: "saveIt\x0a\x09self browserModel saveSourceCode",
  1709. messageSends: ["saveSourceCode", "browserModel"],
  1710. referencedClasses: []
  1711. }),
  1712. smalltalk.HLBrowserCodeWidget);
  1713. smalltalk.addMethod(
  1714. smalltalk.method({
  1715. selector: "unregister",
  1716. category: 'actions',
  1717. fn: function (){
  1718. var self=this;
  1719. return smalltalk.withContext(function($ctx1) {
  1720. smalltalk.HLNavigationCodeWidget.fn.prototype._unregsiter.apply(_st(self), []);
  1721. _st(_st(self._browserModel())._announcer())._unsubscribe_(self);
  1722. _st(_st(self._browserModel())._systemAnnouncer())._unsubscribe_(self);
  1723. return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLBrowserCodeWidget)})},
  1724. args: [],
  1725. source: "unregister\x0a\x09super unregsiter.\x0a\x09\x0a\x09self browserModel announcer unsubscribe: self.\x0a\x09self browserModel systemAnnouncer unsubscribe: self",
  1726. messageSends: ["unregsiter", "unsubscribe:", "announcer", "browserModel", "systemAnnouncer"],
  1727. referencedClasses: []
  1728. }),
  1729. smalltalk.HLBrowserCodeWidget);
  1730. smalltalk.addMethod(
  1731. smalltalk.method({
  1732. selector: "canBeOpenAsTab",
  1733. category: 'testing',
  1734. fn: function (){
  1735. var self=this;
  1736. return smalltalk.withContext(function($ctx1) {
  1737. return false;
  1738. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLBrowserCodeWidget.klass)})},
  1739. args: [],
  1740. source: "canBeOpenAsTab\x0a\x09^ false",
  1741. messageSends: [],
  1742. referencedClasses: []
  1743. }),
  1744. smalltalk.HLBrowserCodeWidget.klass);
  1745. smalltalk.addMethod(
  1746. smalltalk.method({
  1747. selector: "on:",
  1748. category: 'instance creation',
  1749. fn: function (aBrowserModel){
  1750. var self=this;
  1751. return smalltalk.withContext(function($ctx1) {
  1752. var $2,$3,$1;
  1753. $2=self._new();
  1754. _st($2)._browserModel_(aBrowserModel);
  1755. $3=_st($2)._yourself();
  1756. $1=$3;
  1757. return $1;
  1758. }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowserModel:aBrowserModel},smalltalk.HLBrowserCodeWidget.klass)})},
  1759. args: ["aBrowserModel"],
  1760. source: "on: aBrowserModel\x0a\x09^ self new\x0a\x09\x09browserModel: aBrowserModel;\x0a\x09\x09yourself",
  1761. messageSends: ["browserModel:", "new", "yourself"],
  1762. referencedClasses: []
  1763. }),
  1764. smalltalk.HLBrowserCodeWidget.klass);
  1765. smalltalk.addClass('HLWorkspace', smalltalk.HLWidget, ['codeWidget', 'transcript'], 'Helios-Workspace');
  1766. smalltalk.addMethod(
  1767. smalltalk.method({
  1768. selector: "canHaveFocus",
  1769. category: 'testing',
  1770. fn: function (){
  1771. var self=this;
  1772. return smalltalk.withContext(function($ctx1) {
  1773. return true;
  1774. }, function($ctx1) {$ctx1.fill(self,"canHaveFocus",{},smalltalk.HLWorkspace)})},
  1775. args: [],
  1776. source: "canHaveFocus\x0a\x09^ true",
  1777. messageSends: [],
  1778. referencedClasses: []
  1779. }),
  1780. smalltalk.HLWorkspace);
  1781. smalltalk.addMethod(
  1782. smalltalk.method({
  1783. selector: "codeWidget",
  1784. category: 'accessing',
  1785. fn: function (){
  1786. var self=this;
  1787. function $HLCodeWidget(){return smalltalk.HLCodeWidget||(typeof HLCodeWidget=="undefined"?nil:HLCodeWidget)}
  1788. return smalltalk.withContext(function($ctx1) {
  1789. var $2,$1;
  1790. $2=self["@codeWidget"];
  1791. if(($receiver = $2) == nil || $receiver == undefined){
  1792. self["@codeWidget"]=_st($HLCodeWidget())._new();
  1793. $1=self["@codeWidget"];
  1794. } else {
  1795. $1=$2;
  1796. };
  1797. return $1;
  1798. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{},smalltalk.HLWorkspace)})},
  1799. args: [],
  1800. source: "codeWidget\x0a\x09^ codeWidget ifNil: [ codeWidget := HLCodeWidget new ]",
  1801. messageSends: ["ifNil:", "new"],
  1802. referencedClasses: ["HLCodeWidget"]
  1803. }),
  1804. smalltalk.HLWorkspace);
  1805. smalltalk.addMethod(
  1806. smalltalk.method({
  1807. selector: "focus",
  1808. category: 'actions',
  1809. fn: function (){
  1810. var self=this;
  1811. return smalltalk.withContext(function($ctx1) {
  1812. var $1;
  1813. $1=_st(self._codeWidget())._focus();
  1814. return $1;
  1815. }, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLWorkspace)})},
  1816. args: [],
  1817. source: "focus\x0a\x09^ self codeWidget focus",
  1818. messageSends: ["focus", "codeWidget"],
  1819. referencedClasses: []
  1820. }),
  1821. smalltalk.HLWorkspace);
  1822. smalltalk.addMethod(
  1823. smalltalk.method({
  1824. selector: "renderContentOn:",
  1825. category: 'rendering',
  1826. fn: function (html){
  1827. var self=this;
  1828. function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  1829. function $HLContainer(){return smalltalk.HLContainer||(typeof HLContainer=="undefined"?nil:HLContainer)}
  1830. return smalltalk.withContext(function($ctx1) {
  1831. _st(html)._with_(_st($HLContainer())._with_(_st($HLHorizontalSplitter())._with_with_(self._codeWidget(),(function(canvas){
  1832. return smalltalk.withContext(function($ctx2) {
  1833. return self._renderTranscriptOn_(canvas);
  1834. }, function($ctx2) {$ctx2.fillBlock({canvas:canvas},$ctx1)})}))));
  1835. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLWorkspace)})},
  1836. args: ["html"],
  1837. source: "renderContentOn: html\x0a\x09html with: (HLContainer with: (HLHorizontalSplitter\x0a\x09\x09with: self codeWidget\x0a\x09\x09with: [ :canvas | self renderTranscriptOn: canvas ]))",
  1838. messageSends: ["with:", "with:with:", "codeWidget", "renderTranscriptOn:"],
  1839. referencedClasses: ["HLHorizontalSplitter", "HLContainer"]
  1840. }),
  1841. smalltalk.HLWorkspace);
  1842. smalltalk.addMethod(
  1843. smalltalk.method({
  1844. selector: "renderTranscriptOn:",
  1845. category: 'rendering',
  1846. fn: function (html){
  1847. var self=this;
  1848. return smalltalk.withContext(function($ctx1) {
  1849. var $1,$3,$4,$2;
  1850. $1=_st(html)._div();
  1851. _st($1)._class_("transcript-container");
  1852. $2=_st($1)._with_((function(){
  1853. return smalltalk.withContext(function($ctx2) {
  1854. $3=_st(html)._div();
  1855. _st($3)._class_("list-label");
  1856. $4=_st($3)._with_("Transcript");
  1857. $4;
  1858. return _st(self._transcript())._renderOn_(html);
  1859. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1860. return self}, function($ctx1) {$ctx1.fill(self,"renderTranscriptOn:",{html:html},smalltalk.HLWorkspace)})},
  1861. args: ["html"],
  1862. 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 ]",
  1863. messageSends: ["class:", "div", "with:", "renderOn:", "transcript"],
  1864. referencedClasses: []
  1865. }),
  1866. smalltalk.HLWorkspace);
  1867. smalltalk.addMethod(
  1868. smalltalk.method({
  1869. selector: "transcript",
  1870. category: 'accessing',
  1871. fn: function (){
  1872. var self=this;
  1873. function $HLTranscript(){return smalltalk.HLTranscript||(typeof HLTranscript=="undefined"?nil:HLTranscript)}
  1874. return smalltalk.withContext(function($ctx1) {
  1875. var $2,$1;
  1876. $2=self["@transcript"];
  1877. if(($receiver = $2) == nil || $receiver == undefined){
  1878. self["@transcript"]=_st($HLTranscript())._new();
  1879. $1=self["@transcript"];
  1880. } else {
  1881. $1=$2;
  1882. };
  1883. return $1;
  1884. }, function($ctx1) {$ctx1.fill(self,"transcript",{},smalltalk.HLWorkspace)})},
  1885. args: [],
  1886. source: "transcript\x0a\x09^ transcript ifNil: [ transcript := HLTranscript new ]",
  1887. messageSends: ["ifNil:", "new"],
  1888. referencedClasses: ["HLTranscript"]
  1889. }),
  1890. smalltalk.HLWorkspace);
  1891. smalltalk.addMethod(
  1892. smalltalk.method({
  1893. selector: "unregister",
  1894. category: 'actions',
  1895. fn: function (){
  1896. var self=this;
  1897. return smalltalk.withContext(function($ctx1) {
  1898. smalltalk.HLWidget.fn.prototype._unregister.apply(_st(self), []);
  1899. _st(self._transcript())._unregister();
  1900. return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLWorkspace)})},
  1901. args: [],
  1902. source: "unregister\x0a\x09super unregister.\x0a\x09self transcript unregister",
  1903. messageSends: ["unregister", "transcript"],
  1904. referencedClasses: []
  1905. }),
  1906. smalltalk.HLWorkspace);
  1907. smalltalk.addMethod(
  1908. smalltalk.method({
  1909. selector: "canBeOpenAsTab",
  1910. category: 'testing',
  1911. fn: function (){
  1912. var self=this;
  1913. return smalltalk.withContext(function($ctx1) {
  1914. return true;
  1915. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLWorkspace.klass)})},
  1916. args: [],
  1917. source: "canBeOpenAsTab\x0a\x09^ true",
  1918. messageSends: [],
  1919. referencedClasses: []
  1920. }),
  1921. smalltalk.HLWorkspace.klass);
  1922. smalltalk.addMethod(
  1923. smalltalk.method({
  1924. selector: "tabClass",
  1925. category: 'accessing',
  1926. fn: function (){
  1927. var self=this;
  1928. return smalltalk.withContext(function($ctx1) {
  1929. return "workspace";
  1930. }, function($ctx1) {$ctx1.fill(self,"tabClass",{},smalltalk.HLWorkspace.klass)})},
  1931. args: [],
  1932. source: "tabClass\x0a\x09^ 'workspace'",
  1933. messageSends: [],
  1934. referencedClasses: []
  1935. }),
  1936. smalltalk.HLWorkspace.klass);
  1937. smalltalk.addMethod(
  1938. smalltalk.method({
  1939. selector: "tabLabel",
  1940. category: 'accessing',
  1941. fn: function (){
  1942. var self=this;
  1943. return smalltalk.withContext(function($ctx1) {
  1944. return "Workspace";
  1945. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLWorkspace.klass)})},
  1946. args: [],
  1947. source: "tabLabel\x0a\x09^ 'Workspace'",
  1948. messageSends: [],
  1949. referencedClasses: []
  1950. }),
  1951. smalltalk.HLWorkspace.klass);
  1952. smalltalk.addMethod(
  1953. smalltalk.method({
  1954. selector: "tabPriority",
  1955. category: 'accessing',
  1956. fn: function (){
  1957. var self=this;
  1958. return smalltalk.withContext(function($ctx1) {
  1959. return (10);
  1960. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLWorkspace.klass)})},
  1961. args: [],
  1962. source: "tabPriority\x0a\x09^ 10",
  1963. messageSends: [],
  1964. referencedClasses: []
  1965. }),
  1966. smalltalk.HLWorkspace.klass);