Platform-Services.js 81 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288
  1. define(["amber/boot", "amber_core/Kernel-Collections", "amber_core/Kernel-Infrastructure", "amber_core/Kernel-Methods", "amber_core/Kernel-Objects"], function($boot){"use strict";
  2. if(!("nilAsValue" in $boot))$boot.nilAsValue=$boot.nilAsReceiver;
  3. var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
  4. $core.addPackage("Platform-Services");
  5. ($core.packageDescriptors||$core.packages)["Platform-Services"].innerEval = function (expr) { return eval(expr); };
  6. ($core.packageDescriptors||$core.packages)["Platform-Services"].transport = {"type":"amd","amdNamespace":"amber_core"};
  7. $core.addClass("ConsoleErrorHandler", $globals.Object, [], "Platform-Services");
  8. //>>excludeStart("ide", pragmas.excludeIdeData);
  9. $globals.ConsoleErrorHandler.comment="I am manage Smalltalk errors, displaying the stack in the console.";
  10. //>>excludeEnd("ide");
  11. $core.addMethod(
  12. $core.method({
  13. selector: "handleError:",
  14. protocol: "error handling",
  15. fn: function (anError){
  16. var self=this,$self=this;
  17. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  18. return $core.withContext(function($ctx1) {
  19. //>>excludeEnd("ctx");
  20. var $1,$receiver;
  21. $1=$recv(anError)._context();
  22. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  23. $ctx1.sendIdx["context"]=1;
  24. //>>excludeEnd("ctx");
  25. if(($receiver = $1) == null || $receiver.a$nil){
  26. $1;
  27. } else {
  28. $self._logErrorContext_($recv(anError)._context());
  29. }
  30. $self._logError_(anError);
  31. return self;
  32. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  33. }, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},$globals.ConsoleErrorHandler)});
  34. //>>excludeEnd("ctx");
  35. },
  36. //>>excludeStart("ide", pragmas.excludeIdeData);
  37. args: ["anError"],
  38. source: "handleError: anError\x0a\x09anError context ifNotNil: [ self logErrorContext: anError context ].\x0a\x09self logError: anError",
  39. referencedClasses: [],
  40. //>>excludeEnd("ide");
  41. messageSends: ["ifNotNil:", "context", "logErrorContext:", "logError:"]
  42. }),
  43. $globals.ConsoleErrorHandler);
  44. $core.addMethod(
  45. $core.method({
  46. selector: "log:",
  47. protocol: "private",
  48. fn: function (aString){
  49. var self=this,$self=this;
  50. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  51. return $core.withContext(function($ctx1) {
  52. //>>excludeEnd("ctx");
  53. $recv(console)._log_(aString);
  54. return self;
  55. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  56. }, function($ctx1) {$ctx1.fill(self,"log:",{aString:aString},$globals.ConsoleErrorHandler)});
  57. //>>excludeEnd("ctx");
  58. },
  59. //>>excludeStart("ide", pragmas.excludeIdeData);
  60. args: ["aString"],
  61. source: "log: aString\x0a\x09console log: aString",
  62. referencedClasses: [],
  63. //>>excludeEnd("ide");
  64. messageSends: ["log:"]
  65. }),
  66. $globals.ConsoleErrorHandler);
  67. $core.addMethod(
  68. $core.method({
  69. selector: "logContext:",
  70. protocol: "private",
  71. fn: function (aContext){
  72. var self=this,$self=this;
  73. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  74. return $core.withContext(function($ctx1) {
  75. //>>excludeEnd("ctx");
  76. var $1,$receiver;
  77. $1=$recv(aContext)._home();
  78. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  79. $ctx1.sendIdx["home"]=1;
  80. //>>excludeEnd("ctx");
  81. if(($receiver = $1) == null || $receiver.a$nil){
  82. $1;
  83. } else {
  84. $self._logContext_($recv(aContext)._home());
  85. }
  86. $self._log_($recv(aContext)._asString());
  87. return self;
  88. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  89. }, function($ctx1) {$ctx1.fill(self,"logContext:",{aContext:aContext},$globals.ConsoleErrorHandler)});
  90. //>>excludeEnd("ctx");
  91. },
  92. //>>excludeStart("ide", pragmas.excludeIdeData);
  93. args: ["aContext"],
  94. source: "logContext: aContext\x0a\x09aContext home ifNotNil: [\x0a\x09\x09self logContext: aContext home ].\x0a\x09self log: aContext asString",
  95. referencedClasses: [],
  96. //>>excludeEnd("ide");
  97. messageSends: ["ifNotNil:", "home", "logContext:", "log:", "asString"]
  98. }),
  99. $globals.ConsoleErrorHandler);
  100. $core.addMethod(
  101. $core.method({
  102. selector: "logError:",
  103. protocol: "private",
  104. fn: function (anError){
  105. var self=this,$self=this;
  106. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  107. return $core.withContext(function($ctx1) {
  108. //>>excludeEnd("ctx");
  109. $self._log_($recv(anError)._messageText());
  110. return self;
  111. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  112. }, function($ctx1) {$ctx1.fill(self,"logError:",{anError:anError},$globals.ConsoleErrorHandler)});
  113. //>>excludeEnd("ctx");
  114. },
  115. //>>excludeStart("ide", pragmas.excludeIdeData);
  116. args: ["anError"],
  117. source: "logError: anError\x0a\x09self log: anError messageText",
  118. referencedClasses: [],
  119. //>>excludeEnd("ide");
  120. messageSends: ["log:", "messageText"]
  121. }),
  122. $globals.ConsoleErrorHandler);
  123. $core.addMethod(
  124. $core.method({
  125. selector: "logErrorContext:",
  126. protocol: "private",
  127. fn: function (aContext){
  128. var self=this,$self=this;
  129. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  130. return $core.withContext(function($ctx1) {
  131. //>>excludeEnd("ctx");
  132. var $1,$receiver;
  133. if(($receiver = aContext) == null || $receiver.a$nil){
  134. aContext;
  135. } else {
  136. $1=$recv(aContext)._home();
  137. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  138. $ctx1.sendIdx["home"]=1;
  139. //>>excludeEnd("ctx");
  140. if(($receiver = $1) == null || $receiver.a$nil){
  141. $1;
  142. } else {
  143. $self._logContext_($recv(aContext)._home());
  144. }
  145. }
  146. return self;
  147. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  148. }, function($ctx1) {$ctx1.fill(self,"logErrorContext:",{aContext:aContext},$globals.ConsoleErrorHandler)});
  149. //>>excludeEnd("ctx");
  150. },
  151. //>>excludeStart("ide", pragmas.excludeIdeData);
  152. args: ["aContext"],
  153. source: "logErrorContext: aContext\x0a\x09aContext ifNotNil: [\x0a\x09\x09aContext home ifNotNil: [\x0a\x09\x09\x09self logContext: aContext home ]]",
  154. referencedClasses: [],
  155. //>>excludeEnd("ide");
  156. messageSends: ["ifNotNil:", "home", "logContext:"]
  157. }),
  158. $globals.ConsoleErrorHandler);
  159. $globals.ConsoleErrorHandler.a$cls.iVarNames = ["current"];
  160. $core.addMethod(
  161. $core.method({
  162. selector: "initialize",
  163. protocol: "initialization",
  164. fn: function (){
  165. var self=this,$self=this;
  166. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  167. return $core.withContext(function($ctx1) {
  168. //>>excludeEnd("ctx");
  169. $recv($globals.ErrorHandler)._registerIfNone_($self._new());
  170. return self;
  171. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  172. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.ConsoleErrorHandler.a$cls)});
  173. //>>excludeEnd("ctx");
  174. },
  175. //>>excludeStart("ide", pragmas.excludeIdeData);
  176. args: [],
  177. source: "initialize\x0a\x09ErrorHandler registerIfNone: self new",
  178. referencedClasses: ["ErrorHandler"],
  179. //>>excludeEnd("ide");
  180. messageSends: ["registerIfNone:", "new"]
  181. }),
  182. $globals.ConsoleErrorHandler.a$cls);
  183. $core.addClass("ConsoleTranscript", $globals.Object, ["textarea"], "Platform-Services");
  184. //>>excludeStart("ide", pragmas.excludeIdeData);
  185. $globals.ConsoleTranscript.comment="I am a specific transcript emitting to the JavaScript console.\x0a\x0aIf no other transcript is registered, I am the default.";
  186. //>>excludeEnd("ide");
  187. $core.addMethod(
  188. $core.method({
  189. selector: "clear",
  190. protocol: "printing",
  191. fn: function (){
  192. var self=this,$self=this;
  193. return self;
  194. },
  195. //>>excludeStart("ide", pragmas.excludeIdeData);
  196. args: [],
  197. source: "clear\x0a\x09\x22no op\x22",
  198. referencedClasses: [],
  199. //>>excludeEnd("ide");
  200. messageSends: []
  201. }),
  202. $globals.ConsoleTranscript);
  203. $core.addMethod(
  204. $core.method({
  205. selector: "cr",
  206. protocol: "printing",
  207. fn: function (){
  208. var self=this,$self=this;
  209. return self;
  210. },
  211. //>>excludeStart("ide", pragmas.excludeIdeData);
  212. args: [],
  213. source: "cr\x0a\x09\x22no op\x22",
  214. referencedClasses: [],
  215. //>>excludeEnd("ide");
  216. messageSends: []
  217. }),
  218. $globals.ConsoleTranscript);
  219. $core.addMethod(
  220. $core.method({
  221. selector: "open",
  222. protocol: "actions",
  223. fn: function (){
  224. var self=this,$self=this;
  225. return self;
  226. },
  227. //>>excludeStart("ide", pragmas.excludeIdeData);
  228. args: [],
  229. source: "open",
  230. referencedClasses: [],
  231. //>>excludeEnd("ide");
  232. messageSends: []
  233. }),
  234. $globals.ConsoleTranscript);
  235. $core.addMethod(
  236. $core.method({
  237. selector: "show:",
  238. protocol: "printing",
  239. fn: function (anObject){
  240. var self=this,$self=this;
  241. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  242. return $core.withContext(function($ctx1) {
  243. //>>excludeEnd("ctx");
  244. console.log(String($recv(anObject)._asString()));
  245. return self;
  246. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  247. }, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject},$globals.ConsoleTranscript)});
  248. //>>excludeEnd("ctx");
  249. },
  250. //>>excludeStart("ide", pragmas.excludeIdeData);
  251. args: ["anObject"],
  252. source: "show: anObject\x0a\x22Smalltalk objects should have no trouble displaying themselves on the Transcript; Javascript objects don't know how, so must be wrapped in a JSObectProxy.\x22\x0a<inlineJS: 'console.log(String($recv(anObject)._asString()))'>",
  253. referencedClasses: [],
  254. //>>excludeEnd("ide");
  255. messageSends: []
  256. }),
  257. $globals.ConsoleTranscript);
  258. $core.addMethod(
  259. $core.method({
  260. selector: "initialize",
  261. protocol: "initialization",
  262. fn: function (){
  263. var self=this,$self=this;
  264. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  265. return $core.withContext(function($ctx1) {
  266. //>>excludeEnd("ctx");
  267. $recv($globals.Transcript)._registerIfNone_($self._new());
  268. return self;
  269. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  270. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.ConsoleTranscript.a$cls)});
  271. //>>excludeEnd("ctx");
  272. },
  273. //>>excludeStart("ide", pragmas.excludeIdeData);
  274. args: [],
  275. source: "initialize\x0a\x09Transcript registerIfNone: self new",
  276. referencedClasses: ["Transcript"],
  277. //>>excludeEnd("ide");
  278. messageSends: ["registerIfNone:", "new"]
  279. }),
  280. $globals.ConsoleTranscript.a$cls);
  281. $core.addClass("Environment", $globals.Object, [], "Platform-Services");
  282. //>>excludeStart("ide", pragmas.excludeIdeData);
  283. $globals.Environment.comment="I provide an unified entry point to manipulate Amber packages, classes and methods.\x0a\x0aTypical use cases include IDEs, remote access and restricting browsing.";
  284. //>>excludeEnd("ide");
  285. $core.addMethod(
  286. $core.method({
  287. selector: "addInstVarNamed:to:",
  288. protocol: "compiling",
  289. fn: function (aString,aClass){
  290. var self=this,$self=this;
  291. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  292. return $core.withContext(function($ctx1) {
  293. //>>excludeEnd("ctx");
  294. var $1,$2,$3,$5,$4;
  295. $1=$self._classBuilder();
  296. $2=$recv(aClass)._superclass();
  297. $3=$recv(aClass)._name();
  298. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  299. $ctx1.sendIdx["name"]=1;
  300. //>>excludeEnd("ctx");
  301. $5=$recv($recv(aClass)._instanceVariableNames())._copy();
  302. $recv($5)._add_(aString);
  303. $4=$recv($5)._yourself();
  304. $recv($1)._addSubclassOf_named_instanceVariableNames_package_($2,$3,$4,$recv($recv(aClass)._package())._name());
  305. return self;
  306. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  307. }, function($ctx1) {$ctx1.fill(self,"addInstVarNamed:to:",{aString:aString,aClass:aClass},$globals.Environment)});
  308. //>>excludeEnd("ctx");
  309. },
  310. //>>excludeStart("ide", pragmas.excludeIdeData);
  311. args: ["aString", "aClass"],
  312. source: "addInstVarNamed: aString to: aClass\x0a\x09self classBuilder\x0a\x09\x09addSubclassOf: aClass superclass \x0a\x09\x09named: aClass name \x0a\x09\x09instanceVariableNames: (aClass instanceVariableNames copy add: aString; yourself)\x0a\x09\x09package: aClass package name",
  313. referencedClasses: [],
  314. //>>excludeEnd("ide");
  315. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "classBuilder", "superclass", "name", "add:", "copy", "instanceVariableNames", "yourself", "package"]
  316. }),
  317. $globals.Environment);
  318. $core.addMethod(
  319. $core.method({
  320. selector: "allSelectors",
  321. protocol: "accessing",
  322. fn: function (){
  323. var self=this,$self=this;
  324. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  325. return $core.withContext(function($ctx1) {
  326. //>>excludeEnd("ctx");
  327. return $recv($recv($globals.Smalltalk)._core())._allSelectors();
  328. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  329. }, function($ctx1) {$ctx1.fill(self,"allSelectors",{},$globals.Environment)});
  330. //>>excludeEnd("ctx");
  331. },
  332. //>>excludeStart("ide", pragmas.excludeIdeData);
  333. args: [],
  334. source: "allSelectors\x0a\x09^ Smalltalk core allSelectors",
  335. referencedClasses: ["Smalltalk"],
  336. //>>excludeEnd("ide");
  337. messageSends: ["allSelectors", "core"]
  338. }),
  339. $globals.Environment);
  340. $core.addMethod(
  341. $core.method({
  342. selector: "availableClassNames",
  343. protocol: "accessing",
  344. fn: function (){
  345. var self=this,$self=this;
  346. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  347. return $core.withContext(function($ctx1) {
  348. //>>excludeEnd("ctx");
  349. return $recv($recv($globals.Smalltalk)._classes())._collect_((function(each){
  350. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  351. return $core.withContext(function($ctx2) {
  352. //>>excludeEnd("ctx");
  353. return $recv(each)._name();
  354. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  355. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  356. //>>excludeEnd("ctx");
  357. }));
  358. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  359. }, function($ctx1) {$ctx1.fill(self,"availableClassNames",{},$globals.Environment)});
  360. //>>excludeEnd("ctx");
  361. },
  362. //>>excludeStart("ide", pragmas.excludeIdeData);
  363. args: [],
  364. source: "availableClassNames\x0a\x09^ Smalltalk classes \x0a\x09\x09collect: [ :each | each name ]",
  365. referencedClasses: ["Smalltalk"],
  366. //>>excludeEnd("ide");
  367. messageSends: ["collect:", "classes", "name"]
  368. }),
  369. $globals.Environment);
  370. $core.addMethod(
  371. $core.method({
  372. selector: "availablePackageNames",
  373. protocol: "accessing",
  374. fn: function (){
  375. var self=this,$self=this;
  376. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  377. return $core.withContext(function($ctx1) {
  378. //>>excludeEnd("ctx");
  379. return $recv($recv($globals.Smalltalk)._packages())._collect_((function(each){
  380. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  381. return $core.withContext(function($ctx2) {
  382. //>>excludeEnd("ctx");
  383. return $recv(each)._name();
  384. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  385. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  386. //>>excludeEnd("ctx");
  387. }));
  388. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  389. }, function($ctx1) {$ctx1.fill(self,"availablePackageNames",{},$globals.Environment)});
  390. //>>excludeEnd("ctx");
  391. },
  392. //>>excludeStart("ide", pragmas.excludeIdeData);
  393. args: [],
  394. source: "availablePackageNames\x0a\x09^ Smalltalk packages \x0a\x09\x09collect: [ :each | each name ]",
  395. referencedClasses: ["Smalltalk"],
  396. //>>excludeEnd("ide");
  397. messageSends: ["collect:", "packages", "name"]
  398. }),
  399. $globals.Environment);
  400. $core.addMethod(
  401. $core.method({
  402. selector: "availableProtocolsFor:",
  403. protocol: "accessing",
  404. fn: function (aClass){
  405. var self=this,$self=this;
  406. var protocols;
  407. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  408. return $core.withContext(function($ctx1) {
  409. //>>excludeEnd("ctx");
  410. var $1,$receiver;
  411. protocols=$recv(aClass)._protocols();
  412. $1=$recv(aClass)._superclass();
  413. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  414. $ctx1.sendIdx["superclass"]=1;
  415. //>>excludeEnd("ctx");
  416. if(($receiver = $1) == null || $receiver.a$nil){
  417. $1;
  418. } else {
  419. $recv(protocols)._addAll_($self._availableProtocolsFor_($recv(aClass)._superclass()));
  420. }
  421. return $recv($recv($recv(protocols)._asSet())._asArray())._sort();
  422. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  423. }, function($ctx1) {$ctx1.fill(self,"availableProtocolsFor:",{aClass:aClass,protocols:protocols},$globals.Environment)});
  424. //>>excludeEnd("ctx");
  425. },
  426. //>>excludeStart("ide", pragmas.excludeIdeData);
  427. args: ["aClass"],
  428. source: "availableProtocolsFor: aClass\x0a\x09| protocols |\x0a\x09\x0a\x09protocols := aClass protocols.\x0a\x09aClass superclass ifNotNil: [ protocols addAll: (self availableProtocolsFor: aClass superclass) ].\x0a\x09^ protocols asSet asArray sort",
  429. referencedClasses: [],
  430. //>>excludeEnd("ide");
  431. messageSends: ["protocols", "ifNotNil:", "superclass", "addAll:", "availableProtocolsFor:", "sort", "asArray", "asSet"]
  432. }),
  433. $globals.Environment);
  434. $core.addMethod(
  435. $core.method({
  436. selector: "classBuilder",
  437. protocol: "accessing",
  438. fn: function (){
  439. var self=this,$self=this;
  440. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  441. return $core.withContext(function($ctx1) {
  442. //>>excludeEnd("ctx");
  443. return $recv($globals.ClassBuilder)._new();
  444. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  445. }, function($ctx1) {$ctx1.fill(self,"classBuilder",{},$globals.Environment)});
  446. //>>excludeEnd("ctx");
  447. },
  448. //>>excludeStart("ide", pragmas.excludeIdeData);
  449. args: [],
  450. source: "classBuilder\x0a\x09^ ClassBuilder new",
  451. referencedClasses: ["ClassBuilder"],
  452. //>>excludeEnd("ide");
  453. messageSends: ["new"]
  454. }),
  455. $globals.Environment);
  456. $core.addMethod(
  457. $core.method({
  458. selector: "classNamed:",
  459. protocol: "accessing",
  460. fn: function (aString){
  461. var self=this,$self=this;
  462. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  463. return $core.withContext(function($ctx1) {
  464. //>>excludeEnd("ctx");
  465. var $1,$receiver;
  466. $1=$recv($recv($globals.Smalltalk)._globals())._at_($recv(aString)._asSymbol());
  467. if(($receiver = $1) == null || $receiver.a$nil){
  468. return $self._error_("Invalid class name");
  469. } else {
  470. return $1;
  471. }
  472. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  473. }, function($ctx1) {$ctx1.fill(self,"classNamed:",{aString:aString},$globals.Environment)});
  474. //>>excludeEnd("ctx");
  475. },
  476. //>>excludeStart("ide", pragmas.excludeIdeData);
  477. args: ["aString"],
  478. source: "classNamed: aString\x0a\x09^ (Smalltalk globals at: aString asSymbol)\x0a\x09\x09ifNil: [ self error: 'Invalid class name' ]",
  479. referencedClasses: ["Smalltalk"],
  480. //>>excludeEnd("ide");
  481. messageSends: ["ifNil:", "at:", "globals", "asSymbol", "error:"]
  482. }),
  483. $globals.Environment);
  484. $core.addMethod(
  485. $core.method({
  486. selector: "classes",
  487. protocol: "accessing",
  488. fn: function (){
  489. var self=this,$self=this;
  490. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  491. return $core.withContext(function($ctx1) {
  492. //>>excludeEnd("ctx");
  493. return $recv($globals.Smalltalk)._classes();
  494. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  495. }, function($ctx1) {$ctx1.fill(self,"classes",{},$globals.Environment)});
  496. //>>excludeEnd("ctx");
  497. },
  498. //>>excludeStart("ide", pragmas.excludeIdeData);
  499. args: [],
  500. source: "classes\x0a\x09^ Smalltalk classes",
  501. referencedClasses: ["Smalltalk"],
  502. //>>excludeEnd("ide");
  503. messageSends: ["classes"]
  504. }),
  505. $globals.Environment);
  506. $core.addMethod(
  507. $core.method({
  508. selector: "commitPackage:onSuccess:onError:",
  509. protocol: "actions",
  510. fn: function (aPackage,aBlock,anotherBlock){
  511. var self=this,$self=this;
  512. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  513. return $core.withContext(function($ctx1) {
  514. //>>excludeEnd("ctx");
  515. $recv($recv(aPackage)._transport())._commitOnSuccess_onError_(aBlock,anotherBlock);
  516. return self;
  517. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  518. }, function($ctx1) {$ctx1.fill(self,"commitPackage:onSuccess:onError:",{aPackage:aPackage,aBlock:aBlock,anotherBlock:anotherBlock},$globals.Environment)});
  519. //>>excludeEnd("ctx");
  520. },
  521. //>>excludeStart("ide", pragmas.excludeIdeData);
  522. args: ["aPackage", "aBlock", "anotherBlock"],
  523. source: "commitPackage: aPackage onSuccess: aBlock onError: anotherBlock\x0a\x09aPackage transport\x0a\x09\x09commitOnSuccess: aBlock\x0a\x09\x09onError: anotherBlock",
  524. referencedClasses: [],
  525. //>>excludeEnd("ide");
  526. messageSends: ["commitOnSuccess:onError:", "transport"]
  527. }),
  528. $globals.Environment);
  529. $core.addMethod(
  530. $core.method({
  531. selector: "compileClassComment:for:",
  532. protocol: "compiling",
  533. fn: function (aString,aClass){
  534. var self=this,$self=this;
  535. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  536. return $core.withContext(function($ctx1) {
  537. //>>excludeEnd("ctx");
  538. $recv(aClass)._comment_(aString);
  539. return self;
  540. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  541. }, function($ctx1) {$ctx1.fill(self,"compileClassComment:for:",{aString:aString,aClass:aClass},$globals.Environment)});
  542. //>>excludeEnd("ctx");
  543. },
  544. //>>excludeStart("ide", pragmas.excludeIdeData);
  545. args: ["aString", "aClass"],
  546. source: "compileClassComment: aString for: aClass\x0a\x09aClass comment: aString",
  547. referencedClasses: [],
  548. //>>excludeEnd("ide");
  549. messageSends: ["comment:"]
  550. }),
  551. $globals.Environment);
  552. $core.addMethod(
  553. $core.method({
  554. selector: "compileClassDefinition:",
  555. protocol: "compiling",
  556. fn: function (aString){
  557. var self=this,$self=this;
  558. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  559. return $core.withContext(function($ctx1) {
  560. //>>excludeEnd("ctx");
  561. $recv((function(){
  562. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  563. return $core.withContext(function($ctx2) {
  564. //>>excludeEnd("ctx");
  565. return $self._evaluate_for_(aString,$recv($globals.DoIt)._new());
  566. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  567. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  568. //>>excludeEnd("ctx");
  569. }))._on_do_($globals.Error,(function(error){
  570. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  571. return $core.withContext(function($ctx2) {
  572. //>>excludeEnd("ctx");
  573. return $recv($globals.Terminal)._alert_($recv(error)._messageText());
  574. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  575. }, function($ctx2) {$ctx2.fillBlock({error:error},$ctx1,2)});
  576. //>>excludeEnd("ctx");
  577. }));
  578. return self;
  579. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  580. }, function($ctx1) {$ctx1.fill(self,"compileClassDefinition:",{aString:aString},$globals.Environment)});
  581. //>>excludeEnd("ctx");
  582. },
  583. //>>excludeStart("ide", pragmas.excludeIdeData);
  584. args: ["aString"],
  585. source: "compileClassDefinition: aString\x0a\x09[ self evaluate: aString for: DoIt new ]\x0a\x09\x09on: Error\x0a\x09\x09do: [ :error | Terminal alert: error messageText ]",
  586. referencedClasses: ["DoIt", "Error", "Terminal"],
  587. //>>excludeEnd("ide");
  588. messageSends: ["on:do:", "evaluate:for:", "new", "alert:", "messageText"]
  589. }),
  590. $globals.Environment);
  591. $core.addMethod(
  592. $core.method({
  593. selector: "compileMethod:for:protocol:",
  594. protocol: "compiling",
  595. fn: function (sourceCode,class_,protocol){
  596. var self=this,$self=this;
  597. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  598. return $core.withContext(function($ctx1) {
  599. //>>excludeEnd("ctx");
  600. return $recv(class_)._compile_protocol_(sourceCode,protocol);
  601. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  602. }, function($ctx1) {$ctx1.fill(self,"compileMethod:for:protocol:",{sourceCode:sourceCode,class_:class_,protocol:protocol},$globals.Environment)});
  603. //>>excludeEnd("ctx");
  604. },
  605. //>>excludeStart("ide", pragmas.excludeIdeData);
  606. args: ["sourceCode", "class", "protocol"],
  607. source: "compileMethod: sourceCode for: class protocol: protocol\x0a\x09^ class\x0a\x09\x09compile: sourceCode\x0a\x09\x09protocol: protocol",
  608. referencedClasses: [],
  609. //>>excludeEnd("ide");
  610. messageSends: ["compile:protocol:"]
  611. }),
  612. $globals.Environment);
  613. $core.addMethod(
  614. $core.method({
  615. selector: "copyClass:to:",
  616. protocol: "actions",
  617. fn: function (aClass,aClassName){
  618. var self=this,$self=this;
  619. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  620. return $core.withContext(function($ctx1) {
  621. //>>excludeEnd("ctx");
  622. var $1,$2,$receiver;
  623. $1=$recv($recv($globals.Smalltalk)._globals())._at_(aClassName);
  624. if(($receiver = $1) == null || $receiver.a$nil){
  625. $1;
  626. } else {
  627. $2=$recv("A class named ".__comma(aClassName)).__comma(" already exists");
  628. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  629. $ctx1.sendIdx[","]=1;
  630. //>>excludeEnd("ctx");
  631. $self._error_($2);
  632. }
  633. $recv($recv($globals.ClassBuilder)._new())._copyClass_named_(aClass,aClassName);
  634. return self;
  635. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  636. }, function($ctx1) {$ctx1.fill(self,"copyClass:to:",{aClass:aClass,aClassName:aClassName},$globals.Environment)});
  637. //>>excludeEnd("ctx");
  638. },
  639. //>>excludeStart("ide", pragmas.excludeIdeData);
  640. args: ["aClass", "aClassName"],
  641. source: "copyClass: aClass to: aClassName\x0a\x09(Smalltalk globals at: aClassName)\x0a\x09\x09ifNotNil: [ self error: 'A class named ', aClassName, ' already exists' ].\x0a\x09\x09\x0a\x09ClassBuilder new copyClass: aClass named: aClassName",
  642. referencedClasses: ["Smalltalk", "ClassBuilder"],
  643. //>>excludeEnd("ide");
  644. messageSends: ["ifNotNil:", "at:", "globals", "error:", ",", "copyClass:named:", "new"]
  645. }),
  646. $globals.Environment);
  647. $core.addMethod(
  648. $core.method({
  649. selector: "doItReceiver",
  650. protocol: "accessing",
  651. fn: function (){
  652. var self=this,$self=this;
  653. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  654. return $core.withContext(function($ctx1) {
  655. //>>excludeEnd("ctx");
  656. return $recv($globals.DoIt)._new();
  657. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  658. }, function($ctx1) {$ctx1.fill(self,"doItReceiver",{},$globals.Environment)});
  659. //>>excludeEnd("ctx");
  660. },
  661. //>>excludeStart("ide", pragmas.excludeIdeData);
  662. args: [],
  663. source: "doItReceiver\x0a\x09^ DoIt new",
  664. referencedClasses: ["DoIt"],
  665. //>>excludeEnd("ide");
  666. messageSends: ["new"]
  667. }),
  668. $globals.Environment);
  669. $core.addMethod(
  670. $core.method({
  671. selector: "evaluate:for:",
  672. protocol: "evaluating",
  673. fn: function (aString,anObject){
  674. var self=this,$self=this;
  675. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  676. return $core.withContext(function($ctx1) {
  677. //>>excludeEnd("ctx");
  678. return $recv($globals.Evaluator)._evaluate_for_(aString,anObject);
  679. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  680. }, function($ctx1) {$ctx1.fill(self,"evaluate:for:",{aString:aString,anObject:anObject},$globals.Environment)});
  681. //>>excludeEnd("ctx");
  682. },
  683. //>>excludeStart("ide", pragmas.excludeIdeData);
  684. args: ["aString", "anObject"],
  685. source: "evaluate: aString for: anObject\x0a\x09^ Evaluator evaluate: aString for: anObject",
  686. referencedClasses: ["Evaluator"],
  687. //>>excludeEnd("ide");
  688. messageSends: ["evaluate:for:"]
  689. }),
  690. $globals.Environment);
  691. $core.addMethod(
  692. $core.method({
  693. selector: "evaluate:on:do:",
  694. protocol: "error handling",
  695. fn: function (aBlock,anErrorClass,exceptionBlock){
  696. var self=this,$self=this;
  697. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  698. return $core.withContext(function($ctx1) {
  699. //>>excludeEnd("ctx");
  700. var $1;
  701. $recv(aBlock)._tryCatch_((function(exception){
  702. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  703. return $core.withContext(function($ctx2) {
  704. //>>excludeEnd("ctx");
  705. $1=$recv(exception)._isKindOf_($self._classNamed_($recv(anErrorClass)._name()));
  706. if($core.assert($1)){
  707. return $recv(exceptionBlock)._value_(exception);
  708. } else {
  709. return $recv(exception)._resignal();
  710. }
  711. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  712. }, function($ctx2) {$ctx2.fillBlock({exception:exception},$ctx1,1)});
  713. //>>excludeEnd("ctx");
  714. }));
  715. return self;
  716. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  717. }, function($ctx1) {$ctx1.fill(self,"evaluate:on:do:",{aBlock:aBlock,anErrorClass:anErrorClass,exceptionBlock:exceptionBlock},$globals.Environment)});
  718. //>>excludeEnd("ctx");
  719. },
  720. //>>excludeStart("ide", pragmas.excludeIdeData);
  721. args: ["aBlock", "anErrorClass", "exceptionBlock"],
  722. source: "evaluate: aBlock on: anErrorClass do: exceptionBlock\x0a\x09\x22Evaluate a block and catch exceptions happening on the environment stack\x22\x0a\x09\x0a\x09aBlock tryCatch: [ :exception | \x0a\x09\x09(exception isKindOf: (self classNamed: anErrorClass name))\x0a\x09\x09\x09ifTrue: [ exceptionBlock value: exception ]\x0a \x09\x09\x09ifFalse: [ exception resignal ] ]",
  723. referencedClasses: [],
  724. //>>excludeEnd("ide");
  725. messageSends: ["tryCatch:", "ifTrue:ifFalse:", "isKindOf:", "classNamed:", "name", "value:", "resignal"]
  726. }),
  727. $globals.Environment);
  728. $core.addMethod(
  729. $core.method({
  730. selector: "inspect:",
  731. protocol: "actions",
  732. fn: function (anObject){
  733. var self=this,$self=this;
  734. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  735. return $core.withContext(function($ctx1) {
  736. //>>excludeEnd("ctx");
  737. $recv($globals.Inspector)._inspect_(anObject);
  738. return self;
  739. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  740. }, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},$globals.Environment)});
  741. //>>excludeEnd("ctx");
  742. },
  743. //>>excludeStart("ide", pragmas.excludeIdeData);
  744. args: ["anObject"],
  745. source: "inspect: anObject\x0a\x09Inspector inspect: anObject",
  746. referencedClasses: ["Inspector"],
  747. //>>excludeEnd("ide");
  748. messageSends: ["inspect:"]
  749. }),
  750. $globals.Environment);
  751. $core.addMethod(
  752. $core.method({
  753. selector: "moveClass:toPackage:",
  754. protocol: "actions",
  755. fn: function (aClass,aPackageName){
  756. var self=this,$self=this;
  757. var package_;
  758. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  759. return $core.withContext(function($ctx1) {
  760. //>>excludeEnd("ctx");
  761. var $1,$2,$receiver;
  762. package_=$recv($globals.Package)._named_(aPackageName);
  763. $1=package_;
  764. if(($receiver = $1) == null || $receiver.a$nil){
  765. $self._error_("Invalid package name");
  766. } else {
  767. $1;
  768. }
  769. $2=$recv(package_).__eq_eq($recv(aClass)._package());
  770. if($core.assert($2)){
  771. return self;
  772. }
  773. $recv(aClass)._package_(package_);
  774. $recv(aClass)._recompile();
  775. return self;
  776. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  777. }, function($ctx1) {$ctx1.fill(self,"moveClass:toPackage:",{aClass:aClass,aPackageName:aPackageName,package_:package_},$globals.Environment)});
  778. //>>excludeEnd("ctx");
  779. },
  780. //>>excludeStart("ide", pragmas.excludeIdeData);
  781. args: ["aClass", "aPackageName"],
  782. source: "moveClass: aClass toPackage: aPackageName\x0a\x09| package |\x0a\x09\x0a\x09package := Package named: aPackageName.\x0a\x09package ifNil: [ self error: 'Invalid package name' ].\x0a\x09package == aClass package ifTrue: [ ^ self ].\x0a\x09\x0a\x09aClass package: package.\x0a\x09aClass recompile",
  783. referencedClasses: ["Package"],
  784. //>>excludeEnd("ide");
  785. messageSends: ["named:", "ifNil:", "error:", "ifTrue:", "==", "package", "package:", "recompile"]
  786. }),
  787. $globals.Environment);
  788. $core.addMethod(
  789. $core.method({
  790. selector: "moveMethod:toClass:",
  791. protocol: "actions",
  792. fn: function (aMethod,aClassName){
  793. var self=this,$self=this;
  794. var destinationClass;
  795. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  796. return $core.withContext(function($ctx1) {
  797. //>>excludeEnd("ctx");
  798. var $2,$3,$1,$5,$4;
  799. destinationClass=$self._classNamed_(aClassName);
  800. $2=destinationClass;
  801. $3=$recv(aMethod)._methodClass();
  802. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  803. $ctx1.sendIdx["methodClass"]=1;
  804. //>>excludeEnd("ctx");
  805. $1=$recv($2).__eq_eq($3);
  806. if($core.assert($1)){
  807. return self;
  808. }
  809. $5=$recv(aMethod)._methodClass();
  810. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  811. $ctx1.sendIdx["methodClass"]=2;
  812. //>>excludeEnd("ctx");
  813. $4=$recv($5)._isMetaclass();
  814. if($core.assert($4)){
  815. destinationClass=$recv(destinationClass)._theMetaClass();
  816. destinationClass;
  817. }
  818. $recv(destinationClass)._compile_protocol_($recv(aMethod)._source(),$recv(aMethod)._protocol());
  819. $recv($recv(aMethod)._methodClass())._removeCompiledMethod_(aMethod);
  820. return self;
  821. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  822. }, function($ctx1) {$ctx1.fill(self,"moveMethod:toClass:",{aMethod:aMethod,aClassName:aClassName,destinationClass:destinationClass},$globals.Environment)});
  823. //>>excludeEnd("ctx");
  824. },
  825. //>>excludeStart("ide", pragmas.excludeIdeData);
  826. args: ["aMethod", "aClassName"],
  827. source: "moveMethod: aMethod toClass: aClassName\x0a\x09| destinationClass |\x0a\x09\x0a\x09destinationClass := self classNamed: aClassName.\x0a\x09destinationClass == aMethod methodClass ifTrue: [ ^ self ].\x0a\x09\x0a\x09aMethod methodClass isMetaclass ifTrue: [ \x0a\x09\x09destinationClass := destinationClass theMetaClass ].\x0a\x09\x0a\x09destinationClass \x0a\x09\x09compile: aMethod source\x0a\x09\x09protocol: aMethod protocol.\x0a\x09aMethod methodClass \x0a\x09\x09removeCompiledMethod: aMethod",
  828. referencedClasses: [],
  829. //>>excludeEnd("ide");
  830. messageSends: ["classNamed:", "ifTrue:", "==", "methodClass", "isMetaclass", "theMetaClass", "compile:protocol:", "source", "protocol", "removeCompiledMethod:"]
  831. }),
  832. $globals.Environment);
  833. $core.addMethod(
  834. $core.method({
  835. selector: "moveMethod:toProtocol:",
  836. protocol: "actions",
  837. fn: function (aMethod,aProtocol){
  838. var self=this,$self=this;
  839. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  840. return $core.withContext(function($ctx1) {
  841. //>>excludeEnd("ctx");
  842. $recv(aMethod)._protocol_(aProtocol);
  843. $recv($recv(aMethod)._methodClass())._compile_protocol_($recv(aMethod)._source(),$recv(aMethod)._protocol());
  844. return self;
  845. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  846. }, function($ctx1) {$ctx1.fill(self,"moveMethod:toProtocol:",{aMethod:aMethod,aProtocol:aProtocol},$globals.Environment)});
  847. //>>excludeEnd("ctx");
  848. },
  849. //>>excludeStart("ide", pragmas.excludeIdeData);
  850. args: ["aMethod", "aProtocol"],
  851. source: "moveMethod: aMethod toProtocol: aProtocol\x0a\x09aMethod protocol: aProtocol.\x0a\x0a\x09aMethod methodClass\x0a\x09\x09compile: aMethod source\x0a\x09\x09protocol: aMethod protocol",
  852. referencedClasses: [],
  853. //>>excludeEnd("ide");
  854. messageSends: ["protocol:", "compile:protocol:", "methodClass", "source", "protocol"]
  855. }),
  856. $globals.Environment);
  857. $core.addMethod(
  858. $core.method({
  859. selector: "packages",
  860. protocol: "accessing",
  861. fn: function (){
  862. var self=this,$self=this;
  863. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  864. return $core.withContext(function($ctx1) {
  865. //>>excludeEnd("ctx");
  866. return $recv($globals.Smalltalk)._packages();
  867. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  868. }, function($ctx1) {$ctx1.fill(self,"packages",{},$globals.Environment)});
  869. //>>excludeEnd("ctx");
  870. },
  871. //>>excludeStart("ide", pragmas.excludeIdeData);
  872. args: [],
  873. source: "packages\x0a\x09^ Smalltalk packages",
  874. referencedClasses: ["Smalltalk"],
  875. //>>excludeEnd("ide");
  876. messageSends: ["packages"]
  877. }),
  878. $globals.Environment);
  879. $core.addMethod(
  880. $core.method({
  881. selector: "registerErrorHandler:",
  882. protocol: "services",
  883. fn: function (anErrorHandler){
  884. var self=this,$self=this;
  885. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  886. return $core.withContext(function($ctx1) {
  887. //>>excludeEnd("ctx");
  888. $recv($globals.ErrorHandler)._register_(anErrorHandler);
  889. return self;
  890. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  891. }, function($ctx1) {$ctx1.fill(self,"registerErrorHandler:",{anErrorHandler:anErrorHandler},$globals.Environment)});
  892. //>>excludeEnd("ctx");
  893. },
  894. //>>excludeStart("ide", pragmas.excludeIdeData);
  895. args: ["anErrorHandler"],
  896. source: "registerErrorHandler: anErrorHandler\x0a\x09ErrorHandler register: anErrorHandler",
  897. referencedClasses: ["ErrorHandler"],
  898. //>>excludeEnd("ide");
  899. messageSends: ["register:"]
  900. }),
  901. $globals.Environment);
  902. $core.addMethod(
  903. $core.method({
  904. selector: "registerFinder:",
  905. protocol: "services",
  906. fn: function (aFinder){
  907. var self=this,$self=this;
  908. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  909. return $core.withContext(function($ctx1) {
  910. //>>excludeEnd("ctx");
  911. $recv($globals.Finder)._register_(aFinder);
  912. return self;
  913. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  914. }, function($ctx1) {$ctx1.fill(self,"registerFinder:",{aFinder:aFinder},$globals.Environment)});
  915. //>>excludeEnd("ctx");
  916. },
  917. //>>excludeStart("ide", pragmas.excludeIdeData);
  918. args: ["aFinder"],
  919. source: "registerFinder: aFinder\x0a\x09Finder register: aFinder",
  920. referencedClasses: ["Finder"],
  921. //>>excludeEnd("ide");
  922. messageSends: ["register:"]
  923. }),
  924. $globals.Environment);
  925. $core.addMethod(
  926. $core.method({
  927. selector: "registerInspector:",
  928. protocol: "services",
  929. fn: function (anInspector){
  930. var self=this,$self=this;
  931. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  932. return $core.withContext(function($ctx1) {
  933. //>>excludeEnd("ctx");
  934. $recv($globals.Inspector)._register_(anInspector);
  935. return self;
  936. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  937. }, function($ctx1) {$ctx1.fill(self,"registerInspector:",{anInspector:anInspector},$globals.Environment)});
  938. //>>excludeEnd("ctx");
  939. },
  940. //>>excludeStart("ide", pragmas.excludeIdeData);
  941. args: ["anInspector"],
  942. source: "registerInspector: anInspector\x0a\x09Inspector register: anInspector",
  943. referencedClasses: ["Inspector"],
  944. //>>excludeEnd("ide");
  945. messageSends: ["register:"]
  946. }),
  947. $globals.Environment);
  948. $core.addMethod(
  949. $core.method({
  950. selector: "registerProgressHandler:",
  951. protocol: "services",
  952. fn: function (aProgressHandler){
  953. var self=this,$self=this;
  954. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  955. return $core.withContext(function($ctx1) {
  956. //>>excludeEnd("ctx");
  957. $recv($globals.ProgressHandler)._register_(aProgressHandler);
  958. return self;
  959. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  960. }, function($ctx1) {$ctx1.fill(self,"registerProgressHandler:",{aProgressHandler:aProgressHandler},$globals.Environment)});
  961. //>>excludeEnd("ctx");
  962. },
  963. //>>excludeStart("ide", pragmas.excludeIdeData);
  964. args: ["aProgressHandler"],
  965. source: "registerProgressHandler: aProgressHandler\x0a\x09ProgressHandler register: aProgressHandler",
  966. referencedClasses: ["ProgressHandler"],
  967. //>>excludeEnd("ide");
  968. messageSends: ["register:"]
  969. }),
  970. $globals.Environment);
  971. $core.addMethod(
  972. $core.method({
  973. selector: "registerTranscript:",
  974. protocol: "services",
  975. fn: function (aTranscript){
  976. var self=this,$self=this;
  977. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  978. return $core.withContext(function($ctx1) {
  979. //>>excludeEnd("ctx");
  980. $recv($globals.Transcript)._register_(aTranscript);
  981. return self;
  982. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  983. }, function($ctx1) {$ctx1.fill(self,"registerTranscript:",{aTranscript:aTranscript},$globals.Environment)});
  984. //>>excludeEnd("ctx");
  985. },
  986. //>>excludeStart("ide", pragmas.excludeIdeData);
  987. args: ["aTranscript"],
  988. source: "registerTranscript: aTranscript\x0a\x09Transcript register: aTranscript",
  989. referencedClasses: ["Transcript"],
  990. //>>excludeEnd("ide");
  991. messageSends: ["register:"]
  992. }),
  993. $globals.Environment);
  994. $core.addMethod(
  995. $core.method({
  996. selector: "removeClass:",
  997. protocol: "actions",
  998. fn: function (aClass){
  999. var self=this,$self=this;
  1000. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1001. return $core.withContext(function($ctx1) {
  1002. //>>excludeEnd("ctx");
  1003. $recv($globals.Smalltalk)._removeClass_(aClass);
  1004. return self;
  1005. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1006. }, function($ctx1) {$ctx1.fill(self,"removeClass:",{aClass:aClass},$globals.Environment)});
  1007. //>>excludeEnd("ctx");
  1008. },
  1009. //>>excludeStart("ide", pragmas.excludeIdeData);
  1010. args: ["aClass"],
  1011. source: "removeClass: aClass\x0a\x09Smalltalk removeClass: aClass",
  1012. referencedClasses: ["Smalltalk"],
  1013. //>>excludeEnd("ide");
  1014. messageSends: ["removeClass:"]
  1015. }),
  1016. $globals.Environment);
  1017. $core.addMethod(
  1018. $core.method({
  1019. selector: "removeMethod:",
  1020. protocol: "actions",
  1021. fn: function (aMethod){
  1022. var self=this,$self=this;
  1023. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1024. return $core.withContext(function($ctx1) {
  1025. //>>excludeEnd("ctx");
  1026. $recv($recv(aMethod)._methodClass())._removeCompiledMethod_(aMethod);
  1027. return self;
  1028. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1029. }, function($ctx1) {$ctx1.fill(self,"removeMethod:",{aMethod:aMethod},$globals.Environment)});
  1030. //>>excludeEnd("ctx");
  1031. },
  1032. //>>excludeStart("ide", pragmas.excludeIdeData);
  1033. args: ["aMethod"],
  1034. source: "removeMethod: aMethod\x0a\x09aMethod methodClass removeCompiledMethod: aMethod",
  1035. referencedClasses: [],
  1036. //>>excludeEnd("ide");
  1037. messageSends: ["removeCompiledMethod:", "methodClass"]
  1038. }),
  1039. $globals.Environment);
  1040. $core.addMethod(
  1041. $core.method({
  1042. selector: "removeProtocol:from:",
  1043. protocol: "actions",
  1044. fn: function (aString,aClass){
  1045. var self=this,$self=this;
  1046. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1047. return $core.withContext(function($ctx1) {
  1048. //>>excludeEnd("ctx");
  1049. $recv($recv(aClass)._methodsInProtocol_(aString))._do_((function(each){
  1050. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1051. return $core.withContext(function($ctx2) {
  1052. //>>excludeEnd("ctx");
  1053. return $recv(aClass)._removeCompiledMethod_(each);
  1054. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1055. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  1056. //>>excludeEnd("ctx");
  1057. }));
  1058. return self;
  1059. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1060. }, function($ctx1) {$ctx1.fill(self,"removeProtocol:from:",{aString:aString,aClass:aClass},$globals.Environment)});
  1061. //>>excludeEnd("ctx");
  1062. },
  1063. //>>excludeStart("ide", pragmas.excludeIdeData);
  1064. args: ["aString", "aClass"],
  1065. source: "removeProtocol: aString from: aClass\x0a\x09(aClass methodsInProtocol: aString)\x0a\x09\x09do: [ :each | aClass removeCompiledMethod: each ]",
  1066. referencedClasses: [],
  1067. //>>excludeEnd("ide");
  1068. messageSends: ["do:", "methodsInProtocol:", "removeCompiledMethod:"]
  1069. }),
  1070. $globals.Environment);
  1071. $core.addMethod(
  1072. $core.method({
  1073. selector: "renameClass:to:",
  1074. protocol: "actions",
  1075. fn: function (aClass,aClassName){
  1076. var self=this,$self=this;
  1077. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1078. return $core.withContext(function($ctx1) {
  1079. //>>excludeEnd("ctx");
  1080. var $1,$2,$receiver;
  1081. $1=$recv($recv($globals.Smalltalk)._globals())._at_(aClassName);
  1082. if(($receiver = $1) == null || $receiver.a$nil){
  1083. $1;
  1084. } else {
  1085. $2=$recv("A class named ".__comma(aClassName)).__comma(" already exists");
  1086. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1087. $ctx1.sendIdx[","]=1;
  1088. //>>excludeEnd("ctx");
  1089. $self._error_($2);
  1090. }
  1091. $recv($recv($globals.ClassBuilder)._new())._renameClass_to_(aClass,aClassName);
  1092. return self;
  1093. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1094. }, function($ctx1) {$ctx1.fill(self,"renameClass:to:",{aClass:aClass,aClassName:aClassName},$globals.Environment)});
  1095. //>>excludeEnd("ctx");
  1096. },
  1097. //>>excludeStart("ide", pragmas.excludeIdeData);
  1098. args: ["aClass", "aClassName"],
  1099. source: "renameClass: aClass to: aClassName\x0a\x09(Smalltalk globals at: aClassName)\x0a\x09\x09ifNotNil: [ self error: 'A class named ', aClassName, ' already exists' ].\x0a\x09\x09\x0a\x09ClassBuilder new renameClass: aClass to: aClassName",
  1100. referencedClasses: ["Smalltalk", "ClassBuilder"],
  1101. //>>excludeEnd("ide");
  1102. messageSends: ["ifNotNil:", "at:", "globals", "error:", ",", "renameClass:to:", "new"]
  1103. }),
  1104. $globals.Environment);
  1105. $core.addMethod(
  1106. $core.method({
  1107. selector: "renamePackage:to:",
  1108. protocol: "actions",
  1109. fn: function (aPackageName,aNewPackageName){
  1110. var self=this,$self=this;
  1111. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1112. return $core.withContext(function($ctx1) {
  1113. //>>excludeEnd("ctx");
  1114. $recv($globals.Smalltalk)._renamePackage_to_(aPackageName,aNewPackageName);
  1115. return self;
  1116. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1117. }, function($ctx1) {$ctx1.fill(self,"renamePackage:to:",{aPackageName:aPackageName,aNewPackageName:aNewPackageName},$globals.Environment)});
  1118. //>>excludeEnd("ctx");
  1119. },
  1120. //>>excludeStart("ide", pragmas.excludeIdeData);
  1121. args: ["aPackageName", "aNewPackageName"],
  1122. source: "renamePackage: aPackageName to: aNewPackageName\x0a Smalltalk renamePackage: aPackageName to: aNewPackageName",
  1123. referencedClasses: ["Smalltalk"],
  1124. //>>excludeEnd("ide");
  1125. messageSends: ["renamePackage:to:"]
  1126. }),
  1127. $globals.Environment);
  1128. $core.addMethod(
  1129. $core.method({
  1130. selector: "renameProtocol:to:in:",
  1131. protocol: "actions",
  1132. fn: function (aString,anotherString,aClass){
  1133. var self=this,$self=this;
  1134. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1135. return $core.withContext(function($ctx1) {
  1136. //>>excludeEnd("ctx");
  1137. $recv($recv(aClass)._methodsInProtocol_(aString))._do_((function(each){
  1138. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1139. return $core.withContext(function($ctx2) {
  1140. //>>excludeEnd("ctx");
  1141. return $recv(each)._protocol_(anotherString);
  1142. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1143. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  1144. //>>excludeEnd("ctx");
  1145. }));
  1146. return self;
  1147. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1148. }, function($ctx1) {$ctx1.fill(self,"renameProtocol:to:in:",{aString:aString,anotherString:anotherString,aClass:aClass},$globals.Environment)});
  1149. //>>excludeEnd("ctx");
  1150. },
  1151. //>>excludeStart("ide", pragmas.excludeIdeData);
  1152. args: ["aString", "anotherString", "aClass"],
  1153. source: "renameProtocol: aString to: anotherString in: aClass\x0a\x09(aClass methodsInProtocol: aString)\x0a\x09\x09do: [ :each | each protocol: anotherString ]",
  1154. referencedClasses: [],
  1155. //>>excludeEnd("ide");
  1156. messageSends: ["do:", "methodsInProtocol:", "protocol:"]
  1157. }),
  1158. $globals.Environment);
  1159. $core.addMethod(
  1160. $core.method({
  1161. selector: "setClassCommentOf:to:",
  1162. protocol: "actions",
  1163. fn: function (aClass,aString){
  1164. var self=this,$self=this;
  1165. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1166. return $core.withContext(function($ctx1) {
  1167. //>>excludeEnd("ctx");
  1168. $recv(aClass)._comment_(aString);
  1169. return self;
  1170. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1171. }, function($ctx1) {$ctx1.fill(self,"setClassCommentOf:to:",{aClass:aClass,aString:aString},$globals.Environment)});
  1172. //>>excludeEnd("ctx");
  1173. },
  1174. //>>excludeStart("ide", pragmas.excludeIdeData);
  1175. args: ["aClass", "aString"],
  1176. source: "setClassCommentOf: aClass to: aString\x0a\x09aClass comment: aString",
  1177. referencedClasses: [],
  1178. //>>excludeEnd("ide");
  1179. messageSends: ["comment:"]
  1180. }),
  1181. $globals.Environment);
  1182. $core.addMethod(
  1183. $core.method({
  1184. selector: "systemAnnouncer",
  1185. protocol: "accessing",
  1186. fn: function (){
  1187. var self=this,$self=this;
  1188. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1189. return $core.withContext(function($ctx1) {
  1190. //>>excludeEnd("ctx");
  1191. return $recv($recv($recv($globals.Smalltalk)._globals())._at_("SystemAnnouncer"))._current();
  1192. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1193. }, function($ctx1) {$ctx1.fill(self,"systemAnnouncer",{},$globals.Environment)});
  1194. //>>excludeEnd("ctx");
  1195. },
  1196. //>>excludeStart("ide", pragmas.excludeIdeData);
  1197. args: [],
  1198. source: "systemAnnouncer\x0a\x09^ (Smalltalk globals at: #SystemAnnouncer) current",
  1199. referencedClasses: ["Smalltalk"],
  1200. //>>excludeEnd("ide");
  1201. messageSends: ["current", "at:", "globals"]
  1202. }),
  1203. $globals.Environment);
  1204. $core.addClass("NullProgressHandler", $globals.Object, [], "Platform-Services");
  1205. //>>excludeStart("ide", pragmas.excludeIdeData);
  1206. $globals.NullProgressHandler.comment="I am the default progress handler. I do not display any progress, and simply iterate over the collection.";
  1207. //>>excludeEnd("ide");
  1208. $core.addMethod(
  1209. $core.method({
  1210. selector: "do:on:displaying:",
  1211. protocol: "progress handling",
  1212. fn: function (aBlock,aCollection,aString){
  1213. var self=this,$self=this;
  1214. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1215. return $core.withContext(function($ctx1) {
  1216. //>>excludeEnd("ctx");
  1217. $recv(aCollection)._do_(aBlock);
  1218. return self;
  1219. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1220. }, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString},$globals.NullProgressHandler)});
  1221. //>>excludeEnd("ctx");
  1222. },
  1223. //>>excludeStart("ide", pragmas.excludeIdeData);
  1224. args: ["aBlock", "aCollection", "aString"],
  1225. source: "do: aBlock on: aCollection displaying: aString\x0a\x09aCollection do: aBlock",
  1226. referencedClasses: [],
  1227. //>>excludeEnd("ide");
  1228. messageSends: ["do:"]
  1229. }),
  1230. $globals.NullProgressHandler);
  1231. $globals.NullProgressHandler.a$cls.iVarNames = ["current"];
  1232. $core.addMethod(
  1233. $core.method({
  1234. selector: "initialize",
  1235. protocol: "initialization",
  1236. fn: function (){
  1237. var self=this,$self=this;
  1238. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1239. return $core.withContext(function($ctx1) {
  1240. //>>excludeEnd("ctx");
  1241. $recv($globals.ProgressHandler)._registerIfNone_($self._new());
  1242. return self;
  1243. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1244. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.NullProgressHandler.a$cls)});
  1245. //>>excludeEnd("ctx");
  1246. },
  1247. //>>excludeStart("ide", pragmas.excludeIdeData);
  1248. args: [],
  1249. source: "initialize\x0a\x09ProgressHandler registerIfNone: self new",
  1250. referencedClasses: ["ProgressHandler"],
  1251. //>>excludeEnd("ide");
  1252. messageSends: ["registerIfNone:", "new"]
  1253. }),
  1254. $globals.NullProgressHandler.a$cls);
  1255. $core.addClass("Service", $globals.Object, [], "Platform-Services");
  1256. //>>excludeStart("ide", pragmas.excludeIdeData);
  1257. $globals.Service.comment="I implement the basic behavior for class registration to a service.\x0a\x0aSee the `Transcript` class for a concrete service.\x0a\x0a## API\x0a\x0aUse class-side methods `#register:` and `#registerIfNone:` to register classes to a specific service.";
  1258. //>>excludeEnd("ide");
  1259. $globals.Service.a$cls.iVarNames = ["current"];
  1260. $core.addMethod(
  1261. $core.method({
  1262. selector: "current",
  1263. protocol: "accessing",
  1264. fn: function (){
  1265. var self=this,$self=this;
  1266. return $self["@current"];
  1267. },
  1268. //>>excludeStart("ide", pragmas.excludeIdeData);
  1269. args: [],
  1270. source: "current\x0a\x09^ current",
  1271. referencedClasses: [],
  1272. //>>excludeEnd("ide");
  1273. messageSends: []
  1274. }),
  1275. $globals.Service.a$cls);
  1276. $core.addMethod(
  1277. $core.method({
  1278. selector: "new",
  1279. protocol: "instance creation",
  1280. fn: function (){
  1281. var self=this,$self=this;
  1282. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1283. return $core.withContext(function($ctx1) {
  1284. //>>excludeEnd("ctx");
  1285. $self._shouldNotImplement();
  1286. return self;
  1287. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1288. }, function($ctx1) {$ctx1.fill(self,"new",{},$globals.Service.a$cls)});
  1289. //>>excludeEnd("ctx");
  1290. },
  1291. //>>excludeStart("ide", pragmas.excludeIdeData);
  1292. args: [],
  1293. source: "new\x0a\x09self shouldNotImplement",
  1294. referencedClasses: [],
  1295. //>>excludeEnd("ide");
  1296. messageSends: ["shouldNotImplement"]
  1297. }),
  1298. $globals.Service.a$cls);
  1299. $core.addMethod(
  1300. $core.method({
  1301. selector: "register:",
  1302. protocol: "registration",
  1303. fn: function (anObject){
  1304. var self=this,$self=this;
  1305. $self["@current"]=anObject;
  1306. return self;
  1307. },
  1308. //>>excludeStart("ide", pragmas.excludeIdeData);
  1309. args: ["anObject"],
  1310. source: "register: anObject\x0a\x09current := anObject",
  1311. referencedClasses: [],
  1312. //>>excludeEnd("ide");
  1313. messageSends: []
  1314. }),
  1315. $globals.Service.a$cls);
  1316. $core.addMethod(
  1317. $core.method({
  1318. selector: "registerIfNone:",
  1319. protocol: "registration",
  1320. fn: function (anObject){
  1321. var self=this,$self=this;
  1322. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1323. return $core.withContext(function($ctx1) {
  1324. //>>excludeEnd("ctx");
  1325. var $1,$receiver;
  1326. $1=$self._current();
  1327. if(($receiver = $1) == null || $receiver.a$nil){
  1328. $self._register_(anObject);
  1329. } else {
  1330. $1;
  1331. }
  1332. return self;
  1333. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1334. }, function($ctx1) {$ctx1.fill(self,"registerIfNone:",{anObject:anObject},$globals.Service.a$cls)});
  1335. //>>excludeEnd("ctx");
  1336. },
  1337. //>>excludeStart("ide", pragmas.excludeIdeData);
  1338. args: ["anObject"],
  1339. source: "registerIfNone: anObject\x0a\x09self current ifNil: [ self register: anObject ]",
  1340. referencedClasses: [],
  1341. //>>excludeEnd("ide");
  1342. messageSends: ["ifNil:", "current", "register:"]
  1343. }),
  1344. $globals.Service.a$cls);
  1345. $core.addClass("ErrorHandler", $globals.Service, [], "Platform-Services");
  1346. //>>excludeStart("ide", pragmas.excludeIdeData);
  1347. $globals.ErrorHandler.comment="I am the service used to handle Smalltalk errors.\x0aSee `boot.js` `handleError()` function.\x0a\x0aRegistered service instances must implement `#handleError:` to perform an action on the thrown exception.";
  1348. //>>excludeEnd("ide");
  1349. $core.addMethod(
  1350. $core.method({
  1351. selector: "handleError:",
  1352. protocol: "error handling",
  1353. fn: function (anError){
  1354. var self=this,$self=this;
  1355. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1356. return $core.withContext(function($ctx1) {
  1357. //>>excludeEnd("ctx");
  1358. var $1;
  1359. $1=$recv((function(){
  1360. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1361. return $core.withContext(function($ctx2) {
  1362. //>>excludeEnd("ctx");
  1363. return $recv(anError)._isSmalltalkError();
  1364. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1365. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1366. //>>excludeEnd("ctx");
  1367. }))._tryCatch_((function(){
  1368. return false;
  1369. }));
  1370. if($core.assert($1)){
  1371. $self._handleUnhandledError_(anError);
  1372. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1373. $ctx1.sendIdx["handleUnhandledError:"]=1;
  1374. //>>excludeEnd("ctx");
  1375. } else {
  1376. var smalltalkError;
  1377. smalltalkError=$recv($globals.JavaScriptException)._on_(anError);
  1378. smalltalkError;
  1379. $recv(smalltalkError)._wrap();
  1380. $self._handleUnhandledError_(smalltalkError);
  1381. }
  1382. return self;
  1383. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1384. }, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},$globals.ErrorHandler.a$cls)});
  1385. //>>excludeEnd("ctx");
  1386. },
  1387. //>>excludeStart("ide", pragmas.excludeIdeData);
  1388. args: ["anError"],
  1389. source: "handleError: anError\x0a\x09([ anError isSmalltalkError ] tryCatch: [ false ])\x0a\x09\x09ifTrue: [ self handleUnhandledError: anError ]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09| smalltalkError |\x0a\x09\x09\x09smalltalkError := JavaScriptException on: anError.\x0a\x09\x09\x09smalltalkError wrap.\x0a\x09\x09\x09self handleUnhandledError: smalltalkError ]",
  1390. referencedClasses: ["JavaScriptException"],
  1391. //>>excludeEnd("ide");
  1392. messageSends: ["ifTrue:ifFalse:", "tryCatch:", "isSmalltalkError", "handleUnhandledError:", "on:", "wrap"]
  1393. }),
  1394. $globals.ErrorHandler.a$cls);
  1395. $core.addMethod(
  1396. $core.method({
  1397. selector: "handleUnhandledError:",
  1398. protocol: "error handling",
  1399. fn: function (anError){
  1400. var self=this,$self=this;
  1401. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1402. return $core.withContext(function($ctx1) {
  1403. //>>excludeEnd("ctx");
  1404. var $1;
  1405. $1=$recv(anError)._wasHandled();
  1406. if(!$core.assert($1)){
  1407. $recv($self._current())._handleError_(anError);
  1408. $recv(anError)._beHandled();
  1409. }
  1410. return self;
  1411. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1412. }, function($ctx1) {$ctx1.fill(self,"handleUnhandledError:",{anError:anError},$globals.ErrorHandler.a$cls)});
  1413. //>>excludeEnd("ctx");
  1414. },
  1415. //>>excludeStart("ide", pragmas.excludeIdeData);
  1416. args: ["anError"],
  1417. source: "handleUnhandledError: anError\x0a\x09anError wasHandled ifFalse: [\x0a\x09\x09self current handleError: anError.\x0a\x09\x09anError beHandled ]",
  1418. referencedClasses: [],
  1419. //>>excludeEnd("ide");
  1420. messageSends: ["ifFalse:", "wasHandled", "handleError:", "current", "beHandled"]
  1421. }),
  1422. $globals.ErrorHandler.a$cls);
  1423. $core.addClass("Finder", $globals.Service, [], "Platform-Services");
  1424. //>>excludeStart("ide", pragmas.excludeIdeData);
  1425. $globals.Finder.comment="I am the service responsible for finding classes/methods.\x0a__There is no default finder.__\x0a\x0a## API\x0a\x0aUse `#browse` on an object to find it.";
  1426. //>>excludeEnd("ide");
  1427. $core.addMethod(
  1428. $core.method({
  1429. selector: "findClass:",
  1430. protocol: "finding",
  1431. fn: function (aClass){
  1432. var self=this,$self=this;
  1433. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1434. return $core.withContext(function($ctx1) {
  1435. //>>excludeEnd("ctx");
  1436. return $recv($self._current())._findClass_(aClass);
  1437. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1438. }, function($ctx1) {$ctx1.fill(self,"findClass:",{aClass:aClass},$globals.Finder.a$cls)});
  1439. //>>excludeEnd("ctx");
  1440. },
  1441. //>>excludeStart("ide", pragmas.excludeIdeData);
  1442. args: ["aClass"],
  1443. source: "findClass: aClass\x0a\x09^ self current findClass: aClass",
  1444. referencedClasses: [],
  1445. //>>excludeEnd("ide");
  1446. messageSends: ["findClass:", "current"]
  1447. }),
  1448. $globals.Finder.a$cls);
  1449. $core.addMethod(
  1450. $core.method({
  1451. selector: "findMethod:",
  1452. protocol: "finding",
  1453. fn: function (aCompiledMethod){
  1454. var self=this,$self=this;
  1455. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1456. return $core.withContext(function($ctx1) {
  1457. //>>excludeEnd("ctx");
  1458. return $recv($self._current())._findMethod_(aCompiledMethod);
  1459. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1460. }, function($ctx1) {$ctx1.fill(self,"findMethod:",{aCompiledMethod:aCompiledMethod},$globals.Finder.a$cls)});
  1461. //>>excludeEnd("ctx");
  1462. },
  1463. //>>excludeStart("ide", pragmas.excludeIdeData);
  1464. args: ["aCompiledMethod"],
  1465. source: "findMethod: aCompiledMethod\x0a\x09^ self current findMethod: aCompiledMethod",
  1466. referencedClasses: [],
  1467. //>>excludeEnd("ide");
  1468. messageSends: ["findMethod:", "current"]
  1469. }),
  1470. $globals.Finder.a$cls);
  1471. $core.addMethod(
  1472. $core.method({
  1473. selector: "findString:",
  1474. protocol: "finding",
  1475. fn: function (aString){
  1476. var self=this,$self=this;
  1477. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1478. return $core.withContext(function($ctx1) {
  1479. //>>excludeEnd("ctx");
  1480. return $recv($self._current())._findString_(aString);
  1481. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1482. }, function($ctx1) {$ctx1.fill(self,"findString:",{aString:aString},$globals.Finder.a$cls)});
  1483. //>>excludeEnd("ctx");
  1484. },
  1485. //>>excludeStart("ide", pragmas.excludeIdeData);
  1486. args: ["aString"],
  1487. source: "findString: aString\x0a\x09^ self current findString: aString",
  1488. referencedClasses: [],
  1489. //>>excludeEnd("ide");
  1490. messageSends: ["findString:", "current"]
  1491. }),
  1492. $globals.Finder.a$cls);
  1493. $core.addClass("Inspector", $globals.Service, [], "Platform-Services");
  1494. //>>excludeStart("ide", pragmas.excludeIdeData);
  1495. $globals.Inspector.comment="I am the service responsible for inspecting objects.\x0a\x0aThe default inspector object is the transcript.";
  1496. //>>excludeEnd("ide");
  1497. $core.addMethod(
  1498. $core.method({
  1499. selector: "inspect:",
  1500. protocol: "inspecting",
  1501. fn: function (anObject){
  1502. var self=this,$self=this;
  1503. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1504. return $core.withContext(function($ctx1) {
  1505. //>>excludeEnd("ctx");
  1506. return $recv($self._current())._inspect_(anObject);
  1507. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1508. }, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},$globals.Inspector.a$cls)});
  1509. //>>excludeEnd("ctx");
  1510. },
  1511. //>>excludeStart("ide", pragmas.excludeIdeData);
  1512. args: ["anObject"],
  1513. source: "inspect: anObject\x0a\x09^ self current inspect: anObject",
  1514. referencedClasses: [],
  1515. //>>excludeEnd("ide");
  1516. messageSends: ["inspect:", "current"]
  1517. }),
  1518. $globals.Inspector.a$cls);
  1519. $core.addClass("Platform", $globals.Service, [], "Platform-Services");
  1520. //>>excludeStart("ide", pragmas.excludeIdeData);
  1521. $globals.Platform.comment="I am bridge to JS environment.\x0a\x0a## API\x0a\x0a Platform globals. \x22JS global object\x22\x0a Platform newXHR \x22new XMLHttpRequest() or its shim\x22";
  1522. //>>excludeEnd("ide");
  1523. $core.addMethod(
  1524. $core.method({
  1525. selector: "globals",
  1526. protocol: "accessing",
  1527. fn: function (){
  1528. var self=this,$self=this;
  1529. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1530. return $core.withContext(function($ctx1) {
  1531. //>>excludeEnd("ctx");
  1532. return $recv($self._current())._globals();
  1533. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1534. }, function($ctx1) {$ctx1.fill(self,"globals",{},$globals.Platform.a$cls)});
  1535. //>>excludeEnd("ctx");
  1536. },
  1537. //>>excludeStart("ide", pragmas.excludeIdeData);
  1538. args: [],
  1539. source: "globals\x0a\x09^ self current globals",
  1540. referencedClasses: [],
  1541. //>>excludeEnd("ide");
  1542. messageSends: ["globals", "current"]
  1543. }),
  1544. $globals.Platform.a$cls);
  1545. $core.addMethod(
  1546. $core.method({
  1547. selector: "newXhr",
  1548. protocol: "accessing",
  1549. fn: function (){
  1550. var self=this,$self=this;
  1551. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1552. return $core.withContext(function($ctx1) {
  1553. //>>excludeEnd("ctx");
  1554. return $recv($self._current())._newXhr();
  1555. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1556. }, function($ctx1) {$ctx1.fill(self,"newXhr",{},$globals.Platform.a$cls)});
  1557. //>>excludeEnd("ctx");
  1558. },
  1559. //>>excludeStart("ide", pragmas.excludeIdeData);
  1560. args: [],
  1561. source: "newXhr\x0a\x09^ self current newXhr",
  1562. referencedClasses: [],
  1563. //>>excludeEnd("ide");
  1564. messageSends: ["newXhr", "current"]
  1565. }),
  1566. $globals.Platform.a$cls);
  1567. $core.addClass("ProgressHandler", $globals.Service, [], "Platform-Services");
  1568. //>>excludeStart("ide", pragmas.excludeIdeData);
  1569. $globals.ProgressHandler.comment="I am used to manage progress in collection iterations, see `SequenceableCollection >> #do:displayingProgress:`.\x0a\x0aRegistered instances must implement `#do:on:displaying:`.\x0a\x0aThe default behavior is to simply iterate over the collection, using `NullProgressHandler`.";
  1570. //>>excludeEnd("ide");
  1571. $core.addMethod(
  1572. $core.method({
  1573. selector: "do:on:displaying:",
  1574. protocol: "progress handling",
  1575. fn: function (aBlock,aCollection,aString){
  1576. var self=this,$self=this;
  1577. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1578. return $core.withContext(function($ctx1) {
  1579. //>>excludeEnd("ctx");
  1580. $recv($self._current())._do_on_displaying_(aBlock,aCollection,aString);
  1581. return self;
  1582. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1583. }, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString},$globals.ProgressHandler.a$cls)});
  1584. //>>excludeEnd("ctx");
  1585. },
  1586. //>>excludeStart("ide", pragmas.excludeIdeData);
  1587. args: ["aBlock", "aCollection", "aString"],
  1588. source: "do: aBlock on: aCollection displaying: aString\x0a\x09self current do: aBlock on: aCollection displaying: aString",
  1589. referencedClasses: [],
  1590. //>>excludeEnd("ide");
  1591. messageSends: ["do:on:displaying:", "current"]
  1592. }),
  1593. $globals.ProgressHandler.a$cls);
  1594. $core.addClass("Terminal", $globals.Service, [], "Platform-Services");
  1595. //>>excludeStart("ide", pragmas.excludeIdeData);
  1596. $globals.Terminal.comment="I am UI interface service.\x0a\x0a## API\x0a\x0a Terminal alert: 'Hey, there is a problem'.\x0a Terminal confirm: 'Affirmative?'.\x0a Terminal prompt: 'Your name:'.";
  1597. //>>excludeEnd("ide");
  1598. $core.addMethod(
  1599. $core.method({
  1600. selector: "alert:",
  1601. protocol: "dialogs",
  1602. fn: function (aString){
  1603. var self=this,$self=this;
  1604. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1605. return $core.withContext(function($ctx1) {
  1606. //>>excludeEnd("ctx");
  1607. return $recv($self._current())._alert_(aString);
  1608. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1609. }, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString},$globals.Terminal.a$cls)});
  1610. //>>excludeEnd("ctx");
  1611. },
  1612. //>>excludeStart("ide", pragmas.excludeIdeData);
  1613. args: ["aString"],
  1614. source: "alert: aString\x0a\x09^ self current alert: aString",
  1615. referencedClasses: [],
  1616. //>>excludeEnd("ide");
  1617. messageSends: ["alert:", "current"]
  1618. }),
  1619. $globals.Terminal.a$cls);
  1620. $core.addMethod(
  1621. $core.method({
  1622. selector: "confirm:",
  1623. protocol: "dialogs",
  1624. fn: function (aString){
  1625. var self=this,$self=this;
  1626. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1627. return $core.withContext(function($ctx1) {
  1628. //>>excludeEnd("ctx");
  1629. return $recv($self._current())._confirm_(aString);
  1630. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1631. }, function($ctx1) {$ctx1.fill(self,"confirm:",{aString:aString},$globals.Terminal.a$cls)});
  1632. //>>excludeEnd("ctx");
  1633. },
  1634. //>>excludeStart("ide", pragmas.excludeIdeData);
  1635. args: ["aString"],
  1636. source: "confirm: aString\x0a\x09^ self current confirm: aString",
  1637. referencedClasses: [],
  1638. //>>excludeEnd("ide");
  1639. messageSends: ["confirm:", "current"]
  1640. }),
  1641. $globals.Terminal.a$cls);
  1642. $core.addMethod(
  1643. $core.method({
  1644. selector: "prompt:",
  1645. protocol: "dialogs",
  1646. fn: function (aString){
  1647. var self=this,$self=this;
  1648. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1649. return $core.withContext(function($ctx1) {
  1650. //>>excludeEnd("ctx");
  1651. return $recv($self._current())._prompt_(aString);
  1652. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1653. }, function($ctx1) {$ctx1.fill(self,"prompt:",{aString:aString},$globals.Terminal.a$cls)});
  1654. //>>excludeEnd("ctx");
  1655. },
  1656. //>>excludeStart("ide", pragmas.excludeIdeData);
  1657. args: ["aString"],
  1658. source: "prompt: aString\x0a\x09^ self current prompt: aString",
  1659. referencedClasses: [],
  1660. //>>excludeEnd("ide");
  1661. messageSends: ["prompt:", "current"]
  1662. }),
  1663. $globals.Terminal.a$cls);
  1664. $core.addMethod(
  1665. $core.method({
  1666. selector: "prompt:default:",
  1667. protocol: "dialogs",
  1668. fn: function (aString,defaultString){
  1669. var self=this,$self=this;
  1670. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1671. return $core.withContext(function($ctx1) {
  1672. //>>excludeEnd("ctx");
  1673. return $recv($self._current())._prompt_default_(aString,defaultString);
  1674. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1675. }, function($ctx1) {$ctx1.fill(self,"prompt:default:",{aString:aString,defaultString:defaultString},$globals.Terminal.a$cls)});
  1676. //>>excludeEnd("ctx");
  1677. },
  1678. //>>excludeStart("ide", pragmas.excludeIdeData);
  1679. args: ["aString", "defaultString"],
  1680. source: "prompt: aString default: defaultString\x0a\x09^ self current prompt: aString default: defaultString",
  1681. referencedClasses: [],
  1682. //>>excludeEnd("ide");
  1683. messageSends: ["prompt:default:", "current"]
  1684. }),
  1685. $globals.Terminal.a$cls);
  1686. $core.addClass("Transcript", $globals.Service, [], "Platform-Services");
  1687. //>>excludeStart("ide", pragmas.excludeIdeData);
  1688. $globals.Transcript.comment="I am a facade for Transcript actions.\x0a\x0aI delegate actions to the currently registered transcript.\x0a\x0a## API\x0a\x0a Transcript \x0a show: 'hello world';\x0a cr;\x0a show: anObject.";
  1689. //>>excludeEnd("ide");
  1690. $core.addMethod(
  1691. $core.method({
  1692. selector: "clear",
  1693. protocol: "printing",
  1694. fn: function (){
  1695. var self=this,$self=this;
  1696. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1697. return $core.withContext(function($ctx1) {
  1698. //>>excludeEnd("ctx");
  1699. $recv($self._current())._clear();
  1700. return self;
  1701. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1702. }, function($ctx1) {$ctx1.fill(self,"clear",{},$globals.Transcript.a$cls)});
  1703. //>>excludeEnd("ctx");
  1704. },
  1705. //>>excludeStart("ide", pragmas.excludeIdeData);
  1706. args: [],
  1707. source: "clear\x0a\x09self current clear",
  1708. referencedClasses: [],
  1709. //>>excludeEnd("ide");
  1710. messageSends: ["clear", "current"]
  1711. }),
  1712. $globals.Transcript.a$cls);
  1713. $core.addMethod(
  1714. $core.method({
  1715. selector: "cr",
  1716. protocol: "printing",
  1717. fn: function (){
  1718. var self=this,$self=this;
  1719. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1720. return $core.withContext(function($ctx1) {
  1721. //>>excludeEnd("ctx");
  1722. $recv($self._current())._show_($recv($globals.String)._cr());
  1723. return self;
  1724. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1725. }, function($ctx1) {$ctx1.fill(self,"cr",{},$globals.Transcript.a$cls)});
  1726. //>>excludeEnd("ctx");
  1727. },
  1728. //>>excludeStart("ide", pragmas.excludeIdeData);
  1729. args: [],
  1730. source: "cr\x0a\x09self current show: String cr",
  1731. referencedClasses: ["String"],
  1732. //>>excludeEnd("ide");
  1733. messageSends: ["show:", "current", "cr"]
  1734. }),
  1735. $globals.Transcript.a$cls);
  1736. $core.addMethod(
  1737. $core.method({
  1738. selector: "inspect:",
  1739. protocol: "printing",
  1740. fn: function (anObject){
  1741. var self=this,$self=this;
  1742. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1743. return $core.withContext(function($ctx1) {
  1744. //>>excludeEnd("ctx");
  1745. $self._show_(anObject);
  1746. return self;
  1747. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1748. }, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},$globals.Transcript.a$cls)});
  1749. //>>excludeEnd("ctx");
  1750. },
  1751. //>>excludeStart("ide", pragmas.excludeIdeData);
  1752. args: ["anObject"],
  1753. source: "inspect: anObject\x0a\x09self show: anObject",
  1754. referencedClasses: [],
  1755. //>>excludeEnd("ide");
  1756. messageSends: ["show:"]
  1757. }),
  1758. $globals.Transcript.a$cls);
  1759. $core.addMethod(
  1760. $core.method({
  1761. selector: "open",
  1762. protocol: "instance creation",
  1763. fn: function (){
  1764. var self=this,$self=this;
  1765. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1766. return $core.withContext(function($ctx1) {
  1767. //>>excludeEnd("ctx");
  1768. $recv($self._current())._open();
  1769. return self;
  1770. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1771. }, function($ctx1) {$ctx1.fill(self,"open",{},$globals.Transcript.a$cls)});
  1772. //>>excludeEnd("ctx");
  1773. },
  1774. //>>excludeStart("ide", pragmas.excludeIdeData);
  1775. args: [],
  1776. source: "open\x0a\x09self current open",
  1777. referencedClasses: [],
  1778. //>>excludeEnd("ide");
  1779. messageSends: ["open", "current"]
  1780. }),
  1781. $globals.Transcript.a$cls);
  1782. $core.addMethod(
  1783. $core.method({
  1784. selector: "show:",
  1785. protocol: "printing",
  1786. fn: function (anObject){
  1787. var self=this,$self=this;
  1788. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1789. return $core.withContext(function($ctx1) {
  1790. //>>excludeEnd("ctx");
  1791. $recv($self._current())._show_(anObject);
  1792. return self;
  1793. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1794. }, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject},$globals.Transcript.a$cls)});
  1795. //>>excludeEnd("ctx");
  1796. },
  1797. //>>excludeStart("ide", pragmas.excludeIdeData);
  1798. args: ["anObject"],
  1799. source: "show: anObject\x0a\x09self current show: anObject",
  1800. referencedClasses: [],
  1801. //>>excludeEnd("ide");
  1802. messageSends: ["show:", "current"]
  1803. }),
  1804. $globals.Transcript.a$cls);
  1805. $core.addMethod(
  1806. $core.method({
  1807. selector: "inspectOn:",
  1808. protocol: "*Platform-Services",
  1809. fn: function (anInspector){
  1810. var self=this,$self=this;
  1811. var variables;
  1812. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1813. return $core.withContext(function($ctx1) {
  1814. //>>excludeEnd("ctx");
  1815. variables=$recv($globals.Dictionary)._new();
  1816. $recv(variables)._at_put_("#self",self);
  1817. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1818. $ctx1.sendIdx["at:put:"]=1;
  1819. //>>excludeEnd("ctx");
  1820. $recv(variables)._at_put_("#keys",$self._keys());
  1821. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1822. $ctx1.sendIdx["at:put:"]=2;
  1823. //>>excludeEnd("ctx");
  1824. $self._keysAndValuesDo_((function(key,value){
  1825. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1826. return $core.withContext(function($ctx2) {
  1827. //>>excludeEnd("ctx");
  1828. return $recv(variables)._at_put_(key,value);
  1829. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1830. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1,1)});
  1831. //>>excludeEnd("ctx");
  1832. }));
  1833. $recv(anInspector)._setLabel_($self._printString());
  1834. $recv(anInspector)._setVariables_(variables);
  1835. return self;
  1836. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1837. }, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.AssociativeCollection)});
  1838. //>>excludeEnd("ctx");
  1839. },
  1840. //>>excludeStart("ide", pragmas.excludeIdeData);
  1841. args: ["anInspector"],
  1842. source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09variables at: '#keys' put: self keys.\x0a\x09self keysAndValuesDo: [ :key :value |\x0a\x09\x09variables at: key put: value ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
  1843. referencedClasses: ["Dictionary"],
  1844. //>>excludeEnd("ide");
  1845. messageSends: ["new", "at:put:", "keys", "keysAndValuesDo:", "setLabel:", "printString", "setVariables:"]
  1846. }),
  1847. $globals.AssociativeCollection);
  1848. $core.addMethod(
  1849. $core.method({
  1850. selector: "inspectOn:",
  1851. protocol: "*Platform-Services",
  1852. fn: function (anInspector){
  1853. var self=this,$self=this;
  1854. var variables;
  1855. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1856. return $core.withContext(function($ctx1) {
  1857. //>>excludeEnd("ctx");
  1858. variables=$recv($globals.Dictionary)._new();
  1859. $recv(variables)._at_put_("#self",self);
  1860. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1861. $ctx1.sendIdx["at:put:"]=1;
  1862. //>>excludeEnd("ctx");
  1863. $self._withIndexDo_((function(each,i){
  1864. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1865. return $core.withContext(function($ctx2) {
  1866. //>>excludeEnd("ctx");
  1867. return $recv(variables)._at_put_(i,each);
  1868. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1869. }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1,1)});
  1870. //>>excludeEnd("ctx");
  1871. }));
  1872. $recv(anInspector)._setLabel_($self._printString());
  1873. $recv(anInspector)._setVariables_(variables);
  1874. return self;
  1875. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1876. }, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.Collection)});
  1877. //>>excludeEnd("ctx");
  1878. },
  1879. //>>excludeStart("ide", pragmas.excludeIdeData);
  1880. args: ["anInspector"],
  1881. source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09self withIndexDo: [ :each :i |\x0a\x09\x09variables at: i put: each ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
  1882. referencedClasses: ["Dictionary"],
  1883. //>>excludeEnd("ide");
  1884. messageSends: ["new", "at:put:", "withIndexDo:", "setLabel:", "printString", "setVariables:"]
  1885. }),
  1886. $globals.Collection);
  1887. $core.addMethod(
  1888. $core.method({
  1889. selector: "inspectOn:",
  1890. protocol: "*Platform-Services",
  1891. fn: function (anInspector){
  1892. var self=this,$self=this;
  1893. var variables;
  1894. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1895. return $core.withContext(function($ctx1) {
  1896. //>>excludeEnd("ctx");
  1897. variables=$recv($globals.Dictionary)._new();
  1898. $recv(variables)._at_put_("#self",self);
  1899. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1900. $ctx1.sendIdx["at:put:"]=1;
  1901. //>>excludeEnd("ctx");
  1902. $recv(variables)._at_put_("#year",$self._year());
  1903. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1904. $ctx1.sendIdx["at:put:"]=2;
  1905. //>>excludeEnd("ctx");
  1906. $recv(variables)._at_put_("#month",$self._month());
  1907. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1908. $ctx1.sendIdx["at:put:"]=3;
  1909. //>>excludeEnd("ctx");
  1910. $recv(variables)._at_put_("#day",$self._day());
  1911. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1912. $ctx1.sendIdx["at:put:"]=4;
  1913. //>>excludeEnd("ctx");
  1914. $recv(variables)._at_put_("#hours",$self._hours());
  1915. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1916. $ctx1.sendIdx["at:put:"]=5;
  1917. //>>excludeEnd("ctx");
  1918. $recv(variables)._at_put_("#minutes",$self._minutes());
  1919. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1920. $ctx1.sendIdx["at:put:"]=6;
  1921. //>>excludeEnd("ctx");
  1922. $recv(variables)._at_put_("#seconds",$self._seconds());
  1923. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1924. $ctx1.sendIdx["at:put:"]=7;
  1925. //>>excludeEnd("ctx");
  1926. $recv(variables)._at_put_("#milliseconds",$self._milliseconds());
  1927. $recv(anInspector)._setLabel_($self._printString());
  1928. $recv(anInspector)._setVariables_(variables);
  1929. return self;
  1930. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1931. }, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.Date)});
  1932. //>>excludeEnd("ctx");
  1933. },
  1934. //>>excludeStart("ide", pragmas.excludeIdeData);
  1935. args: ["anInspector"],
  1936. source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09variables at: '#year' put: self year.\x0a\x09variables at: '#month' put: self month.\x0a\x09variables at: '#day' put: self day.\x0a\x09variables at: '#hours' put: self hours.\x0a\x09variables at: '#minutes' put: self minutes.\x0a\x09variables at: '#seconds' put: self seconds.\x0a\x09variables at: '#milliseconds' put: self milliseconds.\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
  1937. referencedClasses: ["Dictionary"],
  1938. //>>excludeEnd("ide");
  1939. messageSends: ["new", "at:put:", "year", "month", "day", "hours", "minutes", "seconds", "milliseconds", "setLabel:", "printString", "setVariables:"]
  1940. }),
  1941. $globals.Date);
  1942. $core.addMethod(
  1943. $core.method({
  1944. selector: "inspectOn:",
  1945. protocol: "*Platform-Services",
  1946. fn: function (anInspector){
  1947. var self=this,$self=this;
  1948. var variables;
  1949. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1950. return $core.withContext(function($ctx1) {
  1951. //>>excludeEnd("ctx");
  1952. variables=$recv($globals.Dictionary)._new();
  1953. $recv(variables)._at_put_("#self",$self._jsObject());
  1954. $recv(anInspector)._setLabel_($self._printString());
  1955. $recv($globals.JSObjectProxy)._addObjectVariablesTo_ofProxy_(variables,self);
  1956. $recv(anInspector)._setVariables_(variables);
  1957. return self;
  1958. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1959. }, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.JSObjectProxy)});
  1960. //>>excludeEnd("ctx");
  1961. },
  1962. //>>excludeStart("ide", pragmas.excludeIdeData);
  1963. args: ["anInspector"],
  1964. source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self jsObject.\x0a\x09anInspector setLabel: self printString.\x0a\x09JSObjectProxy addObjectVariablesTo: variables ofProxy: self.\x0a\x09anInspector setVariables: variables",
  1965. referencedClasses: ["Dictionary", "JSObjectProxy"],
  1966. //>>excludeEnd("ide");
  1967. messageSends: ["new", "at:put:", "jsObject", "setLabel:", "printString", "addObjectVariablesTo:ofProxy:", "setVariables:"]
  1968. }),
  1969. $globals.JSObjectProxy);
  1970. $core.addMethod(
  1971. $core.method({
  1972. selector: "inspectOn:",
  1973. protocol: "*Platform-Services",
  1974. fn: function (anInspector){
  1975. var self=this,$self=this;
  1976. var variables;
  1977. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1978. return $core.withContext(function($ctx1) {
  1979. //>>excludeEnd("ctx");
  1980. variables=$recv($globals.Dictionary)._new();
  1981. $recv(variables)._at_put_("#self",self);
  1982. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1983. $ctx1.sendIdx["at:put:"]=1;
  1984. //>>excludeEnd("ctx");
  1985. $recv(variables)._at_put_("#home",$self._home());
  1986. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1987. $ctx1.sendIdx["at:put:"]=2;
  1988. //>>excludeEnd("ctx");
  1989. $recv(variables)._at_put_("#receiver",$self._receiver());
  1990. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1991. $ctx1.sendIdx["at:put:"]=3;
  1992. //>>excludeEnd("ctx");
  1993. $recv(variables)._at_put_("#selector",$self._selector());
  1994. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1995. $ctx1.sendIdx["at:put:"]=4;
  1996. //>>excludeEnd("ctx");
  1997. $recv(variables)._at_put_("#locals",$self._locals());
  1998. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1999. $ctx1.sendIdx["at:put:"]=5;
  2000. //>>excludeEnd("ctx");
  2001. $recv($recv($self._class())._instanceVariableNames())._do_((function(each){
  2002. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2003. return $core.withContext(function($ctx2) {
  2004. //>>excludeEnd("ctx");
  2005. return $recv(variables)._at_put_(each,$self._instVarAt_(each));
  2006. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2007. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  2008. //>>excludeEnd("ctx");
  2009. }));
  2010. $recv(anInspector)._setLabel_($self._printString());
  2011. $recv(anInspector)._setVariables_(variables);
  2012. return self;
  2013. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2014. }, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.MethodContext)});
  2015. //>>excludeEnd("ctx");
  2016. },
  2017. //>>excludeStart("ide", pragmas.excludeIdeData);
  2018. args: ["anInspector"],
  2019. source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09variables at: '#home' put: self home.\x0a\x09variables at: '#receiver' put: self receiver.\x0a\x09variables at: '#selector' put: self selector.\x0a\x09variables at: '#locals' put: self locals.\x0a\x09self class instanceVariableNames do: [ :each |\x0a\x09\x09variables at: each put: (self instVarAt: each) ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
  2020. referencedClasses: ["Dictionary"],
  2021. //>>excludeEnd("ide");
  2022. messageSends: ["new", "at:put:", "home", "receiver", "selector", "locals", "do:", "instanceVariableNames", "class", "instVarAt:", "setLabel:", "printString", "setVariables:"]
  2023. }),
  2024. $globals.MethodContext);
  2025. $core.addMethod(
  2026. $core.method({
  2027. selector: "inspectOn:",
  2028. protocol: "*Platform-Services",
  2029. fn: function (anInspector){
  2030. var self=this,$self=this;
  2031. var variables;
  2032. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2033. return $core.withContext(function($ctx1) {
  2034. //>>excludeEnd("ctx");
  2035. variables=$recv($globals.Dictionary)._new();
  2036. $recv(variables)._at_put_("#self",self);
  2037. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2038. $ctx1.sendIdx["at:put:"]=1;
  2039. //>>excludeEnd("ctx");
  2040. $recv($recv($self._class())._allInstanceVariableNames())._do_((function(each){
  2041. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2042. return $core.withContext(function($ctx2) {
  2043. //>>excludeEnd("ctx");
  2044. return $recv(variables)._at_put_(each,$self._instVarAt_(each));
  2045. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2046. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  2047. //>>excludeEnd("ctx");
  2048. }));
  2049. $recv(anInspector)._setLabel_($self._printString());
  2050. $recv(anInspector)._setVariables_(variables);
  2051. return self;
  2052. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2053. }, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.Object)});
  2054. //>>excludeEnd("ctx");
  2055. },
  2056. //>>excludeStart("ide", pragmas.excludeIdeData);
  2057. args: ["anInspector"],
  2058. source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09self class allInstanceVariableNames do: [ :each |\x0a\x09\x09variables at: each put: (self instVarAt: each) ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
  2059. referencedClasses: ["Dictionary"],
  2060. //>>excludeEnd("ide");
  2061. messageSends: ["new", "at:put:", "do:", "allInstanceVariableNames", "class", "instVarAt:", "setLabel:", "printString", "setVariables:"]
  2062. }),
  2063. $globals.Object);
  2064. $core.addMethod(
  2065. $core.method({
  2066. selector: "do:displayingProgress:",
  2067. protocol: "*Platform-Services",
  2068. fn: function (aBlock,aString){
  2069. var self=this,$self=this;
  2070. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2071. return $core.withContext(function($ctx1) {
  2072. //>>excludeEnd("ctx");
  2073. $recv($globals.ProgressHandler)._do_on_displaying_(aBlock,self,aString);
  2074. return self;
  2075. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2076. }, function($ctx1) {$ctx1.fill(self,"do:displayingProgress:",{aBlock:aBlock,aString:aString},$globals.SequenceableCollection)});
  2077. //>>excludeEnd("ctx");
  2078. },
  2079. //>>excludeStart("ide", pragmas.excludeIdeData);
  2080. args: ["aBlock", "aString"],
  2081. source: "do: aBlock displayingProgress: aString\x0a\x09ProgressHandler \x0a\x09\x09do: aBlock \x0a\x09\x09on: self \x0a\x09\x09displaying: aString",
  2082. referencedClasses: ["ProgressHandler"],
  2083. //>>excludeEnd("ide");
  2084. messageSends: ["do:on:displaying:"]
  2085. }),
  2086. $globals.SequenceableCollection);
  2087. $core.addMethod(
  2088. $core.method({
  2089. selector: "inspectOn:",
  2090. protocol: "*Platform-Services",
  2091. fn: function (anInspector){
  2092. var self=this,$self=this;
  2093. var variables,i;
  2094. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2095. return $core.withContext(function($ctx1) {
  2096. //>>excludeEnd("ctx");
  2097. variables=$recv($globals.Dictionary)._new();
  2098. $recv(variables)._at_put_("#self",self);
  2099. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2100. $ctx1.sendIdx["at:put:"]=1;
  2101. //>>excludeEnd("ctx");
  2102. i=(1);
  2103. $self._do_((function(each){
  2104. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2105. return $core.withContext(function($ctx2) {
  2106. //>>excludeEnd("ctx");
  2107. $recv(variables)._at_put_(i,each);
  2108. i=$recv(i).__plus((1));
  2109. return i;
  2110. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2111. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  2112. //>>excludeEnd("ctx");
  2113. }));
  2114. $recv(anInspector)._setLabel_($self._printString());
  2115. $recv(anInspector)._setVariables_(variables);
  2116. return self;
  2117. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2118. }, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables,i:i},$globals.Set)});
  2119. //>>excludeEnd("ctx");
  2120. },
  2121. //>>excludeStart("ide", pragmas.excludeIdeData);
  2122. args: ["anInspector"],
  2123. source: "inspectOn: anInspector\x0a\x09| variables i |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09i := 1.\x0a\x09self do: [ :each |\x0a\x09\x09variables at: i put: each.\x0a\x09\x09i := i + 1 ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
  2124. referencedClasses: ["Dictionary"],
  2125. //>>excludeEnd("ide");
  2126. messageSends: ["new", "at:put:", "do:", "+", "setLabel:", "printString", "setVariables:"]
  2127. }),
  2128. $globals.Set);
  2129. $core.addMethod(
  2130. $core.method({
  2131. selector: "inspectOn:",
  2132. protocol: "*Platform-Services",
  2133. fn: function (anInspector){
  2134. var self=this,$self=this;
  2135. var label;
  2136. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2137. return $core.withContext(function($ctx1) {
  2138. //>>excludeEnd("ctx");
  2139. var $3,$2,$1,$5,$4;
  2140. (
  2141. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2142. $ctx1.supercall = true,
  2143. //>>excludeEnd("ctx");
  2144. ($globals.String.superclass||$boot.nilAsClass).fn.prototype._inspectOn_.apply($self, [anInspector]));
  2145. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2146. $ctx1.supercall = false;
  2147. //>>excludeEnd("ctx");;
  2148. $3=$self._printString();
  2149. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2150. $ctx1.sendIdx["printString"]=1;
  2151. //>>excludeEnd("ctx");
  2152. $2=$recv($3)._size();
  2153. $1=$recv($2).__gt((30));
  2154. if($core.assert($1)){
  2155. $5=$self._printString();
  2156. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2157. $ctx1.sendIdx["printString"]=2;
  2158. //>>excludeEnd("ctx");
  2159. $4=$recv($5)._copyFrom_to_((1),(30));
  2160. label=$recv($4).__comma("...'");
  2161. label;
  2162. } else {
  2163. label=$self._printString();
  2164. label;
  2165. }
  2166. $recv(anInspector)._setLabel_(label);
  2167. return self;
  2168. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2169. }, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,label:label},$globals.String)});
  2170. //>>excludeEnd("ctx");
  2171. },
  2172. //>>excludeStart("ide", pragmas.excludeIdeData);
  2173. args: ["anInspector"],
  2174. source: "inspectOn: anInspector\x0a\x09| label |\x0a\x09super inspectOn: anInspector.\x0a\x09self printString size > 30\x0a\x09\x09ifTrue: [ label := (self printString copyFrom: 1 to: 30), '...''' ]\x0a\x09\x09ifFalse: [ label := self printString ].\x0a\x09anInspector setLabel: label",
  2175. referencedClasses: [],
  2176. //>>excludeEnd("ide");
  2177. messageSends: ["inspectOn:", "ifTrue:ifFalse:", ">", "size", "printString", ",", "copyFrom:to:", "setLabel:"]
  2178. }),
  2179. $globals.String);
  2180. });