Platform-Services.js 81 KB

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