Helios-Workspace.js 82 KB

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