Helios-Workspace.js 81 KB

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