Helios-Workspace.js 123 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452
  1. define("helios/Helios-Workspace", ["amber/boot", "amber_core/Kernel-Objects", "helios/Helios-Core"], function($boot){"use strict";
  2. var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
  3. $core.addPackage('Helios-Workspace');
  4. $core.packages["Helios-Workspace"].innerEval = function (expr) { return eval(expr); };
  5. $core.packages["Helios-Workspace"].transport = {"type":"amd","amdNamespace":"helios"};
  6. $core.addClass('HLCodeModel', $globals.Object, ['announcer', 'environment', 'receiver'], 'Helios-Workspace');
  7. $core.addMethod(
  8. $core.method({
  9. selector: "announcer",
  10. protocol: 'accessing',
  11. fn: function (){
  12. var self=this;
  13. function $Announcer(){return $globals.Announcer||(typeof Announcer=="undefined"?nil:Announcer)}
  14. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  15. return $core.withContext(function($ctx1) {
  16. //>>excludeEnd("ctx");
  17. var $1,$receiver;
  18. $1=self["@announcer"];
  19. if(($receiver = $1) == null || $receiver.isNil){
  20. self["@announcer"]=$recv($Announcer())._new();
  21. return self["@announcer"];
  22. } else {
  23. return $1;
  24. };
  25. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  26. }, function($ctx1) {$ctx1.fill(self,"announcer",{},$globals.HLCodeModel)});
  27. //>>excludeEnd("ctx");
  28. },
  29. //>>excludeStart("ide", pragmas.excludeIdeData);
  30. args: [],
  31. source: "announcer\x0a\x09^ announcer ifNil: [ announcer := Announcer new ]",
  32. referencedClasses: ["Announcer"],
  33. //>>excludeEnd("ide");
  34. messageSends: ["ifNil:", "new"]
  35. }),
  36. $globals.HLCodeModel);
  37. $core.addMethod(
  38. $core.method({
  39. selector: "browse:",
  40. protocol: 'actions',
  41. fn: function (anObject){
  42. var self=this;
  43. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  44. return $core.withContext(function($ctx1) {
  45. //>>excludeEnd("ctx");
  46. $recv(anObject)._browse();
  47. return self;
  48. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  49. }, function($ctx1) {$ctx1.fill(self,"browse:",{anObject:anObject},$globals.HLCodeModel)});
  50. //>>excludeEnd("ctx");
  51. },
  52. //>>excludeStart("ide", pragmas.excludeIdeData);
  53. args: ["anObject"],
  54. source: "browse: anObject\x0a\x09anObject browse",
  55. referencedClasses: [],
  56. //>>excludeEnd("ide");
  57. messageSends: ["browse"]
  58. }),
  59. $globals.HLCodeModel);
  60. $core.addMethod(
  61. $core.method({
  62. selector: "defaultReceiver",
  63. protocol: 'defaults',
  64. fn: function (){
  65. var self=this;
  66. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  67. return $core.withContext(function($ctx1) {
  68. //>>excludeEnd("ctx");
  69. return $recv(self._environment())._doItReceiver();
  70. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  71. }, function($ctx1) {$ctx1.fill(self,"defaultReceiver",{},$globals.HLCodeModel)});
  72. //>>excludeEnd("ctx");
  73. },
  74. //>>excludeStart("ide", pragmas.excludeIdeData);
  75. args: [],
  76. source: "defaultReceiver\x0a\x09^ self environment doItReceiver",
  77. referencedClasses: [],
  78. //>>excludeEnd("ide");
  79. messageSends: ["doItReceiver", "environment"]
  80. }),
  81. $globals.HLCodeModel);
  82. $core.addMethod(
  83. $core.method({
  84. selector: "doIt:",
  85. protocol: 'actions',
  86. fn: function (aString){
  87. var self=this;
  88. function $ErrorHandler(){return $globals.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
  89. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  90. return $core.withContext(function($ctx1) {
  91. //>>excludeEnd("ctx");
  92. return $recv((function(){
  93. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  94. return $core.withContext(function($ctx2) {
  95. //>>excludeEnd("ctx");
  96. return $recv(self._environment())._evaluate_for_(aString,self._receiver());
  97. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  98. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  99. //>>excludeEnd("ctx");
  100. }))._tryCatch_((function(e){
  101. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  102. return $core.withContext(function($ctx2) {
  103. //>>excludeEnd("ctx");
  104. $recv($ErrorHandler())._handleError_(e);
  105. return nil;
  106. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  107. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,2)});
  108. //>>excludeEnd("ctx");
  109. }));
  110. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  111. }, function($ctx1) {$ctx1.fill(self,"doIt:",{aString:aString},$globals.HLCodeModel)});
  112. //>>excludeEnd("ctx");
  113. },
  114. //>>excludeStart("ide", pragmas.excludeIdeData);
  115. args: ["aString"],
  116. source: "doIt: aString\x0a\x09\x22Evaluate aString in the receiver's `environment`.\x0a\x09\x0a\x09Note: Catch any error and handle it manually, bypassing\x0a\x09boot.js behavior to avoid the browser default action on\x0a\x09ctrl+d/ctrl+p.\x0a\x09\x0a\x09See https://github.com/amber-smalltalk/amber/issues/882\x22\x0a\x0a\x09^ [ self environment evaluate: aString for: self receiver ]\x0a\x09\x09tryCatch: [ :e | \x0a\x09\x09\x09ErrorHandler handleError: e.\x0a\x09\x09\x09nil ]",
  117. referencedClasses: ["ErrorHandler"],
  118. //>>excludeEnd("ide");
  119. messageSends: ["tryCatch:", "evaluate:for:", "environment", "receiver", "handleError:"]
  120. }),
  121. $globals.HLCodeModel);
  122. $core.addMethod(
  123. $core.method({
  124. selector: "environment",
  125. protocol: 'accessing',
  126. fn: function (){
  127. var self=this;
  128. function $HLManager(){return $globals.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  129. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  130. return $core.withContext(function($ctx1) {
  131. //>>excludeEnd("ctx");
  132. var $1,$receiver;
  133. $1=self["@environment"];
  134. if(($receiver = $1) == null || $receiver.isNil){
  135. return $recv($recv($HLManager())._current())._environment();
  136. } else {
  137. return $1;
  138. };
  139. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  140. }, function($ctx1) {$ctx1.fill(self,"environment",{},$globals.HLCodeModel)});
  141. //>>excludeEnd("ctx");
  142. },
  143. //>>excludeStart("ide", pragmas.excludeIdeData);
  144. args: [],
  145. source: "environment\x0a\x09^ environment ifNil: [ HLManager current environment ]",
  146. referencedClasses: ["HLManager"],
  147. //>>excludeEnd("ide");
  148. messageSends: ["ifNil:", "environment", "current"]
  149. }),
  150. $globals.HLCodeModel);
  151. $core.addMethod(
  152. $core.method({
  153. selector: "environment:",
  154. protocol: 'accessing',
  155. fn: function (anEnvironment){
  156. var self=this;
  157. self["@environment"]=anEnvironment;
  158. return self;
  159. },
  160. //>>excludeStart("ide", pragmas.excludeIdeData);
  161. args: ["anEnvironment"],
  162. source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
  163. referencedClasses: [],
  164. //>>excludeEnd("ide");
  165. messageSends: []
  166. }),
  167. $globals.HLCodeModel);
  168. $core.addMethod(
  169. $core.method({
  170. selector: "inspect:",
  171. protocol: 'actions',
  172. fn: function (anObject){
  173. var self=this;
  174. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  175. return $core.withContext(function($ctx1) {
  176. //>>excludeEnd("ctx");
  177. $recv(self._environment())._inspect_(anObject);
  178. return self;
  179. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  180. }, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},$globals.HLCodeModel)});
  181. //>>excludeEnd("ctx");
  182. },
  183. //>>excludeStart("ide", pragmas.excludeIdeData);
  184. args: ["anObject"],
  185. source: "inspect: anObject\x0a\x09self environment inspect: anObject",
  186. referencedClasses: [],
  187. //>>excludeEnd("ide");
  188. messageSends: ["inspect:", "environment"]
  189. }),
  190. $globals.HLCodeModel);
  191. $core.addMethod(
  192. $core.method({
  193. selector: "receiver",
  194. protocol: 'accessing',
  195. fn: function (){
  196. var self=this;
  197. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  198. return $core.withContext(function($ctx1) {
  199. //>>excludeEnd("ctx");
  200. var $1,$receiver;
  201. $1=self["@receiver"];
  202. if(($receiver = $1) == null || $receiver.isNil){
  203. self["@receiver"]=self._defaultReceiver();
  204. return self["@receiver"];
  205. } else {
  206. return $1;
  207. };
  208. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  209. }, function($ctx1) {$ctx1.fill(self,"receiver",{},$globals.HLCodeModel)});
  210. //>>excludeEnd("ctx");
  211. },
  212. //>>excludeStart("ide", pragmas.excludeIdeData);
  213. args: [],
  214. source: "receiver\x0a\x09^ receiver ifNil: [ receiver := self defaultReceiver ]",
  215. referencedClasses: [],
  216. //>>excludeEnd("ide");
  217. messageSends: ["ifNil:", "defaultReceiver"]
  218. }),
  219. $globals.HLCodeModel);
  220. $core.addMethod(
  221. $core.method({
  222. selector: "receiver:",
  223. protocol: 'accessing',
  224. fn: function (anObject){
  225. var self=this;
  226. self["@receiver"]=anObject;
  227. return self;
  228. },
  229. //>>excludeStart("ide", pragmas.excludeIdeData);
  230. args: ["anObject"],
  231. source: "receiver: anObject\x0a\x09receiver := anObject",
  232. referencedClasses: [],
  233. //>>excludeEnd("ide");
  234. messageSends: []
  235. }),
  236. $globals.HLCodeModel);
  237. $core.addMethod(
  238. $core.method({
  239. selector: "on:",
  240. protocol: 'actions',
  241. fn: function (anEnvironment){
  242. var self=this;
  243. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  244. return $core.withContext(function($ctx1) {
  245. //>>excludeEnd("ctx");
  246. var $1;
  247. $1=self._new();
  248. $recv($1)._environment_(anEnvironment);
  249. return $recv($1)._yourself();
  250. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  251. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment},$globals.HLCodeModel.klass)});
  252. //>>excludeEnd("ctx");
  253. },
  254. //>>excludeStart("ide", pragmas.excludeIdeData);
  255. args: ["anEnvironment"],
  256. source: "on: anEnvironment\x0a\x0a\x09^ self new\x0a \x09environment: anEnvironment;\x0a yourself",
  257. referencedClasses: [],
  258. //>>excludeEnd("ide");
  259. messageSends: ["environment:", "new", "yourself"]
  260. }),
  261. $globals.HLCodeModel.klass);
  262. $core.addClass('HLCodeWidget', $globals.HLWidget, ['model', 'wrapper', 'code', 'editor', 'state'], 'Helios-Workspace');
  263. $core.addMethod(
  264. $core.method({
  265. selector: "announcer",
  266. protocol: 'accessing',
  267. fn: function (){
  268. var self=this;
  269. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  270. return $core.withContext(function($ctx1) {
  271. //>>excludeEnd("ctx");
  272. return $recv(self._model())._announcer();
  273. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  274. }, function($ctx1) {$ctx1.fill(self,"announcer",{},$globals.HLCodeWidget)});
  275. //>>excludeEnd("ctx");
  276. },
  277. //>>excludeStart("ide", pragmas.excludeIdeData);
  278. args: [],
  279. source: "announcer\x0a\x09^ self model announcer",
  280. referencedClasses: [],
  281. //>>excludeEnd("ide");
  282. messageSends: ["announcer", "model"]
  283. }),
  284. $globals.HLCodeWidget);
  285. $core.addMethod(
  286. $core.method({
  287. selector: "browseIt",
  288. protocol: 'actions',
  289. fn: function (){
  290. var self=this;
  291. var result;
  292. function $Error(){return $globals.Error||(typeof Error=="undefined"?nil:Error)}
  293. function $ErrorHandler(){return $globals.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
  294. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  295. return $core.withContext(function($ctx1) {
  296. //>>excludeEnd("ctx");
  297. var $early={};
  298. try {
  299. result=$recv((function(){
  300. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  301. return $core.withContext(function($ctx2) {
  302. //>>excludeEnd("ctx");
  303. return self._doIt();
  304. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  305. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  306. //>>excludeEnd("ctx");
  307. }))._on_do_($Error(),(function(exception){
  308. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  309. return $core.withContext(function($ctx2) {
  310. //>>excludeEnd("ctx");
  311. throw $early=[$recv($ErrorHandler())._handleError_(exception)];
  312. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  313. }, function($ctx2) {$ctx2.fillBlock({exception:exception},$ctx1,2)});
  314. //>>excludeEnd("ctx");
  315. }));
  316. $recv(self._model())._browse_(result);
  317. return self;
  318. }
  319. catch(e) {if(e===$early)return e[0]; throw e}
  320. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  321. }, function($ctx1) {$ctx1.fill(self,"browseIt",{result:result},$globals.HLCodeWidget)});
  322. //>>excludeEnd("ctx");
  323. },
  324. //>>excludeStart("ide", pragmas.excludeIdeData);
  325. args: [],
  326. source: "browseIt\x0a\x09| result |\x0a\x09\x0a\x09result := [ self doIt ] on: Error do: [ :exception | \x0a\x09\x09^ ErrorHandler handleError: exception ].\x0a\x09\x09\x0a\x09self model browse: result",
  327. referencedClasses: ["Error", "ErrorHandler"],
  328. //>>excludeEnd("ide");
  329. messageSends: ["on:do:", "doIt", "handleError:", "browse:", "model"]
  330. }),
  331. $globals.HLCodeWidget);
  332. $core.addMethod(
  333. $core.method({
  334. selector: "canHaveFocus",
  335. protocol: 'testing',
  336. fn: function (){
  337. var self=this;
  338. return true;
  339. },
  340. //>>excludeStart("ide", pragmas.excludeIdeData);
  341. args: [],
  342. source: "canHaveFocus\x0a\x09^ true",
  343. referencedClasses: [],
  344. //>>excludeEnd("ide");
  345. messageSends: []
  346. }),
  347. $globals.HLCodeWidget);
  348. $core.addMethod(
  349. $core.method({
  350. selector: "clear",
  351. protocol: 'actions',
  352. fn: function (){
  353. var self=this;
  354. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  355. return $core.withContext(function($ctx1) {
  356. //>>excludeEnd("ctx");
  357. self._contents_("");
  358. return self;
  359. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  360. }, function($ctx1) {$ctx1.fill(self,"clear",{},$globals.HLCodeWidget)});
  361. //>>excludeEnd("ctx");
  362. },
  363. //>>excludeStart("ide", pragmas.excludeIdeData);
  364. args: [],
  365. source: "clear\x0a\x09self contents: ''",
  366. referencedClasses: [],
  367. //>>excludeEnd("ide");
  368. messageSends: ["contents:"]
  369. }),
  370. $globals.HLCodeWidget);
  371. $core.addMethod(
  372. $core.method({
  373. selector: "configureEditor",
  374. protocol: 'actions',
  375. fn: function (){
  376. var self=this;
  377. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  378. return $core.withContext(function($ctx1) {
  379. //>>excludeEnd("ctx");
  380. var $1,$2,$3;
  381. $1=self._editor();
  382. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  383. $ctx1.sendIdx["editor"]=1;
  384. //>>excludeEnd("ctx");
  385. $recv($1)._at_put_("amberCodeWidget",self);
  386. $2=self._editor();
  387. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  388. $ctx1.sendIdx["editor"]=2;
  389. //>>excludeEnd("ctx");
  390. $recv($2)._on_do_("change",(function(){
  391. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  392. return $core.withContext(function($ctx2) {
  393. //>>excludeEnd("ctx");
  394. return self._onChange();
  395. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  396. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  397. //>>excludeEnd("ctx");
  398. }));
  399. $recv($recv(self._wrapper())._asJQuery())._on_in_do_("mousedown",".CodeMirror pre",(function(event){
  400. var position,node;
  401. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  402. return $core.withContext(function($ctx2) {
  403. //>>excludeEnd("ctx");
  404. $3=$recv(event)._at_("ctrlKey");
  405. if($core.assert($3)){
  406. position=$recv(self._editor())._coordsChar_($globals.HashedCollection._newFromPairs_(["left",$recv(event)._clientX(),"top",$recv(event)._clientY()]));
  407. position;
  408. self._onCtrlClickAt_($recv($recv($recv(position)._line()).__at($recv(position)._ch())).__plus((1)));
  409. return $recv(event)._preventDefault();
  410. };
  411. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  412. }, function($ctx2) {$ctx2.fillBlock({event:event,position:position,node:node},$ctx1,2)});
  413. //>>excludeEnd("ctx");
  414. }));
  415. return self;
  416. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  417. }, function($ctx1) {$ctx1.fill(self,"configureEditor",{},$globals.HLCodeWidget)});
  418. //>>excludeEnd("ctx");
  419. },
  420. //>>excludeStart("ide", pragmas.excludeIdeData);
  421. args: [],
  422. source: "configureEditor\x0a\x09self editor at: 'amberCodeWidget' put: self.\x0a\x09self editor on: 'change' do: [ self onChange ].\x0a\x0a\x09self wrapper asJQuery on: 'mousedown' in: '.CodeMirror pre' do: [ :event | | position node |\x0a\x09\x09(event at: 'ctrlKey') ifTrue: [\x0a\x09\x09\x09position := self editor coordsChar: #{ \x0a\x09\x09\x09\x09'left' -> event clientX.\x0a\x09\x09\x09\x09'top' -> event clientY\x0a\x09\x09\x09}.\x0a\x09\x09\x09self onCtrlClickAt: (position line @ position ch) + 1.\x0a\x09\x09\x09event preventDefault ] ]",
  423. referencedClasses: [],
  424. //>>excludeEnd("ide");
  425. messageSends: ["at:put:", "editor", "on:do:", "onChange", "on:in:do:", "asJQuery", "wrapper", "ifTrue:", "at:", "coordsChar:", "clientX", "clientY", "onCtrlClickAt:", "+", "@", "line", "ch", "preventDefault"]
  426. }),
  427. $globals.HLCodeWidget);
  428. $core.addMethod(
  429. $core.method({
  430. selector: "contents",
  431. protocol: 'accessing',
  432. fn: function (){
  433. var self=this;
  434. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  435. return $core.withContext(function($ctx1) {
  436. //>>excludeEnd("ctx");
  437. return $recv(self["@editor"])._getValue();
  438. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  439. }, function($ctx1) {$ctx1.fill(self,"contents",{},$globals.HLCodeWidget)});
  440. //>>excludeEnd("ctx");
  441. },
  442. //>>excludeStart("ide", pragmas.excludeIdeData);
  443. args: [],
  444. source: "contents\x0a\x09^ editor getValue",
  445. referencedClasses: [],
  446. //>>excludeEnd("ide");
  447. messageSends: ["getValue"]
  448. }),
  449. $globals.HLCodeWidget);
  450. $core.addMethod(
  451. $core.method({
  452. selector: "contents:",
  453. protocol: 'accessing',
  454. fn: function (aString){
  455. var self=this;
  456. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  457. return $core.withContext(function($ctx1) {
  458. //>>excludeEnd("ctx");
  459. var $1,$receiver;
  460. $recv(self["@editor"])._setValue_(aString);
  461. $1=self["@state"];
  462. if(($receiver = $1) == null || $receiver.isNil){
  463. $1;
  464. } else {
  465. self._updateState();
  466. };
  467. return self;
  468. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  469. }, function($ctx1) {$ctx1.fill(self,"contents:",{aString:aString},$globals.HLCodeWidget)});
  470. //>>excludeEnd("ctx");
  471. },
  472. //>>excludeStart("ide", pragmas.excludeIdeData);
  473. args: ["aString"],
  474. source: "contents: aString\x0a\x09editor setValue: aString.\x0a\x09state ifNotNil: [ self updateState ]",
  475. referencedClasses: [],
  476. //>>excludeEnd("ide");
  477. messageSends: ["setValue:", "ifNotNil:", "updateState"]
  478. }),
  479. $globals.HLCodeWidget);
  480. $core.addMethod(
  481. $core.method({
  482. selector: "currentLine",
  483. protocol: 'accessing',
  484. fn: function (){
  485. var self=this;
  486. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  487. return $core.withContext(function($ctx1) {
  488. //>>excludeEnd("ctx");
  489. return $recv(self["@editor"])._getLine_($recv($recv(self["@editor"])._getCursor())._line());
  490. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  491. }, function($ctx1) {$ctx1.fill(self,"currentLine",{},$globals.HLCodeWidget)});
  492. //>>excludeEnd("ctx");
  493. },
  494. //>>excludeStart("ide", pragmas.excludeIdeData);
  495. args: [],
  496. source: "currentLine\x0a ^editor getLine: (editor getCursor line)",
  497. referencedClasses: [],
  498. //>>excludeEnd("ide");
  499. messageSends: ["getLine:", "line", "getCursor"]
  500. }),
  501. $globals.HLCodeWidget);
  502. $core.addMethod(
  503. $core.method({
  504. selector: "currentLineOrSelection",
  505. protocol: 'accessing',
  506. fn: function (){
  507. var self=this;
  508. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  509. return $core.withContext(function($ctx1) {
  510. //>>excludeEnd("ctx");
  511. var $1;
  512. $1=$recv(self["@editor"])._somethingSelected();
  513. if($core.assert($1)){
  514. return self._selection();
  515. } else {
  516. return self._currentLine();
  517. };
  518. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  519. }, function($ctx1) {$ctx1.fill(self,"currentLineOrSelection",{},$globals.HLCodeWidget)});
  520. //>>excludeEnd("ctx");
  521. },
  522. //>>excludeStart("ide", pragmas.excludeIdeData);
  523. args: [],
  524. source: "currentLineOrSelection\x0a ^editor somethingSelected\x0a\x09\x09ifFalse: [ self currentLine ]\x0a\x09\x09ifTrue: [ self selection ]",
  525. referencedClasses: [],
  526. //>>excludeEnd("ide");
  527. messageSends: ["ifFalse:ifTrue:", "somethingSelected", "currentLine", "selection"]
  528. }),
  529. $globals.HLCodeWidget);
  530. $core.addMethod(
  531. $core.method({
  532. selector: "doIt",
  533. protocol: 'actions',
  534. fn: function (){
  535. var self=this;
  536. var result;
  537. function $HLDoItExecuted(){return $globals.HLDoItExecuted||(typeof HLDoItExecuted=="undefined"?nil:HLDoItExecuted)}
  538. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  539. return $core.withContext(function($ctx1) {
  540. //>>excludeEnd("ctx");
  541. var $1;
  542. $1=self._model();
  543. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  544. $ctx1.sendIdx["model"]=1;
  545. //>>excludeEnd("ctx");
  546. result=$recv($1)._doIt_(self._currentLineOrSelection());
  547. $recv($recv(self._model())._announcer())._announce_($recv($HLDoItExecuted())._on_(self["@model"]));
  548. return result;
  549. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  550. }, function($ctx1) {$ctx1.fill(self,"doIt",{result:result},$globals.HLCodeWidget)});
  551. //>>excludeEnd("ctx");
  552. },
  553. //>>excludeStart("ide", pragmas.excludeIdeData);
  554. args: [],
  555. source: "doIt\x0a\x09| result |\x0a\x0a\x09result := self model doIt: self currentLineOrSelection.\x0a\x09self model announcer announce: (HLDoItExecuted on: model).\x0a\x0a\x09^ result",
  556. referencedClasses: ["HLDoItExecuted"],
  557. //>>excludeEnd("ide");
  558. messageSends: ["doIt:", "model", "currentLineOrSelection", "announce:", "announcer", "on:"]
  559. }),
  560. $globals.HLCodeWidget);
  561. $core.addMethod(
  562. $core.method({
  563. selector: "editor",
  564. protocol: 'actions',
  565. fn: function (){
  566. var self=this;
  567. return self["@editor"];
  568. },
  569. //>>excludeStart("ide", pragmas.excludeIdeData);
  570. args: [],
  571. source: "editor\x0a\x09^ editor",
  572. referencedClasses: [],
  573. //>>excludeEnd("ide");
  574. messageSends: []
  575. }),
  576. $globals.HLCodeWidget);
  577. $core.addMethod(
  578. $core.method({
  579. selector: "editorOptions",
  580. protocol: 'accessing',
  581. fn: function (){
  582. var self=this;
  583. function $HashedCollection(){return $globals.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  584. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  585. return $core.withContext(function($ctx1) {
  586. //>>excludeEnd("ctx");
  587. var $1;
  588. $1="helios.editorTheme"._settingValueIfAbsent_("default");
  589. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  590. $ctx1.sendIdx["settingValueIfAbsent:"]=1;
  591. //>>excludeEnd("ctx");
  592. return $globals.HashedCollection._newFromPairs_(["theme",$1,"mode","text/x-stsrc","lineNumbers",true,"enterMode","flat","indentWithTabs",true,"indentUnit",(4),"matchBrackets",true,"electricChars",false,"keyMap","Amber","extraKeys",$recv($HashedCollection())._with_($recv("helios.completionKey"._settingValueIfAbsent_("Shift-Space")).__minus_gt("autocomplete"))]);
  593. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  594. }, function($ctx1) {$ctx1.fill(self,"editorOptions",{},$globals.HLCodeWidget)});
  595. //>>excludeEnd("ctx");
  596. },
  597. //>>excludeStart("ide", pragmas.excludeIdeData);
  598. args: [],
  599. source: "editorOptions\x0a\x09^ #{\x0a\x09\x09'theme' -> ('helios.editorTheme' settingValueIfAbsent: 'default').\x0a\x09\x09'mode' -> 'text/x-stsrc'.\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' -> (HashedCollection with: ('helios.completionKey' settingValueIfAbsent: 'Shift-Space') -> 'autocomplete')\x0a\x09}",
  600. referencedClasses: ["HashedCollection"],
  601. //>>excludeEnd("ide");
  602. messageSends: ["settingValueIfAbsent:", "with:", "->"]
  603. }),
  604. $globals.HLCodeWidget);
  605. $core.addMethod(
  606. $core.method({
  607. selector: "focus",
  608. protocol: 'actions',
  609. fn: function (){
  610. var self=this;
  611. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  612. return $core.withContext(function($ctx1) {
  613. //>>excludeEnd("ctx");
  614. $recv(self["@editor"])._focus();
  615. return self;
  616. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  617. }, function($ctx1) {$ctx1.fill(self,"focus",{},$globals.HLCodeWidget)});
  618. //>>excludeEnd("ctx");
  619. },
  620. //>>excludeStart("ide", pragmas.excludeIdeData);
  621. args: [],
  622. source: "focus\x0a\x09editor focus",
  623. referencedClasses: [],
  624. //>>excludeEnd("ide");
  625. messageSends: ["focus"]
  626. }),
  627. $globals.HLCodeWidget);
  628. $core.addMethod(
  629. $core.method({
  630. selector: "hasFocus",
  631. protocol: 'testing',
  632. fn: function (){
  633. var self=this;
  634. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  635. return $core.withContext(function($ctx1) {
  636. //>>excludeEnd("ctx");
  637. return $recv($recv(self["@code"])._asJQuery())._is_(":active");
  638. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  639. }, function($ctx1) {$ctx1.fill(self,"hasFocus",{},$globals.HLCodeWidget)});
  640. //>>excludeEnd("ctx");
  641. },
  642. //>>excludeStart("ide", pragmas.excludeIdeData);
  643. args: [],
  644. source: "hasFocus\x0a\x09^ code asJQuery is: ':active'",
  645. referencedClasses: [],
  646. //>>excludeEnd("ide");
  647. messageSends: ["is:", "asJQuery"]
  648. }),
  649. $globals.HLCodeWidget);
  650. $core.addMethod(
  651. $core.method({
  652. selector: "hasModification",
  653. protocol: 'testing',
  654. fn: function (){
  655. var self=this;
  656. return false;
  657. },
  658. //>>excludeStart("ide", pragmas.excludeIdeData);
  659. args: [],
  660. source: "hasModification\x0a\x09^ false",
  661. referencedClasses: [],
  662. //>>excludeEnd("ide");
  663. messageSends: []
  664. }),
  665. $globals.HLCodeWidget);
  666. $core.addMethod(
  667. $core.method({
  668. selector: "inspectIt",
  669. protocol: 'actions',
  670. fn: function (){
  671. var self=this;
  672. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  673. return $core.withContext(function($ctx1) {
  674. //>>excludeEnd("ctx");
  675. $recv(self._model())._inspect_(self._doIt());
  676. return self;
  677. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  678. }, function($ctx1) {$ctx1.fill(self,"inspectIt",{},$globals.HLCodeWidget)});
  679. //>>excludeEnd("ctx");
  680. },
  681. //>>excludeStart("ide", pragmas.excludeIdeData);
  682. args: [],
  683. source: "inspectIt\x0a\x09self model inspect: self doIt",
  684. referencedClasses: [],
  685. //>>excludeEnd("ide");
  686. messageSends: ["inspect:", "model", "doIt"]
  687. }),
  688. $globals.HLCodeWidget);
  689. $core.addMethod(
  690. $core.method({
  691. selector: "messageHintFor:token:",
  692. protocol: 'hints',
  693. fn: function (anEditor,aToken){
  694. var self=this;
  695. function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  696. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  697. return $core.withContext(function($ctx1) {
  698. //>>excludeEnd("ctx");
  699. var $1;
  700. return $recv($recv($recv($recv($recv($Smalltalk())._core())._allSelectors())._asArray())._select_((function(each){
  701. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  702. return $core.withContext(function($ctx2) {
  703. //>>excludeEnd("ctx");
  704. $1=$recv(aToken)._string();
  705. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  706. $ctx2.sendIdx["string"]=1;
  707. //>>excludeEnd("ctx");
  708. return $recv(each)._includesSubString_($1);
  709. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  710. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  711. //>>excludeEnd("ctx");
  712. })))._reject_((function(each){
  713. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  714. return $core.withContext(function($ctx2) {
  715. //>>excludeEnd("ctx");
  716. return $recv(each).__eq($recv(aToken)._string());
  717. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  718. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
  719. //>>excludeEnd("ctx");
  720. }));
  721. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  722. }, function($ctx1) {$ctx1.fill(self,"messageHintFor:token:",{anEditor:anEditor,aToken:aToken},$globals.HLCodeWidget)});
  723. //>>excludeEnd("ctx");
  724. },
  725. //>>excludeStart("ide", pragmas.excludeIdeData);
  726. args: ["anEditor", "aToken"],
  727. source: "messageHintFor: anEditor token: aToken\x0a\x09^ (Smalltalk core allSelectors asArray \x0a\x09\x09select: [ :each | each includesSubString: aToken string ])\x0a\x09\x09reject: [ :each | each = aToken string ]",
  728. referencedClasses: ["Smalltalk"],
  729. //>>excludeEnd("ide");
  730. messageSends: ["reject:", "select:", "asArray", "allSelectors", "core", "includesSubString:", "string", "="]
  731. }),
  732. $globals.HLCodeWidget);
  733. $core.addMethod(
  734. $core.method({
  735. selector: "model",
  736. protocol: 'accessing',
  737. fn: function (){
  738. var self=this;
  739. function $HLCodeModel(){return $globals.HLCodeModel||(typeof HLCodeModel=="undefined"?nil:HLCodeModel)}
  740. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  741. return $core.withContext(function($ctx1) {
  742. //>>excludeEnd("ctx");
  743. var $1,$receiver;
  744. $1=self["@model"];
  745. if(($receiver = $1) == null || $receiver.isNil){
  746. self["@model"]=$recv($HLCodeModel())._new();
  747. return self["@model"];
  748. } else {
  749. return $1;
  750. };
  751. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  752. }, function($ctx1) {$ctx1.fill(self,"model",{},$globals.HLCodeWidget)});
  753. //>>excludeEnd("ctx");
  754. },
  755. //>>excludeStart("ide", pragmas.excludeIdeData);
  756. args: [],
  757. source: "model\x0a\x09^ model ifNil: [ model := HLCodeModel new ]",
  758. referencedClasses: ["HLCodeModel"],
  759. //>>excludeEnd("ide");
  760. messageSends: ["ifNil:", "new"]
  761. }),
  762. $globals.HLCodeWidget);
  763. $core.addMethod(
  764. $core.method({
  765. selector: "model:",
  766. protocol: 'accessing',
  767. fn: function (aModel){
  768. var self=this;
  769. self["@model"]=aModel;
  770. return self;
  771. },
  772. //>>excludeStart("ide", pragmas.excludeIdeData);
  773. args: ["aModel"],
  774. source: "model: aModel\x0a\x09model := aModel",
  775. referencedClasses: [],
  776. //>>excludeEnd("ide");
  777. messageSends: []
  778. }),
  779. $globals.HLCodeWidget);
  780. $core.addMethod(
  781. $core.method({
  782. selector: "navigateTo:",
  783. protocol: 'actions',
  784. fn: function (aString){
  785. var self=this;
  786. function $Finder(){return $globals.Finder||(typeof Finder=="undefined"?nil:Finder)}
  787. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  788. return $core.withContext(function($ctx1) {
  789. //>>excludeEnd("ctx");
  790. $recv($Finder())._findString_(aString);
  791. return self;
  792. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  793. }, function($ctx1) {$ctx1.fill(self,"navigateTo:",{aString:aString},$globals.HLCodeWidget)});
  794. //>>excludeEnd("ctx");
  795. },
  796. //>>excludeStart("ide", pragmas.excludeIdeData);
  797. args: ["aString"],
  798. source: "navigateTo: aString\x0a\x09Finder findString: aString",
  799. referencedClasses: ["Finder"],
  800. //>>excludeEnd("ide");
  801. messageSends: ["findString:"]
  802. }),
  803. $globals.HLCodeWidget);
  804. $core.addMethod(
  805. $core.method({
  806. selector: "navigateToReference:",
  807. protocol: 'actions',
  808. fn: function (aString){
  809. var self=this;
  810. function $HLReferences(){return $globals.HLReferences||(typeof HLReferences=="undefined"?nil:HLReferences)}
  811. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  812. return $core.withContext(function($ctx1) {
  813. //>>excludeEnd("ctx");
  814. $recv($recv($HLReferences())._openAsTab())._search_(aString);
  815. return self;
  816. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  817. }, function($ctx1) {$ctx1.fill(self,"navigateToReference:",{aString:aString},$globals.HLCodeWidget)});
  818. //>>excludeEnd("ctx");
  819. },
  820. //>>excludeStart("ide", pragmas.excludeIdeData);
  821. args: ["aString"],
  822. source: "navigateToReference: aString\x0a\x09(HLReferences openAsTab)\x0a\x09\x09search: aString",
  823. referencedClasses: ["HLReferences"],
  824. //>>excludeEnd("ide");
  825. messageSends: ["search:", "openAsTab"]
  826. }),
  827. $globals.HLCodeWidget);
  828. $core.addMethod(
  829. $core.method({
  830. selector: "onChange",
  831. protocol: 'reactions',
  832. fn: function (){
  833. var self=this;
  834. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  835. return $core.withContext(function($ctx1) {
  836. //>>excludeEnd("ctx");
  837. self._updateState();
  838. return self;
  839. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  840. }, function($ctx1) {$ctx1.fill(self,"onChange",{},$globals.HLCodeWidget)});
  841. //>>excludeEnd("ctx");
  842. },
  843. //>>excludeStart("ide", pragmas.excludeIdeData);
  844. args: [],
  845. source: "onChange\x0a\x09self updateState",
  846. referencedClasses: [],
  847. //>>excludeEnd("ide");
  848. messageSends: ["updateState"]
  849. }),
  850. $globals.HLCodeWidget);
  851. $core.addMethod(
  852. $core.method({
  853. selector: "onCtrlClickAt:",
  854. protocol: 'reactions',
  855. fn: function (aPoint){
  856. var self=this;
  857. var ast,node;
  858. function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  859. function $Error(){return $globals.Error||(typeof Error=="undefined"?nil:Error)}
  860. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  861. return $core.withContext(function($ctx1) {
  862. //>>excludeEnd("ctx");
  863. var $early={};
  864. try {
  865. ast=$recv((function(){
  866. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  867. return $core.withContext(function($ctx2) {
  868. //>>excludeEnd("ctx");
  869. return $recv($Smalltalk())._parse_($recv(self._editor())._getValue());
  870. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  871. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  872. //>>excludeEnd("ctx");
  873. }))._on_do_($Error(),(function(error){
  874. throw $early=[self];
  875. }));
  876. node=$recv(ast)._navigationNodeAt_ifAbsent_(aPoint,(function(){
  877. throw $early=[nil];
  878. }));
  879. self._navigateTo_($recv(node)._navigationLink());
  880. return self;
  881. }
  882. catch(e) {if(e===$early)return e[0]; throw e}
  883. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  884. }, function($ctx1) {$ctx1.fill(self,"onCtrlClickAt:",{aPoint:aPoint,ast:ast,node:node},$globals.HLCodeWidget)});
  885. //>>excludeEnd("ctx");
  886. },
  887. //>>excludeStart("ide", pragmas.excludeIdeData);
  888. args: ["aPoint"],
  889. source: "onCtrlClickAt: aPoint\x0a\x09| ast node |\x0a\x09\x0a\x09ast := [ Smalltalk parse: self editor getValue ] \x0a\x09\x09on: Error \x0a\x09\x09do: [ :error | ^ self ].\x0a\x09\x0a\x09node := ast \x0a\x09\x09navigationNodeAt: aPoint \x0a\x09\x09ifAbsent: [ ^ nil ].\x0a\x09\x09\x0a\x09self navigateTo: node navigationLink",
  890. referencedClasses: ["Smalltalk", "Error"],
  891. //>>excludeEnd("ide");
  892. messageSends: ["on:do:", "parse:", "getValue", "editor", "navigationNodeAt:ifAbsent:", "navigateTo:", "navigationLink"]
  893. }),
  894. $globals.HLCodeWidget);
  895. $core.addMethod(
  896. $core.method({
  897. selector: "onInspectIt",
  898. protocol: 'reactions',
  899. fn: function (){
  900. var self=this;
  901. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  902. return $core.withContext(function($ctx1) {
  903. //>>excludeEnd("ctx");
  904. self._inspectIt();
  905. return self;
  906. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  907. }, function($ctx1) {$ctx1.fill(self,"onInspectIt",{},$globals.HLCodeWidget)});
  908. //>>excludeEnd("ctx");
  909. },
  910. //>>excludeStart("ide", pragmas.excludeIdeData);
  911. args: [],
  912. source: "onInspectIt\x0a\x0a\x09self inspectIt",
  913. referencedClasses: [],
  914. //>>excludeEnd("ide");
  915. messageSends: ["inspectIt"]
  916. }),
  917. $globals.HLCodeWidget);
  918. $core.addMethod(
  919. $core.method({
  920. selector: "onPrintIt",
  921. protocol: 'reactions',
  922. fn: function (){
  923. var self=this;
  924. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  925. return $core.withContext(function($ctx1) {
  926. //>>excludeEnd("ctx");
  927. self._printIt();
  928. return self;
  929. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  930. }, function($ctx1) {$ctx1.fill(self,"onPrintIt",{},$globals.HLCodeWidget)});
  931. //>>excludeEnd("ctx");
  932. },
  933. //>>excludeStart("ide", pragmas.excludeIdeData);
  934. args: [],
  935. source: "onPrintIt\x0a\x0a\x09self printIt",
  936. referencedClasses: [],
  937. //>>excludeEnd("ide");
  938. messageSends: ["printIt"]
  939. }),
  940. $globals.HLCodeWidget);
  941. $core.addMethod(
  942. $core.method({
  943. selector: "onSaveIt",
  944. protocol: 'reactions',
  945. fn: function (){
  946. var self=this;
  947. return self;
  948. },
  949. //>>excludeStart("ide", pragmas.excludeIdeData);
  950. args: [],
  951. source: "onSaveIt\x0a\x09\x22I do not do anything\x22",
  952. referencedClasses: [],
  953. //>>excludeEnd("ide");
  954. messageSends: []
  955. }),
  956. $globals.HLCodeWidget);
  957. $core.addMethod(
  958. $core.method({
  959. selector: "print:",
  960. protocol: 'actions',
  961. fn: function (aString){
  962. var self=this;
  963. var start,stop,currentLine;
  964. function $HashedCollection(){return $globals.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  965. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  966. return $core.withContext(function($ctx1) {
  967. //>>excludeEnd("ctx");
  968. var $1,$2,$4,$3,$5,$6,$7,$8,$9,$10,$12,$11;
  969. $1=$recv(self["@editor"])._getCursor_(false);
  970. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  971. $ctx1.sendIdx["getCursor:"]=1;
  972. //>>excludeEnd("ctx");
  973. currentLine=$recv($1)._line();
  974. start=$recv($HashedCollection())._new();
  975. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  976. $ctx1.sendIdx["new"]=1;
  977. //>>excludeEnd("ctx");
  978. $recv(start)._at_put_("line",currentLine);
  979. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  980. $ctx1.sendIdx["at:put:"]=1;
  981. //>>excludeEnd("ctx");
  982. $2=start;
  983. $4=$recv(self["@editor"])._getCursor_(false);
  984. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  985. $ctx1.sendIdx["getCursor:"]=2;
  986. //>>excludeEnd("ctx");
  987. $3=$recv($4)._ch();
  988. $recv($2)._at_put_("ch",$3);
  989. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  990. $ctx1.sendIdx["at:put:"]=2;
  991. //>>excludeEnd("ctx");
  992. $5=$recv(self["@editor"])._getSelection();
  993. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  994. $ctx1.sendIdx["getSelection"]=1;
  995. //>>excludeEnd("ctx");
  996. $recv($5)._ifEmpty_((function(){
  997. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  998. return $core.withContext(function($ctx2) {
  999. //>>excludeEnd("ctx");
  1000. $6=start;
  1001. $7=$recv($recv(self["@editor"])._getLine_(currentLine))._size();
  1002. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1003. $ctx2.sendIdx["size"]=1;
  1004. //>>excludeEnd("ctx");
  1005. $recv($6)._at_put_("ch",$7);
  1006. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1007. $ctx2.sendIdx["at:put:"]=3;
  1008. //>>excludeEnd("ctx");
  1009. return $recv(self["@editor"])._setSelection_end_($globals.HashedCollection._newFromPairs_(["line",currentLine,"ch",(0)]),start);
  1010. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1011. $ctx2.sendIdx["setSelection:end:"]=1;
  1012. //>>excludeEnd("ctx");
  1013. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1014. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1015. //>>excludeEnd("ctx");
  1016. }));
  1017. stop=$recv($HashedCollection())._new();
  1018. $recv(stop)._at_put_("line",currentLine);
  1019. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1020. $ctx1.sendIdx["at:put:"]=4;
  1021. //>>excludeEnd("ctx");
  1022. $8=stop;
  1023. $9=$recv($recv($recv(start)._at_("ch")).__plus($recv(aString)._size())).__plus((2));
  1024. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1025. $ctx1.sendIdx["+"]=1;
  1026. //>>excludeEnd("ctx");
  1027. $recv($8)._at_put_("ch",$9);
  1028. $10=self["@editor"];
  1029. $12=$recv($recv($recv(self["@editor"])._getSelection()).__comma(" ")).__comma(aString);
  1030. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1031. $ctx1.sendIdx[","]=2;
  1032. //>>excludeEnd("ctx");
  1033. $11=$recv($12).__comma(" ");
  1034. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1035. $ctx1.sendIdx[","]=1;
  1036. //>>excludeEnd("ctx");
  1037. $recv($10)._replaceSelection_($11);
  1038. $recv(self["@editor"])._setCursor_($recv(self["@editor"])._getCursor_(true));
  1039. $recv(self["@editor"])._setSelection_end_(stop,start);
  1040. return self;
  1041. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1042. }, function($ctx1) {$ctx1.fill(self,"print:",{aString:aString,start:start,stop:stop,currentLine:currentLine},$globals.HLCodeWidget)});
  1043. //>>excludeEnd("ctx");
  1044. },
  1045. //>>excludeStart("ide", pragmas.excludeIdeData);
  1046. args: ["aString"],
  1047. 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",
  1048. referencedClasses: ["HashedCollection"],
  1049. //>>excludeEnd("ide");
  1050. messageSends: ["line", "getCursor:", "new", "at:put:", "ch", "ifEmpty:", "getSelection", "size", "getLine:", "setSelection:end:", "+", "at:", "replaceSelection:", ",", "setCursor:"]
  1051. }),
  1052. $globals.HLCodeWidget);
  1053. $core.addMethod(
  1054. $core.method({
  1055. selector: "printIt",
  1056. protocol: 'actions',
  1057. fn: function (){
  1058. var self=this;
  1059. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1060. return $core.withContext(function($ctx1) {
  1061. //>>excludeEnd("ctx");
  1062. self._print_($recv(self._doIt())._printString());
  1063. return self;
  1064. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1065. }, function($ctx1) {$ctx1.fill(self,"printIt",{},$globals.HLCodeWidget)});
  1066. //>>excludeEnd("ctx");
  1067. },
  1068. //>>excludeStart("ide", pragmas.excludeIdeData);
  1069. args: [],
  1070. source: "printIt\x0a\x09self print: self doIt printString",
  1071. referencedClasses: [],
  1072. //>>excludeEnd("ide");
  1073. messageSends: ["print:", "printString", "doIt"]
  1074. }),
  1075. $globals.HLCodeWidget);
  1076. $core.addMethod(
  1077. $core.method({
  1078. selector: "receiver",
  1079. protocol: 'accessing',
  1080. fn: function (){
  1081. var self=this;
  1082. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1083. return $core.withContext(function($ctx1) {
  1084. //>>excludeEnd("ctx");
  1085. return $recv(self._model())._receiver();
  1086. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1087. }, function($ctx1) {$ctx1.fill(self,"receiver",{},$globals.HLCodeWidget)});
  1088. //>>excludeEnd("ctx");
  1089. },
  1090. //>>excludeStart("ide", pragmas.excludeIdeData);
  1091. args: [],
  1092. source: "receiver\x0a\x09^ self model receiver",
  1093. referencedClasses: [],
  1094. //>>excludeEnd("ide");
  1095. messageSends: ["receiver", "model"]
  1096. }),
  1097. $globals.HLCodeWidget);
  1098. $core.addMethod(
  1099. $core.method({
  1100. selector: "receiver:",
  1101. protocol: 'accessing',
  1102. fn: function (anObject){
  1103. var self=this;
  1104. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1105. return $core.withContext(function($ctx1) {
  1106. //>>excludeEnd("ctx");
  1107. $recv(self._model())._receiver_(anObject);
  1108. return self;
  1109. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1110. }, function($ctx1) {$ctx1.fill(self,"receiver:",{anObject:anObject},$globals.HLCodeWidget)});
  1111. //>>excludeEnd("ctx");
  1112. },
  1113. //>>excludeStart("ide", pragmas.excludeIdeData);
  1114. args: ["anObject"],
  1115. source: "receiver: anObject\x0a\x09self model receiver: anObject",
  1116. referencedClasses: [],
  1117. //>>excludeEnd("ide");
  1118. messageSends: ["receiver:", "model"]
  1119. }),
  1120. $globals.HLCodeWidget);
  1121. $core.addMethod(
  1122. $core.method({
  1123. selector: "renderButtonsOn:",
  1124. protocol: 'rendering',
  1125. fn: function (html){
  1126. var self=this;
  1127. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1128. return $core.withContext(function($ctx1) {
  1129. //>>excludeEnd("ctx");
  1130. var $1,$2,$3,$4,$5,$6,$7;
  1131. $1=$recv(html)._button();
  1132. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1133. $ctx1.sendIdx["button"]=1;
  1134. //>>excludeEnd("ctx");
  1135. $recv($1)._class_("button");
  1136. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1137. $ctx1.sendIdx["class:"]=1;
  1138. //>>excludeEnd("ctx");
  1139. $recv($1)._with_("DoIt");
  1140. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1141. $ctx1.sendIdx["with:"]=1;
  1142. //>>excludeEnd("ctx");
  1143. $2=$recv($1)._onClick_((function(){
  1144. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1145. return $core.withContext(function($ctx2) {
  1146. //>>excludeEnd("ctx");
  1147. return self._doIt();
  1148. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1149. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1150. //>>excludeEnd("ctx");
  1151. }));
  1152. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1153. $ctx1.sendIdx["onClick:"]=1;
  1154. //>>excludeEnd("ctx");
  1155. $3=$recv(html)._button();
  1156. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1157. $ctx1.sendIdx["button"]=2;
  1158. //>>excludeEnd("ctx");
  1159. $recv($3)._class_("button");
  1160. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1161. $ctx1.sendIdx["class:"]=2;
  1162. //>>excludeEnd("ctx");
  1163. $recv($3)._with_("PrintIt");
  1164. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1165. $ctx1.sendIdx["with:"]=2;
  1166. //>>excludeEnd("ctx");
  1167. $4=$recv($3)._onClick_((function(){
  1168. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1169. return $core.withContext(function($ctx2) {
  1170. //>>excludeEnd("ctx");
  1171. return self._printIt();
  1172. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1173. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1174. //>>excludeEnd("ctx");
  1175. }));
  1176. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1177. $ctx1.sendIdx["onClick:"]=2;
  1178. //>>excludeEnd("ctx");
  1179. $5=$recv(html)._button();
  1180. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1181. $ctx1.sendIdx["button"]=3;
  1182. //>>excludeEnd("ctx");
  1183. $recv($5)._class_("button");
  1184. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1185. $ctx1.sendIdx["class:"]=3;
  1186. //>>excludeEnd("ctx");
  1187. $recv($5)._with_("InspectIt");
  1188. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1189. $ctx1.sendIdx["with:"]=3;
  1190. //>>excludeEnd("ctx");
  1191. $6=$recv($5)._onClick_((function(){
  1192. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1193. return $core.withContext(function($ctx2) {
  1194. //>>excludeEnd("ctx");
  1195. return self._inspectIt();
  1196. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1197. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  1198. //>>excludeEnd("ctx");
  1199. }));
  1200. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1201. $ctx1.sendIdx["onClick:"]=3;
  1202. //>>excludeEnd("ctx");
  1203. $7=$recv(html)._button();
  1204. $recv($7)._class_("button");
  1205. $recv($7)._with_("BrowseIt");
  1206. $recv($7)._onClick_((function(){
  1207. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1208. return $core.withContext(function($ctx2) {
  1209. //>>excludeEnd("ctx");
  1210. return self._browseIt();
  1211. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1212. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
  1213. //>>excludeEnd("ctx");
  1214. }));
  1215. return self;
  1216. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1217. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},$globals.HLCodeWidget)});
  1218. //>>excludeEnd("ctx");
  1219. },
  1220. //>>excludeStart("ide", pragmas.excludeIdeData);
  1221. args: ["html"],
  1222. 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 ].\x0a\x09html button \x0a\x09\x09class: 'button';\x0a\x09\x09with: 'BrowseIt';\x0a\x09\x09onClick: [ self browseIt ]",
  1223. referencedClasses: [],
  1224. //>>excludeEnd("ide");
  1225. messageSends: ["class:", "button", "with:", "onClick:", "doIt", "printIt", "inspectIt", "browseIt"]
  1226. }),
  1227. $globals.HLCodeWidget);
  1228. $core.addMethod(
  1229. $core.method({
  1230. selector: "renderContentOn:",
  1231. protocol: 'rendering',
  1232. fn: function (html){
  1233. var self=this;
  1234. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1235. return $core.withContext(function($ctx1) {
  1236. //>>excludeEnd("ctx");
  1237. var $1,$2,$3,$4;
  1238. $1=$recv(html)._div();
  1239. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1240. $ctx1.sendIdx["div"]=1;
  1241. //>>excludeEnd("ctx");
  1242. $recv($1)._class_("editor");
  1243. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1244. $ctx1.sendIdx["class:"]=1;
  1245. //>>excludeEnd("ctx");
  1246. $2=$recv($1)._with_((function(){
  1247. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1248. return $core.withContext(function($ctx2) {
  1249. //>>excludeEnd("ctx");
  1250. self["@code"]=$recv(html)._textarea();
  1251. return self["@code"];
  1252. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1253. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1254. //>>excludeEnd("ctx");
  1255. }));
  1256. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1257. $ctx1.sendIdx["with:"]=1;
  1258. //>>excludeEnd("ctx");
  1259. $3=$recv(html)._div();
  1260. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1261. $ctx1.sendIdx["div"]=2;
  1262. //>>excludeEnd("ctx");
  1263. self["@state"]=$recv($3)._class_("state");
  1264. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1265. $ctx1.sendIdx["class:"]=2;
  1266. //>>excludeEnd("ctx");
  1267. $4=$recv(html)._div();
  1268. $recv($4)._class_("buttons_bar");
  1269. $recv($4)._with_((function(){
  1270. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1271. return $core.withContext(function($ctx2) {
  1272. //>>excludeEnd("ctx");
  1273. return self._renderButtonsOn_(html);
  1274. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1275. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1276. //>>excludeEnd("ctx");
  1277. }));
  1278. self._setEditorOn_($recv(self["@code"])._element());
  1279. self._configureEditor();
  1280. self._updateState();
  1281. return self;
  1282. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1283. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLCodeWidget)});
  1284. //>>excludeEnd("ctx");
  1285. },
  1286. //>>excludeStart("ide", pragmas.excludeIdeData);
  1287. args: ["html"],
  1288. source: "renderContentOn: html\x0a\x09html div class: 'editor'; with: [\x0a\x09\x09code := html textarea ].\x0a\x09state := html div class: 'state'.\x0a\x09\x0a\x09html div \x0a\x09\x09class: 'buttons_bar';\x0a\x09\x09with: [ self renderButtonsOn: html ].\x0a\x09\x0a\x09self \x0a\x09\x09setEditorOn: code element;\x0a\x09\x09configureEditor;\x0a\x09\x09updateState",
  1289. referencedClasses: [],
  1290. //>>excludeEnd("ide");
  1291. messageSends: ["class:", "div", "with:", "textarea", "renderButtonsOn:", "setEditorOn:", "element", "configureEditor", "updateState"]
  1292. }),
  1293. $globals.HLCodeWidget);
  1294. $core.addMethod(
  1295. $core.method({
  1296. selector: "saveIt",
  1297. protocol: 'actions',
  1298. fn: function (){
  1299. var self=this;
  1300. return self;
  1301. },
  1302. //>>excludeStart("ide", pragmas.excludeIdeData);
  1303. args: [],
  1304. source: "saveIt\x0a\x09\x22I do not do anything\x22",
  1305. referencedClasses: [],
  1306. //>>excludeEnd("ide");
  1307. messageSends: []
  1308. }),
  1309. $globals.HLCodeWidget);
  1310. $core.addMethod(
  1311. $core.method({
  1312. selector: "selection",
  1313. protocol: 'accessing',
  1314. fn: function (){
  1315. var self=this;
  1316. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1317. return $core.withContext(function($ctx1) {
  1318. //>>excludeEnd("ctx");
  1319. return $recv(self["@editor"])._getSelection();
  1320. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1321. }, function($ctx1) {$ctx1.fill(self,"selection",{},$globals.HLCodeWidget)});
  1322. //>>excludeEnd("ctx");
  1323. },
  1324. //>>excludeStart("ide", pragmas.excludeIdeData);
  1325. args: [],
  1326. source: "selection\x0a\x09^editor getSelection",
  1327. referencedClasses: [],
  1328. //>>excludeEnd("ide");
  1329. messageSends: ["getSelection"]
  1330. }),
  1331. $globals.HLCodeWidget);
  1332. $core.addMethod(
  1333. $core.method({
  1334. selector: "selectionEnd",
  1335. protocol: 'accessing',
  1336. fn: function (){
  1337. var self=this;
  1338. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1339. return $core.withContext(function($ctx1) {
  1340. //>>excludeEnd("ctx");
  1341. return $recv($recv(self["@code"])._element())._selectionEnd();
  1342. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1343. }, function($ctx1) {$ctx1.fill(self,"selectionEnd",{},$globals.HLCodeWidget)});
  1344. //>>excludeEnd("ctx");
  1345. },
  1346. //>>excludeStart("ide", pragmas.excludeIdeData);
  1347. args: [],
  1348. source: "selectionEnd\x0a ^code element selectionEnd",
  1349. referencedClasses: [],
  1350. //>>excludeEnd("ide");
  1351. messageSends: ["selectionEnd", "element"]
  1352. }),
  1353. $globals.HLCodeWidget);
  1354. $core.addMethod(
  1355. $core.method({
  1356. selector: "selectionEnd:",
  1357. protocol: 'accessing',
  1358. fn: function (anInteger){
  1359. var self=this;
  1360. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1361. return $core.withContext(function($ctx1) {
  1362. //>>excludeEnd("ctx");
  1363. $recv($recv(self["@code"])._element())._selectionEnd_(anInteger);
  1364. return self;
  1365. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1366. }, function($ctx1) {$ctx1.fill(self,"selectionEnd:",{anInteger:anInteger},$globals.HLCodeWidget)});
  1367. //>>excludeEnd("ctx");
  1368. },
  1369. //>>excludeStart("ide", pragmas.excludeIdeData);
  1370. args: ["anInteger"],
  1371. source: "selectionEnd: anInteger\x0a code element selectionEnd: anInteger",
  1372. referencedClasses: [],
  1373. //>>excludeEnd("ide");
  1374. messageSends: ["selectionEnd:", "element"]
  1375. }),
  1376. $globals.HLCodeWidget);
  1377. $core.addMethod(
  1378. $core.method({
  1379. selector: "selectionStart",
  1380. protocol: 'accessing',
  1381. fn: function (){
  1382. var self=this;
  1383. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1384. return $core.withContext(function($ctx1) {
  1385. //>>excludeEnd("ctx");
  1386. return $recv($recv(self["@code"])._element())._selectionStart();
  1387. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1388. }, function($ctx1) {$ctx1.fill(self,"selectionStart",{},$globals.HLCodeWidget)});
  1389. //>>excludeEnd("ctx");
  1390. },
  1391. //>>excludeStart("ide", pragmas.excludeIdeData);
  1392. args: [],
  1393. source: "selectionStart\x0a ^code element selectionStart",
  1394. referencedClasses: [],
  1395. //>>excludeEnd("ide");
  1396. messageSends: ["selectionStart", "element"]
  1397. }),
  1398. $globals.HLCodeWidget);
  1399. $core.addMethod(
  1400. $core.method({
  1401. selector: "selectionStart:",
  1402. protocol: 'accessing',
  1403. fn: function (anInteger){
  1404. var self=this;
  1405. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1406. return $core.withContext(function($ctx1) {
  1407. //>>excludeEnd("ctx");
  1408. $recv($recv(self["@code"])._element())._selectionStart_(anInteger);
  1409. return self;
  1410. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1411. }, function($ctx1) {$ctx1.fill(self,"selectionStart:",{anInteger:anInteger},$globals.HLCodeWidget)});
  1412. //>>excludeEnd("ctx");
  1413. },
  1414. //>>excludeStart("ide", pragmas.excludeIdeData);
  1415. args: ["anInteger"],
  1416. source: "selectionStart: anInteger\x0a code element selectionStart: anInteger",
  1417. referencedClasses: [],
  1418. //>>excludeEnd("ide");
  1419. messageSends: ["selectionStart:", "element"]
  1420. }),
  1421. $globals.HLCodeWidget);
  1422. $core.addMethod(
  1423. $core.method({
  1424. selector: "setEditorOn:",
  1425. protocol: 'actions',
  1426. fn: function (aTextarea){
  1427. var self=this;
  1428. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1429. return $core.withContext(function($ctx1) {
  1430. //>>excludeEnd("ctx");
  1431. self['@editor'] = self._class()._codeMirror().fromTextArea(aTextarea, self._editorOptions());
  1432. return self;
  1433. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1434. }, function($ctx1) {$ctx1.fill(self,"setEditorOn:",{aTextarea:aTextarea},$globals.HLCodeWidget)});
  1435. //>>excludeEnd("ctx");
  1436. },
  1437. //>>excludeStart("ide", pragmas.excludeIdeData);
  1438. args: ["aTextarea"],
  1439. source: "setEditorOn: aTextarea\x0a\x09<self['@editor'] = self._class()._codeMirror().fromTextArea(aTextarea, self._editorOptions())>",
  1440. referencedClasses: [],
  1441. //>>excludeEnd("ide");
  1442. messageSends: []
  1443. }),
  1444. $globals.HLCodeWidget);
  1445. $core.addMethod(
  1446. $core.method({
  1447. selector: "updateState",
  1448. protocol: 'updating',
  1449. fn: function (){
  1450. var self=this;
  1451. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1452. return $core.withContext(function($ctx1) {
  1453. //>>excludeEnd("ctx");
  1454. var $1,$2;
  1455. $1=self._hasModification();
  1456. if($core.assert($1)){
  1457. $2=$recv(self["@state"])._asJQuery();
  1458. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1459. $ctx1.sendIdx["asJQuery"]=1;
  1460. //>>excludeEnd("ctx");
  1461. $recv($2)._addClass_("modified");
  1462. } else {
  1463. $recv($recv(self["@state"])._asJQuery())._removeClass_("modified");
  1464. };
  1465. return self;
  1466. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1467. }, function($ctx1) {$ctx1.fill(self,"updateState",{},$globals.HLCodeWidget)});
  1468. //>>excludeEnd("ctx");
  1469. },
  1470. //>>excludeStart("ide", pragmas.excludeIdeData);
  1471. args: [],
  1472. source: "updateState\x0a\x09self hasModification \x0a\x09\x09ifTrue: [ state asJQuery addClass: 'modified' ]\x0a\x09\x09ifFalse: [ state asJQuery removeClass: 'modified' ]",
  1473. referencedClasses: [],
  1474. //>>excludeEnd("ide");
  1475. messageSends: ["ifTrue:ifFalse:", "hasModification", "addClass:", "asJQuery", "removeClass:"]
  1476. }),
  1477. $globals.HLCodeWidget);
  1478. $core.addMethod(
  1479. $core.method({
  1480. selector: "variableHintFor:token:",
  1481. protocol: 'hints',
  1482. fn: function (anEditor,aToken){
  1483. var self=this;
  1484. var variables,classNames,pseudoVariables;
  1485. function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1486. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1487. return $core.withContext(function($ctx1) {
  1488. //>>excludeEnd("ctx");
  1489. var $3,$2,$1,$8,$7,$6,$5,$9,$4;
  1490. $3=$recv($recv($recv(anEditor)._display())._wrapper())._asJQuery();
  1491. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1492. $ctx1.sendIdx["asJQuery"]=1;
  1493. //>>excludeEnd("ctx");
  1494. $2=$recv($3)._find_("span.cm-variable");
  1495. $1=$recv($2)._get();
  1496. variables=$recv($1)._collect_((function(each){
  1497. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1498. return $core.withContext(function($ctx2) {
  1499. //>>excludeEnd("ctx");
  1500. return $recv($recv(each)._asJQuery())._html();
  1501. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1502. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  1503. //>>excludeEnd("ctx");
  1504. }));
  1505. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1506. $ctx1.sendIdx["collect:"]=1;
  1507. //>>excludeEnd("ctx");
  1508. classNames=$recv($recv($Smalltalk())._classes())._collect_((function(each){
  1509. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1510. return $core.withContext(function($ctx2) {
  1511. //>>excludeEnd("ctx");
  1512. return $recv(each)._name();
  1513. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1514. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
  1515. //>>excludeEnd("ctx");
  1516. }));
  1517. pseudoVariables=$recv($Smalltalk())._pseudoVariableNames();
  1518. $8=$recv($recv(variables).__comma(classNames)).__comma(pseudoVariables);
  1519. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1520. $ctx1.sendIdx[","]=1;
  1521. //>>excludeEnd("ctx");
  1522. $7=$recv($8)._asSet();
  1523. $6=$recv($7)._asArray();
  1524. $5=$recv($6)._sort();
  1525. $4=$recv($5)._select_((function(each){
  1526. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1527. return $core.withContext(function($ctx2) {
  1528. //>>excludeEnd("ctx");
  1529. $9=$recv(aToken)._string();
  1530. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1531. $ctx2.sendIdx["string"]=1;
  1532. //>>excludeEnd("ctx");
  1533. return $recv(each)._includesSubString_($9);
  1534. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1535. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)});
  1536. //>>excludeEnd("ctx");
  1537. }));
  1538. return $recv($4)._reject_((function(each){
  1539. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1540. return $core.withContext(function($ctx2) {
  1541. //>>excludeEnd("ctx");
  1542. return $recv(each).__eq($recv(aToken)._string());
  1543. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1544. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)});
  1545. //>>excludeEnd("ctx");
  1546. }));
  1547. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1548. }, function($ctx1) {$ctx1.fill(self,"variableHintFor:token:",{anEditor:anEditor,aToken:aToken,variables:variables,classNames:classNames,pseudoVariables:pseudoVariables},$globals.HLCodeWidget)});
  1549. //>>excludeEnd("ctx");
  1550. },
  1551. //>>excludeStart("ide", pragmas.excludeIdeData);
  1552. args: ["anEditor", "aToken"],
  1553. source: "variableHintFor: anEditor token: aToken\x0a\x09| variables classNames pseudoVariables |\x0a\x09\x0a\x09variables := (anEditor display wrapper asJQuery find: 'span.cm-variable') get\x0a\x09\x09collect: [ :each | each asJQuery html ].\x0a\x09\x0a\x09classNames := Smalltalk classes collect: [ :each | each name ].\x0a\x09pseudoVariables := Smalltalk pseudoVariableNames.\x0a\x09\x0a\x09^ ((variables, classNames, pseudoVariables) asSet asArray sort\x0a\x09\x09select: [ :each | each includesSubString: aToken string ])\x0a\x09\x09reject: [ :each | each = aToken string ]",
  1554. referencedClasses: ["Smalltalk"],
  1555. //>>excludeEnd("ide");
  1556. messageSends: ["collect:", "get", "find:", "asJQuery", "wrapper", "display", "html", "classes", "name", "pseudoVariableNames", "reject:", "select:", "sort", "asArray", "asSet", ",", "includesSubString:", "string", "="]
  1557. }),
  1558. $globals.HLCodeWidget);
  1559. $core.addMethod(
  1560. $core.method({
  1561. selector: "codeMirror",
  1562. protocol: 'accessing',
  1563. fn: function (){
  1564. var self=this;
  1565. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1566. return $core.withContext(function($ctx1) {
  1567. //>>excludeEnd("ctx");
  1568. return $recv(require)._value_("codemirror/lib/codemirror");
  1569. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1570. }, function($ctx1) {$ctx1.fill(self,"codeMirror",{},$globals.HLCodeWidget.klass)});
  1571. //>>excludeEnd("ctx");
  1572. },
  1573. //>>excludeStart("ide", pragmas.excludeIdeData);
  1574. args: [],
  1575. source: "codeMirror\x0a\x09^ require value: 'codemirror/lib/codemirror'",
  1576. referencedClasses: [],
  1577. //>>excludeEnd("ide");
  1578. messageSends: ["value:"]
  1579. }),
  1580. $globals.HLCodeWidget.klass);
  1581. $core.addMethod(
  1582. $core.method({
  1583. selector: "hintFor:options:",
  1584. protocol: 'hints',
  1585. fn: function (anEditor,options){
  1586. var self=this;
  1587. var cursor,token,completions,codeMirror;
  1588. function $HLCodeWidget(){return $globals.HLCodeWidget||(typeof HLCodeWidget=="undefined"?nil:HLCodeWidget)}
  1589. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1590. return $core.withContext(function($ctx1) {
  1591. //>>excludeEnd("ctx");
  1592. var $1,$4,$3,$2,$5,$6,$8,$9,$7;
  1593. codeMirror=self._codeMirror();
  1594. cursor=$recv(anEditor)._getCursor();
  1595. token=$recv(anEditor)._getTokenAt_(cursor);
  1596. $1=token;
  1597. $4=$recv(codeMirror)._basicAt_("innerMode");
  1598. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1599. $ctx1.sendIdx["basicAt:"]=1;
  1600. //>>excludeEnd("ctx");
  1601. $3=$recv($4)._value_value_($recv(anEditor)._getMode(),$recv(token)._at_("state"));
  1602. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1603. $ctx1.sendIdx["value:value:"]=1;
  1604. //>>excludeEnd("ctx");
  1605. $2=$recv($3)._state();
  1606. $recv($1)._at_put_("state",$2);
  1607. $5=$recv($recv(token)._type()).__eq("variable");
  1608. if($core.assert($5)){
  1609. completions=$recv($HLCodeWidget())._variableHintFor_token_(anEditor,token);
  1610. } else {
  1611. completions=$recv($HLCodeWidget())._messageHintFor_token_(anEditor,token);
  1612. };
  1613. $6=completions;
  1614. $8=$recv(codeMirror)._basicAt_("Pos");
  1615. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1616. $ctx1.sendIdx["basicAt:"]=2;
  1617. //>>excludeEnd("ctx");
  1618. $9=$recv(cursor)._line();
  1619. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1620. $ctx1.sendIdx["line"]=1;
  1621. //>>excludeEnd("ctx");
  1622. $7=$recv($8)._value_value_($9,$recv(token)._end());
  1623. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1624. $ctx1.sendIdx["value:value:"]=2;
  1625. //>>excludeEnd("ctx");
  1626. return $globals.HashedCollection._newFromPairs_(["list",$6,"from",$7,"to",$recv($recv(codeMirror)._basicAt_("Pos"))._value_value_($recv(cursor)._line(),$recv(token)._start())]);
  1627. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1628. }, function($ctx1) {$ctx1.fill(self,"hintFor:options:",{anEditor:anEditor,options:options,cursor:cursor,token:token,completions:completions,codeMirror:codeMirror},$globals.HLCodeWidget.klass)});
  1629. //>>excludeEnd("ctx");
  1630. },
  1631. //>>excludeStart("ide", pragmas.excludeIdeData);
  1632. args: ["anEditor", "options"],
  1633. source: "hintFor: anEditor options: options\x0a\x09| cursor token completions codeMirror |\x0a\x09\x0a\x09codeMirror := self codeMirror.\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}",
  1634. referencedClasses: ["HLCodeWidget"],
  1635. //>>excludeEnd("ide");
  1636. messageSends: ["codeMirror", "getCursor", "getTokenAt:", "at:put:", "state", "value:value:", "basicAt:", "getMode", "at:", "ifTrue:ifFalse:", "=", "type", "variableHintFor:token:", "messageHintFor:token:", "line", "end", "start"]
  1637. }),
  1638. $globals.HLCodeWidget.klass);
  1639. $core.addMethod(
  1640. $core.method({
  1641. selector: "initialize",
  1642. protocol: 'initialization',
  1643. fn: function (){
  1644. var self=this;
  1645. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1646. return $core.withContext(function($ctx1) {
  1647. //>>excludeEnd("ctx");
  1648. (
  1649. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1650. $ctx1.supercall = true,
  1651. //>>excludeEnd("ctx");
  1652. ($globals.HLCodeWidget.klass.superclass||$boot.dnu).fn.prototype._initialize.apply($recv(self), []));
  1653. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1654. $ctx1.supercall = false;
  1655. //>>excludeEnd("ctx");;
  1656. self._setupCodeMirror();
  1657. self._setupCommands();
  1658. self._setupKeyMaps();
  1659. return self;
  1660. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1661. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.HLCodeWidget.klass)});
  1662. //>>excludeEnd("ctx");
  1663. },
  1664. //>>excludeStart("ide", pragmas.excludeIdeData);
  1665. args: [],
  1666. source: "initialize\x0a\x09super initialize.\x0a\x09self \x0a\x09\x09setupCodeMirror;\x0a\x09\x09setupCommands;\x0a\x09\x09setupKeyMaps.",
  1667. referencedClasses: [],
  1668. //>>excludeEnd("ide");
  1669. messageSends: ["initialize", "setupCodeMirror", "setupCommands", "setupKeyMaps"]
  1670. }),
  1671. $globals.HLCodeWidget.klass);
  1672. $core.addMethod(
  1673. $core.method({
  1674. selector: "keyMap",
  1675. protocol: 'accessing',
  1676. fn: function (){
  1677. var self=this;
  1678. function $HLManager(){return $globals.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  1679. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1680. return $core.withContext(function($ctx1) {
  1681. //>>excludeEnd("ctx");
  1682. var $1;
  1683. $1=$recv($recv($recv($HLManager())._current())._keyBinder())._systemIsMac();
  1684. if($core.assert($1)){
  1685. return self._macKeyMap();
  1686. } else {
  1687. return self._pcKeyMap();
  1688. };
  1689. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1690. }, function($ctx1) {$ctx1.fill(self,"keyMap",{},$globals.HLCodeWidget.klass)});
  1691. //>>excludeEnd("ctx");
  1692. },
  1693. //>>excludeStart("ide", pragmas.excludeIdeData);
  1694. args: [],
  1695. source: "keyMap\x0a\x09^ HLManager current keyBinder systemIsMac\x0a\x09\x09ifTrue: [ self macKeyMap ]\x0a\x09\x09ifFalse: [ self pcKeyMap ]",
  1696. referencedClasses: ["HLManager"],
  1697. //>>excludeEnd("ide");
  1698. messageSends: ["ifTrue:ifFalse:", "systemIsMac", "keyBinder", "current", "macKeyMap", "pcKeyMap"]
  1699. }),
  1700. $globals.HLCodeWidget.klass);
  1701. $core.addMethod(
  1702. $core.method({
  1703. selector: "macKeyMap",
  1704. protocol: 'accessing',
  1705. fn: function (){
  1706. var self=this;
  1707. return $globals.HashedCollection._newFromPairs_(["Alt-Backspace","delWordBefore","Alt-Delete","delWordAfter","Alt-Left","goWordLeft","Alt-Right","goWordRight","Cmd-A","selectAll","Cmd-Alt-F","replace","Cmd-D","doIt","Cmd-B","browseIt","Cmd-Down","goDocEnd","Cmd-End","goDocEnd","Cmd-F","find","Cmd-G","findNext","Cmd-I","inspectIt","Cmd-Left","goLineStart","Cmd-P","printIt","Cmd-Right","goLineEnd","Cmd-S","saveIt","Cmd-Up","goDocStart","Cmd-Y","redo","Cmd-Z","undo","Cmd-[","indentLess","Cmd-]","indentMore","Ctrl-Alt-Backspace","delWordAfter","Shift-Cmd-Alt-F","replaceAll","Shift-Cmd-G","findPrev","Shift-Cmd-Z","redo","fallthrough",["basic","emacsy"]]);
  1708. },
  1709. //>>excludeStart("ide", pragmas.excludeIdeData);
  1710. args: [],
  1711. source: "macKeyMap\x0a\x09^ #{\x0a\x09\x09'Alt-Backspace'\x09\x09\x09-> 'delWordBefore'.\x0a\x09\x09'Alt-Delete'\x09\x09\x09-> 'delWordAfter'. \x0a\x09\x09'Alt-Left'\x09\x09\x09\x09-> 'goWordLeft'.\x0a\x09\x09'Alt-Right'\x09\x09\x09\x09-> 'goWordRight'. \x0a\x09\x09'Cmd-A'\x09\x09\x09\x09\x09-> 'selectAll'. \x0a\x09\x09'Cmd-Alt-F'\x09\x09\x09\x09-> 'replace'. \x0a\x09\x09'Cmd-D'\x09\x09\x09\x09\x09-> 'doIt'. \x0a\x09\x09'Cmd-B'\x09\x09\x09\x09\x09-> 'browseIt'. \x0a\x09\x09'Cmd-Down'\x09\x09\x09\x09-> 'goDocEnd'. \x0a\x09\x09'Cmd-End'\x09\x09\x09\x09-> 'goDocEnd'. \x0a\x09\x09'Cmd-F'\x09\x09\x09\x09\x09-> 'find'.\x0a\x09\x09'Cmd-G'\x09\x09\x09\x09\x09-> 'findNext'. \x0a\x09\x09'Cmd-I'\x09\x09\x09\x09\x09-> 'inspectIt'. \x0a\x09\x09'Cmd-Left'\x09\x09\x09\x09-> 'goLineStart'. \x0a\x09\x09'Cmd-P'\x09\x09\x09\x09\x09-> 'printIt'. \x0a\x09\x09'Cmd-Right'\x09\x09\x09\x09-> 'goLineEnd'. \x0a\x09\x09'Cmd-S'\x09\x09\x09\x09\x09-> 'saveIt'. \x0a\x09\x09'Cmd-Up'\x09\x09\x09\x09-> 'goDocStart'. \x0a\x09\x09'Cmd-Y'\x09\x09\x09\x09\x09-> 'redo'.\x0a\x09\x09'Cmd-Z'\x09\x09\x09\x09\x09-> 'undo'. \x0a\x09\x09'Cmd-['\x09\x09\x09\x09\x09-> 'indentLess'. \x0a\x09\x09'Cmd-]'\x09\x09\x09\x09\x09-> 'indentMore'.\x0a\x09\x09'Ctrl-Alt-Backspace'\x09-> 'delWordAfter'. \x0a\x09\x09'Shift-Cmd-Alt-F'\x09\x09-> 'replaceAll'.\x0a\x09\x09'Shift-Cmd-G'\x09\x09\x09-> 'findPrev'. \x0a\x09\x09'Shift-Cmd-Z'\x09\x09\x09-> 'redo'. \x0a \x09'fallthrough' \x09\x09\x09-> { 'basic'. 'emacsy' }\x0a }",
  1712. referencedClasses: [],
  1713. //>>excludeEnd("ide");
  1714. messageSends: []
  1715. }),
  1716. $globals.HLCodeWidget.klass);
  1717. $core.addMethod(
  1718. $core.method({
  1719. selector: "messageHintFor:token:",
  1720. protocol: 'hints',
  1721. fn: function (anEditor,aToken){
  1722. var self=this;
  1723. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1724. return $core.withContext(function($ctx1) {
  1725. //>>excludeEnd("ctx");
  1726. return $recv($recv(anEditor)._at_("amberCodeWidget"))._messageHintFor_token_(anEditor,aToken);
  1727. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1728. }, function($ctx1) {$ctx1.fill(self,"messageHintFor:token:",{anEditor:anEditor,aToken:aToken},$globals.HLCodeWidget.klass)});
  1729. //>>excludeEnd("ctx");
  1730. },
  1731. //>>excludeStart("ide", pragmas.excludeIdeData);
  1732. args: ["anEditor", "aToken"],
  1733. source: "messageHintFor: anEditor token: aToken\x0a\x09^ (anEditor at: 'amberCodeWidget')\x0a\x09\x09messageHintFor: anEditor token: aToken",
  1734. referencedClasses: [],
  1735. //>>excludeEnd("ide");
  1736. messageSends: ["messageHintFor:token:", "at:"]
  1737. }),
  1738. $globals.HLCodeWidget.klass);
  1739. $core.addMethod(
  1740. $core.method({
  1741. selector: "pcKeyMap",
  1742. protocol: 'accessing',
  1743. fn: function (){
  1744. var self=this;
  1745. return $globals.HashedCollection._newFromPairs_(["Alt-Left","goLineStart","Alt-Right","goLineEnd","Alt-Up","goDocStart","Ctrl-A","selectAll","Ctrl-Backspace","delWordBefore","Ctrl-D","doIt","Ctrl-B","browseIt","Ctrl-Delete","delWordAfter","Ctrl-Down","goDocEnd","Ctrl-End","goDocEnd","Ctrl-F","find","Ctrl-G","findNext","Ctrl-I","inspectIt","Ctrl-Home","goDocStart","Ctrl-Left","goWordLeft","Ctrl-P","printIt","Ctrl-Right","goWordRight","Ctrl-S","saveIt","Ctrl-Y","redo","Ctrl-Z","undo","Ctrl-[","indentLess","Ctrl-]","indentMore","Shift-Ctrl-F","replace","Shift-Ctrl-G","findPrev","Shift-Ctrl-R","replaceAll","Shift-Ctrl-Z","redo","fallthrough",["basic"]]);
  1746. },
  1747. //>>excludeStart("ide", pragmas.excludeIdeData);
  1748. args: [],
  1749. source: "pcKeyMap\x0a\x09^ #{\x0a\x09\x09'Alt-Left' -> \x09\x09'goLineStart'. \x0a\x09\x09'Alt-Right' -> \x09\x09'goLineEnd'.\x0a\x09\x09'Alt-Up' -> \x09\x09'goDocStart'. \x0a\x09\x09'Ctrl-A' -> \x09\x09'selectAll'. \x0a\x09\x09'Ctrl-Backspace' -> 'delWordBefore'. \x0a\x09\x09'Ctrl-D' -> \x09\x09'doIt'. \x0a\x09\x09'Ctrl-B' -> \x09\x09'browseIt'. \x0a\x09\x09'Ctrl-Delete' -> \x09\x09'delWordAfter'. \x0a\x09\x09'Ctrl-Down' -> \x09\x09'goDocEnd'.\x0a\x09\x09'Ctrl-End' -> \x09\x09'goDocEnd'. \x0a\x09\x09'Ctrl-F' -> \x09\x09'find'.\x0a\x09\x09'Ctrl-G' -> \x09\x09'findNext'. \x0a\x09\x09'Ctrl-I' -> \x09\x09'inspectIt'.\x0a\x09\x09'Ctrl-Home' -> \x09\x09'goDocStart'. \x0a\x09\x09'Ctrl-Left' -> \x09\x09'goWordLeft'. \x0a\x09\x09'Ctrl-P' -> \x09\x09'printIt'.\x0a\x09\x09'Ctrl-Right' -> \x09'goWordRight'. \x0a\x09\x09'Ctrl-S' -> \x09\x09'saveIt'. \x0a\x09\x09'Ctrl-Y' -> \x09\x09'redo'.\x0a\x09\x09'Ctrl-Z' -> \x09\x09'undo'. \x0a\x09\x09'Ctrl-[' -> \x09\x09'indentLess'. \x0a\x09\x09'Ctrl-]' -> \x09\x09'indentMore'.\x0a\x09\x09'Shift-Ctrl-F' -> \x09'replace'. \x0a\x09\x09'Shift-Ctrl-G' -> \x09'findPrev'. \x0a\x09\x09'Shift-Ctrl-R' -> \x09'replaceAll'.\x0a\x09\x09'Shift-Ctrl-Z' -> \x09'redo'. \x0a\x09\x09'fallthrough' -> \x09#('basic')\x0a}",
  1750. referencedClasses: [],
  1751. //>>excludeEnd("ide");
  1752. messageSends: []
  1753. }),
  1754. $globals.HLCodeWidget.klass);
  1755. $core.addMethod(
  1756. $core.method({
  1757. selector: "setupCodeMirror",
  1758. protocol: 'initialization',
  1759. fn: function (){
  1760. var self=this;
  1761. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1762. return $core.withContext(function($ctx1) {
  1763. //>>excludeEnd("ctx");
  1764. var codeMirror = self._codeMirror();
  1765. codeMirror.keyMap["default"].fallthrough = ["basic"];
  1766. codeMirror.commands.autocomplete = function(cm) {
  1767. codeMirror.showHint(cm, self._hintFor_options_.bind(self));
  1768. }
  1769. ;
  1770. return self;
  1771. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1772. }, function($ctx1) {$ctx1.fill(self,"setupCodeMirror",{},$globals.HLCodeWidget.klass)});
  1773. //>>excludeEnd("ctx");
  1774. },
  1775. //>>excludeStart("ide", pragmas.excludeIdeData);
  1776. args: [],
  1777. source: "setupCodeMirror\x0a\x09<\x0a\x09\x09var codeMirror = self._codeMirror();\x0a\x09\x09codeMirror.keyMap[\x22default\x22].fallthrough = [\x22basic\x22];\x0a\x09\x09codeMirror.commands.autocomplete = function(cm) {\x0a\x09\x09\x09codeMirror.showHint(cm, self._hintFor_options_.bind(self));\x0a\x09\x09}\x0a\x09>",
  1778. referencedClasses: [],
  1779. //>>excludeEnd("ide");
  1780. messageSends: []
  1781. }),
  1782. $globals.HLCodeWidget.klass);
  1783. $core.addMethod(
  1784. $core.method({
  1785. selector: "setupCommands",
  1786. protocol: 'initialization',
  1787. fn: function (){
  1788. var self=this;
  1789. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1790. return $core.withContext(function($ctx1) {
  1791. //>>excludeEnd("ctx");
  1792. var $1,$2,$3,$4,$5;
  1793. $1=$recv(self._codeMirror())._basicAt_("commands");
  1794. $recv($1)._at_put_("doIt",(function(cm){
  1795. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1796. return $core.withContext(function($ctx2) {
  1797. //>>excludeEnd("ctx");
  1798. $2=$recv(cm)._amberCodeWidget();
  1799. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1800. $ctx2.sendIdx["amberCodeWidget"]=1;
  1801. //>>excludeEnd("ctx");
  1802. return $recv($2)._doIt();
  1803. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1804. }, function($ctx2) {$ctx2.fillBlock({cm:cm},$ctx1,1)});
  1805. //>>excludeEnd("ctx");
  1806. }));
  1807. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1808. $ctx1.sendIdx["at:put:"]=1;
  1809. //>>excludeEnd("ctx");
  1810. $recv($1)._at_put_("inspectIt",(function(cm){
  1811. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1812. return $core.withContext(function($ctx2) {
  1813. //>>excludeEnd("ctx");
  1814. $3=$recv(cm)._amberCodeWidget();
  1815. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1816. $ctx2.sendIdx["amberCodeWidget"]=2;
  1817. //>>excludeEnd("ctx");
  1818. return $recv($3)._inspectIt();
  1819. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1820. }, function($ctx2) {$ctx2.fillBlock({cm:cm},$ctx1,2)});
  1821. //>>excludeEnd("ctx");
  1822. }));
  1823. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1824. $ctx1.sendIdx["at:put:"]=2;
  1825. //>>excludeEnd("ctx");
  1826. $recv($1)._at_put_("printIt",(function(cm){
  1827. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1828. return $core.withContext(function($ctx2) {
  1829. //>>excludeEnd("ctx");
  1830. $4=$recv(cm)._amberCodeWidget();
  1831. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1832. $ctx2.sendIdx["amberCodeWidget"]=3;
  1833. //>>excludeEnd("ctx");
  1834. return $recv($4)._printIt();
  1835. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1836. }, function($ctx2) {$ctx2.fillBlock({cm:cm},$ctx1,3)});
  1837. //>>excludeEnd("ctx");
  1838. }));
  1839. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1840. $ctx1.sendIdx["at:put:"]=3;
  1841. //>>excludeEnd("ctx");
  1842. $recv($1)._at_put_("saveIt",(function(cm){
  1843. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1844. return $core.withContext(function($ctx2) {
  1845. //>>excludeEnd("ctx");
  1846. $5=$recv(cm)._amberCodeWidget();
  1847. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1848. $ctx2.sendIdx["amberCodeWidget"]=4;
  1849. //>>excludeEnd("ctx");
  1850. return $recv($5)._saveIt();
  1851. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1852. }, function($ctx2) {$ctx2.fillBlock({cm:cm},$ctx1,4)});
  1853. //>>excludeEnd("ctx");
  1854. }));
  1855. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1856. $ctx1.sendIdx["at:put:"]=4;
  1857. //>>excludeEnd("ctx");
  1858. $recv($1)._at_put_("browseIt",(function(cm){
  1859. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1860. return $core.withContext(function($ctx2) {
  1861. //>>excludeEnd("ctx");
  1862. return $recv($recv(cm)._amberCodeWidget())._browseIt();
  1863. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1864. }, function($ctx2) {$ctx2.fillBlock({cm:cm},$ctx1,5)});
  1865. //>>excludeEnd("ctx");
  1866. }));
  1867. return self;
  1868. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1869. }, function($ctx1) {$ctx1.fill(self,"setupCommands",{},$globals.HLCodeWidget.klass)});
  1870. //>>excludeEnd("ctx");
  1871. },
  1872. //>>excludeStart("ide", pragmas.excludeIdeData);
  1873. args: [],
  1874. source: "setupCommands\x0a\x09(self 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 ];\x0a\x09\x09at: 'browseIt' put: [ :cm | cm amberCodeWidget browseIt ]",
  1875. referencedClasses: [],
  1876. //>>excludeEnd("ide");
  1877. messageSends: ["at:put:", "basicAt:", "codeMirror", "doIt", "amberCodeWidget", "inspectIt", "printIt", "saveIt", "browseIt"]
  1878. }),
  1879. $globals.HLCodeWidget.klass);
  1880. $core.addMethod(
  1881. $core.method({
  1882. selector: "setupKeyMaps",
  1883. protocol: 'initialization',
  1884. fn: function (){
  1885. var self=this;
  1886. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1887. return $core.withContext(function($ctx1) {
  1888. //>>excludeEnd("ctx");
  1889. self._codeMirror().keyMap['Amber'] = self._keyMap();
  1890. return self;
  1891. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1892. }, function($ctx1) {$ctx1.fill(self,"setupKeyMaps",{},$globals.HLCodeWidget.klass)});
  1893. //>>excludeEnd("ctx");
  1894. },
  1895. //>>excludeStart("ide", pragmas.excludeIdeData);
  1896. args: [],
  1897. source: "setupKeyMaps\x0a\x09<self._codeMirror().keyMap['Amber'] = self._keyMap()>",
  1898. referencedClasses: [],
  1899. //>>excludeEnd("ide");
  1900. messageSends: []
  1901. }),
  1902. $globals.HLCodeWidget.klass);
  1903. $core.addMethod(
  1904. $core.method({
  1905. selector: "variableHintFor:token:",
  1906. protocol: 'hints',
  1907. fn: function (anEditor,aToken){
  1908. var self=this;
  1909. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1910. return $core.withContext(function($ctx1) {
  1911. //>>excludeEnd("ctx");
  1912. return $recv($recv(anEditor)._at_("amberCodeWidget"))._variableHintFor_token_(anEditor,aToken);
  1913. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1914. }, function($ctx1) {$ctx1.fill(self,"variableHintFor:token:",{anEditor:anEditor,aToken:aToken},$globals.HLCodeWidget.klass)});
  1915. //>>excludeEnd("ctx");
  1916. },
  1917. //>>excludeStart("ide", pragmas.excludeIdeData);
  1918. args: ["anEditor", "aToken"],
  1919. source: "variableHintFor: anEditor token: aToken\x0a\x09^ (anEditor at: 'amberCodeWidget')\x0a\x09\x09variableHintFor: anEditor token: aToken",
  1920. referencedClasses: [],
  1921. //>>excludeEnd("ide");
  1922. messageSends: ["variableHintFor:token:", "at:"]
  1923. }),
  1924. $globals.HLCodeWidget.klass);
  1925. $core.addClass('HLNavigationCodeWidget', $globals.HLCodeWidget, ['methodContents'], 'Helios-Workspace');
  1926. $core.addMethod(
  1927. $core.method({
  1928. selector: "configureEditor",
  1929. protocol: 'accessing',
  1930. fn: function (){
  1931. var self=this;
  1932. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1933. return $core.withContext(function($ctx1) {
  1934. //>>excludeEnd("ctx");
  1935. (
  1936. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1937. $ctx1.supercall = true,
  1938. //>>excludeEnd("ctx");
  1939. ($globals.HLNavigationCodeWidget.superclass||$boot.dnu).fn.prototype._configureEditor.apply($recv(self), []));
  1940. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1941. $ctx1.supercall = false;
  1942. //>>excludeEnd("ctx");;
  1943. self._contents_(self._methodContents());
  1944. return self;
  1945. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1946. }, function($ctx1) {$ctx1.fill(self,"configureEditor",{},$globals.HLNavigationCodeWidget)});
  1947. //>>excludeEnd("ctx");
  1948. },
  1949. //>>excludeStart("ide", pragmas.excludeIdeData);
  1950. args: [],
  1951. source: "configureEditor\x0a\x09super configureEditor.\x0a\x09self contents: self methodContents",
  1952. referencedClasses: [],
  1953. //>>excludeEnd("ide");
  1954. messageSends: ["configureEditor", "contents:", "methodContents"]
  1955. }),
  1956. $globals.HLNavigationCodeWidget);
  1957. $core.addMethod(
  1958. $core.method({
  1959. selector: "contents:",
  1960. protocol: 'accessing',
  1961. fn: function (aString){
  1962. var self=this;
  1963. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1964. return $core.withContext(function($ctx1) {
  1965. //>>excludeEnd("ctx");
  1966. self._methodContents_(aString);
  1967. (
  1968. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1969. $ctx1.supercall = true,
  1970. //>>excludeEnd("ctx");
  1971. ($globals.HLNavigationCodeWidget.superclass||$boot.dnu).fn.prototype._contents_.apply($recv(self), [aString]));
  1972. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1973. $ctx1.supercall = false;
  1974. //>>excludeEnd("ctx");;
  1975. return self;
  1976. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1977. }, function($ctx1) {$ctx1.fill(self,"contents:",{aString:aString},$globals.HLNavigationCodeWidget)});
  1978. //>>excludeEnd("ctx");
  1979. },
  1980. //>>excludeStart("ide", pragmas.excludeIdeData);
  1981. args: ["aString"],
  1982. source: "contents: aString\x0a\x09self methodContents: aString.\x0a\x09super contents: aString",
  1983. referencedClasses: [],
  1984. //>>excludeEnd("ide");
  1985. messageSends: ["methodContents:", "contents:"]
  1986. }),
  1987. $globals.HLNavigationCodeWidget);
  1988. $core.addMethod(
  1989. $core.method({
  1990. selector: "hasModification",
  1991. protocol: 'testing',
  1992. fn: function (){
  1993. var self=this;
  1994. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1995. return $core.withContext(function($ctx1) {
  1996. //>>excludeEnd("ctx");
  1997. return $recv($recv(self._methodContents()).__eq(self._contents()))._not();
  1998. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1999. }, function($ctx1) {$ctx1.fill(self,"hasModification",{},$globals.HLNavigationCodeWidget)});
  2000. //>>excludeEnd("ctx");
  2001. },
  2002. //>>excludeStart("ide", pragmas.excludeIdeData);
  2003. args: [],
  2004. source: "hasModification\x0a\x09^ (self methodContents = self contents) not",
  2005. referencedClasses: [],
  2006. //>>excludeEnd("ide");
  2007. messageSends: ["not", "=", "methodContents", "contents"]
  2008. }),
  2009. $globals.HLNavigationCodeWidget);
  2010. $core.addMethod(
  2011. $core.method({
  2012. selector: "methodContents",
  2013. protocol: 'accessing',
  2014. fn: function (){
  2015. var self=this;
  2016. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2017. return $core.withContext(function($ctx1) {
  2018. //>>excludeEnd("ctx");
  2019. var $1,$receiver;
  2020. $1=self["@methodContents"];
  2021. if(($receiver = $1) == null || $receiver.isNil){
  2022. return "";
  2023. } else {
  2024. return $1;
  2025. };
  2026. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2027. }, function($ctx1) {$ctx1.fill(self,"methodContents",{},$globals.HLNavigationCodeWidget)});
  2028. //>>excludeEnd("ctx");
  2029. },
  2030. //>>excludeStart("ide", pragmas.excludeIdeData);
  2031. args: [],
  2032. source: "methodContents\x0a\x09^ methodContents ifNil: [ '' ]",
  2033. referencedClasses: [],
  2034. //>>excludeEnd("ide");
  2035. messageSends: ["ifNil:"]
  2036. }),
  2037. $globals.HLNavigationCodeWidget);
  2038. $core.addMethod(
  2039. $core.method({
  2040. selector: "methodContents:",
  2041. protocol: 'accessing',
  2042. fn: function (aString){
  2043. var self=this;
  2044. var $1;
  2045. self["@methodContents"]=aString;
  2046. $1=self["@methodContents"];
  2047. return $1;
  2048. },
  2049. //>>excludeStart("ide", pragmas.excludeIdeData);
  2050. args: ["aString"],
  2051. source: "methodContents: aString\x0a\x09^ methodContents := aString",
  2052. referencedClasses: [],
  2053. //>>excludeEnd("ide");
  2054. messageSends: []
  2055. }),
  2056. $globals.HLNavigationCodeWidget);
  2057. $core.addMethod(
  2058. $core.method({
  2059. selector: "previous",
  2060. protocol: 'accessing',
  2061. fn: function (){
  2062. var self=this;
  2063. return self;
  2064. },
  2065. //>>excludeStart("ide", pragmas.excludeIdeData);
  2066. args: [],
  2067. source: "previous\x0a\x09\x22for browser lists widget\x22",
  2068. referencedClasses: [],
  2069. //>>excludeEnd("ide");
  2070. messageSends: []
  2071. }),
  2072. $globals.HLNavigationCodeWidget);
  2073. $core.addMethod(
  2074. $core.method({
  2075. selector: "previous:",
  2076. protocol: 'accessing',
  2077. fn: function (aWidget){
  2078. var self=this;
  2079. return self;
  2080. },
  2081. //>>excludeStart("ide", pragmas.excludeIdeData);
  2082. args: ["aWidget"],
  2083. source: "previous: aWidget\x0a\x09\x22for browser lists widget\x22",
  2084. referencedClasses: [],
  2085. //>>excludeEnd("ide");
  2086. messageSends: []
  2087. }),
  2088. $globals.HLNavigationCodeWidget);
  2089. $core.addMethod(
  2090. $core.method({
  2091. selector: "canBeOpenAsTab",
  2092. protocol: 'testing',
  2093. fn: function (){
  2094. var self=this;
  2095. return false;
  2096. },
  2097. //>>excludeStart("ide", pragmas.excludeIdeData);
  2098. args: [],
  2099. source: "canBeOpenAsTab\x0a\x09^ false",
  2100. referencedClasses: [],
  2101. //>>excludeEnd("ide");
  2102. messageSends: []
  2103. }),
  2104. $globals.HLNavigationCodeWidget.klass);
  2105. $core.addMethod(
  2106. $core.method({
  2107. selector: "on:",
  2108. protocol: 'instance creation',
  2109. fn: function (aBrowserModel){
  2110. var self=this;
  2111. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2112. return $core.withContext(function($ctx1) {
  2113. //>>excludeEnd("ctx");
  2114. var $1;
  2115. $1=self._new();
  2116. $recv($1)._browserModel_(aBrowserModel);
  2117. return $recv($1)._yourself();
  2118. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2119. }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowserModel:aBrowserModel},$globals.HLNavigationCodeWidget.klass)});
  2120. //>>excludeEnd("ctx");
  2121. },
  2122. //>>excludeStart("ide", pragmas.excludeIdeData);
  2123. args: ["aBrowserModel"],
  2124. source: "on: aBrowserModel\x0a\x09^ self new\x0a\x09\x09browserModel: aBrowserModel;\x0a\x09\x09yourself",
  2125. referencedClasses: [],
  2126. //>>excludeEnd("ide");
  2127. messageSends: ["browserModel:", "new", "yourself"]
  2128. }),
  2129. $globals.HLNavigationCodeWidget.klass);
  2130. $core.addClass('HLBrowserCodeWidget', $globals.HLNavigationCodeWidget, ['browserModel'], 'Helios-Workspace');
  2131. $core.addMethod(
  2132. $core.method({
  2133. selector: "browserModel",
  2134. protocol: 'accessing',
  2135. fn: function (){
  2136. var self=this;
  2137. return self["@browserModel"];
  2138. },
  2139. //>>excludeStart("ide", pragmas.excludeIdeData);
  2140. args: [],
  2141. source: "browserModel\x0a\x09^ browserModel",
  2142. referencedClasses: [],
  2143. //>>excludeEnd("ide");
  2144. messageSends: []
  2145. }),
  2146. $globals.HLBrowserCodeWidget);
  2147. $core.addMethod(
  2148. $core.method({
  2149. selector: "browserModel:",
  2150. protocol: 'accessing',
  2151. fn: function (aBrowserModel){
  2152. var self=this;
  2153. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2154. return $core.withContext(function($ctx1) {
  2155. //>>excludeEnd("ctx");
  2156. self["@browserModel"]=aBrowserModel;
  2157. self._observeSystem();
  2158. self._observeBrowserModel();
  2159. return self;
  2160. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2161. }, function($ctx1) {$ctx1.fill(self,"browserModel:",{aBrowserModel:aBrowserModel},$globals.HLBrowserCodeWidget)});
  2162. //>>excludeEnd("ctx");
  2163. },
  2164. //>>excludeStart("ide", pragmas.excludeIdeData);
  2165. args: ["aBrowserModel"],
  2166. source: "browserModel: aBrowserModel\x0a\x09browserModel := aBrowserModel.\x0a\x09self \x0a\x09\x09observeSystem;\x0a\x09\x09observeBrowserModel",
  2167. referencedClasses: [],
  2168. //>>excludeEnd("ide");
  2169. messageSends: ["observeSystem", "observeBrowserModel"]
  2170. }),
  2171. $globals.HLBrowserCodeWidget);
  2172. $core.addMethod(
  2173. $core.method({
  2174. selector: "observeBrowserModel",
  2175. protocol: 'actions',
  2176. fn: function (){
  2177. var self=this;
  2178. function $HLSaveSourceCode(){return $globals.HLSaveSourceCode||(typeof HLSaveSourceCode=="undefined"?nil:HLSaveSourceCode)}
  2179. function $HLShowInstanceToggled(){return $globals.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
  2180. function $HLSourceCodeSaved(){return $globals.HLSourceCodeSaved||(typeof HLSourceCodeSaved=="undefined"?nil:HLSourceCodeSaved)}
  2181. function $HLAboutToChange(){return $globals.HLAboutToChange||(typeof HLAboutToChange=="undefined"?nil:HLAboutToChange)}
  2182. function $HLParseErrorRaised(){return $globals.HLParseErrorRaised||(typeof HLParseErrorRaised=="undefined"?nil:HLParseErrorRaised)}
  2183. function $HLCompileErrorRaised(){return $globals.HLCompileErrorRaised||(typeof HLCompileErrorRaised=="undefined"?nil:HLCompileErrorRaised)}
  2184. function $HLUnknownVariableErrorRaised(){return $globals.HLUnknownVariableErrorRaised||(typeof HLUnknownVariableErrorRaised=="undefined"?nil:HLUnknownVariableErrorRaised)}
  2185. function $HLInstVarAdded(){return $globals.HLInstVarAdded||(typeof HLInstVarAdded=="undefined"?nil:HLInstVarAdded)}
  2186. function $HLMethodSelected(){return $globals.HLMethodSelected||(typeof HLMethodSelected=="undefined"?nil:HLMethodSelected)}
  2187. function $HLClassSelected(){return $globals.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
  2188. function $HLPackageSelected(){return $globals.HLPackageSelected||(typeof HLPackageSelected=="undefined"?nil:HLPackageSelected)}
  2189. function $HLProtocolSelected(){return $globals.HLProtocolSelected||(typeof HLProtocolSelected=="undefined"?nil:HLProtocolSelected)}
  2190. function $HLSourceCodeFocusRequested(){return $globals.HLSourceCodeFocusRequested||(typeof HLSourceCodeFocusRequested=="undefined"?nil:HLSourceCodeFocusRequested)}
  2191. function $HLShowTemplate(){return $globals.HLShowTemplate||(typeof HLShowTemplate=="undefined"?nil:HLShowTemplate)}
  2192. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2193. return $core.withContext(function($ctx1) {
  2194. //>>excludeEnd("ctx");
  2195. var $1;
  2196. $1=$recv(self._browserModel())._announcer();
  2197. $recv($1)._on_send_to_($HLSaveSourceCode(),"onSaveIt",self);
  2198. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2199. $ctx1.sendIdx["on:send:to:"]=1;
  2200. //>>excludeEnd("ctx");
  2201. $recv($1)._on_send_to_($HLShowInstanceToggled(),"onShowInstanceToggled",self);
  2202. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2203. $ctx1.sendIdx["on:send:to:"]=2;
  2204. //>>excludeEnd("ctx");
  2205. $recv($1)._on_send_to_($HLSourceCodeSaved(),"onSourceCodeSaved",self);
  2206. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2207. $ctx1.sendIdx["on:send:to:"]=3;
  2208. //>>excludeEnd("ctx");
  2209. $recv($1)._on_send_to_($HLAboutToChange(),"onBrowserAboutToChange:",self);
  2210. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2211. $ctx1.sendIdx["on:send:to:"]=4;
  2212. //>>excludeEnd("ctx");
  2213. $recv($1)._on_send_to_($HLParseErrorRaised(),"onParseError:",self);
  2214. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2215. $ctx1.sendIdx["on:send:to:"]=5;
  2216. //>>excludeEnd("ctx");
  2217. $recv($1)._on_send_to_($HLCompileErrorRaised(),"onCompileError:",self);
  2218. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2219. $ctx1.sendIdx["on:send:to:"]=6;
  2220. //>>excludeEnd("ctx");
  2221. $recv($1)._on_send_to_($HLUnknownVariableErrorRaised(),"onUnknownVariableError:",self);
  2222. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2223. $ctx1.sendIdx["on:send:to:"]=7;
  2224. //>>excludeEnd("ctx");
  2225. $recv($1)._on_send_to_($HLInstVarAdded(),"onInstVarAdded",self);
  2226. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2227. $ctx1.sendIdx["on:send:to:"]=8;
  2228. //>>excludeEnd("ctx");
  2229. $recv($1)._on_send_to_($HLMethodSelected(),"onMethodSelected:",self);
  2230. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2231. $ctx1.sendIdx["on:send:to:"]=9;
  2232. //>>excludeEnd("ctx");
  2233. $recv($1)._on_send_to_($HLClassSelected(),"onClassSelected:",self);
  2234. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2235. $ctx1.sendIdx["on:send:to:"]=10;
  2236. //>>excludeEnd("ctx");
  2237. $recv($1)._on_send_to_($HLPackageSelected(),"onPackageSelected:",self);
  2238. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2239. $ctx1.sendIdx["on:send:to:"]=11;
  2240. //>>excludeEnd("ctx");
  2241. $recv($1)._on_send_to_($HLProtocolSelected(),"onProtocolSelected:",self);
  2242. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2243. $ctx1.sendIdx["on:send:to:"]=12;
  2244. //>>excludeEnd("ctx");
  2245. $recv($1)._on_send_to_($HLSourceCodeFocusRequested(),"onSourceCodeFocusRequested",self);
  2246. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2247. $ctx1.sendIdx["on:send:to:"]=13;
  2248. //>>excludeEnd("ctx");
  2249. $recv($1)._on_send_to_($HLShowTemplate(),"onShowTemplate:",self);
  2250. return self;
  2251. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2252. }, function($ctx1) {$ctx1.fill(self,"observeBrowserModel",{},$globals.HLBrowserCodeWidget)});
  2253. //>>excludeEnd("ctx");
  2254. },
  2255. //>>excludeStart("ide", pragmas.excludeIdeData);
  2256. args: [],
  2257. 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\x09\x09on: HLPackageSelected \x0a\x09\x09send: #onPackageSelected:\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;\x0a\x09\x09\x0a\x09\x09on: HLShowTemplate\x0a\x09\x09send: #onShowTemplate:\x0a\x09\x09to: self",
  2258. referencedClasses: ["HLSaveSourceCode", "HLShowInstanceToggled", "HLSourceCodeSaved", "HLAboutToChange", "HLParseErrorRaised", "HLCompileErrorRaised", "HLUnknownVariableErrorRaised", "HLInstVarAdded", "HLMethodSelected", "HLClassSelected", "HLPackageSelected", "HLProtocolSelected", "HLSourceCodeFocusRequested", "HLShowTemplate"],
  2259. //>>excludeEnd("ide");
  2260. messageSends: ["on:send:to:", "announcer", "browserModel"]
  2261. }),
  2262. $globals.HLBrowserCodeWidget);
  2263. $core.addMethod(
  2264. $core.method({
  2265. selector: "observeSystem",
  2266. protocol: 'actions',
  2267. fn: function (){
  2268. var self=this;
  2269. function $MethodModified(){return $globals.MethodModified||(typeof MethodModified=="undefined"?nil:MethodModified)}
  2270. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2271. return $core.withContext(function($ctx1) {
  2272. //>>excludeEnd("ctx");
  2273. $recv($recv(self._browserModel())._systemAnnouncer())._on_send_to_($MethodModified(),"onMethodModified:",self);
  2274. return self;
  2275. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2276. }, function($ctx1) {$ctx1.fill(self,"observeSystem",{},$globals.HLBrowserCodeWidget)});
  2277. //>>excludeEnd("ctx");
  2278. },
  2279. //>>excludeStart("ide", pragmas.excludeIdeData);
  2280. args: [],
  2281. source: "observeSystem\x0a\x09self browserModel systemAnnouncer\x0a \x09on: MethodModified\x0a send: #onMethodModified:\x0a\x09\x09to: self",
  2282. referencedClasses: ["MethodModified"],
  2283. //>>excludeEnd("ide");
  2284. messageSends: ["on:send:to:", "systemAnnouncer", "browserModel"]
  2285. }),
  2286. $globals.HLBrowserCodeWidget);
  2287. $core.addMethod(
  2288. $core.method({
  2289. selector: "onBrowserAboutToChange:",
  2290. protocol: 'reactions',
  2291. fn: function (anAnnouncement){
  2292. var self=this;
  2293. var block;
  2294. function $HLChangeForbidden(){return $globals.HLChangeForbidden||(typeof HLChangeForbidden=="undefined"?nil:HLChangeForbidden)}
  2295. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2296. return $core.withContext(function($ctx1) {
  2297. //>>excludeEnd("ctx");
  2298. var $1;
  2299. block=$recv(anAnnouncement)._actionBlock();
  2300. $1=self._hasModification();
  2301. if($core.assert($1)){
  2302. self._confirm_ifTrue_("Changes have not been saved. Do you want to discard these changes?",(function(){
  2303. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2304. return $core.withContext(function($ctx2) {
  2305. //>>excludeEnd("ctx");
  2306. self._methodContents_(self._contents());
  2307. return $recv(block)._value();
  2308. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2309. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  2310. //>>excludeEnd("ctx");
  2311. }));
  2312. $recv($HLChangeForbidden())._signal();
  2313. };
  2314. return self;
  2315. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2316. }, function($ctx1) {$ctx1.fill(self,"onBrowserAboutToChange:",{anAnnouncement:anAnnouncement,block:block},$globals.HLBrowserCodeWidget)});
  2317. //>>excludeEnd("ctx");
  2318. },
  2319. //>>excludeStart("ide", pragmas.excludeIdeData);
  2320. args: ["anAnnouncement"],
  2321. 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 ]",
  2322. referencedClasses: ["HLChangeForbidden"],
  2323. //>>excludeEnd("ide");
  2324. messageSends: ["actionBlock", "ifTrue:", "hasModification", "confirm:ifTrue:", "methodContents:", "contents", "value", "signal"]
  2325. }),
  2326. $globals.HLBrowserCodeWidget);
  2327. $core.addMethod(
  2328. $core.method({
  2329. selector: "onClassSelected:",
  2330. protocol: 'reactions',
  2331. fn: function (anAnnouncement){
  2332. var self=this;
  2333. var class_;
  2334. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2335. return $core.withContext(function($ctx1) {
  2336. //>>excludeEnd("ctx");
  2337. var $1,$2,$receiver;
  2338. class_=$recv(anAnnouncement)._item();
  2339. $1=class_;
  2340. if(($receiver = $1) == null || $receiver.isNil){
  2341. $2=self._contents_("");
  2342. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2343. $ctx1.sendIdx["contents:"]=1;
  2344. //>>excludeEnd("ctx");
  2345. return $2;
  2346. } else {
  2347. $1;
  2348. };
  2349. self._contents_($recv(class_)._definition());
  2350. return self;
  2351. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2352. }, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{anAnnouncement:anAnnouncement,class_:class_},$globals.HLBrowserCodeWidget)});
  2353. //>>excludeEnd("ctx");
  2354. },
  2355. //>>excludeStart("ide", pragmas.excludeIdeData);
  2356. args: ["anAnnouncement"],
  2357. source: "onClassSelected: anAnnouncement\x0a\x09| class |\x0a\x09\x0a\x09class:= anAnnouncement item.\x0a\x09\x0a\x09class ifNil: [ ^ self contents: '' ].\x0a\x09self contents: class definition",
  2358. referencedClasses: [],
  2359. //>>excludeEnd("ide");
  2360. messageSends: ["item", "ifNil:", "contents:", "definition"]
  2361. }),
  2362. $globals.HLBrowserCodeWidget);
  2363. $core.addMethod(
  2364. $core.method({
  2365. selector: "onCompileError:",
  2366. protocol: 'reactions',
  2367. fn: function (anAnnouncement){
  2368. var self=this;
  2369. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2370. return $core.withContext(function($ctx1) {
  2371. //>>excludeEnd("ctx");
  2372. self._alert_($recv($recv(anAnnouncement)._error())._messageText());
  2373. return self;
  2374. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2375. }, function($ctx1) {$ctx1.fill(self,"onCompileError:",{anAnnouncement:anAnnouncement},$globals.HLBrowserCodeWidget)});
  2376. //>>excludeEnd("ctx");
  2377. },
  2378. //>>excludeStart("ide", pragmas.excludeIdeData);
  2379. args: ["anAnnouncement"],
  2380. source: "onCompileError: anAnnouncement\x0a\x09self alert: anAnnouncement error messageText",
  2381. referencedClasses: [],
  2382. //>>excludeEnd("ide");
  2383. messageSends: ["alert:", "messageText", "error"]
  2384. }),
  2385. $globals.HLBrowserCodeWidget);
  2386. $core.addMethod(
  2387. $core.method({
  2388. selector: "onInstVarAdded",
  2389. protocol: 'reactions',
  2390. fn: function (){
  2391. var self=this;
  2392. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2393. return $core.withContext(function($ctx1) {
  2394. //>>excludeEnd("ctx");
  2395. $recv(self._browserModel())._save_(self._contents());
  2396. return self;
  2397. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2398. }, function($ctx1) {$ctx1.fill(self,"onInstVarAdded",{},$globals.HLBrowserCodeWidget)});
  2399. //>>excludeEnd("ctx");
  2400. },
  2401. //>>excludeStart("ide", pragmas.excludeIdeData);
  2402. args: [],
  2403. source: "onInstVarAdded\x0a\x09self browserModel save: self contents",
  2404. referencedClasses: [],
  2405. //>>excludeEnd("ide");
  2406. messageSends: ["save:", "browserModel", "contents"]
  2407. }),
  2408. $globals.HLBrowserCodeWidget);
  2409. $core.addMethod(
  2410. $core.method({
  2411. selector: "onMethodModified:",
  2412. protocol: 'reactions',
  2413. fn: function (anAnnouncement){
  2414. var self=this;
  2415. var method;
  2416. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2417. return $core.withContext(function($ctx1) {
  2418. //>>excludeEnd("ctx");
  2419. var $3,$2,$1,$5,$4,$7,$6,$receiver;
  2420. method=$recv(anAnnouncement)._method();
  2421. $3=self._browserModel();
  2422. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2423. $ctx1.sendIdx["browserModel"]=1;
  2424. //>>excludeEnd("ctx");
  2425. $2=$recv($3)._selectedClass();
  2426. $1=$recv($2).__eq($recv(method)._methodClass());
  2427. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2428. $ctx1.sendIdx["="]=1;
  2429. //>>excludeEnd("ctx");
  2430. if(!$core.assert($1)){
  2431. return self;
  2432. };
  2433. $5=self._browserModel();
  2434. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2435. $ctx1.sendIdx["browserModel"]=2;
  2436. //>>excludeEnd("ctx");
  2437. $4=$recv($5)._selectedMethod();
  2438. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2439. $ctx1.sendIdx["selectedMethod"]=1;
  2440. //>>excludeEnd("ctx");
  2441. if(($receiver = $4) == null || $receiver.isNil){
  2442. return self;
  2443. } else {
  2444. $4;
  2445. };
  2446. $7=$recv($recv(self._browserModel())._selectedMethod())._selector();
  2447. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2448. $ctx1.sendIdx["selector"]=1;
  2449. //>>excludeEnd("ctx");
  2450. $6=$recv($7).__eq($recv(method)._selector());
  2451. if(!$core.assert($6)){
  2452. return self;
  2453. };
  2454. self._refresh();
  2455. return self;
  2456. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2457. }, function($ctx1) {$ctx1.fill(self,"onMethodModified:",{anAnnouncement:anAnnouncement,method:method},$globals.HLBrowserCodeWidget)});
  2458. //>>excludeEnd("ctx");
  2459. },
  2460. //>>excludeStart("ide", pragmas.excludeIdeData);
  2461. args: ["anAnnouncement"],
  2462. 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\x09self browserModel selectedMethod selector = method selector ifFalse: [ ^ self ].\x0a\x0a\x09self refresh",
  2463. referencedClasses: [],
  2464. //>>excludeEnd("ide");
  2465. messageSends: ["method", "ifFalse:", "=", "selectedClass", "browserModel", "methodClass", "ifNil:", "selectedMethod", "selector", "refresh"]
  2466. }),
  2467. $globals.HLBrowserCodeWidget);
  2468. $core.addMethod(
  2469. $core.method({
  2470. selector: "onMethodSelected:",
  2471. protocol: 'reactions',
  2472. fn: function (anAnnouncement){
  2473. var self=this;
  2474. var method;
  2475. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2476. return $core.withContext(function($ctx1) {
  2477. //>>excludeEnd("ctx");
  2478. var $1,$2,$receiver;
  2479. method=$recv(anAnnouncement)._item();
  2480. $1=method;
  2481. if(($receiver = $1) == null || $receiver.isNil){
  2482. $2=self._contents_("");
  2483. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2484. $ctx1.sendIdx["contents:"]=1;
  2485. //>>excludeEnd("ctx");
  2486. return $2;
  2487. } else {
  2488. $1;
  2489. };
  2490. self._contents_($recv(method)._source());
  2491. return self;
  2492. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2493. }, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{anAnnouncement:anAnnouncement,method:method},$globals.HLBrowserCodeWidget)});
  2494. //>>excludeEnd("ctx");
  2495. },
  2496. //>>excludeStart("ide", pragmas.excludeIdeData);
  2497. args: ["anAnnouncement"],
  2498. source: "onMethodSelected: anAnnouncement\x0a\x09| method |\x0a\x09\x0a\x09method := anAnnouncement item.\x0a\x09\x0a\x09method ifNil: [ ^ self contents: '' ].\x0a\x09self contents: method source",
  2499. referencedClasses: [],
  2500. //>>excludeEnd("ide");
  2501. messageSends: ["item", "ifNil:", "contents:", "source"]
  2502. }),
  2503. $globals.HLBrowserCodeWidget);
  2504. $core.addMethod(
  2505. $core.method({
  2506. selector: "onPackageSelected:",
  2507. protocol: 'reactions',
  2508. fn: function (anAnnouncement){
  2509. var self=this;
  2510. var package_;
  2511. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2512. return $core.withContext(function($ctx1) {
  2513. //>>excludeEnd("ctx");
  2514. var $1,$2,$receiver;
  2515. package_=$recv(anAnnouncement)._item();
  2516. $1=package_;
  2517. if(($receiver = $1) == null || $receiver.isNil){
  2518. $2=self._contents_("");
  2519. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2520. $ctx1.sendIdx["contents:"]=1;
  2521. //>>excludeEnd("ctx");
  2522. return $2;
  2523. } else {
  2524. $1;
  2525. };
  2526. self._contents_($recv(package_)._definition());
  2527. return self;
  2528. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2529. }, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{anAnnouncement:anAnnouncement,package_:package_},$globals.HLBrowserCodeWidget)});
  2530. //>>excludeEnd("ctx");
  2531. },
  2532. //>>excludeStart("ide", pragmas.excludeIdeData);
  2533. args: ["anAnnouncement"],
  2534. source: "onPackageSelected: anAnnouncement\x0a\x09| package |\x0a\x09\x0a\x09package := anAnnouncement item.\x0a\x09\x0a\x09package ifNil: [ ^ self contents: '' ].\x0a\x09self contents: package definition",
  2535. referencedClasses: [],
  2536. //>>excludeEnd("ide");
  2537. messageSends: ["item", "ifNil:", "contents:", "definition"]
  2538. }),
  2539. $globals.HLBrowserCodeWidget);
  2540. $core.addMethod(
  2541. $core.method({
  2542. selector: "onParseError:",
  2543. protocol: 'reactions',
  2544. fn: function (anAnnouncement){
  2545. var self=this;
  2546. var lineIndex,newContents;
  2547. function $String(){return $globals.String||(typeof String=="undefined"?nil:String)}
  2548. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2549. return $core.withContext(function($ctx1) {
  2550. //>>excludeEnd("ctx");
  2551. var $1,$3,$2,$6,$5,$4;
  2552. lineIndex=(1);
  2553. self._contents_($recv($String())._streamContents_((function(stream){
  2554. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2555. return $core.withContext(function($ctx2) {
  2556. //>>excludeEnd("ctx");
  2557. return $recv(self._contents())._linesDo_((function(each){
  2558. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2559. return $core.withContext(function($ctx3) {
  2560. //>>excludeEnd("ctx");
  2561. $1=$recv(lineIndex).__eq($recv(anAnnouncement)._line());
  2562. if($core.assert($1)){
  2563. $3=$recv(anAnnouncement)._column();
  2564. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2565. $ctx3.sendIdx["column"]=1;
  2566. //>>excludeEnd("ctx");
  2567. $2=$recv(each)._copyFrom_to_((1),$3);
  2568. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2569. $ctx3.sendIdx["copyFrom:to:"]=1;
  2570. //>>excludeEnd("ctx");
  2571. $recv(stream)._nextPutAll_($2);
  2572. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2573. $ctx3.sendIdx["nextPutAll:"]=1;
  2574. //>>excludeEnd("ctx");
  2575. $recv(stream)._nextPutAll_("<- ");
  2576. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2577. $ctx3.sendIdx["nextPutAll:"]=2;
  2578. //>>excludeEnd("ctx");
  2579. $recv(stream)._nextPutAll_($recv(anAnnouncement)._message());
  2580. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2581. $ctx3.sendIdx["nextPutAll:"]=3;
  2582. //>>excludeEnd("ctx");
  2583. $recv(stream)._nextPutAll_(" ");
  2584. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2585. $ctx3.sendIdx["nextPutAll:"]=4;
  2586. //>>excludeEnd("ctx");
  2587. $6=$recv($recv(anAnnouncement)._column()).__plus((1));
  2588. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2589. $ctx3.sendIdx["+"]=1;
  2590. //>>excludeEnd("ctx");
  2591. $5=$recv(each)._copyFrom_to_($6,$recv(each)._size());
  2592. $4=$recv(stream)._nextPutAll_($5);
  2593. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2594. $ctx3.sendIdx["nextPutAll:"]=5;
  2595. //>>excludeEnd("ctx");
  2596. $4;
  2597. } else {
  2598. $recv(stream)._nextPutAll_(each);
  2599. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2600. $ctx3.sendIdx["nextPutAll:"]=6;
  2601. //>>excludeEnd("ctx");
  2602. };
  2603. $recv(stream)._nextPutAll_($recv($String())._cr());
  2604. lineIndex=$recv(lineIndex).__plus((1));
  2605. return lineIndex;
  2606. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2607. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)});
  2608. //>>excludeEnd("ctx");
  2609. }));
  2610. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2611. }, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1,1)});
  2612. //>>excludeEnd("ctx");
  2613. })));
  2614. return self;
  2615. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2616. }, function($ctx1) {$ctx1.fill(self,"onParseError:",{anAnnouncement:anAnnouncement,lineIndex:lineIndex,newContents:newContents},$globals.HLBrowserCodeWidget)});
  2617. //>>excludeEnd("ctx");
  2618. },
  2619. //>>excludeStart("ide", pragmas.excludeIdeData);
  2620. args: ["anAnnouncement"],
  2621. 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 ] ])",
  2622. referencedClasses: ["String"],
  2623. //>>excludeEnd("ide");
  2624. messageSends: ["contents:", "streamContents:", "linesDo:", "contents", "ifTrue:ifFalse:", "=", "line", "nextPutAll:", "copyFrom:to:", "column", "message", "+", "size", "cr"]
  2625. }),
  2626. $globals.HLBrowserCodeWidget);
  2627. $core.addMethod(
  2628. $core.method({
  2629. selector: "onProtocolSelected:",
  2630. protocol: 'reactions',
  2631. fn: function (anAnnouncement){
  2632. var self=this;
  2633. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2634. return $core.withContext(function($ctx1) {
  2635. //>>excludeEnd("ctx");
  2636. var $2,$1,$3,$receiver;
  2637. $2=self._browserModel();
  2638. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2639. $ctx1.sendIdx["browserModel"]=1;
  2640. //>>excludeEnd("ctx");
  2641. $1=$recv($2)._selectedClass();
  2642. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2643. $ctx1.sendIdx["selectedClass"]=1;
  2644. //>>excludeEnd("ctx");
  2645. if(($receiver = $1) == null || $receiver.isNil){
  2646. $3=self._contents_("");
  2647. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2648. $ctx1.sendIdx["contents:"]=1;
  2649. //>>excludeEnd("ctx");
  2650. return $3;
  2651. } else {
  2652. $1;
  2653. };
  2654. self._contents_($recv($recv(self._browserModel())._selectedClass())._definition());
  2655. return self;
  2656. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2657. }, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{anAnnouncement:anAnnouncement},$globals.HLBrowserCodeWidget)});
  2658. //>>excludeEnd("ctx");
  2659. },
  2660. //>>excludeStart("ide", pragmas.excludeIdeData);
  2661. args: ["anAnnouncement"],
  2662. source: "onProtocolSelected: anAnnouncement\x0a\x09self browserModel selectedClass ifNil: [ ^ self contents: '' ].\x0a\x09self contents: self browserModel selectedClass definition",
  2663. referencedClasses: [],
  2664. //>>excludeEnd("ide");
  2665. messageSends: ["ifNil:", "selectedClass", "browserModel", "contents:", "definition"]
  2666. }),
  2667. $globals.HLBrowserCodeWidget);
  2668. $core.addMethod(
  2669. $core.method({
  2670. selector: "onSaveIt",
  2671. protocol: 'reactions',
  2672. fn: function (){
  2673. var self=this;
  2674. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2675. return $core.withContext(function($ctx1) {
  2676. //>>excludeEnd("ctx");
  2677. $recv(self._browserModel())._save_(self._contents());
  2678. return self;
  2679. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2680. }, function($ctx1) {$ctx1.fill(self,"onSaveIt",{},$globals.HLBrowserCodeWidget)});
  2681. //>>excludeEnd("ctx");
  2682. },
  2683. //>>excludeStart("ide", pragmas.excludeIdeData);
  2684. args: [],
  2685. source: "onSaveIt\x0a\x09self browserModel save: self contents",
  2686. referencedClasses: [],
  2687. //>>excludeEnd("ide");
  2688. messageSends: ["save:", "browserModel", "contents"]
  2689. }),
  2690. $globals.HLBrowserCodeWidget);
  2691. $core.addMethod(
  2692. $core.method({
  2693. selector: "onShowInstanceToggled",
  2694. protocol: 'reactions',
  2695. fn: function (){
  2696. var self=this;
  2697. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2698. return $core.withContext(function($ctx1) {
  2699. //>>excludeEnd("ctx");
  2700. var $2,$1,$3,$receiver;
  2701. $2=self._browserModel();
  2702. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2703. $ctx1.sendIdx["browserModel"]=1;
  2704. //>>excludeEnd("ctx");
  2705. $1=$recv($2)._selectedClass();
  2706. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2707. $ctx1.sendIdx["selectedClass"]=1;
  2708. //>>excludeEnd("ctx");
  2709. if(($receiver = $1) == null || $receiver.isNil){
  2710. $3=self._contents_("");
  2711. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2712. $ctx1.sendIdx["contents:"]=1;
  2713. //>>excludeEnd("ctx");
  2714. return $3;
  2715. } else {
  2716. $1;
  2717. };
  2718. self._contents_($recv($recv(self._browserModel())._selectedClass())._definition());
  2719. return self;
  2720. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2721. }, function($ctx1) {$ctx1.fill(self,"onShowInstanceToggled",{},$globals.HLBrowserCodeWidget)});
  2722. //>>excludeEnd("ctx");
  2723. },
  2724. //>>excludeStart("ide", pragmas.excludeIdeData);
  2725. args: [],
  2726. source: "onShowInstanceToggled\x0a\x09self browserModel selectedClass ifNil: [ ^ self contents: '' ].\x0a \x0a\x09self contents: self browserModel selectedClass definition",
  2727. referencedClasses: [],
  2728. //>>excludeEnd("ide");
  2729. messageSends: ["ifNil:", "selectedClass", "browserModel", "contents:", "definition"]
  2730. }),
  2731. $globals.HLBrowserCodeWidget);
  2732. $core.addMethod(
  2733. $core.method({
  2734. selector: "onShowTemplate:",
  2735. protocol: 'reactions',
  2736. fn: function (anAnnouncement){
  2737. var self=this;
  2738. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2739. return $core.withContext(function($ctx1) {
  2740. //>>excludeEnd("ctx");
  2741. self._contents_($recv(anAnnouncement)._template());
  2742. return self;
  2743. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2744. }, function($ctx1) {$ctx1.fill(self,"onShowTemplate:",{anAnnouncement:anAnnouncement},$globals.HLBrowserCodeWidget)});
  2745. //>>excludeEnd("ctx");
  2746. },
  2747. //>>excludeStart("ide", pragmas.excludeIdeData);
  2748. args: ["anAnnouncement"],
  2749. source: "onShowTemplate: anAnnouncement\x0a\x09self contents: anAnnouncement template",
  2750. referencedClasses: [],
  2751. //>>excludeEnd("ide");
  2752. messageSends: ["contents:", "template"]
  2753. }),
  2754. $globals.HLBrowserCodeWidget);
  2755. $core.addMethod(
  2756. $core.method({
  2757. selector: "onSourceCodeFocusRequested",
  2758. protocol: 'reactions',
  2759. fn: function (){
  2760. var self=this;
  2761. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2762. return $core.withContext(function($ctx1) {
  2763. //>>excludeEnd("ctx");
  2764. self._focus();
  2765. return self;
  2766. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2767. }, function($ctx1) {$ctx1.fill(self,"onSourceCodeFocusRequested",{},$globals.HLBrowserCodeWidget)});
  2768. //>>excludeEnd("ctx");
  2769. },
  2770. //>>excludeStart("ide", pragmas.excludeIdeData);
  2771. args: [],
  2772. source: "onSourceCodeFocusRequested\x0a\x09self focus",
  2773. referencedClasses: [],
  2774. //>>excludeEnd("ide");
  2775. messageSends: ["focus"]
  2776. }),
  2777. $globals.HLBrowserCodeWidget);
  2778. $core.addMethod(
  2779. $core.method({
  2780. selector: "onSourceCodeSaved",
  2781. protocol: 'reactions',
  2782. fn: function (){
  2783. var self=this;
  2784. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2785. return $core.withContext(function($ctx1) {
  2786. //>>excludeEnd("ctx");
  2787. self._methodContents_(self._contents());
  2788. self._updateState();
  2789. return self;
  2790. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2791. }, function($ctx1) {$ctx1.fill(self,"onSourceCodeSaved",{},$globals.HLBrowserCodeWidget)});
  2792. //>>excludeEnd("ctx");
  2793. },
  2794. //>>excludeStart("ide", pragmas.excludeIdeData);
  2795. args: [],
  2796. source: "onSourceCodeSaved\x0a\x09self methodContents: self contents.\x0a\x09self updateState",
  2797. referencedClasses: [],
  2798. //>>excludeEnd("ide");
  2799. messageSends: ["methodContents:", "contents", "updateState"]
  2800. }),
  2801. $globals.HLBrowserCodeWidget);
  2802. $core.addMethod(
  2803. $core.method({
  2804. selector: "onUnknownVariableError:",
  2805. protocol: 'reactions',
  2806. fn: function (anAnnouncement){
  2807. var self=this;
  2808. var error;
  2809. function $String(){return $globals.String||(typeof String=="undefined"?nil:String)}
  2810. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2811. return $core.withContext(function($ctx1) {
  2812. //>>excludeEnd("ctx");
  2813. error=$recv(anAnnouncement)._error();
  2814. self._confirm_ifTrue_($recv($String())._streamContents_((function(stream){
  2815. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2816. return $core.withContext(function($ctx2) {
  2817. //>>excludeEnd("ctx");
  2818. $recv(stream)._nextPutAll_($recv(error)._messageText());
  2819. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2820. $ctx2.sendIdx["nextPutAll:"]=1;
  2821. //>>excludeEnd("ctx");
  2822. $recv(stream)._nextPutAll_($recv($String())._cr());
  2823. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2824. $ctx2.sendIdx["nextPutAll:"]=2;
  2825. //>>excludeEnd("ctx");
  2826. return $recv(stream)._nextPutAll_("Would you like to define an instance variable?");
  2827. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2828. }, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1,1)});
  2829. //>>excludeEnd("ctx");
  2830. })),(function(){
  2831. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2832. return $core.withContext(function($ctx2) {
  2833. //>>excludeEnd("ctx");
  2834. return $recv(self._browserModel())._addInstVarNamed_($recv(error)._variableName());
  2835. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2836. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  2837. //>>excludeEnd("ctx");
  2838. }));
  2839. return self;
  2840. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2841. }, function($ctx1) {$ctx1.fill(self,"onUnknownVariableError:",{anAnnouncement:anAnnouncement,error:error},$globals.HLBrowserCodeWidget)});
  2842. //>>excludeEnd("ctx");
  2843. },
  2844. //>>excludeStart("ide", pragmas.excludeIdeData);
  2845. args: ["anAnnouncement"],
  2846. 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 ]",
  2847. referencedClasses: ["String"],
  2848. //>>excludeEnd("ide");
  2849. messageSends: ["error", "confirm:ifTrue:", "streamContents:", "nextPutAll:", "messageText", "cr", "addInstVarNamed:", "browserModel", "variableName"]
  2850. }),
  2851. $globals.HLBrowserCodeWidget);
  2852. $core.addMethod(
  2853. $core.method({
  2854. selector: "refresh",
  2855. protocol: 'actions',
  2856. fn: function (){
  2857. var self=this;
  2858. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2859. return $core.withContext(function($ctx1) {
  2860. //>>excludeEnd("ctx");
  2861. var $1,$2;
  2862. $1=self._hasModification();
  2863. if($core.assert($1)){
  2864. return self;
  2865. };
  2866. $2=self._hasFocus();
  2867. if($core.assert($2)){
  2868. return self;
  2869. };
  2870. self._contents_($recv($recv(self._browserModel())._selectedMethod())._source());
  2871. return self;
  2872. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2873. }, function($ctx1) {$ctx1.fill(self,"refresh",{},$globals.HLBrowserCodeWidget)});
  2874. //>>excludeEnd("ctx");
  2875. },
  2876. //>>excludeStart("ide", pragmas.excludeIdeData);
  2877. args: [],
  2878. source: "refresh\x0a\x09self hasModification ifTrue: [ ^ self ].\x0a self hasFocus ifTrue: [ ^ self ].\x0a\x0a\x09self contents: self browserModel selectedMethod source",
  2879. referencedClasses: [],
  2880. //>>excludeEnd("ide");
  2881. messageSends: ["ifTrue:", "hasModification", "hasFocus", "contents:", "source", "selectedMethod", "browserModel"]
  2882. }),
  2883. $globals.HLBrowserCodeWidget);
  2884. $core.addMethod(
  2885. $core.method({
  2886. selector: "renderButtonsOn:",
  2887. protocol: 'actions',
  2888. fn: function (html){
  2889. var self=this;
  2890. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2891. return $core.withContext(function($ctx1) {
  2892. //>>excludeEnd("ctx");
  2893. var $1;
  2894. $1=$recv(html)._button();
  2895. $recv($1)._class_("button");
  2896. $recv($1)._with_("SaveIt");
  2897. $recv($1)._onClick_((function(){
  2898. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2899. return $core.withContext(function($ctx2) {
  2900. //>>excludeEnd("ctx");
  2901. return self._saveIt();
  2902. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2903. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2904. //>>excludeEnd("ctx");
  2905. }));
  2906. (
  2907. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2908. $ctx1.supercall = true,
  2909. //>>excludeEnd("ctx");
  2910. ($globals.HLBrowserCodeWidget.superclass||$boot.dnu).fn.prototype._renderButtonsOn_.apply($recv(self), [html]));
  2911. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2912. $ctx1.supercall = false;
  2913. //>>excludeEnd("ctx");;
  2914. return self;
  2915. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2916. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},$globals.HLBrowserCodeWidget)});
  2917. //>>excludeEnd("ctx");
  2918. },
  2919. //>>excludeStart("ide", pragmas.excludeIdeData);
  2920. args: ["html"],
  2921. source: "renderButtonsOn: html\x0a\x09html button \x0a\x09\x09class: 'button';\x0a\x09\x09with: 'SaveIt';\x0a\x09\x09onClick: [ self saveIt ].\x0a\x09super renderButtonsOn: html",
  2922. referencedClasses: [],
  2923. //>>excludeEnd("ide");
  2924. messageSends: ["class:", "button", "with:", "onClick:", "saveIt", "renderButtonsOn:"]
  2925. }),
  2926. $globals.HLBrowserCodeWidget);
  2927. $core.addMethod(
  2928. $core.method({
  2929. selector: "saveIt",
  2930. protocol: 'actions',
  2931. fn: function (){
  2932. var self=this;
  2933. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2934. return $core.withContext(function($ctx1) {
  2935. //>>excludeEnd("ctx");
  2936. $recv(self._browserModel())._saveSourceCode();
  2937. return self;
  2938. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2939. }, function($ctx1) {$ctx1.fill(self,"saveIt",{},$globals.HLBrowserCodeWidget)});
  2940. //>>excludeEnd("ctx");
  2941. },
  2942. //>>excludeStart("ide", pragmas.excludeIdeData);
  2943. args: [],
  2944. source: "saveIt\x0a\x09self browserModel saveSourceCode",
  2945. referencedClasses: [],
  2946. //>>excludeEnd("ide");
  2947. messageSends: ["saveSourceCode", "browserModel"]
  2948. }),
  2949. $globals.HLBrowserCodeWidget);
  2950. $core.addMethod(
  2951. $core.method({
  2952. selector: "unregister",
  2953. protocol: 'actions',
  2954. fn: function (){
  2955. var self=this;
  2956. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2957. return $core.withContext(function($ctx1) {
  2958. //>>excludeEnd("ctx");
  2959. var $2,$1;
  2960. (
  2961. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2962. $ctx1.supercall = true,
  2963. //>>excludeEnd("ctx");
  2964. ($globals.HLBrowserCodeWidget.superclass||$boot.dnu).fn.prototype._unregsiter.apply($recv(self), []));
  2965. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2966. $ctx1.supercall = false;
  2967. //>>excludeEnd("ctx");;
  2968. $2=self._browserModel();
  2969. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2970. $ctx1.sendIdx["browserModel"]=1;
  2971. //>>excludeEnd("ctx");
  2972. $1=$recv($2)._announcer();
  2973. $recv($1)._unsubscribe_(self);
  2974. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2975. $ctx1.sendIdx["unsubscribe:"]=1;
  2976. //>>excludeEnd("ctx");
  2977. $recv($recv(self._browserModel())._systemAnnouncer())._unsubscribe_(self);
  2978. return self;
  2979. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2980. }, function($ctx1) {$ctx1.fill(self,"unregister",{},$globals.HLBrowserCodeWidget)});
  2981. //>>excludeEnd("ctx");
  2982. },
  2983. //>>excludeStart("ide", pragmas.excludeIdeData);
  2984. args: [],
  2985. source: "unregister\x0a\x09super unregsiter.\x0a\x09\x0a\x09self browserModel announcer unsubscribe: self.\x0a\x09self browserModel systemAnnouncer unsubscribe: self",
  2986. referencedClasses: [],
  2987. //>>excludeEnd("ide");
  2988. messageSends: ["unregsiter", "unsubscribe:", "announcer", "browserModel", "systemAnnouncer"]
  2989. }),
  2990. $globals.HLBrowserCodeWidget);
  2991. $core.addMethod(
  2992. $core.method({
  2993. selector: "canBeOpenAsTab",
  2994. protocol: 'testing',
  2995. fn: function (){
  2996. var self=this;
  2997. return false;
  2998. },
  2999. //>>excludeStart("ide", pragmas.excludeIdeData);
  3000. args: [],
  3001. source: "canBeOpenAsTab\x0a\x09^ false",
  3002. referencedClasses: [],
  3003. //>>excludeEnd("ide");
  3004. messageSends: []
  3005. }),
  3006. $globals.HLBrowserCodeWidget.klass);
  3007. $core.addMethod(
  3008. $core.method({
  3009. selector: "on:",
  3010. protocol: 'instance creation',
  3011. fn: function (aBrowserModel){
  3012. var self=this;
  3013. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3014. return $core.withContext(function($ctx1) {
  3015. //>>excludeEnd("ctx");
  3016. var $1;
  3017. $1=self._new();
  3018. $recv($1)._browserModel_(aBrowserModel);
  3019. return $recv($1)._yourself();
  3020. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3021. }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowserModel:aBrowserModel},$globals.HLBrowserCodeWidget.klass)});
  3022. //>>excludeEnd("ctx");
  3023. },
  3024. //>>excludeStart("ide", pragmas.excludeIdeData);
  3025. args: ["aBrowserModel"],
  3026. source: "on: aBrowserModel\x0a\x09^ self new\x0a\x09\x09browserModel: aBrowserModel;\x0a\x09\x09yourself",
  3027. referencedClasses: [],
  3028. //>>excludeEnd("ide");
  3029. messageSends: ["browserModel:", "new", "yourself"]
  3030. }),
  3031. $globals.HLBrowserCodeWidget.klass);
  3032. $core.addClass('HLWorkspace', $globals.HLWidget, ['codeWidget', 'transcript'], 'Helios-Workspace');
  3033. $core.addMethod(
  3034. $core.method({
  3035. selector: "canHaveFocus",
  3036. protocol: 'testing',
  3037. fn: function (){
  3038. var self=this;
  3039. return true;
  3040. },
  3041. //>>excludeStart("ide", pragmas.excludeIdeData);
  3042. args: [],
  3043. source: "canHaveFocus\x0a\x09^ true",
  3044. referencedClasses: [],
  3045. //>>excludeEnd("ide");
  3046. messageSends: []
  3047. }),
  3048. $globals.HLWorkspace);
  3049. $core.addMethod(
  3050. $core.method({
  3051. selector: "codeWidget",
  3052. protocol: 'accessing',
  3053. fn: function (){
  3054. var self=this;
  3055. function $HLCodeWidget(){return $globals.HLCodeWidget||(typeof HLCodeWidget=="undefined"?nil:HLCodeWidget)}
  3056. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3057. return $core.withContext(function($ctx1) {
  3058. //>>excludeEnd("ctx");
  3059. var $1,$receiver;
  3060. $1=self["@codeWidget"];
  3061. if(($receiver = $1) == null || $receiver.isNil){
  3062. self["@codeWidget"]=$recv($HLCodeWidget())._new();
  3063. return self["@codeWidget"];
  3064. } else {
  3065. return $1;
  3066. };
  3067. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3068. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{},$globals.HLWorkspace)});
  3069. //>>excludeEnd("ctx");
  3070. },
  3071. //>>excludeStart("ide", pragmas.excludeIdeData);
  3072. args: [],
  3073. source: "codeWidget\x0a\x09^ codeWidget ifNil: [ codeWidget := HLCodeWidget new ]",
  3074. referencedClasses: ["HLCodeWidget"],
  3075. //>>excludeEnd("ide");
  3076. messageSends: ["ifNil:", "new"]
  3077. }),
  3078. $globals.HLWorkspace);
  3079. $core.addMethod(
  3080. $core.method({
  3081. selector: "focus",
  3082. protocol: 'actions',
  3083. fn: function (){
  3084. var self=this;
  3085. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3086. return $core.withContext(function($ctx1) {
  3087. //>>excludeEnd("ctx");
  3088. return $recv(self._codeWidget())._focus();
  3089. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3090. }, function($ctx1) {$ctx1.fill(self,"focus",{},$globals.HLWorkspace)});
  3091. //>>excludeEnd("ctx");
  3092. },
  3093. //>>excludeStart("ide", pragmas.excludeIdeData);
  3094. args: [],
  3095. source: "focus\x0a\x09^ self codeWidget focus",
  3096. referencedClasses: [],
  3097. //>>excludeEnd("ide");
  3098. messageSends: ["focus", "codeWidget"]
  3099. }),
  3100. $globals.HLWorkspace);
  3101. $core.addMethod(
  3102. $core.method({
  3103. selector: "renderContentOn:",
  3104. protocol: 'rendering',
  3105. fn: function (html){
  3106. var self=this;
  3107. function $HLContainer(){return $globals.HLContainer||(typeof HLContainer=="undefined"?nil:HLContainer)}
  3108. function $HLHorizontalSplitter(){return $globals.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  3109. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3110. return $core.withContext(function($ctx1) {
  3111. //>>excludeEnd("ctx");
  3112. $recv(html)._with_($recv($HLContainer())._with_($recv($HLHorizontalSplitter())._with_with_(self._codeWidget(),(function(canvas){
  3113. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3114. return $core.withContext(function($ctx2) {
  3115. //>>excludeEnd("ctx");
  3116. return self._renderTranscriptOn_(canvas);
  3117. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3118. }, function($ctx2) {$ctx2.fillBlock({canvas:canvas},$ctx1,1)});
  3119. //>>excludeEnd("ctx");
  3120. }))));
  3121. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3122. $ctx1.sendIdx["with:"]=1;
  3123. //>>excludeEnd("ctx");
  3124. return self;
  3125. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3126. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLWorkspace)});
  3127. //>>excludeEnd("ctx");
  3128. },
  3129. //>>excludeStart("ide", pragmas.excludeIdeData);
  3130. args: ["html"],
  3131. source: "renderContentOn: html\x0a\x09html with: (HLContainer with: (HLHorizontalSplitter\x0a\x09\x09with: self codeWidget\x0a\x09\x09with: [ :canvas | self renderTranscriptOn: canvas ]))",
  3132. referencedClasses: ["HLContainer", "HLHorizontalSplitter"],
  3133. //>>excludeEnd("ide");
  3134. messageSends: ["with:", "with:with:", "codeWidget", "renderTranscriptOn:"]
  3135. }),
  3136. $globals.HLWorkspace);
  3137. $core.addMethod(
  3138. $core.method({
  3139. selector: "renderTranscriptOn:",
  3140. protocol: 'rendering',
  3141. fn: function (html){
  3142. var self=this;
  3143. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3144. return $core.withContext(function($ctx1) {
  3145. //>>excludeEnd("ctx");
  3146. var $1,$3,$2;
  3147. $1=$recv(html)._div();
  3148. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3149. $ctx1.sendIdx["div"]=1;
  3150. //>>excludeEnd("ctx");
  3151. $recv($1)._class_("transcript-container");
  3152. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3153. $ctx1.sendIdx["class:"]=1;
  3154. //>>excludeEnd("ctx");
  3155. $2=$recv($1)._with_((function(){
  3156. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3157. return $core.withContext(function($ctx2) {
  3158. //>>excludeEnd("ctx");
  3159. $3=$recv(html)._div();
  3160. $recv($3)._class_("list-label");
  3161. $recv($3)._with_("Transcript");
  3162. return $recv(self._transcript())._renderOn_(html);
  3163. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3164. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3165. //>>excludeEnd("ctx");
  3166. }));
  3167. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3168. $ctx1.sendIdx["with:"]=1;
  3169. //>>excludeEnd("ctx");
  3170. return self;
  3171. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3172. }, function($ctx1) {$ctx1.fill(self,"renderTranscriptOn:",{html:html},$globals.HLWorkspace)});
  3173. //>>excludeEnd("ctx");
  3174. },
  3175. //>>excludeStart("ide", pragmas.excludeIdeData);
  3176. args: ["html"],
  3177. 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 ]",
  3178. referencedClasses: [],
  3179. //>>excludeEnd("ide");
  3180. messageSends: ["class:", "div", "with:", "renderOn:", "transcript"]
  3181. }),
  3182. $globals.HLWorkspace);
  3183. $core.addMethod(
  3184. $core.method({
  3185. selector: "transcript",
  3186. protocol: 'accessing',
  3187. fn: function (){
  3188. var self=this;
  3189. function $HLTranscript(){return $globals.HLTranscript||(typeof HLTranscript=="undefined"?nil:HLTranscript)}
  3190. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3191. return $core.withContext(function($ctx1) {
  3192. //>>excludeEnd("ctx");
  3193. var $1,$receiver;
  3194. $1=self["@transcript"];
  3195. if(($receiver = $1) == null || $receiver.isNil){
  3196. self["@transcript"]=$recv($HLTranscript())._new();
  3197. return self["@transcript"];
  3198. } else {
  3199. return $1;
  3200. };
  3201. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3202. }, function($ctx1) {$ctx1.fill(self,"transcript",{},$globals.HLWorkspace)});
  3203. //>>excludeEnd("ctx");
  3204. },
  3205. //>>excludeStart("ide", pragmas.excludeIdeData);
  3206. args: [],
  3207. source: "transcript\x0a\x09^ transcript ifNil: [ transcript := HLTranscript new ]",
  3208. referencedClasses: ["HLTranscript"],
  3209. //>>excludeEnd("ide");
  3210. messageSends: ["ifNil:", "new"]
  3211. }),
  3212. $globals.HLWorkspace);
  3213. $core.addMethod(
  3214. $core.method({
  3215. selector: "unregister",
  3216. protocol: 'actions',
  3217. fn: function (){
  3218. var self=this;
  3219. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3220. return $core.withContext(function($ctx1) {
  3221. //>>excludeEnd("ctx");
  3222. (
  3223. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3224. $ctx1.supercall = true,
  3225. //>>excludeEnd("ctx");
  3226. ($globals.HLWorkspace.superclass||$boot.dnu).fn.prototype._unregister.apply($recv(self), []));
  3227. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3228. $ctx1.supercall = false;
  3229. //>>excludeEnd("ctx");;
  3230. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3231. $ctx1.sendIdx["unregister"]=1;
  3232. //>>excludeEnd("ctx");
  3233. $recv(self._transcript())._unregister();
  3234. return self;
  3235. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3236. }, function($ctx1) {$ctx1.fill(self,"unregister",{},$globals.HLWorkspace)});
  3237. //>>excludeEnd("ctx");
  3238. },
  3239. //>>excludeStart("ide", pragmas.excludeIdeData);
  3240. args: [],
  3241. source: "unregister\x0a\x09super unregister.\x0a\x09self transcript unregister",
  3242. referencedClasses: [],
  3243. //>>excludeEnd("ide");
  3244. messageSends: ["unregister", "transcript"]
  3245. }),
  3246. $globals.HLWorkspace);
  3247. $core.addMethod(
  3248. $core.method({
  3249. selector: "canBeOpenAsTab",
  3250. protocol: 'testing',
  3251. fn: function (){
  3252. var self=this;
  3253. return true;
  3254. },
  3255. //>>excludeStart("ide", pragmas.excludeIdeData);
  3256. args: [],
  3257. source: "canBeOpenAsTab\x0a\x09^ true",
  3258. referencedClasses: [],
  3259. //>>excludeEnd("ide");
  3260. messageSends: []
  3261. }),
  3262. $globals.HLWorkspace.klass);
  3263. $core.addMethod(
  3264. $core.method({
  3265. selector: "tabClass",
  3266. protocol: 'accessing',
  3267. fn: function (){
  3268. var self=this;
  3269. return "workspace";
  3270. },
  3271. //>>excludeStart("ide", pragmas.excludeIdeData);
  3272. args: [],
  3273. source: "tabClass\x0a\x09^ 'workspace'",
  3274. referencedClasses: [],
  3275. //>>excludeEnd("ide");
  3276. messageSends: []
  3277. }),
  3278. $globals.HLWorkspace.klass);
  3279. $core.addMethod(
  3280. $core.method({
  3281. selector: "tabLabel",
  3282. protocol: 'accessing',
  3283. fn: function (){
  3284. var self=this;
  3285. return "Workspace";
  3286. },
  3287. //>>excludeStart("ide", pragmas.excludeIdeData);
  3288. args: [],
  3289. source: "tabLabel\x0a\x09^ 'Workspace'",
  3290. referencedClasses: [],
  3291. //>>excludeEnd("ide");
  3292. messageSends: []
  3293. }),
  3294. $globals.HLWorkspace.klass);
  3295. $core.addMethod(
  3296. $core.method({
  3297. selector: "tabPriority",
  3298. protocol: 'accessing',
  3299. fn: function (){
  3300. var self=this;
  3301. return (10);
  3302. },
  3303. //>>excludeStart("ide", pragmas.excludeIdeData);
  3304. args: [],
  3305. source: "tabPriority\x0a\x09^ 10",
  3306. referencedClasses: [],
  3307. //>>excludeEnd("ide");
  3308. messageSends: []
  3309. }),
  3310. $globals.HLWorkspace.klass);
  3311. });